2009-06-01 02:59:15 +00:00
|
|
|
/* ASE - Allegro Sprite Editor
|
2011-01-20 21:32:31 +00:00
|
|
|
* Copyright (C) 2001-2011 David Capello
|
2009-06-01 02:59:15 +00:00
|
|
|
*
|
|
|
|
* 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*/
|
|
|
|
|
2009-08-17 21:38:00 +00:00
|
|
|
#ifndef UI_CONTEXT_H_INCLUDED
|
|
|
|
#define UI_CONTEXT_H_INCLUDED
|
2009-06-01 02:59:15 +00:00
|
|
|
|
2009-08-09 21:24:32 +00:00
|
|
|
#include "context.h"
|
2009-06-01 02:59:15 +00:00
|
|
|
|
|
|
|
class UIContext : public Context
|
|
|
|
{
|
2009-10-09 01:34:06 +00:00
|
|
|
public:
|
|
|
|
static UIContext* instance() { return m_instance; }
|
2009-06-01 02:59:15 +00:00
|
|
|
|
|
|
|
UIContext();
|
|
|
|
virtual ~UIContext();
|
|
|
|
|
2011-01-20 22:58:11 +00:00
|
|
|
virtual bool isUiAvailable() const { return true; }
|
2009-06-11 15:11:11 +00:00
|
|
|
|
2009-06-01 02:59:15 +00:00
|
|
|
protected:
|
2011-03-23 00:11:25 +00:00
|
|
|
virtual void onAddDocument(Document* document);
|
|
|
|
virtual void onRemoveDocument(Document* document);
|
|
|
|
virtual void onSetActiveDocument(Document* document);
|
2009-06-01 02:59:15 +00:00
|
|
|
|
2010-04-10 19:56:26 +00:00
|
|
|
private:
|
|
|
|
static UIContext* m_instance;
|
|
|
|
|
2009-06-01 02:59:15 +00:00
|
|
|
};
|
|
|
|
|
2009-08-17 21:38:00 +00:00
|
|
|
#endif
|