Ardour  9.0-pre0-582-g084a23a80d
tk/ytkmm/ytkmm/gtkmm/button.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 // Generated by gmmproc 2.45.3 -- DO NOT MODIFY!
3 #ifndef _GTKMM_BUTTON_H
4 #define _GTKMM_BUTTON_H
5 
6 
7 #include <glibmm/ustring.h>
8 #include <sigc++/sigc++.h>
9 
10 /* $Id: button.hg,v 1.10 2006/08/21 19:07:14 jjongsma Exp $ */
11 
12 /* box.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 
32 #include <gtkmm/bin.h>
33 #include <gtkmm/stockid.h>
34 
35 
36 #ifndef DOXYGEN_SHOULD_SKIP_THIS
37 typedef struct _GtkButton GtkButton;
38 typedef struct _GtkButtonClass GtkButtonClass;
39 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
40 
41 
42 namespace Gtk
43 { class Button_Class; } // namespace Gtk
44 namespace Gtk
45 {
46 
47 namespace Stock { struct BuiltinStockID; }
48 
49 // TODO: Inherit/Implement Activatable when we can break ABI.
50 
59 class Button : public Bin
60 {
61  public:
62 #ifndef DOXYGEN_SHOULD_SKIP_THIS
63  typedef Button CppObjectType;
64  typedef Button_Class CppClassType;
65  typedef GtkButton BaseObjectType;
66  typedef GtkButtonClass BaseClassType;
67 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
68 
69  virtual ~Button();
70 
71 #ifndef DOXYGEN_SHOULD_SKIP_THIS
72 
73 private:
74  friend class Button_Class;
75  static CppClassType button_class_;
76 
77  // noncopyable
78  Button(const Button&);
79  Button& operator=(const Button&);
80 
81 protected:
82  explicit Button(const Glib::ConstructParams& construct_params);
83  explicit Button(GtkButton* 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  GtkButton* gobj() { return reinterpret_cast<GtkButton*>(gobject_); }
97 
99  const GtkButton* gobj() const { return reinterpret_cast<GtkButton*>(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_pressed();
112  virtual void on_released();
114  virtual void on_clicked();
116  virtual void on_enter();
118  virtual void on_leave();
120  virtual void on_activate();
121 
122 
123 private:
124 
125 public:
126 
137 
138 
144  explicit Button(const Glib::ustring& label, bool mnemonic = false);
145 
150  explicit Button(const StockID& stock_id);
151 
152 
153 #ifndef GTKMM_DISABLE_DEPRECATED
154 
155  void pressed();
156 #endif // GTKMM_DISABLE_DEPRECATED
157 
158 
159 #ifndef GTKMM_DISABLE_DEPRECATED
160 
161  void released();
162 #endif // GTKMM_DISABLE_DEPRECATED
163 
164 
165  void clicked();
166 
167 #ifndef GTKMM_DISABLE_DEPRECATED
168 
169  void enter();
170 #endif // GTKMM_DISABLE_DEPRECATED
171 
172 
173 #ifndef GTKMM_DISABLE_DEPRECATED
174 
175  void leave();
176 #endif // GTKMM_DISABLE_DEPRECATED
177 
178 
179  void set_relief(ReliefStyle newstyle);
180 
182 
183 
192  void set_label(const Glib::ustring& label);
193 
203  Glib::ustring get_label() const;
204 
210  void set_use_underline(bool use_underline = true);
211 
218  bool get_use_underline() const;
219 
225  void set_use_stock(bool use_stock = true);
226 
233  bool get_use_stock() const;
234 
235 
243  void set_focus_on_click(bool focus_on_click = true);
244 
251  bool get_focus_on_click() const;
252 
253 
262  void set_alignment(float xalign, float yalign);
263 
269  void get_alignment(float& xalign, float& yalign);
270 
271 
280 
286 
291  const Widget* get_image() const;
292 
293 
300 
307 
308 
314  Glib::RefPtr<Gdk::Window> get_event_window();
315 
321  Glib::RefPtr<const Gdk::Window> get_event_window() const;
322 
323 
330  Glib::SignalProxy0< void > signal_pressed();
331 
332 
339  Glib::SignalProxy0< void > signal_released();
340 
341 
348  Glib::SignalProxy0< void > signal_clicked();
349 
350 
357  Glib::SignalProxy0< void > signal_enter();
358 
359 
366  Glib::SignalProxy0< void > signal_leave();
367 
368 
375  Glib::SignalProxy0< void > signal_activate();
376 
377 
383  Glib::PropertyProxy< Glib::ustring > property_label() ;
384 
390  Glib::PropertyProxy_ReadOnly< Glib::ustring > property_label() const;
391 
397  Glib::PropertyProxy< ReliefStyle > property_relief() ;
398 
404  Glib::PropertyProxy_ReadOnly< ReliefStyle > property_relief() const;
405 
406  //Ignored because it's write-only and construct: _WRAP_PROPERTY("use-underline", bool)
412  Glib::PropertyProxy< bool > property_use_stock() ;
413 
419  Glib::PropertyProxy_ReadOnly< bool > property_use_stock() const;
420 
426  Glib::PropertyProxy< bool > property_focus_on_click() ;
427 
433  Glib::PropertyProxy_ReadOnly< bool > property_focus_on_click() const;
434 
440  Glib::PropertyProxy< float > property_xalign() ;
441 
447  Glib::PropertyProxy_ReadOnly< float > property_xalign() const;
448 
454  Glib::PropertyProxy< float > property_yalign() ;
455 
461  Glib::PropertyProxy_ReadOnly< float > property_yalign() const;
462 
468  Glib::PropertyProxy< Gtk::Widget* > property_image() ;
469 
475  Glib::PropertyProxy_ReadOnly< Gtk::Widget* > property_image() const;
476 
482  Glib::PropertyProxy< PositionType > property_image_position() ;
483 
489  Glib::PropertyProxy_ReadOnly< PositionType > property_image_position() const;
490 
491 
492 };
493 
500 } // namespace Gtk
501 
502 
503 namespace Glib
504 {
513  Gtk::Button* wrap(GtkButton* object, bool take_copy = false);
514 } //namespace Glib
515 
516 
517 #endif /* _GTKMM_BUTTON_H */
518 
Definition: bin.h:55
Glib::PropertyProxy< Glib::ustring > property_label()
Glib::PropertyProxy_ReadOnly< Gtk::Widget * > property_image() const
const Widget * get_image() const
virtual ~Button()
Widget * get_image()
Glib::PropertyProxy< ReliefStyle > property_relief()
void enter()
Glib::RefPtr< Gdk::Window > get_event_window()
Glib::PropertyProxy< bool > property_use_stock()
Glib::PropertyProxy< float > property_yalign()
ReliefStyle get_relief() const
Glib::PropertyProxy_ReadOnly< PositionType > property_image_position() const
Button(const Glib::ustring &label, bool mnemonic=false)
Glib::PropertyProxy< float > property_xalign()
void pressed()
Glib::PropertyProxy_ReadOnly< bool > property_use_stock() const
void set_image_position(PositionType position)
Glib::PropertyProxy_ReadOnly< float > property_yalign() const
bool get_use_stock() const
void leave()
Glib::PropertyProxy< bool > property_focus_on_click()
void get_alignment(float &xalign, float &yalign)
Glib::SignalProxy0< void > signal_clicked()
Glib::PropertyProxy_ReadOnly< float > property_xalign() const
Glib::PropertyProxy< Gtk::Widget * > property_image()
Glib::SignalProxy0< void > signal_leave()
bool get_focus_on_click() const
Glib::PropertyProxy< PositionType > property_image_position()
void set_alignment(float xalign, float yalign)
PositionType get_image_position() const
Glib::PropertyProxy_ReadOnly< ReliefStyle > property_relief() const
Gtk::Button * wrap(GtkButton *object, bool take_copy=false)
Glib::SignalProxy0< void > signal_enter()
Glib::RefPtr< const Gdk::Window > get_event_window() const
Glib::PropertyProxy_ReadOnly< bool > property_focus_on_click() const
void set_use_underline(bool use_underline=true)
virtual void on_enter()
This is a default handler for the signal signal_enter().
Glib::PropertyProxy_ReadOnly< Glib::ustring > property_label() const
void set_focus_on_click(bool focus_on_click=true)
GtkButton * gobj()
Provides access to the underlying C GtkObject.
void set_relief(ReliefStyle newstyle)
virtual void on_pressed()
This is a default handler for the signal signal_pressed().
virtual void on_clicked()
This is a default handler for the signal signal_clicked().
virtual void on_released()
This is a default handler for the signal signal_released().
void set_image(Widget &image)
virtual void on_activate()
This is a default handler for the signal signal_activate().
Glib::SignalProxy0< void > signal_released()
Glib::SignalProxy0< void > signal_pressed()
void set_label(const Glib::ustring &label)
void set_use_stock(bool use_stock=true)
const GtkButton * gobj() const
Provides access to the underlying C GtkObject.
Glib::ustring get_label() const
virtual void on_leave()
This is a default handler for the signal signal_leave().
Button(const StockID &stock_id)
void clicked()
Glib::SignalProxy0< void > signal_activate()
bool get_use_underline() const
void released()
GtkImageImageData image
Definition: gtkimage.h:1
Definition: ardour_ui.h:188