1
#ifndef __WB_COLUMN_PAGE_HANDLING_H__
2
#define __WB_COLUMN_PAGE_HANDLING_H__
4
#include "grt/tree_model.h"
5
#include <gtkmm/builder.h>
7
class MySQLTableEditorBE;
8
class ListModelWrapper;
9
class DbMySQLTableEditor;
10
class AutoCompletable;
18
//==============================================================================
20
//==============================================================================
21
class DbMySQLTableEditorColumnPage
24
DbMySQLTableEditorColumnPage(DbMySQLTableEditor *owner, MySQLTableEditorBE* be, Glib::RefPtr<Gtk::Builder> xml);
25
~DbMySQLTableEditorColumnPage();
28
void partial_refresh(const int what);
30
void switch_be(MySQLTableEditorBE* be);
33
grt::StringListRef get_types_for_table(const db_TableRef table); //!< T
35
bool process_event(GdkEvent* event);
36
void type_column_event(GdkEvent* e);
37
void cursor_changed();
39
void update_column_details(const ::bec::NodeId &node);
41
void set_comment(const std::string& comment);
43
void update_collation();
45
void check_resize(Gtk::Allocation& r);
46
bool do_on_visible(GdkEventVisibility*);
48
bec::NodeId get_selected();
50
void refill_completions();
51
void refill_columns_tv();
53
DbMySQLTableEditor *_owner;
54
MySQLTableEditorBE *_be;
55
Glib::RefPtr<Gtk::Builder> _xml;
57
Glib::RefPtr<ListModelWrapper> _model;
59
Gtk::ScrolledWindow *_tv_holder;
61
Gtk::ComboBox *_collation_combo;
65
int _old_column_count;
67
// Auto completion of types and related functions
68
static AutoCompletable _types_completion;
69
static AutoCompletable _names_completion;
70
static void type_cell_editing_started(GtkCellRenderer* cr, GtkCellEditable* ce, gchar* path, gpointer udata);
71
static void cell_editing_done(GtkCellEditable* ce, gpointer udata);