ELinks 0.18.0
text.c File Reference
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include "elinks.h"
#include "bfu/dialog.h"
#include "bfu/text.h"
#include "config/kbdbind.h"
#include "intl/libintl.h"
#include "terminal/draw.h"
#include "terminal/mouse.h"
#include "terminal/terminal.h"
#include "util/color.h"
Include dependency graph for text.c:

Macros

#define is_unsplitable(pos)
#define LINES_GRANULARITY   0x7
#define realloc_lines(x, o, n)

Functions

void add_dlg_text (struct dialog *dlg, char *text, format_align_T align, int bottom_pad)
static int split_line (const char *text2, int max_width, int *cells, int utf8)
static char ** split_lines (struct widget_data *widget_data, int max_width, int utf8)
void dlg_format_text_do (struct dialog_data *dlg_data, const char *text, int x, int *y, int width, int *real_width, struct color_pair *color, format_align_T align, int format_only)
void dlg_format_text (struct dialog_data *dlg_data, struct widget_data *widget_data, int x, int *y, int width, int *real_width, int max_height, int format_only)
static widget_handler_status_T display_text (struct dialog_data *dlg_data, struct widget_data *widget_data)
static void format_and_display_text (struct widget_data *widget_data, struct dialog_data *dlg_data, int current)
static widget_handler_status_T kbd_text (struct dialog_data *dlg_data, struct widget_data *widget_data)
static widget_handler_status_T mouse_text (struct dialog_data *dlg_data, struct widget_data *widget_data)

Variables

const struct widget_ops text_ops

Macro Definition Documentation

◆ is_unsplitable

#define is_unsplitable ( pos)
Value:
(*(pos) && *(pos) != '\n' && !isspace((unsigned char)*(pos)))
#define isspace
Definition string.h:130

◆ LINES_GRANULARITY

#define LINES_GRANULARITY   0x7

◆ realloc_lines

#define realloc_lines ( x,
o,
n )
Value:
#define LINES_GRANULARITY
Definition text.c:152
int n
Definition general.c:868
#define mem_align_alloc(ptr, old, new_, mask)
Definition memory.h:148

Function Documentation

◆ add_dlg_text()

void add_dlg_text ( struct dialog * dlg,
char * text,
format_align_T align,
int bottom_pad )

◆ display_text()

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

◆ dlg_format_text()

void dlg_format_text ( struct dialog_data * dlg_data,
struct widget_data * widget_data,
int x,
int * y,
int width,
int * real_width,
int max_height,
int format_only )

◆ dlg_format_text_do()

void dlg_format_text_do ( struct dialog_data * dlg_data,
const char * text,
int x,
int * y,
int width,
int * real_width,
struct color_pair * color,
format_align_T align,
int format_only )

◆ format_and_display_text()

void format_and_display_text ( struct widget_data * widget_data,
struct dialog_data * dlg_data,
int current )
static

◆ kbd_text()

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

◆ mouse_text()

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

◆ split_line()

int split_line ( const char * text2,
int max_width,
int * cells,
int utf8 )
inlinestatic

◆ split_lines()

char ** split_lines ( struct widget_data * widget_data,
int max_width,
int utf8 )
static

Variable Documentation

◆ text_ops

const struct widget_ops text_ops
Initial value:
= {
}
static widget_handler_status_T display_text(struct dialog_data *dlg_data, struct widget_data *widget_data)
Definition text.c:357
static widget_handler_status_T mouse_text(struct dialog_data *dlg_data, struct widget_data *widget_data)
Definition text.c:482
static widget_handler_status_T kbd_text(struct dialog_data *dlg_data, struct widget_data *widget_data)
Definition text.c:442
#define NULL
Definition explodename.c:35