1 /* Copyright (C) 1992-1998 The Geometry Center 2 * Copyright (C) 1998-2000 Stuart Levy, Tamara Munzner, Mark Phillips 3 * 4 * This file is part of Geomview. 5 * 6 * Geomview is free software; you can redistribute it and/or modify it 7 * under the terms of the GNU Lesser General Public License as published 8 * by the Free Software Foundation; either version 2, or (at your option) 9 * any later version. 10 * 11 * Geomview is distributed in the hope that it will be useful, but 12 * WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * Lesser General Public License for more details. 15 * 16 * You should have received a copy of the GNU Lesser General Public 17 * License along with Geomview; see the file COPYING. If not, write 18 * to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, 19 * USA, or visit http://www.gnu.org. 20 */ 21 /* Structure of mib_TextBox */ 22 /*****************************************************************************/ 23 24 typedef struct _mib_TextBox { 25 char *init_contents; /* initial text contents */ 26 27 } mib_TextBox; 28 29 /* mib_TextBox functions */ 30 /*****************************************************************************/ 31 mib_Widget *mib_create_TextBox(mib_Widget *, char *, char *, int, int, int, 32 int, int); 33 void mib_delete_TextBox(mib_Widget *); 34 void mib_save_TextBox(mib_Widget *, FILE *); 35 int mib_load_TextBox(mib_Widget *, mib_Buffer *); 36 37 38 /* Structure of mib_Button */ 39 /*****************************************************************************/ 40 41 typedef struct _mib_Button { 42 char *label; /* label on button */ 43 44 } mib_Button; 45 46 /* mib_Button functions */ 47 /*****************************************************************************/ 48 mib_Widget *mib_create_Button(mib_Widget *, char *, char *, int, int, int, 49 int, int); 50 void mib_delete_Button(mib_Widget *); 51 void mib_save_Button(mib_Widget *, FILE *); 52 int mib_load_Button(mib_Widget *, mib_Buffer *); 53 54 55 /* Structure of mib_Toggle */ 56 /*****************************************************************************/ 57 58 typedef struct _mib_Toggle { 59 char *label; /* label on toggle */ 60 int isize; 61 62 } mib_Toggle; 63 64 /* mib_Toggle functions */ 65 /*****************************************************************************/ 66 mib_Widget *mib_create_Toggle(mib_Widget *, char *, char *, int, int, int, 67 int, int); 68 void mib_delete_Toggle(mib_Widget *); 69 void mib_save_Toggle(mib_Widget *, FILE *); 70 int mib_load_Toggle(mib_Widget *, mib_Buffer *); 71 72 73 /* Structure of mib_RadioBox */ 74 /*****************************************************************************/ 75 typedef struct _mib_RadioBox { 76 char **labels; /* array of labels */ 77 int numlabel; /* number of labels */ 78 Widget *buttons; /* pointers to each button */ 79 80 } mib_RadioBox; 81 82 /* mib_RadioBox functions */ 83 84 /*****************************************************************************/ 85 mib_Widget *mib_create_RadioBox(mib_Widget *, char *, char*, int, int, int, 86 int, int); 87 void mib_delete_RadioBox(mib_Widget *); 88 void mib_save_RadioBox(mib_Widget *, FILE *); 89 int mib_load_RadioBox(mib_Widget *, mib_Buffer *); 90 91 92 /* Structure of mib_DrawingArea */ 93 /*****************************************************************************/ 94 typedef struct _mib_DrawingArea { 95 int nothing; /* couldn't think of anything yet */ 96 97 } mib_DrawingArea; 98 99 /* mib_DrawingArea functions */ 100 /*****************************************************************************/ 101 mib_Widget *mib_create_DrawingArea(mib_Widget *, char *, char *, int, int, int, 102 int, int); 103 void mib_delete_DrawingArea(mib_Widget *); 104 void mib_save_DrawingArea(mib_Widget *, FILE *); 105 int mib_load_DrawingArea(mib_Widget *, mib_Buffer *); 106 107 108 /* Structure of mib_Label */ 109 /*****************************************************************************/ 110 typedef struct _mib_Label { 111 char *label; /* text in label */ 112 113 } mib_Label; 114 115 /* mib_Label functions */ 116 /*****************************************************************************/ 117 mib_Widget *mib_create_Label(mib_Widget *, char *, char *, int, int, int, 118 int, int); 119 void mib_delete_Label(mib_Widget *); 120 void mib_save_Label(mib_Widget *, FILE *); 121 int mib_load_Label(mib_Widget *, mib_Buffer *); 122 123 124 /* Structure of mib_Frame */ 125 /*****************************************************************************/ 126 typedef struct _mib_Frame { 127 int shadowtype; /* 0 = in, 1 = out, 2 = etched_in, 3 = etched_out */ 128 129 } mib_Frame; 130 131 /* mib_Frame functions */ 132 /*****************************************************************************/ 133 mib_Widget *mib_create_Frame(mib_Widget *, char *, char *, int, int, int, 134 int, int); 135 void mib_delete_Frame(mib_Widget *); 136 void mib_save_Frame(mib_Widget *, FILE *); 137 int mib_load_Frame(mib_Widget *, mib_Buffer *); 138 139 140 /* Structure of mib_ScrollBar */ 141 /*****************************************************************************/ 142 typedef struct _mib_ScrollBar { 143 int orientation; 144 145 } mib_ScrollBar; 146 147 /* mib_ScrollBar functions */ 148 /*****************************************************************************/ 149 mib_Widget *mib_create_ScrollBar(mib_Widget *, char *, char *, int, int, int, 150 int, int); 151 void mib_delete_ScrollBar(mib_Widget *); 152 void mib_save_ScrollBar(mib_Widget *, FILE *); 153 int mib_load_ScrollBar(mib_Widget *, mib_Buffer *); 154 155 156 /* Structure of mib_TextBig */ 157 /*****************************************************************************/ 158 typedef struct _mib_TextBig { 159 int nothing; /* couldn't think of anything yet */ 160 161 } mib_TextBig; 162 163 /* mib_TextBig functions */ 164 /*****************************************************************************/ 165 mib_Widget *mib_create_TextBig(mib_Widget *, char *, char *, int, int, int, int, int); 166 void mib_delete_TextBig(mib_Widget *); 167 void mib_save_TextBig(mib_Widget *, FILE *); 168 int mib_load_TextBig(mib_Widget *, mib_Buffer *); 169 170 171 /* Structure of mib_List */ 172 /*****************************************************************************/ 173 typedef struct _mib_List { 174 Widget real_list; 175 176 } mib_List; 177 178 /* mib_List functions */ 179 /*****************************************************************************/ 180 mib_Widget *mib_create_List(mib_Widget *, char *, char *, int, int, int, 181 int, int); 182 void mib_delete_List(mib_Widget *); 183 void mib_save_List(mib_Widget *, FILE *); 184 int mib_load_List(mib_Widget *, mib_Buffer *); 185 186 /* Structure of mib_Scale */ 187 /*****************************************************************************/ 188 typedef struct _mib_Scale { 189 int orientation; 190 191 } mib_Scale; 192 193 /* mib_Scale functions */ 194 /*****************************************************************************/ 195 mib_Widget *mib_create_Scale(mib_Widget *, char *, char *, int, int, int, 196 int, int); 197 void mib_delete_Scale(mib_Widget *); 198 void mib_save_Scale(mib_Widget *, FILE *); 199 int mib_load_Scale(mib_Widget *, mib_Buffer *); 200 201 /* Structure of mib_Menu */ 202 /*****************************************************************************/ 203 typedef struct _mib_Menu { 204 int numitems; /* number of items in menu*/ 205 MenuItem *my_menu; /* array of menu items */ 206 Widget *items; /* pointers to each item */ 207 208 } mib_Menu; 209 210 /* mib_Menu functions */ 211 /*****************************************************************************/ 212 mib_Widget *mib_create_Menu(mib_Widget *, char *, char *, int, int, int, 213 int, int); 214 void mib_delete_Menu(mib_Widget *); 215 void mib_save_Menu(mib_Widget *, FILE *); 216 int mib_load_Menu(mib_Widget *, mib_Buffer *); 217 218 /*****************************************************************************/ 219 220 typedef struct _mib_widget_funcs { 221 char *name; 222 mib_Widget *(*mib_create)(); 223 void (*mib_delete)(); 224 void (*mib_save)(); 225 int (*mib_load)(); 226 } mib_widget_funcs; 227