Main Page   Modules   Alphabetical List   Data Structures   File List   Data Fields   Globals   Related Pages  

guiapi.h File Reference

Interface to menu module. More...

#include "gui_common.h"
#include "dbapi.h"

Include dependency graph for guiapi.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Functions

void gui_add_query (void)
 Add a new blank query.

char * gui_get_connection_url (void)
 Get the URL for the current connection.

int gui_get_query_count (void)
 Find the number of rows in the current result.

int gui_get_result_columns (void)
 Find the number of columns in the current result.

char * gui_get_result_field (int row, int column)
 Lookup a field text given a column and row.

int gui_get_result_rows (void)
 Find the number of rows in the current result.

void gui_init (int argc, char **argv)
 Initialise the GUI.

int gui_connection_ok (void)
 Check if the GUI has a valid connection.

void gui_delete_all_queries (void)
 Delete all open queries.

void gui_disconnect (void)
 Disconnects the GUI's database connection.

DBConnectiongui_get_connection (void)
 Get the current connection.

void gui_load_query_from_file (char *filename)
 Load the current query from a file.

int gui_run (void)
 Run the GUI.

void gui_set_connection (DBConnection *con)
 Set the currently active connection.

void gui_send_query ()
 Send the query to the database.

void gui_set_query_name (gchar *name)
 Set the name of the current query notebook page.

void gui_set_query_text (char *txt)
 Set the text for the currently active query.


Detailed Description

Interface to menu module.

Author:
Lionel ULMER , Darryl Luff

Definition in file guiapi.h.


Function Documentation

int gui_connection_ok void   
 

Check if the GUI has a valid connection.

Returns:
1 if the connection is good, 0 otherwise.

Definition at line 46 of file guiapi.c.

References gui_get_connection().

Referenced by lic_addQuery(), lic_disconnect(), lic_runQuery(), on_fileQuit_activate(), and ws_save_file().

DBConnection* gui_get_connection void   
 

Get the current connection.

Returns:
The connection pointer.

Definition at line 88 of file guiapi.c.

Referenced by db_connect_dialog_reconnect(), disconnect_first(), export_html_dialog_show(), gui_connection_ok(), gui_disconnect(), gui_get_connection_url(), gui_get_result_columns(), gui_get_result_field(), gui_get_result_rows(), gui_send_query(), on_databaseDisconnect_activate(), query_delete_at_position(), results_display(), tables_connection_closed(), and tables_new_connection().

char* gui_get_connection_url void   
 

Get the URL for the current connection.

Returns:
The url string. Don't free this.

Definition at line 95 of file guiapi.c.

References db_conn::connector, _dbconnector::db_frm, _dbconnector::form_to_url, and gui_get_connection().

Referenced by ws_save_file().

int gui_get_query_count void   
 

Find the number of rows in the current result.

Returns:
The number of rows.

Definition at line 111 of file guiapi.c.

References query_count().

Referenced by lic_runQuery().

int gui_get_result_columns void   
 

Find the number of columns in the current result.

Returns:
The number of columns.

Definition at line 117 of file guiapi.c.

References db_conn::DBget_field_number, db_conn::DBget_query_status, gui_get_connection(), query_get_current(), and query_get_result().

Referenced by lic_columnCount().

char* gui_get_result_field int    row,
int    column
 

Lookup a field text given a column and row.

Parameters:
row  The field row
column  The field column
Returns:
The field value as a string.

Definition at line 141 of file guiapi.c.

References db_conn::DBget_field_number, db_conn::DBget_field_value, db_conn::DBget_query_status, db_conn::DBget_record_number, gui_get_connection(), and query_get_current_result().

Referenced by lic_getField().

int gui_get_result_rows void   
 

Find the number of rows in the current result.

Returns:
The number of rows.

Definition at line 164 of file guiapi.c.

References db_conn::DBget_query_status, db_conn::DBget_record_number, gui_get_connection(), query_get_current(), and query_get_result().

Referenced by lic_rowCount().

void gui_init int    argc,
char **    argv
 

Initialise the GUI.

Parameters:
argc  The argc parameter passed to main.
argv  The argv parameter passed to main.

Definition at line 187 of file guiapi.c.

References db_connect_dialog_create(), get_rcname(), populate_mainWindow(), setup_widget_vars(), and update_button_sensitivity().

Referenced by main().

void gui_load_query_from_file char *    filename
 

Load the current query from a file.

Parameters:
filename  The file to load.

Definition at line 208 of file guiapi.c.

References _a_buf::b_dat, _a_buf::b_len, buf_free(), buf_new(), get_short_filename(), gui_set_query_name(), query_clear(), query_get_current(), querydata_set_filename(), and querydata_set_unchanged().

Referenced by lic_loadQuery().

int gui_run void   
 

Run the GUI.

Returns:
The return code to be used on exit.

Definition at line 239 of file guiapi.c.

References gui_get_workspace().

Referenced by main().

void gui_set_connection DBConnection   con
 

Set the currently active connection.

Parameters:
con  The connection pointer to set.

Definition at line 320 of file guiapi.c.

References db_conn::DBget_db_name, gui_add_query(), gui_disconnect(), tables_new_connection(), and update_button_sensitivity().

Referenced by db_connect_dialog_reconnect(), and lic_connect().

void gui_set_query_name gchar *    name
 

Set the name of the current query notebook page.

If name is NULL or an empty string, the call is ignored. Otherwise, the name is set as specified.

Parameters:
name  The new name.

Definition at line 347 of file guiapi.c.

References query_set_name().

Referenced by gui_load_query_from_file(), lic_addQuery(), on_queryImportDlgOkBtn_clicked(), and query_save_to_file().

void gui_set_query_text char *    txt
 

Set the text for the currently active query.

Parameters:
txt  The text to set.

Definition at line 354 of file guiapi.c.

References query_clear(), query_get_current(), and querydata_set_unchanged().

Referenced by lic_addQuery(), and lic_runQuery().


Generated on Sun May 9 19:19:23 2004 for GtkSQL by doxygen1.2.18