Download

Support

Ewl_Table: The Table Layout Container.


Detailed Description

Defines the Ewl_Box class used for laying out Ewl_Widget's in a horizontal or vertical line.

Remarks:
Inherits from Ewl_Container.

Tutorial


Data Structures

struct  Ewl_Table
 Inherits from Ewl_Container and extends to provide a table layout. More...

Defines

#define EWL_TABLE(table)   ((Ewl_Table *)table)
#define EWL_TABLE_IS(w)   (ewl_widget_type_is(EWL_WIDGET(w), EWL_TABLE_TYPE))
#define EWL_TABLE_TYPE   "table"

Typedefs

typedef struct Ewl_Table Ewl_Table

Functions

void ewl_table_add (Ewl_Table *table, Ewl_Widget *w, int start_col, int end_col, int start_row, int end_row)
 Add a child widget to the table.
void ewl_table_cb_child_select (Ewl_Widget *w, void *ev_data, void *user_data)
void ewl_table_cb_child_show (Ewl_Container *p, Ewl_Widget *c)
void ewl_table_cb_configure (Ewl_Widget *w, void *ev_data, void *user_data)
void ewl_table_col_row_get (Ewl_Table *table, Ewl_Cell *cell, int *start_col, int *end_col, int *start_row, int *end_row)
 Get the column and row of a widget.
void ewl_table_column_w_get (Ewl_Table *table, int col, int *width)
 Get the width of a table column.
void ewl_table_column_w_set (Ewl_Table *table, int col, int width)
 Set the width of a table column.
Ecore_List * ewl_table_find (Ewl_Table *table, int start_col, int end_col, int start_row, int emd_row)
 Get a list of the widgets in the specified col/row.
unsigned int ewl_table_hhomogeneous_get (Ewl_Table *table)
 Retrieves the horizontal homogeneous flag.
void ewl_table_hhomogeneous_set (Ewl_Table *table, unsigned int h)
 Change the horizontal homogeneous layout of the box.
void ewl_table_homogeneous_set (Ewl_Table *table, unsigned int h)
 Change the homogeneous layout of the box.
int ewl_table_init (Ewl_Table *t, int cols, int rows, char **col_headers)
 Initialize table to starting values.
Ewl_Widgetewl_table_new (int cols, int rows, char **col_headers)
 Create a new table.
void ewl_table_reset (Ewl_Table *t, int cols, int rows, char **c_headers)
 Clear the table and set new geometry.
void ewl_table_row_h_get (Ewl_Table *table, int row, int *height)
 Get the height of a table row.
void ewl_table_row_h_set (Ewl_Table *table, int row, int height)
 Set the height of a table row.
char * ewl_table_selected_get (Ewl_Table *table)
 Get the text in the current selected box.
unsigned int ewl_table_vhomogeneous_get (Ewl_Table *table)
 Retrieves the vertical homogeneous flag.
void ewl_table_vhomogeneous_set (Ewl_Table *table, unsigned int h)
 Change the vertical homogeneous layout of the box.

Define Documentation

#define EWL_TABLE ( table   )     ((Ewl_Table *)table)

Typecase a pointer to an Ewl_Table pointer.

Referenced by ewl_table_cb_child_select(), ewl_table_cb_child_show(), and ewl_table_cb_configure().

#define EWL_TABLE_IS (  )     (ewl_widget_type_is(EWL_WIDGET(w), EWL_TABLE_TYPE))

Returns TRUE if the widget is an Ewl_Table, FALSE otherwise


Typedef Documentation

typedef struct Ewl_Table Ewl_Table

The table widget is an Ewl_Container used to lay out widgets in a grid like pattern with headers and alignment.


Function Documentation

void ewl_table_add ( Ewl_Table table,
Ewl_Widget w,
int  start_col,
int  end_col,
int  start_row,
int  end_row 
)

Add a child widget to the table.

Parameters:
table,: the table
w,: the cell to add
start_col,: the start column
end_col,: the end column
start_row,: the start row
end_row,: the end row
Returns:
Returns no value.

References col_headers, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_CALLBACK_MOUSE_UP, ewl_callback_prepend(), ewl_cell_new(), EWL_CONTAINER, ewl_container_child_append(), ewl_grid_child_position_set(), ewl_table_cb_child_select(), EWL_TABLE_TYPE, EWL_WIDGET, ewl_widget_show(), EWL_WIDGET_TYPE, and grid.

void ewl_table_col_row_get ( Ewl_Table t,
Ewl_Cell cell,
int *  start_col,
int *  end_col,
int *  start_row,
int *  end_row 
)

Get the column and row of a widget.

Parameters:
t,: the table
cell,: the cell to add
start_col,: integer pointer to store the start column
end_col,: integer pointer to store the end column in
start_row,: integer pointer to store the start row in
end_row,: integer pointer to store the end row in
Returns:
Returns nothing

References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, Ewl_Grid_Child::end_col, Ewl_Grid_Child::end_row, EWL_CELL_TYPE, EWL_CONTAINER, EWL_TABLE_TYPE, EWL_WIDGET, ewl_widget_data_get(), grid, Ewl_Grid_Child::start_col, and Ewl_Grid_Child::start_row.

void ewl_table_column_w_get ( Ewl_Table table,
int  col,
int *  width 
)

Get the width of a table column.

Parameters:
table,: the table
col,: the column
width,: integer pointer to store the width in
Returns:
Returns no value.

References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, ewl_grid_column_fixed_w_get(), EWL_TABLE_TYPE, and grid.

void ewl_table_column_w_set ( Ewl_Table table,
int  col,
int  width 
)

Set the width of a table column.

Parameters:
table,: the table
col,: the column
width,: the new width
Returns:
Returns no value.

References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, ewl_grid_column_fixed_w_set(), EWL_TABLE_TYPE, EWL_WIDGET, ewl_widget_configure(), and grid.

Ecore_List* ewl_table_find ( Ewl_Table t,
int  start_col,
int  end_col,
int  start_row,
int  end_row 
)

Get a list of the widgets in the specified col/row.

Parameters:
t,: the table
start_col,: the start column
end_col,: the end column
start_row,: the start row
end_row,: the end row
Returns:
Returns Ecore_List of widgets found in the specified col/row area.

References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, EWL_CONTAINER, EWL_TABLE_TYPE, ewl_widget_data_get(), grid, Ewl_Grid_Child::start_col, and Ewl_Grid_Child::start_row.

unsigned int ewl_table_hhomogeneous_get ( Ewl_Table table  ) 

Retrieves the horizontal homogeneous flag.

Parameters:
table,: the table to get the homogeneous layout
Returns:
The horizontal homogeneous flag

References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_TABLE_TYPE, and homogeneous_h.

void ewl_table_hhomogeneous_set ( Ewl_Table table,
unsigned int  h 
)

Change the horizontal homogeneous layout of the box.

Parameters:
table,: the table to change horizontal homogeneous layout
h,: the boolean value to change the horizontal layout mode to
Returns:
Returns no value. Grids use non-homogeneous layout by default, this can be used to change that for horizontal orientation, i.e. all columns can have the same width.

References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_GRID, ewl_grid_hhomogeneous_set(), EWL_TABLE_TYPE, grid, and homogeneous_h.

Referenced by ewl_table_homogeneous_set().

void ewl_table_homogeneous_set ( Ewl_Table table,
unsigned int  h 
)

Change the homogeneous layout of the box.

Parameters:
table,: the table to change homogeneous layout
h,: the boolean value to change the layout mode to
Returns:
Returns no value. Grids use non-homogeneous layout by default, this can be used to change that.

References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, ewl_table_hhomogeneous_set(), EWL_TABLE_TYPE, ewl_table_vhomogeneous_set(), homogeneous_h, and homogeneous_v.

int ewl_table_init ( Ewl_Table t,
int  cols,
int  rows,
char **  col_headers 
)

Ewl_Widget* ewl_table_new ( int  cols,
int  rows,
char **  col_headers 
)

Create a new table.

Parameters:
cols,: the number of columns
rows,: the number of rows
col_headers,: the column titles
Returns:
Returns a a newl table on success, NULL on failure.

References DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, ewl_table_init(), EWL_WIDGET, ewl_widget_destroy(), and NEW.

void ewl_table_reset ( Ewl_Table t,
int  cols,
int  rows,
char **  col_headers 
)

Clear the table and set new geometry.

Parameters:
t,: the table
cols,: the new number of columns
rows,: the new number of columns
col_headers,: the new column headers
Returns:
Returns no value

References col_headers, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_BUTTON, ewl_button_label_set(), ewl_button_new(), ewl_cell_new(), EWL_CONTAINER, ewl_container_child_append(), ewl_container_reset(), EWL_GRID, ewl_grid_child_position_set(), ewl_grid_dimensions_set(), EWL_TABLE_TYPE, EWL_WIDGET, ewl_widget_configure(), ewl_widget_disable(), ewl_widget_show(), and grid.

void ewl_table_row_h_get ( Ewl_Table table,
int  row,
int *  height 
)

Get the height of a table row.

Parameters:
table,: the table
row,: the row
height,: integer pointer to store the height in
Returns:
Returns no value.

References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, ewl_grid_row_fixed_h_get(), EWL_TABLE_TYPE, and grid.

void ewl_table_row_h_set ( Ewl_Table table,
int  row,
int  height 
)

Set the height of a table row.

Parameters:
table,: the table
row,: the row
height,: the new height
Returns:
Returns no value.

References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, ewl_grid_row_fixed_h_set(), EWL_TABLE_TYPE, EWL_WIDGET, ewl_widget_configure(), and grid.

char* ewl_table_selected_get ( Ewl_Table t  ) 

Get the text in the current selected box.

Parameters:
t,: the table
Returns:
Returns the text in the currently selected widget in the table

References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, end_c, Ewl_Grid_Child::end_col, end_r, Ewl_Grid_Child::end_row, EWL_CONTAINER, EWL_TABLE_TYPE, ewl_text_text_get(), ewl_widget_data_get(), grid, selected, start_c, Ewl_Grid_Child::start_col, start_r, and Ewl_Grid_Child::start_row.

unsigned int ewl_table_vhomogeneous_get ( Ewl_Table table  ) 

Retrieves the vertical homogeneous flag.

Parameters:
table,: the table to get the vertical layout
Returns:
The vertical homogeneous flag

References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_TABLE_TYPE, and homogeneous_v.

void ewl_table_vhomogeneous_set ( Ewl_Table table,
unsigned int  h 
)

Change the vertical homogeneous layout of the box.

Parameters:
table,: the table to change vertical homogeneous layout
h,: the boolean value to change the vertical layout mode to
Returns:
Returns no value. Grids use non-homogeneous layout by default, this can be used to change that for vertical orientation, i.e. all rows can have the same height.

References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_GRID, ewl_grid_vhomogeneous_set(), EWL_TABLE_TYPE, grid, and homogeneous_v.

Referenced by ewl_table_homogeneous_set().


Copyright © Enlightenment.org

Enlightened Widget Library Documentation Generated: Sat May 17 16:51:11 2008