Struct fltk::menu::MenuItem[][src]

pub struct MenuItem { /* fields omitted */ }
Expand description

Creates a menu item

Implementations

Initializes a new window, useful for popup menus

Creates a popup menu at the specified coordinates and returns its choice

Returns the label of the menu item

Sets the label of the menu item

Returns the label type of the menu item

Sets the label type of the menu item

Returns the label color of the menu item

Sets the label color of the menu item

Returns the label font of the menu item

Sets the label font of the menu item

Returns the label size of the menu item

Sets the label size of the menu item

Returns the value of the menu item

Sets the menu item

Clears the menu item

Returns whether the menu item is visible or not

Returns whether the menu item is active

Activates the menu item

Deactivates the menu item

Returns whether a menu item is a submenu

Returns whether a menu item is a checkbox

Returns whether a menu item is a radio item

Shows the menu item

Hides the menu item

Get the next menu item

Get children of MenuItem

Get the menu item at idx

Get the user data

Safety

Can return multiple mutable instances of the user data, which has a different lifetime than the object

Set a callback for the menu item

Use a sender to send a message during callback

Check if a menu item was deleted

Draw a box around the menu item. Requires the call to be made inside a MenuExt-implementing widget’s own draw method

Measure the width and height of a menu item

Set the image of the menu item

Safety

Trying to add a label after adding an image might lead to undefined behavior

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.