Available on crate feature
gui
only.Expand description
High-level GUI abstractions for user windows and native controls. They can be created programmatically or by loading resources from a .res
file. These files can be created with a WYSIWYG resource editor.
§Windows
There are 5 types of windows, which can host child controls:
WindowControl
– a custom, user-defined child control;WindowMain
;WindowMessageOnly
;WindowModal
;WindowModeless
.
You’ll probably want to start your GUI application using the WindowMain
.
§Native controls
Native controls are hosted by windows, and receive various types of user input.
Button
;CheckBox
;ComboBox
;DateTimePicker
;Edit
(textbox);Header
;Label
;ListBox
;ListView
(grid);MonthCalendar
;ProgressBar
;RadioButton
;StatusBar
;Tab
;Trackbar
;TreeView
;UpDown
.
Modules§
- collections
- Objects which exposes methods to work upon individual items of certain native controls.
- events
- Exposes native control messages that can be handled.
Structs§
- Button
- Native button control.
- Button
Opts - Options to create a
Button
programmatically withButton::new
. - Check
Box - Native
check box
control, actually a variation of the ordinary
Button
: just a button with a specific style. - Check
BoxOpts - Options to create a
CheckBox
programmatically withCheckBox::new
. - Combo
Box - Native combo box control.
- Combo
BoxOpts - Options to create a
ComboBox
programmatically withComboBox::new
. - Date
Time Picker - Native date and time picker control.
- Date
Time Picker Opts - Options to create a
DateTimePicker
programmatically withDateTimePicker::new
. - Edit
- Native edit (text box) control.
- Edit
Opts - Options to create an
Edit
programmatically withEdit::new
. - Header
- Native header control.
- Header
Item - A single item of a
Header
control. - Header
Opts - Options to create a
Header
programmatically withHeader::new
. - Label
- Native label control.
- Label
Opts - Options to create a
Label
programmatically withLabel::new
. - ListBox
- Native list box control. Not to be confused with the more complex list view control.
- List
BoxOpts - Options to create a
ListBox
programmatically withListBox::new
. - List
View - Native list view control. Not to be confused with the simpler list box control.
- List
View Col - A single column of a
ListView
control. - List
View Item - A single item of a
ListView
control. - List
View Opts - Options to create a
ListView
programmatically withListView::new
. - Month
Calendar - Native month calendar control.
- Month
Calendar Opts - Options to create a
MonthCalendar
programmatically withMonthCalendar::new
. - MsgError
- An error that occurred within a closure of a window message handling. Usually these errors are thrown by the user closures.
- Progress
Bar - Native progress bar control.
- Progress
BarOpts - Options to create a
ProgressBar
programmatically withProgressBar::new
. - Radio
Button - Native radio button control.
- Radio
Button Opts - Options to create a
RadioButton
programmatically withRadioGroup::new
. - Radio
Group - A group of native
RadioButton
controls. - Status
Bar - Native status bar control, which has one or more parts.
- Status
BarPart - A single part of a
StatusBar
control. - Tab
- Native tab control.
- TabItem
- A single item of a
Tab
control. - TabOpts
- Options to create a
Tab
programmatically withTab::new
. - Trackbar
- Native trackbar control.
- Trackbar
Opts - Options to create a
Trackbar
programmatically withTrackbar::new
. - Tree
View - Native tree view control.
- Tree
View Item - A single item of a
TreeView
control. - Tree
View Opts - Options to create a
TreeView
programmatically withTreeView::new
. - UpDown
- Native up-down control.
- UpDown
Opts - Options to create an
UpDown
programmatically withUpDown::new
. - Window
Control - An user child window, which can handle events. Can be programmatically
created or load a dialog resource from a
.res
file. - Window
Control Opts - Options to create a
WindowControl
programmatically withWindowControl::new
. - Window
Main - An user main window, which can handle events. Usually, this is the first
window of your application, launched directly from the
main
function. Can be programmatically created or load a dialog resource from a.res
file. - Window
Main Opts - Options to create a
WindowMain
programmatically withWindowMain::new
. - Window
Message Only - A message-only window, which can handle events.
- Window
Modal - An user modal window, which can handle events. Can be programmatically
created or load a dialog resource from a
.res
file. - Window
Modal Opts - Options to create a
WindowModal
programmatically withWindowModal::new
. - Window
Modeless - An user modeless window, which can handle events. Can be programmatically
created or load a dialog resource from a
.res
file. - Window
Modeless Opts - Options to create a
WindowModeless
programmatically withWindowModeless::new
.
Enums§
- Brush
- The class background brush to be loaded for
WindowMainOpts
,WindowModalOpts
orWindowControlOpts
. - Cursor
- The class cursor to be loaded for
WindowMainOpts
,WindowModalOpts
orWindowControlOpts
. - Header
Arrow - Possible states of the arrow in a
HeaderItem
. - Header
Justify - Text justification for a
HeaderItem
. - Horz
- Specifies the horizontal behavior of the control when the parent window is resized.
- Icon
- The class icon to be loaded for
WindowMainOpts
,WindowModalOpts
orWindowControlOpts
. - SbPart
- Used when adding the parts in
StatusBar::new
. - Vert
- Specifies the vertical behavior of the control when the parent window is resized.
Functions§
- dpi
- Returns the values adjusted according to the current horizontal and vertical
system DPI, retrieved with
HDC::GetDeviceCaps
. - dpi_x
- Returns the value adjusted according to the current horizontal system DPI,
retrieved with
HDC::GetDeviceCaps
. - dpi_y
- Returns the value adjusted according to the current vertical system DPI,
retrieved with
HDC::GetDeviceCaps
.