pub struct TkMenu {
pub id: String,
}
Expand description
Refers to a menu widget
Fields§
§id: String
Implementations§
source§impl TkMenu
impl TkMenu
sourcepub fn cascade(&self) -> TkMenuCascade
pub fn cascade(&self) -> TkMenuCascade
Start to create a submenu.
Start to create a check-button menu-item.
sourcepub fn command(&self) -> TkMenuCommand
pub fn command(&self) -> TkMenuCommand
Start to create a command (simple menu item).
Start to create a radio-button menu-item.
Radio buttons are arranged in groups, with each button in the group having its own value. For this reason, the group and value are required when making a radio-button menu-item.
Returns the value for a given radio-button group.
Sets the value for a given radio-button group.
sourcepub fn separator(&self) -> TkMenuSeparator
pub fn separator(&self) -> TkMenuSeparator
Start to create a separator.
sourcepub fn entry_cget(&self, index: u64, option: &str) -> String
pub fn entry_cget(&self, index: u64, option: &str) -> String
Returns the value (as a String) for given option for menu-item at given index position.
sourcepub fn entry_configure(&self, index: u64, option: &str, value: &str)
pub fn entry_configure(&self, index: u64, option: &str, value: &str)
Sets the value (as a String) for given option for menu-item at given index position.
Trait Implementations§
source§impl PartialEq for TkMenu
impl PartialEq for TkMenu
source§impl TkWidget for TkMenu
impl TkWidget for TkMenu
source§fn bind(&self, pattern: &str, command: impl Fn(TkEvent) + Send + 'static)
fn bind(&self, pattern: &str, command: impl Fn(TkEvent) + Send + 'static)
Binds a command to this widget to call on given event pattern
source§fn cget(&self, option: &str) -> String
fn cget(&self, option: &str) -> String
Retrieve the value of a configuration option
as a string. Read more
source§fn configure(&self, option: &str, value: &str)
fn configure(&self, option: &str, value: &str)
Used to change properties of a widget.
This function can be used to directly configure
the widget using an option-value string pair: Read more
source§fn position_x(&self) -> u64
fn position_x(&self) -> u64
Returns the widget x position in pixels, within its parent.
source§fn position_y(&self) -> u64
fn position_y(&self) -> u64
Returns the widget y position in pixels, within its parent.
source§fn widget_height(&self) -> u64
fn widget_height(&self) -> u64
Returns the widget height in pixels.
source§fn widget_width(&self) -> u64
fn widget_width(&self) -> u64
Returns the widget width in pixels.
source§fn mouse_position(&self) -> (i64, i64)
fn mouse_position(&self) -> (i64, i64)
Returns the position of the mouse on screen of widget as (x,y).
source§fn screen_height(&self) -> u64
fn screen_height(&self) -> u64
Height of screen of widget in pixels.
source§fn screen_height_mm(&self) -> u64
fn screen_height_mm(&self) -> u64
Height of screen of widget in millimetres.
source§fn screen_width(&self) -> u64
fn screen_width(&self) -> u64
Width of screen of widget in pixels.
source§fn screen_width_mm(&self) -> u64
fn screen_width_mm(&self) -> u64
Width of screen of widget in millimetres.
impl StructuralPartialEq for TkMenu
Auto Trait Implementations§
impl RefUnwindSafe for TkMenu
impl Send for TkMenu
impl Sync for TkMenu
impl Unpin for TkMenu
impl UnwindSafe for TkMenu
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more