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

#include <gGUIScrollable.h>

Inheritance diagram for gGUIScrollable:
Collaboration diagram for gGUIScrollable:

Public Member Functions

 gGUIScrollable ()
virtual ~gGUIScrollable () override
void enableScrollbars (bool isVerticalEnabled, bool isHorizontalEnabled)
void updateScrollbar ()
void draw () override
virtual void drawContent ()
virtual void drawScrollbars ()
void windowResized (int w, int h) 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
int getVerticalScroll ()
gFbo * getFbo ()
int getTitleTop ()
void setToolbarSpace (int toolbarW, int toolbarH)
Public Member Functions inherited from gGUIControl
 gGUIControl ()
virtual ~gGUIControl () override
virtual void set (gBaseApp *root, gBaseGUIObject *topParentGUIObject, gBaseGUIObject *parentGUIObject, int parentSlotLineNo, int parentSlotColumnNo, int x, int y, int w, int h)
int getCursor (int x, int y) override
void update () 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 keyPressed (int key)
virtual void keyReleased (int key)
virtual void charPressed (unsigned int codepoint)
virtual void mouseEntered ()
virtual void mouseExited ()
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)

Protected Member Functions

bool isVerticalScrollEnabled () const
bool isHorizontalScrollEnabled () const
bool hasVerticalOverflow () const
bool hasHorizontalOverflow () const
bool isPointInsideVerticalScrollbar (int x, int y, bool checkFullSize=false)
bool isPointInsideHorizontalScrollbar (int x, int y, bool checkFullSize=false)
void setDimensions (int width, int height)

Protected Attributes

const int barsize = 12
int scrollamount = 8
int boxw = 0
int boxh = 0
int totalw = 0
int totalh = 0
int verticalscroll = 0
int horizontalscroll = 0
int verticalscrollbarpos = 0
int horizontalscrollbarpos = 0
int scrollbarverticalsize = 0
int scrollbarhorizontalsize = 0
bool isdraggingverticalscroll = false
int verticalscrolldragstart = 0
float verticalscrollclickedtime = 0.0f
bool isdragginghorizontalscroll = false
int horizontalscrolldragstart = 0
float horizontalscrollclickedtime = 0.0f
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

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

◆ gGUIScrollable()

gGUIScrollable::gGUIScrollable ( )

◆ ~gGUIScrollable()

virtual gGUIScrollable::~gGUIScrollable ( )
overridevirtual

Member Function Documentation

◆ draw()

void gGUIScrollable::draw ( )
overridevirtual

Reimplemented from gGUIControl.

Reimplemented in gGUIStatusBar, gGUITable, gGUITimebox, and gGUIToolbar.

◆ drawContent()

virtual void gGUIScrollable::drawContent ( )
virtual

◆ drawScrollbars()

virtual void gGUIScrollable::drawScrollbars ( )
virtual

◆ enableScrollbars()

void gGUIScrollable::enableScrollbars ( bool isVerticalEnabled,
bool isHorizontalEnabled )

◆ getFbo()

gFbo * gGUIScrollable::getFbo ( )

◆ getTitleTop()

int gGUIScrollable::getTitleTop ( )

◆ getVerticalScroll()

int gGUIScrollable::getVerticalScroll ( )

◆ hasHorizontalOverflow()

bool gGUIScrollable::hasHorizontalOverflow ( ) const
protected

◆ hasVerticalOverflow()

bool gGUIScrollable::hasVerticalOverflow ( ) const
protected

◆ isHorizontalScrollEnabled()

bool gGUIScrollable::isHorizontalScrollEnabled ( ) const
protected

◆ isPointInsideHorizontalScrollbar()

bool gGUIScrollable::isPointInsideHorizontalScrollbar ( int x,
int y,
bool checkFullSize = false )
protected

◆ isPointInsideVerticalScrollbar()

bool gGUIScrollable::isPointInsideVerticalScrollbar ( int x,
int y,
bool checkFullSize = false )
protected

◆ isVerticalScrollEnabled()

bool gGUIScrollable::isVerticalScrollEnabled ( ) const
protected

◆ mouseDragged()

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

Reimplemented from gBaseGUIObject.

Reimplemented in gGUIStatusBar, and gGUITimebox.

◆ mouseMoved()

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

Reimplemented from gBaseGUIObject.

Reimplemented in gGUITable.

◆ mousePressed()

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

Reimplemented from gBaseGUIObject.

Reimplemented in gGUIStatusBar, gGUITable, gGUITimebox, and gGUITreelist.

◆ mouseReleased()

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

Reimplemented from gBaseGUIObject.

Reimplemented in gGUIStatusBar, gGUITimebox, and gGUITreelist.

◆ mouseScrolled()

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

Reimplemented from gBaseGUIObject.

◆ setDimensions()

void gGUIScrollable::setDimensions ( int width,
int height )
protected

◆ setToolbarSpace()

void gGUIScrollable::setToolbarSpace ( int toolbarW,
int toolbarH )

◆ updateScrollbar()

void gGUIScrollable::updateScrollbar ( )

◆ windowResized()

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

Reimplemented from gBaseGUIObject.

Reimplemented in gGUIStatusBar.

Member Data Documentation

◆ barsize

const int gGUIScrollable::barsize = 12
protected

◆ boxh

int gGUIScrollable::boxh = 0
protected

◆ boxw

int gGUIScrollable::boxw = 0
protected

◆ horizontalscroll

int gGUIScrollable::horizontalscroll = 0
protected

◆ horizontalscrollbarpos

int gGUIScrollable::horizontalscrollbarpos = 0
protected

◆ horizontalscrollclickedtime

float gGUIScrollable::horizontalscrollclickedtime = 0.0f
protected

◆ horizontalscrolldragstart

int gGUIScrollable::horizontalscrolldragstart = 0
protected

◆ isdragginghorizontalscroll

bool gGUIScrollable::isdragginghorizontalscroll = false
protected

◆ isdraggingverticalscroll

bool gGUIScrollable::isdraggingverticalscroll = false
protected

◆ scrollamount

int gGUIScrollable::scrollamount = 8
protected

◆ scrollbarhorizontalsize

int gGUIScrollable::scrollbarhorizontalsize = 0
protected

◆ scrollbarverticalsize

int gGUIScrollable::scrollbarverticalsize = 0
protected

◆ totalh

int gGUIScrollable::totalh = 0
protected

◆ totalw

int gGUIScrollable::totalw = 0
protected

◆ verticalscroll

int gGUIScrollable::verticalscroll = 0
protected

◆ verticalscrollbarpos

int gGUIScrollable::verticalscrollbarpos = 0
protected

◆ verticalscrollclickedtime

float gGUIScrollable::verticalscrollclickedtime = 0.0f
protected

◆ verticalscrolldragstart

int gGUIScrollable::verticalscrolldragstart = 0
protected

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