libt3widget
inputselectiondialog.h
1 /* Copyright (C) 2011-2012 G.P. Halkes
2  This program is free software: you can redistribute it and/or modify
3  it under the terms of the GNU General Public License version 3, as
4  published by the Free Software Foundation.
5 
6  This program is distributed in the hope that it will be useful,
7  but WITHOUT ANY WARRANTY; without even the implied warranty of
8  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9  GNU General Public License for more details.
10 
11  You should have received a copy of the GNU General Public License
12  along with this program. If not, see <http://www.gnu.org/licenses/>.
13 */
14 #ifndef T3_WIDGET_INPUTSELECTIONDIALOG_H
15 #define T3_WIDGET_INPUTSELECTIONDIALOG_H
16 
17 #include <string>
18 #include <t3widget/dialogs/dialog.h>
19 #include <t3widget/widgets/frame.h>
20 #include <t3widget/widgets/label.h>
21 #include <t3widget/widgets/checkbox.h>
22 #include <t3widget/widgets/textwindow.h>
23 
24 namespace t3_widget {
25 
26 class T3_WIDGET_API input_selection_dialog_t : public dialog_t {
27  private:
28  struct T3_WIDGET_LOCAL implementation_t {
29  cleanup_ptr<text_buffer_t>::t text;
30  frame_t *text_frame, *label_frame;
31  text_window_t *text_window;
32  label_t *key_label;
33  checkbox_t *enable_simulate_box, *disable_timeout_box;
34  int old_timeout;
35  };
36  pimpl_ptr<implementation_t>::t impl;
37 
38  public:
39  input_selection_dialog_t(int height, int width, text_buffer_t *_text = NULL);
40  virtual bool set_size(optint height, optint width);
41  virtual bool process_key(key_t key);
42  virtual void show(void);
43 
44  void cancel(void);
45  void ok_activated(void);
46  void check_state(void);
47 
48  static text_buffer_t *get_default_text(void);
49 
50  T3_WIDGET_SIGNAL(activate, void);
51 };
52 
53 }; // namespace
54 #endif
A widget displaying a text.
Definition: label.h:26
Definition: textbuffer.h:34
The t3_widget namespace is contains all classes, functions and global variables in the libt3widget li...
Definition: autocompleter.cc:18
long key_t
Integer type holding a single key symbol.
Definition: key.h:24
Class implementing a checkbox.
Definition: checkbox.h:23
Definition: inputselectiondialog.h:26
Class defining values with a separate validity check.
Definition: util.h:29
A widget showing a frame.
Definition: frame.h:26
Definition: textwindow.h:25
Base class for dialogs.
Definition: dialog.h:27