Freeciv-3.2: /fast/freeciv/nightly/S3_2/client/gui-sdl3/widget_edit.h Source File

Freeciv-3.2

Loading...
Searching...
No Matches
widget_edit.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_EDIT_H
15#define FC__WIDGET_EDIT_H
16
17 enum edit_return_codes {
18 ED_RETURN = 1,
19 ED_ESC = 2,
20 ED_MOUSE = 3,
21 ED_FORCE_EXIT = 4
22};
23
24#define create_edit_from_chars(background, pdest, char_string, ptsize, length, flags) \
25 create_edit(background, pdest, \
26 create_utf8_from_char(char_string, ptsize), \
27 length, flags)
28
29#define create_edit_from_chars_fonto(background, pdest, char_string, fonto, length, flags) \
30 create_edit(background, pdest, \
31 create_utf8_from_char_fonto(char_string, fonto), \
32 length, flags)
33
34#define edit(pedit) edit_field(pedit)
35
36struct widget *create_edit(SDL_Surface *background, struct gui_layer *pdest,
37 utf8_str *pstr, int length,
38 Uint32 flags);
39enum edit_return_codes edit_field(struct widget *edit_widget);
40int draw_edit(struct widget *pedit, Sint16 start_x, Sint16 start_y);
41
42#endif /* FC__WIDGET_EDIT_H */
incite_cost
char * incite_cost
Definition comments.c:74
create_edit
struct widget * create_edit(SDL_Surface *background, struct gui_layer *pdest, utf8_str *pstr, int length, Uint32 flags)
Definition widget_edit.c:350
edit_field
enum edit_return_codes edit_field(struct widget *edit_widget)
Definition widget_edit.c:681
edit_return_codes
edit_return_codes
Definition widget_edit.h:17
ED_FORCE_EXIT
@ ED_FORCE_EXIT
Definition widget_edit.h:21
ED_ESC
@ ED_ESC
Definition widget_edit.h:19
ED_RETURN
@ ED_RETURN
Definition widget_edit.h:18
ED_MOUSE
@ ED_MOUSE
Definition widget_edit.h:20
draw_edit
int draw_edit(struct widget *pedit, Sint16 start_x, Sint16 start_y)
Definition widget_edit.c:392
gui_layer
Definition graphics.h:227
utf8_str
Definition gui_string.h:52
widget
Definition widget.h:112