X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-acr.h;h=ba38631d22dadbce0c10fcba79ca65609e08ee3b;hb=c65449a628d13f4683e7dc7125874608c7152017;hp=9983a9efb55aed0fd6c22ca6b2f8d7023f6c681f;hpb=ccf449c7dc6ecea4d94303ad1865512f3c149cc6;p=pspp-builds.git diff --git a/src/ui/gui/psppire-acr.h b/src/ui/gui/psppire-acr.h index 9983a9ef..ba38631d 100644 --- a/src/ui/gui/psppire-acr.h +++ b/src/ui/gui/psppire-acr.h @@ -35,7 +35,8 @@ |+------------+ +----------+ | +-----------------------------+ - It interacts with a GtkEntry, which allows items to be added to its internal list. + It interacts with an external widget, such as a GtkEntry. + It maintains a list of items controlled by the three buttons. This implementation deals only with g_double values. */ @@ -59,20 +60,33 @@ G_BEGIN_DECLS typedef struct _PsppireAcr PsppireAcr; typedef struct _PsppireAcrClass PsppireAcrClass; -/* All members are private. */ +typedef gboolean (*GetValueFunc) (gint, GValue *, gpointer); +typedef gboolean (*EnabledFunc) (gpointer); +typedef void (*UpdateCallbackFunc) (gpointer); + struct _PsppireAcr { GtkHBox parent; - /* */ - GtkEntry *entry; + GtkListStore *list_store; GtkTreeView *tv; GtkTreeSelection *selection; + + /* The buttons */ GtkWidget *add_button; GtkWidget *change_button; GtkWidget *remove_button; + + GetValueFunc get_value; + gpointer get_value_data; + + EnabledFunc enabled; + gpointer enabled_data; + + UpdateCallbackFunc update; + gpointer update_data; }; @@ -82,11 +96,20 @@ struct _PsppireAcrClass }; -GType psppire_acr_get_type (void); -GtkWidget* psppire_acr_new (void); -void psppire_acr_set_entry (PsppireAcr *, GtkEntry *); -void psppire_acr_set_model (PsppireAcr *, GtkListStore *); +GType psppire_acr_get_type (void); +GtkWidget* psppire_acr_new (void); + +void psppire_acr_set_model (PsppireAcr *, GtkListStore *); +void psppire_acr_set_get_value_func (PsppireAcr *, GetValueFunc, + gpointer); + +void psppire_acr_set_enable_func (PsppireAcr *, EnabledFunc, gpointer); + +void psppire_acr_set_enabled (PsppireAcr *, gboolean); +void psppire_acr_set_entry (PsppireAcr *, GtkEntry *); + + G_END_DECLS