Install ardour as a binary, a script and a set of shared
[ardour.git] / libs / gtkmm2 / gtk / gtkmm / viewport.h
1 // -*- c++ -*-
2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GTKMM_VIEWPORT_H
4 #define _GTKMM_VIEWPORT_H
5
6 #include <glibmm.h>
7
8 /* $Id$ */
9
10 /* viewport.h
11  * 
12  * Copyright (C) 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 _GtkViewport GtkViewport;
34 typedef struct _GtkViewportClass GtkViewportClass;
35 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
36
37
38 namespace Gtk
39 { class Viewport_Class; } // namespace Gtk
40 namespace Gtk {
41 class Adjustment;
42
43 /** An adapter which makes widgets scrollable.
44  * 
45  * @ingroup Widgets
46  * @ingroup Containers
47  */
48
49 class Viewport : public Bin
50 {
51   public:
52 #ifndef DOXYGEN_SHOULD_SKIP_THIS
53   typedef Viewport CppObjectType;
54   typedef Viewport_Class CppClassType;
55   typedef GtkViewport BaseObjectType;
56   typedef GtkViewportClass BaseClassType;
57 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
58
59   virtual ~Viewport();
60
61 #ifndef DOXYGEN_SHOULD_SKIP_THIS
62
63 private:
64   friend class Viewport_Class;
65   static CppClassType viewport_class_;
66
67   // noncopyable
68   Viewport(const Viewport&);
69   Viewport& operator=(const Viewport&);
70
71 protected:
72   explicit Viewport(const Glib::ConstructParams& construct_params);
73   explicit Viewport(GtkViewport* castitem);
74
75 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
76
77 public:
78 #ifndef DOXYGEN_SHOULD_SKIP_THIS
79   static GType get_type()      G_GNUC_CONST;
80   static GType get_base_type() G_GNUC_CONST;
81 #endif
82
83   ///Provides access to the underlying C GtkObject.
84   GtkViewport*       gobj()       { return reinterpret_cast<GtkViewport*>(gobject_); }
85
86   ///Provides access to the underlying C GtkObject.
87   const GtkViewport* gobj() const { return reinterpret_cast<GtkViewport*>(gobject_); }
88
89
90 public:
91   //C++ methods used to invoke GTK+ virtual functions:
92
93 protected:
94   //GTK+ Virtual Functions (override these to change behaviour):
95
96   //Default Signal Handlers::
97   virtual void on_set_scroll_adjustments(Gtk::Adjustment* hadjustment, Gtk::Adjustment* vadjustment);
98
99
100 private:
101
102 public:
103
104   explicit Viewport(Adjustment& hadjustment, Adjustment& vadjustment);
105
106
107   /** Returns the horizontal adjustment of the viewport.
108    * @return The horizontal adjustment of @a viewport .
109    */
110   Gtk::Adjustment* get_hadjustment();
111   
112   /** Returns the horizontal adjustment of the viewport.
113    * @return The horizontal adjustment of @a viewport .
114    */
115   const Gtk::Adjustment* get_hadjustment() const;
116
117   
118   /** Returns the vertical adjustment of the viewport.
119    * @return The vertical adjustment of @a viewport .
120    */
121   Gtk::Adjustment* get_vadjustment();
122   
123   /** Returns the vertical adjustment of the viewport.
124    * @return The vertical adjustment of @a viewport .
125    */
126   const Gtk::Adjustment* get_vadjustment() const;
127
128   
129   /** Sets the horizontal adjustment of the viewport.
130    * @param adjustment A Gtk::Adjustment.
131    */
132   void set_hadjustment(Gtk::Adjustment* adjustment=0);
133   
134   /** Sets the horizontal adjustment of the viewport.
135    * @param adjustment A Gtk::Adjustment.
136    */
137   void set_hadjustment(Gtk::Adjustment& adjustment);
138
139   
140   /** Sets the vertical adjustment of the viewport.
141    * @param adjustment A Gtk::Adjustment.
142    */
143   void set_vadjustment(Gtk::Adjustment* adjustment=0);
144   
145   /** Sets the vertical adjustment of the viewport.
146    * @param adjustment A Gtk::Adjustment.
147    */
148   void set_vadjustment(Gtk::Adjustment& adjustment);
149
150   
151   /** Sets the shadow type of the viewport.
152    * @param type The new shadow type.
153    */
154   void set_shadow_type(ShadowType type);
155
156   
157   /** Gets the shadow type of the Gtk::Viewport. See
158    * set_shadow_type().
159    * @return The shadow type.
160    */
161   ShadowType get_shadow_type() const;
162
163   
164   Glib::SignalProxy2< void,Gtk::Adjustment*,Gtk::Adjustment* > signal_set_scroll_adjustments();
165
166
167   /** The GtkAdjustment that determines the values of the horizontal position for this viewport.
168    *
169    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
170    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
171    * the value of the property changes.
172    */
173   Glib::PropertyProxy<Gtk::Adjustment*> property_hadjustment() ;
174
175 /** The GtkAdjustment that determines the values of the horizontal position for this viewport.
176    *
177    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
178    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
179    * the value of the property changes.
180    */
181   Glib::PropertyProxy_ReadOnly<Gtk::Adjustment*> property_hadjustment() const;
182
183   /** The GtkAdjustment that determines the values of the vertical position for this viewport.
184    *
185    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
186    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
187    * the value of the property changes.
188    */
189   Glib::PropertyProxy<Gtk::Adjustment*> property_vadjustment() ;
190
191 /** The GtkAdjustment that determines the values of the vertical position for this viewport.
192    *
193    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
194    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
195    * the value of the property changes.
196    */
197   Glib::PropertyProxy_ReadOnly<Gtk::Adjustment*> property_vadjustment() const;
198
199   /** Determines how the shadowed box around the viewport is drawn.
200    *
201    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
202    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
203    * the value of the property changes.
204    */
205   Glib::PropertyProxy<ShadowType> property_shadow_type() ;
206
207 /** Determines how the shadowed box around the viewport is drawn.
208    *
209    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
210    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
211    * the value of the property changes.
212    */
213   Glib::PropertyProxy_ReadOnly<ShadowType> property_shadow_type() const;
214
215
216 };
217
218 }  /* namespace Gtk */
219
220
221 namespace Glib
222 {
223   /** @relates Gtk::Viewport
224    * @param object The C instance
225    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
226    * @result A C++ instance that wraps this C instance.
227    */
228   Gtk::Viewport* wrap(GtkViewport* object, bool take_copy = false);
229 }
230 #endif /* _GTKMM_VIEWPORT_H */
231