2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GTKMM_HANDLEBOX_H
4 #define _GTKMM_HANDLEBOX_H
13 * Copyright (C) 1998-2002 The gtkmm Development Team
15 * This library is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU Library General Public
17 * License as published by the Free Software Foundation; either
18 * version 2 of the License, or (at your option) any later version.
20 * This library is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 * Library General Public License for more details.
25 * You should have received a copy of the GNU Library General Public
26 * License along with this library; if not, write to the Free
27 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
30 #include <gtkmm/eventbox.h>
33 #ifndef DOXYGEN_SHOULD_SKIP_THIS
34 typedef struct _GtkHandleBox GtkHandleBox;
35 typedef struct _GtkHandleBoxClass GtkHandleBoxClass;
36 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
40 { class HandleBox_Class; } // namespace Gtk
44 /** A widget for detachable window portions.
46 * The Gtk::HandleBox widget allows a portion of a window to be "torn off".
47 * 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.
48 * 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.
49 * 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.
50 * 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.
56 class HandleBox : public Bin
59 #ifndef DOXYGEN_SHOULD_SKIP_THIS
60 typedef HandleBox CppObjectType;
61 typedef HandleBox_Class CppClassType;
62 typedef GtkHandleBox BaseObjectType;
63 typedef GtkHandleBoxClass BaseClassType;
64 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
68 #ifndef DOXYGEN_SHOULD_SKIP_THIS
71 friend class HandleBox_Class;
72 static CppClassType handlebox_class_;
75 HandleBox(const HandleBox&);
76 HandleBox& operator=(const HandleBox&);
79 explicit HandleBox(const Glib::ConstructParams& construct_params);
80 explicit HandleBox(GtkHandleBox* castitem);
82 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
85 #ifndef DOXYGEN_SHOULD_SKIP_THIS
86 static GType get_type() G_GNUC_CONST;
87 static GType get_base_type() G_GNUC_CONST;
90 ///Provides access to the underlying C GtkObject.
91 GtkHandleBox* gobj() { return reinterpret_cast<GtkHandleBox*>(gobject_); }
93 ///Provides access to the underlying C GtkObject.
94 const GtkHandleBox* gobj() const { return reinterpret_cast<GtkHandleBox*>(gobject_); }
98 //C++ methods used to invoke GTK+ virtual functions:
99 #ifdef GLIBMM_VFUNCS_ENABLED
100 #endif //GLIBMM_VFUNCS_ENABLED
103 //GTK+ Virtual Functions (override these to change behaviour):
104 #ifdef GLIBMM_VFUNCS_ENABLED
105 #endif //GLIBMM_VFUNCS_ENABLED
107 //Default Signal Handlers::
108 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
109 virtual void on_child_attached(Widget* child);
110 virtual void on_child_detached(Widget* child);
111 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
120 void set_shadow_type(ShadowType type);
122 /** Gets the type of shadow drawn around the handle box. See
124 * @return The type of shadow currently drawn around the handle box.
126 ShadowType get_shadow_type() const;
128 void set_handle_position(PositionType position);
130 /** Gets the handle position of the handle box. See
131 * set_handle_position().
132 * @return The current handle position.
134 PositionType get_handle_position() const;
136 void set_snap_edge(PositionType edge);
138 /** Gets the edge used for determining reattachment of the handle box. See
140 * @return The edge used for determining reattachment, or (GtkPositionType)-1 if this
141 * is determined (as per default) from the handle position.
143 PositionType get_snap_edge() const;
148 * <tt>void on_my_%child_attached(Widget* child)</tt>
151 Glib::SignalProxy1< void,Widget* > signal_child_attached();
156 * <tt>void on_my_%child_detached(Widget* child)</tt>
159 Glib::SignalProxy1< void,Widget* > signal_child_detached();
162 Glib::RefPtr<Gdk::Window> get_bin_window();
163 Glib::RefPtr<const Gdk::Window> get_bin_window() const;
164 Glib::RefPtr<Gdk::Window> get_float_window();
165 Glib::RefPtr<const Gdk::Window> get_float_window() const;
167 bool is_child_detached() const;
168 bool is_float_window_mapped() const;
169 bool is_in_drag() const;
170 bool shrinks_on_detach() const;
172 //_WRAP_PROPERTY("shadow", ShadowType); //deprecated.
173 #ifdef GLIBMM_PROPERTIES_ENABLED
174 /** Appearance of the shadow that surrounds the container.
176 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
177 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
178 * the value of the property changes.
180 Glib::PropertyProxy<ShadowType> property_shadow_type() ;
181 #endif //#GLIBMM_PROPERTIES_ENABLED
183 #ifdef GLIBMM_PROPERTIES_ENABLED
184 /** Appearance of the shadow that surrounds the container.
186 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
187 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
188 * the value of the property changes.
190 Glib::PropertyProxy_ReadOnly<ShadowType> property_shadow_type() const;
191 #endif //#GLIBMM_PROPERTIES_ENABLED
193 #ifdef GLIBMM_PROPERTIES_ENABLED
194 /** Position of the handle relative to the child widget.
196 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
197 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
198 * the value of the property changes.
200 Glib::PropertyProxy<PositionType> property_handle_position() ;
201 #endif //#GLIBMM_PROPERTIES_ENABLED
203 #ifdef GLIBMM_PROPERTIES_ENABLED
204 /** Position of the handle relative to the child widget.
206 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
207 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
208 * the value of the property changes.
210 Glib::PropertyProxy_ReadOnly<PositionType> property_handle_position() const;
211 #endif //#GLIBMM_PROPERTIES_ENABLED
213 #ifdef GLIBMM_PROPERTIES_ENABLED
214 /** Side of the handlebox that's lined up with the docking point to dock the handlebox.
216 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
217 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
218 * the value of the property changes.
220 Glib::PropertyProxy<PositionType> property_snap_edge() ;
221 #endif //#GLIBMM_PROPERTIES_ENABLED
223 #ifdef GLIBMM_PROPERTIES_ENABLED
224 /** Side of the handlebox that's lined up with the docking point to dock the handlebox.
226 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
227 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
228 * the value of the property changes.
230 Glib::PropertyProxy_ReadOnly<PositionType> property_snap_edge() const;
231 #endif //#GLIBMM_PROPERTIES_ENABLED
236 } /* namespace Gtk */
241 /** A Glib::wrap() method for this object.
243 * @param object The C instance.
244 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
245 * @result A C++ instance that wraps this C instance.
247 * @relates Gtk::HandleBox
249 Gtk::HandleBox* wrap(GtkHandleBox* object, bool take_copy = false);
253 #endif /* _GTKMM_HANDLEBOX_H */