#include <string.h>
#include "callbacks.h"
#include "dialogs.h"
#include "drag.h"
#include "guiapi.h"
#include "menus.h"
#include "queries.h"
#include "tables.h"
Include dependency graph for tables.c:
Go to the source code of this file.
Functions | |
GtkWidget * | tables_create_popup (void) |
Creates the popup menu for the table notebook. | |
gboolean | on_info_clist_button_press_event (GtkWidget *widget, GdkEventButton *event, gpointer user_data) |
'click' event for table pane. | |
int | display_table_named (char *tablename) |
Selects the table with the specified name. | |
GtkCList * | get_current_table (void) |
Return the currently visible table pane. | |
char * | get_current_table_name (void) |
char * | get_selected_table_fields (void) |
GtkCList * | get_table_no (int n) |
Returns the n'th table. | |
GtkWidget * | init_tables_pane (void) |
Initialises the table pane. | |
void | tables_connection_closed (void) |
Removes all tables from the table notebook. | |
void | tables_new_connection (void) |
Initialises table display for a new connection. | |
void | on_delete_query_activate (GtkMenuItem *menuitem, gpointer user_data) |
'Delete Query' action function. | |
void | on_insert_query_activate (GtkMenuItem *menuitem, gpointer user_data) |
'Insert Query' action function. | |
void | on_select_query_activate (GtkMenuItem *menuitem, gpointer user_data) |
'select query' action function. | |
void | on_update_query_activate (GtkMenuItem *menuitem, gpointer user_data) |
'update query' action function. | |
Variables | |
GtkWidget * | tableNotebook |
The table notebook. | |
GtkWidget * | tablePopupDeleteQueryItem |
Generate a DELETE query. | |
GtkWidget * | tablePopupInsertQueryItem |
Generate a INSERT query. | |
GtkWidget * | tablePopupRefreshItem |
Refresh the table listing. | |
GtkWidget * | tablePopupSelectQueryItem |
Generate a SELECT query. | |
GtkWidget * | tablePopupUpdateQueryItem |
Generate a UPDATE query. | |
SubMenu | tablePopupTemplate [] |
Template for table popup menu. |
Definition in file tables.c.
|
Selects the table with the specified name. The named table is located in the table pane and displayed. Definition at line 76 of file tables.c. References tableNotebook. |
|
Return the currently visible table pane. The returned item is the GtkCList containing the table fields. Definition at line 99 of file tables.c. References get_table_no(), and tableNotebook. Referenced by get_selected_table_fields(). |
|
Definition at line 108 of file tables.c. References tableNotebook. Referenced by on_delete_query_activate(), on_insert_query_activate(), on_select_query_activate(), and on_update_query_activate(). |
|
Definition at line 128 of file tables.c. References get_current_table(). Referenced by on_insert_query_activate(), and on_select_query_activate(). |
|
Returns the n'th table.
Definition at line 165 of file tables.c. References tableNotebook. Referenced by get_current_table(). |
|
Initialises the table pane.
Definition at line 192 of file tables.c. References tableNotebook. Referenced by init_top_hpane(). |
|
'Delete Query' action function. Called from the toolbar and menus. Definition at line 311 of file tables.c. References get_current_table_name(), and query_get_current(). |
|
'click' event for table pane. Pops up the popup menu on button 3 being pressed. Definition at line 334 of file tables.c. References tables_create_popup(). |
|
'Insert Query' action function. Called by menu and toolbar actions. Definition at line 356 of file tables.c. References get_current_table_name(), get_selected_table_fields(), and query_get_current(). |
|
'select query' action function. Generates a default 'select' query from the currently selected table fields. Definition at line 389 of file tables.c. References get_current_table_name(), get_selected_table_fields(), and query_get_current(). |
|
'update query' action function. Generates a default 'update' query from the currently selected table fields. Definition at line 419 of file tables.c. References get_current_table_name(), and query_get_current(). |
|
Removes all tables from the table notebook. This is called when a database connection is closed. Definition at line 210 of file tables.c. References db_conn::DBfree_table_def, gui_get_connection(), and tableNotebook. Referenced by gui_disconnect(), and on_tableRefresh_activate(). |
|
Creates the popup menu for the table notebook. The popup menu is stored in the tablePopup global variable. Definition at line 253 of file tables.c. References create_menu(). Referenced by on_info_clist_button_press_event(). |
|
Initialises table display for a new connection. The list of tables is recalled and field displays created. Definition at line 224 of file tables.c. References create_standard_dialog(), db_conn::DBget_table, db_conn::DBget_table_def, db_conn::DBget_table_num, gui_get_connection(), DBTableDef::name, and tableNotebook. Referenced by gui_set_connection(), and on_tableRefresh_activate(). |
|
Initial value: { {"<- SELECT Query", on_select_query_activate, NULL, &tablePopupSelectQueryItem, NORM_BUTTON}, {"<- INSERT Query", on_insert_query_activate, NULL, &tablePopupInsertQueryItem, NORM_BUTTON}, {"<- UPDATE Query", on_update_query_activate, NULL, &tablePopupUpdateQueryItem, NORM_BUTTON}, {"<- DELETE Query", on_delete_query_activate, NULL, &tablePopupDeleteQueryItem, NORM_BUTTON}, {"", NULL, NULL, NULL, NORM_BUTTON}, {"Refresh", on_tableRefresh_activate, NULL, &tablePopupRefreshItem, NORM_BUTTON}, {NULL, NULL, NULL, NULL, NORM_BUTTON} }
|