39 , own_window (
Gtk::WINDOW_TOPLEVEL)
40 , tearoff_arrow (ARROW_DOWN, SHADOW_OUT)
41 , close_arrow (ARROW_UP, SHADOW_OUT)
45 , _can_be_torn_off (true)
63 close_event_box.set_tooltip_text (
_(
"Click to put this back in the main window"));
66 box1 = manage (
new VBox);
71 own_window.add_events (KEY_PRESS_MASK|KEY_RELEASE_MASK|BUTTON_PRESS_MASK|BUTTON_RELEASE_MASK|POINTER_MOTION_MASK|POINTER_MOTION_HINT_MASK);
73 own_window.set_type_hint (WINDOW_TYPE_HINT_UTILITY);
88 box2 = manage (
new VBox);
92 pack_start (*box2,
false,
false);
234 RefPtr<Gdk::Window> win (
own_window.get_window());
242 if (!(ev->state & GDK_BUTTON1_MASK)) {
248 x_delta = ev->x_root -
drag_x;
249 y_delta = ev->y_root -
drag_y;
251 win->get_root_origin (x, y);
252 win->move ((gint) floor (x + x_delta), (gint) floor (y + y_delta));
288 Glib::RefPtr<Gdk::Window> win;
291 if ((prop = node.
property (
X_(
"tornoff"))) == 0) {
295 if (prop->
value() ==
"yes") {
301 if ((prop = node.
property (
X_(
"width"))) != 0) {
304 if ((prop = node.
property (
X_(
"height"))) != 0) {
307 if ((prop = node.
property (
X_(
"xpos"))) != 0) {
310 if ((prop = node.
property (
X_(
"ypos"))) != 0) {
324 own_window.get_window()->set_decorations (WMDecoration (DECOR_BORDER|DECOR_RESIZEH));
335 Glib::RefPtr<const Gdk::Window> win;
void set_visible(bool yn, bool force=false)
sigc::signal< void > Hidden
const std::string & value() const
gint close_click(GdkEventButton *)
void set_can_be_torn_off(bool)
Gtk::EventBox tearoff_event_box
gint tearoff_click(GdkEventButton *)
XMLProperty * property(const char *)
sigc::signal< void > Attach
gint window_button_release(GdkEventButton *)
sigc::signal< void > Detach
gint window_button_press(GdkEventButton *)
bool own_window_configured(GdkEventConfigure *)
XMLProperty * add_property(const char *name, const std::string &value)
gint window_motion(GdkEventMotion *)
sigc::signal< void > Visible
void add_state(XMLNode &) const
gint window_delete_event(GdkEventAny *)
void own_window_realized()
TearOff(Gtk::Widget &contents, bool allow_resize=false)
Gtk::EventBox close_event_box
void set_state(const XMLNode &)