1 /* PSPP - computes sample statistics.
2 Copyright (C) 2007 Free Software Foundation, Inc.
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License as
6 published by the Free Software Foundation; either version 2 of the
7 License, or (at your option) any later version.
9 This program is distributed in the hope that it will be useful, but
10 WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20 This module implements a keypad widget, similar to that dipicted
40 It's intended for dialog boxes which produce PSPP syntax. Thus,
41 a "insert-syntax" signal is emitted whenever a key is clicked.
42 The signal supports the following callback:
44 void insert_syntax (Keypad *kp, const char *syntax, gpointer user_data);
48 #ifndef __PSPPIRE_KEYPAD_H__
49 #define __PSPPIRE_KEYPAD_H__
53 #include <glib-object.h>
54 #include <gtk/gtkeventbox.h>
55 #include <gtk/gtktable.h>
60 #define PSPPIRE_KEYPAD_TYPE (psppire_keypad_get_type ())
61 #define PSPPIRE_KEYPAD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PSPPIRE_KEYPAD_TYPE, Psppire_Keypad))
62 #define PSPPIRE_KEYPAD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PSPPIRE_KEYPAD_TYPE, Psppire_KeypadClass))
63 #define PSPPIRE_IS_KEYPAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PSPPIRE_KEYPAD_TYPE))
64 #define PSPPIRE_IS_KEYPAD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PSPPIRE_KEYPAD_TYPE))
67 typedef struct _PsppireKeypad PsppireKeypad;
68 typedef struct _PsppireKeypadClass PsppireKeypadClass;
70 /* All members are private. */
75 /* Hash of syntax fragments indexed by pointer to widget (button) */
76 GHashTable *frag_table;
79 /* The order of everything here is important */
98 GtkWidget *parentheses;
102 gboolean dispose_has_run;
106 struct _PsppireKeypadClass
108 GtkTableClass parent_class;
109 void (*keypad)(PsppireKeypad*);
113 GType psppire_keypad_get_type (void);
114 GtkWidget* psppire_keypad_new (void);
118 #endif /* __PSPPIRE_KEYPAD_H__ */