GlistEngine
Loading...
Searching...
No Matches
gBaseGUIObject Class Referenceabstract

#include <gBaseGUIObject.h>

Inheritance diagram for gBaseGUIObject:
Collaboration diagram for gBaseGUIObject:

Public Types

enum  { TEXTALIGNMENT_LEFT , TEXTALIGNMENT_MIDDLE , TEXTALIGNMENT_RIGHT }
 

Public Member Functions

 gBaseGUIObject ()
 
virtual ~gBaseGUIObject ()
 
int getId ()
 
int getType ()
 
void setEnabled (bool isEnabled)
 
bool isEnabled ()
 
void setTitleOn (bool isTitleOn)
 
bool isTitleOn ()
 
virtual void setTopParent (gBaseGUIObject *parentGUIObject)
 
gBaseGUIObjectgetTopParent ()
 
virtual void setParent (gBaseGUIObject *parentGUIObject)
 
gBaseGUIObjectgetParent ()
 
void setParentSlotNo (int parentSlotLineNo, int parentSlotColumnNo)
 
int getParentSlotLineNo ()
 
int getParentSlotColumnNo ()
 
void setTitle (std::string title)
 
std::string getTitle ()
 
virtual void update ()=0
 
virtual void draw ()=0
 
virtual int getCursor (int x, int y)
 
virtual void keyPressed (int key)
 
virtual void keyReleased (int key)
 
virtual void charPressed (unsigned int codepoint)
 
virtual void mouseMoved (int x, int y)
 
virtual void mousePressed (int x, int y, int button)
 
virtual void mouseDragged (int x, int y, int button)
 
virtual void mouseReleased (int x, int y, int button)
 
virtual void mouseScrolled (int x, int y)
 
virtual void mouseEntered ()
 
virtual void mouseExited ()
 
virtual void windowResized (int w, int h)
 
virtual void onGUIEvent (int guiObjectId, int eventType, int sourceEventType, std::string value1="", std::string value2="")
 
void setRootApp (gBaseApp *root)
 
virtual void setCursorOn (bool isOn)
 
- Public Member Functions inherited from gRenderObject
 gRenderObject ()
 
int getScreenWidth ()
 
int getScreenHeight ()
 
void pushMatrix ()
 
void popMatrix ()
 
- Public Member Functions inherited from gObject
 gObject ()
 
void logi (std::string message)
 
void logd (std::string message)
 
void logw (std::string message)
 
void loge (std::string message)
 
void logi (std::string tag, std::string message)
 
void logd (std::string tag, std::string message)
 
void logw (std::string tag, std::string message)
 
void loge (std::string tag, std::string message)
 

Static Public Member Functions

static void setBackgroundColor (gColor *backgroundColor)
 
static gColorgetBackgroundColor ()
 
static void setMiddlegroundColor (gColor *middlegroundColor)
 
static gColorgetMiddlegroundColor ()
 
static void setForegroundColor (gColor *foregroundColor)
 
static gColorgetForegroundColor ()
 
static void setTextBackgroundColor (gColor *textBackgroundColor)
 
static gColorgetTextBackgroundColor ()
 
static void setNavigationBackgroundColor (gColor *navigationBackgroundColor)
 
static gColorgetNavigationBackgroundColor ()
 
static void setFont (gFont *font)
 
static gFontgetFont ()
 
static void setFontColor (gColor *fontColor)
 
static gColorgetFontColor ()
 
static void setNavigationFontColor (gColor *navigationFontColor)
 
static gColorgetNavigationFontColor ()
 
static void setButtonColor (gColor *color)
 
static gColorgetButtonColor ()
 
static void setPressedButtonColor (gColor *color)
 
static gColorgetPressedButtonColor ()
 
static void setDisabledButtonColor (gColor *color)
 
static gColorgetDisabledButtonColor ()
 
static void setButtonFontColor (gColor *color)
 
static gColorgetButtonFontColor ()
 
static void setPressedButtonFontColor (gColor *color)
 
static gColorgetPressedButtonFontColor ()
 
static void setDisabledButtonFontColor (gColor *color)
 
static gColorgetDisabledButtonFontColor ()
 
- Static Public Member Functions inherited from gRenderObject
static void setScreenSize (int screenWidth, int screenHeight)
 
static void setUnitScreenSize (int unitWidth, int unitHeight)
 
static void setScreenScaling (int screenScaling)
 
static void enableShadowMapping ()
 
static void disableShadowMapping ()
 
static bool isShadowMappingEnabled ()
 
static gRenderergetRenderer ()
 
static void destroyRenderer ()
 
static void createRenderer ()
 
- Static Public Member Functions inherited from gObject
static std::string gGetAppDir ()
 
static std::string gGetAssetsDir ()
 
static void gSetAssetsDir (std::string assetsDir)
 
static std::string gGetFilesDir ()
 
static std::string gGetImagesDir ()
 
static std::string gGetFontsDir ()
 
static std::string gGetModelsDir ()
 
static std::string gGetTexturesDir ()
 
static std::string gGetShadersDir ()
 
static std::string gGetSoundsDir ()
 
static std::string gGetDatabasesDir ()
 
static std::string gGetVideosDir ()
 
static void setCurrentResolution (int scalingNo, int currentResolutionNo)
 

Public Attributes

int id
 
int type
 
int left
 
int top
 
int right
 
int bottom
 
int width
 
int height
 
int titlex
 
int titley
 
int titleheight
 
bool isfocused
 
bool iscursoron
 
bool issizer
 
bool iscontainer
 
bool isresizable
 

Static Public Attributes

static const int GUIEVENT_FOCUSED = -1
 
static const int GUIEVENT_UNFOCUSED = -2
 
static const int CURSOR_ARROW = 0
 
static const int CURSOR_IBEAM = 1
 
static const int CURSOR_CROSSHAIR = 2
 
static const int CURSOR_HAND = 3
 
static const int CURSOR_HRESIZE = 4
 
static const int CURSOR_VRESIZE = 5
 
static int focusid
 
static int previousfocusid
 
- Static Public Attributes inherited from gObject
static const int LOGLEVEL_SILENT
 
static const int LOGLEVEL_DEBUG
 
static const int LOGLEVEL_INFO
 
static const int LOGLEVEL_WARNING
 
static const int LOGLEVEL_ERROR
 

Protected Attributes

std::string title
 
gBaseApproot
 
gBaseGUIObjecttopparent
 
gBaseGUIObjectparent
 
bool isenabled
 
bool istitleon
 
int parentslotlineno
 
int parentslotcolumnno
 

Static Protected Attributes

static gColorbackgroundcolor
 
static gColormiddlegroundcolor
 
static gColorforegroundcolor
 
static gColortextbackgroundcolor
 
static gColornavigationbackgroundcolor
 
static gFontfont
 
static gColorfontcolor
 
static gColornavigationfontcolor
 
static gColorbuttoncolor
 
static gColorpressedbuttoncolor
 
static gColordisabledbuttoncolor
 
static gColorbuttonfontcolor
 
static gColorpressedbuttonfontcolor
 
static gColordisabledbuttonfontcolor
 
static gGUIActionManager actionmanager
 
static gGUIResources res
 
- Static Protected Attributes inherited from gRenderObject
static bool isshadowmappingenabled
 
- Static Protected Attributes inherited from gObject
static int renderpassnum
 
static int renderpassno
 
static int releasescaling
 
static int releaseresolution
 

Friends

class gAppManager
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
TEXTALIGNMENT_LEFT 
TEXTALIGNMENT_MIDDLE 
TEXTALIGNMENT_RIGHT 

Constructor & Destructor Documentation

◆ gBaseGUIObject()

gBaseGUIObject::gBaseGUIObject ( )

◆ ~gBaseGUIObject()

virtual gBaseGUIObject::~gBaseGUIObject ( )
virtual

Member Function Documentation

◆ charPressed()

virtual void gBaseGUIObject::charPressed ( unsigned int  codepoint)
virtual

◆ draw()

◆ getBackgroundColor()

static gColor * gBaseGUIObject::getBackgroundColor ( )
static

◆ getButtonColor()

static gColor * gBaseGUIObject::getButtonColor ( )
static

◆ getButtonFontColor()

static gColor * gBaseGUIObject::getButtonFontColor ( )
static

◆ getCursor()

virtual int gBaseGUIObject::getCursor ( int  x,
int  y 
)
virtual

◆ getDisabledButtonColor()

static gColor * gBaseGUIObject::getDisabledButtonColor ( )
static

◆ getDisabledButtonFontColor()

static gColor * gBaseGUIObject::getDisabledButtonFontColor ( )
static

◆ getFont()

static gFont * gBaseGUIObject::getFont ( )
static

◆ getFontColor()

static gColor * gBaseGUIObject::getFontColor ( )
static

◆ getForegroundColor()

static gColor * gBaseGUIObject::getForegroundColor ( )
static

◆ getId()

int gBaseGUIObject::getId ( )

◆ getMiddlegroundColor()

static gColor * gBaseGUIObject::getMiddlegroundColor ( )
static

◆ getNavigationBackgroundColor()

static gColor * gBaseGUIObject::getNavigationBackgroundColor ( )
static

◆ getNavigationFontColor()

static gColor * gBaseGUIObject::getNavigationFontColor ( )
static

◆ getParent()

gBaseGUIObject * gBaseGUIObject::getParent ( )

◆ getParentSlotColumnNo()

int gBaseGUIObject::getParentSlotColumnNo ( )

◆ getParentSlotLineNo()

int gBaseGUIObject::getParentSlotLineNo ( )

◆ getPressedButtonColor()

static gColor * gBaseGUIObject::getPressedButtonColor ( )
static

◆ getPressedButtonFontColor()

static gColor * gBaseGUIObject::getPressedButtonFontColor ( )
static

◆ getTextBackgroundColor()

static gColor * gBaseGUIObject::getTextBackgroundColor ( )
static

◆ getTitle()

std::string gBaseGUIObject::getTitle ( )

◆ getTopParent()

gBaseGUIObject * gBaseGUIObject::getTopParent ( )

◆ getType()

int gBaseGUIObject::getType ( )

◆ isEnabled()

bool gBaseGUIObject::isEnabled ( )

◆ isTitleOn()

bool gBaseGUIObject::isTitleOn ( )

◆ keyPressed()

virtual void gBaseGUIObject::keyPressed ( int  key)
virtual

◆ keyReleased()

virtual void gBaseGUIObject::keyReleased ( int  key)
virtual

◆ mouseDragged()

virtual void gBaseGUIObject::mouseDragged ( int  x,
int  y,
int  button 
)
virtual

◆ mouseEntered()

virtual void gBaseGUIObject::mouseEntered ( )
virtual

Reimplemented in gGUIButton, gGUIForm, gGUINavigation, and gGUISizer.

◆ mouseExited()

virtual void gBaseGUIObject::mouseExited ( )
virtual

Reimplemented in gGUIButton, gGUIForm, gGUINavigation, and gGUISizer.

◆ mouseMoved()

virtual void gBaseGUIObject::mouseMoved ( int  x,
int  y 
)
virtual

◆ mousePressed()

◆ mouseReleased()

◆ mouseScrolled()

virtual void gBaseGUIObject::mouseScrolled ( int  x,
int  y 
)
virtual

◆ onGUIEvent()

virtual void gBaseGUIObject::onGUIEvent ( int  guiObjectId,
int  eventType,
int  sourceEventType,
std::string  value1 = "",
std::string  value2 = "" 
)
virtual

Reimplemented in gGUIPane, and gGUIDropdownList.

◆ setBackgroundColor()

static void gBaseGUIObject::setBackgroundColor ( gColor backgroundColor)
static

◆ setButtonColor()

static void gBaseGUIObject::setButtonColor ( gColor color)
static

◆ setButtonFontColor()

static void gBaseGUIObject::setButtonFontColor ( gColor color)
static

◆ setCursorOn()

virtual void gBaseGUIObject::setCursorOn ( bool  isOn)
virtual

Reimplemented in gGUIContainer.

◆ setDisabledButtonColor()

static void gBaseGUIObject::setDisabledButtonColor ( gColor color)
static

◆ setDisabledButtonFontColor()

static void gBaseGUIObject::setDisabledButtonFontColor ( gColor color)
static

◆ setEnabled()

void gBaseGUIObject::setEnabled ( bool  isEnabled)

◆ setFont()

static void gBaseGUIObject::setFont ( gFont font)
static

◆ setFontColor()

static void gBaseGUIObject::setFontColor ( gColor fontColor)
static

◆ setForegroundColor()

static void gBaseGUIObject::setForegroundColor ( gColor foregroundColor)
static

◆ setMiddlegroundColor()

static void gBaseGUIObject::setMiddlegroundColor ( gColor middlegroundColor)
static

◆ setNavigationBackgroundColor()

static void gBaseGUIObject::setNavigationBackgroundColor ( gColor navigationBackgroundColor)
static

◆ setNavigationFontColor()

static void gBaseGUIObject::setNavigationFontColor ( gColor navigationFontColor)
static

◆ setParent()

virtual void gBaseGUIObject::setParent ( gBaseGUIObject parentGUIObject)
virtual

◆ setParentSlotNo()

void gBaseGUIObject::setParentSlotNo ( int  parentSlotLineNo,
int  parentSlotColumnNo 
)

◆ setPressedButtonColor()

static void gBaseGUIObject::setPressedButtonColor ( gColor color)
static

◆ setPressedButtonFontColor()

static void gBaseGUIObject::setPressedButtonFontColor ( gColor color)
static

◆ setRootApp()

void gBaseGUIObject::setRootApp ( gBaseApp root)

◆ setTextBackgroundColor()

static void gBaseGUIObject::setTextBackgroundColor ( gColor textBackgroundColor)
static

◆ setTitle()

void gBaseGUIObject::setTitle ( std::string  title)

◆ setTitleOn()

void gBaseGUIObject::setTitleOn ( bool  isTitleOn)

◆ setTopParent()

virtual void gBaseGUIObject::setTopParent ( gBaseGUIObject parentGUIObject)
virtual

◆ update()

◆ windowResized()

virtual void gBaseGUIObject::windowResized ( int  w,
int  h 
)
virtual

Friends And Related Symbol Documentation

◆ gAppManager

friend class gAppManager
friend

Member Data Documentation

◆ actionmanager

gGUIActionManager gBaseGUIObject::actionmanager
staticprotected

◆ backgroundcolor

gColor* gBaseGUIObject::backgroundcolor
staticprotected

◆ bottom

int gBaseGUIObject::bottom

◆ buttoncolor

gColor* gBaseGUIObject::buttoncolor
staticprotected

◆ buttonfontcolor

gColor* gBaseGUIObject::buttonfontcolor
staticprotected

◆ CURSOR_ARROW

const int gBaseGUIObject::CURSOR_ARROW = 0
static

◆ CURSOR_CROSSHAIR

const int gBaseGUIObject::CURSOR_CROSSHAIR = 2
static

◆ CURSOR_HAND

const int gBaseGUIObject::CURSOR_HAND = 3
static

◆ CURSOR_HRESIZE

const int gBaseGUIObject::CURSOR_HRESIZE = 4
static

◆ CURSOR_IBEAM

const int gBaseGUIObject::CURSOR_IBEAM = 1
static

◆ CURSOR_VRESIZE

const int gBaseGUIObject::CURSOR_VRESIZE = 5
static

◆ disabledbuttoncolor

gColor* gBaseGUIObject::disabledbuttoncolor
staticprotected

◆ disabledbuttonfontcolor

gColor* gBaseGUIObject::disabledbuttonfontcolor
staticprotected

◆ focusid

int gBaseGUIObject::focusid
static

◆ font

gFont* gBaseGUIObject::font
staticprotected

◆ fontcolor

gColor* gBaseGUIObject::fontcolor
staticprotected

◆ foregroundcolor

gColor* gBaseGUIObject::foregroundcolor
staticprotected

◆ GUIEVENT_FOCUSED

const int gBaseGUIObject::GUIEVENT_FOCUSED = -1
static

◆ GUIEVENT_UNFOCUSED

const int gBaseGUIObject::GUIEVENT_UNFOCUSED = -2
static

◆ height

int gBaseGUIObject::height

◆ id

int gBaseGUIObject::id

◆ iscontainer

bool gBaseGUIObject::iscontainer

◆ iscursoron

bool gBaseGUIObject::iscursoron

◆ isenabled

bool gBaseGUIObject::isenabled
protected

◆ isfocused

bool gBaseGUIObject::isfocused

◆ isresizable

bool gBaseGUIObject::isresizable

◆ issizer

bool gBaseGUIObject::issizer

◆ istitleon

bool gBaseGUIObject::istitleon
protected

◆ left

int gBaseGUIObject::left

◆ middlegroundcolor

gColor* gBaseGUIObject::middlegroundcolor
staticprotected

◆ navigationbackgroundcolor

gColor* gBaseGUIObject::navigationbackgroundcolor
staticprotected

◆ navigationfontcolor

gColor* gBaseGUIObject::navigationfontcolor
staticprotected

◆ parent

gBaseGUIObject* gBaseGUIObject::parent
protected

◆ parentslotcolumnno

int gBaseGUIObject::parentslotcolumnno
protected

◆ parentslotlineno

int gBaseGUIObject::parentslotlineno
protected

◆ pressedbuttoncolor

gColor* gBaseGUIObject::pressedbuttoncolor
staticprotected

◆ pressedbuttonfontcolor

gColor* gBaseGUIObject::pressedbuttonfontcolor
staticprotected

◆ previousfocusid

int gBaseGUIObject::previousfocusid
static

◆ res

gGUIResources gBaseGUIObject::res
staticprotected

◆ right

int gBaseGUIObject::right

◆ root

gBaseApp* gBaseGUIObject::root
protected

◆ textbackgroundcolor

gColor* gBaseGUIObject::textbackgroundcolor
staticprotected

◆ title

std::string gBaseGUIObject::title
protected

◆ titleheight

int gBaseGUIObject::titleheight

◆ titlex

int gBaseGUIObject::titlex

◆ titley

int gBaseGUIObject::titley

◆ top

int gBaseGUIObject::top

◆ topparent

gBaseGUIObject* gBaseGUIObject::topparent
protected

◆ type

int gBaseGUIObject::type

◆ width

int gBaseGUIObject::width

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