Ardour  9.0-pre0-384-ga76afae0e9
dialog.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 // Generated by gmmproc 2.45.3 -- DO NOT MODIFY!
3 #ifndef _GTKMM_DIALOG_H
4 #define _GTKMM_DIALOG_H
5 
6 
7 #include <glibmm/ustring.h>
8 #include <sigc++/sigc++.h>
9 
10 /* $Id: dialog.hg,v 1.8 2006/03/22 16:53:22 murrayc Exp $ */
11 
12 /* dialog.h
13  *
14  * Copyright (C) 1998-2002 The gtkmm Development Team
15  *
16  * This library is free software; you can redistribute it and/or
17  * modify it under the terms of the GNU Lesser General Public
18  * License as published by the Free Software Foundation; either
19  * version 2.1 of the License, or (at your option) any later version.
20  *
21  * This library is distributed in the hope that it will be useful,
22  * but WITHOUT ANY WARRANTY; without even the implied warranty of
23  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24  * Lesser General Public License for more details.
25  *
26  * You should have received a copy of the GNU Lesser General Public
27  * License along with this library; if not, write to the Free
28  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
29  */
30 
31 #include <gtkmm/box.h>
32 #include <gtkmm/window.h>
33 #include <gtkmm/button.h>
34 #include <gtkmm/buttonbox.h>
35 
36 
37 #ifndef DOXYGEN_SHOULD_SKIP_THIS
38 typedef struct _GtkDialog GtkDialog;
39 typedef struct _GtkDialogClass GtkDialogClass;
40 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
41 
42 
43 namespace Gtk
44 { class Dialog_Class; } // namespace Gtk
45 namespace Gtk
46 {
47 
59 {
70  RESPONSE_HELP = -11
71 };
72 
73 } // namespace Gtk
74 
75 
76 #ifndef DOXYGEN_SHOULD_SKIP_THIS
77 namespace Glib
78 {
79 
80 template <>
81 class Value<Gtk::ResponseType> : public Glib::Value_Enum<Gtk::ResponseType>
82 {
83 public:
84  static GType value_type() G_GNUC_CONST;
85 };
86 
87 } // namespace Glib
88 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
89 
90 
91 namespace Gtk
92 {
93 
94 
125 class Dialog : public Window
126 {
127  public:
128 #ifndef DOXYGEN_SHOULD_SKIP_THIS
129  typedef Dialog CppObjectType;
130  typedef Dialog_Class CppClassType;
131  typedef GtkDialog BaseObjectType;
132  typedef GtkDialogClass BaseClassType;
133 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
134 
135  virtual ~Dialog();
136 
137 #ifndef DOXYGEN_SHOULD_SKIP_THIS
138 
139 private:
140  friend class Dialog_Class;
141  static CppClassType dialog_class_;
142 
143  // noncopyable
144  Dialog(const Dialog&);
145  Dialog& operator=(const Dialog&);
146 
147 protected:
148  explicit Dialog(const Glib::ConstructParams& construct_params);
149  explicit Dialog(GtkDialog* castitem);
150 
151 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
152 
153 public:
154 #ifndef DOXYGEN_SHOULD_SKIP_THIS
155  static GType get_type() G_GNUC_CONST;
156 
157 
158  static GType get_base_type() G_GNUC_CONST;
159 #endif
160 
162  GtkDialog* gobj() { return reinterpret_cast<GtkDialog*>(gobject_); }
163 
165  const GtkDialog* gobj() const { return reinterpret_cast<GtkDialog*>(gobject_); }
166 
167 
168 public:
169  //C++ methods used to invoke GTK+ virtual functions:
170 
171 protected:
172  //GTK+ Virtual Functions (override these to change behaviour):
173 
174  //Default Signal Handlers::
176  virtual void on_response(int response_id);
177 
178 
179 private:
180 
181 
182 public:
184  explicit Dialog(const Glib::ustring& title, bool modal = false, bool use_separator = false);
185  Dialog(const Glib::ustring& title, Gtk::Window& parent, bool modal = false, bool use_separator = false);
186 
187 
198  void add_action_widget(Widget& child, int response_id);
199 
210  Button* add_button(const Glib::ustring& button_text, int response_id);
211 
222  Button* add_button(const Gtk::StockID& stock_id, int response_id);
223 
231  void set_response_sensitive(int response_id, bool setting = true);
232 
239  void set_default_response(int response_id);
240 
247  Widget* get_widget_for_response(int response_id);
248 
255  const Widget* get_widget_for_response(int response_id) const;
256 
264  int get_response_for_widget(const Gtk::Widget& widget) const;
265 
272  void set_has_separator(bool setting = true);
273 
280  bool get_has_separator() const;
281 
282 
296  static bool alternative_button_order(const Glib::RefPtr<const Gdk::Screen>& screen);
297 
312  void set_alternative_button_order_from_array(const Glib::ArrayHandle<int>& new_order);
313 
314 
322  void response(int response_id);
323 
355  int run();
356 
357  // This previously returned an HButtonBox*, which broke on Maemo Fremantle.
358  // Changed post-2.18.2
359 
365 
370  const ButtonBox* get_action_area() const;
371 
372  //TODO: Rename to get_content_area() when we do an ABI break.
373  //We kept it as get_vbox() when reimplementing a MEMBER_GET with this new C function:
374 
380 
385  const VBox* get_vbox() const;
386 
392  Glib::PropertyProxy< bool > property_has_separator() ;
393 
399  Glib::PropertyProxy_ReadOnly< bool > property_has_separator() const;
400 
401 
408  Glib::SignalProxy1< void,int > signal_response();
409 
410 
411  //_WRAP_PROPERTY("has-separator", bool) //deprecated.
412 
413 
414 protected:
415  void construct_(bool modal, bool use_separator);
416 
417 
418 };
419 
420 } /* namespace Gtk */
421 
422 
423 namespace Glib
424 {
433  Gtk::Dialog* wrap(GtkDialog* object, bool take_copy = false);
434 } //namespace Glib
435 
436 
437 #endif /* _GTKMM_DIALOG_H */
438 
void set_response_sensitive(int response_id, bool setting=true)
void add_action_widget(Widget &child, int response_id)
Gtk::Dialog * wrap(GtkDialog *object, bool take_copy=false)
virtual ~Dialog()
Dialog(const Glib::ustring &title, bool modal=false, bool use_separator=false)
int get_response_for_widget(const Gtk::Widget &widget) const
const VBox * get_vbox() const
Dialog(const Glib::ustring &title, Gtk::Window &parent, bool modal=false, bool use_separator=false)
const GtkDialog * gobj() const
Provides access to the underlying C GtkObject.
Definition: dialog.h:165
void response(int response_id)
Glib::SignalProxy1< void, int > signal_response()
const Widget * get_widget_for_response(int response_id) const
Glib::PropertyProxy_ReadOnly< bool > property_has_separator() const
const ButtonBox * get_action_area() const
void set_default_response(int response_id)
bool get_has_separator() const
virtual void on_response(int response_id)
This is a default handler for the signal signal_response().
GtkDialog * gobj()
Provides access to the underlying C GtkObject.
Definition: dialog.h:162
void set_alternative_button_order_from_array(const Glib::ArrayHandle< int > &new_order)
VBox * get_vbox()
Button * add_button(const Gtk::StockID &stock_id, int response_id)
void set_has_separator(bool setting=true)
Button * add_button(const Glib::ustring &button_text, int response_id)
static bool alternative_button_order(const Glib::RefPtr< const Gdk::Screen > &screen)
void construct_(bool modal, bool use_separator)
Glib::PropertyProxy< bool > property_has_separator()
ButtonBox * get_action_area()
Widget * get_widget_for_response(int response_id)
ResponseType
Definition: dialog.h:59
@ RESPONSE_APPLY
Definition: dialog.h:69
@ RESPONSE_CLOSE
Definition: dialog.h:66
@ RESPONSE_HELP
Definition: dialog.h:70
@ RESPONSE_YES
Definition: dialog.h:67
@ RESPONSE_NONE
Definition: dialog.h:60
@ RESPONSE_CANCEL
Definition: dialog.h:65
@ RESPONSE_OK
Definition: dialog.h:64
@ RESPONSE_REJECT
Definition: dialog.h:61
@ RESPONSE_NO
Definition: dialog.h:68
@ RESPONSE_DELETE_EVENT
Definition: dialog.h:63
@ RESPONSE_ACCEPT
Definition: dialog.h:62
Definition: ardour_ui.h:187
Definition: lobject.h:100