2 // Generated by gtkmmproc -- DO NOT MODIFY!
12 * Copyright (C) 1998-2002 The gtkmm Development Team
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.
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.
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.
29 #include <gtkmm/container.h>
32 #ifndef DOXYGEN_SHOULD_SKIP_THIS
33 typedef struct _GtkFixed GtkFixed;
34 typedef struct _GtkFixedClass GtkFixedClass;
35 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
39 { class Fixed_Class; } // namespace Gtk
43 /** A container which allows you to position widgets at fixed coordinates.
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.
58 class Fixed : public Container
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 */
70 #ifndef DOXYGEN_SHOULD_SKIP_THIS
73 friend class Fixed_Class;
74 static CppClassType fixed_class_;
78 Fixed& operator=(const Fixed&);
81 explicit Fixed(const Glib::ConstructParams& construct_params);
82 explicit Fixed(GtkFixed* castitem);
84 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
87 #ifndef DOXYGEN_SHOULD_SKIP_THIS
88 static GType get_type() G_GNUC_CONST;
89 static GType get_base_type() G_GNUC_CONST;
92 ///Provides access to the underlying C GtkObject.
93 GtkFixed* gobj() { return reinterpret_cast<GtkFixed*>(gobject_); }
95 ///Provides access to the underlying C GtkObject.
96 const GtkFixed* gobj() const { return reinterpret_cast<GtkFixed*>(gobject_); }
100 //C++ methods used to invoke GTK+ virtual functions:
103 //GTK+ Virtual Functions (override these to change behaviour):
105 //Default Signal Handlers::
114 void put(Widget& widget, int x, int y);
116 void move(Widget& widget, int x, int y);
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
123 * @param has_window <tt>true</tt> if a separate window should be created.
125 void set_has_window(bool has_window = true);
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.
131 bool get_has_window() const;
136 } /* namespace Gtk */
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.
146 Gtk::Fixed* wrap(GtkFixed* object, bool take_copy = false);
148 #endif /* _GTKMM_FIXED_H */