All Classes |Grouped Classes |Index

Class CL_Tab

Tab component. More...

Derived from:

public CL_GUIComponent

Derived by:

None

Group:

Components (GUI)

#include <ClanLib/gui.h>

Class Members:

Construction:

CL_Tab

Constructs a Tab.


Attributes:

get_page

Get page.

get_page_by_id

Get page by id.

get_current_page_index

Get Current page index.

get_current_page_id

Get Current page id.

get_preferred_size

Get Preferred size.

get_page_count

returns the number of pages in the tab.

get_named_item

Find the child CL_Tab with the specified component ID name.


Operations:

add_page

Create new tab page. By default the ID of the tab is 0.

show_page

Show a page by its index.

show_page_by_id

Show a page by its ID. In case of non-unique ID'sfirst matcl be s be shown. own.

remove_page

Remove a page by its index.

remove_page_by_id

Remove a page by its ID.

set_label

Set the label of the component specified by index.

set_label_by_id

Set the label of the component specified by index.


Attributes:

get_geometry

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

get_width

Returns the width of the drawable area of the component.

get_height

Returns the height of the drawable area of the component.

get_size

Returns the 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_clip_children

Returns true if the components children are clipped to the parent component when drawn.

get_focus_policy

Returns the focus policy of the component.

get_component_group_name

Returns the name of the component group, or an empty string if no group name has been set.

is_selected_in_group

Returns true if the component is the selected item in a group of components where FocusPolicy is focus_group.

get_blocks_default_action

Returns true if this component, when focused, blocks the default action of its parent dialog.

get_resources

Returns the resource manager for the GUI resources.

get_gui_manager

Returns the GUI manager owning this component.

get_theme

Returns the theme used by 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.

get_next_component_in_tree

Returns the next component in the component tree, or 'this',one found.ound.

get_previous_component_in_tree

Returns the previous component in the component tree, or 'this',one found.ound.

get_child_component_group

Returns a list of child components belonging to the specified group.

get_group_selected_component

Returns the selected item in a component group of which this component is a member.

get_named_item

Find child component with the specified component ID name.

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.

is_descendant_of

Checks if this component is a descendant of target component.

is_ancestor_of

Checks if this component is the ancestor of target 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.

is_active

Returns true if the component is active.

get_component_at

Return the component under 'point',vrt coordioordinordinates. tes.

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.

get_layout

Returns the layout manager set for this component. Check CL_GUILayout.is_null() if none set.

get_display_window

Returns the display window in which this component is hosted.

is_default

Returns true if this component will receive unhandled enter/return keypress messages.

is_cancel

Returns true if this component will receive unhandled escape keypress messages.

is_double_click_enabled

Returns true if this component will generate double click messages.

get_constant_repaint

Enabled whether the GUI will constantly repaint this component when there are no other messages to process.

get_css_layout

Gets the css layout.

get_css_element

Gets the css element for this component.

FocusPolicy

Focus policies.


Events:

func_render

void func_render(CL_GraphicContext &gcnst CL_Recmp;cli;clip_rect) ct)

func_process_message

void func_process_message(const CL_GUIMessage &mge)age)

func_close

bool func_close()

func_activated

bool func_activated()

func_deactivated

bool func_deactivated()

func_focus_lost

bool func_focus_lost()

func_focus_gained

bool func_focus_gained()

func_pointer_enter

bool func_pointer_enter()

func_pointer_exit

bool func_pointer_exit()

func_filter_message

Lets a component filter the messages intended for another component. Consumed messages will not reach the original target component.

func_input

bool func_input(const CL_InputEvent &input_event)

func_input_pressed

bool func_input_pressed(const CL_InputEvent &input_event)

func_input_released

bool func_input_released(const CL_InputEvent &input_event)

func_input_doubleclick

bool func_input_doubleclick(const CL_InputEvent &input_event)

func_input_pointer_moved

bool func_input_pointer_moved(const CL_InputEvent &input_event)

func_visibility_change

bool func_visibility_change()

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

void func_constrain_resize(CL_Rect &geryetry)

func_create_custom_component

Callback invoked when loading a custom component from XML.


Operations:

render

Renders the component and its children.

paint

Paints the component.

exec

Run component in modal mode.

exit_with_code

Break message pump.

set_geometry

Set component position and size.

set_window_geometry

Set component window position and size.

set_type_name

Sets the component type name. (csstype.cssclass::cssid)

set_class_name

Sets the component class name. (csstype.cssclass::cssid)

set_id_name

Sets the component ID name. (csstype.cssclass::cssid)

set_enabled

Sets the component as enabled or disabled.

set_clip_children

Sets the components children to be clipped to the parent component when drawn.

set_visible

Sets the component as visible or hidden.

set_focus

Set this component focus.

capture_mouse

Make all mouse messages be redirected to this component.

capture_proximity

Make tablet proximity messages be redirected to this component.

set_focus_policy

Sets the focus policy of the component.

set_double_click_enabled

Modifies whether this component will generate double click messages or not.

set_component_group_name

Set group name.

set_selected_in_component_group

Set to true if this component is the selected item in a group of components where FocusPolicy is focus_group.

create_components

Create child components from a GUI definition file.

request_repaint

set_cliprect

Set a clipping rectangle.

reset_cliprect

Reset the clipping rectangle.

push_cliprect

Push a clipping rectangle.

pop_cliprect

Pop a clipping rectangle.

delete_child_components

Deletes all child components.

set_parent_component

Makes this component a child of the given component, removing it from the previous parent.

set_layout

Set a layout on the component.

set_cursor

Sets the current cursor icon.

focus_next

Set focus to the next component in tab order.

focus_previous

Set focus to the previous component in tab order.

set_default

When set to true, this component will receive unhandled enter/return keypress messages.

set_cancel

When set to true, this component will receive unhandled escape keypress messages.

set_blocks_default_action

Set to true if this component, when focused, blocks the default action of the parent dialog.

set_constant_repaint

Enabled whether the GUI will constantly repaint this component when there are no other messages to process.

load_css_layout

Loads a layout from file.