Linux multi-monitor fullscreen support
[ryzomcore.git] / ryzom / client / src / r2 / tool_choose_pos_lua.h
blob1a5b45bcf03a66a7cc613170baec2a8f57c3206c
1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
3 //
4 // This source file has been modified by the following contributors:
5 // Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com>
6 //
7 // This program is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU Affero General Public License as
9 // published by the Free Software Foundation, either version 3 of the
10 // License, or (at your option) any later version.
12 // This program is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU Affero General Public License for more details.
17 // You should have received a copy of the GNU Affero General Public License
18 // along with this program. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef R2_TOOL_CHOOSE_POS_LUA_H
21 #define R2_TOOL_CHOOSE_POS_LUA_H
23 #include "tool_choose_pos.h"
24 #include "nel/misc/vector.h"
25 #include "nel/gui/lua_object.h"
27 class CEntity;
29 namespace NLGUI
31 class CLuaObject;
34 namespace R2
37 /**
38 * Choose a position and forward the result to lua
40 class CToolChoosePosLua : public CToolChoosePos
42 public:
43 NLMISC_DECLARE_CLASS(R2::CToolChoosePosLua);
44 CToolChoosePosLua() { nlassert(0); }
45 CToolChoosePosLua(uint ghostSlot,
46 const CLuaObject &validFunc,
47 const CLuaObject &cancelFunc,
48 const std::string &toolName,
49 const std::string &cursValid = "curs_create.tga",
50 const std::string &cursInvalid = "curs_stop.tga",
51 const std::vector<NLMISC::CPolygon2D> &polyList = std::vector<NLMISC::CPolygon2D>(),
52 const CPrimLook &polyValidLook = CPrimLook(),
53 const CPrimLook &polyInvalidLook = CPrimLook()
55 virtual const char *getToolUIName() const { return _ToolName.c_str(); }
56 protected:
57 // from CToolChoosePos
58 virtual void commit(const NLMISC::CVector &createPosition, float createAngle);
59 virtual void cancel();
60 private:
61 CLuaObject _ValidFunc;
62 CLuaObject _CancelFunc;
63 bool _Commited;
64 std::string _ToolName;
70 } // R2
72 #endif