Changeset - r19779:721c0094fe5a
[Not reviewed]
master
0 12 0
frosch - 12 years ago 2012-11-13 21:47:07
frosch@openttd.org
(svn r24734) -Codechange: Move QueryStringBaseWindow::OnOSKInput to Window::OnEditboxChanged.
12 files changed with 17 insertions and 18 deletions:
0 comments (0 inline, 0 general)
src/ai/ai_gui.cpp
Show inline comments
 
@@ -1354,7 +1354,7 @@ struct AIDebugWindow : public QueryStrin
 
		return state;
 
	}
 

	
 
	virtual void OnOSKInput(int wid)
 
	virtual void OnEditboxChanged(int wid)
 
	{
 
		if (wid == WID_AID_BREAK_STR_EDIT_BOX) {
 
			/* Save the current string to static member so it can be restored next time the window is opened. */
src/genworld_gui.cpp
Show inline comments
 
@@ -694,7 +694,7 @@ struct GenerateLandscapeWindow : public 
 
		}
 
	}
 

	
 
	virtual void OnOSKInput(int wid)
 
	virtual void OnEditboxChanged(int wid)
 
	{
 
		if (wid == WID_GL_RANDOM_EDITBOX) {
 
			/* the seed is unsigned, therefore atoi cannot be used.
src/misc_gui.cpp
Show inline comments
 
@@ -816,7 +816,7 @@ EventState QueryStringBaseWindow::Handle
 
	EventState state = ES_NOT_HANDLED;
 
	switch (this->QueryString::HandleEditBoxKey(this, wid, key, keycode, state)) {
 
		case HEBR_EDITING:
 
			this->OnOSKInput(wid);
 
			this->OnEditboxChanged(wid);
 
			break;
 

	
 
		case HEBR_CONFIRM:
src/network/network_chat_gui.cpp
Show inline comments
 
@@ -514,7 +514,7 @@ struct NetworkChatWindow : public QueryS
 
		return state;
 
	}
 

	
 
	virtual void OnOSKInput(int wid)
 
	virtual void OnEditboxChanged(int wid)
 
	{
 
		_chat_tab_completion_active = false;
 
	}
src/network/network_content_gui.cpp
Show inline comments
 
@@ -779,7 +779,7 @@ public:
 
		return ES_HANDLED;
 
	}
 

	
 
	virtual void OnOSKInput(int wid)
 
	virtual void OnEditboxChanged(int wid)
 
	{
 
		if (wid == WID_NCL_FILTER) {
 
			this->string_filter.SetFilterTerm(this->edit_str_buf);
src/network/network_gui.cpp
Show inline comments
 
@@ -847,7 +847,7 @@ public:
 
		return state;
 
	}
 

	
 
	virtual void OnOSKInput(int wid)
 
	virtual void OnEditboxChanged(int wid)
 
	{
 
		if (wid == WID_NG_CLIENT) {
 
			/* The name is only allowed when it starts with a letter! */
 
@@ -1170,7 +1170,7 @@ struct NetworkStartServerWindow : public
 
		this->SetDirty();
 
	}
 

	
 
	virtual void OnOSKInput(int wid)
 
	virtual void OnEditboxChanged(int wid)
 
	{
 
		if (wid == WID_NSS_GAMENAME) {
 
			strecpy(_settings_client.network.server_name, this->text.buf, lastof(_settings_client.network.server_name));
src/newgrf_gui.cpp
Show inline comments
 
@@ -1276,7 +1276,7 @@ struct NewGRFWindow : public QueryString
 
		return ES_HANDLED;
 
	}
 

	
 
	virtual void OnOSKInput(int wid)
 
	virtual void OnEditboxChanged(int wid)
 
	{
 
		if (!this->editable) return;
 

	
src/osk_gui.cpp
Show inline comments
 
@@ -203,8 +203,7 @@ struct OskWindow : public Window {
 

	
 
	void InvalidateParent()
 
	{
 
		QueryStringBaseWindow *w = dynamic_cast<QueryStringBaseWindow*>(this->parent);
 
		if (w != NULL) w->OnOSKInput(this->text_btn);
 
		this->parent->OnEditboxChanged(this->text_btn);
 

	
 
		this->SetWidgetDirty(WID_OSK_TEXT);
 
		if (this->parent != NULL) this->parent->SetWidgetDirty(this->text_btn);
src/querystring_gui.h
Show inline comments
 
@@ -79,12 +79,6 @@ struct QueryStringBaseWindow : public Wi
 
	}
 

	
 
	EventState HandleEditBoxKey(int wid, uint16 key, uint16 keycode);
 

	
 
	/**
 
	 * Callback for when on input has been entered with the OSK.
 
	 * @param wid The widget the OSK was attached to.
 
	 */
 
	virtual void OnOSKInput(int wid) {}
 
};
 

	
 
void ShowOnScreenKeyboard(QueryStringBaseWindow *parent, int button);
src/settings_gui.cpp
Show inline comments
 
@@ -2406,7 +2406,7 @@ struct GameSettingsWindow : QueryStringB
 
		this->SetWidgetDisabledState(WID_GS_COLLAPSE_ALL, all_folded);
 
	}
 

	
 
	virtual void OnOSKInput(int wid)
 
	virtual void OnEditboxChanged(int wid)
 
	{
 
		if (wid == WID_GS_FILTER) {
 
			string_filter.SetFilterTerm(this->edit_str_buf);
src/signs_gui.cpp
Show inline comments
 
@@ -315,7 +315,7 @@ struct SignListWindow : QueryStringBaseW
 
		return state;
 
	}
 

	
 
	virtual void OnOSKInput(int widget)
 
	virtual void OnEditboxChanged(int widget)
 
	{
 
		if (widget == WID_SIL_FILTER_TEXT) this->SetFilterString(this->text.buf);
 
	}
src/window_gui.h
Show inline comments
 
@@ -667,6 +667,12 @@ public:
 
	virtual void OnDropdownClose(Point pt, int widget, int index, bool instant_close);
 

	
 
	/**
 
	 * The text in an editbox has been edited.
 
	 * @param widget The widget of the editbox.
 
	 */
 
	virtual void OnEditboxChanged(int widget) {}
 

	
 
	/**
 
	 * The query window opened from this window has closed.
 
	 * @param str the new value of the string, NULL if the window
 
	 *            was cancelled or an empty string when the default
0 comments (0 inline, 0 general)