Merge branch '138-toggle-free-look-with-hotkey' into main/gingo-test
[ryzomcore.git] / ryzom / client / src / interface_v3 / group_quick_help.h
blob8c7b4297342ee7163690f0f57324e46cf0fa0cb3
1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010-2019 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) 2019 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/>.
24 #ifndef CL_GROUP_QUICK_HELP_H
25 #define CL_GROUP_QUICK_HELP_H
27 #include "nel/misc/types_nl.h"
28 #include "nel/gui/group_html.h"
30 /**
31 * Quick help group
32 * \author Cyril 'Hulud' Corvazier
33 * \author Nevrax France
34 * \date 2002
36 class CGroupQuickHelp : public CGroupHTML
38 public:
40 // Constructor
41 CGroupQuickHelp(const TCtorParam &param);
42 ~CGroupQuickHelp();
44 // Submit an event
45 bool submitEvent (const char *event);
47 private:
49 // CInterfaceGroup Interface
50 virtual bool parse (xmlNodePtr cur, CInterfaceGroup *parentGroup);
51 virtual void updateCoords();
53 // From CGroupHTML
54 virtual void beginElement (NLGUI::CHtmlElement &elm);
55 virtual void endBuild ();
56 virtual void browse (const char *url);
57 virtual std::string home() const NL_OVERRIDE;
59 // Modify uri with '.html' or '_??.html' ending to have current user language,
60 // If the uri is not found locally, then try "en" as fallback language
61 // ie. 'help_ru.html' does not exists, return 'help_en.html'
62 std::string getLanguageUrl(const std::string &href, std::string lang) const;
64 // Init parsing value
65 void initParameters();
67 // Update the paragraph font size according the current step
68 void updateParagraph ();
70 // Set the text attribute for a group and its sub group
71 void setGroupTextSize (CInterfaceGroup *group, bool selected);
73 // Evaluate a condition
74 bool evalExpression (const std::string &condition);
76 // A quick help step
77 class CStep
79 public:
80 std::set<std::string> EventToComplete;
81 std::string Condition;
82 std::string URL;
85 // Activate a step
86 void activateCurrentStep ();
88 // The quick help steps
89 std::vector<CStep> _Steps;
91 // The current step
92 uint _CurrentStep;
94 // Parameters
95 uint _NonSelectedSize;
96 NLMISC::CRGBA _NonSelectedColor;
97 NLMISC::CRGBA _NonSelectedLinkColor;
98 bool _NonSelectedGlobalColor;
99 bool _UpdateParagraphNextUpdateCoords;
101 bool _IsQuickHelp;
104 #endif