Install ardour as a binary, a script and a set of shared
[ardour.git] / libs / gtkmm2 / gtk / gtkmm / fixed.h
1 // -*- c++ -*-
2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GTKMM_FIXED_H
4 #define _GTKMM_FIXED_H
5
6 #include <glibmm.h>
7
8 /* $Id$ */
9
10 /* fixed.h
11  * 
12  * Copyright (C) 1998-2002 The gtkmm Development Team
13  *
14  * This library is free software; you can redistribute it and/or
15  * modify it under the terms of the GNU Library General Public
16  * License as published by the Free Software Foundation; either
17  * version 2 of the License, or (at your option) any later version.
18  *
19  * This library is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
22  * Library General Public License for more details.
23  *
24  * You should have received a copy of the GNU Library General Public
25  * License along with this library; if not, write to the Free
26  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27  */
28
29 #include <gtkmm/container.h>
30
31
32 #ifndef DOXYGEN_SHOULD_SKIP_THIS
33 typedef struct _GtkFixed GtkFixed;
34 typedef struct _GtkFixedClass GtkFixedClass;
35 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
36
37
38 namespace Gtk
39 { class Fixed_Class; } // namespace Gtk
40 namespace Gtk
41 {
42
43 /** A container which allows you to position widgets at fixed coordinates.
44  *
45  * The Gtk::Fixed widget is a container which can place child widgets at fixed positions and with fixed sizes, given in pixels. It performs no automatic layout management.
46  * For most applications, you should not use this container, because it will result in truncated text, overlapping widgets, and other display bugs:
47  * - Themes may change widget sizes.
48  * - Fonts other than the one you used to write the app will of course change the size of widgets containing text; keep in mind that users may use a larger font because of difficulty reading the default, or they may be using Windows or the framebuffer port of GTK+, where different fonts are available.
49  * - Translation of text into other languages changes its size. Also, display of non-English text will use a different font in many cases.
50  * In addition, the fixed widget can't properly be mirrored in right-to-left languages such as Hebrew and Arabic. i.e. normally GTK+ will flip the interface to put labels to the right of the thing they label, but it can't do that with Gtk::Fixed. So your application will not be usable in right-to-left languages.
51  * Finally, fixed positioning makes it kind of annoying to add/remove GUI elements, since you have to reposition all the other elements. This is a long-term maintenance problem for your application.
52  * If you know none of these things are an issue for your application, and prefer the simplicity of Gtk::Fixed, by all means use the widget. But you should be aware of the tradeoffs.
53  *
54  * @ingroup Widgets
55  * @ingroup Containers
56  */
57
58 class Fixed : public Container
59 {
60   public:
61 #ifndef DOXYGEN_SHOULD_SKIP_THIS
62   typedef Fixed CppObjectType;
63   typedef Fixed_Class CppClassType;
64   typedef GtkFixed BaseObjectType;
65   typedef GtkFixedClass BaseClassType;
66 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
67
68   virtual ~Fixed();
69
70 #ifndef DOXYGEN_SHOULD_SKIP_THIS
71
72 private:
73   friend class Fixed_Class;
74   static CppClassType fixed_class_;
75
76   // noncopyable
77   Fixed(const Fixed&);
78   Fixed& operator=(const Fixed&);
79
80 protected:
81   explicit Fixed(const Glib::ConstructParams& construct_params);
82   explicit Fixed(GtkFixed* castitem);
83
84 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
85
86 public:
87 #ifndef DOXYGEN_SHOULD_SKIP_THIS
88   static GType get_type()      G_GNUC_CONST;
89   static GType get_base_type() G_GNUC_CONST;
90 #endif
91
92   ///Provides access to the underlying C GtkObject.
93   GtkFixed*       gobj()       { return reinterpret_cast<GtkFixed*>(gobject_); }
94
95   ///Provides access to the underlying C GtkObject.
96   const GtkFixed* gobj() const { return reinterpret_cast<GtkFixed*>(gobject_); }
97
98
99 public:
100   //C++ methods used to invoke GTK+ virtual functions:
101
102 protected:
103   //GTK+ Virtual Functions (override these to change behaviour):
104
105   //Default Signal Handlers::
106
107
108 private:
109
110 public:
111   Fixed();
112
113   
114   void put(Widget& widget, int x, int y);
115   
116   void move(Widget& widget, int x, int y);
117   
118   /** Sets whether a Gtk::Fixed widget is created with a separate
119    * Gdk::Window for widget->window or not. (By default, it will be
120    * created with no separate Gdk::Window). This function must be called
121    * while the Gtk::Fixed is not realized, for instance, immediately after the
122    * window is created.
123    * @param has_window <tt>true</tt> if a separate window should be created.
124    */
125   void set_has_window(bool has_window = true);
126   
127   /** Gets whether the Gtk::Fixed has its own Gdk::Window.
128    * See gdk_fixed_set_has_window().
129    * @return <tt>true</tt> if @a fixed  has its own window.
130    */
131   bool get_has_window() const;
132
133
134 };
135
136 } /* namespace Gtk */
137
138
139 namespace Glib
140 {
141   /** @relates Gtk::Fixed
142    * @param object The C instance
143    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
144    * @result A C++ instance that wraps this C instance.
145    */
146   Gtk::Fixed* wrap(GtkFixed* object, bool take_copy = false);
147 }
148 #endif /* _GTKMM_FIXED_H */
149