Home |All Classes |Grouped Classes |Index |Search

Class CL_GUIComponent

GUI base component class. More...

Derived from:

public CL_ComponentParent

Derived by:

CL_CheckBox, CL_ComboBox, CL_Frame, CL_GroupBox, CL_Label, CL_LineEdit, CL_ListView, CL_ListViewHeader, CL_MainWindow, CL_MenuBar, CL_ProgressBar, CL_PushButton, CL_RadioButton, CL_ScrollBar, CL_Slider, CL_Spin, CL_StatusBar, CL_Tab, CL_TextEdit, CL_ToolBar, CL_ToolTip, CL_Window

Group:

System (GUI)

#include <ClanLib/gui.h>

Class Members:

Attributes:

FocusPolicy

Focus policies.

get_geometry

Returns the position and size of the drawable area of the component.

get_window_geometry

Returns the position and size of the component window (window frame, borders etc).

get_type_name

Returns the component type name.

get_class_name

Returns the component class name.

get_id_name

Returns the component ID name.

get_element_name

Returns the CSS element name for the component.

has_focus

Returns true if the component has the focus.

get_allow_resize

Returns true if the components size can be changed.

get_focus_policy

Returns the focus policy of the component.

get_gui_manager

Returns the GUI manager owning this component.

get_parent_component

Returns the parent component.

get_owner_component

Return the component owning this component.

get_child_components

Returns a list of the child components.

get_first_child

Returns the first child component.

get_last_child

Returns the last child component.

has_child_components

Returns true if the component has any child components.

get_previous_sibling

Returns the previous sibling component.

get_next_sibling

Returns the next sibling component.

get_top_level_component

Returns the top level component this CL_GUIComponent is a child of.

get_gc

Return the graphic context for the component.

get_ic

Return the input context for the component.

is_enabled

Return true if the component, and all its parents are enabled.

is_visible

Return true if the component, and all its parents are visible.

get_component_at

Return the component under 'point', in window coordinates.

get_preferred_size

Returns the preferred size of a render box.

get_preferred_width

Returns the preferred width of a render box.

get_preferred_height

Returns the preferred height of a render box.

window_to_component_coords

Convert the top-level window client coordinates to component coordinates.

component_to_window_coords

Convert the component coordinates to top-level window client coordinates.

screen_to_component_coords

Convert the screen coordinates to component coordinates.

component_to_screen_coords

Convert the component coordinates to screen coordinates.


Construction:

CL_GUIComponent

Creates a GUI component.


Events:

func_render

void func_render(CL_GraphicContext &gc, const CL_Rect &clip_rect)

func_process_message

void func_process_message(const CL_GUIMessage &message)

func_style_changed

void func_style_changed()

func_enablemode_changed

void func_enablemode_changed()

func_resized

Callback invoked when the component is resized, i.e. when set_geometry is called.

func_constrain_resize


Operations:

render

Renders the component and its children.

paint

Paints the component.

exec

Run component in modal mode.

exit_with_code

Break message pump.

post_message

Post GUI message onto the message queue.

send_message

Send GUI message directly to the target.

set_geometry

Set component position and size.

set_window_geometry

Set component window position and size.

set_type_name

Sets the component type name.

set_class_name

Sets the component class name.

set_id_name

Sets the component ID name.

set_enabled

Sets the component as enabled or disabled.

set_visible

Sets the component as visible or hidden.

set_focus

Give this component focus.

capture_mouse

Make all mouse messages be redirected to this component.

set_focus_policy

Sets the focus policy of the component.

named_item

Find child component with the specified component ID name.

create_components

Create child components from a GUI definition file.

invalidate_rect

create_timer

set_cliprect

Set a clipping rectangle.

reset_cliprect

Reset the clipping rectangle.