GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
Data Fields
gp_widget_table_col_ops Struct Reference

Table operations, defined by the application. More...

#include <gp_widget_table.h>

Collaboration diagram for gp_widget_table_col_ops:
Collaboration graph
[legend]

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.
 

Detailed Description

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.

Field Documentation

◆ col_map

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.

◆ get_cell

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.

Parameters
selfA table widget.
cellA pointer to structure to store the cell content to.
col_idxAn column index.
Returns
TODO

Definition at line 123 of file gp_widget_table.h.

◆ on_event

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.

◆ seek_row

int(* gp_widget_table_col_ops::seek_row) (gp_widget *self, int op, unsigned int pos)

Seek function for the table rows.

Parameters
selfA table widget.
opA seek operation, defines what seek should do.
Aposition to seek to, is ignored for certain ops.
Returns
See gp_widget_table_row_op.

Definition at line 111 of file gp_widget_table.h.

◆ sort

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.

Parameters
selfA table widget.
descIf non-zero table is sorted in descending order.
col_idxAn column index for the column.

Definition at line 134 of file gp_widget_table.h.


The documentation for this struct was generated from the following file: