Ardour  9.7-32-g168326e8b0
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 <ytkmm/ytkmmconfig.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 <ytkmm/toolitem.h>
34 #include <ytkmm/toolbutton.h>
35 #include <ytkmm/toggletoolbutton.h>
36 #include <ytkmm/container.h>
37 #include <ytkmm/stockid.h>
38 
39 
40 #ifndef DOXYGEN_SHOULD_SKIP_THIS
41 typedef struct _GtkToolbar GtkToolbar;
42 typedef struct _GtkToolbarClass GtkToolbarClass;
43 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
44 
45 
46 namespace Gtk
47 { class Toolbar_Class; } // namespace Gtk
48 namespace Gtk
49 {
50 
51 //TODO: Derive from Toolshell when we can break ABI.
58 class Toolbar : public Container
59 {
60  public:
61 #ifndef DOXYGEN_SHOULD_SKIP_THIS
62  typedef Toolbar CppObjectType;
63  typedef Toolbar_Class CppClassType;
64  typedef GtkToolbar BaseObjectType;
65  typedef GtkToolbarClass BaseClassType;
66 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
67 
68  virtual ~Toolbar();
69 
70 #ifndef DOXYGEN_SHOULD_SKIP_THIS
71 
72 private:
73  friend class Toolbar_Class;
74  static CppClassType toolbar_class_;
75 
76  // noncopyable
77  Toolbar(const Toolbar&);
78  Toolbar& operator=(const Toolbar&);
79 
80 protected:
81  explicit Toolbar(const Glib::ConstructParams& construct_params);
82  explicit Toolbar(GtkToolbar* castitem);
83 
84 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
85 
86 public:
87 #ifndef DOXYGEN_SHOULD_SKIP_THIS
88  static GType get_type() G_GNUC_CONST;
89 
90 
91  static GType get_base_type() G_GNUC_CONST;
92 #endif
93 
95  GtkToolbar* gobj() { return reinterpret_cast<GtkToolbar*>(gobject_); }
96 
98  const GtkToolbar* gobj() const { return reinterpret_cast<GtkToolbar*>(gobject_); }
99 
100 
101 public:
102  //C++ methods used to invoke GTK+ virtual functions:
103 
104 protected:
105  //GTK+ Virtual Functions (override these to change behaviour):
106 
107  //Default Signal Handlers::
109  virtual void on_orientation_changed(Orientation orientation);
113  virtual bool on_popup_context_menu(int x, int y, int button_number);
114 
115 
116 private:
117 
118 public:
120 
121 
129  void insert(ToolItem& item, int pos);
130  void insert(ToolButton& item, int pos, const sigc::slot<void>& clicked_slot);
131  void insert(ToggleToolButton& item, int pos, const sigc::slot<void>& toggled_slot);
132 
133  void append(ToolItem& item);
134  void append(ToolButton& item, const sigc::slot<void>& clicked_slot);
135  void append(ToggleToolButton& item, const sigc::slot<void>& toggled_slot);
136 
137  void prepend(ToolItem& item);
138  void prepend(ToolButton& item, const sigc::slot<void>& clicked_slot);
139  void prepend(ToggleToolButton& item, const sigc::slot<void>& toggled_slot);
140 
141 
148  int get_item_index(const ToolItem& item) const;
149 
154  int get_n_items() const;
155 
164 
172  const ToolItem* get_nth_item(int n) const;
173 
179  bool get_show_arrow() const;
180 
188  void set_show_arrow(bool show_arrow = true);
189 
190 /* Style methods */
191 
192  // TODO: Remove these when we derive from ToolShell, which has the same methods:
193 
200  void set_orientation(Orientation orientation);
201 
210 
211 
217 
224 
225 
226 #ifndef GTKMM_DISABLE_DEPRECATED
227 
237  void set_tooltips(bool enable = true);
238 #endif // GTKMM_DISABLE_DEPRECATED
239 
240 
241 #ifndef GTKMM_DISABLE_DEPRECATED
242 
253  bool get_tooltips() const;
254 #endif // GTKMM_DISABLE_DEPRECATED
255 
256 
261 
262  //Note that gtk_toolbar_set_icon_size() and gtk_toolbar_unset_icon_size() were
263  //deprecated sometime before GTK+ 2.4, but were undeprecated in GTK+ 2.12.
264 
276  void set_icon_size(IconSize icon_size);
277 
282 
283 
290 
291 
298 
310  int get_drop_index(int x, int y) const;
311 
325  void set_drop_highlight_item(ToolItem& tool_item, int index);
327 
328 
338  Glib::SignalProxy1< void,Orientation > signal_orientation_changed();
339 
340 
350  Glib::SignalProxy1< void,ToolbarStyle > signal_toolbar_style_changed();
351 
352 
372  Glib::SignalProxy3< bool,int,int,int > signal_popup_context_menu();
373 
374 
375  //gtkmmproc error: move_focus : ignored signal defs lookup failed
376 
377 
378  #ifndef GTKMM_DISABLE_DEPRECATED
379  //This was called get_tooltips_object() to avoid a clash with get_tooltips(), which just says whether they are enabled.
382  #endif //GTKMM_DISABLE_DEPRECATED
383 
384  //Ignore deprecated GtkToolbarAPI:
385  //Normally we just deprecate it in gtkmm too,
386  //but the GtkToolbar compatibility system is particularly unpleasant, so we just removed it in gtkmm 2.4. murrayc.
387 
388 
394  Glib::PropertyProxy< Orientation > property_orientation() ;
395 
401  Glib::PropertyProxy_ReadOnly< Orientation > property_orientation() const;
402 
408  Glib::PropertyProxy< ToolbarStyle > property_toolbar_style() ;
409 
415  Glib::PropertyProxy_ReadOnly< ToolbarStyle > property_toolbar_style() const;
416 
422  Glib::PropertyProxy< bool > property_show_arrow() ;
423 
429  Glib::PropertyProxy_ReadOnly< bool > property_show_arrow() const;
430 
436  Glib::PropertyProxy< bool > property_tooltips() ;
437 
443  Glib::PropertyProxy_ReadOnly< bool > property_tooltips() const;
444 
450  Glib::PropertyProxy< IconSize > property_icon_size() ;
451 
457  Glib::PropertyProxy_ReadOnly< IconSize > property_icon_size() const;
458 
464  Glib::PropertyProxy< bool > property_icon_size_set() ;
465 
471  Glib::PropertyProxy_ReadOnly< bool > property_icon_size_set() const;
472 
473 
474 };
475 
476 } // namespace Gtk
477 
478 
479 namespace Glib
480 {
489  Gtk::Toolbar* wrap(GtkToolbar* object, bool take_copy = false);
490 } //namespace Glib
491 
492 
493 #endif /* _GTKMM_TOOLBAR_H */
494 
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:98
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:95
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:182