Freeciv-3.3: /fast/freeciv/nightly/main/client/gui-sdl2/widget_label.h Source File

Freeciv-3.3

Loading...
Searching...
No Matches
widget_label.h
Go to the documentation of this file.
1/***********************************************************************
2 Freeciv - Copyright (C) 2006 - The Freeciv Project
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12***********************************************************************/
13
14#ifndef FC__WIDGET_LABEL_H
15#define FC__WIDGET_LABEL_H
16
17#define create_iconlabel_from_chars(picon, pdest, chars, ptsize, flags) \
18 create_iconlabel(picon, pdest, create_utf8_from_char(chars, ptsize), flags)
19
20#define create_iconlabel_from_chars_fonto(picon, pdest, chars, fonto, flags) \
21 create_iconlabel(picon, pdest, create_utf8_from_char_fonto(chars, fonto), flags)
22
23#define create_active_iconlabel(buf, pdest, pstr, pstring, cb) \
24do { \
25 pstr = create_utf8_from_char(pstring, 10); \
26 pstr->style |= TTF_STYLE_BOLD; \
27 buf = create_iconlabel(NULL, pdest, pstr, \
28 (WF_RESTORE_BACKGROUND|WF_DRAW_TEXT_LABEL_WITH_SPACE)); \
29 buf->action = cb; \
30} while (FALSE)
31
32struct widget *create_themelabel(SDL_Surface *icon, struct gui_layer *pdest,
33 utf8_str *pstr, Uint16 w, Uint16 h,
34 Uint32 flags);
35struct widget *create_themelabel2(SDL_Surface *icon, struct gui_layer *pdest,
36 utf8_str *pstr, Uint16 w, Uint16 h, Uint32 flags);
37struct widget *create_iconlabel(SDL_Surface *icon, struct gui_layer *pdest,
38 utf8_str *text, Uint32 flags);
39struct widget *convert_iconlabel_to_themeiconlabel2(struct widget *icon_label);
40int draw_label(struct widget *label, Sint16 start_x, Sint16 start_y);
41
42int redraw_iconlabel(struct widget *label);
43void remake_label_size(struct widget *label);
44
45#endif /* FC__WIDGET_LABEL_H */
incite_cost
char * incite_cost
Definition comments.c:74
remake_label_size
void remake_label_size(struct widget *label)
Definition widget_label.c:118
create_iconlabel
struct widget * create_iconlabel(SDL_Surface *icon, struct gui_layer *pdest, utf8_str *text, Uint32 flags)
Definition widget_label.c:215
redraw_iconlabel
int redraw_iconlabel(struct widget *label)
Definition widget_label.c:436
convert_iconlabel_to_themeiconlabel2
struct widget * convert_iconlabel_to_themeiconlabel2(struct widget *icon_label)
Definition widget_label.c:321
create_themelabel
struct widget * create_themelabel(SDL_Surface *icon, struct gui_layer *pdest, utf8_str *pstr, Uint16 w, Uint16 h, Uint32 flags)
Definition widget_label.c:180
draw_label
int draw_label(struct widget *label, Sint16 start_x, Sint16 start_y)
Definition widget_label.c:575
create_themelabel2
struct widget * create_themelabel2(SDL_Surface *icon, struct gui_layer *pdest, utf8_str *pstr, Uint16 w, Uint16 h, Uint32 flags)
Definition widget_label.c:241
gui_layer
Definition graphics.h:227
utf8_str
Definition gui_string.h:52
widget
Definition widget.h:112