GlistEngine
Loading...
Searching...
No Matches
gGUISizer Class Reference

#include <gGUISizer.h>

Inheritance diagram for gGUISizer:
Collaboration diagram for gGUISizer:

Public Member Functions

 gGUISizer ()
virtual ~gGUISizer ()
void set (gBaseApp *root, gBaseGUIObject *topParentGUIObject, gBaseGUIObject *parentGUIObject, int parentSlotLineNo, int parentSlotColumnNo, int x, int y, int w, int h) override
void set (int x, int y, int w, int h)
int getSizerType ()
void setSize (int lineNum, int columnNum)
int getLineNum ()
int getColumnNum ()
void setLineProportions (float *proportions)
void setColumnProportions (float *proportions)
void setSlotPadding (int padding, int height=0)
void setControl (int lineNo, int columnNo, gGUIControl *guiControl)
void removeControl (int lineNo, int columnNo)
gGUIControl * getControl (int lineNo, int columnNo)
void update () override
void draw () override
void unfocus () override
void enableBorders (bool isEnabled)
void enableResizing (bool isEnabled)
void enableBackgroundFill (bool isEnabled)
void setBackgroundColor (gColor color)
gColor getBackgroundColor ()
void setAlignContentVertically (bool enabled)
bool isAlignContentVertically ()
int getCursor (int x, int y) override
void keyPressed (int key) override
void keyReleased (int key) override
void charPressed (unsigned int codepoint) override
void mouseMoved (int x, int y) override
void mousePressed (int x, int y, int button) override
void mouseDragged (int x, int y, int button) override
void mouseReleased (int x, int y, int button) override
void mouseScrolled (int x, int y) override
void mouseEntered () override
void mouseExited () override
void windowResized (int w, int h) override
int getSlotWidth (int lineNo, int columnNo)
int getSlotHeight (int lineNo, int columnNo)
int getSlotX (int lineNo, int columnNo)
int getSlotY (int lineNo, int columnNo)
bool isControlSet (int lineNo, int columnNo)
void setBackgroundImage (const std::string &path)
void setBackgroungImageEnabled (bool isenable)
Public Member Functions inherited from gGUIControl
 gGUIControl ()
virtual ~gGUIControl () override
virtual int calculateContentHeight ()
virtual bool countAsSpace ()
void setCountAsSpace (bool isSpace)
void setFont (gFont *font)
gFont * getFont ()
Public Member Functions inherited from gBaseGUIObject
 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 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 Attributes

static const int SIZERTYPE_HORIZONTAL = 0
static const int SIZERTYPE_VERTICAL = 1
static const int SIZERTYPE_GRID = 2
Static Public Attributes inherited from gBaseGUIObject
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

Additional Inherited Members

Public Types inherited from gBaseGUIObject
enum  { TEXTALIGNMENT_LEFT , TEXTALIGNMENT_MIDDLE , TEXTALIGNMENT_RIGHT }
Static Public Member Functions inherited from gBaseGUIObject
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 inherited from gBaseGUIObject
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
Protected Attributes inherited from gGUIControl
bool countasspace
int oldwidth
int oldheight
gFont * localfont
Protected Attributes inherited from gBaseGUIObject
std::string title
gBaseApp * root
gBaseGUIObject * topparent
gBaseGUIObject * parent
bool isenabled
bool isvisible
bool istitleon
int parentslotlineno
int parentslotcolumnno
Static Protected Attributes inherited from gBaseGUIObject
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

Constructor & Destructor Documentation

◆ gGUISizer()

gGUISizer::gGUISizer ( )

◆ ~gGUISizer()

virtual gGUISizer::~gGUISizer ( )
virtual

Member Function Documentation

◆ charPressed()

void gGUISizer::charPressed ( unsigned int codepoint)
overridevirtual

Reimplemented from gBaseGUIObject.

◆ draw()

void gGUISizer::draw ( )
overridevirtual

Reimplemented from gGUIControl.

◆ enableBackgroundFill()

void gGUISizer::enableBackgroundFill ( bool isEnabled)

◆ enableBorders()

void gGUISizer::enableBorders ( bool isEnabled)

◆ enableResizing()

void gGUISizer::enableResizing ( bool isEnabled)

◆ getBackgroundColor()

gColor gGUISizer::getBackgroundColor ( )

◆ getColumnNum()

int gGUISizer::getColumnNum ( )

◆ getControl()

gGUIControl * gGUISizer::getControl ( int lineNo,
int columnNo )

◆ getCursor()

int gGUISizer::getCursor ( int x,
int y )
overridevirtual

Reimplemented from gGUIControl.

◆ getLineNum()

int gGUISizer::getLineNum ( )

◆ getSizerType()

int gGUISizer::getSizerType ( )

◆ getSlotHeight()

int gGUISizer::getSlotHeight ( int lineNo,
int columnNo )

◆ getSlotWidth()

int gGUISizer::getSlotWidth ( int lineNo,
int columnNo )

◆ getSlotX()

int gGUISizer::getSlotX ( int lineNo,
int columnNo )

◆ getSlotY()

int gGUISizer::getSlotY ( int lineNo,
int columnNo )

◆ isAlignContentVertically()

bool gGUISizer::isAlignContentVertically ( )

◆ isControlSet()

bool gGUISizer::isControlSet ( int lineNo,
int columnNo )

◆ keyPressed()

void gGUISizer::keyPressed ( int key)
overridevirtual

Reimplemented from gBaseGUIObject.

◆ keyReleased()

void gGUISizer::keyReleased ( int key)
overridevirtual

Reimplemented from gBaseGUIObject.

◆ mouseDragged()

void gGUISizer::mouseDragged ( int x,
int y,
int button )
overridevirtual

Reimplemented from gBaseGUIObject.

◆ mouseEntered()

void gGUISizer::mouseEntered ( )
overridevirtual

Reimplemented from gBaseGUIObject.

◆ mouseExited()

void gGUISizer::mouseExited ( )
overridevirtual

Reimplemented from gBaseGUIObject.

◆ mouseMoved()

void gGUISizer::mouseMoved ( int x,
int y )
overridevirtual

Reimplemented from gBaseGUIObject.

◆ mousePressed()

void gGUISizer::mousePressed ( int x,
int y,
int button )
overridevirtual

Reimplemented from gBaseGUIObject.

◆ mouseReleased()

void gGUISizer::mouseReleased ( int x,
int y,
int button )
overridevirtual

Reimplemented from gBaseGUIObject.

◆ mouseScrolled()

void gGUISizer::mouseScrolled ( int x,
int y )
overridevirtual

Reimplemented from gBaseGUIObject.

◆ removeControl()

void gGUISizer::removeControl ( int lineNo,
int columnNo )

◆ set() [1/2]

void gGUISizer::set ( gBaseApp * root,
gBaseGUIObject * topParentGUIObject,
gBaseGUIObject * parentGUIObject,
int parentSlotLineNo,
int parentSlotColumnNo,
int x,
int y,
int w,
int h )
overridevirtual

Reimplemented from gGUIControl.

◆ set() [2/2]

void gGUISizer::set ( int x,
int y,
int w,
int h )

◆ setAlignContentVertically()

void gGUISizer::setAlignContentVertically ( bool enabled)

◆ setBackgroundColor()

void gGUISizer::setBackgroundColor ( gColor color)

◆ setBackgroundImage()

void gGUISizer::setBackgroundImage ( const std::string & path)

◆ setBackgroungImageEnabled()

void gGUISizer::setBackgroungImageEnabled ( bool isenable)

◆ setColumnProportions()

void gGUISizer::setColumnProportions ( float * proportions)

◆ setControl()

void gGUISizer::setControl ( int lineNo,
int columnNo,
gGUIControl * guiControl )

◆ setLineProportions()

void gGUISizer::setLineProportions ( float * proportions)

◆ setSize()

void gGUISizer::setSize ( int lineNum,
int columnNum )

◆ setSlotPadding()

void gGUISizer::setSlotPadding ( int padding,
int height = 0 )

◆ unfocus()

void gGUISizer::unfocus ( )
overridevirtual

Reimplemented from gBaseGUIObject.

◆ update()

void gGUISizer::update ( )
overridevirtual

Reimplemented from gGUIControl.

◆ windowResized()

void gGUISizer::windowResized ( int w,
int h )
overridevirtual

Reimplemented from gBaseGUIObject.

Member Data Documentation

◆ SIZERTYPE_GRID

const int gGUISizer::SIZERTYPE_GRID = 2
static

◆ SIZERTYPE_HORIZONTAL

const int gGUISizer::SIZERTYPE_HORIZONTAL = 0
static

◆ SIZERTYPE_VERTICAL

const int gGUISizer::SIZERTYPE_VERTICAL = 1
static

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