1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
|
#ifndef _MODEL_PANEL_H_
#define _MODEL_PANEL_H_
#include <map>
#include <gtkmm/paned.h>
#include <gtkmm/notebook.h>
#include <gtkmm/box.h>
#include <gtkmm/frame.h>
#include <gtkmm/builder.h>
#include "linux_utilities/form_view_base.h"
#include "workbench/wb_overview.h"
#include "workbench/wb_context_ui.h"
class OverviewPanel;
class DocumentationBox;
namespace mforms
{
class TreeNodeView;
};
class ModelPanel : public Gtk::VBox, public FormViewBase
{
public:
static ModelPanel *create(wb::WBContextUI *wb, wb::OverviewBE *overview);
~ModelPanel();
virtual bool on_close();
virtual void on_activate();
virtual Gtk::Widget *get_panel() { return this; }
virtual bec::UIForm *get_form() const;
virtual void reset_layout() { _editor_paned->set_position(_editor_paned->get_height()-300); }
OverviewPanel *get_overview() { return _overview; }
void selection_changed();
virtual void find_text(const std::string &text);
virtual void restore_sidebar_layout();
private:
wb::WBContextUI *_wb;
OverviewPanel *_overview;
Gtk::Paned *_editor_paned;
Gtk::Widget *_sidebar;
Gtk::Frame *_secondary_sidebar;
bec::NodeId _last_found_node;
mforms::TreeNodeView *_history_tree;
mforms::TreeNodeView *_usertypes_box;
DocumentationBox *_documentation_box;
bool _pending_rebuild_overview;
friend class Gtk::Builder;
ModelPanel(GtkVBox *vb, Glib::RefPtr<Gtk::Builder> xml);
void post_construct(wb::WBContextUI *wb, wb::OverviewBE *overview, Glib::RefPtr<Gtk::Builder> xml);
bool restore_state(Glib::RefPtr<Gtk::Builder> xml);
void resize_overview();
bool do_resize_overview();
sigc::connection _sig_restore_layout;
sigc::connection _sig_resize_overview;
};
#endif /* _MODEL_PANEL_H_ */
|