Struct rstk::toplevel::TkTopLevel[][src]

pub struct TkTopLevel {
    pub id: String,
}
Expand description

Refers to a top-level widget (window)

Fields

id: String

Implementations

Specifies the background colour.

Colours are specified as a string, by either:

  • name - using one of the values in the tk colours list
  • rgb - as a 6-digit hexadecimal value in form “#RRGGBB”

Size of border around widget.

De-iconify the window.

Expand window to occupy the full screen.

Retrieves the geometry of the window as a tuple: (width, height, x, y).

Sets the size and position of a top-level window.

  • height - the vertical height of the window, in pixels
  • width - the horizontal width of the window, in pixels
  • x - a positive value gives position relative to left edge of screen, and a negative value gives position relative to right edge.
  • y - a positive value gives position relative to top edge of screen, and a negative value gives position relative to bottom edge.

Height of window, in rows.

Iconify the window.

Sets the maximum width/height in pixels for the window.

Sets the menu of the top-level window.

Sets the minimum width/height in pixels for the window.

Call given command on closing the window.

Amount of horizontal padding for widget.

Amount of vertical padding for widget.

Style of border around label.

Sets if window can be resized vertically or horizontally.

Sets the title text on a top-level window.

Updates the display.

Width of window, in columns.

Withdraw the window.

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

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Returns the widget’s id reference - used within tk

Binds a command to this widget to call on given event pattern

Retrieve the value of a configuration option as a string. Read more

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

Destroys a widget and its children.

winfo retrieves information about widget. Read more

Makes this widget the focus window (e.g. for key presses)

Returns the widget x position in pixels, within its parent.

Returns the widget y position in pixels, within its parent.

Returns the widget height in pixels.

Returns the widget width in pixels.

Returns the position of the mouse on screen of widget as (x,y).

Gives the x position of the mouse on screen of widget.

Gives the y position of the mouse on screen of widget.

Height of screen of widget in pixels.

Height of screen of widget in millimetres.

Width of screen of widget in pixels.

Width of screen of widget in millimetres.

Lowers the widget in stacking order.

Raises the widget in stacking order.

Sets property for a given column of the grid layout contained within this widget. Read more

Sets property for a given row of the grid layout contained within this widget. 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.