virtual void show_window ();
bool window_visible ();
+ bool tabbed() const;
Gtk::Window* current_toplevel () const;
XMLNode& get_state ();
static std::string xml_node_name();
+
+ sigc::signal1<void,Tabbable&> StateChange;
protected:
bool delete_event_handler (GdkEventAny *ev);
void hide_tab ();
void tab_close_clicked ();
void show_own_window (bool and_pack_it);
- bool tabbed() const;
};
return false;
}
- return visible();
+ return _window->is_visible();
}
Window*
_window->show_all ();
_window->present ();
+ StateChange (*this);
}
Gtk::Notebook*
{
if (_window && (current_toplevel() == _window)) {
_window->hide ();
+ StateChange (*this);
} else {
hide_tab ();
}
*/
tab_requested_by_state = true;
+ StateChange (*this);
}
bool
{
if (tabbed()) {
_parent_notebook->remove_page (_contents);
+ StateChange (*this);
}
}
add_to_notebook (*_parent_notebook, _tab_title);
}
_parent_notebook->set_current_page (_parent_notebook->page_num (_contents));
+ StateChange (*this);
}
}
bool
Tabbable::tabbed () const
{
- return _parent_notebook && (_parent_notebook->page_num (_contents) >= 0);
+ return _parent_notebook && (_parent_notebook->page_num (_contents) > 0);
}
XMLNode&