1
#ifndef __WB_MYSQL_TABLE_EDITOR_H__
2
#define __WB_MYSQL_TABLE_EDITOR_H__
5
#include <gtkmm/notebook.h>
6
#include "linux_utilities/plugin_editor_base.h"
7
#include "../backend/mysql_table_editor.h"
9
#include <gtkmm/notebook.h>
11
class DbMySQLTableEditorColumnPage;
12
class DbMySQLTableEditorIndexPage;
13
class DbMySQLTableEditorFKPage;
14
class DbMySQLTableEditorTriggerPage;
15
class DbMySQLTableEditorPartPage;
16
class DbMySQLTableEditorOptPage;
18
class DbMySQLEditorPrivPage;
20
//==============================================================================
22
//==============================================================================
23
class DbMySQLTableEditor : public PluginEditorBase
25
friend class DbMySQLTableEditorColumnPage;
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;
37
void create_table_page();
39
void refresh_table_page();
40
void partial_refresh(const int what);
42
void set_table_collation(Gtk::ComboBoxEntryText* combo);
43
void set_table_engine(Gtk::ComboBoxEntryText* combo);
45
virtual bec::BaseEditor *get_be();
47
bool event_from_table_name_entry(GdkEvent*);
49
void page_changed(GtkNotebookPage* page, guint page_num);
51
void set_table_name(const std::string &);
54
void refresh_indices();
56
void set_table_option_by_name(const std::string& name, const std::string& value);
57
void set_comment(const std::string& cmt);
59
void toggle_header_part();
62
virtual void decorate_object_editor();
65
DbMySQLTableEditor(grt::Module *m, bec::GRTManager *grtm, const grt::BaseListRef &args);
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);