aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-cell-text.h
diff options
context:
space:
mode:
authorDamon Chaplin <damon@ximian.com>2001-10-23 06:33:20 +0800
committerDamon Chaplin <damon@src.gnome.org>2001-10-23 06:33:20 +0800
commitb89da79e8c9a5db367cdff556ce024962b2cca82 (patch)
tree19823590a819dca96a2ab6591f403e3dea2a4075 /widgets/table/e-cell-text.h
parent798623d52b0bdf8a77fa7c6a0d1d12c180f3cbe5 (diff)
downloadgsoc2013-evolution-b89da79e8c9a5db367cdff556ce024962b2cca82.tar
gsoc2013-evolution-b89da79e8c9a5db367cdff556ce024962b2cca82.tar.gz
gsoc2013-evolution-b89da79e8c9a5db367cdff556ce024962b2cca82.tar.bz2
gsoc2013-evolution-b89da79e8c9a5db367cdff556ce024962b2cca82.tar.lz
gsoc2013-evolution-b89da79e8c9a5db367cdff556ce024962b2cca82.tar.xz
gsoc2013-evolution-b89da79e8c9a5db367cdff556ce024962b2cca82.tar.zst
gsoc2013-evolution-b89da79e8c9a5db367cdff556ce024962b2cca82.zip
added set_value() class method, which sets the model value based on the
2001-10-22 Damon Chaplin <damon@ximian.com> * e-cell-text.[hc]: added set_value() class method, which sets the model value based on the text. In ECellText itself it assumes the model value is a char* and passes the text directly. Subclasses may parse the text into some other datatype. Also made the calls the e_cell_text_get_text(), e_cell_text_free_text() and e_cell_text_set_value() public, since we need them in ECellCombo. * e-cell-combo.c (e_cell_combo_select_matching_item): (e_cell_combo_update_cell): use e_cell_text_get_text()/free_text()/ set_value() so it can handle subclasses of ECellText as the child. svn path=/trunk/; revision=13901
Diffstat (limited to 'widgets/table/e-cell-text.h')
-rw-r--r--widgets/table/e-cell-text.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/widgets/table/e-cell-text.h b/widgets/table/e-cell-text.h
index 078f8e7629..e5dfd54b71 100644
--- a/widgets/table/e-cell-text.h
+++ b/widgets/table/e-cell-text.h
@@ -69,12 +69,24 @@ typedef struct {
char *(*get_text) (ECellText *cell, ETableModel *model, int col, int row);
void (*free_text) (ECellText *cell, char *text);
+ void (*set_value) (ECellText *cell, ETableModel *model, int col, int row, const char *text);
} ECellTextClass;
GtkType e_cell_text_get_type (void);
ECell *e_cell_text_new (const char *fontname, GtkJustification justify);
ECell *e_cell_text_construct(ECellText *cell, const char *fontname, GtkJustification justify);
+/* Gets the value from the model and converts it into a string. In ECellText
+ itself, the value is assumed to be a char* and so needs no conversion.
+ In subclasses the ETableModel value may be a more complicated datatype. */
+char *e_cell_text_get_text (ECellText *cell, ETableModel *model, int col, int row);
+
+/* Frees the value returned by e_cell_text_get_text(). */
+void e_cell_text_free_text (ECellText *cell, char *text);
+
+/* Sets the ETableModel value, based on the given string. */
+void e_cell_text_set_value (ECellText *cell, ETableModel *model, int col, int row, const char *text);
+
END_GNOME_DECLS
#endif /* _E_CELL_TEXT_H_ */