lib/ewl_tree.c File Reference
#include "ewl_base.h"
#include "ewl_tree.h"
#include "ewl_button.h"
#include "ewl_cell.h"
#include "ewl_check.h"
#include "ewl_expansion.h"
#include "ewl_label.h"
#include "ewl_paned.h"
#include "ewl_tree_view_scrolled.h"
#include "ewl_scrollpane.h"
#include "ewl_private.h"
#include "ewl_macros.h"
#include "ewl_debug.h"

Data Structures | |
| struct | Ewl_Tree_Expansions_List |
| Stores informtion on tree expansion points. More... | |
Defines | |
| #define | EWL_TREE_EXPANSIONS_LIST(el) ((Ewl_Tree_Expansions_List *)(el)) |
Typedefs | |
| typedef struct Ewl_Tree_Expansions_List | Ewl_Tree_Expansions_List |
Functions | |
| unsigned int | ewl_tree_alternate_row_colors_get (Ewl_Tree *tree) |
| Retrieve if the row colours are being alternated. | |
| void | ewl_tree_alternate_row_colors_set (Ewl_Tree *tree, unsigned char alternate) |
| Toggle if the rows alternate in colour. | |
| void | ewl_tree_cb_column_sort (Ewl_Widget *w, void *ev __UNUSED__, void *data) |
| void | ewl_tree_cb_configure (Ewl_Widget *w, void *ev __UNUSED__, void *data __UNUSED__) |
| void | ewl_tree_cb_destroy (Ewl_Widget *w, void *ev __UNUSED__, void *data __UNUSED__) |
| void | ewl_tree_cb_node_child_add (Ewl_Container *c, Ewl_Widget *w __UNUSED__) |
| void | ewl_tree_cb_node_child_del (Ewl_Container *c, Ewl_Widget *w, int idx __UNUSED__) |
| void | ewl_tree_cb_node_child_hide (Ewl_Container *c, Ewl_Widget *w) |
| void | ewl_tree_cb_node_child_show (Ewl_Container *c, Ewl_Widget *w __UNUSED__) |
| void | ewl_tree_cb_node_configure (Ewl_Widget *w, void *ev_data __UNUSED__, void *user_data __UNUSED__) |
| void | ewl_tree_cb_node_data_unref (Ewl_Widget *w, void *ev_data __UNUSED__, void *user_data __UNUSED__) |
| void | ewl_tree_cb_node_resize (Ewl_Container *c, Ewl_Widget *w, int size __UNUSED__, Ewl_Orientation o __UNUSED__) |
| void | ewl_tree_cb_node_toggle (Ewl_Widget *w __UNUSED__, void *ev_data __UNUSED__, void *data) |
| unsigned int | ewl_tree_column_count_get (Ewl_Tree *tree) |
| Retrives the number of columns in the tree. | |
| void | ewl_tree_column_count_set (Ewl_Tree *tree, unsigned int count) |
| Sets the number of columns in the tree. | |
| unsigned int | ewl_tree_column_fixed_size_get (Ewl_Tree *tree, unsigned int col) |
| void | ewl_tree_column_fixed_size_set (Ewl_Tree *tree, unsigned int col, unsigned int fixed) |
| Set the fixed size flag of the give column. | |
| int | ewl_tree_column_initial_size_get (Ewl_Tree *tree, unsigned int col) |
| void | ewl_tree_column_initial_size_set (Ewl_Tree *tree, unsigned int col, int size) |
| Set the initial size of the give column. | |
| const Ewl_View * | ewl_tree_content_view_get (Ewl_Tree *tree) |
| Retrives the view used to generate the tree content area. | |
| void | ewl_tree_content_view_set (Ewl_Tree *tree, const Ewl_View *view) |
| Sets the view to use to generate the content area. | |
| Ewl_Widget * | ewl_tree_content_widget_get (Ewl_Tree *tree) |
| Retrieves the widget containing the tree rows. | |
| unsigned int | ewl_tree_fixed_rows_get (Ewl_Tree *tree) |
| Retrieve the fixed row size of the tree. | |
| void | ewl_tree_fixed_rows_set (Ewl_Tree *tree, unsigned int fixed) |
| Set the fixed row size of the tree. | |
| unsigned int | ewl_tree_headers_visible_get (Ewl_Tree *tree) |
| Retrieve if the header is visible in the tree. | |
| void | ewl_tree_headers_visible_set (Ewl_Tree *tree, unsigned char visible) |
| Toggle if the header is visible in the tree. | |
| int | ewl_tree_init (Ewl_Tree *tree) |
| Initialize the contents of a tree widget. | |
| double | ewl_tree_kinetic_dampen_get (Ewl_Tree *tree) |
| Gets the multiplier used to reduce the velocity of kinetic scrolling. | |
| void | ewl_tree_kinetic_dampen_set (Ewl_Tree *tree, double d) |
| Sets the multiplier to reduce the velocity of kinetic scrolling. | |
| int | ewl_tree_kinetic_fps_get (Ewl_Tree *tree) |
| Gets the number of times per second the tree scrolling is updated. | |
| void | ewl_tree_kinetic_fps_set (Ewl_Tree *tree, int fps) |
| Sets the number of times per second the tree scrolling is updated. | |
| double | ewl_tree_kinetic_max_velocity_get (Ewl_Tree *tree) |
| Gets the maximum velocity for kinetic scrolling. | |
| void | ewl_tree_kinetic_max_velocity_set (Ewl_Tree *tree, double v) |
| Sets the maximum velocity for kinetic scrolling. | |
| double | ewl_tree_kinetic_min_velocity_get (Ewl_Tree *tree) |
| Gets the minimum velocity for kinetic scrolling. | |
| void | ewl_tree_kinetic_min_velocity_set (Ewl_Tree *tree, double v) |
| Sets the minimum velocity for kinetic scrolling. | |
| Ewl_Kinetic_Scroll | ewl_tree_kinetic_scrolling_get (Ewl_Tree *tree) |
| Gets the type of kinetic scrolling used. | |
| void | ewl_tree_kinetic_scrolling_set (Ewl_Tree *tree, Ewl_Kinetic_Scroll type) |
| Sets up the tree to use kinetic scrolling. | |
| Ewl_Scrollpane * | ewl_tree_kinetic_scrollpane_get (Ewl_Tree *tree) |
| Ewl_Widget * | ewl_tree_new (void) |
| Allocate and initialize a new tree widget. | |
| void | ewl_tree_node_collapse (Ewl_Tree_Node *node) |
| void | ewl_tree_node_expand (Ewl_Tree_Node *node) |
| unsigned int | ewl_tree_node_expandable_get (Ewl_Tree_Node *node) |
| void | ewl_tree_node_expandable_set (Ewl_Tree_Node *node, unsigned int expandable) |
| unsigned int | ewl_tree_node_expanded_is (Ewl_Tree_Node *node) |
| int | ewl_tree_node_init (Ewl_Tree_Node *node) |
| Ewl_Widget * | ewl_tree_node_new (void) |
| void | ewl_tree_node_row_set (Ewl_Tree_Node *node, Ewl_Row *row) |
| void | ewl_tree_row_collapse (Ewl_Tree *tree, void *data, unsigned int row) |
| Sets the given row to collapsed for the given data in tree. | |
| void | ewl_tree_row_expand (Ewl_Tree *tree, void *data, unsigned int row) |
| When the tree displays the data in data it will expand the give row. This data is the parent of the expansion row. | |
| unsigned int | ewl_tree_row_expanded_is (Ewl_Tree *tree, void *data, unsigned int row) |
| Checks if row is expanded in data of tree. | |
| void | ewl_tree_row_visible_ensure (Ewl_Tree *tree, void *data, unsigned int row) |
| Ensures that the requested row is visible, if it is not the tree is scrolled, so that the row becomes visible. | |
| Ewl_Tree_Selection_Type | ewl_tree_selection_type_get (Ewl_Tree *tree) |
| Get the selection type from the tree. | |
| void | ewl_tree_selection_type_set (Ewl_Tree *tree, Ewl_Tree_Selection_Type type) |
| Set the mode of the tree. | |
Define Documentation
| #define EWL_TREE_EXPANSIONS_LIST | ( | el | ) | ((Ewl_Tree_Expansions_List *)(el)) |
Typedef Documentation
| typedef struct Ewl_Tree_Expansions_List Ewl_Tree_Expansions_List |
Function Documentation
| void ewl_tree_cb_column_sort | ( | Ewl_Widget * | w, | |
| void *ev | __UNUSED__, | |||
| void * | data | |||
| ) |
References Ewl_Tree::column, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, Ewl_Tree::direction, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, DWARNING, EWL_MVC, ewl_mvc_data_get(), ewl_mvc_dirty_set(), ewl_mvc_model_get(), EWL_SORT_DIRECTION_MAX, EWL_TREE, EWL_WIDGET_TYPE, INTPTR_TO_INT, Ewl_Widget::parent, Ewl_Tree::sort, and Ewl_Model::sort.
| void ewl_tree_cb_configure | ( | Ewl_Widget * | w, | |
| void *ev | __UNUSED__, | |||
| void *data | __UNUSED__ | |||
| ) |
References Ewl_Tree::columns, CURRENT_W, CURRENT_X, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, EWL_MVC, ewl_mvc_dirty_get(), ewl_mvc_dirty_set(), EWL_OBJECT, ewl_object_w_request(), ewl_object_x_request(), EWL_PANED, ewl_paned_arrange(), EWL_TREE, EWL_TREE_TYPE, Ewl_Tree::header, and Ewl_Tree::headers_visible.
Referenced by ewl_tree_init().
| void ewl_tree_cb_destroy | ( | Ewl_Widget * | w, | |
| void *ev | __UNUSED__, | |||
| void *data | __UNUSED__ | |||
| ) |
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_TREE, EWL_TREE_TYPE, Ewl_Tree::expansions, and IF_FREE_HASH.
Referenced by ewl_tree_init().
| void ewl_tree_cb_node_child_add | ( | Ewl_Container * | c, | |
| Ewl_Widget *w | __UNUSED__ | |||
| ) |
References Ewl_Container::children, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_TREE_NODE, EWL_TREE_NODE_TYPE, ewl_widget_hide(), ewl_widget_show(), Ewl_Tree_Node::handle, HIDDEN, and VISIBLE.
Referenced by ewl_tree_cb_node_child_del(), and ewl_tree_node_init().
| void ewl_tree_cb_node_child_show | ( | Ewl_Container * | c, | |
| Ewl_Widget *w | __UNUSED__ | |||
| ) |
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, ewl_container_largest_prefer(), ewl_container_sum_prefer(), EWL_OBJECT, ewl_object_preferred_h_get(), ewl_object_preferred_inner_h_set(), ewl_object_preferred_inner_w_set(), ewl_object_preferred_w_get(), EWL_ORIENTATION_HORIZONTAL, EWL_ORIENTATION_VERTICAL, EWL_TREE_NODE, EWL_TREE_NODE_TYPE, ewl_widget_configure(), ewl_widget_hide(), Ewl_Tree_Node::expanded, Ewl_Tree_Node::handle, PREFERRED_H, PREFERRED_W, REALIZED, Ewl_Tree_Node::row, Ewl_Tree_Node::tree, and VISIBLE.
Referenced by ewl_tree_cb_node_resize(), and ewl_tree_node_init().
| void ewl_tree_cb_node_configure | ( | Ewl_Widget * | w, | |
| void *ev_data | __UNUSED__, | |||
| void *user_data | __UNUSED__ | |||
| ) |
References Ewl_Container::children, CURRENT_H, CURRENT_W, CURRENT_X, CURRENT_Y, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, EWL_CONTAINER, EWL_OBJECT, ewl_object_current_h_get(), ewl_object_current_w_get(), ewl_object_geometry_request(), ewl_object_preferred_h_get(), EWL_TREE_NODE, EWL_TREE_NODE_TYPE, EWL_WIDGET, Ewl_Tree_Node::handle, Ewl_Tree_Node::tree, UNMANAGED, and VISIBLE.
Referenced by ewl_tree_node_init().
| void ewl_tree_cb_node_data_unref | ( | Ewl_Widget * | w, | |
| void *ev_data | __UNUSED__, | |||
| void *user_data | __UNUSED__ | |||
| ) |
References Ewl_Tree_Node::data, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, EWL_MVC, ewl_mvc_model_get(), EWL_TREE_NODE, EWL_TREE_NODE_TYPE, Ewl_Tree_Node::expansion, Ewl_Tree_Node::model, and Ewl_Model::unref.
Referenced by ewl_tree_node_expandable_set().
| void ewl_tree_cb_node_toggle | ( | Ewl_Widget *w | __UNUSED__, | |
| void *ev_data | __UNUSED__, | |||
| void * | data | |||
| ) |
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, EWL_MVC, ewl_mvc_data_get(), EWL_TREE, EWL_TREE_NODE, ewl_tree_node_expandable_get(), ewl_tree_node_expanded_is(), EWL_TREE_NODE_TYPE, ewl_tree_row_collapse(), ewl_tree_row_expand(), Ewl_Tree_Node::row_num, and Ewl_Tree_Node::tree.
Referenced by ewl_tree_node_expandable_set().
| Ewl_Scrollpane * ewl_tree_kinetic_scrollpane_get | ( | Ewl_Tree * | tree | ) |
References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, DWARNING, EWL_CONTAINER, ewl_container_redirect_get(), EWL_SCROLLPANE, EWL_SCROLLPANE_TYPE, ewl_tree_content_widget_get(), EWL_TREE_TYPE, EWL_WIDGET, and ewl_widget_type_is().
Referenced by ewl_tree_kinetic_dampen_get(), ewl_tree_kinetic_dampen_set(), ewl_tree_kinetic_fps_get(), ewl_tree_kinetic_fps_set(), ewl_tree_kinetic_max_velocity_get(), ewl_tree_kinetic_max_velocity_set(), ewl_tree_kinetic_min_velocity_get(), ewl_tree_kinetic_min_velocity_set(), ewl_tree_kinetic_scrolling_get(), ewl_tree_kinetic_scrolling_set(), and ewl_tree_row_visible_ensure().