# window_func.h

Go to the documentation of this file.

    00001 /* $Id: window_func.h 18331 2009-11-29 00:41:08Z rubidium $ */
    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
    00018 Window *FindWindowById(WindowClass cls, WindowNumber number);
    00019 Window *FindWindowByClass(WindowClass cls);
    00020 void ChangeWindowOwner(Owner old_owner, Owner new_owner);
    00021
    00022 void ResizeWindow(Window *w, int x, int y);
    00023 int PositionMainToolbar(Window *w);
    00024
    00025 int GetMainViewTop();
    00026 int GetMainViewBottom();
    00027
    00028 void InitWindowSystem();
    00029 void UnInitWindowSystem();
    00030 void ResetWindowSystem();
    00031 void SetupColoursAndInitialWindow();
    00032 void InputLoop();
    00033
    00034 void InvalidateWindowData(WindowClass cls, WindowNumber number, int data = 0);
    00035 void InvalidateWindowClassesData(WindowClass cls, int data = 0);
    00036
    00037 void DeleteNonVitalWindows();
    00038 void DeleteAllNonVitalWindows();
    00039 void DeleteConstructionWindows();
    00040 void HideVitalWindows();
    00041 void ShowVitalWindows();
    00042
    00043 void ReInitAllWindows();
    00044
    00045 void SetWindowWidgetDirty(WindowClass cls, WindowNumber number, byte widget_index);
    00046 void SetWindowDirty(WindowClass cls, WindowNumber number);
    00047 void SetWindowClassesDirty(WindowClass cls);
    00048
    00049 void DeleteWindowById(WindowClass cls, WindowNumber number, bool force = true);
    00050 void DeleteWindowByClass(WindowClass cls);
    00051
    00052 #endif /* WINDOW_FUNC_H */