libt3widget
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups
messagedialog.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_MESSAGEDIALOG_H
15 #define T3_WIDGET_MESSAGEDIALOG_H
16 
17 #include <string>
18 #include <t3widget/dialogs/dialog.h>
19 #include <t3widget/widgets/button.h>
20 #include <t3widget/widgets/textwindow.h>
21 
22 namespace t3_widget {
23 
24 class text_line_t;
25 
26 class T3_WIDGET_API message_dialog_t : public dialog_t {
27  private:
28  struct T3_WIDGET_LOCAL implementation_t {
29  text_window_t *text_window;
30  int height, max_text_height;
31 
32  implementation_t(void);
33  };
34  pimpl_ptr<implementation_t>::t impl;
35 
36  virtual bool process_key(key_t key);
37 
38  T3_WIDGET_SIGNAL(activate_internal, void);
39 
40  public:
41  message_dialog_t(int width, const char *_title, ...);
42  virtual ~message_dialog_t(void);
43  void set_message(const char *message, size_t length);
44  void set_message(const char *message);
45  void set_message(const std::string *message);
46  void set_max_text_height(int max);
47 
48  sigc::connection connect_activate(const sigc::slot<void> &_slot, size_t idx);
49 };
50 
51 }; // namespace
52 #endif
53 
long key_t
Integer type holding a single key symbol.
Definition: key.h:24
Definition: messagedialog.h:26
Definition: textwindow.h:25
Base class for dialogs.
Definition: dialog.h:27