Merge branch '138-toggle-free-look-with-hotkey' into main/gingo-test
[ryzomcore.git] / ryzom / client / src / interface_v3 / action_handler_misc.h
blob2c5ba5ece66933ec23596a96fc999ca4fb49ea3e
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 // Copyright (C) 2020 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
7 //
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"
30 namespace NLGUI
32 class CInterfaceGroup;
36 // ***************************************************************************
37 /**
38 * Show only one window and hide others
39 * \author Lionel Berenguier
40 * \author Nevrax France
41 * \date 2002
43 class CActionHandlerShowOne : public IActionHandler
45 public:
46 virtual void execute (CCtrlBase *pCaller, const std::string &params);
50 // ***************************************************************************
51 /**
52 * hide some windows and close some group containers
53 * \author Lionel Berenguier
54 * \author Nevrax France
55 * \date 2002
57 class CActionHandlerHideClose : public IActionHandler
59 public:
60 virtual void execute (CCtrlBase *pCaller, const std::string &params);
64 // ***************************************************************************
65 /**
66 * Activate a modal window after emptying the modal window stack.
67 * \author Lionel Berenguier
68 * \author Nevrax France
69 * \date 2002
71 class CActionHandlerEnterModal : public IActionHandler
73 public:
74 virtual void execute (CCtrlBase *pCaller, const std::string &params);
78 // ***************************************************************************
79 /**
80 * Activate a modal window, but keep previous modal windows (push on the modal windows stack)
81 * \author Nicolas Vizerie
82 * \author Nevrax France
83 * \date 2003
85 class CActionHandlerPushModal : public IActionHandler
87 public:
88 virtual void execute (CCtrlBase *pCaller, const std::string &params);
93 // ***************************************************************************
94 /**
95 * Exit from modal
96 * \author Lionel Berenguier
97 * \author Nevrax France
98 * \date 2002
100 class CActionHandlerLeaveModal : public IActionHandler
102 public:
103 virtual void execute (CCtrlBase *pCaller, const std::string &params);
106 // ***************************************************************************
108 * Activate a window from a parsed boolean value
109 * \author Nicolas Vizerie
110 * \author Nevrax France
111 * \date 2002
113 class CActionHandlerActive : public IActionHandler
115 public:
116 virtual void execute (CCtrlBase *pCaller, const std::string &params);
120 // ***************************************************************************
122 * Open/Activate a container from a parsed boolean value
123 * \author Nicolas Vizerie
124 * \author Nevrax France
125 * \date 2002
127 class CActionHandlerSetOpen : public IActionHandler
129 public:
130 virtual void execute (CCtrlBase *pCaller, const std::string &params);
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
138 * \date 2003
140 class CActionHandlerEvalExpr : public IActionHandler
142 public:
143 virtual void execute (CCtrlBase *pCaller, const std::string &params);
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
158 public:
159 CStringPostProcessRemoveName():Woman(false) {}
160 bool Woman;
161 bool cbIDStringReceived(std::string &inOut);
164 // ***************************************************************************
165 // same as above but for title
166 class CStringPostProcessRemoveTitle : public CInterfaceManager::IStringProcess
168 public:
169 bool cbIDStringReceived(std::string &inOut);
172 // ***************************************************************************
173 // remove title except if the npc has only a title
174 class CStringPostProcessNPCRemoveTitle : public CInterfaceManager::IStringProcess
176 public:
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 */