~ubuntu-branches/ubuntu/quantal/mysql-workbench/quantal

« back to all changes in this revision

Viewing changes to plugins/db.mysql.editors/linux/mysql_table_editor_fe.h

  • Committer: Package Import Robot
  • Author(s): Dmitry Smirnov
  • Date: 2012-03-01 21:57:30 UTC
  • Revision ID: package-import@ubuntu.com-20120301215730-o7y8av8y38n162ro
Tags: upstream-5.2.38+dfsg
ImportĀ upstreamĀ versionĀ 5.2.38+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef __WB_MYSQL_TABLE_EDITOR_H__
 
2
#define __WB_MYSQL_TABLE_EDITOR_H__
 
3
 
 
4
#include "wb_config.h"
 
5
#include <gtkmm/notebook.h>
 
6
#include "linux_utilities/plugin_editor_base.h"
 
7
#include "../backend/mysql_table_editor.h"
 
8
 
 
9
#include <gtkmm/notebook.h>
 
10
 
 
11
class DbMySQLTableEditorColumnPage;
 
12
class DbMySQLTableEditorIndexPage;
 
13
class DbMySQLTableEditorFKPage;
 
14
class DbMySQLTableEditorTriggerPage;
 
15
class DbMySQLTableEditorPartPage;
 
16
class DbMySQLTableEditorOptPage;
 
17
class RecordsetView;
 
18
class DbMySQLEditorPrivPage;
 
19
 
 
20
//==============================================================================
 
21
//
 
22
//==============================================================================
 
23
class DbMySQLTableEditor : public PluginEditorBase
 
24
{
 
25
  friend class DbMySQLTableEditorColumnPage;
 
26
  
 
27
  MySQLTableEditorBE                *_be;
 
28
  DbMySQLTableEditorColumnPage      *_columns_page;
 
29
  DbMySQLTableEditorIndexPage       *_indexes_page;
 
30
  DbMySQLTableEditorFKPage          *_fks_page;
 
31
  DbMySQLTableEditorTriggerPage     *_triggers_page;
 
32
  DbMySQLTableEditorPartPage        *_part_page;
 
33
  DbMySQLTableEditorOptPage         *_opts_page;
 
34
  RecordsetView                     *_inserts_page;
 
35
  DbMySQLEditorPrivPage             *_privs_page;
 
36
 
 
37
  void create_table_page();
 
38
 
 
39
  void refresh_table_page();
 
40
  void partial_refresh(const int what);
 
41
 
 
42
  void set_table_collation(Gtk::ComboBoxEntryText* combo);
 
43
  void set_table_engine(Gtk::ComboBoxEntryText* combo);
 
44
 
 
45
  virtual bec::BaseEditor *get_be();
 
46
 
 
47
  bool event_from_table_name_entry(GdkEvent*);
 
48
 
 
49
  void page_changed(GtkNotebookPage* page, guint page_num);
 
50
 
 
51
  void set_table_name(const std::string &);
 
52
 
 
53
  //TESTING
 
54
  void refresh_indices();
 
55
  //\TESTING
 
56
  void set_table_option_by_name(const std::string& name, const std::string& value);
 
57
  void set_comment(const std::string& cmt);
 
58
 
 
59
  void toggle_header_part();
 
60
 
 
61
 protected:
 
62
  virtual void decorate_object_editor();
 
63
 
 
64
 public:
 
65
  DbMySQLTableEditor(grt::Module *m, bec::GRTManager *grtm, const grt::BaseListRef &args);
 
66
 
 
67
  virtual ~DbMySQLTableEditor();
 
68
  virtual void do_refresh_form_data(); // That's called from PluginEditorBase::refresh_form_data
 
69
                                       // which is passed to the backend refresh slot
 
70
  virtual std::string get_title();
 
71
  virtual bool can_close();
 
72
  virtual bool switch_edited_object(bec::GRTManager *grtm, const grt::BaseListRef &args); 
 
73
};
 
74
 
 
75
#endif