2010-11-06 10:25:16 +00:00
|
|
|
#ifndef MWGUI_WINDOW_BASE_H
|
|
|
|
#define MWGUI_WINDOW_BASE_H
|
|
|
|
|
|
|
|
#include <openengine/gui/layout.hpp>
|
|
|
|
|
2012-08-12 16:11:09 +00:00
|
|
|
namespace MWBase
|
|
|
|
{
|
|
|
|
class WindowManager;
|
|
|
|
}
|
|
|
|
|
2010-11-06 10:25:16 +00:00
|
|
|
namespace MWGui
|
|
|
|
{
|
2011-02-21 19:36:35 +00:00
|
|
|
class WindowManager;
|
|
|
|
|
2010-11-06 10:25:16 +00:00
|
|
|
class WindowBase: public OEngine::GUI::Layout
|
|
|
|
{
|
|
|
|
public:
|
2012-08-12 16:11:09 +00:00
|
|
|
WindowBase(const std::string& parLayout, MWBase::WindowManager& parWindowManager);
|
2010-11-06 10:25:16 +00:00
|
|
|
|
2011-02-21 21:33:29 +00:00
|
|
|
// Events
|
2012-03-21 12:27:08 +00:00
|
|
|
typedef MyGUI::delegates::CMultiDelegate1<WindowBase*> EventHandle_WindowBase;
|
2011-02-21 21:33:29 +00:00
|
|
|
|
2010-11-06 10:25:16 +00:00
|
|
|
virtual void open();
|
2012-05-25 13:24:33 +00:00
|
|
|
virtual void setVisible(bool visible); // calls open() if visible is true and was false before
|
2010-11-06 10:25:16 +00:00
|
|
|
void center();
|
|
|
|
|
2011-02-21 21:33:29 +00:00
|
|
|
/** Event : Dialog finished, OK button clicked.\n
|
|
|
|
signature : void method()\n
|
|
|
|
*/
|
|
|
|
EventHandle_WindowBase eventDone;
|
|
|
|
|
2010-11-06 10:25:16 +00:00
|
|
|
protected:
|
2012-08-12 16:11:09 +00:00
|
|
|
/// \todo remove
|
|
|
|
MWBase::WindowManager& mWindowManager;
|
2010-11-06 10:25:16 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|