From: Peep P. <so...@us...> - 2004-08-03 14:50:12
|
Update of /cvsroot/agd/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1422 Modified Files: gui.h Log Message: Some rearranges. Index: gui.h =================================================================== RCS file: /cvsroot/agd/client/gui.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- gui.h 9 Jan 2004 20:52:06 -0000 1.1.1.1 +++ gui.h 3 Aug 2004 14:50:03 -0000 1.2 @@ -1,24 +1,10 @@ #ifndef _GUI_H #define _GUI_H -#include "array.h" - -typedef struct { - BITMAP *b; - int char_w; -} gui_font_t; - -typedef struct { - int w, h; - int visible; - int x, y; - int properties; - char *title; - array_t widgets; -} gui_window_t; -#define GUI_WP_CLOSE 0x1 #define GUI_SWT_BUTTON 1 #define GUI_SWT_LABEL 2 +#define GUI_SWT_TEXTBOX 3 + typedef struct { int x, y; int type; @@ -42,6 +28,30 @@ typedef struct { int w, h; int visible; + char *value; +} gui_textbox_t; + +typedef struct { + BITMAP *b; + int char_w; +} gui_font_t; + +typedef struct { + int w, h; + int visible; + int x, y; + int properties; + char *title; + + subwidget_t *widgets; + int numwidg; +} gui_window_t; +/* Window properties. */ +#define GUI_WP_CLOSE 0x1 + +typedef struct { + int w, h; + int visible; } gui_widget_t; void gui_init(void); @@ -51,15 +61,17 @@ gui_window_t *gui_new_window(int w, int h, int x, int y, int properties); gui_button_t *gui_new_button(int w, int h, char *caption, void (*callback)(void)); gui_label_t *gui_new_label(int w, int h, char *text); +gui_textbox_t *gui_new_textbox(int w, int h); + void gui_add_widget(gui_window_t *win, void *widg, int type, int x, int y); void gui_draw_window(BITMAP *bmp, gui_window_t *win); int gui_text(BITMAP *bmp, int font, char *text, int x, int y, int maxwidth); void gui_button(BITMAP *bmp, int font, char *caption, int x, int y, int w, int h, int pressed); void gui_label(BITMAP *bmp, int font, char *text, int x, int y, int w, int h); -/*void gui_text(BITMAP *bmp, unsigned char gui_font_nr, char *text, int x, int y); +void gui_textbox(BITMAP *bmp, int font, char *value, int x, int y, int w, int h); +/* void gui_load_font(char *filename); -int gui_button(BITMAP *bmp, unsigned char gui_font_nr, char *text, int x, int y, int gui_active_menu); int gui_menu(BITMAP *bmp, int gui_active_menu);*/ #endif |