Skip to content

GUIObject

Hampus Sandberg edited this page Jun 28, 2015 · 3 revisions

Index


Info

GUIObject

The GUIObject is declared as a struct seen below. This is the basic building block of Simple GUI which all other elements have an instance of. It's here the ID is located as well as basic position and size of the object. There's also a layer parameter that controls which layer the object is part of.

Struct

/*
 * @name	GUIObject
 * @brief	-	The basic object i Simple GUI. All other elements have a
 * 				GUIObject in them.
 * 			-	The GUIObject manages the position and size of the object
 * 				and it's border.
 */
typedef struct
{
	/* Unique ID set in simple_gui_config.h for each GUI object */
	uint32_t id;

	/* Position and size */
	uint16_t xPos;
	uint16_t yPos;
	uint16_t width;
	uint16_t height;

	/* Layer where the object is */
	GUILayer layer;

	/* The display state of the object */
	GUIDisplayState displayState;

	/* Border */
	GUIBorder border;
	uint32_t borderThickness;
	guiColor borderColor;

	/* Which page in the container the object should be on */
	GUIContainerPage containerPage;
} GUIObject;

Example Init

None, as GUIObject are not very useful on it's own. This is just a basic building block for all the other GUI elements.

Clone this wiki locally