Fix css style order when using external css files
[ryzomcore.git] / ryzom / client / src / interface_v3 / interface_config.h
blob998ecc5b7fa15e71bcb41f9b04eab5fb4b7a5da0
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/>.
22 #ifndef NL_INTERFACE_CONFIG_H
23 #define NL_INTERFACE_CONFIG_H
25 #include "nel/misc/stream.h"
27 namespace NLGUI
29 class CGroupContainer;
32 namespace NLMISC{
33 class CCDBNodeLeaf;
36 /**
37 * interface config
38 * class used to managed an interface configuration
39 * \author Matthieu 'TRAP' Besson
40 * \author Nevrax France
41 * \date 2003
43 class CInterfaceConfig
45 public:
46 // Elements saved from the container
47 struct SCont
49 std::string Id;
50 uint8 ContainerMode; // 0 - Normal, 1 - Small (save just Opened, ActiveSavable and Active)
51 bool Popuped;
52 bool Opened;
53 sint32 X;
54 sint32 Y;
55 sint32 W;
56 sint32 H;
57 sint32 MinW;
58 sint32 MaxW;
59 bool ActiveSavable;
60 bool Active;
61 sint32 ScrollPos;
62 bool Locked;
63 bool Movable;
64 // alpha
65 uint8 BgAlpha;
66 uint8 ContentAlpha;
67 uint8 RolloverAlphaContent;
68 uint8 RolloverAlphaContainer;
69 bool UseGlobalAlpha;
70 // popup state
71 sint32 PopupX;
72 sint32 PopupY;
73 sint32 PopupW;
74 sint32 PopupH;
75 sint32 PopupMaxH;
76 // backuped position
77 bool BackupedPositionValid;
78 sint32 BackupX;
79 sint32 BackupY;
80 // touch flag
81 bool TouchFlag;
84 // ------------------------------
85 void serial (NLMISC::IStream &f);
86 // ------------------------------
87 void setFrom ( NLGUI::CGroupContainer *pGC);
88 void setTo ( NLGUI::CGroupContainer *pGC);
91 // Image of a desktop
92 class CDesktopImage
94 public:
95 std::vector<SCont> GCImages; // Image of each group container in the desktop
96 sint Version; // Stream version for extra datas
97 NLMISC::CMemStream ExtraDatas; // TODO : replace it with some polymorphic scheme
99 CDesktopImage();
100 void serial(NLMISC::IStream &s);
101 // Build a virtual desktop image from the current desktop
102 void fromCurrentDesktop();
103 // Set current desktop from this desktop image
104 void toCurrentDesktop();
105 // Update image of the given group container (added to the list if it does not exist)
106 void updateGroupContainerImage( NLGUI::CGroupContainer &gc);
107 // Remove a group container from the image
108 void removeGroupContainerImage(const std::string &groupName);
109 private:
110 void read(NLMISC::IStream &s);
111 void write(NLMISC::IStream &s);
114 // Elements saved from database
115 struct SDBLeaf
117 std::string Name;
118 sint64 Value;
119 sint64 OldValue;
120 // ------------------------------
121 void serial (NLMISC::IStream &f);
122 // ------------------------------
123 void setFrom (NLMISC::CCDBNodeLeaf *pNL);
124 void setTo (NLMISC::CCDBNodeLeaf *pNL);
127 void dataBaseToStream (NLMISC::IStream &f);
129 // Write to stream (should support seek functionnality)
130 void streamToDataBase (NLMISC::IStream &f, uint32 uiDbSaveVersion);
139 #endif // NL_INTERFACE_CONFIG_H
141 /* End of interface_config.h */