projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Allow to pre-seed Tabbable detached state.
[ardour.git]
/
libs
/
gtkmm2ext
/
gtkmm2ext
/
tabbable.h
diff --git
a/libs/gtkmm2ext/gtkmm2ext/tabbable.h
b/libs/gtkmm2ext/gtkmm2ext/tabbable.h
index 7c7dd15d23dfecdb190c882a0052e81f592f090f..d7e1429ada668a288d4458108f3266a45f3d1614 100644
(file)
--- a/
libs/gtkmm2ext/gtkmm2ext/tabbable.h
+++ b/
libs/gtkmm2ext/gtkmm2ext/tabbable.h
@@
-21,7
+21,13
@@
#define __gtkmm2ext_tabbable_h__
#include <gtkmm/bin.h>
#define __gtkmm2ext_tabbable_h__
#include <gtkmm/bin.h>
+#include <gtkmm/box.h>
+#include <gtkmm/button.h>
+#include <gtkmm/image.h>
+#include <gtkmm/label.h>
+#include <gtkmm/notebook.h>
+#include "gtkmm2ext/cairo_icon.h"
#include "gtkmm2ext/window_proxy.h"
#include "gtkmm2ext/visibility.h"
#include "gtkmm2ext/window_proxy.h"
#include "gtkmm2ext/visibility.h"
@@
-36,41
+42,60
@@
class VisibilityTracker;
class LIBGTKMM2EXT_API Tabbable : public WindowProxy {
public:
class LIBGTKMM2EXT_API Tabbable : public WindowProxy {
public:
- Tabbable (Gtk::Widget&, const std::string&);
+ Tabbable (Gtk::Widget&, const std::string&
, bool tabbed_by_default = true
);
~Tabbable ();
~Tabbable ();
- void add_to_notebook (Gtk::Notebook& notebook, const std::string& tab_title, int position);
- void show_tab ();
-
+ void add_to_notebook (Gtk::Notebook& notebook, const std::string& tab_title);
+ void make_visible ();
+ void make_invisible ();
+ void change_visibility ();
+ void attach ();
+ void detach ();
+
Gtk::Widget& contents() const { return _contents; }
Gtk::Widget& contents() const { return _contents; }
-
+
Gtk::Window* get (bool create = false);
Gtk::Window* get (bool create = false);
- Gtk::Window* own_window () { return get (false); }
- Gtk::Notebook* tabbed_parent ();
- virtual Gtk::Window* use_own_window ();
+ Gtk::Window* own_window () { return get (false); }
+ virtual Gtk::Window* use_own_window (bool and_pack_it);
- bool has_own_window () const;
- bool is_tabbed () const;
+ 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_by_default () const;
Gtk::Window* current_toplevel () const;
Gtk::Notebook* tab_root_drop ();
Gtk::Window* current_toplevel () const;
Gtk::Notebook* tab_root_drop ();
-
+
+ int set_state (const XMLNode&, int version);
+ XMLNode& get_state ();
+
+ static std::string xml_node_name();
+
+ sigc::signal1<void,Tabbable&> StateChange;
+
protected:
bool delete_event_handler (GdkEventAny *ev);
protected:
bool delete_event_handler (GdkEventAny *ev);
-
+
private:
Gtk::Widget& _contents;
Gtk::Notebook _own_notebook;
Gtk::Notebook* _parent_notebook;
std::string _tab_title;
private:
Gtk::Widget& _contents;
Gtk::Notebook _own_notebook;
Gtk::Notebook* _parent_notebook;
std::string _tab_title;
- int _notebook_position;
+ bool tab_requested_by_state;
+
+ void show_tab ();
+ void hide_tab ();
+ bool tab_close_clicked (GdkEventButton*);
+ void show_own_window (bool and_pack_it);
+ void window_mapped ();
+ void window_unmapped ();
};
};
+
}
#endif
}
#endif