1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

BFU: Add comments in enum widget_type

I was trying to check which charset WIDGET_TEXT uses in the buffer but
had difficulty finding the code that handles key presses and updates
the buffer.  These comments should make that easier in the future.
This commit is contained in:
Kalle Olavi Niemitalo 2011-05-08 23:00:56 +03:00 committed by Kalle Olavi Niemitalo
parent dd608c500b
commit ad9c144e5c
2 changed files with 27 additions and 2 deletions

View File

@ -13,13 +13,36 @@ typedef enum {
/* Handler type for widgets. */
typedef widget_handler_status_T (widget_handler_T)(struct dialog_data *, struct widget_data *);
/* Type of widgets. */
/** Type of widget.
*
* Each type has a struct widget_ops that contains pointers to
* type-specific handler functions. For example, field_ops.kbd points
* to a function that handles keyboard events for WIDGET_FIELD. */
enum widget_type {
/** A check box or a radio button.
* @see checkbox_ops */
WIDGET_CHECKBOX,
/** A single-line input field.
* @see field_ops */
WIDGET_FIELD,
/** A single-line input field for a password.
* Like #WIDGET_FIELD but shows asterisks instead of the text.
* @see field_pass_ops */
WIDGET_FIELD_PASS,
/** A button that the user can push.
* @see button_ops */
WIDGET_BUTTON,
/** A list or tree of items.
* @see listbox_ops */
WIDGET_LISTBOX,
/** A block of text that the user cannot edit but may be able
* to scroll.
* @see text_ops */
WIDGET_TEXT,
};

View File

@ -61,7 +61,9 @@ struct widget_data {
* that points to the first element of an array. Each element
* in this array corresponds to one line of text, and is an
* unsigned char * that points to the first character of that
* line. The array has @widget_data.info.text.lines elements. */
* line. The array has @widget_data.info.text.lines elements.
*
* For WIDGET_LISTBOX: @cdata points to struct listbox_data. */
unsigned char *cdata;
struct box box;