NetSurf
Functions
box_textarea.c File Reference

Box tree treeview box replacement (implementation). More...

#include <string.h>
#include <dom/dom.h>
#include "utils/config.h"
#include "utils/log.h"
#include "utils/messages.h"
#include "netsurf/keypress.h"
#include "netsurf/misc.h"
#include "desktop/textarea.h"
#include "html/private.h"
#include "html/interaction.h"
#include "html/box.h"
#include "html/box_inspect.h"
#include "html/box_textarea.h"
#include "html/font.h"
#include "html/form_internal.h"
Include dependency graph for box_textarea.c:

Go to the source code of this file.

Functions

nserror box_textarea_keypress (html_content *html, struct box *box, uint32_t key)
 Handle form textarea keypress input. More...
 
static void box_textarea_callback (void *data, struct textarea_msg *msg)
 Callback for html form textareas. More...
 
bool box_textarea_create_textarea (html_content *html, struct box *box, struct dom_node *node)
 Create textarea widget for a form element. More...
 

Detailed Description

Box tree treeview box replacement (implementation).

Definition in file box_textarea.c.

Function Documentation

◆ box_textarea_callback()

static void box_textarea_callback ( void *  data,
struct textarea_msg msg 
)
static

Callback for html form textareas.

Definition at line 130 of file box_textarea.c.

References form_control::box, box_coords(), html_content::bw, textarea_msg::caret, textarea_msg::clip, content__request_redraw(), textarea_msg::data, textarea_msg::drag, form_gadget_update_value(), box::gadget, form_textarea_data::gadget, textarea_msg::have_selection, textarea_msg::height, form_control::html, HTML_DRAG_NONE, HTML_DRAG_TEXTAREA_SCROLLBAR, HTML_DRAG_TEXTAREA_SELECTION, HTML_FOCUS_TEXTAREA, HTML_SELECTION_NONE, HTML_SELECTION_TEXTAREA, html_set_drag_type(), html_set_focus(), html_set_selection(), textarea_msg::len, textarea_msg::modified, html_drag_owner::no_owner, html_selection_owner::none, NSLOG, textarea_msg::pos, textarea_msg::read_only, textarea_msg::redraw, html_content::reflowing, textarea_msg::selection, strndup(), textarea_msg::text, html_drag_owner::textarea, html_selection_owner::textarea, html_focus_owner::textarea, TEXTAREA_DRAG_NONE, TEXTAREA_DRAG_SCROLLBAR, TEXTAREA_DRAG_SELECTION, TEXTAREA_MSG_CARET_UPDATE, TEXTAREA_MSG_DRAG_REPORT, TEXTAREA_MSG_REDRAW_REQUEST, TEXTAREA_MSG_SELECTION_REPORT, TEXTAREA_MSG_TEXT_MODIFIED, textarea_msg::type, textarea_msg::x, rect::x0, rect::x1, textarea_msg::y, rect::y0, and rect::y1.

Referenced by box_textarea_create_textarea().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ box_textarea_create_textarea()

bool box_textarea_create_textarea ( struct html_content html,
struct box box,
struct dom_node *  node 
)

Create textarea widget for a form element.

Parameters
htmlhtml content object
boxbox with gadget to be given textarea widget
nodeDOM node for form element

Definition at line 257 of file box_textarea.c.

References plot_font_style::background, textarea_setup::border_col, textarea_setup::border_width, box_textarea_callback(), colour_to_bw_furthest, form_control::data, form_control::disabled, plot_font_style::family, FONTF_NONE, plot_font_style::foreground, box::gadget, form_textarea_data::gadget, GADGET_PASSWORD, GADGET_TEXTAREA, GADGET_TEXTBOX, textarea_setup::height, form_control::node, NS_TRANSPARENT, textarea_setup::pad_bottom, textarea_setup::pad_left, textarea_setup::pad_right, textarea_setup::pad_top, PLOT_FONT_FAMILY_SANS_SERIF, PLOT_STYLE_SCALE, textarea_setup::selected_bg, textarea_setup::selected_text, textarea_setup::text, text(), textarea_create(), TEXTAREA_DEFAULT, TEXTAREA_MULTILINE, TEXTAREA_PASSWORD, TEXTAREA_READONLY, textarea_set_text(), form_control::type, and textarea_setup::width.

Referenced by box_input_text().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ box_textarea_keypress()

nserror box_textarea_keypress ( struct html_content html,
struct box box,
uint32_t  key 
)

Handle form textarea keypress input.

Parameters
htmlhtml content object
boxbox with textarea widget
keykeypress
Returns
NSERROR_OK iff keypress handled

Definition at line 43 of file box_textarea.c.

References form_control::box, html_content::bw, content_get_url(), form_control::data, form_control::form, form_submit(), box::gadget, GADGET_PASSWORD, GADGET_TEXTAREA, GADGET_TEXTBOX, form_control::next, NS_KEY_CR, NS_KEY_NL, NS_KEY_SHIFT_TAB, NS_KEY_TAB, NSERROR_INVALID, NSERROR_OK, form_control::prev, form_control::ta, textarea_keypress(), textarea_set_caret(), and form_control::type.

Referenced by html_keypress().

Here is the call graph for this function:
Here is the caller graph for this function: