|
GlistEngine
|
#include <gGUIMenubar.h>


Public Member Functions | |
| gGUIMenuItem (std::string text) | |
| ~gGUIMenuItem () | |
| int | getItemId () |
| int | getParentItemId () |
| void | setParentItemId (int itemId) |
| int | addChild (std::string text, bool addSeperator=false) |
| int | addChild (gGUIMenuItem childItem) |
| int | getChildNum () |
| void | removeChild (int childNo) |
| gGUIMenuItem * | getChild (int childNo) |
| gGUIMenuItem * | findChild (int itemId) |
| virtual void | draw () |
| void | setMenuicon (int menuItemid, std::string icon) |
| void | setMenuicon (int menuItemId, int icon) |
| void | mouseMoved (int x, int y) |
| void | mousePressed (int x, int y, int button) |
| void | mouseReleased (int x, int y, int button) |
| void | update () |
| void | resInitialize () |
Public Member Functions inherited from gGUIControl | |
| gGUIControl () | |
| virtual | ~gGUIControl () |
| virtual void | set (gBaseApp *root, gBaseGUIObject *topParentGUIObject, gBaseGUIObject *parentGUIObject, int parentSlotLineNo, int parentSlotColumnNo, int x, int y, int w, int h) |
| virtual int | getCursor (int x, int y) |
| 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) |
| 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 | mouseDragged (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) |
Public Attributes | |
| int | menuboxx |
| int | menuboxy |
| int | menuboxw |
| int | menuboxh |
| int | texty |
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 | |
| static const int | TYPE_ITEM = 0 |
| static const int | TYPE_SEPERATOR = 1 |
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 | |
| static int | totaltextw |
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 Protected Attributes inherited from gObject | |
| static int | renderpassnum |
| static int | renderpassno |
| static int | releasescaling |
| static int | releaseresolution |
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 gRenderer * | getRenderer () |
| 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) |
Protected Attributes inherited from gGUIControl | |
| bool | countasspace |
| int | oldwidth |
| int | oldheight |
Protected Attributes inherited from gBaseGUIObject | |
| std::string | title |
| gBaseApp * | root |
| gBaseGUIObject * | topparent |
| gBaseGUIObject * | parent |
| bool | isenabled |
| bool | istitleon |
| int | parentslotlineno |
| int | parentslotcolumnno |
The menubar is a thin, horizontal bar containing the labels of the menus in GUI. This class provides the user with a place in the pop-up window to find most of a program's core functions. To these functions; we can give examples af adding new file or deleting file and exiting the app.
| gGUIMenuItem::gGUIMenuItem | ( | std::string | text | ) |
| gGUIMenuItem::~gGUIMenuItem | ( | ) |
| int gGUIMenuItem::addChild | ( | gGUIMenuItem | childItem | ) |
| addChild | Adds a child to the gGUIMenubar vector |
| int gGUIMenuItem::addChild | ( | std::string | text, |
| bool | addSeperator = false |
||
| ) |
| addChild | Adds a child to the gGUIMenubar vector |
| text | is the title of menu item |
|
virtual |
Reimplemented from gGUIControl.
Reimplemented in gGUIMenubar.
| gGUIMenuItem * gGUIMenuItem::findChild | ( | int | itemId | ) |
| gGUIMenuItem * gGUIMenuItem::getChild | ( | int | childNo | ) |
Returns selected child item
| childNo | is the number of the gGUIMenuItem object to return |
| int gGUIMenuItem::getChildNum | ( | ) |
| getChildNum | Returns the child items id. |
| int gGUIMenuItem::getItemId | ( | ) |
Gets the menubar's items id.
| int gGUIMenuItem::getParentItemId | ( | ) |
Returns the parent items id.
|
virtual |
Reimplemented from gBaseGUIObject.
|
virtual |
Reimplemented from gBaseGUIObject.
|
virtual |
Reimplemented from gBaseGUIObject.
| void gGUIMenuItem::removeChild | ( | int | childNo | ) |
Removes the child item from the gGUIMenubar's vector
| childNo | number of child item to be removed. |
| void gGUIMenuItem::resInitialize | ( | ) |
| void gGUIMenuItem::setMenuicon | ( | int | menuItemId, |
| int | icon | ||
| ) |
Sets the icons found in the game engine.
| menuItemId | the id of the item to be added icon |
| icon | to be added from game engine. |
| void gGUIMenuItem::setMenuicon | ( | int | menuItemid, |
| std::string | icon | ||
| ) |
Sets icon to the menubar items. User can load their own icons with this command.
| menuItemId | the id of the item to be added icon |
| icon | to be added with its file location. |
| void gGUIMenuItem::setParentItemId | ( | int | itemId | ) |
Sets parent item id of an item.
| itemId | is the menu item's parent id to be set. |
|
virtual |
Reimplemented from gGUIControl.
| int gGUIMenuItem::menuboxh |
| int gGUIMenuItem::menuboxw |
| int gGUIMenuItem::menuboxx |
| int gGUIMenuItem::menuboxy |
| int gGUIMenuItem::texty |
|
staticprotected |
|
static |
|
static |