~ubuntu-branches/ubuntu/precise/gtkmm3.0/precise

« back to all changes in this revision

Viewing changes to gtk/gtkmm/paned.h

  • Committer: Bazaar Package Importer
  • Author(s): Michael Biebl
  • Date: 2011-06-17 00:12:44 UTC
  • Revision ID: james.westby@ubuntu.com-20110617001244-9hl5an15hiaaahi6
Tags: upstream-3.0.1
ImportĀ upstreamĀ versionĀ 3.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// -*- c++ -*-
 
2
// Generated by gtkmmproc -- DO NOT MODIFY!
 
3
#ifndef _GTKMM_PANED_H
 
4
#define _GTKMM_PANED_H
 
5
 
 
6
 
 
7
#include <glibmm.h>
 
8
 
 
9
/* $Id: paned.hg,v 1.6 2006/04/12 11:11:25 murrayc Exp $ */
 
10
 
 
11
 
 
12
/* paned.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
#include <gtkmm/container.h>
 
32
#include <gtkmm/orientable.h>
 
33
#include <gtkmm/enums.h>
 
34
 
 
35
 
 
36
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
37
typedef struct _GtkPaned GtkPaned;
 
38
typedef struct _GtkPanedClass GtkPanedClass;
 
39
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
40
 
 
41
 
 
42
namespace Gtk
 
43
{ class Paned_Class; } // namespace Gtk
 
44
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
45
typedef struct _GtkHPaned GtkHPaned;
 
46
typedef struct _GtkHPanedClass GtkHPanedClass;
 
47
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
48
 
 
49
 
 
50
namespace Gtk
 
51
{ class HPaned_Class; } // namespace Gtk
 
52
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
53
typedef struct _GtkVPaned GtkVPaned;
 
54
typedef struct _GtkVPanedClass GtkVPanedClass;
 
55
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
56
 
 
57
 
 
58
namespace Gtk
 
59
{ class VPaned_Class; } // namespace Gtk
 
60
namespace Gtk
 
61
{
 
62
 
 
63
/** This is the base class for widgets with two panes, arranged either
 
64
 * horizontally (Gtk::HPaned) or vertically (Gtk::VPaned).
 
65
 *
 
66
 * Child widgets are added to the panes of the widget with pack1() and pack2().
 
67
 * The division beween the two children is set by default from the size
 
68
 * requests of the children, but it can be adjusted by the user.
 
69
 *
 
70
 * A paned widget draws a separator between the two child widgets and a small
 
71
 * handle that the user can drag to adjust the division. It does not draw any
 
72
 * relief around the children or around the separator. Often, it is useful to
 
73
 * put each child inside a Gtk::Frame with the shadow type set to Gtk::SHADOW_IN
 
74
 * so that the gutter appears as a ridge.
 
75
 *
 
76
 * Each child has two options that can be set - resize and shrink. If resize is
 
77
 * true, then when the GtkPaned is resized, that child will expand or shrink
 
78
 * along with the paned widget. If shrink is true, then when that child can be
 
79
 * made smaller than it's requisition. Setting shrink to false allows the
 
80
 * application to set a minimum size. If resize is false for both children,
 
81
 * then this is treated as if resize is true for both children.
 
82
 *
 
83
 * The application can set the position of the slider as if it were set by the
 
84
 * user, by calling set_position().
 
85
 *
 
86
 * @ingroup Widgets
 
87
 * @ingroup Containers
 
88
 */
 
89
 
 
90
class Paned
 
91
 : public Container,
 
92
   public Orientable
 
93
{
 
94
  public:
 
95
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
96
  typedef Paned CppObjectType;
 
97
  typedef Paned_Class CppClassType;
 
98
  typedef GtkPaned BaseObjectType;
 
99
  typedef GtkPanedClass BaseClassType;
 
100
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
101
 
 
102
  virtual ~Paned();
 
103
 
 
104
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
105
 
 
106
private:
 
107
  friend class Paned_Class;
 
108
  static CppClassType paned_class_;
 
109
 
 
110
  // noncopyable
 
111
  Paned(const Paned&);
 
112
  Paned& operator=(const Paned&);
 
113
 
 
114
protected:
 
115
  explicit Paned(const Glib::ConstructParams& construct_params);
 
116
  explicit Paned(GtkPaned* castitem);
 
117
 
 
118
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
119
 
 
120
public:
 
121
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
122
  static GType get_type()      G_GNUC_CONST;
 
123
 
 
124
 
 
125
  static GType get_base_type() G_GNUC_CONST;
 
126
#endif
 
127
 
 
128
  ///Provides access to the underlying C GtkObject.
 
129
  GtkPaned*       gobj()       { return reinterpret_cast<GtkPaned*>(gobject_); }
 
130
 
 
131
  ///Provides access to the underlying C GtkObject.
 
132
  const GtkPaned* gobj() const { return reinterpret_cast<GtkPaned*>(gobject_); }
 
133
 
 
134
 
 
135
public:
 
136
  //C++ methods used to invoke GTK+ virtual functions:
 
137
 
 
138
protected:
 
139
  //GTK+ Virtual Functions (override these to change behaviour):
 
140
 
 
141
  //Default Signal Handlers::
 
142
 
 
143
 
 
144
private:
 
145
 
 
146
  
 
147
public:
 
148
 
 
149
  //Note that we try to use the same defaul parameter value as the default property value.
 
150
  explicit Paned(Orientation orientation = ORIENTATION_HORIZONTAL);
 
151
 
 
152
  
 
153
  void add1(Widget& child);
 
154
  
 
155
  void add2(Widget& child);
 
156
 
 
157
  
 
158
  void pack1(Widget& child, bool resize, bool shrink);
 
159
  void pack1(Widget& child, AttachOptions options = Gtk::EXPAND);
 
160
 
 
161
  
 
162
  void pack2(Widget& child, bool resize, bool shrink);
 
163
  void pack2(Widget& child, AttachOptions options  = Gtk::EXPAND);
 
164
 
 
165
  
 
166
  /** Obtains the position of the divider between the two panes.
 
167
   * @return Position of the divider.
 
168
   */
 
169
  int get_position() const;
 
170
  
 
171
  /** Sets the position of the divider between the two panes.
 
172
   * @param position Pixel position of divider, a negative value means that the position
 
173
   * is unset.
 
174
   */
 
175
  void set_position(int position);
 
176
 
 
177
  
 
178
  /** Obtains the first child of the paned widget.
 
179
   * 
 
180
   * @newin{2,4}
 
181
   * @return First child, or <tt>0</tt> if it is not set.
 
182
   */
 
183
  Widget* get_child1();
 
184
  
 
185
  /** Obtains the first child of the paned widget.
 
186
   * 
 
187
   * @newin{2,4}
 
188
   * @return First child, or <tt>0</tt> if it is not set.
 
189
   */
 
190
  const Widget* get_child1() const;
 
191
 
 
192
  
 
193
  /** Obtains the second child of the paned widget.
 
194
   * 
 
195
   * @newin{2,4}
 
196
   * @return Second child, or <tt>0</tt> if it is not set.
 
197
   */
 
198
  Widget* get_child2();
 
199
  
 
200
  /** Obtains the second child of the paned widget.
 
201
   * 
 
202
   * @newin{2,4}
 
203
   * @return Second child, or <tt>0</tt> if it is not set.
 
204
   */
 
205
  const Widget* get_child2() const;
 
206
 
 
207
  
 
208
  /** Returns the Gdk::Window of the handle. This function is
 
209
   * useful when handling button or motion events because it
 
210
   * enables the callback to distinguish between the window
 
211
   * of the paned, a child and the handle.
 
212
   * 
 
213
   * @newin{2,20}
 
214
   * @return The paned's handle window.
 
215
   */
 
216
  Glib::RefPtr<Gdk::Window> get_handle_window();
 
217
  
 
218
  /** Returns the Gdk::Window of the handle. This function is
 
219
   * useful when handling button or motion events because it
 
220
   * enables the callback to distinguish between the window
 
221
   * of the paned, a child and the handle.
 
222
   * 
 
223
   * @newin{2,20}
 
224
   * @return The paned's handle window.
 
225
   */
 
226
  Glib::RefPtr<const Gdk::Window> get_handle_window() const;
 
227
 
 
228
  //Keybinding signals:
 
229
  
 
230
  
 
231
  #ifdef GLIBMM_PROPERTIES_ENABLED
 
232
/** Position of paned separator in pixels (0 means all the way to the left/top).
 
233
   *
 
234
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
235
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
236
   * the value of the property changes.
 
237
   */
 
238
  Glib::PropertyProxy<int> property_position() ;
 
239
#endif //#GLIBMM_PROPERTIES_ENABLED
 
240
 
 
241
#ifdef GLIBMM_PROPERTIES_ENABLED
 
242
/** Position of paned separator in pixels (0 means all the way to the left/top).
 
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<int> property_position() const;
 
249
#endif //#GLIBMM_PROPERTIES_ENABLED
 
250
 
 
251
  #ifdef GLIBMM_PROPERTIES_ENABLED
 
252
/** TRUE if the Position property should be used.
 
253
   *
 
254
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
255
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
256
   * the value of the property changes.
 
257
   */
 
258
  Glib::PropertyProxy<bool> property_position_set() ;
 
259
#endif //#GLIBMM_PROPERTIES_ENABLED
 
260
 
 
261
#ifdef GLIBMM_PROPERTIES_ENABLED
 
262
/** TRUE if the Position property should be used.
 
263
   *
 
264
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
265
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
266
   * the value of the property changes.
 
267
   */
 
268
  Glib::PropertyProxy_ReadOnly<bool> property_position_set() const;
 
269
#endif //#GLIBMM_PROPERTIES_ENABLED
 
270
 
 
271
  #ifdef GLIBMM_PROPERTIES_ENABLED
 
272
/** Smallest possible value for the 'position' property.
 
273
   *
 
274
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
275
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
276
   * the value of the property changes.
 
277
   */
 
278
  Glib::PropertyProxy_ReadOnly<int> property_min_position() const;
 
279
#endif //#GLIBMM_PROPERTIES_ENABLED
 
280
 
 
281
 
 
282
  #ifdef GLIBMM_PROPERTIES_ENABLED
 
283
/** Largest possible value for the 'position' property.
 
284
   *
 
285
   * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
 
286
   * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
 
287
   * the value of the property changes.
 
288
   */
 
289
  Glib::PropertyProxy_ReadOnly<int> property_max_position() const;
 
290
#endif //#GLIBMM_PROPERTIES_ENABLED
 
291
 
 
292
 
 
293
};
 
294
 
 
295
/**
 
296
 * The Gtk::HPaned widget is a container widget with two children arranged
 
297
 * horizontally. The division between the two panes is adjustable by the
 
298
 * user by dragging a handle. See Gtk::Paned for details.
 
299
 *
 
300
 * @ingroup Widgets
 
301
 */
 
302
 
 
303
class HPaned : public Paned
 
304
{
 
305
  public:
 
306
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
307
  typedef HPaned CppObjectType;
 
308
  typedef HPaned_Class CppClassType;
 
309
  typedef GtkHPaned BaseObjectType;
 
310
  typedef GtkHPanedClass BaseClassType;
 
311
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
312
 
 
313
  virtual ~HPaned();
 
314
 
 
315
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
316
 
 
317
private:
 
318
  friend class HPaned_Class;
 
319
  static CppClassType hpaned_class_;
 
320
 
 
321
  // noncopyable
 
322
  HPaned(const HPaned&);
 
323
  HPaned& operator=(const HPaned&);
 
324
 
 
325
protected:
 
326
  explicit HPaned(const Glib::ConstructParams& construct_params);
 
327
  explicit HPaned(GtkHPaned* castitem);
 
328
 
 
329
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
330
 
 
331
public:
 
332
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
333
  static GType get_type()      G_GNUC_CONST;
 
334
 
 
335
 
 
336
  static GType get_base_type() G_GNUC_CONST;
 
337
#endif
 
338
 
 
339
  ///Provides access to the underlying C GtkObject.
 
340
  GtkHPaned*       gobj()       { return reinterpret_cast<GtkHPaned*>(gobject_); }
 
341
 
 
342
  ///Provides access to the underlying C GtkObject.
 
343
  const GtkHPaned* gobj() const { return reinterpret_cast<GtkHPaned*>(gobject_); }
 
344
 
 
345
 
 
346
public:
 
347
  //C++ methods used to invoke GTK+ virtual functions:
 
348
 
 
349
protected:
 
350
  //GTK+ Virtual Functions (override these to change behaviour):
 
351
 
 
352
  //Default Signal Handlers::
 
353
 
 
354
 
 
355
private:
 
356
 
 
357
public:
 
358
  HPaned();
 
359
 
 
360
 
 
361
};
 
362
 
 
363
/**
 
364
 * The Gtk::VPaned widget is a container widget with two children arranged
 
365
 * vertically. The division between the two panes is adjustable by the
 
366
 * user by dragging a handle. See Gtk::Paned for details.
 
367
 *
 
368
 * @ingroup Widgets
 
369
 */
 
370
 
 
371
class VPaned : public Paned
 
372
{
 
373
  public:
 
374
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
375
  typedef VPaned CppObjectType;
 
376
  typedef VPaned_Class CppClassType;
 
377
  typedef GtkVPaned BaseObjectType;
 
378
  typedef GtkVPanedClass BaseClassType;
 
379
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
380
 
 
381
  virtual ~VPaned();
 
382
 
 
383
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
384
 
 
385
private:
 
386
  friend class VPaned_Class;
 
387
  static CppClassType vpaned_class_;
 
388
 
 
389
  // noncopyable
 
390
  VPaned(const VPaned&);
 
391
  VPaned& operator=(const VPaned&);
 
392
 
 
393
protected:
 
394
  explicit VPaned(const Glib::ConstructParams& construct_params);
 
395
  explicit VPaned(GtkVPaned* castitem);
 
396
 
 
397
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
398
 
 
399
public:
 
400
#ifndef DOXYGEN_SHOULD_SKIP_THIS
 
401
  static GType get_type()      G_GNUC_CONST;
 
402
 
 
403
 
 
404
  static GType get_base_type() G_GNUC_CONST;
 
405
#endif
 
406
 
 
407
  ///Provides access to the underlying C GtkObject.
 
408
  GtkVPaned*       gobj()       { return reinterpret_cast<GtkVPaned*>(gobject_); }
 
409
 
 
410
  ///Provides access to the underlying C GtkObject.
 
411
  const GtkVPaned* gobj() const { return reinterpret_cast<GtkVPaned*>(gobject_); }
 
412
 
 
413
 
 
414
public:
 
415
  //C++ methods used to invoke GTK+ virtual functions:
 
416
 
 
417
protected:
 
418
  //GTK+ Virtual Functions (override these to change behaviour):
 
419
 
 
420
  //Default Signal Handlers::
 
421
 
 
422
 
 
423
private:
 
424
 
 
425
public:
 
426
  VPaned();
 
427
 
 
428
 
 
429
};
 
430
 
 
431
} // namespace Gtk
 
432
 
 
433
 
 
434
namespace Glib
 
435
{
 
436
  /** A Glib::wrap() method for this object.
 
437
   * 
 
438
   * @param object The C instance.
 
439
   * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
 
440
   * @result A C++ instance that wraps this C instance.
 
441
   *
 
442
   * @relates Gtk::Paned
 
443
   */
 
444
  Gtk::Paned* wrap(GtkPaned* object, bool take_copy = false);
 
445
} //namespace Glib
 
446
 
 
447
 
 
448
namespace Glib
 
449
{
 
450
  /** A Glib::wrap() method for this object.
 
451
   * 
 
452
   * @param object The C instance.
 
453
   * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
 
454
   * @result A C++ instance that wraps this C instance.
 
455
   *
 
456
   * @relates Gtk::HPaned
 
457
   */
 
458
  Gtk::HPaned* wrap(GtkHPaned* object, bool take_copy = false);
 
459
} //namespace Glib
 
460
 
 
461
 
 
462
namespace Glib
 
463
{
 
464
  /** A Glib::wrap() method for this object.
 
465
   * 
 
466
   * @param object The C instance.
 
467
   * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
 
468
   * @result A C++ instance that wraps this C instance.
 
469
   *
 
470
   * @relates Gtk::VPaned
 
471
   */
 
472
  Gtk::VPaned* wrap(GtkVPaned* object, bool take_copy = false);
 
473
} //namespace Glib
 
474
 
 
475
 
 
476
#endif /* _GTKMM_PANED_H */
 
477