From f1375fe19db064fcebf00433ce73eab99be038ef Mon Sep 17 00:00:00 2001 From: James Bursa Date: Sat, 25 Oct 2003 00:35:49 +0000 Subject: [project @ 2003-10-25 00:35:49 by bursa] Split out and clean up form submit code. svn path=/import/netsurf/; revision=374 --- render/box.h | 63 +++--------------------------------------------------------- 1 file changed, 3 insertions(+), 60 deletions(-) (limited to 'render/box.h') diff --git a/render/box.h b/render/box.h index 76c9500c9..2c76f3ffd 100644 --- a/render/box.h +++ b/render/box.h @@ -33,59 +33,8 @@ struct column { unsigned long min, max, width; }; -struct formoption { - bool selected; - bool initial_selected; - char* value; - char* text; - struct formoption* next; -}; - struct box; -struct gui_gadget { - enum { GADGET_HIDDEN = 0, GADGET_TEXTBOX, GADGET_RADIO, GADGET_CHECKBOX, - GADGET_SELECT, GADGET_TEXTAREA, - GADGET_IMAGE, GADGET_PASSWORD, GADGET_SUBMIT, GADGET_RESET } type; - char *name; - char *value; - char *initial_value; - struct form *form; - struct box *box; - struct box *caret_inline_container; - struct box *caret_text_box; - int caret_char_offset; - unsigned int maxlength; - union { - struct { - char* value; - } hidden; - struct { - char* name; - char* value; - char* n; - int width, height; - int mx, my; - } image; - struct { - int num_items; - struct formoption *items, *last_item; - bool multiple; - int num_selected; - /** Currently selected item, if num_selected == 1. */ - struct formoption *current; - } select; - struct { - int selected; - char* value; - } checkbox; - struct { - int selected; - char* value; - } radio; - } data; -}; - /* parameters for and related elements */ struct object_params { char* data; @@ -137,28 +86,22 @@ struct box { struct box * next_float; struct column *col; struct font_data *font; - struct gui_gadget* gadget; + struct form_control* gadget; struct content* object; /* usually an image */ struct object_params *object_params; void* object_state; /* state of any object */ }; -struct form -{ - char* action; /* url */ - enum {method_GET, method_POST} method; -}; - struct formsubmit { struct form* form; - struct gui_gadget* items; + struct form_control* items; }; struct page_elements { struct form** forms; - struct gui_gadget** gadgets; + struct form_control** gadgets; struct img** images; int numForms; int numGadgets; -- cgit v1.2.3