GFXprim
2D bitmap graphics library with emphasis on speed and correctness
|
Table operations, defined by the application. More...
#include <gp_widget_table.h>
Data Fields | |
int(* | seek_row )(gp_widget *self, int op, unsigned int pos) |
Seek function for the table rows. | |
int(* | get_cell )(gp_widget *self, gp_widget_table_cell *cell, unsigned int col_idx) |
Returns a cell content. | |
void(* | sort )(gp_widget *self, int desc, unsigned int col_idx) |
Sorts table by a column. | |
int(* | on_event )(gp_widget_event *ev) |
Optional on_event handler. | |
void * | on_event_priv |
Optional on_event handler private pointer. | |
gp_widget_table_col_desc | col_map [] |
NULL id terminated column map array. | |
Table operations, defined by the application.
This defines operations for all possible columns in the table. The table header then chooses which columns to display based on this description.
Definition at line 101 of file gp_widget_table.h.
gp_widget_table_col_desc gp_widget_table_col_ops::col_map[] |
NULL id terminated column map array.
Each entry in the map describes a table column. Which columns are shown and in what order is defined in the widget table header description.
Definition at line 152 of file gp_widget_table.h.
int(* gp_widget_table_col_ops::get_cell) (gp_widget *self, gp_widget_table_cell *cell, unsigned int col_idx) |
Returns a cell content.
Retrives cells at the current row as set by the seek function.
self | A table widget. |
cell | A pointer to structure to store the cell content to. |
col_idx | An column index. |
Definition at line 123 of file gp_widget_table.h.
int(* gp_widget_table_col_ops::on_event) (gp_widget_event *ev) |
Optional on_event handler.
If set the table widget events are routed to this handler.
Definition at line 141 of file gp_widget_table.h.
int(* gp_widget_table_col_ops::seek_row) (gp_widget *self, int op, unsigned int pos) |
Seek function for the table rows.
self | A table widget. |
op | A seek operation, defines what seek should do. |
A | position to seek to, is ignored for certain ops. |
Definition at line 111 of file gp_widget_table.h.
void(* gp_widget_table_col_ops::sort) (gp_widget *self, int desc, unsigned int col_idx) |
Sorts table by a column.
If column is gp_widget_table_col_desc::sortable the table can be sorted by this column.
self | A table widget. |
desc | If non-zero table is sorted in descending order. |
col_idx | An column index for the column. |
Definition at line 134 of file gp_widget_table.h.