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

gui.c File Reference

Implements the GUI API. More...

#include "../config.h"
#include <string.h>
#include "buf.h"
#include "callbacks.h"
#include "dialogs.h"
#include "export.h"
#include "guiapi.h"
#include "luaif.h"
#include "mytoolbar.h"
#include "queries.h"
#include "status.h"
#include "support.h"
#include "tables.h"
#include "workspace.h"
#include "../Pics/connect.xpm"
#include "../Pics/disconnect.xpm"
#include "../Pics/send.xpm"
#include "../Pics/new.xpm"
#include "../Pics/save.xpm"
#include "../Pics/open.xpm"
#include "../Pics/delete.xpm"
#include "../Pics/rename.xpm"
#include "../Pics/export.xpm"
#include "../Pics/refresh.xpm"
#include "../Pics/connect-grey.xpm"
#include "../Pics/disconnect-grey.xpm"
#include "../Pics/send-grey.xpm"
#include "../Pics/new-grey.xpm"
#include "../Pics/save-grey.xpm"
#include "../Pics/open-grey.xpm"
#include "../Pics/delete-grey.xpm"
#include "../Pics/rename-grey.xpm"
#include "../Pics/export-grey.xpm"
#include "../Pics/refresh-grey.xpm"

Include dependency graph for gui.c:

Include dependency graph

Go to the source code of this file.

Data Structures

struct  _activator
 Used to activate/deactivate controls as the application state changes. More...


typedef _activator Activator
 Used to activate/deactivate controls as the application state changes.


void disconnect_callback (void *data)
 Callback for the 'Disconnect' dialog.

int disconnect_first (void)
 Checks whether currently connected.

char * get_rcname (void)
 Get the name of the rc file to use.

void gui_get_workspace ()
 Retrieve the current workspace.

GtkWidget * init_top_hpane ()
 Initialise top hpane.

GtkWidget * init_mainvpane ()
 Initialise the main VPane.

GtkWidget * populate_mainvbox (GtkWidget *mainvbox)
 Add the widgets.

void populate_mainWindow ()
 Initialise the main window.

void update_button_sensitivity (void)
 Adjust the active state of the buttons the match the application state.


DBConnectionguiConnection = NULL
 Currently active connection.

GtkWidget * tree = NULL
 Database list tree.

GtkWidget * toolbarAddButton
 'Add' query button

GtkWidget * toolbarConnectButton
 'Connect' button

GtkWidget * toolbarCloseButton
 'Close' query Button

GtkWidget * toolbarDisconnectButton
 'Disconnect' Button

GtkWidget * toolbarExportButton
 'Export' Button

GtkWidget * toolbarLoadButton
 'Load' query Button

GtkWidget * toolbarRefreshButton
 'Refresh' Button

GtkWidget * toolbarSaveButton
 'Save' query Button

GtkWidget * toolbarSaveAsButton
 'Save As' query Button

GtkWidget * toolbarSendButton
 'Send' query Button

ToolBar toolbardef []
 Toolbar definition.

Activator sensWidget []
 The activation list of widgets to be activated/deactivated.

Detailed Description

Implements the GUI API.

Lionel ULMER , Darryl Luff

Definition in file gui.c.

Function Documentation

void disconnect_callback void *    data

Callback for the 'Disconnect' dialog.

Resets all the display items.

Definition at line 204 of file gui.c.

References gui_disconnect(), and update_button_sensitivity().

Referenced by on_fileQuit_activate().

int disconnect_first void   

Checks whether currently connected.

If so, it displays a user a message asking them to disconnect first.

If the user is connected, return 0. Otherwise, return 1.

Definition at line 215 of file gui.c.

References _a_buf::b_dat, _a_buf::b_len, buf_free(), buf_new(), db_conn::DBget_db_name, display_error(), and gui_get_connection().

char* get_rcname void   

Get the name of the rc file to use.

The filename.

Definition at line 243 of file gui.c.

References _a_buf::b_dat, and buf_strcat().

Referenced by gui_init().

GtkWidget* init_mainvpane  

Initialise the main VPane.

This contains the HPane for the query and table panes at the top, and the result pane at the bottom.

The mainvpane ready for packing.

Definition at line 286 of file gui.c.

References init_top_hpane(), and result_pane_init().

Referenced by populate_mainvbox().

GtkWidget* init_top_hpane  

Initialise top hpane.

This contains the query pane on the left, and the table pane on the right.

The hpane ready for packing.

Definition at line 272 of file gui.c.

References init_tables_pane(), and query_pane_init().

Referenced by init_mainvpane().

GtkWidget* populate_mainvbox GtkWidget *    mainvbox

Add the widgets.

Must be called after the vbox has been added to the main window.

Definition at line 309 of file gui.c.

References init_mainvpane().

Referenced by populate_mainWindow().

void populate_mainWindow  

Initialise the main window.

The gui structure is: mainWindow (Glade) .mainvbox (Glade) ..menubar (Glade) ..toolbar (Manual) ..mainvpane (Glade) ...hpane (Glade) ....query (Manual) ....tables (Manual) ...result (Manual) ..statusbar (Glade)

Definition at line 337 of file gui.c.

References populate_mainvbox().

Referenced by gui_init().

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