Install ardour as a binary, a script and a set of shared
[ardour.git] / libs / gtkmm2 / gtk / gtkmm / scrolledwindow.h
1 // -*- c++ -*-
2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GTKMM_SCROLLEDWINDOW_H
4 #define _GTKMM_SCROLLEDWINDOW_H
5
6 #include <glibmm.h>
7
8 /* $Id$ */
9
10 /* scrolledwindow.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/bin.h>
30
31
32 #ifndef DOXYGEN_SHOULD_SKIP_THIS
33 typedef struct _GtkScrolledWindow GtkScrolledWindow;
34 typedef struct _GtkScrolledWindowClass GtkScrolledWindowClass;
35 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
36
37
38 namespace Gtk
39 { class ScrolledWindow_Class; } // namespace Gtk
40 namespace Gtk
41 {
42
43 class Adjustment;
44 class HScrollbar;
45 class VScrollbar;
46
47 /** Adds scrollbars to its child widget.
48  *
49  * This container accepts a single child widget. It adds scrollbars to the child widget and optionally draws a beveled frame around the child widget.
50  * The scrolled window can work in two ways:
51  * 1) Some widgets have native scrolling support; these widgets handle certain Gtk::Adjustment signals. Widgets with native scroll support include Gtk::TreeView, Gtk::TextView, and Gtk::Layout.
52  * 2) For widgets that lack native scrolling support, such as Gtk::Table, Gtk::Box, and so on, the widget will be placed inside a Gtk::Viewport.
53  *
54  * The position of the scrollbars is controlled by the scroll adjustments. See Gtk::Adjustment for the fields in an adjustment - for Gtk::Scrollbar, used by Gtk::ScrolledWindow,
55  * the "value" field represents the position of the scrollbar, which must be between the "lower" field and "upper - page_size."
56  * The "page_size" field represents the size of the visible scrollable area.
57  * The "step_increment" and "page_increment" fields are used when the user asks to step down (using the small stepper arrows) or page down (using for example the PageDown key).
58  *
59  * If a Gtk::ScrolledWindow doesn't behave quite as you would like, or doesn't have exactly the right layout, it's very possible to set up your own scrolling with Gtk::Scrollbar and, for example, a Gtk::Table.
60  *
61  * @ingroup Widgets
62  * @ingroup Containers
63  */
64
65 class ScrolledWindow : public Bin
66 {
67   public:
68 #ifndef DOXYGEN_SHOULD_SKIP_THIS
69   typedef ScrolledWindow CppObjectType;
70   typedef ScrolledWindow_Class CppClassType;
71   typedef GtkScrolledWindow BaseObjectType;
72   typedef GtkScrolledWindowClass BaseClassType;
73 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
74
75   virtual ~ScrolledWindow();
76
77 #ifndef DOXYGEN_SHOULD_SKIP_THIS
78
79 private:
80   friend class ScrolledWindow_Class;
81   static CppClassType scrolledwindow_class_;
82
83   // noncopyable
84   ScrolledWindow(const ScrolledWindow&);
85   ScrolledWindow& operator=(const ScrolledWindow&);
86
87 protected:
88   explicit ScrolledWindow(const Glib::ConstructParams& construct_params);
89   explicit ScrolledWindow(GtkScrolledWindow* castitem);
90
91 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
92
93 public:
94 #ifndef DOXYGEN_SHOULD_SKIP_THIS
95   static GType get_type()      G_GNUC_CONST;
96   static GType get_base_type() G_GNUC_CONST;
97 #endif
98
99   ///Provides access to the underlying C GtkObject.
100   GtkScrolledWindow*       gobj()       { return reinterpret_cast<GtkScrolledWindow*>(gobject_); }
101
102   ///Provides access to the underlying C GtkObject.
103   const GtkScrolledWindow* gobj() const { return reinterpret_cast<GtkScrolledWindow*>(gobject_); }
104
105
106 public:
107   //C++ methods used to invoke GTK+ virtual functions:
108
109 protected:
110   //GTK+ Virtual Functions (override these to change behaviour):
111
112   //Default Signal Handlers::
113
114
115 private:
116
117
118 public:
119   ScrolledWindow();
120   explicit ScrolledWindow(Adjustment& hadjustment, Adjustment& vadjustment);
121   
122
123   void set_hadjustment(Gtk::Adjustment* hadjustment = 0);
124   
125   void set_vadjustment(Gtk::Adjustment* vadjustment = 0);
126   
127   void set_hadjustment(Gtk::Adjustment& hadjustment);
128   
129   void set_vadjustment(Gtk::Adjustment& vadjustment);
130
131   
132   Gtk::Adjustment* get_hadjustment();
133   
134   const Gtk::Adjustment* get_hadjustment() const;
135   
136   Gtk::Adjustment* get_vadjustment();
137   
138   const Gtk::Adjustment* get_vadjustment() const;
139
140   
141   void set_policy(PolicyType hscrollbar_policy, PolicyType vscrollbar_policy);
142   
143   /** Retrieves the current policy values for the horizontal and vertical
144    * scrollbars. See set_policy().
145    * @param hscrollbar_policy Location to store the policy for the horizontal scrollbar, or <tt>0</tt>.
146    * @param vscrollbar_policy Location to store the policy for the horizontal scrollbar, or <tt>0</tt>.
147    */
148   void get_policy(PolicyType& hscrollbar_policy, PolicyType& vscrollbar_policy) const;
149
150   
151   void set_placement(CornerType window_placement);
152   
153   /** Gets the placement of the scrollbars for the scrolled window. See 
154    * set_placement().
155    * @return The current placement value.
156    */
157   CornerType get_placement() const;
158
159   
160   /** Changes the type of shadow drawn around the contents of
161    *  @a scrolled_window .
162    * @param type Kind of shadow to draw around scrolled window contents.
163    */
164   void set_shadow_type(ShadowType type);
165   
166   /** Gets the shadow type of the scrolled window. See 
167    * set_shadow_type().
168    * @return The current shadow type.
169    */
170   ShadowType get_shadow_type() const;
171
172   ///Puts the child inside a Gtk::Viewport if it doesn't have native scrolling capability.
173   virtual void add(Gtk::Widget& widget);
174   
175
176   bool get_vscrollbar_visible() const;
177   bool get_hscrollbar_visible() const;
178   Gtk::HScrollbar* get_hscrollbar();
179   const Gtk::HScrollbar* get_hscrollbar() const;
180   Gtk::VScrollbar* get_vscrollbar();
181   const Gtk::VScrollbar* get_vscrollbar() const;
182
183   //Keybinding signals:
184   
185   
186   /** The GtkAdjustment for the horizontal position.
187    *
188    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
189    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
190    * the value of the property changes.
191    */
192   Glib::PropertyProxy<Gtk::Adjustment*> property_hadjustment() ;
193
194 /** The GtkAdjustment for the horizontal position.
195    *
196    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
197    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
198    * the value of the property changes.
199    */
200   Glib::PropertyProxy_ReadOnly<Gtk::Adjustment*> property_hadjustment() const;
201
202   /** The GtkAdjustment for the vertical position.
203    *
204    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
205    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
206    * the value of the property changes.
207    */
208   Glib::PropertyProxy<Gtk::Adjustment*> property_vadjustment() ;
209
210 /** The GtkAdjustment for the vertical position.
211    *
212    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
213    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
214    * the value of the property changes.
215    */
216   Glib::PropertyProxy_ReadOnly<Gtk::Adjustment*> property_vadjustment() const;
217
218   /** When the horizontal scrollbar is displayed.
219    *
220    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
221    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
222    * the value of the property changes.
223    */
224   Glib::PropertyProxy<PolicyType> property_hscrollbar_policy() ;
225
226 /** When the horizontal scrollbar is displayed.
227    *
228    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
229    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
230    * the value of the property changes.
231    */
232   Glib::PropertyProxy_ReadOnly<PolicyType> property_hscrollbar_policy() const;
233
234   /** When the vertical scrollbar is displayed.
235    *
236    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
237    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
238    * the value of the property changes.
239    */
240   Glib::PropertyProxy<PolicyType> property_vscrollbar_policy() ;
241
242 /** When the vertical scrollbar is displayed.
243    *
244    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
245    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
246    * the value of the property changes.
247    */
248   Glib::PropertyProxy_ReadOnly<PolicyType> property_vscrollbar_policy() const;
249
250   /** Where the contents are located with respect to the scrollbars.
251    *
252    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
253    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
254    * the value of the property changes.
255    */
256   Glib::PropertyProxy<CornerType> property_window_placement() ;
257
258 /** Where the contents are located with respect to the scrollbars.
259    *
260    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
261    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
262    * the value of the property changes.
263    */
264   Glib::PropertyProxy_ReadOnly<CornerType> property_window_placement() const;
265
266   /** Style of bevel around the contents.
267    *
268    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
269    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
270    * the value of the property changes.
271    */
272   Glib::PropertyProxy<ShadowType> property_shadow_type() ;
273
274 /** Style of bevel around the contents.
275    *
276    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
277    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
278    * the value of the property changes.
279    */
280   Glib::PropertyProxy_ReadOnly<ShadowType> property_shadow_type() const;
281
282
283 };
284
285 } /* namespace Gtk */
286
287
288 namespace Glib
289 {
290   /** @relates Gtk::ScrolledWindow
291    * @param object The C instance
292    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
293    * @result A C++ instance that wraps this C instance.
294    */
295   Gtk::ScrolledWindow* wrap(GtkScrolledWindow* object, bool take_copy = false);
296 }
297 #endif /* _GTKMM_SCROLLEDWINDOW_H */
298