2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GTKMM_HANDLEBOX_H
4 #define _GTKMM_HANDLEBOX_H
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/eventbox.h>
32 #ifndef DOXYGEN_SHOULD_SKIP_THIS
33 typedef struct _GtkHandleBox GtkHandleBox;
34 typedef struct _GtkHandleBoxClass GtkHandleBoxClass;
35 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
39 { class HandleBox_Class; } // namespace Gtk
43 /** A widget for detachable window portions.
45 * The Gtk::HandleBox widget allows a portion of a window to be "torn off".
46 * It displays its child and a handle that the user can drag to tear off a separate window (the float window) containing the child widget. A thin ghost is drawn in the original location of the handlebox. By dragging the separate window back to its original location, it can be reattached.
47 * When reattaching, the ghost and float window must be aligned along one of the edges, the snap edge. This can be specified by the application programmer explicitely, or GTK+ will pick a reasonable default based on the handle position.
48 * To make detaching and reattaching the handlebox as minimally confusing as possible to the user, it is important to set the snap edge so that the snap edge does not move when the handlebox is deattached.
49 * For instance, if the handlebox is packed at the bottom of a VBox, then when the handlebox is detached, the bottom edge of the handlebox's allocation will remain fixed as the height of the handlebox shrinks, so the snap edge should be set to GTK_POS_BOTTOM.
55 class HandleBox : public Bin
58 #ifndef DOXYGEN_SHOULD_SKIP_THIS
59 typedef HandleBox CppObjectType;
60 typedef HandleBox_Class CppClassType;
61 typedef GtkHandleBox BaseObjectType;
62 typedef GtkHandleBoxClass BaseClassType;
63 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
67 #ifndef DOXYGEN_SHOULD_SKIP_THIS
70 friend class HandleBox_Class;
71 static CppClassType handlebox_class_;
74 HandleBox(const HandleBox&);
75 HandleBox& operator=(const HandleBox&);
78 explicit HandleBox(const Glib::ConstructParams& construct_params);
79 explicit HandleBox(GtkHandleBox* castitem);
81 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
84 #ifndef DOXYGEN_SHOULD_SKIP_THIS
85 static GType get_type() G_GNUC_CONST;
86 static GType get_base_type() G_GNUC_CONST;
89 ///Provides access to the underlying C GtkObject.
90 GtkHandleBox* gobj() { return reinterpret_cast<GtkHandleBox*>(gobject_); }
92 ///Provides access to the underlying C GtkObject.
93 const GtkHandleBox* gobj() const { return reinterpret_cast<GtkHandleBox*>(gobject_); }
97 //C++ methods used to invoke GTK+ virtual functions:
100 //GTK+ Virtual Functions (override these to change behaviour):
102 //Default Signal Handlers::
103 virtual void on_child_attached(Widget* child);
104 virtual void on_child_detached(Widget* child);
113 void set_shadow_type(ShadowType type);
115 /** Gets the type of shadow drawn around the handle box. See
117 * @return The type of shadow currently drawn around the handle box.
119 ShadowType get_shadow_type() const;
121 void set_handle_position(PositionType position);
123 /** Gets the handle position of the handle box. See
124 * set_handle_position().
125 * @return The current handle position.
127 PositionType get_handle_position() const;
129 void set_snap_edge(PositionType edge);
131 /** Gets the edge used for determining reattachment of the handle box. See
133 * @return The edge used for determining reattachment, or (GtkPositionType)-1 if this
134 * is determined (as per default) from the handle position.
136 PositionType get_snap_edge() const;
139 Glib::SignalProxy1< void,Widget* > signal_child_attached();
142 Glib::SignalProxy1< void,Widget* > signal_child_detached();
145 Glib::RefPtr<Gdk::Window> get_bin_window();
146 Glib::RefPtr<const Gdk::Window> get_bin_window() const;
147 Glib::RefPtr<Gdk::Window> get_float_window();
148 Glib::RefPtr<const Gdk::Window> get_float_window() const;
150 bool is_child_detached() const;
151 bool is_float_window_mapped() const;
152 bool is_in_drag() const;
153 bool shrinks_on_detach() const;
155 //_WRAP_PROPERTY("shadow", ShadowType); //deprecated.
156 /** Appearance of the shadow that surrounds the container.
158 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
159 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
160 * the value of the property changes.
162 Glib::PropertyProxy<ShadowType> property_shadow_type() ;
164 /** Appearance of the shadow that surrounds the container.
166 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
167 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
168 * the value of the property changes.
170 Glib::PropertyProxy_ReadOnly<ShadowType> property_shadow_type() const;
172 /** Position of the handle relative to the child widget.
174 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
175 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
176 * the value of the property changes.
178 Glib::PropertyProxy<PositionType> property_handle_position() ;
180 /** Position of the handle relative to the child widget.
182 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
183 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
184 * the value of the property changes.
186 Glib::PropertyProxy_ReadOnly<PositionType> property_handle_position() const;
188 /** Side of the handlebox that's lined up with the docking point to dock the handlebox.
190 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
191 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
192 * the value of the property changes.
194 Glib::PropertyProxy<PositionType> property_snap_edge() ;
196 /** Side of the handlebox that's lined up with the docking point to dock the handlebox.
198 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
199 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
200 * the value of the property changes.
202 Glib::PropertyProxy_ReadOnly<PositionType> property_snap_edge() const;
207 } /* namespace Gtk */
212 /** @relates Gtk::HandleBox
213 * @param object The C instance
214 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
215 * @result A C++ instance that wraps this C instance.
217 Gtk::HandleBox* wrap(GtkHandleBox* object, bool take_copy = false);
219 #endif /* _GTKMM_HANDLEBOX_H */