1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
4 // This source file has been modified by the following contributors:
5 // Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com>
6 // Copyright (C) 2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
8 // This program is free software: you can redistribute it and/or modify
9 // it under the terms of the GNU Affero General Public License as
10 // published by the Free Software Foundation, either version 3 of the
11 // License, or (at your option) any later version.
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU Affero General Public License for more details.
18 // You should have received a copy of the GNU Affero General Public License
19 // along with this program. If not, see <http://www.gnu.org/licenses/>.
23 #ifndef NL_ACTION_HANDLER_MISC_H
24 #define NL_ACTION_HANDLER_MISC_H
26 #include "nel/misc/types_nl.h"
27 #include "nel/gui/action_handler.h"
28 #include "interface_manager.h"
32 class CInterfaceGroup
;
36 // ***************************************************************************
38 * Show only one window and hide others
39 * \author Lionel Berenguier
40 * \author Nevrax France
43 class CActionHandlerShowOne
: public IActionHandler
46 virtual void execute (CCtrlBase
*pCaller
, const std::string
¶ms
);
50 // ***************************************************************************
52 * hide some windows and close some group containers
53 * \author Lionel Berenguier
54 * \author Nevrax France
57 class CActionHandlerHideClose
: public IActionHandler
60 virtual void execute (CCtrlBase
*pCaller
, const std::string
¶ms
);
64 // ***************************************************************************
66 * Activate a modal window after emptying the modal window stack.
67 * \author Lionel Berenguier
68 * \author Nevrax France
71 class CActionHandlerEnterModal
: public IActionHandler
74 virtual void execute (CCtrlBase
*pCaller
, const std::string
¶ms
);
78 // ***************************************************************************
80 * Activate a modal window, but keep previous modal windows (push on the modal windows stack)
81 * \author Nicolas Vizerie
82 * \author Nevrax France
85 class CActionHandlerPushModal
: public IActionHandler
88 virtual void execute (CCtrlBase
*pCaller
, const std::string
¶ms
);
93 // ***************************************************************************
96 * \author Lionel Berenguier
97 * \author Nevrax France
100 class CActionHandlerLeaveModal
: public IActionHandler
103 virtual void execute (CCtrlBase
*pCaller
, const std::string
¶ms
);
106 // ***************************************************************************
108 * Activate a window from a parsed boolean value
109 * \author Nicolas Vizerie
110 * \author Nevrax France
113 class CActionHandlerActive
: public IActionHandler
116 virtual void execute (CCtrlBase
*pCaller
, const std::string
¶ms
);
120 // ***************************************************************************
122 * Open/Activate a container from a parsed boolean value
123 * \author Nicolas Vizerie
124 * \author Nevrax France
127 class CActionHandlerSetOpen
: public IActionHandler
130 virtual void execute (CCtrlBase
*pCaller
, const std::string
¶ms
);
133 // ***************************************************************************
135 * Eval an interface expression. The result isn't used, but the expression can contain functions that are in fact, procedures.
136 * \author Nicolas Vizerie
137 * \author Nevrax France
140 class CActionHandlerEvalExpr
: public IActionHandler
143 virtual void execute (CCtrlBase
*pCaller
, const std::string
¶ms
);
148 /** Build a menu color widget with the given tooltip and chooser title (ccdTitle)
149 * (matching action handlers defined in action_handler_misc.cpp)
151 CInterfaceGroup
*createMenuColorWidget(const std::string
&colDbEntry
, const std::string
&toolTipTextID
, const std::string
&ccdTitle
);
153 // ***************************************************************************
154 // callback used by set_server_string and set_server_id action handlers and by addServerString and addServerId
155 // methods from CInterfaceManager to remove name from a received string like entityName$entityTitle$
156 class CStringPostProcessRemoveName
: public CInterfaceManager::IStringProcess
159 CStringPostProcessRemoveName():Woman(false) {}
161 bool cbIDStringReceived(std::string
&inOut
);
164 // ***************************************************************************
165 // same as above but for title
166 class CStringPostProcessRemoveTitle
: public CInterfaceManager::IStringProcess
169 bool cbIDStringReceived(std::string
&inOut
);
172 // ***************************************************************************
173 // remove title except if the npc has only a title
174 class CStringPostProcessNPCRemoveTitle
: public CInterfaceManager::IStringProcess
177 bool cbIDStringReceived(std::string
&inOut
);
181 /** Capture current content of framebuffer and save the result. If a custom size is asked in ClientCfg, then the scene is rendered again
182 * instead (possibly multiple time)
184 void screenShotTGA();
185 void screenShotPNG();
186 void screenShotJPG();
189 #endif // NL_ACTION_HANDLER_MISC_H
191 /* End of action_handler_misc.h */