A timer is an invisible UI component that trigger the OnTimerTick event at the specified interval.
Timers are mosty used to handle animations OR to create a timeout. To sync multithreaded action see the Notice object.
A push button is a rectangle containing an application-defined text label.
Use ImageButton if you need to have a button that ONLY contains an icon or a bitmap.
A check box consists of a square box and an application-defined labe that indicates a choice the user can make by selecting the button.
Applications typically display check boxes to enable the user to choose one or more options that are not mutually exclusive.
A combo box consists of a list and a selection field. The list presents the options that a user can select,
and the selection field displays the current selection.
A date and time picker (DTP) control provides a simple and intuitive interface through which to exchange date and time information with a user.
For example, with a DTP control you can ask the user to enter a date and then easily retrieve the selection.
A flexbox layout that organizes the children control in a parent control.
Flexbox uses the stretch library internally ( https://github.com/vislyhq/stretch ).
The Font dialog box lets the user choose attributes for a logical font, such as
font family and associated font style, point size, effects (underline, strikeout),
and a script (or character set).
Represent a font parameters. Returned by the font dialog when the user selected a font.
Can also be used to create a Font resource using Font::from_info
For more information on the parameters see: https://docs.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-logfonta
An image list is a collection of images of the same size, each of which can be referred to by its index.
Image lists are used in controls such as tabs container and tree view in order to add icon next to the items.
A list-view control is a window that displays a collection of items.
List-view controls provide several ways to arrange and display items and are much more flexible than simple ListBox.
A NumberSelect control is a pair of arrow buttons that the user can click to increment or decrement a value.
NumberSelect is implemented as a custom control because the one provided by winapi really sucks.
A radio button (also called option button) consists of a round button and an application-defined label,
icon, or bitmap that indicates a choice the user can make by selecting the button. An application typically uses radio buttons in a group box to enable the user to choose one of a set of related but mutually exclusive options.
Represents a raw handle to a embed resource. Manipulating raw resources is inherently unsafe.
RawResources are loaded using EmbedResource::raw and EmbedResource::raw_str
A rich label is a label that supports rich text. This control is built on top of the rich text box control and as such
require the rich-textbox feature. Enable “MULTI_LINE” to support multi line labels.
An edit control is a rectangular control window to permit the user to enter and edit text by typing on the keyboard
This control allow multi line input. For a single line of text, use TextInput.
A window can display a data object, such as a document or a bitmap, that is larger than the window’s client area. When provided with a scroll bar, the user can scroll a data object in the client area to bring into view the portions of the object that extend beyond the borders of the window.
A status bar is a horizontal window at the bottom of a parent window in which an application can display various kinds of status information.
Status bar cannot stack, so there must be only one per window.
An edit control is a rectangular control window to permit the user to enter and edit text by typing on the keyboard
This control allow multi line input. For a single line of text, use TextInput.
An edit control is a rectangular control window to permit the user to enter and edit text by typing on the keyboard
This control only allow a single line input. For block of text, use TextBox.
Winapi documentation: https://docs.microsoft.com/en-us/windows/win32/controls/about-edit-controls#text-and-input-styles
Tooltips appear automatically, or pop up, when the user pauses the mouse pointer over a tool or
some other UI element. The tooltip appears near the pointer and disappears when the user
clicks a mouse button, moves the pointer away from the tool, or simply waits for a few seconds.
A trackbar is a window that contains a slider (sometimes called a thumb) in a channel, and optional tick marks.
When the user moves the slider, using either the mouse or the direction keys, the trackbar sends notification messages to indicate the change.
Events are identifiers that are sent by controls on user interaction
Some events also have data that can be further processed by the event loop. See EventData
Return value of message. Define the button that the user clicked. If the user
cancelled the message box by clicking on X button of the window, MessageChoice::Cancel is returned.
Hook the window subclass with the default event dispatcher.
The hook is applied to the control and its parent. All common controls send their events to their parent.
Dispatch system events in the current thread AND execute a callback after each peeking attempt.
Unlike dispath_thread_events, this method will not pause the thread while waiting for events.
Display a simple error message box. The message box has for style MessageButtons::Ok and MessageIcons::Error.
It is recommended to use modal_error_message because it locks the window that creates the message box.
This method may be deprecated in the future
Display a message box and then panic. The message box has for style MessageButtons::Ok and MessageIcons::Error .
It is recommended to use modal_fatal_message because it locks the window that creates the message box.
This method may be deprecated in the future
Check if a raw handler with the specified handler_id is currently bound on the control.
This function will panic if the handle parameter is not a window control.
Create an application wide message box.
It is recommended to use modal_message because it locks the window that creates the message box.
This method may be deprecated in the future
Display a simple message box. The message box has for style MessageButtons::Ok and MessageIcons::Info.
It is recommended to use modal_info_message because it locks the window that creates the message box.
This method may be deprecated in the future
Remove the raw event handler from the associated window.
Calling unbind twice or trying to unbind an handler after destroying its parent will cause the function to panic.