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

#include <gGUITreelist.h>

Inheritance diagram for gGUITreelist:
Collaboration diagram for gGUITreelist:

Classes

struct  Element
 

Public Member Functions

 gGUITreelist ()
 
virtual ~gGUITreelist ()
 
void set (gBaseApp *root, gBaseGUIObject *topParentGUIObject, gBaseGUIObject *parentGUIObject, int parentSlotLineNo, int parentSlotColumnNo, int x, int y, int w, int h)
 
void removeElement (Element *element)
 
void addElement (Element *element)
 
void addElement (Element *element, Element *parent)
 
void insertData (Element *element, std::string newtitle)
 
void refreshList ()
 
void clear ()
 
void drawContent ()
 
void mousePressed (int x, int y, int button)
 
void mouseReleased (int x, int y, int button)
 
void setChosenColor (float r, float g, float b)
 
void setVisibleLineNumber (int linenumber)
 
void setIconType (bool isicon)
 
void setIcon (gImage *icon, Element *element)
 
void setIcon (int iconid, Element *element)
 
void setIconsColor (float r, float g, float b)
 
std::string getTitle (Element *element)
 
std::string getTitle (int elementNo)
 
std::string getSelectedTitle ()
 
int getNodenum ()
 
int getOrderno (Element *element)
 
bool isExpanded (Element *element)
 
bool isParent (Element *element)
 
bool getIconType ()
 
gTexturegetIcon (Element *element)
 
gColor getChosenColor ()
 
gColor getIconsColor ()
 
int getVisibleLineNumber ()
 
ElementgetRootElement ()
 
void setSelectedLineNumber (int lineNo)
 
int getSelectedLineNumber ()
 
- Public Member Functions inherited from gGUIScrollable
 gGUIScrollable ()
 
virtual ~gGUIScrollable ()
 
void enableScrollbars (bool isVerticalEnabled, bool isHorizontalEnabled)
 
void updateScrollbar ()
 
void draw ()
 
virtual void drawScrollbars ()
 
virtual void windowResized (int w, int h)
 
virtual void mouseMoved (int x, int y)
 
virtual void mouseDragged (int x, int y, int button)
 
virtual void mouseScrolled (int x, int y)
 
int getVerticalScroll ()
 
gFbogetFbo ()
 
int getTitleTop ()
 
void setToolbarSpace (int toolbarW, int toolbarH)
 
- Public Member Functions inherited from gGUIControl
 gGUIControl ()
 
virtual ~gGUIControl ()
 
virtual int getCursor (int x, int y)
 
virtual void update ()
 
virtual int calculateContentHeight ()
 
virtual bool countAsSpace ()
 
void setCountAsSpace (bool isSpace)
 
- Public Member Functions inherited from gBaseGUIObject
 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 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)
 
- 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)
 

Public Attributes

int nodenum
 
std::vector< std::string > allsubtitles
 
std::vector< int > allorderno
 
std::deque< gTexture * > icons
 
- 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
 

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 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)
 
- 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
 
- Protected Member Functions inherited from gGUIScrollable
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 inherited from gGUIScrollable
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
 
- Protected Attributes inherited from gBaseGUIObject
std::string title
 
gBaseApproot
 
gBaseGUIObjecttopparent
 
gBaseGUIObjectparent
 
bool isenabled
 
bool istitleon
 
int parentslotlineno
 
int parentslotcolumnno
 
- Static Protected Attributes inherited from gBaseGUIObject
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
 

Constructor & Destructor Documentation

◆ gGUITreelist()

gGUITreelist::gGUITreelist ( )

◆ ~gGUITreelist()

virtual gGUITreelist::~gGUITreelist ( )
virtual

Member Function Documentation

◆ addElement() [1/2]

void gGUITreelist::addElement ( Element element)

◆ addElement() [2/2]

void gGUITreelist::addElement ( Element element,
Element parent 
)

◆ clear()

void gGUITreelist::clear ( )

◆ drawContent()

void gGUITreelist::drawContent ( )
virtual

Reimplemented from gGUIScrollable.

◆ getChosenColor()

gColor gGUITreelist::getChosenColor ( )

◆ getIcon()

gTexture * gGUITreelist::getIcon ( Element element)

◆ getIconsColor()

gColor gGUITreelist::getIconsColor ( )

◆ getIconType()

bool gGUITreelist::getIconType ( )

◆ getNodenum()

int gGUITreelist::getNodenum ( )

◆ getOrderno()

int gGUITreelist::getOrderno ( Element element)

◆ getRootElement()

Element * gGUITreelist::getRootElement ( )

◆ getSelectedLineNumber()

int gGUITreelist::getSelectedLineNumber ( )

◆ getSelectedTitle()

std::string gGUITreelist::getSelectedTitle ( )

◆ getTitle() [1/2]

std::string gGUITreelist::getTitle ( Element element)

◆ getTitle() [2/2]

std::string gGUITreelist::getTitle ( int  elementNo)

◆ getVisibleLineNumber()

int gGUITreelist::getVisibleLineNumber ( )

◆ insertData()

void gGUITreelist::insertData ( Element element,
std::string  newtitle 
)

◆ isExpanded()

bool gGUITreelist::isExpanded ( Element element)

◆ isParent()

bool gGUITreelist::isParent ( Element element)

◆ mousePressed()

void gGUITreelist::mousePressed ( int  x,
int  y,
int  button 
)
virtual

Reimplemented from gGUIScrollable.

◆ mouseReleased()

void gGUITreelist::mouseReleased ( int  x,
int  y,
int  button 
)
virtual

Reimplemented from gGUIScrollable.

◆ refreshList()

void gGUITreelist::refreshList ( )

◆ removeElement()

void gGUITreelist::removeElement ( Element element)

◆ set()

void gGUITreelist::set ( gBaseApp root,
gBaseGUIObject topParentGUIObject,
gBaseGUIObject parentGUIObject,
int  parentSlotLineNo,
int  parentSlotColumnNo,
int  x,
int  y,
int  w,
int  h 
)
virtual

Reimplemented from gGUIControl.

◆ setChosenColor()

void gGUITreelist::setChosenColor ( float  r,
float  g,
float  b 
)

◆ setIcon() [1/2]

void gGUITreelist::setIcon ( gImage icon,
Element element 
)

◆ setIcon() [2/2]

void gGUITreelist::setIcon ( int  iconid,
Element element 
)

◆ setIconsColor()

void gGUITreelist::setIconsColor ( float  r,
float  g,
float  b 
)

◆ setIconType()

void gGUITreelist::setIconType ( bool  isicon)

◆ setSelectedLineNumber()

void gGUITreelist::setSelectedLineNumber ( int  lineNo)

◆ setVisibleLineNumber()

void gGUITreelist::setVisibleLineNumber ( int  linenumber)

Member Data Documentation

◆ allorderno

std::vector<int> gGUITreelist::allorderno

◆ allsubtitles

std::vector<std::string> gGUITreelist::allsubtitles

◆ icons

std::deque<gTexture*> gGUITreelist::icons

◆ nodenum

int gGUITreelist::nodenum

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