Ardour  8.7-15-gadf511264b
toolbar.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 // Generated by gmmproc 2.45.3 -- DO NOT MODIFY!
3 #ifndef _GTKMM_TOOLBAR_H
4 #define _GTKMM_TOOLBAR_H
5 
6 #include <gtkmmconfig.h>
7 
8 
9 #include <glibmm/ustring.h>
10 #include <sigc++/sigc++.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 Lesser General Public
16  * License as published by the Free Software Foundation; either
17  * version 2.1 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  * Lesser General Public License for more details.
23  *
24  * You should have received a copy of the GNU Lesser 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  // This is for including the config header before any code (such as
30 // the #ifndef GTKMM_DISABLE_DEPRECATED in deprecated classes) is generated:
31 
32 
33 #include <gtkmm/toolitem.h>
34 #include <gtkmm/toolbutton.h>
35 #include <gtkmm/toggletoolbutton.h>
36 #include <glibmm/helperlist.h>
37 #include <gtkmm/container.h>
38 #include <gtkmm/stockid.h>
39 
40 
41 #ifndef DOXYGEN_SHOULD_SKIP_THIS
42 typedef struct _GtkToolbar GtkToolbar;
43 typedef struct _GtkToolbarClass GtkToolbarClass;
44 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
45 
46 
47 namespace Gtk
48 { class Toolbar_Class; } // namespace Gtk
49 namespace Gtk
50 {
51 
52 //TODO: Derive from Toolshell when we can break ABI.
59 class Toolbar : public Container
60 {
61  public:
62 #ifndef DOXYGEN_SHOULD_SKIP_THIS
63  typedef Toolbar CppObjectType;
64  typedef Toolbar_Class CppClassType;
65  typedef GtkToolbar BaseObjectType;
66  typedef GtkToolbarClass BaseClassType;
67 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
68 
69  virtual ~Toolbar();
70 
71 #ifndef DOXYGEN_SHOULD_SKIP_THIS
72 
73 private:
74  friend class Toolbar_Class;
75  static CppClassType toolbar_class_;
76 
77  // noncopyable
78  Toolbar(const Toolbar&);
79  Toolbar& operator=(const Toolbar&);
80 
81 protected:
82  explicit Toolbar(const Glib::ConstructParams& construct_params);
83  explicit Toolbar(GtkToolbar* castitem);
84 
85 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
86 
87 public:
88 #ifndef DOXYGEN_SHOULD_SKIP_THIS
89  static GType get_type() G_GNUC_CONST;
90 
91 
92  static GType get_base_type() G_GNUC_CONST;
93 #endif
94 
96  GtkToolbar* gobj() { return reinterpret_cast<GtkToolbar*>(gobject_); }
97 
99  const GtkToolbar* gobj() const { return reinterpret_cast<GtkToolbar*>(gobject_); }
100 
101 
102 public:
103  //C++ methods used to invoke GTK+ virtual functions:
104 
105 protected:
106  //GTK+ Virtual Functions (override these to change behaviour):
107 
108  //Default Signal Handlers::
110  virtual void on_orientation_changed(Orientation orientation);
114  virtual bool on_popup_context_menu(int x, int y, int button_number);
115 
116 
117 private:
118 
119 public:
121 
122 
130  void insert(ToolItem& item, int pos);
131  void insert(ToolButton& item, int pos, const sigc::slot<void>& clicked_slot);
132  void insert(ToggleToolButton& item, int pos, const sigc::slot<void>& toggled_slot);
133 
134  void append(ToolItem& item);
135  void append(ToolButton& item, const sigc::slot<void>& clicked_slot);
136  void append(ToggleToolButton& item, const sigc::slot<void>& toggled_slot);
137 
138  void prepend(ToolItem& item);
139  void prepend(ToolButton& item, const sigc::slot<void>& clicked_slot);
140  void prepend(ToggleToolButton& item, const sigc::slot<void>& toggled_slot);
141 
142 
149  int get_item_index(const ToolItem& item) const;
150 
155  int get_n_items() const;
156 
165 
173  const ToolItem* get_nth_item(int n) const;
174 
180  bool get_show_arrow() const;
181 
189  void set_show_arrow(bool show_arrow = true);
190 
191 /* Style methods */
192 
193  // TODO: Remove these when we derive from ToolShell, which has the same methods:
194 
201  void set_orientation(Orientation orientation);
202 
211 
212 
218 
225 
226 
227 #ifndef GTKMM_DISABLE_DEPRECATED
228 
238  void set_tooltips(bool enable = true);
239 #endif // GTKMM_DISABLE_DEPRECATED
240 
241 
242 #ifndef GTKMM_DISABLE_DEPRECATED
243 
254  bool get_tooltips() const;
255 #endif // GTKMM_DISABLE_DEPRECATED
256 
257 
262 
263  //Note that gtk_toolbar_set_icon_size() and gtk_toolbar_unset_icon_size() were
264  //deprecated sometime before GTK+ 2.4, but were undeprecated in GTK+ 2.12.
265 
277  void set_icon_size(IconSize icon_size);
278 
283 
284 
291 
292 
299 
311  int get_drop_index(int x, int y) const;
312 
326  void set_drop_highlight_item(ToolItem& tool_item, int index);
328 
329 
339  Glib::SignalProxy1< void,Orientation > signal_orientation_changed();
340 
341 
351  Glib::SignalProxy1< void,ToolbarStyle > signal_toolbar_style_changed();
352 
353 
373  Glib::SignalProxy3< bool,int,int,int > signal_popup_context_menu();
374 
375 
376  //gtkmmproc error: move_focus : ignored signal defs lookup failed
377 
378 
379  #ifndef GTKMM_DISABLE_DEPRECATED
380  //This was called get_tooltips_object() to avoid a clash with get_tooltips(), which just says whether they are enabled.
383  #endif //GTKMM_DISABLE_DEPRECATED
384 
385  //Ignore deprecated GtkToolbarAPI:
386  //Normally we just deprecate it in gtkmm too,
387  //but the GtkToolbar compatibility system is particularly unpleasant, so we just removed it in gtkmm 2.4. murrayc.
388 
389 
395  Glib::PropertyProxy< Orientation > property_orientation() ;
396 
402  Glib::PropertyProxy_ReadOnly< Orientation > property_orientation() const;
403 
409  Glib::PropertyProxy< ToolbarStyle > property_toolbar_style() ;
410 
416  Glib::PropertyProxy_ReadOnly< ToolbarStyle > property_toolbar_style() const;
417 
423  Glib::PropertyProxy< bool > property_show_arrow() ;
424 
430  Glib::PropertyProxy_ReadOnly< bool > property_show_arrow() const;
431 
437  Glib::PropertyProxy< bool > property_tooltips() ;
438 
444  Glib::PropertyProxy_ReadOnly< bool > property_tooltips() const;
445 
451  Glib::PropertyProxy< IconSize > property_icon_size() ;
452 
458  Glib::PropertyProxy_ReadOnly< IconSize > property_icon_size() const;
459 
465  Glib::PropertyProxy< bool > property_icon_size_set() ;
466 
472  Glib::PropertyProxy_ReadOnly< bool > property_icon_size_set() const;
473 
474 
475 };
476 
477 } // namespace Gtk
478 
479 
480 namespace Glib
481 {
490  Gtk::Toolbar* wrap(GtkToolbar* object, bool take_copy = false);
491 } //namespace Glib
492 
493 
494 #endif /* _GTKMM_TOOLBAR_H */
495 
Glib::SignalProxy3< bool, int, int, int > signal_popup_context_menu()
bool get_tooltips() const
Glib::PropertyProxy< bool > property_show_arrow()
void insert(ToolItem &item, int pos)
ToolbarStyle get_toolbar_style() const
void set_orientation(Orientation orientation)
const GtkToolbar * gobj() const
Provides access to the underlying C GtkObject.
Definition: toolbar.h:99
void insert(ToolButton &item, int pos, const sigc::slot< void > &clicked_slot)
void unset_icon_size()
Glib::PropertyProxy< bool > property_icon_size_set()
Glib::PropertyProxy_ReadOnly< bool > property_icon_size_set() const
virtual void on_toolbar_style_changed(ToolbarStyle style)
This is a default handler for the signal signal_toolbar_style_changed().
Tooltips * get_tooltips_object() const
Glib::PropertyProxy_ReadOnly< bool > property_tooltips() const
Glib::PropertyProxy< bool > property_tooltips()
int get_item_index(const ToolItem &item) const
bool get_show_arrow() const
Glib::PropertyProxy_ReadOnly< ToolbarStyle > property_toolbar_style() const
void insert(ToggleToolButton &item, int pos, const sigc::slot< void > &toggled_slot)
void unset_toolbar_style()
IconSize get_icon_size() const
Glib::PropertyProxy_ReadOnly< IconSize > property_icon_size() const
void set_icon_size(IconSize icon_size)
void append(ToolItem &item)
Gtk::Toolbar * wrap(GtkToolbar *object, bool take_copy=false)
void set_show_arrow(bool show_arrow=true)
virtual void on_orientation_changed(Orientation orientation)
This is a default handler for the signal signal_orientation_changed().
Glib::PropertyProxy_ReadOnly< Orientation > property_orientation() const
Orientation get_orientation() const
virtual bool on_popup_context_menu(int x, int y, int button_number)
This is a default handler for the signal signal_popup_context_menu().
void unset_drop_highlight_item()
GtkToolbar * gobj()
Provides access to the underlying C GtkObject.
Definition: toolbar.h:96
Glib::PropertyProxy_ReadOnly< bool > property_show_arrow() const
void set_toolbar_style(ToolbarStyle style)
void prepend(ToolButton &item, const sigc::slot< void > &clicked_slot)
void set_tooltips(bool enable=true)
void prepend(ToolItem &item)
int get_drop_index(int x, int y) const
Glib::PropertyProxy< ToolbarStyle > property_toolbar_style()
Glib::SignalProxy1< void, ToolbarStyle > signal_toolbar_style_changed()
void prepend(ToggleToolButton &item, const sigc::slot< void > &toggled_slot)
int get_n_items() const
void set_drop_highlight_item(ToolItem &tool_item, int index)
const ToolItem * get_nth_item(int n) const
Glib::PropertyProxy< Orientation > property_orientation()
ReliefStyle get_relief_style() const
void append(ToolButton &item, const sigc::slot< void > &clicked_slot)
virtual ~Toolbar()
void append(ToggleToolButton &item, const sigc::slot< void > &toggled_slot)
Glib::SignalProxy1< void, Orientation > signal_orientation_changed()
Glib::PropertyProxy< IconSize > property_icon_size()
ToolItem * get_nth_item(int n)
Definition: ardour_ui.h:188