Tik-Tok of Oz
by L. Frank Baum
Chapter 17: “A Tragic Transformation”
Additional Information
- Year Published: 1914
- Language: English
- Country of Origin: United States of America
- Source: Baum, L. F. (1914). Tik-Tok of Oz. Chicago: Reilly and Britton.
-
Readability:
- Flesch–Kincaid Level: 7.0
- Word Count: 2,935
- Genre: Fantasy
- Keywords: 20th century literature, american literature, books of oz, children's literature, fantasy, l. frank baum
- ✎ Cite This
Downloads
“Don’t let us worry,” said Shaggy to his companions, “for it may take the Queen some time to conquer the Metal Monarch, as Tik-Tok has to do everything in his slow, mechanical way.”
“Do you suppose they are likely to fail?” asked the Rose Princess.
“I do, indeed,” replied Shaggy. “This Nome King is really a powerful fellow and has a legion of nomes to assist him, whereas our bold Queen commands a Clockwork Man and a band of faint-hearted officers.”
“She ought to have let Quox do the conquering,” said Polychrome, dancing lightly upon a point of rock and fluttering her beautiful draperies. “But perhaps the dragon was wise to let her go first, for when she fails to conquer Ruggedo she may become more modest in her ambitions.”
“Where is the dragon now?” inquired Ozga.
“Up there on the rocks,” replied Files. “Look, my dear; you may see him from here. He said he would take a little nap while we were mixing up with Ruggedo, and he added that after we had gotten into trouble he would wake up and conquer the Nome King in a jiffy, as his master the Jinjin has ordered him to do.”
“Quox means well,” said Shaggy, “but I do not think we shall need his services; for just as soon as I am satisfied that Queen Ann and her army have failed to conquer Ruggedo, I shall enter the caverns and show the King my Love Magnet. That he cannot resist; therefore the conquest will be made with ease.”
This speech of Shaggy Man’s was overheard by the Long-Eared Hearer, who was at that moment standing by Ruggedo’s side. For when the King and Guph had recovered from Hank’s kick and had picked themselves up, their first act was to turn Tik-Tok on his back and put a heavy diamond on top of him, so that he could not get up again. Then they carefully put his gun in a corner of the cavern and the King sent Guph to fetch the Long-Eared Hearer.
The Hearer was still angry at Ruggedo for breaking his ear, but he acknowledged the Nome King to be his master and was ready to obey his commands. Therefore he repeated Shaggy’s speech to the King, who at once realized that his Kingdom was in grave danger. For Ruggedo knew of the Love Magnet and its powers and was horrified at the thought that Shaggy might show him the magic talisman and turn all the hatred in his heart into love. Ruggedo was proud of his hatred and abhorred love of any sort.
“Really,” said he, “I’d rather he conquered and lose my wealth and my Kingdom than gaze at that awful Love Magnet. What can I do to prevent the Shaggy Man from taking it out of his pocket?”
Kaliko returned to the cavern in time to overhear this question, and being a loyal nome and eager to serve his King, he answered by saying:
“If we can manage to bind the Shaggy Man’s arms, tight to his body, he could not get the Love Magnet out of his pocket.”
“True!” cried the King in delight at this easy solution of the problem. “Get at once a dozen nomes, with ropes, and place them in the passage where they can seize and bind Shaggy as soon as he enters.”
This Kaliko did, and meanwhile the watchers outside the entrance were growing more and more uneasy about their friends.
“I don’t worry so much about the Oogaboo people,” said Polychrome, who had grown sober with waiting, and perhaps a little nervous, “for they could not be killed, even though Ruggedo might cause them much suffering and perhaps destroy them utterly. But we should not have allowed Betsy and Hank to go alone into the caverns. The little girl is mortal and possesses no magic powers whatever, so if Ruggedo captures her she will be wholly at his mercy.”
“That is indeed true,” replied Shaggy. “I wouldn’t like to have anything happen to dear little Betsy, so I believe I’ll go in right away and put an end to all this worry.”
“We may as well go with you,” asserted Files, “for by means of the Love Magnet, you can soon bring the Nome King to reason.”
So it was decided to wait no longer. Shaggy walked through the entrance first, and after him came the others. They had no thought of danger to themselves, and Shaggy, who was going along with his hands thrust into his pockets, was much surprised when a rope shot out from the darkness and twined around his body, pinning down his arms so securely that he could not even withdraw his hands from the pockets. Then appeared several grinning nomes, who speedily tied knots in the ropes and then led the prisoner along the passage to the cavern. No attention was paid to the others, but Files and the Princess followed on after Shaggy, determined not to desert their friend and hoping that an opportunity might arise to rescue him.
As for Polychrome, as soon as she saw that trouble had overtaken Shaggy she turned and ran lightly back through the passage and out of the entrance. Then she easily leaped from rock to rock until she paused beside the great dragon, who lay fast asleep.
“Wake up, Quox!” she cried. “It is time for you to act.”
But Quox did not wake up. He lay as one in a trance, absolutely motionless, with his enormous eyes tight closed. The eyelids had big silver scales on them, like all the rest of his body.
Polychrome might have thought Quox was dead had she not known that dragons do not die easily or had she not observed his huge body swelling as he breathed.  But he would not waken.
“Dear me, how unfortunate!” sighed the lovely Rainbow’s Daughter. “I wonder what is the best and surest way to waken a dragon. All our friends may be captured and destroyed while this great beast lies asleep.”
She walked around Quox two or three times, trying to discover some tender place on his body where a thump or a punch might he felt; but he lay extended along the rocks with his chin flat upon the ground and his legs drawn underneath his body, and all that one could see was his thick sky-blue skin—thicker than that of a rhinoceros—and his silver scales.
Then, despairing at last of wakening the beast, and worried over the fate of her friends, Polychrome again ran down to the entrance and hurried along the passage into the Nome King’s cavern.
Here she found Ruggedo lolling in his throne and smoking a long pipe. Beside him stood General Guph and Kaliko, and ranged before the King were the Rose Princess, Files and the Shaggy Man. Tik-Tok still lay upon the floor, weighted down by the big diamond.
Ruggedo was now in a more contented frame of mind. One by one he had met the invaders and easily captured them. The dreaded Love Magnet was indeed in Shaggy’s pocket, only a few feet away from the King, but Shaggy was powerless to show it and unless Ruggedo’s eyes beheld the talisman it could not affect him. As for Betsy Bobbin and her mule, he believed Kaliko had placed them in the Slimy Cave, while Ann and her officers he thought safely imprisoned in the pit. Ruggedo had no fear of Files or Ozga, but to be on the safe side he had ordered golden handcuffs placed upon their wrists. These did not cause them any great annoyance but prevented them from making an attack, had they been inclined to do so.
The Nome King, thinking himself wholly master of the situation, was laughing and jeering at his prisoners when Polychrome, exquisitely beautiful and dancing like a ray of light, entered the cavern.
“Oho!” cried the King; “a Rainbow under ground, eh?” and then he stared hard at Polychrome, and still harder, and then he sat up and pulled the wrinkles out of his robe and arranged his whiskers.
 The others I hate.  Wouldn’t you like to live always in this beautiful cavern, Polychrome? See! The jewels that stud the walls have every tint and color of your Rainbow—and they are not so elusive. I’ll have fresh dewdrops gathered for your feasting every day and you shall be Queen of all my nomes and pull Kaliko’s nose whenever you like.”
“No, thank you,” laughed Polychrome. “My home is in the sky, and I’m only on a visit to this solid, sordid earth. But tell me, Ruggedo, why my friends have been wound with cords and bound with chains?”
“They threatened me,” answered Ruggedo.  But I’ll make a bargain with you, sweet Polly. Remain here and live with me and I’ll set all these people free.
Polychrome looked at him wonderingly. Then she turned to Shaggy and asked:
“Are you sure he hasn’t seen the Love Magnet?”
“I’m positive,” answered Shaggy. “But you seem to be something of a Love Magnet yourself, Polychrome.”
She laughed again and said to Ruggedo: “Not even to rescue my friends would I live in your kingdom. Nor could I endure for long the society of such a wicked monster as you.”
“You forget,” retorted the King, scowling darkly, “that you also are in my power.”
“Not so, Ruggedo. The Rainbow’s Daughter is beyond the reach of your spite or malice.”
“Seize her!” suddenly shouted the King, and General Guph sprang forward to obey. Polychrome stood quite still, yet when Guph attempted to clutch her his hands met in air, and now the Rainbow’s Daughter was in another part of the room, as smiling and composed as before.
Several times Guph endeavored to capture her and Ruggedo even came down from his throne to assist his General; but never could they lay hands upon the lovely sky fairy, who flitted here and there with the swiftness of light and constantly defied them with her merry laughter as she evaded their efforts.
So after a time they abandoned the chase and Ruggedo returned to his throne and wiped the perspiration from his face with a finely-woven handkerchief of cloth-of-gold.
“Well,” said Polychrome, “what do you intend to do now?”
“I’m going to have some fun, to repay me for all my bother,” replied the Nome King. Then he said to Kaliko: “Summon the executioners.”
Kaliko at once withdrew and presently returned with a score of nomes, all of whom were nearly as evil looking as their hated master. They bore great golden pincers, and prods of silver, and clamps and chains and various wicked-looking instruments, all made of precious metals and set with diamonds and rubies.
“Now, Pang,” said Ruggedo, addressing the leader of the executioners, “fetch the Army of Oogaboo and their Queen from the pit and torture them here in my presence—as well as in the presence of their friends. It will be great sport.”
“I hear Your Majesty, and I obey Your Majesty,” answered Pang, and went with his nomes into the passage. In a few minutes he returned and bowed to Ruggedo.
“They’re all gone,” said he.
“Gone!” exclaimed the Nome King. “Gone where?”
“They left no address, Your Majesty; but they are not in the pit.”
“Picks and puddles!” roared the King; “who took the cover off?”
“No one,” said Pang. “The cover was there, but the prisoners were not under it.”
“In that case,” snarled the King, trying to control his disappointment, “go to the Slimy Cave and fetch hither the girl and the donkey. And while we are torturing them Kaliko must take a hundred nomes and search for the escaped prisoners—the Queen of Oogaboo and her officers. If he does not find them, I will torture Kaliko.”
Kaliko went away looking sad and disturbed, for he knew the King was cruel and unjust enough to carry out this threat. Pang and the executioners also went away, in another direction, but when they came back Betsy Bobbin was not with them, nor was Hank.
“There is no one in the Slimy Cave, Your Majesty,” reported Pang.
“Jumping jellycakes!” screamed the King.
“Another escape? Are you sure you found the right cave?”
“There is but one Slimy Cave, and there is no one in it,” returned Pang positively.
Ruggedo was beginning to be alarmed as well as angry. However, these disappointments but made him the more vindictive and he cast an evil look at the other prisoners and said:
“Never mind the girl and the donkey. Here are four, at least, who cannot escape my vengeance. Let me see; I believe I’ll change my mind about Tik-Tok. Have the gold crucible heated to a white, seething heat, and then we’ll dump the copper man into it and melt him up.”
“But, Your Majesty,” protested Kaliko, who had returned to the room after sending a hundred nomes to search for the Oogaboo people, “you must remember that Tik-Tok is a very curious and interesting machine. It would be a shame to deprive the world of such a clever contrivance.”
“Say another word, and you’ll go into the furnace with him!” roared the King.  The next to consider,” he added more mildly, “is the Shaggy Man. As he owns the Love Magnet, I think I’ll transform him into a dove, and then we can practice shooting at him with Tik-Tok’s gun. Now, this is a very interesting ceremony and I beg you all to watch me closely and see that I’ve nothing up my sleeve.”
He came out of his throne to stand before the Shaggy Man, and then he waved his hands, palms downward, in seven semicircles over his victim’s head, saying in a low but clear tone of voice the magic wugwa:
”Adi, edi, idi, odi, udi, oo-i-oo!
Idu, ido, idi, ide, ida, woo!”
The effect of this well-known sorcery was instantaneous. Instead of the Shaggy Man, a pretty dove lay fluttering upon the floor, its wings confined by tiny cords wound around them. Ruggedo gave an order to Pang, who cut the cords with a pair of scissors. Being freed, the dove quickly flew upward and alighted on the shoulder of the Rose Princess, who stroked it tenderly.
“Very good! Very good!” cried Ruggedo, rubbing his hands gleefully together. “One enemy is out of my way, and now for the others.”
(Perhaps my readers should be warned not to attempt the above transformation; for, although the exact magical formula has been described, it is unlawful in all civilized countries for anyone to transform a person into a dove by muttering the words Ruggedo used. There were no laws to prevent the Nome King from performing this transformation, but if it should be attempted in any other country, and the magic worked, the magician would be severely punished.)
When Polychrome saw Shaggy Man transformed into a dove and realized that Ruggedo was about do something as dreadful to the Princess and Files, and that Tik-Tok would soon be melted in a crucible, she turned and ran from the cavern, through the passage and back to the place where Quox lay asleep.


parlatorei climate species populations BIO RCP. conditions change temperature figure range future montane southern {border-style areas models px;} #ffffff;} ./j.-...x conservation precipitation Podocarpus forests predicted distribution optimal tropical warmest high thermal Ecol. genetic niche potential shifts global local subtropical table variables Biol. dry model suitability warming Glob. Yungas changes currently extinction forest hot population Evol. area climatic environmental lowland mountain northern supplementary upward Argentina Bio century change. condition conifer del material, px; ranges remain response tree unique {font-family Andean Conserv. Global Quiroga Sci. changing cloud cold-tolerant current ecological font-size gas greenhouse levels modern optimum parlatorei, presence scenario species' suitable twenty-first (mean Acad. Biogeogr. Change Natl Proc. South USA and/or associated based biodiversity conditions. contribution data double; effects entire habitat high-elevation increase long-term loss mean order plant rainfall temperatures using > (e.g. ./pnas. Andes Brown MaxEnt Thus, actions altitudinal available bioclimatic border-color border-width cold concentration considered distributions diversity ecosystem electronic expected i.e. migration overall persistence probability reduced relatively results risk scenarios solid; species, species’ substantially thermally wet {font-style {font-weight < (%) (precipitation Feeley Figure Grau Open Premoli Rev. S). San Tarija Tropical bold calculated central combined corresponding courier; ecologically em; evidence evolutionary final gene general growth highest impact inhabiting land locally low mid-late modern-to- modification neotropical new optimal; projected pt;} quarter) reductions remaining represent shift shows strongly suggest training trends used


WITNESS LIST Business & Industry Committee April 13, 1999-2:00P HB 173 Against: Untermeyer, Chase (Compaq Computer Corporation) HB 1052 For: Walker, Ron (Texas Association of Realtors) HB 2135 For: Presnal, James K. (Texas Nursery and Landscape Association) HB 2545 On: Best, John (Research and Oversight Council in Workers' Compensatin) HB 2628 For: Briesemeister, Janee (Consumer Union) Chapman, Randall (Self and Legal Hot Line for Older Texans) Stark, Katherine (Self) Watson, Gregory (Self) Against: Mintz, David (Texas Apartment Association) Ross, Marc (Texas Apartment Association) HB 2667 For: Freeland, Lee T. (Texas Industrial Hygiene Council) Lauderdale, CIH, Jerry (Self and Texas Industrial Hygiene Council) Against: Kendrick CSP, James "Skipper" (Region III, American Societyof Safety Engineers) Schulle, JR., Gerhardt (The Society of Professional Engineers) HB 3001 For: Esquivel, Ruben E. (The Dallas Foundation) HB 3697 For: Class, Ramon (Self) Hillman, Andrew J. (Self) On: Moore, Nancy (Texas Department of Insurance) Oliver, Russel R. (Texas Workers' Compensation Insurance Fund) Young, Jr., Martin H. (Texas Workers' Compensation Insurance Fund) HB 3759 For: Paluga Sr., Patrick A. (Proffesional Cleaning and Restoration Aliance) SB 517 For: Gress, Elaine (Self and National Auto and Travel Organizaton)


Announcements
Git
Blogging
AWS
Cloud
Powershell
Server_2012
Windows
Storage
Backup
Tips
Linux
Hardware
Raspberry_Pi
VoIP
SSH
Networking
RouterOS
Mikrotik
Programming
Guide
Media Center
Projects
Jekyll
ZFS
Hyper-V
Firewall
Camera
Photography
GPS
TMG
OSX
P2P
Code
HowTo
IPv6
Office_365
Email
RSync
College
Gadgets
Web
DNS
Development
VMWare
PFSense
HomeLab
Ubiquiti
GodBoxV2
Sophos_UTM
Hubic
B2
Double_Internet
Cloud_Desktop
Workstation
Docker
Tutorial
S3
PowerShell
Website
Tools
Tutorials
Crashplan
BackBlaze
Reviews


TOP STORY
Trump Impeachment Hearings Live Stream: Everything to Know
Diplomats William Taylor and George Kent will be the first witnesses to publicly testify about the Ukraine matter.
CULTURE & TRAVEL
Is It Safe to Travel to Venice Amid Historic Flooding in the City?
The first of the open sessions with witnesses, who will give evidence to the House Intelligence Committee, are beginning.
Venice
30 Years After the Fall of the Berlin Wall, Explore the Relics
The first of the open sessions with witnesses, who will give evidence to the House Intelligence Committee, are beginning.
Berlin Wall
10 Not-So-Obvious Things To Do in New York City
The first of the open sessions with witnesses, who will give evidence to the House Intelligence Committee, are beginning.
New York
9 Larger-Than-Life Sculpture Parks Around the World
The first of the open sessions with witnesses, who will give evidence to the House Intelligence Committee, are beginning.
Art
10 Not-So-Obvious Things To Do in New York City
The first of the open sessions with witnesses, who will give evidence to the House Intelligence Committee, are beginning.
New York
9 Larger-Than-Life Sculpture Parks Around the World
The first of the open sessions with witnesses, who will give evidence to the House Intelligence Committee, are beginning.
Art
MORE STORIES
The first interruptions came just minutes into the start of proceedings regarding the immigration policy.
Erdogan complained Tuesday that neither the U.S. nor Russia has been able to "clean" the Kudish-led forces out of Turkey's invasion zone.
Trump and Erdogan Prepare to Meet as Fighting in Syria Flouts Cease-Fire
Erdogan complained Tuesday that neither the U.S. nor Russia has been able to "clean" the Kudish-led forces out of Turkey's invasion zone.
Hillary Clinton Says She Is Under Pressure to Run in 2020
She told British station BBC Radio 5 Live she thinks about what kind of president she would have been.
Arctic Cold Front Is Sweeping Through the U.S., Bringing Record Cold
"The intensity of this arctic outbreak is comparable to the 'Blue Norther' of 1911," a statement from the National Weather Service read.
Mayor Blames Climate Change for Venice's Worst Flood in More Than 50 Years
"The situation is dramatic. We ask the government to help us. The cost will be high," Venice Mayor Luigi Brugnaro said.
Scientists See Tobacco Industry Playbook in EPA Overhaul Plan
This concept of targeting the transparency of the scientific process "first appeared in tobacco industry documents in the 90s," Gretchen Goldman told Newsweek. "It was never about transparency."
Kentucky's Youngest Black Lawmaker Explores Run Against Mitch McConnell
Representative Charles Booker announced he's forming an exploratory committee to look into unseating Senate Majority Leader Mitch McConnell.
Trump and Erdogan Prepare to Meet as Fighting in Syria Flouts Cease-Fire
Erdogan complained Tuesday that neither the U.S. nor Russia has been able to "clean" the Kudish-led forces out of Turkey's invasion zone.
Scientists See Tobacco Industry Playbook in EPA Overhaul Plan
This concept of targeting the transparency of the scientific process "first appeared in tobacco industry documents in the 90s," Gretchen Goldman told Newsweek. "It was never about transparency."


Regd. No.: ****** License No: ****
Pokhara, Nepal
+977-*****
<EMAIL_ADDRESS>All Rights Reserved | Design by Ultrabyte International


--- layout: archive title: Lean Prover Zulip Chat Archive permalink: 113488general/55031bors.html --- The archive URL format has changed. Please find this page at: https://leanprover-community.github.io/archive/stream/113488-general/topic/bors.html


--- ---
|
TGUI
0.9-dev
|
List view widget. More...
#include <TGUI/Widgets/ListView.hpp>
Classes | |
| struct | Column |
| struct | Item |
Public Types | |
| enum | ColumnAlignment { ColumnAlignment::Left, ColumnAlignment::Center, ColumnAlignment::Right } |
| The text alignment for all texts within a column. More... | |
| typedef std::shared_ptr< ListView > | Ptr |
| Shared widget pointer. | |
| typedef std::shared_ptr< const ListView > | ConstPtr |
| Shared constant widget pointer. | |
| Public Types inherited from tgui::Widget | |
| typedef std::shared_ptr< Widget > | Ptr |
| Shared widget pointer. | |
| typedef std::shared_ptr< const Widget > | ConstPtr |
| Shared constant widget pointer. | |
Public Member Functions | |
| ListViewRenderer * | getSharedRenderer () |
| Returns the renderer, which gives access to functions that determine how the widget is displayed. More... | |
| ListViewRenderer * | getRenderer () |
| Returns the renderer, which gives access to functions that determine how the widget is displayed. More... | |
| void | setSize (const Layout2d &size) override |
| Changes the size of the list view. More... | |
| std::size_t | addColumn (const String &text, float width=0, ColumnAlignment alignment=ColumnAlignment::Left) |
| Adds a column. More... | |
| void | setColumnText (std::size_t index, const String &text) |
| Changes the text of a column. More... | |
| String | getColumnText (std::size_t index) const |
| Returns the text of a column. More... | |
| void | setColumnWidth (std::size_t index, float width) |
| Changes the width of a column. More... | |
| float | getColumnWidth (std::size_t index) const |
| Returns the width of a column. More... | |
| void | setColumnAlignment (std::size_t columnIndex, ColumnAlignment alignment) |
| Changes the text alignment within a column. More... | |
| ColumnAlignment | getColumnAlignment (std::size_t columnIndex) const |
| Returns the current text alignment within a column. More... | |
| void | removeAllColumns () |
| Removes all columns. | |
| std::size_t | getColumnCount () const |
| Returns the amount of columns in the list view. More... | |
| void | setHeaderHeight (float height) |
| Changes the height of the header row. More... | |
| float | getHeaderHeight () const |
| Returns the height of the header row. More... | |
| float | getCurrentHeaderHeight () const |
| Returns the height of the header or 0 if no header row is shown. More... | |
| void | setHeaderVisible (bool showHeader) |
| Changes whether the header is shown. More... | |
| bool | getHeaderVisible () const |
| Returns whether the header is shown. More... | |
| std::size_t | addItem (const String &text) |
| Adds an item to the list. More... | |
| std::size_t | addItem (const std::vector< String > &item) |
| Adds an item with values for multiple columns to the list. More... | |
| void | addMultipleItems (const std::vector< std::vector< String >> &items) |
| Adds multiple items to the list. More... | |
| void | insertItem (std::size_t index, const String &text) |
| Inserts an item into the list. More... | |
| void | insertItem (std::size_t index, const std::vector< String > &item) |
| Inserts an item into the list. More... | |
| void | insertMultipleItems (std::size_t index, const std::vector< std::vector< String >> &items) |
| Inserts multiple items into the list. More... | |
| bool | changeItem (std::size_t index, const std::vector< String > &item) |
| Changes an item with values for multiple columns to the list. More... | |
| bool | changeSubItem (std::size_t index, std::size_t column, const String &item) |
| Changes the caption of a single value in the item. More... | |
| bool | removeItem (std::size_t index) |
| Removes the item from the list view. More... | |
| void | removeAllItems () |
| Removes all items from the list. | |
| void | setSelectedItem (std::size_t index) |
| Selects an item in the list view. More... | |
| void | setSelectedItems (const std::set< std::size_t > &indices) |
| Selects items in the list view. More... | |
| void | deselectItems () |
| Deselects the selected items. | |
| int | getSelectedItemIndex () const |
| Gets the index of the selected item. More... | |
| std::set< std::size_t > | getSelectedItemIndices () const |
| Gets the indices of the selected items. More... | |
| void | setMultiSelect (bool multiSelect) |
| Allow multi selection of the items. More... | |
| bool | getMultiSelect () const |
| Returns multi selection of the items is allowed. More... | |
| void | setItemData (std::size_t index, Any data) |
| Store some user data with the item. More... | |
| template<typename T > | |
| T | getItemData (std::size_t index) const |
| Returns user data stored in the item. More... | |
| void | setItemIcon (std::size_t index, const Texture &texture) |
| Sets a small icon in front of the item. More... | |
| Texture | getItemIcon (std::size_t index) const |
| Gets the icon displayed in front of the item. More... | |
| std::size_t | getItemCount () const |
| Returns the amount of items in the list view. More... | |
| String | getItem (std::size_t index) const |
| Retrieves an item in the list. More... | |
| std::vector< String > | getItemRow (std::size_t index) const |
| Retrieves the values of all columns for an item in the list. More... | |
| String | getItemCell (std::size_t rowIndex, std::size_t columnIndex) const |
| Retrieves the value for a cell in the list. More... | |
| std::vector< String > | getItems () const |
| Returns a list of the texts in the first column for all items in the list view. More... | |
| std::vector< std::vector< String > > | getItemRows () const |
| Returns a list of all column values for all items in the list view. More... | |
| void | sort (std::size_t index, const std::function< bool(const String &, const String &)> &cmp) |
| Sort items. More... | |
| void | setItemHeight (unsigned int itemHeight) |
| Changes the height of the items in the list view. More... | |
| unsigned int | getItemHeight () const |
| Returns the height of the items in the list view. More... | |
| void | setTextSize (unsigned int textSize) override |
| Changes the text size of the items. More... | |
| void | setHeaderTextSize (unsigned int textSize) |
| Changes the text size of the header caption. More... | |
| unsigned int | getHeaderTextSize () const |
| Returns the text size of the header caption. More... | |
| void | setSeparatorWidth (unsigned int width) |
| Changes the width of the column separator. More... | |
| unsigned int | getSeparatorWidth () const |
| Returns the width of the column separator. More... | |
| void | setHeaderSeparatorHeight (unsigned int height) |
| Changes the height of the separator between the header and the items. More... | |
| unsigned int | getHeaderSeparatorHeight () const |
| Returns the height of the separator between the header and the items. More... | |
| void | setGridLinesWidth (unsigned int width) |
| Changes the width of the grid lines. More... | |
| unsigned int | getGridLinesWidth () const |
| Returns the width of the grid lines. More... | |
| void | setAutoScroll (bool autoScroll) |
| Changes whether the list view scrolls to the bottom when a new item is added. More... | |
| bool | getAutoScroll () const |
| Returns whether the list view scrolls to the bottom when a new item is added. More... | |
| void | setShowVerticalGridLines (bool showGridLines) |
| Changes whether lines are drawn between columns. More... | |
| bool | getShowVerticalGridLines () const |
| Returns whether lines are drawn between items. More... | |
| void | setShowHorizontalGridLines (bool showGridLines) |
| Changes whether lines are drawn between items. More... | |
| bool | getShowHorizontalGridLines () const |
| Returns whether lines are drawn between items. More... | |
| void | setExpandLastColumn (bool expand) |
| Changes whether the last column is expanded to fill the list view (if all columns fit inside the list view) More... | |
| bool | getExpandLastColumn () const |
| Returns whether the last column is expanded to fill the list view (if all columns fit inside the list view) More... | |
| void | setVerticalScrollbarPolicy (Scrollbar::Policy policy) |
| Changes when the vertical scrollbar should be displayed. More... | |
| Scrollbar::Policy | getVerticalScrollbarPolicy () const |
| Returns when the vertical scrollbar should be displayed. More... | |
| void | setHorizontalScrollbarPolicy (Scrollbar::Policy policy) |
| Changes when the horizontal scrollbar should be displayed. More... | |
| Scrollbar::Policy | getHorizontalScrollbarPolicy () const |
| Returns when the horizontal scrollbar should be displayed. More... | |
| void | setVerticalScrollbarValue (unsigned int value) |
| Changes the thumb position of the vertical scrollbar. More... | |
| unsigned int | getVerticalScrollbarValue () const |
| Returns the thumb position of the vertical scrollbar. More... | |
| void | setHorizontalScrollbarValue (unsigned int value) |
| Changes the thumb position of the horizontal scrollbar. More... | |
| unsigned int | getHorizontalScrollbarValue () const |
| Returns the thumb position of the horizontal scrollbar. More... | |
| void | setFixedIconSize (Vector2f iconSize) |
| Sets a size to which all icons should be scaled. More... | |
| Vector2f | getFixedIconSize () const |
| Returns to which size all icons should be scaled. More... | |
| bool | isMouseOnWidget (Vector2f pos) const override |
| Returns whether the mouse position (which is relative to the parent widget) lies on top of the widget. More... | |
| void | draw (BackendRenderTargetBase &target, RenderStates states) const override |
| Draw the widget to a render target. More... | |
| virtual void | setSize (const Layout2d &size) |
| Changes the size of the widget. More... | |
| void | setSize (Layout width, Layout height) |
| Changes the size of the widget. More... | |
| Public Member Functions inherited from tgui::Widget | |
| Widget (const Widget &) | |
| Copy constructor. | |
| Widget (Widget &&) | |
| Move constructor. | |
| virtual | ~Widget () |
| Destructor. | |
| Widget & | operator= (const Widget &) |
| Overload of copy assignment operator. | |
| Widget & | operator= (Widget &&) |
| Move assignment. | |
| void | setRenderer (std::shared_ptr< RendererData > rendererData) |
| Sets a new renderer for the widget. The renderer determines how the widget looks. More... | |
| WidgetRenderer * | getSharedRenderer () |
| Returns the renderer, which gives access to functions that determine how the widget is displayed. More... | |
| WidgetRenderer * | getRenderer () |
| Returns the renderer, which gives access to functions that determine how the widget is displayed. More... | |
| virtual void | setPosition (const Layout2d &position) |
| sets the position of the widget More... | |
| void | setPosition (Layout x, Layout y) |
| Sets the position of the widget. More... | |
| Vector2f | getPosition () const |
| Gets the position of the widget. More... | |
| void | setSize (Layout width, Layout height) |
| Changes the size of the widget. More... | |
| void | setWidth (Layout width) |
| Changes the width of the widget. More... | |
| void | setHeight (Layout height) |
| Changes the height of the widget. More... | |
| Vector2f | getSize () const |
| Returns the size of the widget. More... | |
| virtual Vector2f | getFullSize () const |
| Returns the entire size that the widget is using. More... | |
| virtual Vector2f | getAbsolutePosition () const |
| Get the absolute position of the top-left point of the widget instead of the relative position to its parent. More... | |
| virtual Vector2f | getWidgetOffset () const |
| Returns the distance between the position where the widget is drawn and where the widget is placed. More... | |
| void | setOrigin (float x, float y) |
| Sets the origin point on which the position, scale and rotation is based. More... | |
| void | setOrigin (Vector2f origin) |
| Sets the origin point on which the position, scale and rotation is based. More... | |
| Vector2f | getOrigin () const |
| Returns the relative origin point on which the position, scale and rotation is based. More... | |
| void | setScale (Vector2f scaleFactors) |
| Sets the scaling to be applied to the widget. More... | |
| void | setScale (Vector2f scaleFactors, Vector2f origin) |
| Sets the scaling to be applied to the widget. More... | |
| void | setScale (float scaleFactor) |
| Sets the scaling to be applied to the widget. More... | |
| void | setScale (float scaleFactor, Vector2f origin) |
| Sets the scaling to be applied to the widget. More... | |
| Vector2f | getScale () const |
| Returns the scaling to be applied to the widget. More... | |
| Vector2f | getScaleOrigin () const |
| Returns the origin used for scaling. More... | |
| void | setRotation (float angle) |
| Sets the rotation to be applied to the widget. More... | |
| void | setRotation (float angle, Vector2f origin) |
| Sets the rotation to be applied to the widget. More... | |
| float | getRotation () const |
| Returns the rotation to be applied to the widget. More... | |
| Vector2f | getRotationOrigin () const |
| Returns the origin used for rotations. More... | |
| void | showWithEffect (ShowAnimationType type, Duration duration) |
| Shows the widget by introducing it with an animation. More... | |
| void | hideWithEffect (ShowAnimationType type, Duration duration) |
| Hides the widget by making it leave with an animation. More... | |
| virtual void | setVisible (bool visible) |
| Shows or hides a widget. More... | |
| bool | isVisible () const |
| Returns true when the widget is visible. More... | |
| virtual void | setEnabled (bool enabled) |
| Enables or disables the widget. More... | |
| bool | isEnabled () const |
| Returns true when the widget is enabled. More... | |
| virtual void | setFocused (bool focused) |
| Focus or unfocus the widget. More... | |
| bool | isFocused () const |
| Returns true when the widget is focused and false otherwise. More... | |
| const String & | getWidgetType () const |
| Returns the type of the widget. More... | |
| Container * | getParent () const |
| Returns a pointer to the parent widget. More... | |
| GuiBase * | getParentGui () const |
| Returns a pointer to the gui to which this widget belongs. More... | |
| bool | isAnimationPlaying () const |
| Returns whether there is an active animation (started with showWithEffect or hideWithEffect) More... | |
| void | moveToFront () |
| Places the widget before all other widgets. More... | |
| void | moveToBack () |
| Places the widget behind all other widgets. More... | |
| void | setUserData (Any userData) |
| Stores some data into the widget. More... | |
| template<typename T > | |
| T | getUserData () const |
| Returns data stored in the widget. More... | |
| void | setInheritedFont (const Font &font) |
| Sets the font of the widget that is used when no font is set in the renderer. More... | |
| const Font & | getInheritedFont () const |
| Returns the font of the widget that is used when no font is set in the renderer. More... | |
| void | setInheritedOpacity (float opacity) |
| Sets the opacity of the widget that will be multiplied with the opacity set in the renderer. More... | |
| float | getInheritedOpacity () const |
| Returns the opacity of the widget that is multiplied with the opacity set in the renderer. More... | |
| virtual unsigned int | getTextSize () const |
| Returns the character size of text in this widget. More... | |
| void | setToolTip (Widget::Ptr toolTip) |
| Sets the tool tip that should be displayed when hovering over the widget. More... | |
| Widget::Ptr | getToolTip () const |
| Returns the tool tip that is displayed when hovering over the widget. More... | |
| void | setWidgetName (const String &name) |
| Changes the name of a widget. More... | |
| String | getWidgetName () const |
| Returns the name of a widget. More... | |
| void | setMouseCursor (Cursor::Type cursor) |
| Changes which mouse cursor is shown when hovering over the widget. More... | |
| Cursor::Type | getMouseCursor () const |
| Returns which mouse cursor is shown when hovering over the widget. More... | |
| void | setFocusable (bool focusable) |
| Changes whether a widget could be focused. More... | |
| bool | isFocusable () const |
| Returns whether a widget could be focused. More... | |
| virtual bool | canGainFocus () const |
| Returns whether the widget can currently gain focus. More... | |
| bool | isContainer () const |
| Returns whether the widget is a container widget or not. More... | |
| bool | isDraggableWidget () const |
| Returns whether the widget has something to drag (e.g. slider or scrollbar thumbs) More... | |
| bool | isMouseDown () const |
| Returns whether the left mouse button has been pressed on top of the widget. More... | |
| template<typename WidgetType > | |
| std::shared_ptr< const WidgetType > | cast () const |
| Downcast const widget. | |
| template<typename WidgetType > | |
| std::shared_ptr< WidgetType > | cast () |
| Downcast widget. | |
Static Public Member Functions | |
| static ListView::Ptr | create () |
| Creates a new list view widget. More... | |
| static ListView::Ptr | copy (ListView::ConstPtr listView) |
| Makes a copy of another list view. More... | |
Public Attributes | |
| SignalInt | onItemSelect = {"ItemSelected"} |
| SignalInt | onDoubleClick = {"DoubleClicked"} |
| An item was double clicked. Optional parameter: selected item index. | |
| SignalInt | onRightClick = {"RightClicked"} |
| Right mouse clicked. Optional parameter: index of item below mouse (-1 when not on top of item) | |
| SignalInt | onHeaderClick = {"HeaderClicked"} |
| The header was clicked. Optional parameter: column index. | |
| Public Attributes inherited from tgui::Widget | |
| SignalVector2f | onPositionChange = {"PositionChanged"} |
| The position of the widget changed. Optional parameter: new position. | |
| SignalVector2f | onSizeChange = {"SizeChanged"} |
| The size of the widget changed. Optional parameter: new size. | |
| Signal | onFocus = {"Focused"} |
| The widget was focused. | |
| Signal | onUnfocus = {"Unfocused"} |
| The widget was unfocused. | |
| Signal | onMouseEnter = {"MouseEntered"} |
| The mouse entered the widget. | |
| Signal | onMouseLeave = {"MouseLeft"} |
| The mouse left the widget. | |
| SignalAnimation | onAnimationFinish = {"AnimationFinished"} |
| A show or hide animation finished. Optional parameters: animation type, new widget visibility or both. | |
Protected Member Functions | |
| Signal & | getSignal (String signalName) override |
| Retrieves a signal based on its name. More... | |
| void | rendererChanged (const String &property) override |
| Function called when one of the properties of the renderer is changed. More... | |
| std::unique_ptr< DataIO::Node > | save (SavingRenderersMap &renderers) const override |
| Saves the widget as a tree node in order to save it to a file. | |
| void | load (const std::unique_ptr< DataIO::Node > &node, const LoadingRenderersMap &renderers) override |
| Loads the widget from a tree of nodes. | |
| Widget::Ptr | clone () const override |
| Makes a copy of the widget if you don't know its exact type. More... | |
| Protected Member Functions inherited from tgui::Widget | |
| virtual void | mouseEnteredWidget () |
| This function is called when the mouse enters the widget. | |
| virtual void | mouseLeftWidget () |
| This function is called when the mouse leaves the widget. | |
List view widget.
When no columns are added, the list view acts like a ListBox with a few extra functionalities.
|
strong |
| std::size_t tgui::ListView::addColumn | ( | const String & | text, |
| float | width = 0 , |
||
| ColumnAlignment | alignment = ColumnAlignment::Left |
||
| ) |
Adds a column.
| text | The caption of the new column |
| width | Width of the column. Set width to 0 to make it depend on the width of the column caption. |
| alignment | The text alignment for all texts in the column |
| std::size_t tgui::ListView::addItem | ( | const std::vector< String > & | item | ) |
Adds an item with values for multiple columns to the list.
| item | Texts for each column |
| std::size_t tgui::ListView::addItem | ( | const String & | text | ) |
Adds an item to the list.
| text | The caption of the item you want to add |
| void tgui::ListView::addMultipleItems | ( | const std::vector< std::vector< String >> & | items | ) |
Adds multiple items to the list.
| items | List of items that should be passed to the addItem |
| bool tgui::ListView::changeItem | ( | std::size_t | index, |
| const std::vector< String > & | item | ||
| ) |
Changes an item with values for multiple columns to the list.
| index | Index of the item to update |
| item | Texts for each column |
| bool tgui::ListView::changeSubItem | ( | std::size_t | index, |
| std::size_t | column, | ||
| const String & | item | ||
| ) |
Changes the caption of a single value in the item.
| index | Index of the item to update |
| column | Index of the column to change |
| item | Texts for the given column for the given item |
|
inlineoverrideprotectedvirtual |
Makes a copy of the widget if you don't know its exact type.
This function should only be used when you don't know the type of the widget. If you know what kind of widget you are copying, you should use the copy function.
Implements tgui::Widget.
|
static |
Makes a copy of another list view.
| listView | The other list view |
|
static |
Creates a new list view widget.
|
overridevirtual |
Draw the widget to a render target.
| target | Render target to draw to |
| states | Current render states |
Implements tgui::Widget.
| bool tgui::ListView::getAutoScroll | ( | ) | const |
Returns whether the list view scrolls to the bottom when a new item is added.
| ColumnAlignment tgui::ListView::getColumnAlignment | ( | std::size_t | columnIndex | ) | const |
Returns the current text alignment within a column.
| columnIndex | Index of the column to inspect |
| std::size_t tgui::ListView::getColumnCount | ( | ) | const |
Returns the amount of columns in the list view.
| String tgui::ListView::getColumnText | ( | std::size_t | index | ) | const |
Returns the text of a column.
| index | Index of the column |
| float tgui::ListView::getColumnWidth | ( | std::size_t | index | ) | const |
Returns the width of a column.
| index | Index of the column |
| float tgui::ListView::getCurrentHeaderHeight | ( | ) | const |
Returns the height of the header or 0 if no header row is shown.
| bool tgui::ListView::getExpandLastColumn | ( | ) | const |
Returns whether the last column is expanded to fill the list view (if all columns fit inside the list view)
| Vector2f tgui::ListView::getFixedIconSize | ( | ) | const |
Returns to which size all icons should be scaled.
By default the fixed icon size is set to (0,0) which doesn't scale the icons and lets each icon use the texture size.
| unsigned int tgui::ListView::getGridLinesWidth | ( | ) | const |
Returns the width of the grid lines.
| float tgui::ListView::getHeaderHeight | ( | ) | const |
Returns the height of the header row.
| unsigned int tgui::ListView::getHeaderSeparatorHeight | ( | ) | const |
Returns the height of the separator between the header and the items.
| unsigned int tgui::ListView::getHeaderTextSize | ( | ) | const |
Returns the text size of the header caption.
| bool tgui::ListView::getHeaderVisible | ( | ) | const |
Returns whether the header is shown.
| Scrollbar::Policy tgui::ListView::getHorizontalScrollbarPolicy | ( | ) | const |
Returns when the horizontal scrollbar should be displayed.
| unsigned int tgui::ListView::getHorizontalScrollbarValue | ( | ) | const |
Returns the thumb position of the horizontal scrollbar.
| String tgui::ListView::getItem | ( | std::size_t | index | ) | const |
Retrieves an item in the list.
| index | The index of the item |
| String tgui::ListView::getItemCell | ( | std::size_t | rowIndex, |
| std::size_t | columnIndex | ||
| ) | const |
Retrieves the value for a cell in the list.
| rowIndex | The index of the row |
| columnIndex | The index of the column |
| std::size_t tgui::ListView::getItemCount | ( | ) | const |
Returns the amount of items in the list view.
|
inline |
Returns user data stored in the item.
| std::bad_cast | if the template type does not match the type inside the std::any variable passed in setItemData or when the index was too high (which acts as if you access an empty std::any variable). |
| unsigned int tgui::ListView::getItemHeight | ( | ) | const |
Returns the height of the items in the list view.
| Texture tgui::ListView::getItemIcon | ( | std::size_t | index | ) | const |
Gets the icon displayed in front of the item.
| index | Index of the item |
| std::vector<String> tgui::ListView::getItemRow | ( | std::size_t | index | ) | const |
Retrieves the values of all columns for an item in the list.
| index | The index of the item |
The returned list has the same length as the amount of columns.
| std::vector<std::vector<String> > tgui::ListView::getItemRows | ( | ) | const |
Returns a list of all column values for all items in the list view.
| std::vector<String> tgui::ListView::getItems | ( | ) | const |
Returns a list of the texts in the first column for all items in the list view.
| bool tgui::ListView::getMultiSelect | ( | ) | const |
Returns multi selection of the items is allowed.
| ListViewRenderer* tgui::ListView::getRenderer | ( | ) |
Returns the renderer, which gives access to functions that determine how the widget is displayed.
| int tgui::ListView::getSelectedItemIndex | ( | ) | const |
Gets the index of the selected item.
| std::set<std::size_t> tgui::ListView::getSelectedItemIndices | ( | ) | const |
Gets the indices of the selected items.
| unsigned int tgui::ListView::getSeparatorWidth | ( | ) | const |
Returns the width of the column separator.
| ListViewRenderer* tgui::ListView::getSharedRenderer | ( | ) |
Returns the renderer, which gives access to functions that determine how the widget is displayed.
| bool tgui::ListView::getShowHorizontalGridLines | ( | ) | const |
Returns whether lines are drawn between items.
| bool tgui::ListView::getShowVerticalGridLines | ( | ) | const |
Returns whether lines are drawn between items.
Retrieves a signal based on its name.
| signalName | Name of the signal |
| Exception | when the name does not match any signal |
Reimplemented from tgui::Widget.
| Scrollbar::Policy tgui::ListView::getVerticalScrollbarPolicy | ( | ) | const |
Returns when the vertical scrollbar should be displayed.
| unsigned int tgui::ListView::getVerticalScrollbarValue | ( | ) | const |
Returns the thumb position of the vertical scrollbar.
| void tgui::ListView::insertItem | ( | std::size_t | index, |
| const std::vector< String > & | item | ||
| ) |
Inserts an item into the list.
| index | Index to insert the item at |
| item | Texts for each column |
| void tgui::ListView::insertItem | ( | std::size_t | index, |
| const String & | text | ||
| ) |
Inserts an item into the list.
| index | Index to insert the item at |
| text | The caption of the item you want to add |
| void tgui::ListView::insertMultipleItems | ( | std::size_t | index, |
| const std::vector< std::vector< String >> & | items | ||
| ) |
Inserts multiple items into the list.
| index | Index to insert the items at |
| items | List of items that should be passed to the insertItem |
|
overridevirtual |
Returns whether the mouse position (which is relative to the parent widget) lies on top of the widget.
Implements tgui::Widget.
| bool tgui::ListView::removeItem | ( | std::size_t | index | ) |
Removes the item from the list view.
| index | Index of the item in the list view |
|
overrideprotectedvirtual |
Function called when one of the properties of the renderer is changed.
| property | Name of the property that was changed |
Reimplemented from tgui::Widget.
| void tgui::ListView::setAutoScroll | ( | bool | autoScroll | ) |
Changes whether the list view scrolls to the bottom when a new item is added.
| autoScroll | Should list view scroll to the bottom when new items are added? |
Auto scrolling is enabled by default.
| void tgui::ListView::setColumnAlignment | ( | std::size_t | columnIndex, |
| ColumnAlignment | alignment | ||
| ) |
Changes the text alignment within a column.
| columnIndex | Index of the column to change |
| alignment | The text alignment for all texts in the column |
| void tgui::ListView::setColumnText | ( | std::size_t | index, |
| const String & | text | ||
| ) |
Changes the text of a column.
| index | Index of the column to change |
| text | Caption of the column |
| void tgui::ListView::setColumnWidth | ( | std::size_t | index, |
| float | width | ||
| ) |
Changes the width of a column.
| index | Index of the column to change |
| width | Width of the column. Set width to 0 to make it depend on the width of the column caption. |
| void tgui::ListView::setExpandLastColumn | ( | bool | expand | ) |
Changes whether the last column is expanded to fill the list view (if all columns fit inside the list view)
| expand | Make the last column larger to make it fill the list view when it isn't full yet? |
| void tgui::ListView::setFixedIconSize | ( | Vector2f | iconSize | ) |
Sets a size to which all icons should be scaled.
| iconSize | Wanted size for all icons |
By default the fixed icon size is set to (0,0) which doesn't scale the icons and lets each icon use the texture size. By setting only the x or y component of the vector to 0, that dimension will be calculated to keep the icon ratio.
| void tgui::ListView::setGridLinesWidth | ( | unsigned int | width | ) |
Changes the width of the grid lines.
| width | Width of the grid lines |
| void tgui::ListView::setHeaderHeight | ( | float | height | ) |
Changes the height of the header row.
| height | Height of the header or 0 to make the header size depend on the row height |
| void tgui::ListView::setHeaderSeparatorHeight | ( | unsigned int | height | ) |
Changes the height of the separator between the header and the items.
| height | Height of the line below the header |
| void tgui::ListView::setHeaderTextSize | ( | unsigned int | textSize | ) |
Changes the text size of the header caption.
| textSize | The character size of the header text |
By default, header text size is the same as the text size of the items.
| void tgui::ListView::setHeaderVisible | ( | bool | showHeader | ) |
Changes whether the header is shown.
| showHeader | Whether the header containing the column names shoud be visible |
| void tgui::ListView::setHorizontalScrollbarPolicy | ( | Scrollbar::Policy | policy | ) |
Changes when the horizontal scrollbar should be displayed.
| policy | The policy for displaying the horizontal scrollbar |
| void tgui::ListView::setHorizontalScrollbarValue | ( | unsigned int | value | ) |
Changes the thumb position of the horizontal scrollbar.
| value | New value of the horizontal scrollbar |
| void tgui::ListView::setItemData | ( | std::size_t | index, |
| Any | data | ||
| ) |
Store some user data with the item.
| index | Index of the item |
| data | User data to store |
Examples:
| void tgui::ListView::setItemHeight | ( | unsigned int | itemHeight | ) |
Changes the height of the items in the list view.
| itemHeight | The size of a single item in the list |
| void tgui::ListView::setItemIcon | ( | std::size_t | index, |
| const Texture & | texture | ||
| ) |
Sets a small icon in front of the item.
| index | Index of the item |
| texture | Texture of the item icon |
| void tgui::ListView::setMultiSelect | ( | bool | multiSelect | ) |
Allow multi selection of the items.
| multiSelect | Whether several items can be selected |
| void tgui::ListView::setSelectedItem | ( | std::size_t | index | ) |
Selects an item in the list view.
| index | Index of the item in the list view |
| void tgui::ListView::setSelectedItems | ( | const std::set< std::size_t > & | indices | ) |
Selects items in the list view.
| indices | Indices of the items in the list view |
| void tgui::ListView::setSeparatorWidth | ( | unsigned int | width | ) |
Changes the width of the column separator.
| width | Width of the line separating the columns |
| void tgui::ListView::setShowHorizontalGridLines | ( | bool | showGridLines | ) |
Changes whether lines are drawn between items.
| showGridLines | Is there a horizontal line to separate items? |
Horizontal grid lines are hidden by default.
| void tgui::ListView::setShowVerticalGridLines | ( | bool | showGridLines | ) |
Changes whether lines are drawn between columns.
| showGridLines | Is there a vertical line to separate columns? |
Vertical grid lines are shown by default.
| virtual void tgui::Widget::setSize |
Changes the size of the widget.
| size | Size of the widget |
Usage examples:
|
overridevirtual |
Changes the size of the list view.
| size | The new size of the list view |
Reimplemented from tgui::Widget.
|
inline |
Changes the size of the widget.
| width | Width of the widget |
| height | Height of the widget |
|
overridevirtual |
Changes the text size of the items.
| textSize | The character size of the text |
This will not change the height that each item has. When passing 0 to this function, the text will be auto-sized to nicely fit inside this item height.
Reimplemented from tgui::Widget.
| void tgui::ListView::setVerticalScrollbarPolicy | ( | Scrollbar::Policy | policy | ) |
Changes when the vertical scrollbar should be displayed.
| policy | The policy for displaying the vertical scrollbar |
| void tgui::ListView::setVerticalScrollbarValue | ( | unsigned int | value | ) |
Changes the thumb position of the vertical scrollbar.
| value | New value of the vertical scrollbar |
| void tgui::ListView::sort | ( | std::size_t | index, |
| const std::function< bool(const String &, const String &)> & | cmp | ||
| ) |
Sort items.
| index | The index of the column for sorting |
| cmp | The comparator |
| SignalInt tgui::ListView::onItemSelect = {"ItemSelected"} |
An item was selected in the list view Optional parameter: selected item index (-1 when deselecting)
Note that when MultiSelect is true, this signal is triggered for every change to the selected items. The optional parameter will contain the lowest index in the selected items or -1 when none of the items are selected.


GraphQL essentially allows users to define queries from a front-end to gather concrete data. So as it looks it is completely different than a standard REST endpoint. GraphQL differs queries which only gather data from those which also mutates them. In this article, I want to concentrate on queries which only gather some data and how to test them via FsCheck and F#.
Hi,
some time ago I had a pleasure to join a project which uses a GraphQL library. GraphQL essentially allows users to define queries from a front-end to gather concrete data. So as it looks it is completely different than a standard REST endpoint. GraphQL differs queries which only gather data from those which also mutates them. In this article, I want to concentrate on queries which only gather some data and how to test them.
I don’t want to go deep into GraphQL details and how to create some GraphQL query. I assume that we have a query in which we could ask about car details. Model for beforehand said Car looks like this:
GraphType:
And finally a query:
Thanks to that we could ask for a data a GraphQL endpoint like this:
Of course, as I said before we don’t need to specify all fields in an expected result. The query could be highly modifiable, so I thought it would be great idea to write some FsCheck tests, which would scan a GraphQL graph with a query and based on them generates sample queries. Thanks to which I could check a couple of properties. One of them would be to check if there are not any errors sections in GraphQL response, the second one would be to check if all responses end with a 200 HTTP Status Code. Thanks to the above I could be one hundred percent sure that all queries would work fine (maybe not from a business perspective :)), especially that those tests would be included in a CI pipeline as a part of integration tests.
To use a FsCheck library I have to write a generator for an input data. As an input data, I assume a serialized query. The project is written in a C#, so I used this language to write a generator.
Starting from a generic generator signature I assume that every query has to implement a method to collect data needed to create queries with arguments on their own. Also, every generator would know which class represents those arguments. So the signature of a generator looks as follows.
As we see TGraphQuery is responsible for a query type which we want to be our subject under test while TArguments stands for an accepted arguments by query.
Going to an implementation of a generator I would present the whole code and then describe it line by line.
We start by building a container for all dependencies. Next, we gather query of concrete IGraphType type (our generic type) from all registered RootQueryFields, we have to remember that all queries are registered as RootQueryFields so if we would try to gather concrete IGraphType from an AutoFac container we would get an exception. Then we get information about the graph and its instance from a container cause we need an information about defined GraphQL fields for that query which are defined in a constructor. Also, we need to retain that those types could be also a generic type like ListGraphType<OurCustomGraphType> so we want to gather a generic argument. We could do that thanks to the below method:
As we can see I don’t have here a stop guard cause I suppose (maybe incorrectly) that people don’t create infinite generic types.
Next phase is a check if query accepts some arguments, if yes we want to create a query with them if nope we only need fields for which we could ask. We are going to the implementation of a generator with arguments.
As we could see we get all arguments, then query name and all fields for which we could ask. Implementation of a GetFieldRepresentation looks as follows:
It based on gathering field name if the type of this field is a simple GraphlQL type (for example IntGraphType etc. ) if the type is more complex we want to gather all fields of this complex field as long as we reach a max deep of 3.
Going back to the previous method. Based on gathered fields, which are in a form of string list, we create a generator rest on them. Then, we get all arguments for a query based on a function which is passed as an argument. Next, at the end of this function we create our final generator which depends on fields and arguments, we also keep in mind that our query has to contain some fields, so we have to filter out a situation where fields list is empty.
Finally, we build test object thanks to the BuildQuery function, which looks like this:
As it seems it isn’t a rocket science, only a combination of a graphQL query.
Implementation of a method responsible for the creation of a query without arguments looks very similar to this with arguments:
The question is how concrete generator for cars would look like?
As we could see generator for a concrete query is very simple and readable, tests look like this:
To sum up, we could create very easily a FsCheck generator so that a GraphQL query would be tested almost in 100% in case of some lacks in implementation. It helps us in delivering a new version of our application which couldn’t be spotted while writing some single unit tests or manual tests.


If you are seeing this, I have not finished updating my site. That, or I've messed something up. Please contact me for more information or to tell me that I have messed something up.
If you came to this page by accident, hello! Check out some of my favorite sites!
This page brought to you by the 1990s.


This is NOT usable as is. The URL for the Sketch Engine instance must be specified in doubletree-sketchengine.js and the URL must be accessible to the browser, not violating CORS (Cross-Origin Resource Sharing)
This is an example of how to use DoubleTreeJS as a visualization of corpus query results from The Sketch Engine. Click on a node to expand or contract it. Alt-click on a node to do a new search using its lemma. Shift-click on a node to get a KWIC view below. Click on a word in the KWIC to do a new search using its lemma. Move the tree by dragging on a node or the branches. The input boxes accept regular expressions. Experiment! Feedback appreciated.
| Corpus: | Lemma to use: | ||||||
| Sort branches by: lemma POS branching | |||||||
|


First Name:
Last Name:
Full Name: {{firstName + " " + lastName}}
First Name:
Last Name:
Full Name: {{fullName()}}


Represents a headline in an orgmode file.
This matches a headline marked as COMMENT
Special keywords allowed at the start of a line.
This is the regex that matches a line
This matches the tags on a headline
Valid states for partial export.
The entire subtree from this heading should be excluded.
The headline should be exported, but not the body.
Everything should be exported, headline/body/children.
This contains the lines that “belong” to the headline.
The export state of this headline. See ValidExportStates
.
This is the headline text – the part of the headline minus the leading asterisks, the keywords, and the tags.
Optional keyword found at the beginning of the headline.
This is the “level” of the headline
Determines if a line is an orgmode “headline”: A headline begins with one or more asterisks.
# File lib/org-ruby/headline.rb, line 76 def self.headline?(line) line =~ LineRegexp end
# File lib/org-ruby/headline.rb, line 47 def initialize(line, parser = nil, offset=0) super(line, parser) @body_lines = [] @body_lines << self # Make @body_lines contain the headline? @tags = [] @export_state = :exclude if (@line =~ LineRegexp) then @level = $&.strip.length + offset @headline_text = $'.strip if (@headline_text =~ TagsRegexp) then @tags = $&.split(%r:/) # split tag text on semicolon @tags.delete_at(0) # the first item will be empty; discard @headline_text.gsub!(TagsRegexp, "") # Removes the tags from the headline end @keyword = nil parse_keywords else raise "'#{line}' is not a valid headline" end end
Determines if a headline has the COMMENT keyword.
# File lib/org-ruby/headline.rb, line 81 def comment_headline? @headline_text =~ CommentHeadlineRegexp end
Override Orgmode::Line#output_text. For a heading, @#headline_text is what we should output.
# File lib/org-ruby/headline.rb, line 70 def output_text return @headline_text end
Overrides Orgmode::Line#paragraph_type.
# File lib/org-ruby/headline.rb, line 86 def paragraph_type :"heading#{@level}" end
Converts this headline and its body to textile.
# File lib/org-ruby/headline.rb, line 91 def to_textile output = "h#{@level}. #{@headline_text}\n" output <<<EMAIL_ADDRESS>output end


Ruca Love
Interactive Full-Stack Web Developer
The Art of Transformation
Keep it Moving
Cities I Have Lived In:
Pittsburgh, PA
Orlando, FL
Tallahassee, FL
London, UK
New York City, NY
Chicago, IL
Grand Rapids, MI
Tampa, FL
St. Petersburg, FL
Boulder, CO
Previous Lives
Companies I have Worked With:
Infinity Broadcasting WDSY108 Morning Show
Munn Rabôt
JPMorgan Chase Bank
HibisKISS Yoga & Ayurveda
My tiny Buddhaful Hॐme
Orlando Lakefront: A Tiny Home Community
Leave Some Love
Name
Email
Message
Education
Galvanize Inc.
Full-stack Web Developer
Florida Academy of Ayurveda
Certified Ayurvedic Practitioner
The Lotus Pond Center for Yoga & Health
Yoga Alliance E-RYT500
Florida State University
Bachelor of Arts in Communications
>