/usr/include/cegui-0.8.7/CEGUI/Scheme.h is in libcegui-mk2-dev 0.8.7-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 | /***********************************************************************
created: 21/2/2004
author: Paul D Turner
purpose: Defines abstract base class for the GUI Scheme object.
*************************************************************************/
/***************************************************************************
* Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
***************************************************************************/
#ifndef _CEGUIScheme_h_
#define _CEGUIScheme_h_
#include "CEGUI/Base.h"
#include "CEGUI/String.h"
#include "CEGUI/SchemeManager.h"
#include <vector>
#if defined(_MSC_VER)
# pragma warning(push)
# pragma warning(disable : 4251)
#endif
// Start of CEGUI namespace section
namespace CEGUI
{
/*!
\brief
A class that groups a set of GUI elements and initialises the system to access those elements.
A GUI Scheme is a high-level construct that loads and initialises various lower-level objects
and registers them within the system for usage. So, for example, a Scheme might create some
Imageset objects, some Font objects, and register a collection of WindowFactory objects within
the system which would then be in a state to serve those elements to client code.
*/
class CEGUIEXPORT Scheme :
public AllocatedObject<Scheme>
{
private:
friend class Scheme_xmlHandler;
/*************************************************************************
Construction and Destruction
*************************************************************************/
/*!
\brief
Constructs an empty scheme object with the specified name.
\param name
String object holding the name of the Scheme object.
*/
Scheme(const String& name);
public:
/*!
\brief
Destroys a Scheme object
\internal
has to be public for luabind compatibility
*/
~Scheme(void);
/*!
\brief
Loads all resources for this scheme.
\return
Nothing.
*/
void loadResources(void);
/*!
\brief
Unloads all resources for this scheme. This should be used very carefully.
\return
Nothing.
*/
void unloadResources(void);
/*!
\brief
Return whether the resources for this Scheme are all loaded.
\return
true if all resources for the Scheme are loaded and available, or false of one or more resource is not currently loaded.
*/
bool resourcesLoaded(void) const;
/*!
\brief
Return the name of this Scheme.
\return
String object containing the name of this Scheme.
*/
const String& getName(void) const {return d_name;}
/*!
\brief
Returns the default resource group currently set for Schemes.
\return
String describing the default resource group identifier that will be
used when loading Scheme xml file data.
*/
static const String& getDefaultResourceGroup()
{ return d_defaultResourceGroup; }
/*!
\brief
Sets the default resource group to be used when loading scheme xml data
\param resourceGroup
String describing the default resource group identifier to be used.
\return
Nothing.
*/
static void setDefaultResourceGroup(const String& resourceGroup)
{ d_defaultResourceGroup = resourceGroup; }
/*!
\brief
Load all XML based imagesets required by the scheme.
*/
void loadXMLImagesets();
/*!
\brief
Load all image file based imagesets required by the scheme.
*/
void loadImageFileImagesets();
/*!
\brief
Load all xml based fonts required by the scheme.
*/
void loadFonts();
/*!
\brief
Load all xml looknfeel files required by the scheme.
*/
void loadLookNFeels();
/*!
\brief
Register all window factories required by the scheme.
*/
void loadWindowFactories();
/*!
\brief
Register all window renderer factories required by the scheme.
*/
void loadWindowRendererFactories();
/*!
\brief
Register all factory aliases required by the scheme.
*/
void loadFactoryAliases();
/*!
\brief
Create all falagard mappings required by the scheme.
*/
void loadFalagardMappings();
/*!
\brief
Unload all XML based imagesets created by the scheme.
*/
void unloadXMLImagesets();
/*!
\brief
Unload all image file based imagesets created by the scheme.
*/
void unloadImageFileImagesets();
/*!
\brief
Unload all xml based fonts created by the scheme.
*/
void unloadFonts();
/*!
\brief
Unload all xml looknfeel files loaded by the scheme.
*/
void unloadLookNFeels();
/*!
\brief
Unregister all window factories registered by the scheme.
*/
void unloadWindowFactories();
/*!
\brief
Unregister all window renderer factories registered by the scheme.
*/
void unloadWindowRendererFactories();
/*!
\brief
Unregister all factory aliases created by the scheme.
*/
void unloadFactoryAliases();
/*!
\brief
Unregister all falagard mappings created by the scheme.
*/
void unloadFalagardMappings();
/*!
\brief
Check state of all XML based imagesets created by the scheme.
*/
bool areXMLImagesetsLoaded() const;
/*!
\brief
Check state of all image file based imagesets created by the scheme.
*/
bool areImageFileImagesetsLoaded() const;
/*!
\brief
Check state of all xml based fonts created by the scheme.
*/
bool areFontsLoaded() const;
/*!
\brief
Check state of all looknfeel files loaded by the scheme.
*/
bool areLookNFeelsLoaded() const;
/*!
\brief
Check state of all window factories registered by the scheme.
*/
bool areWindowFactoriesLoaded() const;
/*!
\brief
Check state of all window renderer factories registered by the scheme.
*/
bool areWindowRendererFactoriesLoaded() const;
/*!
\brief
Check state of all factory aliases created by the scheme.
*/
bool areFactoryAliasesLoaded() const;
/*!
\brief
Check state of all falagard mappings created by the scheme.
*/
bool areFalagardMappingsLoaded() const;
/*!
\brief
A single file reference to a font, imageset or so to be loaded as part of this Scheme
\note
This is public because you might want to iterate over these and load them yourself!
*/
struct LoadableUIElement
{
String name;
String filename;
String resourceGroup;
};
private:
//! \internal This is implementation specific so we keep it private!
typedef std::vector<LoadableUIElement
CEGUI_VECTOR_ALLOC(LoadableUIElement)> LoadableUIElementList;
public:
typedef ConstVectorIterator<LoadableUIElementList> LoadableUIElementIterator;
/*!
\brief
Retrieves iterator for all references to XML imagesets that are to be loaded with this Scheme
*/
LoadableUIElementIterator getXMLImagesets() const;
/*!
\brief
Retrieves iterator for all references to image file imagesets that are to be loaded with this Scheme
*/
LoadableUIElementIterator getImageFileImagesets() const;
/*!
\brief
Retrieves iterator for all references to font files that are to be loaded with this Scheme
*/
LoadableUIElementIterator getFonts() const;
/*!
\brief
Retrieves iterator for all references to LookNFeels files that are to be loaded with this Scheme
*/
LoadableUIElementIterator getLookNFeels() const;
private:
/*************************************************************************
Structs used to hold scheme information
*************************************************************************/
struct UIModule
{
String name;
DynamicModule* dynamicModule;
FactoryModule* factoryModule;
typedef std::vector<String
CEGUI_VECTOR_ALLOC(String)> TypeList;
TypeList types;
};
struct AliasMapping
{
String aliasName;
String targetName;
};
struct FalagardMapping
{
String windowName;
String targetName;
String rendererName;
String lookName;
String effectName;
};
/*************************************************************************
Implementation Data
*************************************************************************/
String d_name; //!< the name of this scheme.
LoadableUIElementList d_imagesets;
LoadableUIElementList d_imagesetsFromImages;
LoadableUIElementList d_fonts;
typedef std::vector<UIModule
CEGUI_VECTOR_ALLOC(UIModule)> UIModuleList;
UIModuleList d_widgetModules;
typedef std::vector<UIModule
CEGUI_VECTOR_ALLOC(UIModule)> WRModuleList;
WRModuleList d_windowRendererModules;
typedef std::vector<AliasMapping
CEGUI_VECTOR_ALLOC(AliasMapping)> AliasMappingList;
AliasMappingList d_aliasMappings;
LoadableUIElementList d_looknfeels;
typedef std::vector<FalagardMapping
CEGUI_VECTOR_ALLOC(FalagardMapping)> FalagardMappingList;
FalagardMappingList d_falagardMappings;
static String d_defaultResourceGroup; //!< holds default resource group
};
} // End of CEGUI namespace section
#if defined(_MSC_VER)
# pragma warning(pop)
#endif
#endif // end of guard _CEGUIScheme_h_
|