Ewl_View: A data view
Detailed Description
Defines the callbacks for setting up the widgets based on the data returned from the Model. Create widgets, set data on widgets, calculate sizing, minimize number of widgets.
Data Structures | |
struct | Ewl_View |
The view function pointers. More... | |
Defines | |
#define | EWL_VIEW(view) ((Ewl_View *)view) |
#define | EWL_VIEW_EXPANSION_VIEW_FETCH_GET(f) ((Ewl_View_Expansion_View_Fetch)f) |
#define | EWL_VIEW_HEADER_GET(f) ((Ewl_View_Header_Fetch)f) |
#define | EWL_VIEW_WIDGET_FETCH(f) ((Ewl_View_Widget_Fetch)f) |
Typedefs | |
typedef Ewl_View | Ewl_View |
typedef Ewl_View *(*) | Ewl_View_Expansion_View_Fetch (void *data, unsigned int row) |
typedef Ewl_Widget *(*) | Ewl_View_Header_Fetch (void *data, unsigned int column, void *private_data) |
typedef void(*) | Ewl_View_Widget_Assign (Ewl_Widget *w, void *data, unsigned int row, unsigned int col, void *private_data) |
typedef Ewl_Widget *(*) | Ewl_View_Widget_Constructor (unsigned int col, void *private_data) |
Functions | |
Ewl_View * | ewl_view_clone (const Ewl_View *src) |
Creates a new Ewl_View object. | |
void | ewl_view_destroy (Ewl_View *v) |
Destroys the view, so its memory is returned to the system. | |
Ewl_View_Expansion_View_Fetch | ewl_view_expansion_view_fetch_get (const Ewl_View *v) |
Gets the expansion view fetch callback from the view. | |
void | ewl_view_expansion_view_fetch_set (Ewl_View *v, Ewl_View_Expansion_View_Fetch f) |
Sets the expansion view fetch callback into the view. | |
Ewl_View_Header_Fetch | ewl_view_header_fetch_get (const Ewl_View *v) |
Gets the header fetch callback from the view. | |
void | ewl_view_header_fetch_set (Ewl_View *v, Ewl_View_Header_Fetch f) |
Sets the header fetch callback into the view. | |
int | ewl_view_init (Ewl_View *view) |
Initializes an Ewl_View object to default values. | |
Ewl_View * | ewl_view_new (void) |
Creates a new Ewl_View object. | |
Ewl_View_Widget_Assign | ewl_view_widget_assign_get (const Ewl_View *view) |
void | ewl_view_widget_assign_set (Ewl_View *view, Ewl_View_Widget_Assign assign) |
This will set the given widget assign callback into the view. | |
Ewl_View_Widget_Constructor | ewl_view_widget_constructor_get (const Ewl_View *view) |
Get the constructor set on this view. | |
void | ewl_view_widget_constructor_set (Ewl_View *view, Ewl_View_Widget_Constructor c) |
This will set the given widget fetch callback into the view. |
Define Documentation
#define EWL_VIEW_EXPANSION_VIEW_FETCH_GET | ( | f | ) | ((Ewl_View_Expansion_View_Fetch)f) |
View callback to get a view for expanded data on a row
#define EWL_VIEW_HEADER_GET | ( | f | ) | ((Ewl_View_Header_Fetch)f) |
View callback to get the header for a given column
#define EWL_VIEW_WIDGET_FETCH | ( | f | ) | ((Ewl_View_Widget_Fetch)f) |
View callback for the constructor for a data row
Typedef Documentation
typedef Ewl_View*(*) Ewl_View_Expansion_View_Fetch(void *data, unsigned int row) |
A typedef to shorten the definition of the view_expansion_view_fetch callbacks.
typedef Ewl_Widget*(*) Ewl_View_Header_Fetch(void *data, unsigned int column, void *private_data) |
A typedef to shorten the definition of the fetch callback.
typedef void(*) Ewl_View_Widget_Assign(Ewl_Widget *w, void *data, unsigned int row, unsigned int col, void *private_data) |
A typedef to shorten the definition of the view_widget_assign callbacks.
typedef Ewl_Widget*(*) Ewl_View_Widget_Constructor(unsigned int col, void *private_data) |
A typedef to shorten the definition of the cunstroctor callback.
Function Documentation
void ewl_view_destroy | ( | Ewl_View * | v | ) |
Destroys the view, so its memory is returned to the system.
- Parameters:
-
v,: View that will be destroyed
- Returns:
- Returns no value
Ewl_View_Expansion_View_Fetch ewl_view_expansion_view_fetch_get | ( | const Ewl_View * | v | ) |
Gets the expansion view fetch callback from the view.
- Parameters:
-
v,: The Ewl_View to get the Ewl_View_Expansion_View_Fetch function from
- Returns:
- Returns the Ewl_View_Expansion_View_Fetch callback set on the view, or NULL on failure.
void ewl_view_expansion_view_fetch_set | ( | Ewl_View * | v, | |
Ewl_View_Expansion_View_Fetch | f | |||
) |
Sets the expansion view fetch callback into the view.
- Parameters:
-
v,: The Ewl_View to set the expansion_view_fetch callback on f,: The Ewl_View_Expansion_View_Fetch callback
- Returns:
- Returns no value.
Ewl_View_Header_Fetch ewl_view_header_fetch_get | ( | const Ewl_View * | v | ) |
Gets the header fetch callback from the view.
- Parameters:
-
v,: The Ewl_View to get the Ewl_View_Header_Fetch function from
- Returns:
- Returns the Ewl_View_Header_Fetch callback set on the view, or NULL on failure.
void ewl_view_header_fetch_set | ( | Ewl_View * | v, | |
Ewl_View_Header_Fetch | f | |||
) |
Sets the header fetch callback into the view.
- Parameters:
-
v,: The Ewl_View to set the header_fetch callback on f,: The Ewl_View_Header_Fetch callback
- Returns:
- Returns no value.
int ewl_view_init | ( | Ewl_View * | view | ) |
Ewl_View* ewl_view_new | ( | void | ) |
Ewl_View_Widget_Assign ewl_view_widget_assign_get | ( | const Ewl_View * | view | ) |
void ewl_view_widget_assign_set | ( | Ewl_View * | v, | |
Ewl_View_Widget_Assign | assign | |||
) |
This will set the given widget assign callback into the view.
- Parameters:
-
v,: The Ewl_View to set the widget assign callback into fetch,: The Ewl_View_Widget_Assign to set into the view
- Returns:
- Returns no value.
Ewl_View_Widget_Constructor ewl_view_widget_constructor_get | ( | const Ewl_View * | v | ) |
Get the constructor set on this view.
- Parameters:
-
v,: The Ewl_View to get the constructor from
- Returns:
- Returns the Ewl_View_Constructor set into the view or NULL if none set.
void ewl_view_widget_constructor_set | ( | Ewl_View * | v, | |
Ewl_View_Widget_Constructor | c | |||
) |
This will set the given widget fetch callback into the view.
- Parameters:
-
v,: The Ewl_View to set the widget fetch callback into fetch,: The Ewl_View_Widget_Fetch to set into the view
- Returns:
- Returns no value.