2009-10-03 20:49:18 +00:00
|
|
|
/* ScummVM - Graphic Adventure Engine
|
|
|
|
*
|
|
|
|
* ScummVM is the legal property of its developers, whose names
|
|
|
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
|
|
|
* file distributed with this source distribution.
|
|
|
|
*
|
|
|
|
* This program 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; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
* This program 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. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*
|
|
|
|
* $URL$
|
|
|
|
* $Id$
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2009-10-04 20:01:21 +00:00
|
|
|
#ifndef SCI_GUI_WINDOWMGR_H
|
|
|
|
#define SCI_GUI_WINDOWMGR_H
|
|
|
|
|
2009-10-04 18:51:01 +00:00
|
|
|
#include "common/list.h"
|
2009-10-04 21:27:24 +00:00
|
|
|
#include "common/array.h"
|
2009-10-03 20:49:18 +00:00
|
|
|
|
|
|
|
namespace Sci {
|
|
|
|
|
2009-10-05 07:10:01 +00:00
|
|
|
class SciGuiWindowMgr {
|
2009-10-03 20:49:18 +00:00
|
|
|
public:
|
2009-10-13 15:28:27 +00:00
|
|
|
SciGuiWindowMgr(SciGuiScreen *screen, SciGuiGfx *gfx, SciGuiAnimate *animate);
|
2009-10-05 07:10:01 +00:00
|
|
|
~SciGuiWindowMgr();
|
2009-10-03 20:49:18 +00:00
|
|
|
|
2009-10-05 07:10:01 +00:00
|
|
|
int16 isFrontWindow(GuiWindow *wnd);
|
|
|
|
void BeginUpdate(GuiWindow *wnd);
|
|
|
|
void EndUpdate(GuiWindow *wnd);
|
2009-10-09 10:49:03 +00:00
|
|
|
GuiWindow *NewWindow(const Common::Rect &dims, const Common::Rect *restoreRect, const char *title, uint16 style, int16 priority, bool draw);
|
2009-10-05 07:10:01 +00:00
|
|
|
void DrawWindow(GuiWindow *wnd);
|
|
|
|
void DisposeWindow(GuiWindow *pWnd, int16 arg2);
|
|
|
|
void UpdateWindow(GuiWindow *wnd);
|
2009-10-04 16:41:53 +00:00
|
|
|
|
2009-10-05 07:10:01 +00:00
|
|
|
GuiPort *getPortById(uint16 id) const { return _windowsById[id]; }
|
2009-10-04 21:27:24 +00:00
|
|
|
|
2009-10-05 07:10:01 +00:00
|
|
|
GuiPort *_wmgrPort;
|
|
|
|
GuiWindow *_picWind;
|
2009-10-03 20:49:18 +00:00
|
|
|
|
|
|
|
private:
|
2009-10-05 07:10:01 +00:00
|
|
|
typedef Common::List<GuiPort *> PortList;
|
2009-10-04 21:27:24 +00:00
|
|
|
|
2009-10-08 20:51:49 +00:00
|
|
|
SciGuiScreen *_screen;
|
2009-10-05 07:10:01 +00:00
|
|
|
SciGuiGfx *_gfx;
|
2009-10-13 15:28:27 +00:00
|
|
|
SciGuiAnimate *_animate;
|
2009-10-03 20:49:18 +00:00
|
|
|
|
2009-10-04 21:27:24 +00:00
|
|
|
/** The list of open 'windows' (and ports), in visual order. */
|
|
|
|
PortList _windowList;
|
|
|
|
|
|
|
|
/** The list of all open 'windows' (and ports), ordered by their id. */
|
2009-10-05 07:10:01 +00:00
|
|
|
Common::Array<GuiPort *> _windowsById;
|
2009-10-03 20:49:18 +00:00
|
|
|
};
|
|
|
|
|
2009-10-04 21:26:33 +00:00
|
|
|
} // End of namespace Sci
|
2009-10-04 20:01:21 +00:00
|
|
|
|
|
|
|
#endif
|