ELinks 0.18.0
button.c File Reference
#include <string.h>
#include "elinks.h"
#include "bfu/button.h"
#include "bfu/dialog.h"
#include "intl/libintl.h"
#include "terminal/draw.h"
#include "terminal/mouse.h"
#include "terminal/terminal.h"
#include "util/align.h"
Include dependency graph for button.c:

Macros

#define BUTTON_HEIGHT   1
 
#define BUTTON_VSPACING   1
 
#define BUTTON_HSPACING   2
 
#define BUTTON_LEFT   "[ "
 
#define BUTTON_RIGHT   " ]"
 
#define BUTTON_LEFT_LEN   (sizeof(BUTTON_LEFT) - 1)
 
#define BUTTON_RIGHT_LEN   (sizeof(BUTTON_RIGHT) - 1)
 
#define BUTTON_LR_LEN   (BUTTON_LEFT_LEN + BUTTON_RIGHT_LEN)
 

Functions

void add_dlg_button_do (struct dialog *dlg, char *text, int flags, widget_handler_T *handler, void *data, done_handler_T *done, void *done_data)
 
static void buttons_width (struct widget_data *widget_data, int n, int *minwidth, int *maxwidth, int utf8)
 
void dlg_format_buttons (struct dialog_data *dlg_data, struct widget_data *widget_data, int n, int x, int *y, int w, int *rw, format_align_T align, int format_only)
 
static widget_handler_status_T display_button (struct dialog_data *dlg_data, struct widget_data *widget_data)
 
static widget_handler_status_T mouse_button (struct dialog_data *dlg_data, struct widget_data *widget_data)
 
static widget_handler_status_T select_button (struct dialog_data *dlg_data, struct widget_data *widget_data)
 

Variables

const struct widget_ops button_ops
 

Macro Definition Documentation

◆ BUTTON_HEIGHT

#define BUTTON_HEIGHT   1

◆ BUTTON_HSPACING

#define BUTTON_HSPACING   2

◆ BUTTON_LEFT

#define BUTTON_LEFT   "[ "

◆ BUTTON_LEFT_LEN

#define BUTTON_LEFT_LEN   (sizeof(BUTTON_LEFT) - 1)

◆ BUTTON_LR_LEN

#define BUTTON_LR_LEN   (BUTTON_LEFT_LEN + BUTTON_RIGHT_LEN)

◆ BUTTON_RIGHT

#define BUTTON_RIGHT   " ]"

◆ BUTTON_RIGHT_LEN

#define BUTTON_RIGHT_LEN   (sizeof(BUTTON_RIGHT) - 1)

◆ BUTTON_VSPACING

#define BUTTON_VSPACING   1

Function Documentation

◆ add_dlg_button_do()

void add_dlg_button_do ( struct dialog * dlg,
char * text,
int flags,
widget_handler_T * handler,
void * data,
done_handler_T * done,
void * done_data )

◆ buttons_width()

static void buttons_width ( struct widget_data * widget_data,
int n,
int * minwidth,
int * maxwidth,
int utf8 )
static

◆ display_button()

static widget_handler_status_T display_button ( struct dialog_data * dlg_data,
struct widget_data * widget_data )
static

◆ dlg_format_buttons()

void dlg_format_buttons ( struct dialog_data * dlg_data,
struct widget_data * widget_data,
int n,
int x,
int * y,
int w,
int * rw,
format_align_T align,
int format_only )

◆ mouse_button()

static widget_handler_status_T mouse_button ( struct dialog_data * dlg_data,
struct widget_data * widget_data )
static

◆ select_button()

static widget_handler_status_T select_button ( struct dialog_data * dlg_data,
struct widget_data * widget_data )
static

Variable Documentation

◆ button_ops

const struct widget_ops button_ops
Initial value:
= {
}
static widget_handler_status_T display_button(struct dialog_data *dlg_data, struct widget_data *widget_data)
Definition button.c:184
static widget_handler_status_T mouse_button(struct dialog_data *dlg_data, struct widget_data *widget_data)
Definition button.c:311
static widget_handler_status_T select_button(struct dialog_data *dlg_data, struct widget_data *widget_data)
Definition button.c:333
#define NULL
Definition explodename.c:35