Download

Support

Ewl_Grid: The ewl grid widget


Detailed Description

The Ewl Grid widget.

Remarks:
Inherits from Ewl_Container.

Tutorial


Data Structures

struct  Ewl_Grid
 Inherit from Ewl_Container and extend to privide a grid layout widget. More...
struct  Ewl_Grid_Child
 Contains information about a grid child. More...
struct  Ewl_Grid_Info
 Contains information about a row or column of Ewl_Grid. More...

Defines

#define EWL_GRID(grid)   ((Ewl_Grid *)grid)
#define EWL_GRID_IS(w)   (ewl_widget_type_is(EWL_WIDGET(w), EWL_GRID_TYPE))
#define EWL_GRID_TYPE   "grid"

Typedefs

typedef Ewl_Grid Ewl_Grid
typedef Ewl_Grid_Child Ewl_Grid_Child
typedef Ewl_Grid_Info Ewl_Grid_Info

Functions

void ewl_grid_cb_child_add (Ewl_Container *p, Ewl_Widget *c)
void ewl_grid_cb_child_remove (Ewl_Container *p, Ewl_Widget *c, int idx)
void ewl_grid_cb_child_resize (Ewl_Container *p, Ewl_Widget *child, int size, Ewl_Orientation o)
void ewl_grid_cb_child_show (Ewl_Container *p, Ewl_Widget *child)
void ewl_grid_cb_configure (Ewl_Widget *w, void *ev_data, void *user_data)
void ewl_grid_cb_destroy (Ewl_Widget *w, void *ev_data, void *user_data)
void ewl_grid_child_position_get (Ewl_Grid *g, Ewl_Widget *child, int *start_col, int *end_col, int *start_row, int *end_row)
 get the position of a child widget
void ewl_grid_child_position_set (Ewl_Grid *g, Ewl_Widget *child, int start_col, int end_col, int start_row, int end_row)
 Give a child widget a fixed-postion in the grid.
int ewl_grid_column_current_w_get (Ewl_Grid *g, int col)
 Get the current width of a column.
int ewl_grid_column_fixed_w_get (Ewl_Grid *g, int col)
 Get the user set width of a column.
void ewl_grid_column_fixed_w_set (Ewl_Grid *g, int col, int width)
 Set the fixed size of a column.
void ewl_grid_column_preferred_w_use (Ewl_Grid *g, int col)
 use the preferred size of the column
float ewl_grid_column_relative_w_get (Ewl_Grid *g, int col)
 Get the user set relative width of a column.
void ewl_grid_column_relative_w_set (Ewl_Grid *g, int col, float relw)
 Set the relative width of a column.
void ewl_grid_column_w_remove (Ewl_Grid *g, int col)
 remove the user set size
void ewl_grid_dimensions_get (Ewl_Grid *g, int *col, int *row)
 get the number of columns and rows
void ewl_grid_dimensions_set (Ewl_Grid *g, int col, int row)
 sets the new dimensions
unsigned int ewl_grid_hhomogeneous_get (Ewl_Grid *g)
 Retrieves the horizontal homogeneous flag.
void ewl_grid_hhomogeneous_set (Ewl_Grid *g, unsigned int h)
 Change the horizontal homogeneous layout of the box.
void ewl_grid_homogeneous_set (Ewl_Grid *g, unsigned int h)
 Change the homogeneous layout of the grid.
int ewl_grid_init (Ewl_Grid *g)
 Initializes an Ewl_Grid widget to default values.
Ewl_Widgetewl_grid_new (void)
 Create a new Ewl_Grid widget.
Ewl_Orientation ewl_grid_orientation_get (Ewl_Grid *g)
 Retrieves the fill orientation flag.
void ewl_grid_orientation_set (Ewl_Grid *g, Ewl_Orientation orientation)
 Change the fill orientation.
int ewl_grid_row_current_h_get (Ewl_Grid *g, int row)
 Get the current height of a column.
int ewl_grid_row_fixed_h_get (Ewl_Grid *g, int row)
 Get the user set height of a row.
void ewl_grid_row_fixed_h_set (Ewl_Grid *g, int row, int height)
 Set the fixed size of a column.
void ewl_grid_row_h_remove (Ewl_Grid *g, int row)
 remove the user set size
void ewl_grid_row_preferred_h_use (Ewl_Grid *g, int col)
 use the preferred size of the row
float ewl_grid_row_relative_h_get (Ewl_Grid *g, int col)
 Get the user set relative height of a row.
void ewl_grid_row_relative_h_set (Ewl_Grid *g, int col, float relh)
 Set the relative height of a row.
unsigned int ewl_grid_vhomogeneous_get (Ewl_Grid *g)
 Retrieves the vertical homogeneous flag.
void ewl_grid_vhomogeneous_set (Ewl_Grid *g, unsigned int h)
 Change the vertical homogeneous layout of the box.

Define Documentation

#define EWL_GRID ( grid   )     ((Ewl_Grid *)grid)

Typecast a pointer to an Ewl_Grid pointer

#define EWL_GRID_IS (  )     (ewl_widget_type_is(EWL_WIDGET(w), EWL_GRID_TYPE))

Returns TRUE if the widget is an Ewl_Grid, FALSE otherwise

#define EWL_GRID_TYPE   "grid"

The type name for the Ewl_Grid widget


Typedef Documentation

typedef struct Ewl_Grid Ewl_Grid

The Ewl_Grid widget

The Ewl_Grid_Child type

typedef struct Ewl_Grid_Info Ewl_Grid_Info

The Ewl_Grid_Info structure


Function Documentation

void ewl_grid_cb_child_add ( Ewl_Container p,
Ewl_Widget c 
)

void ewl_grid_cb_child_remove ( Ewl_Container p,
Ewl_Widget c,
int  idx 
)

void ewl_grid_cb_child_resize ( Ewl_Container p,
Ewl_Widget child,
int  size,
Ewl_Orientation  o 
)

void ewl_grid_cb_child_show ( Ewl_Container p,
Ewl_Widget child 
)

void ewl_grid_cb_configure ( Ewl_Widget w,
void *  ev_data,
void *  user_data 
)

void ewl_grid_cb_destroy ( Ewl_Widget w,
void *  ev_data,
void *  user_data 
)

void ewl_grid_child_position_get ( Ewl_Grid g,
Ewl_Widget w,
int *  start_col,
int *  end_col,
int *  start_row,
int *  end_row 
)

get the position of a child widget

Parameters:
g,: the grid
w,: the child widget
start_col,: the start column
end_col,: the end column
start_row,: the start row
end_row,: the end row
Returns:
Returns no value

void ewl_grid_child_position_set ( Ewl_Grid g,
Ewl_Widget w,
int  start_col,
int  end_col,
int  start_row,
int  end_row 
)

Give a child widget a fixed-postion in the grid.

Parameters:
g,: the grid
w,: the child widget
start_col,: the start column
end_col,: the end column
start_row,: the start row
end_row,: the end row
Returns:
Returns no value

int ewl_grid_column_current_w_get ( Ewl_Grid g,
int  col 
)

Get the current width of a column.

Parameters:
g,: the grid
col,: the column
Returns:
Returns the current width
This function returns current width of the column.

int ewl_grid_column_fixed_w_get ( Ewl_Grid g,
int  col 
)

Get the user set width of a column.

Parameters:
g,: the grid
col,: the column
Returns:
Returns the user set width
This function returns only the size set by the user.

void ewl_grid_column_fixed_w_set ( Ewl_Grid g,
int  col,
int  width 
)

Set the fixed size of a column.

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

void ewl_grid_column_preferred_w_use ( Ewl_Grid g,
int  col 
)

use the preferred size of the column

Parameters:
g,: the grid
col,: the column
Returns:
Returns no value.

float ewl_grid_column_relative_w_get ( Ewl_Grid g,
int  col 
)

Get the user set relative width of a column.

Parameters:
g,: the grid
col,: the column
Returns:
Returns the user set relative width
This function returns only the relative size set by the user.

void ewl_grid_column_relative_w_set ( Ewl_Grid g,
int  col,
float  relw 
)

Set the relative width of a column.

Parameters:
g,: the grid
col,: the column
relw,: the new relative width
Returns:
Returns no value.

void ewl_grid_column_w_remove ( Ewl_Grid g,
int  col 
)

remove the user set size

Parameters:
g,: the grid
col,: the column
Returns:
Returns no value.

void ewl_grid_dimensions_get ( Ewl_Grid g,
int *  cols,
int *  rows 
)

get the number of columns and rows

Parameters:
g,: the grid
cols,: a pointer where the number of columns will be saved
rows,: a pointer where the number of rows will be saved
Returns:
Returns no value

void ewl_grid_dimensions_set ( Ewl_Grid g,
int  cols,
int  rows 
)

sets the new dimensions

Parameters:
g,: the grid
cols,: the new number of columns
rows,: the new number of rows
Returns:
Returns no value

unsigned int ewl_grid_hhomogeneous_get ( Ewl_Grid g  ) 

Retrieves the horizontal homogeneous flag.

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

void ewl_grid_hhomogeneous_set ( Ewl_Grid g,
unsigned int  h 
)

Change the horizontal homogeneous layout of the box.

Parameters:
g,: the grid 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.

void ewl_grid_homogeneous_set ( Ewl_Grid g,
unsigned int  h 
)

Change the homogeneous layout of the grid.

Parameters:
g,: the grid 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.

int ewl_grid_init ( Ewl_Grid g  ) 

Initializes an Ewl_Grid widget to default values.

Parameters:
g,: the grid
Returns:
Returns no value. Responsible for setting up default values and callbacks within a grid structure

Ewl_Widget* ewl_grid_new ( void   ) 

Create a new Ewl_Grid widget.

Returns:
Returns a pointer to a grid on success or NULL on failure.

Ewl_Orientation ewl_grid_orientation_get ( Ewl_Grid g  ) 

Retrieves the fill orientation flag.

Parameters:
g,: the grid to get the fill orientation
Returns:
The fill orientation flag

void ewl_grid_orientation_set ( Ewl_Grid g,
Ewl_Orientation  orientation 
)

Change the fill orientation.

Parameters:
g,: the grid to change the fill orientation
orientation,: the Ewl_Orientation value
Returns:
Returns no value.

int ewl_grid_row_current_h_get ( Ewl_Grid g,
int  row 
)

Get the current height of a column.

Parameters:
g,: the grid
row,: the row
Returns:
Returns the current height
This function returns current width of the column.

int ewl_grid_row_fixed_h_get ( Ewl_Grid g,
int  row 
)

Get the user set height of a row.

Parameters:
g,: the grid
row,: the row
Returns:
Returns the user set height
This function returns only the size set by the user.

void ewl_grid_row_fixed_h_set ( Ewl_Grid g,
int  row,
int  height 
)

Set the fixed size of a column.

Parameters:
g,: the grid
row,: the row
height,: the new height
Returns:
Returns no value.

void ewl_grid_row_h_remove ( Ewl_Grid g,
int  row 
)

remove the user set size

Parameters:
g,: the grid
row,: the row
Returns:
Returns no value.

void ewl_grid_row_preferred_h_use ( Ewl_Grid g,
int  row 
)

use the preferred size of the row

Parameters:
g,: the grid
row,: the row
Returns:
Returns no value.

float ewl_grid_row_relative_h_get ( Ewl_Grid g,
int  row 
)

Get the user set relative height of a row.

Parameters:
g,: the grid
row,: the row
Returns:
Returns the user set relative height
This function returns only the relative size set by the user.

void ewl_grid_row_relative_h_set ( Ewl_Grid g,
int  row,
float  relh 
)

Set the relative height of a row.

Parameters:
g,: the grid
row,: the row
relh,: the new relative height
Returns:
Returns no value.

unsigned int ewl_grid_vhomogeneous_get ( Ewl_Grid g  ) 

Retrieves the vertical homogeneous flag.

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

void ewl_grid_vhomogeneous_set ( Ewl_Grid g,
unsigned int  h 
)

Change the vertical homogeneous layout of the box.

Parameters:
g,: the grid 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.


Copyright © Enlightenment.org

Enlightened Widget Library Documentation Generated: Sun Sep 27 01:49:46 2009