Contains control native API.
Protected Static Methods | |
static void | back_color (intptr control, const drawing::color &color) |
Sets the background color for the control. | |
static drawing::rectangle | client_rectangle (intptr control) |
Gets the rectangle that represents the client area of the control. | |
static drawing::size | client_size (intptr control) |
Gets the height and width of the client area of the control. | |
static void | client_size (intptr control, const drawing::size &size) |
Sets the height and width of the client area of the control. | |
static void | context_menu (intptr control, intptr context_menu, const xtd::drawing::point &pos) |
Sets the context that is displayed in the control. | |
static intptr | user_context_menu (intptr control, intptr context_menu, const xtd::drawing::point &pos) |
Displays the shortcut menu at the specified position. | |
static intptr | create (const create_params &create_params) |
Creates control. | |
static intptr | create_graphics (intptr control) |
Creates a graphics for the control. | |
static intptr | create_paint_graphics (intptr control) |
Creates a graphics for the xtd::forms::control::paint event control. | |
static intptr | create_double_buffered_paint_graphics (intptr control) |
Creates a graphics for the double buffer xtd::forms::control::paint event control. | |
static void | cursor (intptr control, intptr cursor) |
Sets the cursor that is displayed when the mouse pointer is over the control. | |
static intptr | def_wnd_proc (intptr control, intptr hwnd, uint32 msg, intptr wparam, intptr lparam, intptr result, intptr handle) |
Sends the specified message to the default window procedure. | |
static xtd::drawing::size | default_size (const xtd::string &class_name) |
Gets the default height and default width for the specified class name. | |
static void | destroy (intptr control) |
Destroys context menu. | |
static void | double_buffered (intptr control, bool value) |
Sets a value indicating whether this control should redraw its surface using a secondary buffer to reduce or prevent flicker. | |
static bool | enabled (intptr control) |
Gets a value indicating whether the control can respond to user interaction. | |
static void | enabled (intptr control, bool enabled) |
Sets a value indicating whether the control can respond to user interaction. | |
static void | focus (intptr control) |
Sets input focus to the control. | |
static bool | focused (intptr control) |
Gets a value indicating whether the control has input focus. | |
static void | fore_color (intptr control, const drawing::color &color) |
Sets the foreground color of the control. | |
static void | font (intptr control, const drawing::font &font) |
Sets the font of the text displayed by the control. | |
static intptr | native_handle (intptr control) |
Gets the native handle of the control. | |
static void | invalidate (intptr control, const drawing::rectangle &rec, bool invalidate_children) |
Invalidates the entire surface of the control and causes the control to be redrawn. | |
static void | invalidate (intptr control, const drawing::region ®ion, bool invalidate_children) |
Invalidates the entire surface of the control and causes the control to be redrawn. | |
static void | invoke_in_control_thread (intptr control, delegate< void(std::vector< std::any >)> invoker, const std::vector< std::any > &args, xtd::sptr< xtd::threading::manual_reset_event > invoked, xtd::sptr< bool > completed) |
Executes the specified delegate, on the thread that owns the control's underlying window handle, with the specified list of arguments and mutex. | |
static drawing::point | location (intptr control) |
Gets the coordinates of the upper-left corner of the control relative to the upper-left corner of its container. | |
static void | location (intptr control, const drawing::point &location) |
Sets the coordinates of the upper-left corner of the control relative to the upper-left corner of its container. | |
static void | maximum_client_size (intptr control, const drawing::size &size) |
Sets the maximum height and maximum width of the client area of the control. | |
static void | maximum_size (intptr control, const drawing::size &size) |
Sets the maximum height and maximum width of the control. | |
static void | minimum_client_size (intptr control, const drawing::size &size) |
Sets the minimum height and minimum width of the client area of the control. | |
static void | minimum_size (intptr control, const drawing::size &size) |
Sets the minimum height and minimum width of the control. | |
static drawing::point | point_to_client (intptr control, const drawing::point &p) |
Computes the location of the specified screen point into client coordinates. | |
static drawing::point | point_to_screen (intptr control, const drawing::point &p) |
Computes the location of the specified client point into screen coordinates. | |
static void | register_wnd_proc (intptr control, const delegate< intptr(intptr, int32, intptr, intptr, intptr)> &wnd_proc) |
Register a specified wnd proc from the message pump of the control. | |
static void | resume_layout (intptr control) |
Resumes usual layout logic. | |
static void | right_to_left (intptr control, int32 value) |
Sets a value indicating whether control's elements are aligned to support locales using right-to-left fonts. | |
static intptr | send_message (intptr control, intptr hwnd, int32 msg, intptr wParam, intptr lParam) |
Send a message with specified hwnd, message, wparam and lparam. | |
static drawing::size | size (intptr control) |
Gets the height and width of the control. | |
static void | size (intptr control, const drawing::size &size) |
Sets the height and width of the control. | |
static void | suspend_layout (intptr control) |
Temporarily suspends the layout logic for the control. | |
static xtd::string | text (intptr control) |
Gets the text associated with this control. | |
static void | text (intptr control, const xtd::string &text) |
Sets the text associated with this control. | |
static intptr | toolkit_handle (intptr control) |
Gets the toolkit handle of the control. | |
static void | unregister_wnd_proc (intptr control) |
Unregister the wnd proc previously registered. | |
static void | update (intptr control) |
Causes the control to redraw the invalidated regions within its client area. | |
static bool | visible (intptr control) |
Gets a value indicating whether the control and all its child controls are displayed. | |
static void | visible (intptr control, bool visible) |
Sets a value indicating whether the control and all its child controls are displayed. | |
static xtd::string | message_to_string (uint32 id) |
Convert message identifiers to a string. | |
|
staticprotected |
Sets the background color for the control.
control | Control window handle. |
color | A xtd::drawing::color that represents the background color of the control. |
|
staticprotected |
Gets the rectangle that represents the client area of the control.
control | Control window handle. |
|
staticprotected |
Gets the height and width of the client area of the control.
control | Control window handle. |
|
staticprotected |
Sets the height and width of the client area of the control.
control | Control window handle. |
size | A size that represents the dimensions of the client area of the control. |
|
staticprotected |
Sets the context that is displayed in the control.
control | Control handle. |
menu | A menu handle that represents the menu to display in the form. |
|
staticprotected |
Displays the shortcut menu at the specified position.
control | A control handle that specifies the control with which this shortcut menu is associated. |
context_menu | A context menu handle that specifies the menu is associated. |
pos | A xtd::drawing::point that specifies the coordinates at which to display the menu. These coordinates are specified relative to the client coordinates of the control specified in the control parameter. |
|
staticprotected |
Creates control.
create_param | A xtd::forms::create_param object that contains needed parameters to create control. |
Control | xtd::forms::create_params::class_name | xtd::forms::create_params::style |
---|---|---|
xtd::forms::button | "button" | button_styles.h and window_styles.h bitwise combination |
xtd::forms::check_box | "checkbox" | button_styles.h and window_styles.h bitwise combination |
xtd::forms::checked_list_box | "checkedlistbox" | window_styles.h bitwise combination |
xtd::forms::choice | "choice" | window_styles.h bitwise combination |
xtd::forms::collapsible_panel | "collapsiblepanel" | window_styles.h bitwise combination |
xtd::forms::color_picker | "colorpicker" | window_styles.h bitwise combination |
xtd::forms::combo_box | "combobox" | combo_box_styles.h and window_styles.h bitwise combination |
xtd::forms::command_link_button | "commandlinkbutton" | window_styles.h bitwise combination |
xtd::forms::date_time_picker | "datetimepicker" | window_styles.h bitwise combination |
xtd::forms::domain_up_down | "domainupdown" | window_styles.h bitwise combination |
xtd::forms::font_picker | "fontpicker" | window_styles.h bitwise combination |
xtd::forms::form | "form" | window_styles.h bitwise combination |
xtd::forms::group_box | "groupbox" | button_styles.h and window_styles.h bitwise combination |
xtd::forms::label | "label" | window_styles.h bitwise combination |
xtd::forms::list_box | "listbox" | list_box_styles.h and window_styles.h bitwise combination |
xtd::forms::loading_indicator | "loadingindicator" | window_styles.h bitwise combination |
xtd::forms::numeric_up_down | "numericupdown" | window_styles.h bitwise combination |
xtd::forms::panel | "panel" | window_styles.h bitwise combination |
xtd::forms::picture_box | "picturebox" | window_styles.h bitwise combination |
xtd::forms::progress_bar | "progressbar" | progress_bar_styles.h and window_styles.h bitwise combination |
xtd::forms::radio_button | "radiobutton" | button_styles.h and window_styles.h bitwise combination |
xtd::forms::scrollbar | "scrollbar" | scroll_bar_styles.h and window_styles.h bitwise combination |
xtd::forms::switch_button | "switchbutton" | button_styles.h and window_styles.h bitwise combination |
xtd::forms::tab_control | "tabcontrol" | tab_control_styles.h and window_styles.h bitwise combination |
xtd::forms::tab_page | "tabpage" | window_styles.h bitwise combination |
xtd::forms::text_box | "textbox" | window_styles.h bitwise combination |
xtd::forms::toggle_button | "togglebutton" | button_styles.h and window_styles.h bitwise combination |
xtd::forms::track_bar | "trackbar" | track_bar_styles.h and window_styles.h bitwise combination |
xtd::forms::up_down_button | "updownbutton" | button_styles.h and window_styles.h bitwise combination |
xtd::forms::user_control | "usercontrol" | window_styles.h bitwise combination |
Creates a graphics for the control.
control | Control window handle. |
Creates a graphics for the xtd::forms::control::paint event control.
control | Control window handle. |
|
staticprotected |
Creates a graphics for the double buffer xtd::forms::control::paint event control.
control | Control window handle. |
Sets the cursor that is displayed when the mouse pointer is over the control.
control | Control window handle. |
cursor | A cursor handle that represents the cursor to display when the mouse pointer is over the control. |
|
staticprotected |
Sends the specified message to the default window procedure.
control | Control window handle. |
hwnd | The window handle of the message. |
msg | The ID number for the message. |
wparam | The wparam field of the message. |
lparam | The lparam field of the message. |
result | The return value of the message. |
handle | The handle on specific operating system data |
|
staticprotected |
Gets the default height and default width for the specified class name.
class_name | The name of the Windows class to derive the control from. |
class name | Width | Height |
---|---|---|
"button" | 75 | 25 |
"checkbox" | 104 | 25 |
"checkedlistbox" | 120 | 90 |
"choice" | 130 | 25 |
"collapsiblepanel" | 0 | 0 |
"colorpicker" | 104 | 25 |
"combobox" | 130 | 23 * |
"commandlinkbutton" | 200 | 60 |
"datetimepicker" | 104 | 25 ** |
"domainupdown" | 150 | 23 ** |
"fontpicker" | 104 | 25 |
"form" | 300 | 300 |
"groupbox" | 200 | 100 |
"label" | 100 | 23 |
"lightbutton" | 75 | 25 |
"listbox" | 120 | 96 |
"loadingindicator" | 32 | 32 |
"monthcalendar" | 240 | 162 |
"numericupdown" | 120 | 23 ** |
"panel" | 200 | 100 |
"picturebox" | 100 | 50 |
"popup_panel" | 100 | 150 |
"progressbar" | 100 | 23 |
"radiobutton" | 104 | 25 |
"scrollbar" | 17 | 17 |
"statusbar" | 100 | 23 |
"switchbutton" | 50 | 25 |
"tabcontrol" | 200 | 100 |
"tabpage" | 200 | 100 |
"textbox" | 100 | 23 |
"togglebutton" | 104 | 25 |
"toolbar" | 100 | 23 |
"trackbar" | 104 | 45 |
"updownbutton" | 18 *** | 34 |
"usercontrol" | 150 | 150 |
other | 0 | 0 |
** is 21 on "macos" environment *** is 34 on "gnome" environment **** is 71 on "gnome" environment
|
staticprotected |
Destroys context menu.
control | Control window handle to destroy. |
|
staticprotected |
Sets a value indicating whether this control should redraw its surface using a secondary buffer to reduce or prevent flicker.
control | Control window handle. |
value | true if the surface of the control should be drawn using double buffering; otherwise, false. |
|
staticprotected |
Gets a value indicating whether the control can respond to user interaction.
control | Control window handle. |
|
staticprotected |
Sets a value indicating whether the control can respond to user interaction.
control | Control window handle. |
enabled | true if the control can respond to user interaction; otherwise, false. |
|
staticprotected |
Sets input focus to the control.
control | Control window handle. |
|
staticprotected |
Gets a value indicating whether the control has input focus.
control | Control window handle. |
|
staticprotected |
Sets the foreground color of the control.
control | Control window handle. |
color | The foreground color of the control. |
|
staticprotected |
Sets the font of the text displayed by the control.
control | Control window handle. |
font | The xtd::drawing::font to apply to the text displayed by the control. |
Gets the native handle of the control.
control | Control window handle. |
|
staticprotected |
Invalidates the entire surface of the control and causes the control to be redrawn.
control | Control window handle. |
rect | A xtd::drawing::rectangle that represents the region to invalidate. |
invalidate_children | true to invalidate the control's child controls; otherwise, false. |
|
staticprotected |
Invalidates the entire surface of the control and causes the control to be redrawn.
control | Control window handle. |
region | A xtd::drawing::region that represents the region to invalidate. |
invalidate_children | true to invalidate the control's child controls; otherwise, false. |
|
staticprotected |
Executes the specified delegate, on the thread that owns the control's underlying window handle, with the specified list of arguments and mutex.
control | Control window handle. |
invoker | A delegate to a method that takes parameters of the same number and type that are contained in the args parameter. |
args | An array of objects to pass as arguments to the specified method. This parameter can be null if the method takes no arguments. |
invoked | A mutex for async invoke. |
|
staticprotected |
Gets the coordinates of the upper-left corner of the control relative to the upper-left corner of its container.
control | Control window handle. |
|
staticprotected |
Sets the coordinates of the upper-left corner of the control relative to the upper-left corner of its container.
control | Control window handle. |
location |
|
staticprotected |
Sets the maximum height and maximum width of the client area of the control.
control | Control window handle. |
size | The size that represents the height and width of the control in pixels. |
|
staticprotected |
Sets the maximum height and maximum width of the control.
control | Control window handle. |
size | The size that represents the height and width of the control in pixels. |
|
staticprotected |
Sets the minimum height and minimum width of the client area of the control.
control | Control window handle. |
size | The size that represents the height and width of the control in pixels. |
|
staticprotected |
Sets the minimum height and minimum width of the control.
control | Control window handle. |
size | The size that represents the height and width of the control in pixels. |
|
staticprotected |
Computes the location of the specified screen point into client coordinates.
control | Control window handle. |
p | The screen coordinate xtd::drawing::point to convert. |
|
staticprotected |
Computes the location of the specified client point into screen coordinates.
control | Control window handle. |
p | The client coordinate xtd::drawing::point to convert. |
|
staticprotected |
Register a specified wnd proc from the message pump of the control.
control | Control window handle. |
wnd_proc | A wnd proc delegate to register. |
|
staticprotected |
Resumes usual layout logic.
control | Control window handle. |
|
staticprotected |
Sets a value indicating whether control's elements are aligned to support locales using right-to-left fonts.
control | Control window handle. |
value | The 0, 1 or 2 value. |
value | state |
---|---|
0 | no |
1 | yes |
2 | inherit |
|
staticprotected |
Send a message with specified hwnd, message, wparam and lparam.
control | Control window handle. |
hwnd | The window handle of the message. |
msg | The ID number for the message. |
wparam | The WParam field of the message. |
lparam | The LParam field of the message. |
|
staticprotected |
Gets the height and width of the control.
control | Control window handle. |
|
staticprotected |
Sets the height and width of the control.
control | Control window handle. |
size | The size that represents the height and width of the control in pixels. |
|
staticprotected |
Temporarily suspends the layout logic for the control.
control | Control window handle. |
|
staticprotected |
Gets the text associated with this control.
control | Control window handle. |
|
staticprotected |
Sets the text associated with this control.
control | Control window handle. |
text | The text associated with this control. |
Gets the toolkit handle of the control.
control | Control window handle. |
|
staticprotected |
Unregister the wnd proc previously registered.
control | Control window handle. |
|
staticprotected |
Causes the control to redraw the invalidated regions within its client area.
control | Control window handle. |
|
staticprotected |
Gets a value indicating whether the control and all its child controls are displayed.
control | Control window handle. |
|
staticprotected |
Sets a value indicating whether the control and all its child controls are displayed.
control | Control window handle. |
visible | true if the control and all its child controls are displayed; otherwise, false. |
|
inlinestaticprotected |
Convert message identifiers to a string.
control | Control window handle. |
id | An int32 message id. |