Yattm - unified GTK instant-messaging client logo
   [Generated for version 0.2-17 - Mon Jan 6 19:01:23 GMT+1 2003]

Home - Main Page - Data Structures - File List - Data Fields - Globals

dialog.h

Go to the documentation of this file.
00001 /*
00002  * Yattm 
00003  *
00004  * Copyright (C) 1999, Torrey Searle <tsearle@uci.edu>
00005  *
00006  * This program is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  *
00020  */
00021 
00022 #ifndef __DIALOG__
00023 #define __DIALOG__
00024 #include <gtk/gtk.h>
00025 
00026 typedef struct _list_dialog_data {
00027     void (*callback)(char *value, void *data);
00028     void *data;
00029 } list_dialog_data;
00030 
00031 typedef struct _text_input_window
00032 {
00033     void (*callback)(char *value, void *data);
00034     void *data;
00035     GtkWidget *window;
00036     GtkWidget *text;
00037 } text_input_window;
00038 
00039 #ifdef __cplusplus
00040 extern "C" {
00041 #endif
00042 
00043 /*dialog.c*/
00044 GtkWidget *eb_push_button(const char *text, GtkWidget *page);
00045 GtkWidget *eb_button(const char *text, int *value, GtkWidget *page);
00046 
00047 GSList * eb_radio (GSList * group, const char * text, int curr_val,
00048            int set_val, GtkWidget *page, void * set_element);
00049 /*
00050   Example usage of eb_radio:
00051 
00052 int my_val;
00053 void set_my_element (GtkWidget * w, int data)
00054   {
00055     my_val = data;
00056     // Do whatever other update stuffs.....
00057   }
00058 
00059 int myfunc ()
00060 {
00061   ....
00062   GtkWidget * hbox;
00063   GtkWidget * label;
00064   GList * group;
00065 
00066   // Setup initial Value
00067   my_val = 3;
00068 
00069   // Setup box to hold it
00070   hbox = gtk_hbox_new(FALSE, 5);
00071 
00072   // setup intro label
00073   label = gtk_label_new ("Option Group:");
00074   gtk_widget_show (label);
00075   gtk_box_pack_start (GTK_BOX(hbox), label, FALSE, FALSE, 5);
00076 
00077   // Setup group -- set to NULL to create new group
00078   group = NULL;
00079 
00080   // Create buttons
00081   group = eb_radio (group, "Opt 1", my_val, 1, hbox, set_my_element);
00082   group = eb_radio (group, "Opt 2", my_val, 2, hbox, set_my_element);
00083   group = eb_radio (group, "Opt 3", my_val, 3, hbox, set_my_element);
00084   group = eb_radio (group, "Opt 4", my_val, 4, hbox, set_my_element);
00085 
00086   // Don't forget to put hbox somewhere in a layout ;)
00087   gtk_widget_show (hbox);
00088   ....
00089 }
00090 
00091 */
00092 
00093 /* These need docs but I'm toooooo tired, atm.  Look in status.c :( */
00094 
00095 GtkWidget * eb_menu_button (GtkMenu * menu, gchar * label,
00096                 GtkSignalFunc callback_func,
00097                 gpointer callback_arg);
00098 
00099 GtkWidget * eb_menu_submenu (GtkMenu * menu, gchar * label,
00100                  GtkWidget *submenu);
00101 
00102 
00103 GtkWidget* do_error_dialog(char *message, char *title);
00104 void eb_icon(GdkWindow *);
00105 void do_dialog( gchar * message, gchar * title, void (*action)(GtkWidget * widget, gpointer data), gpointer data );
00106 void do_list_dialog( gchar * message, gchar * title, char **list, void (*action)(char * text, gpointer data), gpointer data );
00107 void do_text_input_window( gchar * title, gchar * value, void (*action)(char * text, gpointer data), gpointer data );
00108 
00109 #ifdef __cplusplus
00110 } /* extern "C" */
00111 #endif
00112 
00113 /*editcontacts.c*/
00114 void eb_new_user();
00115 
00116 #endif

Contact: Andy Maloney     [Documentation generated by doxygen]