Added GPLv3 headers all over the place.
[fail.git] / src / gui / tool / Factory.h
blob476564d733072c27609546631c93fc615fd03ed7
1 /*
2 Fail game engine
3 Copyright 2007 Antoine Chavasse <a.chavasse@gmail.com>
5 This file is part of Fail.
7 Fail is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License version 3
9 as published by the Free Software Foundation.
11 Fail is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef FAIL_GUI_TOOL_FACTORY_H_
20 #define FAIL_GUI_TOOL_FACTORY_H_
22 #include "core/core.h"
23 #include "gui/tool/guitool_export.h"
24 #include "gui/Factory_i.h"
26 namespace fail { namespace gui { namespace tool
28 class FLGUITOOL_EXPORT Factory : public Factory_i
30 public:
31 virtual Window_i* newWindow( Container_i* pParent_ );
32 virtual HGroup_i* newHGroup( Container_i* pParent_ );
33 virtual VGroup_i* newVGroup( Container_i* pParent_ );
34 virtual Button_i* newButton( Container_i* pParent_, const std::string& Label_ );
35 virtual RenderView_i* newRenderView( Container_i* pParent,
36 const Pointer< scenegraph::Renderable >& pRenderable,
37 const Pointer< scenegraph::ViewPort >& pViewPort );
39 static Pointer< Factory > GetInstance()
41 if( !ms_pInstance )
42 ms_pInstance = new Factory;
43 return ms_pInstance;
46 private:
47 static Pointer< Factory > ms_pInstance;
49 }}}
51 #endif