Initial revision
[ardour.git] / libs / gtkmm2 / gtk / gtkmm / statusbar.h
1 // -*- c++ -*-
2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GTKMM_STATUSBAR_H
4 #define _GTKMM_STATUSBAR_H
5
6 #include <glibmm.h>
7
8 /* $Id$ */
9
10 /* statusbar.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/box.h>
30
31
32 #ifndef DOXYGEN_SHOULD_SKIP_THIS
33 typedef struct _GtkStatusbar GtkStatusbar;
34 typedef struct _GtkStatusbarClass GtkStatusbarClass;
35 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
36
37
38 namespace Gtk
39 { class Statusbar_Class; } // namespace Gtk
40 namespace Gtk
41 {
42
43 /** Text status indicator
44  * This widget is used to display status information.
45  * Messages are pushed and poped onto a message stack.
46  * When text is pushed it replaces the old contents.
47  * The old text is restored when popped.
48  *
49  * It derives from Gtk::HBox so that additional information can be added
50  * easily.
51  *
52  * @ingroup Widgets
53  */
54
55 class Statusbar : public HBox
56 {
57   public:
58 #ifndef DOXYGEN_SHOULD_SKIP_THIS
59   typedef Statusbar CppObjectType;
60   typedef Statusbar_Class CppClassType;
61   typedef GtkStatusbar BaseObjectType;
62   typedef GtkStatusbarClass BaseClassType;
63 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
64
65   virtual ~Statusbar();
66
67 #ifndef DOXYGEN_SHOULD_SKIP_THIS
68
69 private:
70   friend class Statusbar_Class;
71   static CppClassType statusbar_class_;
72
73   // noncopyable
74   Statusbar(const Statusbar&);
75   Statusbar& operator=(const Statusbar&);
76
77 protected:
78   explicit Statusbar(const Glib::ConstructParams& construct_params);
79   explicit Statusbar(GtkStatusbar* castitem);
80
81 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
82
83 public:
84 #ifndef DOXYGEN_SHOULD_SKIP_THIS
85   static GType get_type()      G_GNUC_CONST;
86   static GType get_base_type() G_GNUC_CONST;
87 #endif
88
89   ///Provides access to the underlying C GtkObject.
90   GtkStatusbar*       gobj()       { return reinterpret_cast<GtkStatusbar*>(gobject_); }
91
92   ///Provides access to the underlying C GtkObject.
93   const GtkStatusbar* gobj() const { return reinterpret_cast<GtkStatusbar*>(gobject_); }
94
95
96 public:
97   //C++ methods used to invoke GTK+ virtual functions:
98
99 protected:
100   //GTK+ Virtual Functions (override these to change behaviour):
101
102   //Default Signal Handlers::
103   virtual void on_text_pushed(guint context_id, const Glib::ustring& text);
104   virtual void on_text_popped(guint context_id, const Glib::ustring& text);
105
106
107 private:
108
109   
110 public:
111   Statusbar();
112
113   
114   guint get_context_id(const Glib::ustring& context_description);
115   guint push(const Glib::ustring& text, guint context_id = 0);
116   
117   void pop(guint context_id = 0);
118   void remove_message(guint message_id, guint context_id = 0);
119   
120   void set_has_resize_grip(bool setting = true);
121   
122   bool get_has_resize_grip() const;
123
124   
125   Glib::SignalProxy2< void,guint,const Glib::ustring& > signal_text_pushed();
126
127   
128   Glib::SignalProxy2< void,guint,const Glib::ustring& > signal_text_popped();
129
130
131   /** Whether the statusbar has a grip for resizing the toplevel.
132    *
133    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
134    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
135    * the value of the property changes.
136    */
137   Glib::PropertyProxy<bool> property_has_resize_grip() ;
138
139 /** Whether the statusbar has a grip for resizing the toplevel.
140    *
141    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
142    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
143    * the value of the property changes.
144    */
145   Glib::PropertyProxy_ReadOnly<bool> property_has_resize_grip() const;
146
147
148 };
149
150 } /* namespace Gtk */
151
152
153 namespace Glib
154 {
155   /** @relates Gtk::Statusbar
156    * @param object The C instance
157    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
158    * @result A C++ instance that wraps this C instance.
159    */
160   Gtk::Statusbar* wrap(GtkStatusbar* object, bool take_copy = false);
161 }
162 #endif /* _GTKMM_STATUSBAR_H */
163