gpanthera.hh
C++ source, ASCII text
1#ifndef GPANTHERA_LIBRARY_H 2#define GPANTHERA_LIBRARY_H 3 4#include <gtkmm.h> 5#include <glibmm.h> 6#include <glibmm/ustring.h> 7#include <utility> 8#include <vector> 9#include <memory> 10 11namespace gPanthera { 12class DockStack; 13class DockWindow; 14 15class DockablePane : public Gtk::Box { 16private: 17Gtk::Label label; 18Glib::ustring name; 19Gtk::Image *icon; 20DockStack *stack; 21DockWindow *window = nullptr; 22Gtk::HeaderBar *header; 23Gtk::Widget *child; 24public: 25DockablePane(Gtk::Widget &child, const Glib::ustring &name, const Glib::ustring &label, Gtk::Image *icon, DockStack *stack = nullptr, Gtk::Widget *custom_header = nullptr); 26Glib::ustring get_identifier() const; 27Gtk::Image *get_icon() const; 28Gtk::Label *get_label(); 29void redock(DockStack *stack); 30void pop_out(); 31Gtk::HeaderBar *get_header() const; 32Gtk::Widget *get_child() const; 33}; 34 35class DockWindow : public Gtk::Window { 36private: 37DockablePane *pane; 38public: 39explicit DockWindow(DockablePane *pane); 40}; 41 42class LayoutManager : public Glib::ObjectBase { 43private: 44std::vector<DockablePane*> panes; 45public: 46LayoutManager(); 47 48void add_pane(DockablePane *pane); 49}; 50 51class DockStack : public Gtk::Stack { 52private: 53std::shared_ptr<LayoutManager> layout; 54public: 55explicit DockStack(std::shared_ptr<LayoutManager> layout); 56 57void add_pane(Gtk::Widget &child, const Glib::ustring &name); 58}; 59 60class DockStackSwitcher : public Gtk::ButtonBox { 61private: 62DockStack *stack; 63public: 64void update_buttons(); 65explicit DockStackSwitcher(DockStack *stack); 66}; 67} // namespace gPanthera 68 69#endif // GPANTHERA_LIBRARY_H