1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 #ifndef CL_ACTION_HANDLER_ITEM_H
18 #define CL_ACTION_HANDLER_ITEM_H
20 #include "inventory_manager.h"
22 class CInterfaceItemEdition
25 class CItemEditionWindow
: public IItemInfoWaiter
28 ~CItemEditionWindow() { _CurrItemSheet
= NULL
; }
29 // start that page (display and setup ui)
31 // end that page (hide and deactivate ui)
33 // update function : it is called at each frame.
38 CItemEditionWindow() : _CurrItemSheet(NULL
) {}
39 // If the window is in Edition or Display mode
41 // The window to modify
42 std::string WindowName
;
43 // The item used to open this window
44 CDBCtrlSheet
*_CurrItemSheet
;
49 ~CInterfaceItemEdition() {}
51 // Get the unique instance of that class
52 static CInterfaceItemEdition
*getInstance();
54 static void releaseInstance();
55 // Update the current page. Should be called at each frame
57 // Validate the current page. send Message to server
59 // Get current setupped page, or NULL if none
60 CItemEditionWindow
getCurrWindow() const { return _CurrWindow
; }
61 // Set the current page to display. Any previous page is hidden. Passing NULL just close all windows.
62 void setCurrWindow(CDBCtrlSheet
* ctrlSheet
, const std::string
&windowName
= "", const bool &isInEditionMode
= false);
66 CInterfaceItemEdition() {}
68 //Manage only one CItemWindow could be changed to a vector
69 CItemEditionWindow _CurrWindow
;
70 static CInterfaceItemEdition
*_Instance
;