Enlightenment CVS committal
Author : pfritz
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src/lib
Modified Files:
ewl_grid.c ewl_enums.h ewl_grid.h ewl_colorpicker.c
ewl_table.c
Log Message:
*API BREAK* again,
- spilt ewl_grid_column/row_w/h_set/get into several functions
- add ewl_grid_column/row_preferred_w/h_use
- add ewl_grid_dimensions_get
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_grid.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -3 -r1.21 -r1.22
--- ewl_grid.c 11 Jul 2006 20:42:42 -0000 1.21
+++ ewl_grid.c 12 Jul 2006 03:44:19 -0000 1.22
@@ -88,7 +88,7 @@
* @param cols: the new number of columns
* @param rows: the new number of rows
* @return Returns no value
- * @brief Clears the grid and sets new geometry
+ * @brief sets the new dimensions
*/
void
ewl_grid_dimensions_set(Ewl_Grid *g, int cols, int rows)
@@ -152,6 +152,26 @@
}
/**
+ * @param g: the grid
+ * @param cols: a pointer where the number of columns will be saved
+ * @param rows: a pointer where the number of rows will be saved
+ * @return Returns no value
+ * @brief get the number of columns and rows
+ */
+void
+ewl_grid_dimensions_get(Ewl_Grid *g, int *cols, int *rows)
+{
+ DENTER_FUNCTION(DLEVEL_STABLE);
+ DCHECK_PARAM_PTR("g", g);
+ DCHECK_TYPE("g", g, EWL_GRID_TYPE);
+
+ if (cols) *cols = g->cols;
+ if (rows) *rows = g->rows;
+
+ DLEAVE_FUNCTION(DLEVEL_STABLE);
+}
+
+/**
* @param g: the grid to change the fill orientation
* @param orientation: the Ewl_Orientation value
* @return Returns no value.
@@ -331,7 +351,7 @@
* check bounds
*/
if (start_col < 0) {
- DWARNING("start_col out of bounds. min is 1\n");
+ DWARNING("start_col out of bounds. min is 0\n");
DLEAVE_FUNCTION(DLEVEL_STABLE);
}
@@ -341,7 +361,7 @@
new_cols = g->cols;
if (start_row < 0) {
- DWARNING("start_row out of bounds. min is 1\n");
+ DWARNING("start_row out of bounds. min is 0\n");
DLEAVE_FUNCTION(DLEVEL_STABLE);
}
@@ -386,13 +406,33 @@
/**
* @param g: the grid
* @param col: the column
- * @param relw: width relative to the grid width
+ * @return Returns the current width
+ * @brief Get the current width of a column
+ *
+ * This function returns current width of the column.
+ */
+int
+ewl_grid_column_current_w_get(Ewl_Grid *g, int col)
+{
+ DENTER_FUNCTION(DLEVEL_STABLE);
+ DCHECK_PARAM_PTR_RET("g", g, 0);
+ DCHECK_TYPE_RET("g", g, EWL_GRID_TYPE, 0);
+
+ if ((col >= g->cols) || (col < 0))
+ DRETURN_INT(0, DLEVEL_STABLE);
+
+ DRETURN_INT(g->col_size[col].current_size, DLEVEL_STABLE);
+}
+
+/**
+ * @param g: the grid
+ * @param col: the column
* @param width: the new width
* @return Returns no value.
- * @brief Set the widget of a column
+ * @brief Set the fixed size of a column
*/
void
-ewl_grid_column_w_set(Ewl_Grid *g, int col, float relw, int width)
+ewl_grid_column_fixed_w_set(Ewl_Grid *g, int col, int width)
{
DENTER_FUNCTION(DLEVEL_STABLE);
DCHECK_PARAM_PTR("g", g);
@@ -409,9 +449,8 @@
ewl_grid_dimensions_set(g, col + 1, g->rows);
}
- g->col_size[col].override = 1;
- g->col_size[col].size = width;
- g->col_size[col].rel_size = relw;
+ g->col_size[col].resize_type = EWL_GRID_RESIZE_FIXED;
+ g->col_size[col].user.size = width;
g->data_dirty = TRUE;
ewl_widget_configure(EWL_WIDGET(g));
@@ -422,59 +461,194 @@
/**
* @param g: the grid
* @param col: the column
- * @param relw: the width relative to the grid width
- * @param width: integer pointer to store the width in
- * @return Returns no value.
+ * @return Returns the user set width
* @brief Get the user set width of a column
*
* This function returns only the size set by the user.
*/
+int
+ewl_grid_column_fixed_w_get(Ewl_Grid *g, int col)
+{
+ DENTER_FUNCTION(DLEVEL_STABLE);
+ DCHECK_PARAM_PTR_RET("g", g, 0);
+ DCHECK_TYPE_RET("g", g, EWL_GRID_TYPE, 0);
+
+ if ((col >= g->cols) || (col < 0))
+ DRETURN_INT(0, DLEVEL_STABLE);
+
+ DRETURN_INT(g->col_size[col].user.size, DLEVEL_STABLE);
+}
+
+/**
+ * @param g: the grid
+ * @param col: the column
+ * @param width: the new relative width
+ * @return Returns no value.
+ * @brief Set the relative width of a column
+ */
void
-ewl_grid_column_w_get(Ewl_Grid *g, int col, float *relw, int *width)
+ewl_grid_column_relative_w_set(Ewl_Grid *g, int col, float relw)
{
DENTER_FUNCTION(DLEVEL_STABLE);
DCHECK_PARAM_PTR("g", g);
- DCHECK_PARAM_PTR("width", width);
DCHECK_TYPE("g", g, EWL_GRID_TYPE);
- if ((col >= g->cols) || (col < 0)) {
- if (width) *width = 0;
- if (relw) *relw = 0.0;
+ /*
+ * check bounds
+ */
+ if (col < 0) {
+ DWARNING("parameter 'col' is out of bounds\n");
+ DLEAVE_FUNCTION(DLEVEL_STABLE);
}
- else {
- if (width) *width = g->col_size[col].size;
- if (relw) *relw = g->col_size[col].rel_size;
+ else if (col >= g->cols) {
+ ewl_grid_dimensions_set(g, col + 1, g->rows);
}
+ g->col_size[col].resize_type = EWL_GRID_RESIZE_RELATIVE;
+ g->col_size[col].user.rel_size = relw;
+ g->data_dirty = TRUE;
+
+ ewl_widget_configure(EWL_WIDGET(g));
+
+ DLEAVE_FUNCTION(DLEVEL_STABLE);
+}
+
+/**
+ * @param g: the grid
+ * @param col: the column
+ * @return Returns the user set relative width
+ * @brief Get the user set relative width of a column
+ *
+ * This function returns only the relative size set by the user.
+ */
+float
+ewl_grid_column_relative_w_get(Ewl_Grid *g, int col)
+{
+ DENTER_FUNCTION(DLEVEL_STABLE);
+ DCHECK_PARAM_PTR_RET("g", g, 0.0);
+ DCHECK_TYPE_RET("g", g, EWL_GRID_TYPE, 0.0);
+
+ if ((col >= g->cols) || (col < 0))
+ DRETURN_FLOAT(0.0, DLEVEL_STABLE);
+
+ DRETURN_FLOAT(g->col_size[col].user.rel_size, DLEVEL_STABLE);
+}
+
+/**
+ * @param g: the grid
+ * @param col: the column
+ * @return Returns no value.
+ * @brief use the preferred size of the column
+ */
+void
+ewl_grid_column_preferred_w_use(Ewl_Grid *g, int col)
+{
+ DENTER_FUNCTION(DLEVEL_STABLE);
+ DCHECK_PARAM_PTR("g", g);
+ DCHECK_TYPE("g", g, EWL_GRID_TYPE);
+
+ /*
+ * check bounds
+ */
+ if (col < 0) {
+ DWARNING("parameter 'col' is out of bounds\n");
+ DLEAVE_FUNCTION(DLEVEL_STABLE);
+ }
+ else if (col >= g->cols) {
+ ewl_grid_dimensions_set(g, col + 1, g->rows);
+ }
+
+ g->col_size[col].resize_type = EWL_GRID_RESIZE_NONE;
+ g->col_size[col].user.size = 0;
+ g->data_dirty = TRUE;
+
+ ewl_widget_configure(EWL_WIDGET(g));
+
+ DLEAVE_FUNCTION(DLEVEL_STABLE);
+}
+
+/**
+ * @param g: the grid
+ * @param col: the column
+ * @return Returns no value.
+ * @brief remove the user set size
+ */
+void
+ewl_grid_column_w_remove(Ewl_Grid *g, int col)
+{
+ DENTER_FUNCTION(DLEVEL_STABLE);
+ DCHECK_PARAM_PTR("g", g);
+ DCHECK_TYPE("g", g, EWL_GRID_TYPE);
+
+ /*
+ * check bounds
+ */
+ if (col < 0) {
+ DWARNING("parameter 'col' is out of bounds\n");
+ DLEAVE_FUNCTION(DLEVEL_STABLE);
+ }
+ else if (col >= g->cols) {
+ ewl_grid_dimensions_set(g, col + 1, g->rows);
+ }
+
+ g->col_size[col].resize_type = EWL_GRID_RESIZE_NORMAL;
+ g->col_size[col].user.size = 0;
+ g->data_dirty = TRUE;
+
+ ewl_widget_configure(EWL_WIDGET(g));
+
DLEAVE_FUNCTION(DLEVEL_STABLE);
}
/**
* @param g: the grid
* @param row: the row
- * @param relh: the height relative to the size of the grid
+ * @return Returns the current height
+ * @brief Get the current height of a column
+ *
+ * This function returns current width of the column.
+ */
+int
+ewl_grid_row_current_h_get(Ewl_Grid *g, int row)
+{
+ DENTER_FUNCTION(DLEVEL_STABLE);
+ DCHECK_PARAM_PTR_RET("g", g, 0);
+ DCHECK_TYPE_RET("g", g, EWL_GRID_TYPE, 0);
+
+ if ((row >= g->rows) || (row < 0))
+ DRETURN_INT(0, DLEVEL_STABLE);
+
+ DRETURN_INT(g->row_size[row].current_size, DLEVEL_STABLE);
+}
+
+/**
+ * @param g: the grid
+ * @param row: the row
* @param height: the new height
* @return Returns no value.
- * @brief Set the user set height of a row
+ * @brief Set the fixed size of a column
*/
void
-ewl_grid_row_h_set(Ewl_Grid *g, int row, float relh, int height)
+ewl_grid_row_fixed_h_set(Ewl_Grid *g, int row, int height)
{
DENTER_FUNCTION(DLEVEL_STABLE);
DCHECK_PARAM_PTR("g", g);
DCHECK_TYPE("g", g, EWL_GRID_TYPE);
- /* check bounds */
+ /*
+ * check bounds
+ */
if (row < 0) {
+ DWARNING("parameter 'row' is out of bounds\n");
DLEAVE_FUNCTION(DLEVEL_STABLE);
}
else if (row >= g->rows) {
ewl_grid_dimensions_set(g, g->cols, row + 1);
}
- g->row_size[row].override = 1;
- g->row_size[row].size = height;
- g->row_size[row].rel_size = relh;
+ g->row_size[row].resize_type = EWL_GRID_RESIZE_FIXED;
+ g->row_size[row].user.size = height;
+ g->data_dirty = TRUE;
ewl_widget_configure(EWL_WIDGET(g));
@@ -484,34 +658,149 @@
/**
* @param g: the grid
* @param row: the row
- * @param relh: the height relative to the size of the grid
- * @param height: integer pointer to store the height in
- * @return Returns no value.
+ * @return Returns the user set height
* @brief Get the user set height of a row
- *
+ *
* This function returns only the size set by the user.
*/
+int
+ewl_grid_row_fixed_h_get(Ewl_Grid *g, int row)
+{
+ DENTER_FUNCTION(DLEVEL_STABLE);
+ DCHECK_PARAM_PTR_RET("g", g, 0);
+ DCHECK_TYPE_RET("g", g, EWL_GRID_TYPE, 0);
+
+ if ((row >= g->rows) || (row < 0))
+ DRETURN_INT(0, DLEVEL_STABLE);
+
+ DRETURN_INT(g->row_size[row].user.size, DLEVEL_STABLE);
+}
+
+/**
+ * @param g: the grid
+ * @param row: the row
+ * @param height: the new relative height
+ * @return Returns no value.
+ * @brief Set the relative height of a row
+ */
void
-ewl_grid_row_h_get(Ewl_Grid *g, int row, float *relh, int *height)
+ewl_grid_row_relative_h_set(Ewl_Grid *g, int row, float relh)
{
DENTER_FUNCTION(DLEVEL_STABLE);
DCHECK_PARAM_PTR("g", g);
- DCHECK_PARAM_PTR("height", height);
DCHECK_TYPE("g", g, EWL_GRID_TYPE);
- if ((row >= g->rows) || (row < 0)) {
- if (height) *height = 0;
- if (relh) *relh = 0.0;
+ /*
+ * check bounds
+ */
+ if (row < 0) {
+ DWARNING("parameter 'row' is out of bounds\n");
+ DLEAVE_FUNCTION(DLEVEL_STABLE);
}
- else {
- if (height) *height = g->row_size[row].size;
- if (relh) *relh = g->row_size[row].rel_size;
+ else if (row >= g->rows) {
+ ewl_grid_dimensions_set(g, g->cols, row + 1);
}
+ g->row_size[row].resize_type = EWL_GRID_RESIZE_RELATIVE;
+ g->row_size[row].user.rel_size = relh;
+ g->data_dirty = TRUE;
+
+ ewl_widget_configure(EWL_WIDGET(g));
+
DLEAVE_FUNCTION(DLEVEL_STABLE);
}
/**
+ * @param g: the grid
+ * @param row: the row
+ * @return Returns the user set relative height
+ * @brief Get the user set relative height of a row
+ *
+ * This function returns only the relative size set by the user.
+ */
+float
+ewl_grid_row_relative_h_get(Ewl_Grid *g, int row)
+{
+ DENTER_FUNCTION(DLEVEL_STABLE);
+ DCHECK_PARAM_PTR_RET("g", g, 0.0);
+ DCHECK_TYPE_RET("g", g, EWL_GRID_TYPE, 0.0);
+
+ if ((row >= g->rows) || (row < 0))
+ DRETURN_FLOAT(0.0, DLEVEL_STABLE);
+
+ DRETURN_FLOAT(g->row_size[row].user.rel_size, DLEVEL_STABLE);
+}
+
+/**
+ * @param g: the grid
+ * @param row: the row
+ * @return Returns no value.
+ * @brief use the preferred size of the row
+ */
+void
+ewl_grid_row_preferred_h_use(Ewl_Grid *g, int row)
+{
+ DENTER_FUNCTION(DLEVEL_STABLE);
+ DCHECK_PARAM_PTR("g", g);
+ DCHECK_TYPE("g", g, EWL_GRID_TYPE);
+
+ /*
+ * check bounds
+ */
+ if (row < 0) {
+ DWARNING("parameter 'row' is out of bounds\n");
+ DLEAVE_FUNCTION(DLEVEL_STABLE);
+ }
+ else if (row >= g->rows) {
+ ewl_grid_dimensions_set(g, g->cols, row + 1);
+ }
+
+ g->row_size[row].resize_type = EWL_GRID_RESIZE_NONE;
+ g->row_size[row].user.size = 0;
+ g->data_dirty = TRUE;
+
+ ewl_widget_configure(EWL_WIDGET(g));
+
+ DLEAVE_FUNCTION(DLEVEL_STABLE);
+}
+
+/**
+ * @param g: the grid
+ * @param row: the row
+ * @return Returns no value.
+ * @brief remove the user set size
+ */
+void
+ewl_grid_row_h_remove(Ewl_Grid *g, int row)
+{
+ DENTER_FUNCTION(DLEVEL_STABLE);
+ DCHECK_PARAM_PTR("g", g);
+ DCHECK_TYPE("g", g, EWL_GRID_TYPE);
+
+ /*
+ * check bounds
+ */
+ if (row < 0) {
+ DWARNING("parameter 'row' is out of bounds\n");
+ DLEAVE_FUNCTION(DLEVEL_STABLE);
+ }
+ else if (row >= g->rows) {
+ ewl_grid_dimensions_set(g, g->cols, row + 1);
+ }
+
+ g->row_size[row].resize_type = EWL_GRID_RESIZE_NORMAL;
+ g->row_size[row].user.size = 0;
+ g->data_dirty = TRUE;
+
+ ewl_widget_configure(EWL_WIDGET(g));
+
+ DLEAVE_FUNCTION(DLEVEL_STABLE);
+}
+
+
+
+
+/**
* @internal
* @param w: The widget to work with
* @param ev_data: UNUSED
@@ -788,12 +1077,16 @@
rel = 0.0;
fixed = 0;
for (i = 0; i < g->cols; i++) {
- if (g->col_size[i].override) {
- rel += g->col_size[i].rel_size;
- fixed += g->col_size[i].size;
+ switch (g->col_size[i].resize_type) {
+ case EWL_GRID_RESIZE_RELATIVE:
+ rel += g->col_size[i].user.rel_size;
+ break;
+ case EWL_GRID_RESIZE_FIXED:
+ fixed += g->col_size[i].user.size;
+ break;
+ default:
+ fixed += g->col_size[i].preferred_size;
}
- else
- fixed += g->col_size[i].preferred_size;
}
ewl_object_preferred_inner_w_set(EWL_OBJECT(g),
(int)(fixed / (1.0 - rel)));
@@ -814,12 +1107,16 @@
rel = 0.0;
fixed = 0;
for (i = 0; i < g->rows; i++) {
- if (g->row_size[i].override) {
- rel += g->row_size[i].rel_size;
- fixed += g->row_size[i].size;
+ switch (g->col_size[i].resize_type) {
+ case EWL_GRID_RESIZE_RELATIVE:
+ rel += g->row_size[i].user.rel_size;
+ break;
+ case EWL_GRID_RESIZE_FIXED:
+ fixed += g->row_size[i].user.size;
+ break;
+ default:
+ fixed += g->row_size[i].preferred_size;
}
- else
- fixed += g->row_size[i].preferred_size;
}
ewl_object_preferred_inner_h_set(EWL_OBJECT(g),
(int)(fixed / (1.0 - rel)));
@@ -857,35 +1154,49 @@
g->col_size[i].current_size = new_w / g->cols;
}
else {
- int pref_size, fixed_size;
+ int var; /* the variable size part */
+ int fixed; /* the fixed size part */
double rel;
- pref_size = fixed_size = 0;
+ var = fixed = 0;
/*
- * first we calculate the preferred size
+ * first we calculate the different parts of the size
*/
for (i = 0; i < g->cols; i++) {
- if (!g->col_size[i].override)
- pref_size +=
- g->col_size[i].current_size
- = g->col_size[i].preferred_size;
- else
- fixed_size +=
- g->col_size[i].current_size
- = g->col_size[i].size
- + g->col_size[i].rel_size
- * new_w;
+ switch (g->col_size[i].resize_type) {
+ case EWL_GRID_RESIZE_RELATIVE:
+ fixed += g->col_size[i].user.rel_size
+ * new_w;
+ g->col_size[i].current_size =
+ g->col_size[i].user.rel_size
+ * new_w;
+ break;
+ case EWL_GRID_RESIZE_FIXED:
+ fixed += g->col_size[i].user.size;
+ g->col_size[i].current_size =
+ g->col_size[i].user.size;
+ break;
+ case EWL_GRID_RESIZE_NONE:
+ fixed += g->col_size[i].preferred_size;
+ g->col_size[i].current_size =
+ g->col_size[i].preferred_size;
+ break;
+ default:
+ var += g->col_size[i].preferred_size;
+
+ }
}
/*
* we can only distribute the rest size to the
* non-fixed ones
*/
- rel = (double)(new_w - fixed_size) / (double)pref_size;
+ rel = (double)(new_w - fixed) / (double)var;
for (i = 0; i < g->cols; i++)
- if (!g->col_size[i].override)
+ if (g->col_size[i].resize_type ==
EWL_GRID_RESIZE_NORMAL)
g->col_size[i].current_size =
- (int)g->col_size[i].current_size * rel;
+ (int)(g->col_size[i].preferred_size
+ * rel);
}
/*
@@ -896,34 +1207,49 @@
g->row_size[i].current_size = new_h / g->rows;
}
else {
- int pref_size, fixed_size;
+ int var; /* the variable size part */
+ int fixed; /* the fixed size part */
double rel;
- pref_size = fixed_size = 0;
+ var = fixed = 0;
/*
- * first we calculate the preferred size
+ * first we calculate the different parts of the size
*/
for (i = 0; i < g->rows; i++) {
- if (!g->row_size[i].override)
- pref_size +=
- g->row_size[i].current_size
- = g->row_size[i].preferred_size;
- else
- fixed_size +=
- g->row_size[i].current_size
- = g->row_size[i].size
- + g->row_size[i].rel_size
- * new_h;
+ switch (g->row_size[i].resize_type) {
+ case EWL_GRID_RESIZE_RELATIVE:
+ fixed += g->row_size[i].user.rel_size
+ * new_h;
+ g->row_size[i].current_size =
+ g->row_size[i].user.rel_size
+ * new_h;
+ break;
+ case EWL_GRID_RESIZE_FIXED:
+ fixed += g->row_size[i].user.size;
+ g->row_size[i].current_size =
+ g->row_size[i].user.size;
+ break;
+ case EWL_GRID_RESIZE_NONE:
+ fixed += g->row_size[i].preferred_size;
+ g->row_size[i].current_size =
+ g->row_size[i].preferred_size;
+ break;
+ default:
+ var += g->row_size[i].preferred_size;
+
+ }
}
+
/*
- * we can only distribute the rest size
- * to the non-fixed ones
+ * we can only distribute the rest size to the
+ * non-fixed ones
*/
- rel = (double)(new_h - fixed_size) / (double)pref_size;
+ rel = (double)(new_h - fixed) / (double)var;
for (i = 0; i < g->rows; i++)
- if (!g->row_size[i].override)
+ if (g->row_size[i].resize_type ==
EWL_GRID_RESIZE_NORMAL)
g->row_size[i].current_size =
- g->row_size[i].current_size * rel;
+ (int)(g->row_size[i].preferred_size
+ * rel);
}
/*
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_enums.h,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -3 -r1.49 -r1.50
--- ewl_enums.h 10 Jun 2006 00:35:06 -0000 1.49
+++ ewl_enums.h 12 Jul 2006 03:44:19 -0000 1.50
@@ -587,6 +587,23 @@
typedef enum Ewl_Filelist_Event_Type Ewl_Filelist_Event_Type;
/**
+ * @enum Ewl_Grid_Resize_Type
+ * The different ways of resizing a column or a row
+ */
+enum Ewl_Grid_Resize_Type
+{
+ EWL_GRID_RESIZE_NORMAL, /**< use the standard resize methode */
+ EWL_GRID_RESIZE_FIXED, /**< use the user set size */
+ EWL_GRID_RESIZE_RELATIVE, /**< use the user set relative size */
+ EWL_GRID_RESIZE_NONE /**< use the preferred size of the row
*/
+};
+
+/**
+ * The Ewl_Grid_Resize_Type
+ */
+typedef enum Ewl_Grid_Resize_Type Ewl_Grid_Resize_Type;
+
+/**
* @enum Ewl_Mouse_Cursor_Type
* The possible mouse cursor settings
*/
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_grid.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -3 -r1.17 -r1.18
--- ewl_grid.h 10 Jul 2006 03:07:07 -0000 1.17
+++ ewl_grid.h 12 Jul 2006 03:44:19 -0000 1.18
@@ -25,15 +25,18 @@
typedef struct Ewl_Grid_Info Ewl_Grid_Info;
/**
- * Contains information about the Ewl_Grid
+ * Contains information about a row or column of Ewl_Grid
*/
struct Ewl_Grid_Info
{
- int current_size; /**< the current size */
- int size; /**< The size set by the user */
- float rel_size; /**< The relative size */
- int preferred_size; /**< The greatest preferred
size of a widget inside */
- char override; /**< Are there values set by
the user */
+ int current_size; /**< the current size */
+ int preferred_size; /**< The greatest
preferred size of a widget inside */
+ union {
+ int size; /**< The size set by
the user */
+ float rel_size; /**< The relative size
*/
+ } user;
+
+ Ewl_Grid_Resize_Type resize_type; /**< Are there values
set by the user */
};
/**
@@ -95,12 +98,23 @@
int end_row);
void ewl_grid_dimensions_set(Ewl_Grid *g, int col, int row);
+void ewl_grid_dimensions_get(Ewl_Grid *g, int *col, int *row);
-void ewl_grid_column_w_set(Ewl_Grid *g, int col, float relw, int
width);
-void ewl_grid_column_w_get(Ewl_Grid *g, int col, float *relw, int
*width);
-
-void ewl_grid_row_h_set(Ewl_Grid *g, int row, float relh, int
height);
-void ewl_grid_row_h_get(Ewl_Grid *g, int row, float *relh, int
*height);
+int ewl_grid_column_current_w_get(Ewl_Grid *g, int col);
+void ewl_grid_column_fixed_w_set(Ewl_Grid *g, int col, int width);
+int ewl_grid_column_fixed_w_get(Ewl_Grid *g, int col);
+void ewl_grid_column_relative_w_set(Ewl_Grid *g, int col, float
relw);
+float ewl_grid_column_relative_w_get(Ewl_Grid *g, int col);
+void ewl_grid_column_preferred_w_use(Ewl_Grid *g, int col);
+void ewl_grid_column_w_remove(Ewl_Grid *g, int col);
+
+int ewl_grid_row_current_h_get(Ewl_Grid *g, int row);
+void ewl_grid_row_fixed_h_set(Ewl_Grid *g, int row, int height);
+int ewl_grid_row_fixed_h_get(Ewl_Grid *g, int row);
+void ewl_grid_row_relative_h_set(Ewl_Grid *g, int col, float relh);
+float ewl_grid_row_relative_h_get(Ewl_Grid *g, int col);
+void ewl_grid_row_preferred_h_use(Ewl_Grid *g, int col);
+void ewl_grid_row_h_remove(Ewl_Grid *g, int row);
void ewl_grid_orientation_set(Ewl_Grid *g, Ewl_Orientation
orientation);
Ewl_Orientation ewl_grid_orientation_get(Ewl_Grid *g);
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_colorpicker.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -3 -r1.23 -r1.24
--- ewl_colorpicker.c 10 Jul 2006 22:49:03 -0000 1.23
+++ ewl_colorpicker.c 12 Jul 2006 03:44:19 -0000 1.24
@@ -151,7 +151,8 @@
hbox = ewl_grid_new();
ewl_widget_internal_set(hbox, TRUE);
ewl_grid_dimensions_set(EWL_GRID(hbox), 2, 2);
- ewl_grid_homogeneous_set(EWL_GRID(hbox), TRUE);
+ ewl_grid_vhomogeneous_set(EWL_GRID(hbox), TRUE);
+ ewl_grid_column_preferred_w_use(EWL_GRID(hbox), 0);
ewl_container_child_append(EWL_CONTAINER(vbox), hbox);
ewl_object_fill_policy_set(EWL_OBJECT(hbox),
EWL_FLAG_FILL_NONE | EWL_FLAG_FILL_HFILL);
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_table.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- ewl_table.c 11 Jul 2006 01:24:24 -0000 1.19
+++ ewl_table.c 12 Jul 2006 03:44:19 -0000 1.20
@@ -274,7 +274,7 @@
DCHECK_PARAM_PTR("table", table);
DCHECK_TYPE("table", table, EWL_TABLE_TYPE);
- ewl_grid_column_w_set(table->grid, col, 0.0,width);
+ ewl_grid_column_fixed_w_set(table->grid, col, width);
ewl_widget_configure(EWL_WIDGET(table));
DLEAVE_FUNCTION(DLEVEL_STABLE);
@@ -294,7 +294,7 @@
DCHECK_PARAM_PTR("table", table);
DCHECK_TYPE("table", table, EWL_TABLE_TYPE);
- ewl_grid_column_w_get(table->grid, col, NULL, width);
+ if (width) *width = ewl_grid_column_fixed_w_get(table->grid, col);
DLEAVE_FUNCTION(DLEVEL_STABLE);
}
@@ -313,7 +313,8 @@
DCHECK_PARAM_PTR("table", table);
DCHECK_TYPE("table", table, EWL_TABLE_TYPE);
- ewl_grid_row_h_set(table->grid, row, 0.0, height);
+ ewl_grid_row_fixed_h_set(table->grid, row, height);
+
ewl_widget_configure(EWL_WIDGET(table));
DLEAVE_FUNCTION(DLEVEL_STABLE);
@@ -333,7 +334,7 @@
DCHECK_PARAM_PTR("table", table);
DCHECK_TYPE("table", table, EWL_TABLE_TYPE);
- ewl_grid_row_h_get(table->grid, row, NULL, height);
+ if (height) *height = ewl_grid_row_fixed_h_get(table->grid, row);
DLEAVE_FUNCTION(DLEVEL_STABLE);
}
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs