28
28
#include <glom/libglom/document/document_glom.h>
30
30
#include "dialog_glom.h"
32
31
#include "navigation/box_tables.h"
33
#include "box_reports.h"
35
32
#include "mode_data/notebook_data.h"
36
33
#include "mode_find/notebook_find.h"
38
35
#ifndef GLOM_ENABLE_CLIENT_ONLY
36
#include "box_reports.h"
37
#include "mode_design/print_layouts/box_print_layouts.h"
39
38
#include "mode_design/dialog_fields.h"
40
39
#include "mode_design/dialog_relationships.h"
41
40
#endif // !GLOM_ENABLE_CLIENT_ONLY
51
50
#ifndef GLOM_ENABLE_CLIENT_ONLY
52
51
class Dialog_Layout_Report;
52
class Window_PrintLayout_Edit;
53
53
class Dialog_AddRelatedTable;
54
class Dialog_RelationshipsOverview;
54
55
#endif // !GLOM_ENABLE_CLIENT_ONLY
63
64
virtual ~Frame_Glom();
65
66
void set_databases_selected(const Glib::ustring& strName);
66
68
void on_box_tables_selected(const Glib::ustring& strName);
68
69
#ifndef GLOM_ENABLE_CLIENT_ONLY
69
70
void on_box_reports_selected(const Glib::ustring& strName);
70
#endif // !GLOM_ENABLE_CLIENT_ONLY
71
void on_box_print_layouts_selected(const Glib::ustring& strName);
72
#ifndef GLOM_ENABLE_CLIENT_ONLY
73
73
void on_menu_userlevel_Developer(const Glib::RefPtr<Gtk::RadioAction>& action, const Glib::RefPtr<Gtk::RadioAction>& operator_action);
74
74
void on_menu_userlevel_Operator(const Glib::RefPtr<Gtk::RadioAction>& action);
75
#endif // !GLOM_ENABLE_CLIENT_ONLY
77
76
void on_menu_file_export();
77
void on_menu_file_import();
78
void on_menu_file_print_edit_layouts();
80
#endif // !GLOM_ENABLE_CLIENT_ONLY
78
81
void on_menu_file_print();
80
83
void on_menu_Mode_Data();
83
86
void on_menu_report_selected(const Glib::ustring& report_name);
88
#ifndef GLOM_ENABLE_CLIENT_ONLY
89
void on_menu_print_layout_selected(const Glib::ustring& print_layout_name);
90
#endif // !GLOM_ENABLE_CLIENT_ONLY
85
92
//virtual void on_menu_Navigate_Database();
86
93
//virtual void do_menu_Navigate_Database(bool bUseList = true);
95
void do_menu_Navigate_Table(bool open_default = false);
87
97
#ifndef GLOM_ENABLE_CLIENT_ONLY
88
98
void on_menu_Tables_EditTables();
89
99
void on_menu_Tables_AddRelatedTable();
90
100
#endif // !GLOM_ENABLE_CLIENT_ONLY
92
void do_menu_Navigate_Table(bool open_default = false);
94
102
#ifndef GLOM_ENABLE_CLIENT_ONLY
95
void on_menu_Tables_EditReports();
103
void on_menu_Reports_EditReports();
104
void on_menu_File_EditPrintLayouts();
97
105
void on_menu_developer_database_preferences();
99
106
void on_menu_developer_fields();
100
107
void do_menu_developer_fields(Gtk::Window& parent);
108
void do_menu_developer_fields(Gtk::Window& parent, const Glib::ustring table_name);
102
109
void on_menu_developer_relationships_overview();
103
110
void on_menu_developer_relationships();
111
void do_menu_developer_relationships(Gtk::Window& parent, const Glib::ustring table_name);
104
112
void on_menu_developer_users();
105
113
void on_menu_developer_layout();
106
114
void on_menu_developer_reports();
115
void on_menu_developer_print_layouts();
107
116
void on_menu_developer_script_library();
109
118
void on_developer_dialog_hide();
110
#endif // !GLOM_ENABLE_CLIENT_ONLY
112
#ifndef GLOM_ENABLE_CLIENT_ONLY
113
120
void on_dialog_layout_report_hide();
114
121
void on_dialog_reports_hide();
122
void on_dialog_layout_print_hide();
123
void on_dialog_print_layouts_hide();
125
void on_dialog_add_related_table_request_edit_fields();
115
126
#endif // !GLOM_ENABLE_CLIENT_ONLY
116
128
void on_dialog_tables_hide();
117
#ifndef GLOM_ENABLE_CLIENT_ONLY
119
void on_dialog_add_related_table_request_edit_fields();
120
#endif // !GLOM_ENABLE_CLIENT_ONLY
122
130
virtual void set_document(Document_Glom* pDocument); //View override
123
131
virtual void load_from_document(); //View override
138
146
//Show the dialog to request the password, and check whether it works.
139
147
#ifdef GLIBMM_EXCEPTIONS_ENABLED
140
bool connection_request_password_and_attempt();
148
bool connection_request_password_and_attempt(const Glib::ustring known_username = Glib::ustring(), const Glib::ustring& known_password = Glib::ustring());
142
bool connection_request_password_and_attempt(std::auto_ptr<ExceptionConnection>& error);
150
bool connection_request_password_and_attempt(const Glib::ustring known_username = Glib::ustring(), const Glib::ustring& known_password = Glib::ustring(), std::auto_ptr<ExceptionConnection>& error);
145
153
//Show the dialog to request the password, and choose an unused database name.
148
156
#ifndef GLOM_ENABLE_CLIENT_ONLY
149
157
///Create the database for new documents, showing the Connection dialog
150
bool create_database(const Glib::ustring& database_name, const Glib::ustring& title, bool request_password = true);
158
bool create_database(const Glib::ustring& database_name, const Glib::ustring& title);
159
void show_layout_toolbar(bool show = true);
151
160
#endif // !GLOM_ENABLE_CLIENT_ONLY
153
void export_data_to_string(Glib::ustring& the_string, const FoundSet& found_set, const Document_Glom::type_mapLayoutGroupSequence& sequence);
154
void export_data_to_stream(std::ostream& the_stream, const FoundSet& found_set, const Document_Glom::type_mapLayoutGroupSequence& sequence);
162
void export_data_to_string(Glib::ustring& the_string, const FoundSet& found_set, const Document_Glom::type_list_layout_groups& sequence);
163
void export_data_to_stream(std::ostream& the_stream, const FoundSet& found_set, const Document_Glom::type_list_layout_groups& sequence);
156
165
/** Show the table again. For instance, if the document has changed, or we want to display it differently.
158
167
void show_table_refresh();
169
///Whether we are viewing the details or list.
170
bool get_viewing_details() const;
162
174
//virtual void set_document(Document_Glom* pDocument); //override
176
/** Show the table, possibly selecting a particular record, possibly showing that in the details tab.
178
* @param table_name The database table to show.
179
* @param primary_key_value_for_details If specified, switch to the details view, and show this record.
164
181
void show_table(const Glib::ustring& table_name, const Gnome::Gda::Value& primary_key_value_for_details = Gnome::Gda::Value());
165
183
void show_table_title();
184
#ifndef GLOM_ENABLE_CLIENT_ONLY
166
185
void update_table_in_document_from_database();
186
#endif // !GLOM_ENABLE_CLIENT_ONLY
168
187
virtual void set_mode_widget(Gtk::Widget& widget); //e.g. show the design mode notebook.
169
188
virtual bool set_mode(enumModes mode); //bool indicates that there was a change.
179
198
void on_notebook_find_criteria(const Glib::ustring& where_clause);
180
199
void on_button_quickfind();
181
200
void on_button_find_all();
201
void on_notebook_data_switch_page(GtkNotebookPage* page, guint page_num);
182
202
void on_notebook_data_record_details_requested(const Glib::ustring& table_name, Gnome::Gda::Value primary_key_value);
183
203
void on_userlevel_changed(AppState::userlevels userlevel);
216
236
Dialog_Glom* m_pDialog_Tables;
217
238
#ifndef GLOM_ENABLE_CLIENT_ONLY
219
240
Dialog_Glom* m_pDialog_Reports;
241
Dialog_Layout_Report* m_pDialogLayoutReport;
220
242
Box_Reports* m_pBox_Reports;
244
Dialog_Glom* m_pDialog_PrintLayouts;
245
Window_PrintLayout_Edit* m_pDialogLayoutPrint;
246
Box_Print_Layouts* m_pBox_PrintLayouts;
222
248
Dialog_Fields* m_pDialog_Fields;
223
249
Dialog_Relationships* m_pDialog_Relationships;
224
250
Dialog_AddRelatedTable* m_dialog_addrelatedtable;
226
Dialog_Layout_Report* m_pDialogLayoutReport;
251
Dialog_RelationshipsOverview* m_dialog_relationships_overview;
227
253
#endif // !GLOM_ENABLE_CLIENT_ONLY
229
255
Dialog_Connection* m_pDialogConnection;
232
Box_Data_List_Related m_HackToFixLinkerError; //The implementation of this class does not seem to be in the library unless I do this. murrayc.
235
258
} //namespace Glom