Freeciv-3.2
Loading...
Searching...
No Matches
Macros | Enumerations | Functions
widget_edit.h File Reference

Go to the source code of this file.

Macros

#define create_edit_from_chars(background, pdest, char_string, ptsize, length, flags)
 
#define create_edit_from_chars_fonto(background, pdest, char_string, fonto, length, flags)
 
#define edit(pedit)   edit_field(pedit)
 

Enumerations

enum  edit_return_codes { ED_RETURN = 1 , ED_ESC = 2 , ED_MOUSE = 3 , ED_FORCE_EXIT = 4 }
 

Functions

struct widgetcreate_edit (SDL_Surface *background, struct gui_layer *pdest, utf8_str *pstr, int length, Uint32 flags)
 
enum edit_return_codes edit_field (struct widget *edit_widget)
 
int draw_edit (struct widget *pedit, Sint16 start_x, Sint16 start_y)
 

Macro Definition Documentation

◆ create_edit_from_chars

#define create_edit_from_chars (   background,
  pdest,
  char_string,
  ptsize,
  length,
  flags 
)
Value:
create_edit(background, pdest, \
length, flags)
char * incite_cost
Definition comments.c:75
#define create_utf8_from_char(string_in, ptsize)
Definition gui_string.h:103
struct widget * create_edit(SDL_Surface *background, struct gui_layer *pdest, utf8_str *pstr, int length, Uint32 flags)

Definition at line 24 of file widget_edit.h.

◆ create_edit_from_chars_fonto

#define create_edit_from_chars_fonto (   background,
  pdest,
  char_string,
  fonto,
  length,
  flags 
)
Value:
create_edit(background, pdest, \
length, flags)
#define create_utf8_from_char_fonto(string_in, fonto)
Definition gui_string.h:108

Definition at line 29 of file widget_edit.h.

◆ edit

#define edit (   pedit)    edit_field(pedit)

Definition at line 34 of file widget_edit.h.

Enumeration Type Documentation

◆ edit_return_codes

Enumerator
ED_RETURN 
ED_ESC 
ED_MOUSE 
ED_FORCE_EXIT 

Definition at line 17 of file widget_edit.h.

Function Documentation

◆ create_edit()

struct widget * create_edit ( SDL_Surface background,
struct gui_layer pdest,
utf8_str pstr,
int  length,
Uint32  flags 
)

Create ( malloc ) Edit Widget structure.

Edit Theme graphic is taken from current_theme->Edit surface; Text is taken from 'pstr'.

'length' parameter determinate width of Edit rect.

This function determinate future size of Edit ( width, height ) and save this in: pwidget->size rectangle ( SDL_Rect )

function return pointer to allocated Edit Widget.

Definition at line 350 of file widget_edit.c.

◆ draw_edit()

int draw_edit ( struct widget pedit,
Sint16  start_x,
Sint16  start_y 
)

set new x, y position and redraw edit.

Definition at line 392 of file widget_edit.c.

◆ edit_field()

enum edit_return_codes edit_field ( struct widget edit_widget)

Handle active edit. Returns what should happen to the edit next.

Definition at line 681 of file widget_edit.c.