#include <listview.h>
Inheritance diagram for CL_ListView:

Attributes | |
| enum | FocusPolicy { focus_refuse, focus_local, focus_group, focus_parent } |
| Focus policies. More... | |
| CL_Rect | get_geometry () const |
| Returns the position and size of the drawable area of the component. | |
| int | get_width () const |
| Returns the width of the drawable area of the component. | |
| int | get_height () const |
| Returns the height of the drawable area of the component. | |
| CL_Size | get_size () const |
| Returns the size of the drawable area of the component. | |
| CL_Rect | get_window_geometry () const |
| Returns the position and size of the component window (window frame, borders etc). | |
| CL_StringRef | get_type_name () const |
| Returns the component type name. | |
| CL_StringRef | get_class_name () const |
| Returns the component class name. | |
| CL_StringRef | get_id_name () const |
| Returns the component ID name. | |
| CL_StringRef | get_element_name () const |
| Returns the CSS element name for the component. | |
| bool | has_focus () const |
| Returns true if the component has the focus. | |
| bool | get_allow_resize () const |
| Returns true if the components size can be changed. | |
| bool | get_clip_children () const |
| Returns true if the components children are clipped to the parent component when drawn. | |
| FocusPolicy | get_focus_policy () const |
| Returns the focus policy of the component. | |
| CL_StringRef | get_component_group_name () const |
| Returns the name of the component group, or an empty string if no group name has been set. | |
| bool | is_selected_in_group () const |
| Returns true if the component is the selected item in a group of components where FocusPolicy is focus_group. | |
| bool | get_blocks_default_action () const |
| Returns true if this component, when focused, blocks the default action of its parent dialog. | |
| CL_ResourceManager | get_resources () const |
| Returns the resource manager for the GUI resources. | |
| CL_GUIManager | get_gui_manager () const |
| Returns the GUI manager owning this component. | |
| CL_GUITheme | get_theme () const |
| Returns the theme used by this component. | |
| const CL_GUIComponent * | get_parent_component () const |
| Returns the parent component. | |
| CL_GUIComponent * | get_parent_component () |
| Get Parent component. | |
| const CL_GUIComponent * | get_owner_component () const |
| Return the component owning this component. | |
| CL_GUIComponent * | get_owner_component () |
| Get Owner component. | |
| std::vector< CL_GUIComponent * > | get_child_components () const |
| Returns a list of the child components. | |
| const CL_GUIComponent * | get_first_child () const |
| Returns the first child component. | |
| CL_GUIComponent * | get_first_child () |
| Get First child. | |
| const CL_GUIComponent * | get_last_child () const |
| Returns the last child component. | |
| CL_GUIComponent * | get_last_child () |
| Get Last child. | |
| CL_GUIComponent * | get_next_component_in_tree () |
| Returns the next component in the component tree, or 'this', if none found. | |
| CL_GUIComponent * | get_previous_component_in_tree () |
| Returns the previous component in the component tree, or 'this', if none found. | |
| std::vector< CL_GUIComponent * > | get_child_component_group (const CL_String &group_name) const |
| Returns a list of child components belonging to the specified group. | |
| CL_GUIComponent * | get_group_selected_component () |
| Returns the selected item in a component group of which this component is a member. | |
| CL_GUIComponent * | get_named_item (const CL_StringRef &id) |
| Find child component with the specified component ID name. | |
| bool | has_child_components () const |
| Returns true if the component has any child components. | |
| const CL_GUIComponent * | get_previous_sibling () const |
| Returns the previous sibling component. | |
| CL_GUIComponent * | get_previous_sibling () |
| Get Previous sibling. | |
| const CL_GUIComponent * | get_next_sibling () const |
| Returns the next sibling component. | |
| CL_GUIComponent * | get_next_sibling () |
| Get Next sibling. | |
| bool | is_descendant_of (CL_GUIComponent *component) |
| Checks if this component is a descendant of target component. | |
| bool | is_ancestor_of (CL_GUIComponent *component) |
| Checks if this component is the ancestor of target component. | |
| const CL_GUIComponent * | get_top_level_component () const |
| Returns the top level component this CL_GUIComponent is a child of. | |
| CL_GUIComponent * | get_top_level_component () |
| Get Top level component. | |
| CL_GraphicContext & | get_gc () |
| Return the graphic context for the component. | |
| CL_InputContext & | get_ic () |
| Return the input context for the component. | |
| bool | is_enabled () const |
| Return true if the component, and all its parents are enabled. | |
| bool | is_visible () const |
| Return true if the component, and all its parents are visible. | |
| bool | is_active () const |
| Returns true if the component is active. | |
| CL_GUIComponent * | get_component_at (const CL_Point &point) |
| Return the component under 'point', in local viewport coordinates. | |
| int | get_preferred_width () const |
| Returns the preferred width of a render box. | |
| int | get_preferred_height () const |
| Returns the preferred height of a render box. | |
| CL_Point | window_to_component_coords (const CL_Point &window_point) const |
| Convert the top-level window client coordinates to component coordinates. | |
| CL_Rect | window_to_component_coords (const CL_Rect &window_rect) const |
| Convert the top-level window client coordinates to component coordinates. | |
| CL_Point | component_to_window_coords (const CL_Point &component_point) const |
| Convert the component coordinates to top-level window client coordinates. | |
| CL_Rect | component_to_window_coords (const CL_Rect &component_rect) const |
| Convert the component coordinates to top-level window client coordinates. | |
| CL_Point | screen_to_component_coords (const CL_Point &screen_point) const |
| Convert the screen coordinates to component coordinates. | |
| CL_Point | component_to_screen_coords (const CL_Point &component_point) const |
| Convert the component coordinates to screen coordinates. | |
| CL_GUILayout | get_layout () const |
| Returns the layout manager set for this component. Check CL_GUILayout.is_null() if none set. | |
| CL_DisplayWindow | get_display_window () const |
| Returns the display window in which this component is hosted. | |
| bool | is_default () |
| Returns true if this component will receive unhandled enter/return keypress messages. | |
| bool | is_cancel () |
| Returns true if this component will receive unhandled escape keypress messages. | |
| bool | get_constant_repaint () const |
| Enabled whether the GUI will constantly repaint this component when there are no other messages to process. | |
Implementation | |
| class | CL_ListViewRenderer |
Public Member Functions | |
Construction | |
| CL_ListView (CL_GUIComponent *parent) | |
| Constructs a ListView. | |
| virtual | ~CL_ListView () |
Attributes | |
| CL_ListViewHeader * | get_header () const |
| Get Header. | |
| CL_ListViewItem | get_document_item () const |
| Get Document item. | |
| bool | get_select_whole_row () const |
| Get Select whole row. | |
| CL_ListViewIconList | get_icon_list () const |
| Get Icon list. | |
| CL_ListViewSelection | get_selected_items () const |
| Returns a container class holding the selected items in a linked list structure. | |
| CL_ListViewItem | get_selected_item () |
| Returns the currently selected item in single selection mode. If multiple items are selected, the item selected first (chronological order) is returned. | |
| CL_Size | get_preferred_size () const |
| Returns the preferred size of the component, as defined in its CSS file. | |
| CL_ListViewDisplayMode | get_display_mode () const |
| Get Display mode. | |
Operations | |
| CL_ListViewItem | create_item () |
| Create item. | |
| void | on_process_message (CL_GUIMessage &msg) |
| On process message. | |
| void | set_select_whole_row (bool value) |
| When true, the whole row is drawn selected, as opposed to only the first column. | |
| void | set_multi_select (bool value) |
| When true, multiple items can be selected. | |
| void | set_display_mode (CL_ListViewDisplayMode mode) |
| Set display mode. | |
| void | clear () |
| Remove all items. | |
| void | clear_selection () |
| Unselect all selected items. | |
| void | set_selected (CL_ListViewItem &item, bool selected=true) |
| Set selected. | |
| CL_ListViewItem | find (const CL_StringRef &col_id, const CL_StringRef &str, bool recursive=true) |
| Returns a CL_ListViewItem with the string 'str' in the column 'col_id' or a NULL item if none found. | |
| CL_ListViewItem | find (int id, bool recursive=true) |
| Returns the first CL_ListViewItem with the specified ID, or a NULL item if none found. | |
| CL_ListViewItem | find (CL_UnknownSharedPtr userdata, bool recursive=true) |
| Returns a CL_ListViewItem with the userdata 'ptr', or a NULL item if none found. | |
Events | |
| CL_Callback_v1< CL_ListViewSelection > & | func_selection_changed () |
| Selected items are returned as children of the returned item. | |
| CL_Callback_2< bool, CL_ListViewItem, CL_String & > & | func_item_edited () |
| Invoked when enter is pressed in the ListViews built-in LineEdit control. The caller may change the passed string. Returning false from the callback cancels the edit. | |
| CL_Callback_v1< CL_InputEvent > & | func_key_pressed () |
| CL_Callback_v1< CL_InputEvent > & | func_key_released () |
| CL_Callback_v1< CL_Point > & | func_mouse_right_up () |
| Callback called when the right mouse button is released (a click). Use this callback for listview context menus. Click position sent as parameter. | |
Events | |
| CL_Callback_v2< CL_GraphicContext &, const CL_Rect & > & | func_render () |
| void func_render(CL_GraphicContext &gc, const CL_Rect &clip_rect) | |
| CL_Callback_v1< CL_GUIMessage & > & | func_process_message () |
| void func_process_message(const CL_GUIMessage &message) | |
| CL_Callback_0< bool > & | func_close () |
| bool func_close() | |
| CL_Callback_0< bool > & | func_activated () |
| bool func_activated() | |
| CL_Callback_0< bool > & | func_deactivated () |
| bool func_deactivated() | |
| CL_Callback_0< bool > & | func_focus_lost () |
| bool func_focus_lost() | |
| CL_Callback_0< bool > & | func_focus_gained () |
| bool func_focus_gained() | |
| CL_Callback_0< bool > & | func_pointer_enter () |
| bool func_pointer_enter() | |
| CL_Callback_0< bool > & | func_pointer_exit () |
| bool func_pointer_exit() | |
| CL_Callback_v1< CL_GUIMessage & > & | func_filter_message () |
| Lets a component filter the messages intended for another component. Consumed messages will not reach the original target component. | |
| CL_Callback_1< bool, const CL_InputEvent & > & | func_input () |
| bool func_input(const CL_InputEvent &input_event) | |
| CL_Callback_1< bool, const CL_InputEvent & > & | func_input_pressed () |
| bool func_input_pressed(const CL_InputEvent &input_event) | |
| CL_Callback_1< bool, const CL_InputEvent & > & | func_input_released () |
| bool func_input_released(const CL_InputEvent &input_event) | |
| CL_Callback_1< bool, const CL_InputEvent & > & | func_input_doubleclick () |
| bool func_input_doubleclick(const CL_InputEvent &input_event) | |
| CL_Callback_1< bool, const CL_InputEvent & > & | func_input_pointer_moved () |
| bool func_input_pointer_moved(const CL_InputEvent &input_event) | |
| CL_Callback_v1< bool > & | func_visibility_change () |
| bool func_visibility_change() | |
| CL_Callback_v0 & | func_style_changed () |
| void func_style_changed() | |
| CL_Callback_v0 & | func_enablemode_changed () |
| void func_enablemode_changed() | |
| CL_Callback_v0 & | func_resized () |
| Callback invoked when the component is resized, i.e. when set_geometry is called. | |
| CL_Callback_v1< CL_Rect & > & | func_constrain_resize () |
| void func_constrain_resize(CL_Rect &geometry) | |
| virtual CL_Callback_2< CL_GUIComponent *, CL_GUIComponent *, CL_String > & | func_create_custom_component () |
| Callback invoked when loading a custom component from XML. | |
Operations | |
| void | render (CL_GraphicContext &gc, const CL_Rect &clip_rect, bool include_children=true) |
| Renders the component and its children. | |
| void | paint () |
| Paints the component. | |
| void | paint (const CL_Rect &clip_rect) |
| Paint. | |
| int | exec () |
| Run component in modal mode. | |
| void | exit_with_code (int exit_code) |
| Break message pump. | |
| void | set_geometry (CL_Rect geometry) |
| Set component position and size. | |
| void | set_window_geometry (CL_Rect geometry) |
| Set component window position and size. | |
| void | set_type_name (const CL_StringRef &name) |
| Sets the component type name. (csstype.cssclass::cssid). | |
| void | set_class_name (const CL_StringRef &name) |
| Sets the component class name. (csstype.cssclass::cssid). | |
| void | set_id_name (const CL_StringRef &name) |
| Sets the component ID name. (csstype.cssclass::cssid). | |
| void | set_enabled (bool enable=true) |
| Sets the component as enabled or disabled. | |
| void | set_clip_children (bool clip=true) |
| Sets the components children to be clipped to the parent component when drawn. | |
| void | set_visible (bool visible=true, bool activate_root_win=true) |
| Sets the component as visible or hidden. | |
| void | set_focus (bool enable=true) |
| Set this component focus. | |
| void | capture_mouse (bool capture) |
| Make all mouse messages be redirected to this component. | |
| void | capture_proximity (bool capture) |
| Make tablet proximity messages be redirected to this component. | |
| void | set_focus_policy (FocusPolicy policy) |
| Sets the focus policy of the component. | |
| void | set_component_group_name (const CL_StringRef &str) |
| Set group name. | |
| void | set_selected_in_component_group (bool selected) |
| Set to true if this component is the selected item in a group of components where FocusPolicy is focus_group. | |
| void | create_components (const CL_DomDocument &gui_xml) |
| Create child components from a GUI definition file. | |
| void | create_components (const CL_StringRef &fullname) |
| Create components. | |
| void | create_components (CL_IODevice &file) |
| Create components. | |
| void | create_components (const CL_StringRef &filename, const CL_VirtualDirectory &dir) |
| Create components. | |
| void | request_repaint () |
| void | request_repaint (CL_Rect rect) |
| Request repaint. | |
| void | set_cliprect (CL_GraphicContext &gc, const CL_Rect &rect) |
| Set a clipping rectangle. | |
| void | reset_cliprect (CL_GraphicContext &gc) |
| Reset the clipping rectangle. | |
| void | push_cliprect (CL_GraphicContext &gc, const CL_Rect &rect) |
| Push a clipping rectangle. | |
| void | pop_cliprect (CL_GraphicContext &gc) |
| Pop a clipping rectangle. | |
| void | delete_child_components () |
| Deletes all child components. | |
| void | set_parent_component (CL_GUIComponent *new_parent) |
| Makes this component a child of the given component, removing it from the previous parent. | |
| void | set_layout (CL_GUILayout &layout) |
| Set a layout on the component. | |
| void | set_cursor (const CL_Cursor &cursor) |
| Sets the current cursor icon. | |
| void | set_cursor (enum CL_StandardCursor type) |
| Set cursor. | |
| void | focus_next () |
| Set focus to the next component in tab order. | |
| void | focus_previous () |
| Set focus to the previous component in tab order. | |
| void | set_default (bool value) |
| When set to true, this component will receive unhandled enter/return keypress messages. | |
| void | set_cancel (bool value) |
| When set to true, this component will receive unhandled escape keypress messages. | |
| void | set_blocks_default_action (bool block) |
| Set to true if this component, when focused, blocks the default action of the parent dialog. | |
| void | set_constant_repaint (bool enable) |
| Enabled whether the GUI will constantly repaint this component when there are no other messages to process. | |
|
|
Focus policies.
|
|
|
Constructs a ListView.
|
|
|
|
|
|
Make all mouse messages be redirected to this component.
|
|
|
Make tablet proximity messages be redirected to this component.
|
|
|
Remove all items.
|
|
|
Unselect all selected items.
|
|
|
Convert the component coordinates to screen coordinates.
|
|
|
Convert the component coordinates to top-level window client coordinates.
|
|
|
Convert the component coordinates to top-level window client coordinates.
|
|
||||||||||||
|
Create components.
|
|
|
Create components.
|
|
|
Create components.
|
|
|
Create child components from a GUI definition file.
|
|
|
Create item.
|
|
|
Deletes all child components.
|
|
|
Run component in modal mode.
|
|
|
Break message pump. This function causes CL_GUIComponent::exec or CL_GUIManager::exec to exit with the given exit code. |
|
||||||||||||
|
Returns a CL_ListViewItem with the userdata 'ptr', or a NULL item if none found.
|
|
||||||||||||
|
Returns the first CL_ListViewItem with the specified ID, or a NULL item if none found.
|
|
||||||||||||||||
|
Returns a CL_ListViewItem with the string 'str' in the column 'col_id' or a NULL item if none found.
|
|
|
Set focus to the next component in tab order.
|
|
|
Set focus to the previous component in tab order.
|
|
|
bool func_activated()
|
|
|
bool func_close()
Reimplemented in CL_MainWindow. |
|
|
void func_constrain_resize(CL_Rect &geometry)
|
|
|
Callback invoked when loading a custom component from XML. The type of the component to create is passed as a parameter to the function. The callback function should create the desired component and return it, or return 0, if no component is created. Example definition: CL_GUIComponent *Fooon_create_custom_component(CL_GUIComponent *parent, CL_String type); |
|
|
bool func_deactivated()
|
|
|
void func_enablemode_changed()
|
|
|
Lets a component filter the messages intended for another component. Consumed messages will not reach the original target component.
|
|
|
bool func_focus_gained()
Reimplemented in CL_LineEdit. |
|
|
bool func_focus_lost()
Reimplemented in CL_LineEdit. |
|
|
bool func_input(const CL_InputEvent &input_event)
|
|
|
bool func_input_doubleclick(const CL_InputEvent &input_event)
|
|
|
bool func_input_pointer_moved(const CL_InputEvent &input_event)
|
|
|
bool func_input_pressed(const CL_InputEvent &input_event)
|
|
|
bool func_input_released(const CL_InputEvent &input_event)
|
|
|
Invoked when enter is pressed in the ListViews built-in LineEdit control. The caller may change the passed string. Returning false from the callback cancels the edit.
|
|
|
|
|
|
|
|
|
Callback called when the right mouse button is released (a click). Use this callback for listview context menus. Click position sent as parameter.
|
|
|
bool func_pointer_enter()
|
|
|
bool func_pointer_exit()
|
|
|
void func_process_message(const CL_GUIMessage &message)
|
|
|
void func_render(CL_GraphicContext &gc, const CL_Rect &clip_rect)
|
|
|
Callback invoked when the component is resized, i.e. when set_geometry is called.
|
|
|
Selected items are returned as children of the returned item.
|
|
|
void func_style_changed()
|
|
|
|
|
|
Returns true if the components size can be changed.
|
|
|
Returns true if this component, when focused, blocks the default action of its parent dialog.
|
|
|
Returns a list of child components belonging to the specified group.
|
|
|
Returns a list of the child components.
|
|
|
Returns the component class name.
|
|
|
Returns true if the components children are clipped to the parent component when drawn.
|
|
|
Return the component under 'point', in local viewport coordinates.
|
|
|
Returns the name of the component group, or an empty string if no group name has been set.
|
|
|
Enabled whether the GUI will constantly repaint this component when there are no other messages to process.
|
|
|
Get Display mode.
|
|
|
Returns the display window in which this component is hosted.
|
|
|
Get Document item.
|
|
|
Returns the CSS element name for the component.
|
|
|
Get First child.
|
|
|
Returns the first child component.
|
|
|
Returns the focus policy of the component.
|
|
|
Return the graphic context for the component.
|
|
|
Returns the position and size of the drawable area of the component.
|
|
|
Returns the selected item in a component group of which this component is a member.
|
|
|
Returns the GUI manager owning this component.
|
|
|
Get Header.
|
|
|
Returns the height of the drawable area of the component.
|
|
|
Return the input context for the component.
|
|
|
Get Icon list.
|
|
|
Returns the component ID name.
|
|
|
Get Last child.
|
|
|
Returns the last child component.
|
|
|
Returns the layout manager set for this component. Check CL_GUILayout.is_null() if none set.
|
|
|
Find child component with the specified component ID name.
|
|
|
Returns the next component in the component tree, or 'this', if none found.
|
|
|
Get Next sibling.
|
|
|
Returns the next sibling component.
|
|
|
Get Owner component.
|
|
|
Return the component owning this component. Only top-level components has an owner. |
|
|
Get Parent component.
|
|
|
Returns the parent component. Only child components has a parent. |
|
|
Returns the preferred height of a render box.
Reimplemented in CL_ScrollBar. |
|
|
Returns the preferred size of the component, as defined in its CSS file.
Reimplemented from CL_GUIComponent. |
|
|
Returns the preferred width of a render box.
Reimplemented in CL_ScrollBar. |
|
|
Returns the previous component in the component tree, or 'this', if none found.
|
|
|
Get Previous sibling.
|
|
|
Returns the previous sibling component.
|
|
|
Returns the resource manager for the GUI resources.
|
|
|
Get Select whole row.
|
|
|
Returns the currently selected item in single selection mode. If multiple items are selected, the item selected first (chronological order) is returned.
|
|
|
Returns a container class holding the selected items in a linked list structure.
|
|
|
Returns the size of the drawable area of the component.
|
|
|
Returns the theme used by this component.
|
|
|
Get Top level component.
|
|
|
Returns the top level component this CL_GUIComponent is a child of.
|
|
|
Returns the component type name.
|
|
|
Returns the width of the drawable area of the component.
|
|
|
Returns the position and size of the component window (window frame, borders etc).
|
|
|
Returns true if the component has any child components.
|
|
|
Returns true if the component has the focus.
|
|
|
Returns true if the component is active.
|
|
|
Checks if this component is the ancestor of target component.
|
|
|
Returns true if this component will receive unhandled escape keypress messages.
|
|
|
Returns true if this component will receive unhandled enter/return keypress messages.
|
|
|
Checks if this component is a descendant of target component.
|
|
|
Return true if the component, and all its parents are enabled.
|
|
|
Returns true if the component is the selected item in a group of components where FocusPolicy is focus_group.
|
|
|
Return true if the component, and all its parents are visible.
|
|
|
On process message.
|
|
|
Paint.
|
|
|
Paints the component. This function renders all components affecting the component or area specified and makes the changes visible. |
|
|
Pop a clipping rectangle.
|
|
||||||||||||
|
Push a clipping rectangle.
|
|
||||||||||||||||
|
Renders the component and its children.
|
|
|
Request repaint.
|
|
|
|
|
|
Reset the clipping rectangle.
|
|
|
Convert the screen coordinates to component coordinates.
|
|
|
Set to true if this component, when focused, blocks the default action of the parent dialog.
|
|
|
When set to true, this component will receive unhandled escape keypress messages. If multiple components are set as 'cancel' handlers, the first child with the property will receive the keypress message. |
|
|
Sets the component class name. (csstype.cssclass::cssid).
|
|
|
Sets the components children to be clipped to the parent component when drawn.
|
|
||||||||||||
|
Set a clipping rectangle.
|
|
|
Set group name.
|
|
|
Enabled whether the GUI will constantly repaint this component when there are no other messages to process.
|
|
|
Set cursor.
|
|
|
Sets the current cursor icon.
|
|
|
When set to true, this component will receive unhandled enter/return keypress messages. If multiple components are set as 'default' handlers, the first child with the property will receive the keypress message. |
|
|
Set display mode.
|
|
|
Sets the component as enabled or disabled.
|
|
|
Set this component focus.
|
|
|
Sets the focus policy of the component.
|
|
|
Set component position and size.
|
|
|
Sets the component ID name. (csstype.cssclass::cssid).
|
|
|
Set a layout on the component.
|
|
|
When true, multiple items can be selected.
|
|
|
Makes this component a child of the given component, removing it from the previous parent.
|
|
|
When true, the whole row is drawn selected, as opposed to only the first column.
|
|
||||||||||||
|
Set selected.
|
|
|
Set to true if this component is the selected item in a group of components where FocusPolicy is focus_group.
|
|
|
Sets the component type name. (csstype.cssclass::cssid).
|
|
||||||||||||
|
Sets the component as visible or hidden.
|
|
|
Set component window position and size.
|
|
|
Convert the top-level window client coordinates to component coordinates.
|
|
|
Convert the top-level window client coordinates to component coordinates.
|
|
|
|
1.4.6