lib/ewl_mvc.c File Reference
#include "ewl_base.h"
#include "ewl_mvc.h"
#include "ewl_private.h"
#include "ewl_macros.h"
#include "ewl_debug.h"

Functions | |
| void | ewl_mvc_cb_clicked_multi (Ewl_Widget *w, void *ev, void *data __UNUSED__) |
| void | ewl_mvc_cb_clicked_single (Ewl_Widget *w, void *ev, void *data __UNUSED__) |
| void | ewl_mvc_cb_data_unref (Ewl_Widget *w, void *ev __UNUSED__, void *data __UNUSED__) |
| void | ewl_mvc_cb_destroy (Ewl_Widget *w, void *ev __UNUSED__, void *data __UNUSED__) |
| void * | ewl_mvc_data_get (Ewl_MVC *mvc) |
| Retrieves the data set into the MVC widget. | |
| void | ewl_mvc_data_set (Ewl_MVC *mvc, void *data) |
| Sets the given data data into the MVC widget mvc. | |
| unsigned int | ewl_mvc_dirty_get (Ewl_MVC *mvc) |
| Retrieves the dirty status of the MVC widget. | |
| void | ewl_mvc_dirty_set (Ewl_MVC *mvc, unsigned int dirty) |
| Sets the dirty status of the MVC widget mvc to the dirty state. | |
| void | ewl_mvc_highlight (Ewl_MVC *mvc, Ewl_Container *c, Ewl_Widget *(*widget)(Ewl_MVC *mvc, void *data, unsigned int row, unsigned int column)) |
| int | ewl_mvc_init (Ewl_MVC *mvc) |
| Initializes an MVC widget ot default values. | |
| const Ewl_Model * | ewl_mvc_model_get (Ewl_MVC *mvc) |
| Retrieves the model set into the MVC widget. | |
| void | ewl_mvc_model_set (Ewl_MVC *mvc, const Ewl_Model *model) |
| Sets the given model into the tree. | |
| void * | ewl_mvc_private_data_get (Ewl_MVC *mvc) |
| Retrieves the data set into the MVC widget. | |
| void | ewl_mvc_private_data_set (Ewl_MVC *mvc, void *data) |
| Sets the given data data into the MVC widget mvc. | |
| void | ewl_mvc_selected_add (Ewl_MVC *mvc, const Ewl_Model *model, void *data, unsigned int row, unsigned int column) |
| Adds the given index to the selected list. | |
| void | ewl_mvc_selected_change_cb_set (Ewl_MVC *mvc, void(*cb)(Ewl_MVC *mvc)) |
| void | ewl_mvc_selected_clear (Ewl_MVC *mvc) |
| clears the selection list | |
| unsigned int | ewl_mvc_selected_count_get (Ewl_MVC *mvc) |
| Retrives the number of items selected in the widget. | |
| Ewl_Selection_Idx * | ewl_mvc_selected_get (Ewl_MVC *mvc) |
| Retrieves the last selected item. Return must be free'd. | |
| unsigned int | ewl_mvc_selected_is (Ewl_MVC *mvc, void *data __UNUSED__, unsigned int row, unsigned int column) |
| Checks if the given index is selected or not. | |
| Ecore_List * | ewl_mvc_selected_list_get (Ewl_MVC *mvc) |
| Retrieves the list of selected indicies. DO NOT remove or change items in this list. | |
| void | ewl_mvc_selected_list_set (Ewl_MVC *mvc, Ecore_List *list) |
| Sets the list of items to select. This will remove any items it needs from the list. | |
| void | ewl_mvc_selected_range_add (Ewl_MVC *mvc, const Ewl_Model *model, void *data, unsigned int srow, unsigned int scolumn, unsigned int erow, unsigned int ecolumn) |
| Sets the given range, inclusive, as selected in the mvc. | |
| void | ewl_mvc_selected_rm (Ewl_MVC *mvc, void *data __UNUSED__, unsigned int row, unsigned int column) |
| Removes the given index from the list of selected indices. | |
| void | ewl_mvc_selected_set (Ewl_MVC *mvc, const Ewl_Model *model, void *data, unsigned int row, unsigned int column) |
| Sets the given index as selected. | |
| Ewl_Selection * | ewl_mvc_selection_index_new (const Ewl_Model *model, void *data, unsigned int row, unsigned int column) |
| Creates a new index selection based on given values. | |
| Ewl_Selection_Mode | ewl_mvc_selection_mode_get (Ewl_MVC *mvc) |
| Retrieves the selection mode of the widget. | |
| void | ewl_mvc_selection_mode_set (Ewl_MVC *mvc, Ewl_Selection_Mode mode) |
| Sets the selection capabilities of the mvc widget. | |
| Ewl_Selection * | ewl_mvc_selection_range_new (const Ewl_Model *model, void *data, unsigned int srow, unsigned int scolumn, unsigned int erow, unsigned int ecolumn) |
| Creates a new range selection based on given values. | |
| void | ewl_mvc_view_change_cb_set (Ewl_MVC *mvc, void(*cb)(Ewl_MVC *mvc)) |
| This callback will be called whenever the ewl_mvc_view_set routine is called to notify the inheriting widget that the view has changed. | |
| const Ewl_View * | ewl_mvc_view_get (Ewl_MVC *mvc) |
| Retrives the current view set on the MVC. | |
| void | ewl_mvc_view_set (Ewl_MVC *mvc, const Ewl_View *view) |
| Sets the given view onto the MVC. | |
Variables | |
| unsigned int | EWL_CALLBACK_MVC_CLICKED = 0 |
Function Documentation
| void ewl_mvc_cb_clicked_multi | ( | Ewl_Widget * | w, | |
| void * | ev, | |||
| void *data | __UNUSED__ | |||
| ) |
References Ewl_Event_MVC_Clicked::column, Ewl_Selection_Range::column, Ewl_Selection_Idx::column, Ewl_Selection::data, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_KEY_MODIFIER_CTRL, EWL_KEY_MODIFIER_SHIFT, EWL_MVC, ewl_mvc_selected_add(), ewl_mvc_selected_count_get(), ewl_mvc_selected_is(), ewl_mvc_selected_range_add(), ewl_mvc_selected_rm(), ewl_mvc_selected_set(), EWL_MVC_TYPE, EWL_SELECTION_IDX, EWL_SELECTION_RANGE, EWL_SELECTION_TYPE_INDEX, Ewl_Event_MVC_Clicked::model, Ewl_Selection::model, Ewl_Event_MVC_Clicked::modifiers, Ewl_Event_MVC_Clicked::mvc_data, Ewl_Event_MVC_Clicked::row, Ewl_Selection_Range::row, Ewl_Selection_Idx::row, Ewl_MVC::selected, Ewl_Selection_Range::start, and Ewl_Selection::type.
Referenced by ewl_mvc_selection_mode_set().
| void ewl_mvc_cb_clicked_single | ( | Ewl_Widget * | w, | |
| void * | ev, | |||
| void *data | __UNUSED__ | |||
| ) |
References Ewl_Event_MVC_Clicked::column, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_MVC, ewl_mvc_selected_set(), EWL_MVC_TYPE, Ewl_Event_MVC_Clicked::model, Ewl_Event_MVC_Clicked::mvc_data, and Ewl_Event_MVC_Clicked::row.
Referenced by ewl_mvc_selection_mode_set().
| void ewl_mvc_cb_data_unref | ( | Ewl_Widget * | w, | |
| void *ev | __UNUSED__, | |||
| void *data | __UNUSED__ | |||
| ) |
References Ewl_MVC::data, DCHECK_PARAM_PTR, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_MVC, Ewl_MVC::model, and Ewl_Model::unref.
Referenced by ewl_mvc_init(), and ewl_tree_node_init().
| void ewl_mvc_cb_destroy | ( | Ewl_Widget * | w, | |
| void *ev | __UNUSED__, | |||
| void *data | __UNUSED__ | |||
| ) |
References DCHECK_PARAM_PTR, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_MVC, IF_FREE_LIST, and Ewl_MVC::selected.
Referenced by ewl_mvc_init().
| unsigned int ewl_mvc_selected_is | ( | Ewl_MVC * | mvc, | |
| void *data | __UNUSED__, | |||
| unsigned int | row, | |||
| unsigned int | column | |||
| ) |
Checks if the given index is selected or not.
- Parameters:
-
mvc,: The MVC to work with data,: UNUSED row,: The row to check for column,: The column to check for
- Returns:
- Returns TRUE if the index is selected, FALSE otherwise
References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_MVC_TYPE, EWL_SELECTION_MODE_NONE, and Ewl_MVC::selection_mode.
Referenced by ewl_mvc_cb_clicked_multi().
| void ewl_mvc_selected_rm | ( | Ewl_MVC * | mvc, | |
| void *data | __UNUSED__, | |||
| unsigned int | row, | |||
| unsigned int | column | |||
| ) |
Removes the given index from the list of selected indices.
- Parameters:
-
mvc,: The MVC to work with data,: The parent data containing the index selection row,: The row to remove column,: The column to remove
- Returns:
- Returns no value
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, DRETURN, EWL_MVC_TYPE, EWL_SELECTION_MODE_NONE, EWL_SELECTION_RANGE, EWL_SELECTION_TYPE_INDEX, Ewl_MVC::selected, Ewl_MVC::selection_mode, and Ewl_Selection::type.
Referenced by ewl_mvc_cb_clicked_multi().