NetSurf
Data Fields
form_control Struct Reference

Form control. More...

#include <form_internal.h>

Collaboration diagram for form_control:
[legend]

Data Fields

void * node
 Corresponding DOM node. More...
 
struct dom_string * node_value
 The last value sync'd with the DOM. More...
 
bool syncing
 Set if a DOM sync is in-progress. More...
 
struct html_contenthtml
 HTML content containing control. More...
 
form_control_type type
 Type of control. More...
 
struct formform
 Containing form. More...
 
char * name
 Control name. More...
 
char * value
 Current value of control. More...
 
char * initial_value
 Initial value of control. More...
 
char * last_synced_value
 The last value sync'd to the DOM. More...
 
bool disabled
 Whether control is disabled. More...
 
struct boxbox
 Box for control. More...
 
unsigned int length
 Number of characters in control. More...
 
unsigned int maxlength
 Maximum characters permitted. More...
 
bool selected
 Whether control is selected. More...
 
union {
   struct {
      int   mx
 
      int   my
 
   }   image
 
   struct {
      int   num_items
 
      struct form_option *   items
 
      struct form_option *   last_item
 
      bool   multiple
 
      int   num_selected
 
      struct form_option *   current
 Currently selected item, if num_selected == 1. More...
 
      struct form_select_menu *   menu
 
   }   select
 
   struct {
      struct textarea *   ta
 
      struct dom_string *   initial
 
      struct form_textarea_data   data
 
   }   text
 input type=text or textarea More...
 
data
 
struct form_controlprev
 Previous control in this form. More...
 
struct form_controlnext
 Next control in this form. More...
 

Detailed Description

Form control.

Definition at line 73 of file form_internal.h.

Field Documentation

◆ box

struct box* form_control::box

◆ current

struct form_option* form_control::current

Currently selected item, if num_selected == 1.

Definition at line 106 of file form_internal.h.

◆ data [1/2]

struct form_textarea_data form_control::data

◆  [2/2]

union { ... } form_control::data

◆ disabled

bool form_control::disabled

Whether control is disabled.

Definition at line 87 of file form_internal.h.

Referenced by box_textarea_create_textarea().

◆ form

struct form* form_control::form

◆ html

struct html_content* form_control::html

◆ 

struct { ... } form_control::image

◆ initial

struct dom_string* form_control::initial

Definition at line 111 of file form_internal.h.

◆ initial_value

char* form_control::initial_value

Initial value of control.

Definition at line 85 of file form_internal.h.

Referenced by form_free_control(), invent_fake_gadget(), and parse_input_element().

◆ items

struct form_option* form_control::items

Definition at line 102 of file form_internal.h.

Referenced by layout_line(), and layout_minmax_line().

◆ last_item

struct form_option * form_control::last_item

Definition at line 102 of file form_internal.h.

◆ last_synced_value

char* form_control::last_synced_value

The last value sync'd to the DOM.

Definition at line 86 of file form_internal.h.

Referenced by form_free_control(), form_gadget_sync_with_dom(), and parse_input_element().

◆ length

unsigned int form_control::length

Number of characters in control.

Definition at line 91 of file form_internal.h.

Referenced by parse_input_element().

◆ maxlength

unsigned int form_control::maxlength

Maximum characters permitted.

Definition at line 92 of file form_internal.h.

Referenced by parse_input_element().

◆ menu

struct form_select_menu* form_control::menu

Definition at line 107 of file form_internal.h.

◆ multiple

bool form_control::multiple

Definition at line 103 of file form_internal.h.

◆ mx

int form_control::mx

Definition at line 98 of file form_internal.h.

◆ my

int form_control::my

Definition at line 98 of file form_internal.h.

◆ name

char* form_control::name

◆ next

struct form_control* form_control::next

◆ node

void* form_control::node

◆ node_value

struct dom_string* form_control::node_value

The last value sync'd with the DOM.

Definition at line 75 of file form_internal.h.

Referenced by form_free_control(), form_gadget_sync_with_dom(), and parse_input_element().

◆ num_items

int form_control::num_items

Definition at line 101 of file form_internal.h.

◆ num_selected

int form_control::num_selected

Definition at line 104 of file form_internal.h.

◆ prev

struct form_control* form_control::prev

Previous control in this form.

Definition at line 116 of file form_internal.h.

Referenced by box_textarea_keypress(), and form_add_control().

◆ 

struct { ... } form_control::select

◆ selected

bool form_control::selected

Whether control is selected.

Definition at line 94 of file form_internal.h.

Referenced by form_radio_set(), gadget_mouse_action(), html_redraw_box(), and parse_input_element().

◆ syncing

bool form_control::syncing

Set if a DOM sync is in-progress.

Definition at line 76 of file form_internal.h.

Referenced by form_gadget_sync_with_dom().

◆ ta

struct textarea* form_control::ta

Definition at line 110 of file form_internal.h.

Referenced by box_textarea_keypress(), and parse_textarea_element().

◆ 

struct { ... } form_control::text

input type=text or textarea

◆ type

form_control_type form_control::type

◆ value

char* form_control::value

The documentation for this struct was generated from the following file: