File: model_panel.h

package info (click to toggle)
mysql-workbench 5.2.40%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 53,880 kB
  • sloc: cpp: 419,850; yacc: 74,784; xml: 54,510; python: 31,455; sh: 9,423; ansic: 4,736; makefile: 2,442; php: 529; java: 237
file content (57 lines) | stat: -rw-r--r-- 1,537 bytes parent folder | download
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

#ifndef _MODEL_PANEL_H_
#define _MODEL_PANEL_H_

#include <map>
#include <gtkmm/paned.h>
#include <gtkmm/notebook.h>
#include <gtkmm/box.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 HistoryTree;
class UserTypesBox;
class DocumentationBox;

class ModelPanel : public Gtk::HPaned, public FormViewBase
{
public:
  static ModelPanel *create(wb::WBContextUI *wb, wb::OverviewBE *overview);
  virtual ~ModelPanel();
  
  virtual bool on_close();
  virtual std::string get_title();
  virtual Gtk::Widget *get_panel() { return _top_box; }
  virtual bec::UIForm *get_form() const;
  virtual void toggle_sidebar();

  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);
    
private:
  wb::WBContextUI *_wb;
  OverviewPanel *_overview;
  Gtk::VBox *_top_box;
  Gtk::Paned *_editor_paned;
  Gtk::Widget *_sidebar;
  bec::NodeId                  _last_found_node;

  HistoryTree                 *_history_tree;
  UserTypesBox                *_usertypes_box;
  DocumentationBox            *_documentation_box;

  friend class Gtk::Builder;
  ModelPanel(GtkHPaned *paned, Glib::RefPtr<Gtk::Builder> xml);
  void post_construct(wb::WBContextUI *wb, wb::OverviewBE *overview, Glib::RefPtr<Gtk::Builder> xml);
};


#endif /* _MODEL_PANEL_H_ */