59 lines
2.0 KiB
Plaintext
59 lines
2.0 KiB
Plaintext
#ifndef _CXMLOADER_HPP_
|
|
#define _CXMLOADER_HPP_
|
|
|
|
/*** TinyXML Header File ***/
|
|
#include "tinyxml2.h"
|
|
|
|
/*** DLL Header File ***/
|
|
#include "dllExport.h"
|
|
|
|
/*** Custom Header Files ***/
|
|
#include "GUIUtility.hpp"
|
|
|
|
#include "../cWindow.hpp"
|
|
#include "../cLayout.hpp"
|
|
#include "../cLabel.hpp"
|
|
|
|
#include "../../UtilityEngine/cString.hpp"
|
|
|
|
using UtilityEngine::cString;
|
|
|
|
namespace GUIHelpers {
|
|
class EXPORT_FROM_MYDLL cXMLoader
|
|
{
|
|
private:
|
|
cXMLoader();
|
|
~cXMLoader();
|
|
|
|
public:
|
|
///Functions
|
|
static cXMLoader& Inst();
|
|
static void Delete();
|
|
|
|
void Load( const cString& filename, const cString& dir = "" ) const;
|
|
|
|
private:
|
|
void GetElement( tinyxml2::XMLElement& element, GUIEngine::cWindow* parent = nullptr ) const;
|
|
const cString GetAttribute( const tinyxml2::XMLElement& element, const cString& attribute ) const;
|
|
|
|
|
|
void GUISetup( const tinyxml2::XMLElement& element ) const;
|
|
GUIEngine::cLayout* LayoutBuild( const tinyxml2::XMLElement& element, GUIEngine::cWindow* parent ) const;
|
|
GUIEngine::cLabel* LabelBuild( const tinyxml2::XMLElement& element, GUIEngine::cWindow* parent ) const;
|
|
|
|
const unsigned long int getDebug( const tinyxml2::XMLElement& element ) const;
|
|
const signed long int getID( const tinyxml2::XMLElement& element ) const;
|
|
const GUIHelpers::eOrientation getOrientation( const tinyxml2::XMLElement& element ) const;
|
|
const GUIHelpers::eAlign getAlign( const tinyxml2::XMLElement& element ) const;
|
|
const GUIHelpers::eLayout getLayout( const tinyxml2::XMLElement& element ) const;
|
|
const GUIHelpers::Position getPosition( const tinyxml2::XMLElement& element ) const;
|
|
const GUIHelpers::Size getSize( const tinyxml2::XMLElement& element ) const;
|
|
const GUIHelpers::Padding getPadding( const tinyxml2::XMLElement& element ) const;
|
|
const cString getText( const tinyxml2::XMLElement& element ) const;
|
|
|
|
private:
|
|
static cXMLoader* sp_inst;// = nullptr
|
|
};/// END CLASS DEFINITION cObject
|
|
}/// END NAMESPACE DEFINITION GUIHelpers
|
|
#endif/// END IFNDEF _CXMLOADER_HPP_
|