# window_func.h

Go to the documentation of this file.

    00001 /* $Id: window_func.h 25681 2013-08-05 20:37:14Z michi_cc $ */
    00002
    00003 /*
    00004  * This file is part of OpenTTD.
    00005  * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
    00006  * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    00007  * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
    00008  */
    00009
    00012 #ifndef WINDOW_FUNC_H
    00013 #define WINDOW_FUNC_H
    00014
    00015 #include "window_type.h"
    00016 #include "company_type.h"
    00017 #include "core/geometry_type.hpp"
    00018
    00019 Window *FindWindowById(WindowClass cls, WindowNumber number);
    00020 Window *FindWindowByClass(WindowClass cls);
    00021 void ChangeWindowOwner(Owner old_owner, Owner new_owner);
    00022
    00023 void ResizeWindow(Window *w, int x, int y, bool clamp_to_screen = true);
    00024 int PositionMainToolbar(Window *w);
    00025 int PositionStatusbar(Window *w);
    00026 int PositionNewsMessage(Window *w);
    00027 int PositionNetworkChatWindow(Window *w);
    00028
    00029 int GetMainViewTop();
    00030 int GetMainViewBottom();
    00031
    00032 void InitWindowSystem();
    00033 void UnInitWindowSystem();
    00034 void ResetWindowSystem();
    00035 void SetupColoursAndInitialWindow();
    00036 void InputLoop();
    00037
    00038 void InvalidateWindowData(WindowClass cls, WindowNumber number, int data = 0, bool gui_scope = false);
    00039 void InvalidateWindowClassesData(WindowClass cls, int data = 0, bool gui_scope = false);
    00040
    00041 void DeleteNonVitalWindows();
    00042 void DeleteAllNonVitalWindows();
    00043 void DeleteConstructionWindows();
    00044 void HideVitalWindows();
    00045 void ShowVitalWindows();
    00046
    00047 void ReInitAllWindows();
    00048
    00049 void SetWindowWidgetDirty(WindowClass cls, WindowNumber number, byte widget_index);
    00050 void SetWindowDirty(WindowClass cls, WindowNumber number);
    00051 void SetWindowClassesDirty(WindowClass cls);
    00052
    00053 void DeleteWindowById(WindowClass cls, WindowNumber number, bool force = true);
    00054 void DeleteWindowByClass(WindowClass cls);
    00055
    00056 bool EditBoxInGlobalFocus();
    00057 Point GetCaretPosition();
    00058
    00059 #endif /* WINDOW_FUNC_H */