Files
@ r9964:c2a3e9be6d4b
Branch filter:
Location: cpp/openttd-patchpack/source/src/querystring_gui.h - annotation
r9964:c2a3e9be6d4b
1.4 KiB
text/x-c
(svn r14119) -Fix(r14104): Forgot to make the gui disappear when the waypoint is deleted. Smatz pointing
r9179:660680ae613d r9179:660680ae613d r9179:660680ae613d r9179:660680ae613d r9179:660680ae613d r9179:660680ae613d r9179:660680ae613d r9179:660680ae613d r9179:660680ae613d r9179:660680ae613d r9897:9cbe1cc406a0 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 r9285:acbf930223e4 r9179:660680ae613d r9179:660680ae613d r9179:660680ae613d r9897:9cbe1cc406a0 r9897:9cbe1cc406a0 r9916:dfe4035b061f r9179:660680ae613d r9916:dfe4035b061f r9179:660680ae613d 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"
/**
* 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);
int 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;
QueryStringBaseWindow(uint16 size, const WindowDesc *desc, WindowNumber window_number = 0) : Window(desc, window_number), edit_str_size(size)
{
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 */
|