Struct fltk::menu::Choice [−][src]
pub struct Choice { /* fields omitted */ }
Expand description
Creates a menu choice
Trait Implementations
Add a menu item along with its callback. The characters “&”, “/”, “\”, and “_” (underscore) are treated as special characters in the label string. The “&” character specifies that the following character is an accelerator and will be underlined. The “\” character is used to escape the next character in the string. Labels starting with the “_” (underscore) character cause a divider to be placed after that menu item. Takes the menu item as a closure argument Read more
Inserts a menu item at an index along with its callback. The characters “&”, “/”, “\”, and “_” (underscore) are treated as special characters in the label string. The “&” character specifies that the following character is an accelerator and will be underlined. The “\” character is used to escape the next character in the string. Labels starting with the “_” (underscore) character cause a divider to be placed after that menu item. Takes the menu item as a closure argument Read more
Add a menu item along with an emit (sender and message). The characters “&”, “/”, “\”, and “_” (underscore) are treated as special characters in the label string. The “&” character specifies that the following character is an accelerator and will be underlined. The “\” character is used to escape the next character in the string. Labels starting with the “_” (underscore) character cause a divider to be placed after that menu item. Read more
Inserts a menu item along with an emit (sender and message). The characters “&”, “/”, “\”, and “_” (underscore) are treated as special characters in the label string. The “&” character specifies that the following character is an accelerator and will be underlined. The “\” character is used to escape the next character in the string. Labels starting with the “_” (underscore) character cause a divider to be placed after that menu item. Read more
Find an item’s index by its label
Sets the text font
Sets the text size
Return the text color
Sets the text color
Adds a simple text option to the Choice and MenuButton
widgets.
The characters “&”, “/”, “\”, “|”, and “_” (underscore) are treated as special characters in the label string. The “&” character specifies that the following character is an accelerator and will be underlined.
The “\” character is used to escape the next character in the string. Labels starting with the “_” (underscore) character cause a divider to be placed after that menu item. Read more
Get index into menu of the last item chosen, returns -1 if no item was chosen
Set index into menu of the last item chosen,return true if the new value is different than the old one
Clears the items in a menu, effectively deleting them, and recursively force-cleans capturing callbacks Read more
Clears a submenu by index, failure return FltkErrorKind::FailedOperation
Read more
Clears a submenu by index, failure return FltkErrorKind::FailedOperation
. Also recursively force-cleans capturing callbacks Read more
Set the down_box
of the widget
Get the down frame type of the widget
Get the menu element
Set the menu element Read more
Creates a new widget, takes an x, y coordinates, as well as a width and height, plus a title Read more
transforms a widget pointer to a Widget, for internal use Read more
Get a widget from base widget Read more
Set a custom handler, where events are managed manually, akin to Fl_Widget::handle(int)
.
Handled or ignored events should return true, unhandled events should return false.
takes the widget as a closure argument Read more
Set a custom draw method.
takes the widget as a closure argument.
macOS requires that WidgetBase::draw
actually calls drawing functions Read more
INTERNAL: Retrieve the draw data Read more
Sets the widget’s label.
labels support special symbols preceded by an @
sign.
and for the associated formatting. Read more
transforms a widget to a base Fl_Widget
, for internal use Read more
Deactivates the widget
Redraws the label of the widget
Resizes and/or moves the widget, takes x, y, width and height
Does a simple resize ignoring class-specific resize functionality
Sets the tooltip text
Returns the widget label’s color
Sets the widget label’s color
Returns the widget label’s font
Sets the widget label’s font
Returns the widget label’s size
Sets the widget label’s size
Returns the widget label’s type
Sets the widget label’s type
Mark the widget as changed
Clears the changed status of the widget
Sets the default callback trigger for a widget
Return the callback trigger
Gets the selection color of the widget
Sets the selection color of the widget
Runs the already registered callback
Returns the topmost window holding the widget
Checks whether a widget is capable of taking events
INTERNAL: Retakes ownership of the user callback data Read more
Set the widget to have visible focus
Clear visible focus
Set the visible focus using a flag
Return whether the widget has visible focus
Check if a widget was deleted
Signal the widget as damaged and it should be redrawn in the next event loop cycle
Return the damage mask
Signal the type of damage a widget received
Clear the damaged flag
Return the widget as a window if it’s a window
Positions the widget below w, the size of w should be known
Positions the widget above w, the size of w should be known
Positions the widget to the right of w, the size of w should be known
Positions the widget to the left of w, the size of w should be known
Positions the widget to the center of w, the size of w should be known
Positions the widget to the center of its parent
Takes the size of w, the size of w should be known
Takes the size of the parent group or window
Checks whether the self widget is inside another widget
Initialize to position x, y, (should only be called on initialization)
Initialilze to dimensions width and height, (should only be called on initialization)
Initialize with label/title, (should only be called on initialization)
Sets the initial alignment of the widget, (should only be called on initialization)
Returns the widget type when applicable
Sets the widget type
Set the type of the widget at construction
Sets the image of the widget scaled to the widget’s size
Sets the deactived image of the widget
Sets the deactivated image of the widget scaled to the widget’s size
Gets the deactivated image associated with the widget
Sets the callback when the widget is triggered (clicks for example) takes the widget as a closure argument Read more
Emits a message on callback using a sender
Upcast a WidgetExt
to a Widget Read more
Returns whether a widget or any of its parents are visible (recursively)
Return whether two widgets object point to the same widget
Returns whether a widget or any of its parents are active (recursively)
Auto Trait Implementations
Blanket Implementations
Mutably borrows from an owned value. Read more