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 setVisible (bool isVisible)
bool isVisible ()
void setTitleOn (bool isTitleOn)
bool isTitleOn ()
virtual void setTopParent (gBaseGUIObject *parentGUIObject)
gBaseGUIObject * getTopParent ()
virtual void setParent (gBaseGUIObject *parentGUIObject)
gBaseGUIObject * getParent ()
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)
virtual void unfocus ()
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 gColor * getBackgroundColor ()
static void setMiddlegroundColor (gColor *middlegroundColor)
static gColor * getMiddlegroundColor ()
static void setForegroundColor (gColor *foregroundColor)
static gColor * getForegroundColor ()
static void setTextBackgroundColor (gColor *textBackgroundColor)
static gColor * getTextBackgroundColor ()
static void setNavigationBackgroundColor (gColor *navigationBackgroundColor)
static gColor * getNavigationBackgroundColor ()
static void setFont (gFont *font)
static gFont * getFont ()
static void setFontColor (gColor *fontColor)
static gColor * getFontColor ()
static void setNavigationFontColor (gColor *navigationFontColor)
static gColor * getNavigationFontColor ()
static void setButtonColor (gColor *color)
static gColor * getButtonColor ()
static void setPressedButtonColor (gColor *color)
static gColor * getPressedButtonColor ()
static void setDisabledButtonColor (gColor *color)
static gColor * getDisabledButtonColor ()
static void setButtonFontColor (gColor *color)
static gColor * getButtonFontColor ()
static void setPressedButtonFontColor (gColor *color)
static gColor * getPressedButtonFontColor ()
static void setDisabledButtonFontColor (gColor *color)
static gColor * getDisabledButtonFontColor ()
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 void enableExtraShaders (bool isEnabled=true)
static void disableExtraShaders ()
static bool isExtraShadersEnabled ()
static gRenderer * getRenderer ()
static void destroyRenderer ()
static void createRenderer (int renderEngine=G_RENDERER_GL)
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
gBaseApp * root
gBaseGUIObject * topparent
gBaseGUIObject * parent
bool isenabled
bool isvisible
bool istitleon
int parentslotlineno
int parentslotcolumnno

Static Protected Attributes

static gColor * backgroundcolor
static gColor * middlegroundcolor
static gColor * foregroundcolor
static gColor * textbackgroundcolor
static gColor * navigationbackgroundcolor
static gFont * font
static gColor * fontcolor
static gColor * navigationfontcolor
static gColor * buttoncolor
static gColor * pressedbuttoncolor
static gColor * disabledbuttoncolor
static gColor * buttonfontcolor
static gColor * pressedbuttonfontcolor
static gColor * disabledbuttonfontcolor
static gGUIActionManager actionmanager
static gGUIResources res
Static Protected Attributes inherited from gRenderObject
static bool isshadowmappingenabled
static bool isextrashadersenabled
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()

gColor * gBaseGUIObject::getBackgroundColor ( )
static

◆ getButtonColor()

gColor * gBaseGUIObject::getButtonColor ( )
static

◆ getButtonFontColor()

gColor * gBaseGUIObject::getButtonFontColor ( )
static

◆ getCursor()

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

◆ getDisabledButtonColor()

gColor * gBaseGUIObject::getDisabledButtonColor ( )
static

◆ getDisabledButtonFontColor()

gColor * gBaseGUIObject::getDisabledButtonFontColor ( )
static

◆ getFont()

gFont * gBaseGUIObject::getFont ( )
static

◆ getFontColor()

gColor * gBaseGUIObject::getFontColor ( )
static

◆ getForegroundColor()

gColor * gBaseGUIObject::getForegroundColor ( )
static

◆ getId()

int gBaseGUIObject::getId ( )

◆ getMiddlegroundColor()

gColor * gBaseGUIObject::getMiddlegroundColor ( )
static

◆ getNavigationBackgroundColor()

gColor * gBaseGUIObject::getNavigationBackgroundColor ( )
static

◆ getNavigationFontColor()

gColor * gBaseGUIObject::getNavigationFontColor ( )
static

◆ getParent()

gBaseGUIObject * gBaseGUIObject::getParent ( )

◆ getParentSlotColumnNo()

int gBaseGUIObject::getParentSlotColumnNo ( )

◆ getParentSlotLineNo()

int gBaseGUIObject::getParentSlotLineNo ( )

◆ getPressedButtonColor()

gColor * gBaseGUIObject::getPressedButtonColor ( )
static

◆ getPressedButtonFontColor()

gColor * gBaseGUIObject::getPressedButtonFontColor ( )
static

◆ getTextBackgroundColor()

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 ( )

◆ isVisible()

bool gBaseGUIObject::isVisible ( )

◆ 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

◆ 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 gGUIDropdownList, and gGUIPane.

◆ setBackgroundColor()

void gBaseGUIObject::setBackgroundColor ( gColor * backgroundColor)
static

◆ setButtonColor()

void gBaseGUIObject::setButtonColor ( gColor * color)
static

◆ setButtonFontColor()

void gBaseGUIObject::setButtonFontColor ( gColor * color)
static

◆ setCursorOn()

virtual void gBaseGUIObject::setCursorOn ( bool isOn)
virtual

Reimplemented in gGUIContainer.

◆ setDisabledButtonColor()

void gBaseGUIObject::setDisabledButtonColor ( gColor * color)
static

◆ setDisabledButtonFontColor()

void gBaseGUIObject::setDisabledButtonFontColor ( gColor * color)
static

◆ setEnabled()

void gBaseGUIObject::setEnabled ( bool isEnabled)

◆ setFont()

void gBaseGUIObject::setFont ( gFont * font)
static

◆ setFontColor()

void gBaseGUIObject::setFontColor ( gColor * fontColor)
static

◆ setForegroundColor()

void gBaseGUIObject::setForegroundColor ( gColor * foregroundColor)
static

◆ setMiddlegroundColor()

void gBaseGUIObject::setMiddlegroundColor ( gColor * middlegroundColor)
static

◆ setNavigationBackgroundColor()

void gBaseGUIObject::setNavigationBackgroundColor ( gColor * navigationBackgroundColor)
static

◆ setNavigationFontColor()

void gBaseGUIObject::setNavigationFontColor ( gColor * navigationFontColor)
static

◆ setParent()

virtual void gBaseGUIObject::setParent ( gBaseGUIObject * parentGUIObject)
virtual

◆ setParentSlotNo()

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

◆ setPressedButtonColor()

void gBaseGUIObject::setPressedButtonColor ( gColor * color)
static

◆ setPressedButtonFontColor()

void gBaseGUIObject::setPressedButtonFontColor ( gColor * color)
static

◆ setRootApp()

void gBaseGUIObject::setRootApp ( gBaseApp * root)

◆ setTextBackgroundColor()

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

◆ setVisible()

void gBaseGUIObject::setVisible ( bool isVisible)

◆ unfocus()

virtual void gBaseGUIObject::unfocus ( )
virtual

Reimplemented in gGUIContainer, gGUISizer, and gGUITextbox.

◆ update()

◆ windowResized()

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

◆ 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

◆ isvisible

bool gBaseGUIObject::isvisible
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: