Defines the base class for controls, which are components with visual representation.
Data Structures | |
struct | xtd_forms_control |
Defines the base class for controls, which are components with visual representation. More... | |
Converter | |
#define | XTD_FORMS_CONTROL(object) (XTD_TYPE_CAST(object, XTD_FORMS_CONTROL_TYPE, xtd_forms_control)) |
Convert an xtd object to control object. More... | |
Creation/Destruction | |
xtd_forms_control * | xtd_forms_control_create (void) |
Initializes a new instance of the xtd_forms_control with default settings. More... | |
void | xtd_forms_control_destroy (xtd_forms_control *value) |
Destroy the instance of the specfied control. More... | |
Properties | |
xtd_forms_anchor_styles | xtd_forms_control_get_anchor (const xtd_forms_control *control) |
Gets the edges of the container to which a control is bound and determines how a control is resized with its parent. More... | |
xtd_forms_control * | xtd_forms_control_set_anchor (xtd_forms_control *control, xtd_forms_anchor_styles anchor) |
Gets the edges of the container to which a control is bound and determines how a control is resized with its parent. More... | |
xtd_drawing_point | xtd_forms_control_get_auto_scroll_point (const xtd_forms_control *control) |
Gets where this control is scrolled to in scroll_control_into_view(control). More... | |
bool | xtd_forms_control_get_auto_size (const xtd_forms_control *control) |
Gets a value that indicates whether the control resizes based on its contents. More... | |
xtd_forms_control * | xtd_forms_control_set_auto_size (xtd_forms_control *control, bool auto_size) |
Sets a value that indicates whether the control resizes based on its contents. More... | |
xtd_drawing_color | xtd_forms_control_get_back_color (const xtd_forms_control *control) |
Gets the background color for the control. More... | |
xtd_forms_control * | xtd_forms_control_set_back_color (xtd_forms_control *control, xtd_drawing_color color) |
Sets the background color for the control. More... | |
xtd_drawing_image * | xtd_forms_control_get_background_image (const xtd_forms_control *control) |
Gets the background image displayed in the control. More... | |
xtd_forms_control * | xtd_forms_control_set_background_image (xtd_forms_control *control, const xtd_drawing_image *background_image) |
Sets the background image displayed in the control. More... | |
xtd_forms_image_layout | xtd_forms_control_get_background_image_layout (const xtd_forms_control *control) |
Gets the background image layout as defined in the xtd_forms::image_layout enumeration. More... | |
xtd_forms_control * | xtd_forms_control_set_background_image_layout (xtd_forms_control *control, xtd_forms_image_layout background_image_layout) |
Sets the background image layout as defined in the xtd_forms::image_layout enumeration. More... | |
int32_t | xtd_forms_control_get_bottom (const xtd_forms_control *control) |
Gets the distance, in pixels, between the bottom edge of the control and the top edge of its container's client area. More... | |
xtd_drawing_rectangle | xtd_forms_control_get_bounds (const xtd_forms_control *control) |
Gets the size and location of the control including its nonclient elements, in pixels, relative to the parent control. More... | |
xtd_forms_control * | xtd_forms_control_set_bounds (xtd_forms_control *control, xtd_drawing_rectangle bounds) |
Sets the size and location of the control including its nonclient elements, in pixels, relative to the parent control. More... | |
bool | xtd_forms_control_get_can_focus (const xtd_forms_control *control) |
Gets a value indicating whether the control can receive focus. More... | |
bool | txd_forms_control_get_can_select (const xtd_forms_control *control) |
Gets a value indicating whether the control can be selected. More... | |
bool | xtd_forms_control_get_can_raise_events (const xtd_forms_control *control) |
Determines if events can be raised on the control. More... | |
bool | xtd_forms_control_get_check_for_illegal_cross_thread_calls () |
Gets a value indicating whether to catch calls on the wrong thread that access a xtd_forms::contrtol::handle property when an application is being debugged. More... | |
void | xtd_forms_control_set_check_for_illegal_cross_thread_calls (bool value) |
Sets a value indicating whether to catch calls on the wrong thread that access a xtd_forms::contrtol::handle property when an application is being debugged. More... | |
xtd_drawing_rectangle | xtd_forms_control_get_client_rectangle (xtd_forms_control *control) |
Gets the rectangle that represents the client area of the control. More... | |
xtd_drawing_size * | xtd_forms_control_get_client_size (const xtd_forms_control *control) |
Gets the height and width of the client area of the control. More... | |
xtd_forms_control * | xtd_forms_control_set_client_size (xtd_forms_control *control, xtd_drawing_size client_size) |
Sets the height and width of the client area of the control. More... | |
const char * | xtd_forms_control_get_company_name (const xtd_forms_control *control) |
Gets the name of the company or creator of the application containing the control. More... | |
xtd_forms_context_menu * | xtd_forms_control_get_context_menu (const xtd_forms_control *control) |
Gets the xtd_forms::context_menu that is displayed in the control. More... | |
xtd_forms_control * | xtd_forms_control_set_context_menu (xtd_forms_control *control, xtd_forms_context_menu *value) |
Sets the xtd_forms::context_menu that is displayed in the control. More... | |
xtd_forms_control * | xtd_forms_control_reset_context_menu (xtd_forms_control *control) |
Sets the xtd_forms::context_menu that is displayed in the control. More... | |
xtd_forms_control_appearance | xtd_forms_control_get_control_appearance (const xtd_forms_control *control) |
Gets control appearance. More... | |
xtd_forms_control * | xtd_forms_control_set_control_appearance (xtd_forms_control *control, xtd_forms_control_appearance value) |
Sets control appearance. More... | |
xtd_forms_control_collection * | xtd_forms_control_get_controls (xtd_forms_control *control) |
Gets the collection of controls contained within the control. More... | |
bool | xtd_forms_control_get_created (const xtd_forms_control *control) |
Gets a value indicating whether the control has been created. More... | |
xtd_forms_cursor * | xtd_forms_control_get_cursor (const xtd_forms_control *control) |
Gets the cursor that is displayed when the mouse pointer is over the control. More... | |
xtd_forms_control * | xtd_forms_control_set_cursor (xtd_forms_control *control, xtd_forms_cursor *cursor) |
Sets the cursor that is displayed when the mouse pointer is over the control. More... | |
xtd_drawing_rectangle | xtd_forms_control_get_display_rectangle (xtd_forms_control *control) |
Gets the rectangle that represents the display area of the control. More... | |
xtd_forms_dock_style | xtd_forms_control_get_dock (const xtd_forms_control *control) |
Gets which control borders are docked to its parent control and determines how a control is resized with its parent. More... | |
xtd_forms_control * | xtd_forms_control_set_dock (xtd_forms_control *control, xtd_forms_dock_style dock) |
Sets which control borders are docked to its parent control and determines how a control is resized with its parent. More... | |
bool | xtd_forms_control_get_double_buffered (const xtd_forms_control *control) |
Gets a value indicating whether this control should redraw its surface using a secondary buffer to reduce or prevent flicker. More... | |
xtd_forms_control * | xtd_forms_control_gset_double_buffered (xtd_forms_control *control, bool double_buffered) |
Sets a value indicating whether this control should redraw its surface using a secondary buffer to reduce or prevent flicker. More... | |
bool | xtd_forms_control_get_enabled (const xtd_forms_control *control) |
Gets a value indicating whether the control can respond to user interaction. More... | |
xtd_forms_control * | xtd_forms_control_set_enabled (xtd_forms_control *control, bool enabled) |
Sets a value indicating whether the control can respond to user interaction. More... | |
bool | xtd_forms_control_get_focused (const xtd_forms_control *control) |
Gets a value indicating whether the control has input focus. More... | |
xtd_drawing_font * | xtd_forms_control_get_font (const xtd_forms_control *control) |
Gets the font of the text displayed by the control. More... | |
xtd_forms_control * | xtd_forms_control_set_font (xtd_forms_control *control, xtd_drawing_font *font) |
Sets the font of the text displayed by the control. More... | |
xtd_drawing_color | xtd_forms_control_get_fore_color (const xtd_forms_control *control) |
Gets the foreground color of the control. More... | |
xtd_forms_control * | xtd_forms_control_set_fore_color (xtd_forms_control *control, xtd_drawing_color color) |
Sets the foreground color of the control. More... | |
intptr_t | xtd_forms_control_get_handle (const xtd_forms_control *control) |
Gets the window handle that the control is bound to. More... | |
int32_t | xtd_forms_control_get_height (const xtd_forms_control *control) |
Gets the height of the control. More... | |
xtd_forms_control * | xtd_forms_control_set_height (xtd_forms_control *control, int32_t height) |
Sets the height of the control. More... | |
bool | xtd_forms_control_get_invoke_required (const xtd_forms_control *control) |
Gets a value indicating whether the caller must call an invoke method when making method calls to the control because the caller is on a different thread than the one the control was created on. More... | |
bool | xtd_forms_control_is_handle_created (const xtd_forms_control *control) |
Gets a value indicating whether the control has a handle associated with it. More... | |
int32_t | xtd_forms_control_get_left (const xtd_forms_control *control) |
Gets the distance, in pixels, between the left edge of the control and the left edge of its container's client area. More... | |
xtd_forms_control * | xtd_forms_control_set_left (xtd_forms_control *control, int32_t left) |
Sets the distance, in pixels, between the left edge of the control and the left edge of its container's client area. More... | |
xtd_drawing_point | xtd_forms_control_get_location (const xtd_forms_control *control) |
Gets the coordinates of the upper-left corner of the specified control relative to the upper-left corner of its container. More... | |
xtd_forms_control * | xtd_forms_control_set_location (xtd_forms_control *control, xtd_drawing_point point) |
Sets the coordinates of the upper-left corner of the specified control relative to the upper-left corner of its container. More... | |
xtd_forms_control * | xtd_forms_control_get_parent (const xtd_forms_control *control) |
Gets the parent container of the specified control. More... | |
xtd_forms_control * | xtd_forms_control_set_parent (xtd_forms_control *control, xtd_forms_control *parent) |
Sets the parent container of the specified control. More... | |
xtd_forms_control * | xtd_forms_control_reset_parent (xtd_forms_control *control) |
Resets the parent container of the specified control. More... | |
const char * | xtd_forms_control_get_text (const xtd_forms_control *control) |
Gets the text associated of the specified control. More... | |
size_t | xtd_forms_control_get_text_s (xtd_forms_control *control, char *text, size_t size) |
Gets the text associated of the specified control. More... | |
xtd_forms_control * | xtd_forms_control_set_text (xtd_forms_control *control, const char *text) |
Sets the text associated of specified control. More... | |
#define XTD_FORMS_CONTROL | ( | object | ) | (XTD_TYPE_CAST(object, XTD_FORMS_CONTROL_TYPE, xtd_forms_control)) |
Convert an xtd object to control object.
bool txd_forms_control_get_can_select | ( | const xtd_forms_control * | control | ) |
Gets a value indicating whether the control can be selected.
xtd_forms_control* xtd_forms_control_create | ( | void | ) |
Initializes a new instance of the xtd_forms_control with default settings.
void xtd_forms_control_destroy | ( | xtd_forms_control * | value | ) |
Destroy the instance of the specfied control.
value | The control to delete. |
xtd_forms_anchor_styles xtd_forms_control_get_anchor | ( | const xtd_forms_control * | control | ) |
Gets the edges of the container to which a control is bound and determines how a control is resized with its parent.
xtd_drawing_point xtd_forms_control_get_auto_scroll_point | ( | const xtd_forms_control * | control | ) |
Gets where this control is scrolled to in scroll_control_into_view(control).
bool xtd_forms_control_get_auto_size | ( | const xtd_forms_control * | control | ) |
Gets a value that indicates whether the control resizes based on its contents.
xtd_drawing_color xtd_forms_control_get_back_color | ( | const xtd_forms_control * | control | ) |
Gets the background color for the control.
xtd_drawing_image* xtd_forms_control_get_background_image | ( | const xtd_forms_control * | control | ) |
Gets the background image displayed in the control.
xtd_forms_image_layout xtd_forms_control_get_background_image_layout | ( | const xtd_forms_control * | control | ) |
Gets the background image layout as defined in the xtd_forms::image_layout enumeration.
int32_t xtd_forms_control_get_bottom | ( | const xtd_forms_control * | control | ) |
Gets the distance, in pixels, between the bottom edge of the control and the top edge of its container's client area.
xtd_drawing_rectangle xtd_forms_control_get_bounds | ( | const xtd_forms_control * | control | ) |
Gets the size and location of the control including its nonclient elements, in pixels, relative to the parent control.
bool xtd_forms_control_get_can_focus | ( | const xtd_forms_control * | control | ) |
Gets a value indicating whether the control can receive focus.
bool xtd_forms_control_get_can_raise_events | ( | const xtd_forms_control * | control | ) |
Determines if events can be raised on the control.
bool xtd_forms_control_get_check_for_illegal_cross_thread_calls | ( | ) |
Gets a value indicating whether to catch calls on the wrong thread that access a xtd_forms::contrtol::handle property when an application is being debugged.
xtd_drawing_rectangle xtd_forms_control_get_client_rectangle | ( | xtd_forms_control * | control | ) |
Gets the rectangle that represents the client area of the control.
xtd_drawing_size* xtd_forms_control_get_client_size | ( | const xtd_forms_control * | control | ) |
Gets the height and width of the client area of the control.
const char* xtd_forms_control_get_company_name | ( | const xtd_forms_control * | control | ) |
Gets the name of the company or creator of the application containing the control.
xtd_forms_context_menu* xtd_forms_control_get_context_menu | ( | const xtd_forms_control * | control | ) |
Gets the xtd_forms::context_menu that is displayed in the control.
xtd_forms_control_appearance xtd_forms_control_get_control_appearance | ( | const xtd_forms_control * | control | ) |
Gets control appearance.
The control appearance determine how the control is drawed : xtd_control::control_appearance::standard : The appearance of the control is determined by current theme of xtd. xtd_control::control_appearance::system : The appearance of the control is determined by the user's operating system.
xtd_forms_control_collection* xtd_forms_control_get_controls | ( | xtd_forms_control * | control | ) |
Gets the collection of controls contained within the control.
bool xtd_forms_control_get_created | ( | const xtd_forms_control * | control | ) |
Gets a value indicating whether the control has been created.
xtd_forms_cursor* xtd_forms_control_get_cursor | ( | const xtd_forms_control * | control | ) |
Gets the cursor that is displayed when the mouse pointer is over the control.
xtd_drawing_rectangle xtd_forms_control_get_display_rectangle | ( | xtd_forms_control * | control | ) |
Gets the rectangle that represents the display area of the control.
xtd_forms_dock_style xtd_forms_control_get_dock | ( | const xtd_forms_control * | control | ) |
Gets which control borders are docked to its parent control and determines how a control is resized with its parent.
bool xtd_forms_control_get_double_buffered | ( | const xtd_forms_control * | control | ) |
Gets a value indicating whether this control should redraw its surface using a secondary buffer to reduce or prevent flicker.
bool xtd_forms_control_get_enabled | ( | const xtd_forms_control * | control | ) |
Gets a value indicating whether the control can respond to user interaction.
bool xtd_forms_control_get_focused | ( | const xtd_forms_control * | control | ) |
Gets a value indicating whether the control has input focus.
xtd_drawing_font* xtd_forms_control_get_font | ( | const xtd_forms_control * | control | ) |
Gets the font of the text displayed by the control.
xtd_drawing_color xtd_forms_control_get_fore_color | ( | const xtd_forms_control * | control | ) |
Gets the foreground color of the control.
intptr_t xtd_forms_control_get_handle | ( | const xtd_forms_control * | control | ) |
Gets the window handle that the control is bound to.
int32_t xtd_forms_control_get_height | ( | const xtd_forms_control * | control | ) |
Gets the height of the control.
bool xtd_forms_control_get_invoke_required | ( | const xtd_forms_control * | control | ) |
Gets a value indicating whether the caller must call an invoke method when making method calls to the control because the caller is on a different thread than the one the control was created on.
int32_t xtd_forms_control_get_left | ( | const xtd_forms_control * | control | ) |
Gets the distance, in pixels, between the left edge of the control and the left edge of its container's client area.
xtd_drawing_point xtd_forms_control_get_location | ( | const xtd_forms_control * | control | ) |
Gets the coordinates of the upper-left corner of the specified control relative to the upper-left corner of its container.
control | The control. |
xtd_forms_control* xtd_forms_control_get_parent | ( | const xtd_forms_control * | control | ) |
Gets the parent container of the specified control.
control | The control. |
const char* xtd_forms_control_get_text | ( | const xtd_forms_control * | control | ) |
Gets the text associated of the specified control.
control | The control. |
size_t xtd_forms_control_get_text_s | ( | xtd_forms_control * | control, |
char * | text, | ||
size_t | size | ||
) |
Gets the text associated of the specified control.
control | The control. |
xtd_forms_control* xtd_forms_control_gset_double_buffered | ( | xtd_forms_control * | control, |
bool | double_buffered | ||
) |
Sets a value indicating whether this control should redraw its surface using a secondary buffer to reduce or prevent flicker.
double_buffered | true if the surface of the control should be drawn using double buffering; otherwise, false. |
bool xtd_forms_control_is_handle_created | ( | const xtd_forms_control * | control | ) |
Gets a value indicating whether the control has a handle associated with it.
xtd_forms_control* xtd_forms_control_reset_context_menu | ( | xtd_forms_control * | control | ) |
Sets the xtd_forms::context_menu that is displayed in the control.
value | A xtd_forms::context_menu that represents the context menu to display in the control. |
xtd_forms_control* xtd_forms_control_reset_parent | ( | xtd_forms_control * | control | ) |
Resets the parent container of the specified control.
control | The control. |
xtd_forms_control* xtd_forms_control_set_anchor | ( | xtd_forms_control * | control, |
xtd_forms_anchor_styles | anchor | ||
) |
Gets the edges of the container to which a control is bound and determines how a control is resized with its parent.
anchor | A bitwise combination of the xtd_forms::anchor_styles values. The default is xtd_forms::anchor_styles::top and xtd_forms::anchor_styles::left. |
xtd_forms_control* xtd_forms_control_set_auto_size | ( | xtd_forms_control * | control, |
bool | auto_size | ||
) |
Sets a value that indicates whether the control resizes based on its contents.
auto_size | true if enabled; otherwise, false. |
xtd_forms_control* xtd_forms_control_set_back_color | ( | xtd_forms_control * | control, |
xtd_drawing_color | color | ||
) |
Sets the background color for the control.
color | A xtd_xtd_drawing_color that represents the background color of the control. The default is the value of the xtd_forms::control::default_back_color property. |
xtd_forms_control* xtd_forms_control_set_background_image | ( | xtd_forms_control * | control, |
const xtd_drawing_image * | background_image | ||
) |
Sets the background image displayed in the control.
background_image | An xtd_xtd_drawing_image that represents the image to display in the background of the control. |
xtd_forms_control* xtd_forms_control_set_background_image_layout | ( | xtd_forms_control * | control, |
xtd_forms_image_layout | background_image_layout | ||
) |
Sets the background image layout as defined in the xtd_forms::image_layout enumeration.
background_image_layout | One of the values of xtd_forms::image_layout (center , none, stretch, tile, or zoom). tile is the default value. |
xtd_forms_control* xtd_forms_control_set_bounds | ( | xtd_forms_control * | control, |
xtd_drawing_rectangle | bounds | ||
) |
Sets the size and location of the control including its nonclient elements, in pixels, relative to the parent control.
bounds | A rectangle in pixels relative to the parent control that represents the size and location of the control including its nonclient elements. |
void xtd_forms_control_set_check_for_illegal_cross_thread_calls | ( | bool | value | ) |
Sets a value indicating whether to catch calls on the wrong thread that access a xtd_forms::contrtol::handle property when an application is being debugged.
value | true if calls on the wrong thread are caught; otherwise, false. |
xtd_forms_control* xtd_forms_control_set_client_size | ( | xtd_forms_control * | control, |
xtd_drawing_size | client_size | ||
) |
Sets the height and width of the client area of the control.
client_size | A size that represents the dimensions of the client area of the control. |
xtd_forms_control* xtd_forms_control_set_context_menu | ( | xtd_forms_control * | control, |
xtd_forms_context_menu * | value | ||
) |
Sets the xtd_forms::context_menu that is displayed in the control.
value | A xtd_forms::context_menu that represents the context menu to display in the control. |
xtd_forms_control* xtd_forms_control_set_control_appearance | ( | xtd_forms_control * | control, |
xtd_forms_control_appearance | value | ||
) |
Sets control appearance.
value | One of xtd_forms::control_appearance values. THe default is xtd_forms::control_appearance::standard. |
The control appearance determine how the control is drawed : xtd_control::control_appearance::standard : The appearance of the control is determined by current theme of xtd. xtd_control::control_appearance::system : The appearance of the control is determined by the user's operating system.
xtd_forms_control* xtd_forms_control_set_cursor | ( | xtd_forms_control * | control, |
xtd_forms_cursor * | cursor | ||
) |
Sets the cursor that is displayed when the mouse pointer is over the control.
cursor | A xtd_forms::cursor that represents the cursor to display when the mouse pointer is over the control. |
xtd_forms_control* xtd_forms_control_set_dock | ( | xtd_forms_control * | control, |
xtd_forms_dock_style | dock | ||
) |
Sets which control borders are docked to its parent control and determines how a control is resized with its parent.
dock | One of the td::forms::dock_style values. The default is xtd_forms::dock_style::none. |
xtd_forms_control* xtd_forms_control_set_enabled | ( | xtd_forms_control * | control, |
bool | enabled | ||
) |
Sets a value indicating whether the control can respond to user interaction.
enabled | true if the control can respond to user interaction; otherwise, false. The default is true. |
xtd_forms_control* xtd_forms_control_set_font | ( | xtd_forms_control * | control, |
xtd_drawing_font * | font | ||
) |
Sets the font of the text displayed by the control.
font | The font to apply to the text displayed by the control. The default is the value of the default_font property. |
xtd_forms_control* xtd_forms_control_set_fore_color | ( | xtd_forms_control * | control, |
xtd_drawing_color | color | ||
) |
Sets the foreground color of the control.
color | The foreground color of the control. The default is the value of the default_fore_color property. |
xtd_forms_control* xtd_forms_control_set_height | ( | xtd_forms_control * | control, |
int32_t | height | ||
) |
Sets the height of the control.
height | The height of the control in pixels. |
xtd_forms_control* xtd_forms_control_set_left | ( | xtd_forms_control * | control, |
int32_t | left | ||
) |
Sets the distance, in pixels, between the left edge of the control and the left edge of its container's client area.
left | An int32_t representing the distance, in pixels, between the left edge of the control and the left edge of its container's client area. |
xtd_forms_control* xtd_forms_control_set_location | ( | xtd_forms_control * | control, |
xtd_drawing_point | point | ||
) |
Sets the coordinates of the upper-left corner of the specified control relative to the upper-left corner of its container.
control | The control. |
location | The point that represents the upper-left corner of the control relative to the upper-left corner of its container. |
xtd_forms_control* xtd_forms_control_set_parent | ( | xtd_forms_control * | control, |
xtd_forms_control * | parent | ||
) |
Sets the parent container of the specified control.
control | The control. |
parent | A control that represents the parent or container control of the control or nullptr for none. |
xtd_forms_control* xtd_forms_control_set_text | ( | xtd_forms_control * | control, |
const char * | text | ||
) |
Sets the text associated of specified control.
control | The control. |
text | The text associated with this control. |