xtd_c - Reference Guide 0.2.0
control.h
Go to the documentation of this file.
1 
6 #pragma once
7 #include <xtd_c/event_handler.h>
8 #include <xtd_c/object.h>
9 #include <xtd_c/drawing/color.h>
10 #include <xtd_c/drawing/image.h>
11 #include <xtd_c/drawing/font.h>
12 #include <xtd_c/drawing/point.h>
14 #include <xtd_c/drawing/size.h>
15 #include "anchor_styles.h"
16 #include "appearance.h"
17 #include "control_appearance.h"
18 #include "control_collection.h"
19 #include "cursor.h"
20 #include "dock_style.h"
21 #include "image_layout.h"
22 
53 };
54 
57 
58 #define XTD_FORMS_CONTROL_TYPE \
59  (xtd_forms_control())
60 
71 #define XTD_FORMS_CONTROL(object) \
72  (XTD_TYPE_CAST(object, XTD_FORMS_CONTROL_TYPE, xtd_forms_control))
73 
128 
137 
157 
182 xtd_forms_control* xtd_forms_control_reset_back_color();
204 
215 
227 
237 int32_t xtd_forms_control_get_bottom(const xtd_forms_control* control);
238 
258 
268 
286 
295 
316 
327 
347 
355  const char* xtd_forms_control_get_company_name(const xtd_forms_control* control);
356 
383 
406 
419 
429 
448 xtd_forms_control* xtd_forms_control_reset_cursor(xtd_forms_control* control);
459 
489 
507 
525 
534 
553 xtd_forms_control* xtd_forms_control_reset_font(xtd_forms_control* control);
574 xtd_forms_control* xtd_forms_control_reset_fore_color(xtd_forms_control* control);
585 intptr_t xtd_forms_control_get_handle(const xtd_forms_control* control);
586 
594 int32_t xtd_forms_control_get_height(const xtd_forms_control* control);
604 
613 
623 
631 int32_t xtd_forms_control_get_left(const xtd_forms_control* control);
641 
660 
689 
698 const char* xtd_forms_control_get_text(const xtd_forms_control* control);
707 size_t xtd_forms_control_get_text_s(xtd_forms_control* control, char* text, size_t size);
723 void xtd_forms_control_set_click_event(xtd_forms_control* control, xtd_event_handler e, xtd_handle user_data);
724 void xtd_forms_control_reset_click_event(xtd_forms_control* control);
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.
Definition: size.h:9
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.
Definition: cursor.h:15
xtd_drawing_color xtd_forms_control_get_back_color(const xtd_forms_control *control)
Gets the background color for the control.
xtd_forms_image_layout
Specifies the position of the image on the control.
Definition: image_layout.h:14
Contains event handler definitions.
Contains xtd_forms_appearance enum class.
int32_t xtd_forms_control_get_height(const xtd_forms_control *control)
Gets the height of the control.
xtd_drawing_font * xtd_forms_control_get_font(const xtd_forms_control *control)
Gets the font of the text displayed by the control.
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 cor...
xtd_drawing_rectangle xtd_forms_control_get_display_rectangle(xtd_forms_control *control)
Gets the rectangle that represents the display area of the control.
bool xtd_forms_control_get_can_raise_events(const xtd_forms_control *control)
Determines if events can be raised on 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 w...
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.
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 cor...
void(* xtd_event_handler)(xtd_object *sender, xtd_event_args e)
Represents the method that will handle an event that has no event data.
Definition: event_handler.h:18
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.
Contains cursor definitions.
xtd_forms_control * xtd_forms_control_set_parent(xtd_forms_control *control, xtd_forms_control *parent)
Sets the parent container of the specified control.
Contains point definitions.
xtd_forms_control * xtd_forms_control_set_fore_color(xtd_forms_control *control, xtd_drawing_color color)
Sets the foreground color of the control.
const char * xtd_forms_control_get_text(const xtd_forms_control *control)
Gets the text associated of the specified control.
bool xtd_forms_control_get_enabled(const xtd_forms_control *control)
Gets a value indicating whether the control can respond to user interaction.
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 w...
Definition: image.h:9
Contains xtd_forms_anchor_styles enum.
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.
xtd_forms_control * xtd_forms_control_get_parent(const xtd_forms_control *control)
Gets the parent container of the specified control.
bool xtd_forms_control_get_focused(const xtd_forms_control *control)
Gets a value indicating whether the control has input focus.
Represents an ARGB (alpha, red, green, blue) color.
Definition: color.h:58
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.
Contains xtd::forms::control_appearance enum class.
xtd_forms_control * xtd_forms_control_set_back_color(xtd_forms_control *control, xtd_drawing_color color)
Sets the background color for the control.
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.
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:...
Contains image definitions.
xtd_forms_control * xtd_forms_control_set_control_appearance(xtd_forms_control *control, xtd_forms_control_appearance value)
Sets control appearance.
bool xtd_forms_control_get_can_focus(const xtd_forms_control *control)
Gets a value indicating whether the control can receive focus.
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.
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 containe...
Contains image_layout enum class.
Definition: context_menu.h:15
Contains control_collection definitions.
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.
Contains rectangle definitions.
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).
Definition: rectangle.h:9
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.
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_forms_control * xtd_forms_control_reset_parent(xtd_forms_control *control)
Resets the parent container of the specified 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 re...
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.
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...
xtd_forms_control_appearance xtd_forms_control_get_control_appearance(const xtd_forms_control *control)
Gets control appearance.
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.
xtd_handle internal_handle
Internal handle.
Definition: control.h:52
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.
Contains size definitions.
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...
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.
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:...
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_create(void)
Initializes a new instance of the xtd_forms_control with default settings.
xtd_drawing_image * xtd_forms_control_get_background_image(const xtd_forms_control *control)
Gets the background image displayed in the control.
Contains color definitions.
intptr_t xtd_forms_control_get_handle(const xtd_forms_control *control)
Gets the window handle that the control is bound to.
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...
xtd_forms_control * xtd_forms_control_set_text(xtd_forms_control *control, const char *text)
Sets the text associated of specified control.
Definition: point.h:9
void xtd_forms_control_destroy(xtd_forms_control *value)
Destroy the instance of the specfied control.
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 re...
Contains object definitions.
xtd_forms_dock_style
Specifies the position and manner in which a control is docked.
Definition: dock_style.h:18
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.
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.
Contains xtd_forms_dock_style enum class.
Definition: font.h:9
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 w...
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_anchor_styles
Specifies how a control anchors to the edges of its container.
Definition: anchor_styles.h:16
xtd_drawing_rectangle xtd_forms_control_get_client_rectangle(xtd_forms_control *control)
Gets the rectangle that represents the client area of the control.
bool txd_forms_control_get_can_select(const xtd_forms_control *control)
Gets a value indicating whether the control can be selected.
Definition: control_collection.h:15
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 w...
xtd_drawing_color xtd_forms_control_get_fore_color(const xtd_forms_control *control)
Gets the foreground color of the control.
xtd_forms_control * xtd_forms_control_set_height(xtd_forms_control *control, int32_t height)
Sets the height of the control.
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.
Contains font definitions.
void * xtd_handle
Represent a pointer or a handle.
Definition: types.h:129
Defines the base class for controls, which are components with visual representation.
Definition: control.h:47
xtd_forms_control_appearance
Specifies the appearance of a control.
Definition: control_appearance.h:16