Skylicht Engine
Loading...
Searching...
No Matches
Skylicht::CGUIExporter Class Reference

Utility class for exporting Canvas and GUI element trees to files or serializable data. More...

#include <Graphics2D/CGUIExporter.h>

Static Public Member Functions

static bool save (const char *file, CCanvas *canvas)
 Save the specified canvas and its elements to a file (XML format). Also generates a secondary info file with element paths.
static CObjectSerializablecreateSerializable (CGUIElement *ui)
 Create a serializable object representing the GUI element and its hierarchy.

Detailed Description

Utility class for exporting Canvas and GUI element trees to files or serializable data.

CGUIExporter can be used to save a CCanvas to an XML file, or convert GUI elements to
serializable objects for other forms of storage or transfer. It supports recursive export of child elements and can generate info files listing all element paths.

Example usage :

CGUIExporter::save("ui_layout.gui", canvas);
static bool save(const char *file, CCanvas *canvas)
Save the specified canvas and its elements to a file (XML format). Also generates a secondary info fi...

Member Function Documentation

◆ createSerializable()

CObjectSerializable * Skylicht::CGUIExporter::createSerializable ( CGUIElement * ui)
static

Create a serializable object representing the GUI element and its hierarchy.

Parameters
uiPointer to the root GUI element.
Returns
Pointer to the root CObjectSerializable.

◆ save()

bool Skylicht::CGUIExporter::save ( const char * file,
CCanvas * canvas )
static

Save the specified canvas and its elements to a file (XML format). Also generates a secondary info file with element paths.

Parameters
fileThe path to save the file.
canvasPointer to the canvas to export.
Returns
True if successful, false otherwise.

The documentation for this class was generated from the following file: