00001 00005 /* GtkSQL -- an interactive graphical query tool for PostgreSQL 00006 * Copyright (C) 1998 Lionel ULMER 00007 * 00008 * This program is free software; you can redistribute it and/or modify 00009 * it under the terms of the GNU General Public License as published by 00010 * the Free Software Foundation; either version 2 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * This program is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License 00019 * along with this program; if not, write to the Free Software 00020 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00021 * ========================================================================== 00022 * 00023 * Functions to handle the table pane. 00024 */ 00025 00026 #ifndef __TABLES_H__ 00027 #define __TABLES_H__ 00028 00030 extern GtkWidget *tableNotebook; 00031 00032 /* Displays the named table */ 00033 int display_table_named(char *tablename); 00034 00035 /* Returns a pointer to the currently active table */ 00036 GtkCList *get_current_table(void); 00037 00038 /* Returns the name of the currently active table */ 00039 char *get_current_table_name(void); 00040 00041 /* Returns a ", " separated list of the currently selected table fields */ 00042 char *get_selected_table_fields(void); 00043 00044 /* Returns the 'n'th tabel (zero-based) */ 00045 GtkCList *get_table_no(int n); 00046 00047 /* Create the pane */ 00048 GtkWidget *init_tables_pane(void); 00049 00050 void on_delete_query_activate(GtkMenuItem * menuitem, gpointer user_data); 00051 void on_insert_query_activate(GtkMenuItem * menuitem, gpointer user_data); 00052 void on_select_query_activate(GtkMenuItem * menuitem, gpointer user_data); 00053 void on_update_query_activate(GtkMenuItem * menuitem, gpointer user_data); 00054 00055 /* Remove all table pages */ 00056 void tables_connection_closed(void); 00057 00058 /* Create the table pages for the new connection */ 00059 void tables_new_connection(void); 00060 00061 #endif