Files
@ r10437:764a98dacf78
Branch filter:
Location: cpp/openttd-patchpack/source/src/querystring_gui.h - annotation
r10437:764a98dacf78
1.7 KiB
text/x-c
(svn r14691) -Update: WebTranslator2 update to 2008-12-18 18:47:25
arabic_egypt - 132 fixed, 1 changed by khaloofah (133)
czech - 10 fixed, 25 changed by Hadez (35)
esperanto - 15 fixed by Athaba (15)
greek - 7 fixed by ouranogrammi (7)
indonesian - 88 changed by fanioz (88)
latvian - 117 fixed, 16 changed by peerer (83), marismols (50)
lithuanian - 15 fixed by Zogg (15)
malay - 38 fixed by tombakemas (5), Syed (33)
serbian - 39 fixed, 1 changed by Jenraux (40)
thai - 105 fixed by vetbook (105)
arabic_egypt - 132 fixed, 1 changed by khaloofah (133)
czech - 10 fixed, 25 changed by Hadez (35)
esperanto - 15 fixed by Athaba (15)
greek - 7 fixed by ouranogrammi (7)
indonesian - 88 changed by fanioz (88)
latvian - 117 fixed, 16 changed by peerer (83), marismols (50)
lithuanian - 15 fixed by Zogg (15)
malay - 38 fixed by tombakemas (5), Syed (33)
serbian - 39 fixed, 1 changed by Jenraux (40)
thai - 105 fixed by vetbook (105)
r9179:660680ae613d r9179:660680ae613d r9179:660680ae613d r9179:660680ae613d r9179:660680ae613d r9179:660680ae613d r9179:660680ae613d r9179:660680ae613d r9179:660680ae613d r9179:660680ae613d r9897:9cbe1cc406a0 r10295:c0e73453a31c r10295:c0e73453a31c r10295:c0e73453a31c r10295:c0e73453a31c r10295:c0e73453a31c r10295:c0e73453a31c r10295:c0e73453a31c r10295:c0e73453a31c r10295:c0e73453a31c r10295:c0e73453a31c r9897:9cbe1cc406a0 r9897:9cbe1cc406a0 r9179:660680ae613d r9179:660680ae613d r9179:660680ae613d r9179:660680ae613d r9179:660680ae613d r9179:660680ae613d r9179:660680ae613d r9897:9cbe1cc406a0 r9897:9cbe1cc406a0 r9897:9cbe1cc406a0 r9897:9cbe1cc406a0 r9897:9cbe1cc406a0 r9897:9cbe1cc406a0 r9897:9cbe1cc406a0 r9897:9cbe1cc406a0 r9897:9cbe1cc406a0 r9897:9cbe1cc406a0 r9897:9cbe1cc406a0 r9897:9cbe1cc406a0 r9897:9cbe1cc406a0 r9897:9cbe1cc406a0 r9897:9cbe1cc406a0 r9179:660680ae613d r9179:660680ae613d r10295:c0e73453a31c r9179:660680ae613d r9179:660680ae613d r9179:660680ae613d r9897:9cbe1cc406a0 r9897:9cbe1cc406a0 r10276:22abdd1aa57a r9179:660680ae613d r9916:dfe4035b061f r9179:660680ae613d r10276:22abdd1aa57a r9897:9cbe1cc406a0 r9897:9cbe1cc406a0 r9897:9cbe1cc406a0 r9897:9cbe1cc406a0 r9897:9cbe1cc406a0 r9897:9cbe1cc406a0 r9179:660680ae613d r9179:660680ae613d r9179:660680ae613d r9179:660680ae613d r9285:acbf930223e4 r9179:660680ae613d r9179:660680ae613d r9179:660680ae613d r9179:660680ae613d r9179:660680ae613d | /* $Id$ */
/** @file querystring_gui.h Base for the GUIs that have an edit box in them. */
#ifndef QUERYSTRING_GUI_H
#define QUERYSTRING_GUI_H
#include "textbuf_gui.h"
#include "window_gui.h"
/**
* Return values for HandleEditBoxKey
*/
enum HandleEditBoxResult
{
HEBR_EDITING = 0, // Other key pressed.
HEBR_CONFIRM, // Return or enter key pressed.
HEBR_CANCEL, // Escape key pressed.
};
/**
* Data stored about a string that can be modified in the GUI
*/
struct QueryString {
StringID caption;
Textbuf text;
const char *orig;
CharSetFilter afilter;
bool handled;
/**
* Make sure everything gets initialized properly.
*/
QueryString() : orig(NULL)
{
}
/**
* Make sure everything gets freed.
*/
~QueryString()
{
free((void*)this->orig);
}
void DrawEditBox(Window *w, int wid);
void HandleEditBox(Window *w, int wid);
HandleEditBoxResult HandleEditBoxKey(Window *w, int wid, uint16 key, uint16 keycode, Window::EventState &state);
};
struct QueryStringBaseWindow : public Window, public QueryString {
char *edit_str_buf;
char *orig_str_buf;
const uint16 edit_str_size; ///< maximum length of string (in bytes), including terminating '\0'
QueryStringBaseWindow(uint16 size, const WindowDesc *desc, WindowNumber window_number = 0) : Window(desc, window_number), edit_str_size(size)
{
assert(size != 0);
this->edit_str_buf = CallocT<char>(size);
}
~QueryStringBaseWindow()
{
free(this->edit_str_buf);
}
void DrawEditBox(int wid);
void HandleEditBox(int wid);
int HandleEditBoxKey(int wid, uint16 key, uint16 keycode, EventState &state);
};
void ShowOnScreenKeyboard(QueryStringBaseWindow *parent, int button, int cancel, int ok);
#endif /* QUERYSTRING_GUI_H */
|