Install ardour as a binary, a script and a set of shared
[ardour.git] / libs / gtkmm2 / gtk / gtkmm / messagedialog.h
1 // -*- c++ -*-
2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GTKMM_MESSAGEDIALOG_H
4 #define _GTKMM_MESSAGEDIALOG_H
5
6 #include <glibmm.h>
7
8 /* $Id$ */
9
10 /* messagedialog.h
11  *
12  * Copyright (C) 1998-2002 The gtkmm Development Team
13  *
14  * This library is free software; you can redistribute it and/or
15  * modify it under the terms of the GNU Library General Public
16  * License as published by the Free Software Foundation; either
17  * version 2 of the License, or (at your option) any later version.
18  *
19  * This library is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
22  * Library General Public License for more details.
23  *
24  * You should have received a copy of the GNU Library General Public
25  * License along with this library; if not, write to the Free
26  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27  */
28
29 #include <gtkmm/dialog.h>
30
31
32 #ifndef DOXYGEN_SHOULD_SKIP_THIS
33 typedef struct _GtkMessageDialog GtkMessageDialog;
34 typedef struct _GtkMessageDialogClass GtkMessageDialogClass;
35 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
36
37
38 namespace Gtk
39 { class MessageDialog_Class; } // namespace Gtk
40 namespace Gtk
41 {
42
43
44 /** @addtogroup gtkmmEnums Enums and Flags */
45
46 /**
47  * @ingroup gtkmmEnums
48  */
49 enum MessageType
50 {
51   MESSAGE_INFO,
52   MESSAGE_WARNING,
53   MESSAGE_QUESTION,
54   MESSAGE_ERROR
55 };
56
57 } // namespace Gtk
58
59
60 #ifndef DOXYGEN_SHOULD_SKIP_THIS
61 namespace Glib
62 {
63
64 template <>
65 class Value<Gtk::MessageType> : public Glib::Value_Enum<Gtk::MessageType>
66 {
67 public:
68   static GType value_type() G_GNUC_CONST;
69 };
70
71 } // namespace Glib
72 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
73
74
75 namespace Gtk
76 {
77
78 /**
79  * @ingroup gtkmmEnums
80  */
81 enum ButtonsType
82 {
83   BUTTONS_NONE,
84   BUTTONS_OK,
85   BUTTONS_CLOSE,
86   BUTTONS_CANCEL,
87   BUTTONS_YES_NO,
88   BUTTONS_OK_CANCEL
89 };
90
91 } // namespace Gtk
92
93
94 #ifndef DOXYGEN_SHOULD_SKIP_THIS
95 namespace Glib
96 {
97
98 template <>
99 class Value<Gtk::ButtonsType> : public Glib::Value_Enum<Gtk::ButtonsType>
100 {
101 public:
102   static GType value_type() G_GNUC_CONST;
103 };
104
105 } // namespace Glib
106 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
107
108
109 namespace Gtk
110 {
111
112
113 /** Convenient message window.
114  *
115  * Gtk::MessageDialog presents a dialog with an image representing the type
116  * of message (Error, Question, etc.) alongside some message text. It's
117  * simply a convenience widget; you could construct the equivalent of
118  * Gtk::MessageDialog from Gtk::Dialog without too much effort, but
119  * Gtk::MessageDialog saves typing. 
120  *
121  * @ingroup Dialogs
122  */
123
124 class MessageDialog : public Dialog
125 {
126   public:
127 #ifndef DOXYGEN_SHOULD_SKIP_THIS
128   typedef MessageDialog CppObjectType;
129   typedef MessageDialog_Class CppClassType;
130   typedef GtkMessageDialog BaseObjectType;
131   typedef GtkMessageDialogClass BaseClassType;
132 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
133
134   virtual ~MessageDialog();
135
136 #ifndef DOXYGEN_SHOULD_SKIP_THIS
137
138 private:
139   friend class MessageDialog_Class;
140   static CppClassType messagedialog_class_;
141
142   // noncopyable
143   MessageDialog(const MessageDialog&);
144   MessageDialog& operator=(const MessageDialog&);
145
146 protected:
147   explicit MessageDialog(const Glib::ConstructParams& construct_params);
148   explicit MessageDialog(GtkMessageDialog* castitem);
149
150 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
151
152 public:
153 #ifndef DOXYGEN_SHOULD_SKIP_THIS
154   static GType get_type()      G_GNUC_CONST;
155   static GType get_base_type() G_GNUC_CONST;
156 #endif
157
158   ///Provides access to the underlying C GtkObject.
159   GtkMessageDialog*       gobj()       { return reinterpret_cast<GtkMessageDialog*>(gobject_); }
160
161   ///Provides access to the underlying C GtkObject.
162   const GtkMessageDialog* gobj() const { return reinterpret_cast<GtkMessageDialog*>(gobject_); }
163
164
165 public:
166   //C++ methods used to invoke GTK+ virtual functions:
167
168 protected:
169   //GTK+ Virtual Functions (override these to change behaviour):
170
171   //Default Signal Handlers::
172
173
174 private:
175
176   
177 public:
178   explicit MessageDialog(const Glib::ustring& message, bool use_markup = false, MessageType type = MESSAGE_INFO, ButtonsType buttons = BUTTONS_OK, bool modal = false);
179   MessageDialog(Gtk::Window& parent, const Glib::ustring& message, bool use_markup = false, MessageType type = MESSAGE_INFO, ButtonsType buttons = BUTTONS_OK, bool modal = false);
180   
181
182   /** @deprecated Use set_message(string, true);
183    */
184   
185   /** Sets the text of the message dialog to be @a str , which is marked
186    * up with the Pango text markup
187    * language.
188    * 
189    * Since: 2.4
190    * @param str Markup string (see Pango markup format).
191    */
192   void set_markup(const Glib::ustring& str);
193
194   /** Sets the primary text of the message dialog.
195    *
196    * @param text The message.
197    * @param use_markup Whether @a message contains pango markup.
198    */
199   void set_message(const Glib::ustring& message, bool use_markup = false);
200   
201   
202   /** Sets the secondary text of the message dialog.
203    * Note that setting a secondary text makes the primary text become bold, unless you have provided explicit markup.
204    *
205    * Since 2.6.
206    *
207    * @param text The message.
208    * @param use_markup Whether @a message contains pango markup.
209    */
210   void set_secondary_text(const Glib::ustring& text, bool use_markup = false);
211   
212
213 };
214
215 } // namespace Gtk
216
217
218 namespace Glib
219 {
220   /** @relates Gtk::MessageDialog
221    * @param object The C instance
222    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
223    * @result A C++ instance that wraps this C instance.
224    */
225   Gtk::MessageDialog* wrap(GtkMessageDialog* object, bool take_copy = false);
226 }
227 #endif /* _GTKMM_MESSAGEDIALOG_H */
228