lib/ewl_table.h
Go to the documentation of this file.00001
00002 #ifndef EWL_TABLE_H
00003 #define EWL_TABLE_H
00004
00005 #include "ewl_cell.h"
00006 #include "ewl_grid.h"
00007
00030 #define EWL_TABLE_TYPE "table"
00031
00036 #define EWL_TABLE_IS(w) (ewl_widget_type_is(EWL_WIDGET(w), EWL_TABLE_TYPE))
00037
00042 typedef struct Ewl_Table Ewl_Table;
00043
00048 #define EWL_TABLE(table) ((Ewl_Table *)table)
00049
00053 struct Ewl_Table
00054 {
00055 Ewl_Container container;
00056 Ewl_Grid *grid;
00058 char **col_headers;
00059 int row_select;
00061 unsigned int homogeneous_h;
00062 unsigned int homogeneous_v;
00064 struct {
00065 int start_r;
00066 int start_c;
00067 int end_r;
00068 int end_c;
00069 } selected;
00071 };
00072
00073 Ewl_Widget *ewl_table_new(int cols, int rows, char **col_headers);
00074 int ewl_table_init(Ewl_Table *t, int cols, int rows,
00075 char **col_headers);
00076
00077 void ewl_table_add(Ewl_Table *table, Ewl_Widget *w, int start_col,
00078 int end_col, int start_row, int end_row);
00079 void ewl_table_reset(Ewl_Table *t, int cols, int rows,
00080 char **c_headers);
00081
00082 void ewl_table_column_w_set(Ewl_Table *table, int col, int width);
00083 void ewl_table_row_h_set(Ewl_Table *table, int row, int height);
00084
00085 void ewl_table_column_w_get(Ewl_Table *table, int col, int *width);
00086 void ewl_table_row_h_get(Ewl_Table *table, int row, int *height);
00087
00088 void ewl_table_col_row_get(Ewl_Table *table, Ewl_Cell *cell,
00089 int *start_col, int *end_col,
00090 int *start_row, int *end_row);
00091
00092 Ecore_List *ewl_table_find(Ewl_Table *table, int start_col,
00093 int end_col, int start_row, int emd_row);
00094
00095 char *ewl_table_selected_get(Ewl_Table *table);
00096 void ewl_table_homogeneous_set(Ewl_Table *table, unsigned int h);
00097 void ewl_table_hhomogeneous_set(Ewl_Table *table, unsigned int h);
00098 void ewl_table_vhomogeneous_set(Ewl_Table *table, unsigned int h);
00099 unsigned int ewl_table_hhomogeneous_get(Ewl_Table *table);
00100 unsigned int ewl_table_vhomogeneous_get(Ewl_Table *table);
00101
00102
00103
00104
00105 void ewl_table_cb_configure(Ewl_Widget *w, void *ev_data, void *user_data);
00106 void ewl_table_cb_child_select(Ewl_Widget *w, void *ev_data, void *user_data);
00107 void ewl_table_cb_child_show(Ewl_Container *p, Ewl_Widget *c);
00108
00113 #endif