extend API for tabbable visibility management
This commit is contained in:
parent
1bdf6d8a68
commit
077bb13e94
|
@ -57,15 +57,15 @@ class LIBGTKMM2EXT_API Tabbable : public WindowProxy {
|
||||||
virtual Gtk::Window* use_own_window (bool and_pack_it);
|
virtual Gtk::Window* use_own_window (bool and_pack_it);
|
||||||
|
|
||||||
bool has_own_window () const;
|
bool has_own_window () const;
|
||||||
bool is_tabbed () const;
|
|
||||||
|
|
||||||
void set_default_tabbed (bool yn);
|
void set_default_tabbed (bool yn);
|
||||||
|
|
||||||
virtual void show_window ();
|
virtual void show_window ();
|
||||||
|
|
||||||
bool window_visible ();
|
bool window_visible () const;
|
||||||
bool tabbed() const;
|
bool tabbed() const;
|
||||||
|
bool tabbed_by_default () const;
|
||||||
|
|
||||||
Gtk::Window* current_toplevel () const;
|
Gtk::Window* current_toplevel () const;
|
||||||
|
|
||||||
Gtk::Notebook* tab_root_drop ();
|
Gtk::Notebook* tab_root_drop ();
|
||||||
|
|
|
@ -96,9 +96,9 @@ Tabbable::use_own_window (bool and_pack_it)
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
Tabbable::window_visible ()
|
Tabbable::window_visible () const
|
||||||
{
|
{
|
||||||
if (!own_window()) {
|
if (!_window) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -155,6 +155,8 @@ Tabbable::show_own_window (bool and_pack_it)
|
||||||
_window->set_default_size (alloc.get_width(), alloc.get_height());
|
_window->set_default_size (alloc.get_width(), alloc.get_height());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tab_requested_by_state = false;
|
||||||
|
|
||||||
_window->show_all ();
|
_window->show_all ();
|
||||||
_window->present ();
|
_window->present ();
|
||||||
}
|
}
|
||||||
|
@ -271,15 +273,13 @@ Tabbable::delete_event_handler (GdkEventAny *ev)
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
Tabbable::is_tabbed () const
|
Tabbable::tabbed () const
|
||||||
{
|
{
|
||||||
Window* toplevel = (Window*) _contents.get_toplevel();
|
if (_window && (current_toplevel() == _window)) {
|
||||||
|
|
||||||
if (_window && (toplevel == _window)) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_parent_notebook && _contents.get_parent()) {
|
if (_parent_notebook && (_parent_notebook->page_num (_contents) >= 0)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -320,9 +320,9 @@ Tabbable::xml_node_name()
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
Tabbable::tabbed () const
|
Tabbable::tabbed_by_default() const
|
||||||
{
|
{
|
||||||
return _parent_notebook && (_parent_notebook->page_num (_contents) >= 0);
|
return tab_requested_by_state;
|
||||||
}
|
}
|
||||||
|
|
||||||
XMLNode&
|
XMLNode&
|
||||||
|
|
Loading…
Reference in New Issue
Block a user