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; 22public: 23DockablePane(Gtk::Widget &child, const Glib::ustring &name, const Glib::ustring &label, Gtk::Image *icon, DockStack *stack = nullptr, Gtk::Widget *custom_header = nullptr); 24Glib::ustring get_identifier() const; 25Gtk::Image *get_icon() const; 26Gtk::Label *get_label(); 27void redock(DockStack *stack); 28void pop_out(); 29}; 30 31class DockWindow : public Gtk::Window { 32private: 33DockablePane *pane; 34public: 35explicit DockWindow(DockablePane *pane); 36}; 37 38class LayoutManager : public Glib::ObjectBase { 39private: 40std::vector<DockablePane*> panes; 41public: 42LayoutManager(); 43 44void add_pane(DockablePane *pane); 45}; 46 47class DockStack : public Gtk::Stack { 48private: 49std::shared_ptr<LayoutManager> layout; 50public: 51explicit DockStack(std::shared_ptr<LayoutManager> layout); 52 53void add_pane(Gtk::Widget &child, const Glib::ustring &name); 54}; 55 56class DockStackSwitcher : public Gtk::ButtonBox { 57private: 58DockStack *stack; 59public: 60void update_buttons(); 61explicit DockStackSwitcher(DockStack *stack); 62}; 63} // namespace gPanthera 64 65#endif // GPANTHERA_LIBRARY_H