1 /* PSPPIRE - a graphical user interface for PSPP.
2 Copyright (C) 2007, 2010 Free Software Foundation, Inc.
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU 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, see <http://www.gnu.org/licenses/>. */
18 This module implements a keypad widget, similar to that dipicted
38 It's intended for dialog boxes which produce PSPP syntax. Thus,
39 a "insert-syntax" signal is emitted whenever a key is clicked.
40 The signal supports the following callback:
42 void insert_syntax (Keypad *kp, const char *syntax, gpointer user_data);
46 #ifndef __PSPPIRE_KEYPAD_H__
47 #define __PSPPIRE_KEYPAD_H__
51 #include <glib-object.h>
57 #define PSPPIRE_KEYPAD_TYPE (psppire_keypad_get_type ())
58 #define PSPPIRE_KEYPAD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PSPPIRE_KEYPAD_TYPE, Psppire_Keypad))
59 #define PSPPIRE_KEYPAD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PSPPIRE_KEYPAD_TYPE, Psppire_KeypadClass))
60 #define PSPPIRE_IS_KEYPAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PSPPIRE_KEYPAD_TYPE))
61 #define PSPPIRE_IS_KEYPAD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PSPPIRE_KEYPAD_TYPE))
64 typedef struct _PsppireKeypad PsppireKeypad;
65 typedef struct _PsppireKeypadClass PsppireKeypadClass;
67 /* All members are private. */
72 /* Hash of syntax fragments indexed by pointer to widget (button) */
73 GHashTable *frag_table;
76 /* The order of everything here is important */
95 GtkWidget *parentheses;
99 gboolean dispose_has_run;
103 struct _PsppireKeypadClass
105 GtkEventBoxClass parent_class;
106 void (*keypad)(PsppireKeypad*);
110 GType psppire_keypad_get_type (void);
111 GtkWidget* psppire_keypad_new (void);
115 #endif /* __PSPPIRE_KEYPAD_H__ */