Install ardour as a binary, a script and a set of shared
[ardour.git] / libs / gtkmm2 / gtk / gtkmm / window.h
1 // -*- c++ -*-
2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GTKMM_WINDOW_H
4 #define _GTKMM_WINDOW_H
5
6 #include <glibmm.h>
7
8 /* $Id$ */
9
10 /* window.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 <glibmm/object.h>
30 #include <glibmm/listhandle.h>
31 #include <gtkmm/bin.h>
32
33
34 #ifndef DOXYGEN_SHOULD_SKIP_THIS
35 typedef struct _GtkWindow GtkWindow;
36 typedef struct _GtkWindowClass GtkWindowClass;
37 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
38
39
40 namespace Gtk
41 { class Window_Class; } // namespace Gtk
42 #ifndef DOXYGEN_SHOULD_SKIP_THIS
43 typedef struct _GtkWindowGroup GtkWindowGroup;
44 typedef struct _GtkWindowGroupClass GtkWindowGroupClass;
45 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
46
47
48 namespace Gtk
49 { class WindowGroup_Class; } // namespace Gtk
50 namespace Gtk
51 {
52
53 class AccelGroup;
54 class WindowGroup;
55
56
57 /** Toplevel Window
58  * This represents all widgets which are physical windows controlled
59  * by the window manager.
60  *
61  * The window will be hidden when the window manager's close button is clicked. Override on_delete_event() to stop this.
62  *
63  * Gtk::manage() has no effect on Windows because they have no parent Containers.
64  * @ingroup Widgets
65  */
66
67 class Window : public Bin
68 {
69   public:
70 #ifndef DOXYGEN_SHOULD_SKIP_THIS
71   typedef Window CppObjectType;
72   typedef Window_Class CppClassType;
73   typedef GtkWindow BaseObjectType;
74   typedef GtkWindowClass BaseClassType;
75 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
76
77   virtual ~Window();
78
79 #ifndef DOXYGEN_SHOULD_SKIP_THIS
80
81 private:
82   friend class Window_Class;
83   static CppClassType window_class_;
84
85   // noncopyable
86   Window(const Window&);
87   Window& operator=(const Window&);
88
89 protected:
90   explicit Window(const Glib::ConstructParams& construct_params);
91   explicit Window(GtkWindow* castitem);
92
93 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
94
95 public:
96 #ifndef DOXYGEN_SHOULD_SKIP_THIS
97   static GType get_type()      G_GNUC_CONST;
98   static GType get_base_type() G_GNUC_CONST;
99 #endif
100
101   ///Provides access to the underlying C GtkObject.
102   GtkWindow*       gobj()       { return reinterpret_cast<GtkWindow*>(gobject_); }
103
104   ///Provides access to the underlying C GtkObject.
105   const GtkWindow* gobj() const { return reinterpret_cast<GtkWindow*>(gobject_); }
106
107
108 public:
109   //C++ methods used to invoke GTK+ virtual functions:
110
111 protected:
112   //GTK+ Virtual Functions (override these to change behaviour):
113
114   //Default Signal Handlers::
115   virtual void on_set_focus(Widget* focus);
116   virtual bool on_frame_event(GdkEvent* event);
117
118
119 private:
120
121   
122 public:
123    explicit Window(WindowType type = WINDOW_TOPLEVEL);
124
125   /** The title of the window.
126    *
127    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
128    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
129    * the value of the property changes.
130    */
131   Glib::PropertyProxy<Glib::ustring> property_title() ;
132
133 /** The title of the window.
134    *
135    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
136    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
137    * the value of the property changes.
138    */
139   Glib::PropertyProxy_ReadOnly<Glib::ustring> property_title() const;
140
141   /** If TRUE
142    *
143    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
144    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
145    * the value of the property changes.
146    */
147   Glib::PropertyProxy<bool> property_allow_shrink() ;
148
149 /** If TRUE
150    *
151    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
152    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
153    * the value of the property changes.
154    */
155   Glib::PropertyProxy_ReadOnly<bool> property_allow_shrink() const;
156
157   /** If TRUE
158    *
159    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
160    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
161    * the value of the property changes.
162    */
163   Glib::PropertyProxy<bool> property_allow_grow() ;
164
165 /** If TRUE
166    *
167    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
168    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
169    * the value of the property changes.
170    */
171   Glib::PropertyProxy_ReadOnly<bool> property_allow_grow() const;
172
173   /** If TRUE
174    *
175    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
176    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
177    * the value of the property changes.
178    */
179   Glib::PropertyProxy<bool> property_resizable() ;
180
181 /** If TRUE
182    *
183    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
184    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
185    * the value of the property changes.
186    */
187   Glib::PropertyProxy_ReadOnly<bool> property_resizable() const;
188
189   /** If TRUE
190    *
191    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
192    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
193    * the value of the property changes.
194    */
195   Glib::PropertyProxy<bool> property_modal() ;
196
197 /** If TRUE
198    *
199    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
200    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
201    * the value of the property changes.
202    */
203   Glib::PropertyProxy_ReadOnly<bool> property_modal() const;
204
205   /** The initial position of the window.
206    *
207    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
208    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
209    * the value of the property changes.
210    */
211   Glib::PropertyProxy<WindowPosition> property_window_position() ;
212
213 /** The initial position of the window.
214    *
215    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
216    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
217    * the value of the property changes.
218    */
219   Glib::PropertyProxy_ReadOnly<WindowPosition> property_window_position() const;
220
221   /** The default width of the window
222    *
223    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
224    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
225    * the value of the property changes.
226    */
227   Glib::PropertyProxy<int> property_default_width() ;
228
229 /** The default width of the window
230    *
231    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
232    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
233    * the value of the property changes.
234    */
235   Glib::PropertyProxy_ReadOnly<int> property_default_width() const;
236
237   /** The default height of the window
238    *
239    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
240    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
241    * the value of the property changes.
242    */
243   Glib::PropertyProxy<int> property_default_height() ;
244
245 /** The default height of the window
246    *
247    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
248    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
249    * the value of the property changes.
250    */
251   Glib::PropertyProxy_ReadOnly<int> property_default_height() const;
252
253   /** If this window should be destroyed when the parent is destroyed.
254    *
255    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
256    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
257    * the value of the property changes.
258    */
259   Glib::PropertyProxy<bool> property_destroy_with_parent() ;
260
261 /** If this window should be destroyed when the parent is destroyed.
262    *
263    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
264    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
265    * the value of the property changes.
266    */
267   Glib::PropertyProxy_ReadOnly<bool> property_destroy_with_parent() const;
268
269   /** Icon for this window.
270    *
271    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
272    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
273    * the value of the property changes.
274    */
275   Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> > property_icon() ;
276
277 /** Icon for this window.
278    *
279    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
280    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
281    * the value of the property changes.
282    */
283   Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixbuf> > property_icon() const;
284
285   
286   /** The screen where this window will be displayed.
287    *
288    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
289    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
290    * the value of the property changes.
291    */
292   Glib::PropertyProxy< Glib::RefPtr<Gdk::Screen> > property_screen() ;
293
294 /** The screen where this window will be displayed.
295    *
296    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
297    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
298    * the value of the property changes.
299    */
300   Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Screen> > property_screen() const;
301
302   /** Whether the toplevel is the current active window.
303    *
304    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
305    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
306    * the value of the property changes.
307    */
308   Glib::PropertyProxy_ReadOnly<bool> property_is_active() const;
309
310
311   /** Whether the input focus is within this GtkWindow.
312    *
313    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
314    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
315    * the value of the property changes.
316    */
317   Glib::PropertyProxy_ReadOnly<bool> property_has_toplevel_focus() const;
318
319
320   /** Hint to help the desktop environment understand what kind of window this is and how to treat it.
321    *
322    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
323    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
324    * the value of the property changes.
325    */
326   Glib::PropertyProxy<GdkWindowTypeHint> property_type_hint() ;
327
328 /** Hint to help the desktop environment understand what kind of window this is and how to treat it.
329    *
330    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
331    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
332    * the value of the property changes.
333    */
334   Glib::PropertyProxy_ReadOnly<GdkWindowTypeHint> property_type_hint() const;
335
336   /** TRUE if the window should not be in the task bar.
337    *
338    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
339    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
340    * the value of the property changes.
341    */
342   Glib::PropertyProxy<bool> property_skip_taskbar_hint() ;
343
344 /** TRUE if the window should not be in the task bar.
345    *
346    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
347    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
348    * the value of the property changes.
349    */
350   Glib::PropertyProxy_ReadOnly<bool> property_skip_taskbar_hint() const;
351
352   /** TRUE if the window should not be in the pager.
353    *
354    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
355    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
356    * the value of the property changes.
357    */
358   Glib::PropertyProxy<bool> property_skip_pager_hint() ;
359
360 /** TRUE if the window should not be in the pager.
361    *
362    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
363    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
364    * the value of the property changes.
365    */
366   Glib::PropertyProxy_ReadOnly<bool> property_skip_pager_hint() const;
367       
368   /** Unique identifier for the window to be used when restoring a session.
369    *
370    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
371    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
372    * the value of the property changes.
373    */
374   Glib::PropertyProxy<Glib::ustring> property_role() ;
375
376 /** Unique identifier for the window to be used when restoring a session.
377    *
378    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
379    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
380    * the value of the property changes.
381    */
382   Glib::PropertyProxy_ReadOnly<Glib::ustring> property_role() const;
383
384   /** Whether the window should be decorated by the window manager.
385    *
386    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
387    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
388    * the value of the property changes.
389    */
390   Glib::PropertyProxy<bool> property_decorated() ;
391
392 /** Whether the window should be decorated by the window manager.
393    *
394    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
395    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
396    * the value of the property changes.
397    */
398   Glib::PropertyProxy_ReadOnly<bool> property_decorated() const;
399
400   /** The window gravity of the window.
401    *
402    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
403    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
404    * the value of the property changes.
405    */
406   Glib::PropertyProxy<Gdk::Gravity> property_gravity() ;
407
408 /** The window gravity of the window.
409    *
410    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
411    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
412    * the value of the property changes.
413    */
414   Glib::PropertyProxy_ReadOnly<Gdk::Gravity> property_gravity() const;
415
416
417   bool is_toplevel() const;
418   bool is_dialog() const;
419   bool is_popup() const;
420
421   WindowType get_window_type() const;
422
423   //: This is special to the GTK+ linux-fb port.
424   Glib::RefPtr<Gdk::Window> get_frame();
425   Glib::RefPtr<const Gdk::Window> get_frame() const;
426
427
428   Glib::SignalProxy1< void,Widget* > signal_set_focus();
429
430   
431   Glib::SignalProxy1< bool,GdkEvent* > signal_frame_event();
432
433
434   //Keybinding signals:
435   
436   
437   /** Sets the title of the Gtk::Window. The title of a window will be
438    * displayed in its title bar; on the X&nbsp;%Window System, the title bar
439    * is rendered by the window
440    * manager, so exactly how the title appears to users may vary
441    * according to a user's exact configuration. The title should help a
442    * user distinguish this window from other windows they may have
443    * open. A good title might include the application name and current
444    * document filename, for example.
445    * @param title Title of the window.
446    */
447   void set_title(const Glib::ustring& title);
448
449   
450   /** Retrieves the title of the window. See set_title().
451    * @return The title of the window, or <tt>0</tt> if none has
452    * been set explicitely. The returned string is owned by the widget
453    * and must not be modified or freed.
454    */
455   Glib::ustring get_title() const;
456
457   
458   /** Don't use this function. It sets the X&nbsp;%Window System "class" and
459    * "name" hints for a window.  According to the ICCCM, you should
460    * always set these to the same value for all windows in an
461    * application, and GTK+ sets them to that value by default, so calling
462    * this function is sort of pointless. However, you may want to call
463    * set_role() on each window in your application, for the
464    * benefit of the session manager. Setting the role allows the window
465    * manager to restore window positions when loading a saved session.
466    * @param wmclass_name Window name hint.
467    * @param wmclass_class Window class hint.
468    */
469   void set_wmclass(const Glib::ustring& wmclass_name,
470                                 const Glib::ustring& wmclass_class);
471
472   
473   /** This function is only useful on X11, not with other GTK+ targets.
474    * 
475    * In combination with the window title, the window role allows a
476    * window manager to identify "the
477    * same" window when an application is restarted. So for example you
478    * might set the "toolbox" role on your app's toolbox window, so that
479    * when the user restarts their session, the window manager can put
480    * the toolbox back in the same place.
481    * 
482    * If a window already has a unique title, you don't need to set the
483    * role, since the WM can use the title to identify the window when
484    * restoring the session.
485    * @param role Unique identifier for the window to be used when restoring a session.
486    */
487   void set_role(const Glib::ustring& role);
488
489   //: Returns the role of the window.
490   //- See {set_role()} for further explanation.
491   
492   /** Returns the role of the window. See set_role() for
493    * further explanation.
494    * @return The role of the window if set, or <tt>0</tt>. The
495    * returned is owned by the widget and must not be modified
496    * or freed.
497    */
498   Glib::ustring get_role() const;
499
500
501   /** Associate @a accel_group  with @a window , such that calling
502    * gtk_accel_groups_activate() on @a window  will activate accelerators
503    * in @a accel_group .
504    * @param accel_group A Gtk::AccelGroup.
505    */
506   void add_accel_group(const Glib::RefPtr<AccelGroup>& accel_group);
507
508   
509   /** Reverses the effects of add_accel_group().
510    * @param accel_group A Gtk::AccelGroup.
511    */
512   void remove_accel_group(const Glib::RefPtr<AccelGroup>& accel_group);
513
514   
515   /** Sets a position constraint for this window. If the old or new
516    * constraint is Gtk::WIN_POS_CENTER_ALWAYS, this will also cause
517    * the window to be repositioned to satisfy the new constraint.
518    * @param position A position constraint.
519    */
520   void set_position(WindowPosition position);
521
522   
523   /** Activates the current focused widget within the window.
524    * @return <tt>true</tt> if a widget got activated.
525    */
526   bool activate_focus();
527
528   
529   /** If @a focus  is not the current focus widget, and is focusable, sets
530    * it as the focus widget for the window. To set the focus to a particular
531    * widget in the toplevel, it is usually more convenient to use
532    * Gtk::Widget::grab_focus() instead of this function.
533    * @param focus Widget to be the new focus widget.
534    */
535   void set_focus(Gtk::Widget& focus);
536   void unset_focus();
537   
538   
539   /** Retrieves the current focused widget within the window.
540    * Note that this is the widget that would have the focus
541    * if the toplevel window focused; if the toplevel window
542    * is not focused then  <tt>GTK_WIDGET_HAS_FOCUS (widget)</tt> will
543    * not be <tt>true</tt> for the widget.
544    * @return The currently focused widget, or <tt>0</tt> if there is none.
545    */
546   Widget* get_focus();
547   
548   /** Retrieves the current focused widget within the window.
549    * Note that this is the widget that would have the focus
550    * if the toplevel window focused; if the toplevel window
551    * is not focused then  <tt>GTK_WIDGET_HAS_FOCUS (widget)</tt> will
552    * not be <tt>true</tt> for the widget.
553    * @return The currently focused widget, or <tt>0</tt> if there is none.
554    */
555   const Widget* get_focus() const;
556   
557   /** The default widget is the widget that's activated when the user
558    * presses Enter in a dialog (for example). This function sets the default widget for a Gtk::Window. When setting
559    * (rather than unsetting) the default widget it's generally easier to
560    * call Gtk::Widget::grab_focus() on the widget. Before making a widget
561    * the default widget, you must set the Gtk::CAN_DEFAULT flag on the
562    * widget you'd like to make the default using GTK_WIDGET_SET_FLAGS().
563    * @param default_widget Widget to be the default.
564    */
565   void set_default(Gtk::Widget& default_widget);
566   void unset_default();
567  
568   
569   /** Activates the default widget for the window, unless the current 
570    * focused widget has been configured to receive the default action 
571    * (see Gtk::RECEIVES_DEFAULT in Gtk::WidgetFlags), in which case the
572    * focused widget is activated.
573    * @return <tt>true</tt> if a widget got activated.
574    */
575   bool activate_default();
576
577   
578   /** Dialog windows should be set transient for the main application
579    * window they were spawned from. This allows window managers to e.g. keep the
580    * dialog on top of the main window, or center the dialog over the
581    * main window. Gtk::Dialog::new_with_buttons() and other convenience
582    * functions in GTK+ will sometimes call
583    * set_transient_for() on your behalf.
584    * 
585    * On Windows, this function will and put the child window
586    * on top of the parent, much as the window manager would have
587    * done on X.
588    * @param parent Parent window.
589    */
590   void set_transient_for(Window& parent);
591
592   
593   /** Fetches the transient parent for this window. See
594    * set_transient_for().
595    * @return The transient parent for this window, or <tt>0</tt>
596    * if no transient parent has been set.
597    */
598   Window* get_transient_for();
599   
600   /** Fetches the transient parent for this window. See
601    * set_transient_for().
602    * @return The transient parent for this window, or <tt>0</tt>
603    * if no transient parent has been set.
604    */
605   const Window* get_transient_for() const;
606
607   
608   /** By setting the type hint for the window, you allow the window
609    * manager to decorate and handle the window in a way which is
610    * suitable to the function of the window in your application.
611    * 
612    * This function should be called before the window becomes visible.
613    * 
614    * Gtk::Dialog::new_with_buttons() and other convenience functions in GTK+
615    * will sometimes call set_type_hint() on your behalf.
616    * @param hint The window type.
617    */
618   void set_type_hint(Gdk::WindowTypeHint hint);
619
620   
621   /** Gets the type hint for this window. See set_type_hint().
622    * @return The type hint for @a window .
623    */
624   Gdk::WindowTypeHint get_type_hint() const;
625
626   
627   /** Windows may set a hint asking the desktop environment not to display
628    * the window in the task bar. This function sets this hint.
629    * 
630    * Since: 2.2
631    * @param setting <tt>true</tt> to keep this window from appearing in the task bar.
632    */
633   void set_skip_taskbar_hint(bool setting = true);
634   
635   /** Gets the value set by set_skip_taskbar_hint()
636    * @return <tt>true</tt> if window shouldn't be in taskbar
637    * 
638    * Since: 2.2.
639    */
640   bool get_skip_taskbar_hint() const;
641
642   
643   /** Windows may set a hint asking the desktop environment not to display
644    * the window in the pager. This function sets this hint.
645    * (A "pager" is any desktop navigation tool such as a workspace
646    * switcher that displays a thumbnail representation of the windows
647    * on the screen.)
648    * 
649    * Since: 2.2
650    * @param setting <tt>true</tt> to keep this window from appearing in the pager.
651    */
652   void set_skip_pager_hint(bool setting = true);
653   
654   /** Gets the value set by set_skip_pager_hint().
655    * @return <tt>true</tt> if window shouldn't be in pager
656    * 
657    * Since: 2.2.
658    */
659   bool get_skip_pager_hint() const;
660
661   //_WRAP_METHOD(void set_destroy_with_parent(bool setting = true), gtk_window_set_destroy_with_parent)
662   // I don't that that this is ever a good thing for C++.murrayc.
663
664   
665   /** Returns whether the window will be destroyed with its transient parent. See
666    * set_destroy_with_parent().
667    * @return <tt>true</tt> if the window will be destroyed with its transient parent.
668    */
669   bool get_destroy_with_parent() const;
670   // I don't that that this is ever a good thing for C++.murrayc.
671
672   
673   /** Sets whether the user can resize a window. Windows are user resizable
674    * by default.
675    * @param resizable <tt>true</tt> if the user can resize this window.
676    */
677   void set_resizable(bool resizable = true);
678
679   
680   /** Gets the value set by set_resizable().
681    * @return <tt>true</tt> if the user can resize the window.
682    */
683   bool get_resizable() const;
684
685   
686   /** Window gravity defines the meaning of coordinates passed to
687    * move(). See move() and Gdk::Gravity for
688    * more details.
689    * 
690    * The default window gravity is Gdk::GRAVITY_NORTH_WEST which will
691    * typically "do what you mean."
692    * @param gravity Window gravity.
693    */
694   void set_gravity(Gdk::Gravity gravity);
695
696   
697   /** Gets the value set by set_gravity().
698    * @return Window gravity.
699    */
700   Gdk::Gravity get_gravity() const;
701
702   
703   /** This function sets up hints about how a window can be resized by
704    * the user.  You can set a minimum and maximum size; allowed resize
705    * increments (e.g. for xterm, you can only resize by the size of a
706    * character); aspect ratios; and more. See the Gdk::Geometry struct.
707    * @param geometry_widget Widget the geometry hints will be applied to.
708    * @param geometry Struct containing geometry information.
709    * @param geom_mask Mask indicating which struct fields should be paid attention to.
710    */
711   void set_geometry_hints(Widget& geometry_widget,
712                                        const Gdk::Geometry& geometry,
713                                        Gdk::WindowHints geom_mask);
714
715   
716   /** Sets the Gdk::Screen where the @a window  is displayed; if
717    * the window is already mapped, it will be unmapped, and
718    * then remapped on the new screen.
719    * 
720    * Since: 2.2
721    * @param screen A Gdk::Screen.
722    */
723   void set_screen(const Glib::RefPtr<Gdk::Screen>& screen);
724
725   
726   /** Returns the Gdk::Screen associated with @a window .
727    * @return A Gdk::Screen.
728    * 
729    * Since: 2.2.
730    */
731   Glib::RefPtr<Gdk::Screen> get_screen();
732   
733   /** Returns the Gdk::Screen associated with @a window .
734    * @return A Gdk::Screen.
735    * 
736    * Since: 2.2.
737    */
738   Glib::RefPtr<const Gdk::Screen> get_screen() const;
739
740
741   /** (Note: this is a special-purpose function for the framebuffer port,
742    * that causes GTK+ to draw its own window border. For most applications,
743    * you want set_decorated() instead, which tells the window
744    * manager whether to draw the window border.)
745    * 
746    * If this function is called on a window with setting of <tt>true</tt>, before
747    * it is realized or showed, it will have a "frame" window around
748    *  @a window -&gt;window, accessible in @a window -&gt;frame. Using the signal 
749    * frame_event you can receive all events targeted at the frame.
750    * 
751    * This function is used by the linux-fb port to implement managed
752    * windows, but it could concievably be used by X-programs that
753    * want to do their own window decorations.
754    * @param setting A boolean.
755    */
756   void set_has_frame(bool setting = true);
757
758   
759   /** Accessor for whether the window has a frame window exterior to
760    *  @a window -&gt;window. Gets the value set by set_has_frame().
761    * @return <tt>true</tt> if a frame has been added to the window
762    * via set_has_frame().
763    */
764   bool get_has_frame() const;
765
766   
767   /** (Note: this is a special-purpose function intended for the framebuffer
768    * port; see set_has_frame(). It will have no effect on the
769    * window border drawn by the window manager, which is the normal
770    * case when using the X&nbsp;%Window system.)
771    * 
772    * For windows with frames (see set_has_frame()) this function
773    * can be used to change the size of the frame border.
774    * @param left The width of the left border.
775    * @param top The height of the top border.
776    * @param right The width of the right border.
777    * @param bottom The height of the bottom border.
778    */
779   void set_frame_dimensions(int left,  int top,
780                                          int right, int bottom);
781
782   
783   /** (Note: this is a special-purpose function intended for the
784    * framebuffer port; see set_has_frame(). It will not
785    * return the size of the window border drawn by the window manager, which is the normal
786    * case when using a windowing system.  See
787    * gdk_window_get_frame_extents() to get the standard window border
788    * extents.)
789    * 
790    * Retrieves the dimensions of the frame window for this toplevel.
791    * See set_has_frame(), set_frame_dimensions().
792    * @param left Location to store the width of the frame at the left.
793    * @param top Location to store the height of the frame at the top.
794    * @param right Location to store the width of the frame at the returns.
795    * @param bottom Location to store the height of the frame at the bottom.
796    */
797   void get_frame_dimensions(int& left,  int& top,
798                                          int& right, int& bottom) const;
799
800   
801   /** By default, windows are decorated with a title bar, resize
802    * controls, etc.  Some window
803    * managers allow GTK+ to disable these decorations, creating a
804    * borderless window. If you set the decorated property to <tt>false</tt>
805    * using this function, GTK+ will do its best to convince the window
806    * manager not to decorate the window. Depending on the system, this
807    * function may not have any effect when called on a window that is
808    * already visible, so you should call it before calling gtk_window_show().
809    * 
810    * On Windows, this function always works, since there's no window manager
811    * policy involved.
812    * @param setting <tt>true</tt> to decorate the window.
813    */
814   void set_decorated(bool setting = true);
815   
816   /** Returns whether the window has been set to have decorations
817    * such as a title bar via set_decorated().
818    * @return <tt>true</tt> if the window has been set to have decorations.
819    */
820   bool get_decorated() const;
821
822
823   /** Retrieves the list of icons set by set_icon_list().
824    * The list is copied, but the reference count on each
825    * member won't be incremented.
826    * @return Copy of window's icon list.
827    */
828   Glib::ListHandle< Glib::RefPtr<Gdk::Pixbuf> > get_icon_list();
829   
830   /** Retrieves the list of icons set by set_icon_list().
831    * The list is copied, but the reference count on each
832    * member won't be incremented.
833    * @return Copy of window's icon list.
834    */
835   Glib::ListHandle< Glib::RefPtr<const Gdk::Pixbuf> > get_icon_list() const;
836
837   
838   /** Sets up the icon representing a Gtk::Window. The icon is used when
839    * the window is minimized (also known as iconified).  Some window
840    * managers or desktop environments may also place it in the window
841    * frame, or display it in other contexts.
842    * 
843    * set_icon_list() allows you to pass in the same icon in
844    * several hand-drawn sizes. The list should contain the natural sizes
845    * your icon is available in; that is, don't scale the image before
846    * passing it to GTK+. Scaling is postponed until the last minute,
847    * when the desired final size is known, to allow best quality.
848    * 
849    * By passing several sizes, you may improve the final image quality
850    * of the icon, by reducing or eliminating automatic image scaling.
851    * 
852    * Recommended sizes to provide: 16x16, 32x32, 48x48 at minimum, and
853    * larger images (64x64, 128x128) if you have them.
854    * 
855    * See also set_default_icon_list() to set the icon
856    * for all windows in your application in one go.
857    * 
858    * Note that transient windows (those who have been set transient for another
859    * window using set_transient_for()) will inherit their
860    * icon from their transient parent. So there's no need to explicitly
861    * set the icon on transient windows.
862    * @param list List of Gdk::Pixbuf.
863    */
864   void set_icon_list(const Glib::ListHandle< Glib::RefPtr<Gdk::Pixbuf> >& list);
865
866   
867   /** Sets up the icon representing a Gtk::Window. This icon is used when
868    * the window is minimized (also known as iconified).  Some window
869    * managers or desktop environments may also place it in the window
870    * frame, or display it in other contexts.
871    * 
872    * The icon should be provided in whatever size it was naturally
873    * drawn; that is, don't scale the image before passing it to
874    * GTK+. Scaling is postponed until the last minute, when the desired
875    * final size is known, to allow best quality.
876    * 
877    * If you have your icon hand-drawn in multiple sizes, use
878    * set_icon_list(). Then the best size will be used.
879    * 
880    * This function is equivalent to calling set_icon_list()
881    * with a 1-element list.
882    * 
883    * See also set_default_icon_list() to set the icon
884    * for all windows in your application in one go.
885    * @param icon Icon image, or <tt>0</tt>.
886    */
887   void set_icon(const Glib::RefPtr<Gdk::Pixbuf>& icon);
888
889
890   /** Sets the icon for the window.
891    * 
892    * This function is equivalent to calling set_icon()
893    * with a pixbuf created by loading the image from @a filename .
894    * @param filename Location of icon file.
895    * @return <tt>true</tt> if setting the icon succeeded.
896    * 
897    * Since: 2.2.
898    */
899   bool set_icon_from_file(const std::string& filename);
900
901   
902   /** Gets the value set by set_icon() (or if you've
903    * called set_icon_list(), gets the first icon in
904    * the icon list).
905    * @return Icon for window.
906    */
907   Glib::RefPtr<Gdk::Pixbuf> get_icon();
908   
909   /** Gets the value set by set_icon() (or if you've
910    * called set_icon_list(), gets the first icon in
911    * the icon list).
912    * @return Icon for window.
913    */
914   Glib::RefPtr<const Gdk::Pixbuf> get_icon() const;
915
916   
917   /** Sets an icon list to be used as fallback for windows that haven't
918    * had set_icon_list() called on them to set up a
919    * window-specific icon list. This function allows you to set up the
920    * icon for all windows in your app at once.
921    * 
922    * See set_icon_list() for more details.
923    * @param list A list of Gdk::Pixbuf.
924    */
925   static void set_default_icon_list(
926                    const Glib::ListHandle< Glib::RefPtr<Gdk::Pixbuf> >& list);
927
928   
929   /** Gets the value set by Gtk::Window::set_default_icon_list().
930    * @return Copy of default icon list.
931    */
932   static Glib::ListHandle< Glib::RefPtr<Gdk::Pixbuf> > get_default_icon_list();
933   
934   
935   /** Sets an icon to be used as fallback for windows that haven't
936    * had set_icon_list() called on them from a file
937    * on disk. Warns on failure if @a err  is <tt>0</tt>.
938    * @param filename Location of icon file.
939    * @return <tt>true</tt> if setting the icon succeeded.
940    * 
941    * Since: 2.2.
942    */
943   static bool set_default_icon_from_file(const std::string& filename);
944   
945   /** By default, after showing the first Gtk::Window for each Gdk::Screen,
946    * GTK+ calls gdk_screen_notify_startup_complete().  Call this
947    * function to disable the automatic startup notification. You might
948    * do this if your first window is a splash screen, and you want to
949    * delay notification until after your real main window has been
950    * shown, for example.
951    * 
952    * In that example, you would disable startup notification
953    * temporarily, show your splash screen, then re-enable it so that
954    * showing the main window would automatically result in notification.
955    * 
956    * Since: 2.2
957    * @param setting <tt>true</tt> to automatically do startup notification.
958    */
959   static void set_auto_startup_notification(bool setting = true);
960
961   
962   /** Sets a window modal or non-modal. Modal windows prevent interaction
963    * with other windows in the same application. To keep modal dialogs
964    * on top of main application windows, use
965    * set_transient_for() to make the dialog transient for the
966    * parent; most window managers
967    * will then disallow lowering the dialog below the parent.
968    * @param modal Whether the window is modal.
969    */
970   void set_modal(bool modal = true);
971
972   
973   /** Returns whether the window is modal. See set_modal().
974    * @return <tt>true</tt> if the window is set to be modal and
975    * establishes a grab when shown.
976    */
977   bool get_modal() const;
978
979
980   /** Returns a list of all existing toplevel windows. The widgets
981    * in the list are not individually referenced. If you want
982    * to iterate through the list and perform actions involving
983    * callbacks that might destroy the widgets, you <em>must</em> call
984    * <tt>g_list_foreach (result, (GFunc)g_object_ref, <tt>0</tt>)</tt> first, and
985    * then unref all the widgets afterwards.
986    * @return List of toplevel widgets.
987    */
988   static Glib::ListHandle<Window*> list_toplevels();
989
990
991   /** Adds a mnemonic to this window.
992    * @param keyval The mnemonic.
993    * @param target The widget that gets activated by the mnemonic.
994    */
995   void add_mnemonic(guint keyval, Widget& target);
996
997   
998   /** Removes a mnemonic from this window.
999    * @param keyval The mnemonic.
1000    * @param target The widget that gets activated by the mnemonic.
1001    */
1002   void remove_mnemonic(guint keyval, Widget& target);
1003
1004   
1005   /** Activates the targets associated with the mnemonic.
1006    * @param keyval The mnemonic.
1007    * @param modifier The modifiers.
1008    * @return <tt>true</tt> if the activation is done.
1009    */
1010   bool mnemonic_activate(guint keyval, Gdk::ModifierType modifier);
1011
1012   
1013   /** Sets the mnemonic modifier for this window.
1014    * @param modifier The modifier mask used to activate
1015    * mnemonics on this window.
1016    */
1017   void set_mnemonic_modifier(Gdk::ModifierType modifier);
1018
1019   
1020   /** Returns the mnemonic modifier for this window. See
1021    * set_mnemonic_modifier().
1022    * @return The modifier mask used to activate
1023    * mnemonics on this window.
1024    */
1025   Gdk::ModifierType get_mnemonic_modifier();
1026
1027
1028   /** Presents a window to the user. This may mean raising the window
1029    * in the stacking order, deiconifying it, moving it to the current
1030    * desktop, and/or giving it the keyboard focus, possibly dependent
1031    * on the user's platform, window manager, and preferences.
1032    * 
1033    * If @a window  is hidden, this function calls Gtk::Widget::show()
1034    * as well.
1035    * 
1036    * This function should be used when the user tries to open a window
1037    * that's already open. Say for example the preferences dialog is
1038    * currently open, and the user chooses Preferences from the menu
1039    * a second time; use present() to move the already-open dialog
1040    * where the user can see it.
1041    */
1042   void present();
1043
1044   
1045   /** Asks to iconify (i.e.\ minimize) the specified @a window . Note that
1046    * you shouldn't assume the window is definitely iconified afterward,
1047    * because other entities (e.g. the user or window manager) could deiconify it
1048    * again, or there may not be a window manager in which case
1049    * iconification isn't possible, etc. But normally the window will end
1050    * up iconified. Just don't write code that crashes if not.
1051    * 
1052    * It's permitted to call this function before showing a window,
1053    * in which case the window will be iconified before it ever appears
1054    * onscreen.
1055    * 
1056    * You can track iconification via the "window_state_event" signal
1057    * on Gtk::Widget.
1058    */
1059   void iconify();
1060   
1061   /** Asks to deiconify (i.e.\ unminimize) the specified @a window . Note
1062    * that you shouldn't assume the window is definitely deiconified
1063    * afterward, because other entities (e.g. the user or window manager) could iconify it
1064    * again before your code which assumes deiconification gets to run.
1065    * 
1066    * You can track iconification via the "window_state_event" signal
1067    * on Gtk::Widget.
1068    */
1069   void deiconify();
1070
1071   
1072   /** Asks to stick @a window , which means that it will appear on all user
1073    * desktops. Note that you shouldn't assume the window is definitely
1074    * stuck afterward, because other entities (e.g. the user or window manager) could unstick it
1075    * again, and some window managers do not support sticking
1076    * windows. But normally the window will end up stuck. Just don't
1077    * write code that crashes if not.
1078    * 
1079    * It's permitted to call this function before showing a window.
1080    * 
1081    * You can track stickiness via the "window_state_event" signal
1082    * on Gtk::Widget.
1083    */
1084   void stick();
1085   
1086   /** Asks to unstick @a window , which means that it will appear on only
1087    * one of the user's desktops. Note that you shouldn't assume the
1088    * window is definitely unstuck afterward, because other entities
1089    * (e.g. the user or window
1090    * manager) could stick it again. But normally the window will
1091    * end up stuck. Just don't write code that crashes if not.
1092    * 
1093    * You can track stickiness via the "window_state_event" signal
1094    * on Gtk::Widget.
1095    */
1096   void unstick();
1097
1098   
1099   /** Asks to maximize @a window , so that it becomes full-screen. Note that
1100    * you shouldn't assume the window is definitely maximized afterward,
1101    * because other entities (e.g. the user or window manager) could unmaximize it
1102    * again, and not all window managers support maximization. But
1103    * normally the window will end up maximized. Just don't write code
1104    * that crashes if not.
1105    * 
1106    * It's permitted to call this function before showing a window,
1107    * in which case the window will be maximized when it appears onscreen
1108    * initially.
1109    * 
1110    * You can track maximization via the "window_state_event" signal
1111    * on Gtk::Widget.
1112    */
1113   void maximize();
1114   
1115   /** Asks to unmaximize @a window . Note that you shouldn't assume the
1116    * window is definitely unmaximized afterward, because other entities
1117    * (e.g. the user or window
1118    * manager) could maximize it again, and not all window
1119    * managers honor requests to unmaximize. But normally the window will
1120    * end up unmaximized. Just don't write code that crashes if not.
1121    * 
1122    * You can track maximization via the "window_state_event" signal
1123    * on Gtk::Widget.
1124    */
1125   void unmaximize();
1126
1127   
1128   /** Asks to place @a window  in the fullscreen state. Note that you
1129    * shouldn't assume the window is definitely full screen afterward,
1130    * because other entities (e.g. the user or window manager) could unfullscreen it
1131    * again, and not all window managers honor requests to fullscreen
1132    * windows. But normally the window will end up fullscreen. Just
1133    * don't write code that crashes if not.
1134    * 
1135    * You can track the fullscreen state via the "window_state_event" signal
1136    * on Gtk::Widget.
1137    * 
1138    * Since: 2.2
1139    */
1140   void fullscreen();
1141   
1142   /** Asks to toggle off the fullscreen state for @a window . Note that you
1143    * shouldn't assume the window is definitely not full screen
1144    * afterward, because other entities (e.g. the user or window manager) could fullscreen it
1145    * again, and not all window managers honor requests to unfullscreen
1146    * windows. But normally the window will end up restored to its normal
1147    * state. Just don't write code that crashes if not.
1148    * 
1149    * You can track the fullscreen state via the "window_state_event" signal
1150    * on Gtk::Widget.
1151    * 
1152    * Since: 2.2
1153    */
1154   void unfullscreen();
1155         
1156   
1157   /** Starts resizing a window. This function is used if an application
1158    * has window resizing controls. When GDK can support it, the resize
1159    * will be done using the standard mechanism for the window manager or windowing
1160    * system. Otherwise, GDK will try to emulate window resizing,
1161    * potentially not all that well, depending on the windowing system.
1162    * @param button Mouse button that initiated the drag.
1163    * @param edge Position of the resize control.
1164    * @param root_x X position where the user clicked to initiate the drag, in root window coordinates.
1165    * @param root_y Y position where the user clicked to initiate the drag.
1166    * @param timestamp Timestamp from the click event that initiated the drag.
1167    */
1168   void begin_resize_drag(Gdk::WindowEdge edge,
1169                    int button, int root_x, int root_y, guint32 timestamp);
1170
1171   
1172   /** Starts moving a window. This function is used if an application has
1173    * window movement grips. When GDK can support it, the window movement
1174    * will be done using the standard mechanism for the window manager or windowing
1175    * system. Otherwise, GDK will try to emulate window movement,
1176    * potentially not all that well, depending on the windowing system.
1177    * @param button Mouse button that initiated the drag.
1178    * @param root_x X position where the user clicked to initiate the drag, in root window coordinates.
1179    * @param root_y Y position where the user clicked to initiate the drag.
1180    * @param timestamp Timestamp from the click event that initiated the drag.
1181    */
1182   void begin_move_drag(
1183                    int button, int root_x, int root_y, guint32 timestamp);
1184
1185   
1186   /** Sets the default size of a window. If the window's "natural" size
1187    * (its size request) is larger than the default, the default will be
1188    * ignored. More generally, if the default size does not obey the
1189    * geometry hints for the window (set_geometry_hints() can
1190    * be used to set these explicitly), the default size will be clamped
1191    * to the nearest permitted size.
1192    * 
1193    * Unlike Gtk::Widget::set_size_request(), which sets a size request for
1194    * a widget and thus would keep users from shrinking the window, this
1195    * function only sets the initial size, just as if the user had
1196    * resized the window themselves. Users can still shrink the window
1197    * again as they normally would. Setting a default size of -1 means to
1198    * use the "natural" default size (the size request of the window).
1199    * 
1200    * For more control over a window's initial size and how resizing works,
1201    * investigate set_geometry_hints().
1202    * 
1203    * For some uses, resize() is a more appropriate function.
1204    * resize() changes the current size of the window, rather
1205    * than the size to be used on initial display. resize() always
1206    * affects the window itself, not the geometry widget.
1207    * 
1208    * The default size of a window only affects the first time a window is
1209    * shown; if a window is hidden and re-shown, it will remember the size
1210    * it had prior to hiding, rather than using the default size.
1211    * 
1212    * Windows can't actually be 0x0 in size, they must be at least 1x1, but
1213    * passing 0 for @a width  and @a height  is OK, resulting in a 1x1 default size.
1214    * @param width Width in pixels, or -1 to unset the default width.
1215    * @param height Height in pixels, or -1 to unset the default height.
1216    */
1217   void set_default_size(int width, int height);
1218
1219   
1220   /** Gets the default size of the window. A value of -1 for the width or
1221    * height indicates that a default size has not been explicitly set
1222    * for that dimension, so the "natural" size of the window will be
1223    * used.
1224    * @param width Location to store the default width.
1225    * @param height Location to store the default height.
1226    */
1227   void get_default_size(int& width, int& height) const;
1228
1229   
1230   /** Resizes the window as if the user had done so, obeying geometry
1231    * constraints. The default geometry constraint is that windows may
1232    * not be smaller than their size request; to override this
1233    * constraint, call Gtk::Widget::set_size_request() to set the window's
1234    * request to a smaller value.
1235    * 
1236    * If resize() is called before showing a window for the
1237    * first time, it overrides any default size set with
1238    * set_default_size().
1239    * 
1240    * Windows may not be resized smaller than 1 by 1 pixels.
1241    * @param width Width in pixels to resize the window to.
1242    * @param height Height in pixels to resize the window to.
1243    */
1244   void resize(int width, int height);
1245
1246   
1247   /** Obtains the current size of @a window . If @a window  is not onscreen,
1248    * it returns the size GTK+ will suggest to the window manager for the initial window
1249    * size (but this is not reliably the same as the size the window
1250    * manager will actually select). The size obtained by
1251    * get_size() is the last size received in a
1252    * Gdk::EventConfigure, that is, GTK+ uses its locally-stored size,
1253    * rather than querying the X server for the size. As a result, if you
1254    * call resize() then immediately call
1255    * get_size(), the size won't have taken effect yet. After
1256    * the window manager processes the resize request, GTK+ receives
1257    * notification that the size has changed via a configure event, and
1258    * the size of the window gets updated.
1259    * 
1260    * @note Nearly any use of this function creates a race condition,
1261    * because the size of the window may change between the time that you
1262    * get the size and the time that you perform some action assuming
1263    * that size is the current size. To avoid race conditions, connect to
1264    * "configure_event" on the window and adjust your size-dependent
1265    * state to match the size delivered in the Gdk::EventConfigure.
1266    * 
1267    * @note The returned size does <em>not</em> include the
1268    * size of the window manager decorations (aka the window frame or
1269    * border). Those are not drawn by GTK+ and GTK+ has no reliable
1270    * method of determining their size.
1271    * 
1272    * @note If you are getting a window size in order to position
1273    * the window onscreen, there may be a better way. The preferred
1274    * way is to simply set the window's semantic type with
1275    * set_type_hint(), which allows the window manager to
1276    * e.g. center dialogs. Also, if you set the transient parent of
1277    * dialogs with set_transient_for() window managers
1278    * will often center the dialog over its parent window. It's
1279    * much preferred to let the window manager handle these
1280    * things rather than doing it yourself, because all apps will
1281    * behave consistently and according to user prefs if the window
1282    * manager handles it. Also, the window manager can take the size
1283    * of the window decorations/border into account, while your
1284    * application cannot.
1285    * 
1286    * In any case, if you insist on application-specified window
1287    * positioning, there's <em>still</em> a better way than
1288    * doing it yourself - set_position() will frequently
1289    * handle the details for you.
1290    * @param width Return location for width.
1291    * @param height Return location for height.
1292    */
1293   void get_size(int& width, int& height) const;
1294
1295
1296   /** Asks the window manager to move
1297    *  @a window  to the given position.  %Window managers are free to ignore
1298    * this; most window managers ignore requests for initial window
1299    * positions (instead using a user-defined placement algorithm) and
1300    * honor requests after the window has already been shown.
1301    * 
1302    * @note the position is the position of the gravity-determined
1303    * reference point for the window. The gravity determines two things:
1304    * first, the location of the reference point in root window
1305    * coordinates; and second, which point on the window is positioned at
1306    * the reference point.
1307    * 
1308    * By default the gravity is Gdk::GRAVITY_NORTH_WEST, so the reference
1309    * point is simply the @a x , @a y  supplied to move(). The
1310    * top-left corner of the window decorations (aka window frame or
1311    * border) will be placed at @a x , @a y .  Therefore, to position a window
1312    * at the top left of the screen, you want to use the default gravity
1313    * (which is Gdk::GRAVITY_NORTH_WEST) and move the window to 0,0.
1314    * 
1315    * To position a window at the bottom right corner of the screen, you
1316    * would set Gdk::GRAVITY_SOUTH_EAST, which means that the reference
1317    * point is at @a x  + the window width and @a y  + the window height, and
1318    * the bottom-right corner of the window border will be placed at that
1319    * reference point. So, to place a window in the bottom right corner
1320    * you would first set gravity to south east, then write:
1321    * <tt>gtk_window_move (window, gdk_screen_width() - window_width,
1322    * gdk_screen_height() - window_height)</tt>.
1323    * 
1324    * The Extended Window Manager Hints specification at 
1325    * http://www.freedesktop.org/standards/wm-spec has a 
1326    * nice table of gravities in the "implementation notes" section.
1327    * 
1328    * The get_position() documentation may also be relevant.
1329    * @param x X coordinate to move window to.
1330    * @param y Y coordinate to move window to.
1331    */
1332   void move(int x, int y);
1333
1334   
1335   /** This function returns the position you need to pass to
1336    * move() to keep @a window  in its current position.  This
1337    * means that the meaning of the returned value varies with window
1338    * gravity. See move() for more details.
1339    * 
1340    * If you haven't changed the window gravity, its gravity will be
1341    * Gdk::GRAVITY_NORTH_WEST. This means that get_position()
1342    * gets the position of the top-left corner of the window manager
1343    * frame for the window. move() sets the position of this
1344    * same top-left corner.
1345    * 
1346    * get_position() is not 100% reliable because the X&nbsp;%Window System
1347    * does not specify a way to obtain the geometry of the
1348    * decorations placed on a window by the window manager.
1349    * Thus GTK+ is using a "best guess" that works with most
1350    * window managers.
1351    * 
1352    * Moreover, nearly all window managers are historically broken with
1353    * respect to their handling of window gravity. So moving a window to
1354    * its current position as returned by get_position() tends
1355    * to result in moving the window slightly. %Window managers are
1356    * slowly getting better over time.
1357    * 
1358    * If a window has gravity Gdk::GRAVITY_STATIC the window manager
1359    * frame is not relevant, and thus get_position() will
1360    * always produce accurate results. However you can't use static
1361    * gravity to do things like place a window in a corner of the screen,
1362    * because static gravity ignores the window manager decorations.
1363    * 
1364    * If you are saving and restoring your application's window
1365    * positions, you should know that it's impossible for applications to
1366    * do this without getting it somewhat wrong because applications do
1367    * not have sufficient knowledge of window manager state. The Correct
1368    * Mechanism is to support the session management protocol (see the
1369    * "GnomeClient" object in the GNOME libraries for example) and allow
1370    * the window manager to save your window sizes and positions.
1371    * @param root_x Return location for X coordinate of gravity-determined reference point.
1372    * @param root_y Return location for Y coordinate of gravity-determined reference point.
1373    */
1374   void get_position(int& root_x, int& root_y) const;
1375
1376   
1377   /** Parses a standard X&nbsp;%Window System geometry string - see the
1378    * manual page for X (type 'man X') for details on this.
1379    * parse_geometry() does work on all GTK+ ports
1380    * including Win32 but is primarily intended for an X environment.
1381    * 
1382    * If either a size or a position can be extracted from the
1383    * geometry string, parse_geometry() returns <tt>true</tt>
1384    * and calls set_default_size() and/or move()
1385    * to resize/move the window.
1386    * 
1387    * If parse_geometry() returns <tt>true</tt>, it will also
1388    * set the Gdk::HINT_USER_POS and/or Gdk::HINT_USER_SIZE hints
1389    * indicating to the window manager that the size/position of
1390    * the window was user-specified. This causes most window
1391    * managers to honor the geometry.
1392    * 
1393    * Note that for parse_geometry() to work as expected, it has
1394    * to be called when the window has its "final" size, i.e. after calling
1395    * Gtk::Widget::show_all() on the contents and set_geometry_hints()
1396    * on the window.
1397    * 
1398    * @code
1399    * int
1400    * main (int argc, char *argv[])
1401    * {
1402    * GtkWidget *window, vbox;
1403    * GdkGeometry size_hints;
1404    * 
1405    * gtk_init (&amp;argc, &amp;argv);
1406    * 
1407    * window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
1408    * vbox = gtk_vbox_new (<tt>false</tt>, 0);
1409    * 
1410    * gtk_container_add (GTK_CONTAINER (window), vbox);
1411    * fill_with_content (vbox);
1412    * gtk_widget_show_all (vbox);
1413    * 
1414    * size_hints = {
1415    * 100, 50, 0, 0, 100, 50, 10, 10, 0.0, 0.0, GDK_GRAVITY_NORTH_WEST  
1416    * };
1417    * 
1418    * gtk_window_set_geometry_hints (GTK_WINDOW (window),
1419    * window,
1420    * &amp;size_hints,
1421    * GDK_HINT_MIN_SIZE | 
1422    * GDK_HINT_BASE_SIZE | 
1423    * GDK_HINT_RESIZE_INC);
1424    * 
1425    * if (argc &gt; 1)
1426    * {
1427    * if (!gtk_window_parse_geometry (GTK_WINDOW (window), argv[1]))
1428    * fprintf (stderr, "Failed to parse '&percnt;s'<tt>\\n</tt>", argv[1]);
1429    * }
1430    * 
1431    * gtk_widget_show_all (window);
1432    * gtk_main();
1433    * 
1434    * return 0;
1435    * }
1436    * @endcode
1437    * @param geometry Geometry string.
1438    * @return <tt>true</tt> if string was parsed successfully.
1439    */
1440   bool parse_geometry(const Glib::ustring& geometry);
1441
1442   
1443   /** Hides @a window , then reshows it, resetting the
1444    * default size and position of the window. Used
1445    * by GUI builders only.
1446    */
1447   void reshow_with_initial_size();
1448
1449
1450   /** Sets an icon to be used as fallback for windows that haven't
1451    * had set_icon() called on them from a pixbuf.
1452    * 
1453    * Since: 2.4
1454    * @param icon The icon.
1455    */
1456   static void set_default_icon(const Glib::RefPtr<Gdk::Pixbuf>& icon);
1457   
1458   /** Asks to keep @a window  above, so that it stays on top. Note that
1459    * you shouldn't assume the window is definitely above afterward,
1460    * because other entities (e.g. the user or window manager) could not keep it above,
1461    * and not all window managers support keeping windows above. But
1462    * normally the window will end kept above. Just don't write code
1463    * that crashes if not.
1464    * 
1465    * It's permitted to call this function before showing a window,
1466    * in which case the window will be kept above when it appears onscreen
1467    * initially.
1468    * 
1469    * You can track the above state via the "window_state_event" signal
1470    * on Gtk::Widget.
1471    * 
1472    * Note that, according to the Extended Window Manager Hints
1473    * specification, the above state is mainly meant for user preferences and should not be used 
1474    * by applications e.g. for drawing attention to their dialogs.
1475    * 
1476    * Since: 2.4
1477    * @param setting Whether to keep @a window  above other windows.
1478    */
1479   void set_keep_above(bool setting = true);
1480   
1481   /** Asks to keep @a window  below, so that it stays in bottom. Note that
1482    * you shouldn't assume the window is definitely below afterward,
1483    * because other entities (e.g. the user or window manager) could not keep it below,
1484    * and not all window managers support putting windows below. But
1485    * normally the window will be kept below. Just don't write code
1486    * that crashes if not.
1487    * 
1488    * It's permitted to call this function before showing a window,
1489    * in which case the window will be kept below when it appears onscreen
1490    * initially.
1491    * 
1492    * You can track the below state via the "window_state_event" signal
1493    * on Gtk::Widget.
1494    * 
1495    * Note that, according to the Extended Window Manager Hints
1496    * specification, the above state is mainly meant for user preferences and should not be used 
1497    * by applications e.g. for drawing attention to their dialogs.
1498    * 
1499    * Since: 2.4
1500    * @param setting Whether to keep @a window  below other windows.
1501    */
1502   void set_keep_below(bool setting = true);
1503
1504   
1505   /** Returns a default accel group for this window
1506    * This is a gtkmm-specific function.  This accel group can not
1507    * be removed.
1508    */
1509   Glib::RefPtr<AccelGroup> get_accel_group();
1510
1511   /** Brings the window to the front.
1512    * This is just a more obvious convenience wrapper for get_window()->raise().
1513    */
1514   virtual void raise();
1515
1516   ///Overriden to warn that it doesn't make sense to use Gtk::manage() on this class because it has no parent container.
1517   virtual void set_manage();
1518
1519 protected:
1520
1521   //See comments in the implementations:
1522   void destroy_();
1523   void _destroy_c_instance();
1524
1525 private:
1526
1527   //We'll create an accel_group if it's requested, and remember it.
1528   //Otherwise, you'd have to create it, add it to the window, then remember it somewhere else while you add it to other widgets.
1529   Glib::RefPtr<AccelGroup> accel_group_;
1530
1531
1532 };
1533
1534
1535 class WindowGroup : public Glib::Object
1536 {
1537   
1538 #ifndef DOXYGEN_SHOULD_SKIP_THIS
1539
1540 public:
1541   typedef WindowGroup CppObjectType;
1542   typedef WindowGroup_Class CppClassType;
1543   typedef GtkWindowGroup BaseObjectType;
1544   typedef GtkWindowGroupClass BaseClassType;
1545
1546 private:  friend class WindowGroup_Class;
1547   static CppClassType windowgroup_class_;
1548
1549 private:
1550   // noncopyable
1551   WindowGroup(const WindowGroup&);
1552   WindowGroup& operator=(const WindowGroup&);
1553
1554 protected:
1555   explicit WindowGroup(const Glib::ConstructParams& construct_params);
1556   explicit WindowGroup(GtkWindowGroup* castitem);
1557
1558 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
1559
1560 public:
1561   virtual ~WindowGroup();
1562
1563 #ifndef DOXYGEN_SHOULD_SKIP_THIS
1564   static GType get_type()      G_GNUC_CONST;
1565   static GType get_base_type() G_GNUC_CONST;
1566 #endif
1567
1568   ///Provides access to the underlying C GObject.
1569   GtkWindowGroup*       gobj()       { return reinterpret_cast<GtkWindowGroup*>(gobject_); }
1570
1571   ///Provides access to the underlying C GObject.
1572   const GtkWindowGroup* gobj() const { return reinterpret_cast<GtkWindowGroup*>(gobject_); }
1573
1574   ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
1575   GtkWindowGroup* gobj_copy();
1576
1577 private:
1578
1579
1580 protected:
1581   WindowGroup();
1582
1583 public:
1584   
1585   static Glib::RefPtr<WindowGroup> create();
1586
1587
1588   /** Adds a window to a Gtk::WindowGroup.
1589    * @param window The Gtk::Window to add.
1590    */
1591   void add_window(Window& window);
1592   
1593   /** Removes a window from a Gtk::WindowGroup.
1594    * @param window The Gtk::Window to remove.
1595    */
1596   void remove_window(Window& window);
1597
1598
1599 public:
1600
1601 public:
1602   //C++ methods used to invoke GTK+ virtual functions:
1603
1604 protected:
1605   //GTK+ Virtual Functions (override these to change behaviour):
1606
1607   //Default Signal Handlers::
1608
1609
1610 };
1611
1612 } // namespace Gtk
1613
1614
1615 namespace Glib
1616 {
1617   /** @relates Gtk::Window
1618    * @param object The C instance
1619    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
1620    * @result A C++ instance that wraps this C instance.
1621    */
1622   Gtk::Window* wrap(GtkWindow* object, bool take_copy = false);
1623 }
1624
1625 namespace Glib
1626 {
1627   /** @relates Gtk::WindowGroup
1628    * @param object The C instance
1629    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
1630    * @result A C++ instance that wraps this C instance.
1631    */
1632   Glib::RefPtr<Gtk::WindowGroup> wrap(GtkWindowGroup* object, bool take_copy = false);
1633 }
1634
1635
1636 #endif /* _GTKMM_WINDOW_H */
1637