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
34 Uint32 flags);
36 utf8_str *pstr, Uint16 w, Uint16 h, Uint32 flags);
38 utf8_str *text, Uint32 flags);
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 */
char * incite_cost
Definition comments.c:76
void remake_label_size(struct widget *label)
struct widget * create_iconlabel(SDL_Surface *icon, struct gui_layer *pdest, utf8_str *text, Uint32 flags)
int redraw_iconlabel(struct widget *label)
struct widget * convert_iconlabel_to_themeiconlabel2(struct widget *icon_label)
struct widget * create_themelabel(SDL_Surface *icon, struct gui_layer *pdest, utf8_str *pstr, Uint16 w, Uint16 h, Uint32 flags)
int draw_label(struct widget *label, Sint16 start_x, Sint16 start_y)
struct widget * create_themelabel2(SDL_Surface *icon, struct gui_layer *pdest, utf8_str *pstr, Uint16 w, Uint16 h, Uint32 flags)