Freeciv-3.1: /fast/freeciv/nightly/S3_1/client/gui-sdl2/widget_label.h File Reference

Freeciv-3.1

Loading...
Searching...
No Matches
Macros | Functions
widget_label.h File Reference

Go to the source code of this file.

## Macros

#define | create_iconlabel_from_chars(picon, pdest, chars, ptsize, flags) create_iconlabel(picon, pdest, create_utf8_from_char(chars, ptsize), flags)
#define | create_iconlabel_from_chars_fonto(picon, pdest, chars, fonto, flags) create_iconlabel(picon, pdest, create_utf8_from_char_fonto(chars, fonto), flags)
#define | create_active_iconlabel(buf, pdest, pstr, pstring, cb)

## Functions

struct widget * | create_themelabel (SDL_Surface *icon, struct gui_layer *pdest, utf8_str *pstr, Uint16 w, Uint16 h, Uint32 flags)
struct widget * | create_themelabel2 (SDL_Surface *icon, struct gui_layer *pdest, utf8_str *pstr, Uint16 w, Uint16 h, Uint32 flags)
struct widget * | create_iconlabel (SDL_Surface *icon, struct gui_layer *pdest, utf8_str *text, Uint32 flags)
struct widget * | convert_iconlabel_to_themeiconlabel2 (struct widget *icon_label)
int | draw_label (struct widget *label, Sint16 start_x, Sint16 start_y)
int | redraw_iconlabel (struct widget *label)
void | remake_label_size (struct widget *label)

## Macro Definition Documentation

## ◆ create_active_iconlabel

#define create_active_iconlabel | ( |  | buf,
|  |  | pdest,
|  |  | pstr,
|  |  | pstring,
|  |  | cb
| ) |  |

Value:
do { \
pstr = create_utf8_from_char(pstring, 10); \
pstr->style |= TTF_STYLE_BOLD; \
buf = create_iconlabel(NULL, pdest, pstr, \
(WF_RESTORE_BACKGROUND|WF_DRAW_TEXT_LABEL_WITH_SPACE)); \
buf->action = cb; \
} while (FALSE)
create_utf8_from_char
#define create_utf8_from_char(string_in, ptsize)
Definition gui_string.h:102
FALSE
#define FALSE
Definition support.h:47
WF_RESTORE_BACKGROUND
@ WF_RESTORE_BACKGROUND
Definition widget.h:85
WF_DRAW_TEXT_LABEL_WITH_SPACE
@ WF_DRAW_TEXT_LABEL_WITH_SPACE
Definition widget.h:87
create_iconlabel
struct widget * create_iconlabel(SDL_Surface *icon, struct gui_layer *pdest, utf8_str *text, Uint32 flags)
Definition widget_label.c:215

Definition at line 23 of file widget_label.h.

## ◆ create_iconlabel_from_chars

#define create_iconlabel_from_chars | ( |  | picon,
|  |  | pdest,
|  |  | chars,
|  |  | ptsize,
|  |  | flags
| ) |  | create_iconlabel(picon, pdest, create_utf8_from_char(chars, ptsize), flags)

Definition at line 17 of file widget_label.h.

## ◆ create_iconlabel_from_chars_fonto

#define create_iconlabel_from_chars_fonto | ( |  | picon,
|  |  | pdest,
|  |  | chars,
|  |  | fonto,
|  |  | flags
| ) |  | create_iconlabel(picon, pdest, create_utf8_from_char_fonto(chars, fonto), flags)

Definition at line 20 of file widget_label.h.

## Function Documentation

## ◆ convert_iconlabel_to_themeiconlabel2()

struct widget * convert_iconlabel_to_themeiconlabel2 | ( | struct widget * | icon_label | ) |

Make themeiconlabel2 widget out of iconlabel widget.

Definition at line 321 of file widget_label.c.

Referenced by popup_connection_dialog().

## ◆ create_iconlabel()

struct widget * create_iconlabel | ( | SDL_Surface * | icon,
|  | struct gui_layer * | pdest,
|  | utf8_str * | pstr,
|  | Uint32 | flags
| ) |  |

This Label is UTF8 string with Icon.

Definition at line 215 of file widget_label.c.

Referenced by add_global_worklist(), add_target_to_worklist(), create_tech_info(), create_textcheckbox(), economy_report_dialog_popup(), option_dialog_worklist(), popup_advanced_terrain_dialog(), popup_city_cma_dialog(), popup_connection_dialog(), popup_find_dialog(), popup_impr_info(), popup_join_game_dialog(), popup_load_del_presets_dialog(), popup_load_game_dialog(), popup_new_user_passwd_dialog(), popup_newcity_dialog(), popup_players_nations_dialog(), popup_races_dialog(), popup_sabotage_dialog(), popup_spaceship_dialog(), popup_terrain_info_dialog(), popup_unit_info(), popup_user_passwd_dialog(), popup_worklist_editor(), real_activeunits_report_dialog_update(), real_info_city_report_dialog_update(), real_meswin_dialog_update(), rebuild_imprm_list(), sell_imprvm_dlg_callback(), set_global_worklist(), show_game_page(), units_orders_city_dlg_callback(), update_clauses_list(), update_diplomacy_dialog(), and update_goto_dialog().

## ◆ create_themelabel()

struct widget * create_themelabel | ( | SDL_Surface * | icon,
|  | struct gui_layer * | pdest,
|  | utf8_str * | pstr,
|  | Uint16 | w,
|  | Uint16 | h,
|  | Uint32 | flags
| ) |  |

Theme label is utf8_str with Background ( icon ).

Definition at line 180 of file widget_label.c.

Referenced by real_city_dialog_popup().

## ◆ create_themelabel2()

struct widget * create_themelabel2 | ( | SDL_Surface * | icon,
|  | struct gui_layer * | pdest,
|  | utf8_str * | pstr,
|  | Uint16 | w,
|  | Uint16 | h,
|  | Uint32 | flags
| ) |  |

Theme label is UTF8 string with Background ( icon ).

Definition at line 241 of file widget_label.c.

Referenced by add_to_chat_list(), popup_conn_list_dialog(), and real_conn_list_dialog_update().

## ◆ draw_label()

int draw_label | ( | struct widget * | label,
|  | Sint16 | start_x,
|  | Sint16 | start_y
| ) |  |

Draw the label widget.

Definition at line 575 of file widget_label.c.

## ◆ redraw_iconlabel()

int redraw_iconlabel | ( | struct widget * | label | ) |

Blit iconlabel gfx to surface its on.

Definition at line 436 of file widget_label.c.

## ◆ remake_label_size()

void remake_label_size | ( | struct widget * | label | ) |

Calculate new size for a label.

Definition at line 118 of file widget_label.c.

Referenced by change_nation_label(), create_iconlabel(), create_themelabel(), create_themelabel2(), option_widget_new(), real_economy_report_dialog_update(), refresh_production_label(), and refresh_worklist_count_label().