| CRM64Pro GDK v0.16.0 A free cross-platform game development kit built on top of SDL 3.0

Loading...
Searching...
No Matches
CRM64Pro::Widget
GUI modules » Widgets

Widget Object. More...

## Detailed Description

Widget Object.

## Public Member Functions
virtual bool | info (Sint32 iMode=0)
| Request Widget object information.
Sint32 | disable ()
| Disable a widget.
Sint32 | show ()
| Show a widget.
Sint32 | hide ()
| Hide a widget.
eGeneralStatus | status () const
| Get the widget status.
bool | setFeatures (Uint32 iFeatures, bool bEnable)
| Set advanced features.
Uint32 | getFeatures () const
| Get advanced features.
virtual Sint32 | setSize (Sint32 iWidth, Sint32 iHeight)
| Set the size.
Sint32 | getWidth () const
| Get the widget width.
Sint32 | getHeight () const
| Get the widget height.
Sint32 | setPosition (const Position &posX=Position(PH_CENTER), const Position &posY=Position(PH_CENTER))
| Set the position.
const Position & | getPositionX () const
| Get the widget X position.
const Position & | getPositionY () const
| Get the widget Y position.
virtual Sint32 | setMargin (Sint32 iTop, Sint32 iRight, Sint32 iBottom, Sint32 iLeft)
| Set the margins.
Sint32 | getMargin (Sint32 *iTop, Sint32 *iRight, Sint32 *iBottom, Sint32 *iLeft)
| Get the margins.
virtual Sint32 | setThumbSize (Sint32 iSize)
| Set a fixed size for the slider thumb.
Sint32 | setAlphaMod (Uint8 iAlpha)
| Set alpha modulation used for rendering this widget.
Uint8 | getAlphaMod () const
| Get alpha modulation used for rendering this widget.
virtual Sint32 | setText (const string &sText, const Position &posX=Position(PH_CENTER), const Position &posY=Position(PH_CENTER))
| Set the text (Global replace).
virtual Sint32 | getText (string &sText, Sint32 iParam1=-1) const
| Get the text.
virtual Sint32 | appendText (const string &sText)
| Append text to the current stream/cursor position.
virtual Sint32 | getLineCount () const
| Get the total number of lines.
virtual string | getLine (Sint32 iLineIndex) const
| Get a specific line of text.
virtual Sint32 | appendLine (const string &sText)
| Add a new line at the bottom.
virtual Sint32 | setLine (Sint32 iLineIndex, const string &sText)
| Replace a specific line.
virtual Sint32 | insertLine (Sint32 iLineIndex, const string &sText)
| Insert a new line at a specific index.
virtual Sint32 | removeLine (Sint32 iLineIndex)
| Remove a specific line.
virtual Sint32 | addItem (const string &sItem)
| Add an item to the list.
virtual Sint32 | insertItem (Sint32 iIndex, const string &sItem)
| Insert an item at a specific index.
virtual Sint32 | removeItem (Sint32 iIndex)
| Remove an item at a specific index.
virtual Sint32 | clearItems ()
| Clear all items from the list.
virtual Sint32 | selectItem (Sint32 iIndex)
| Select an item in the list.
virtual Sint32 | getSelectedItem (string *sItem=nullptr) const
| Get the selected item text.
virtual Sint32 | setKey (SDL_Keycode keycode)
| Set the assigned key.
SDL_Keycode | getKey () const
| Get the assigned key.
virtual Sint32 | setValue (Sint32 iValue)
| Set a value.
virtual Sint32 | getValue () const
| Get current value.
virtual Sint32 | getValueGroup (Sint32 iGroup)
| Get enabled checkbox in a group.
virtual Sint32 | setRange (Sint32 iRange)
| Set the range.
virtual Sint32 | getRange () const
| Get current range.
Sint32 | setState (eWidgetState eWS=WS_NORMAL)
| Set the widget state.
virtual Sint32 | setScroll (Sint32 iUnitsX, Sint32 iUnitsY)
| Modify the widget scroll.
virtual Sint32 | getScroll (Sint32 *iUnitsX, Sint32 *iUnitsY) const
| Get the widget current scroll.
virtual Sint32 | getVisibleItems (Sint32 *iUnitsX, Sint32 *iUnitsY) const
| Get visible items.
virtual Sint32 | setFont (Sint32 idFont, eWidgetState eWS=WS_DEFAULT)
| Set the font.
Sint32 | getFont (eWidgetState eWS=WS_NORMAL) const
| Get the font.
virtual Sint32 | setGroup (Sint32 iGroup)
| Set the checkbox group.
virtual Sint32 | getGroup () const
| Get the checkbox group.
Sint32 | setBorderWidth (Sint32 iWidth, eWidgetState eWS=WS_DEFAULT)
| Set the border width.
Sint32 | getBorderWidth (eWidgetState eWS=WS_NORMAL) const
| Get the border width.
Sint32 | setBorderCorner (Sint32 iRad, eWidgetState eWS=WS_DEFAULT)
| Set the border corner radius.
Sint32 | getBorderCorner (eWidgetState eWS=WS_NORMAL) const
| Get the border corner radius.
Sint32 | setBorderColor (Uint8 iR, Uint8 iG, Uint8 iB, Uint8 iA, eWidgetState eWS=WS_DEFAULT)
| Set the border color.
Sint32 | getBorderColor (Uint8 *iR, Uint8 *iG, Uint8 *iB, Uint8 *iA, eWidgetState eWS=WS_NORMAL) const
| Get the border color.
Sint32 | setBgColor (Uint8 iR, Uint8 iG, Uint8 iB, eWidgetState eWS=WS_DEFAULT)
| Set the background color.
Sint32 | getBgColor (Uint8 *iR, Uint8 *iG, Uint8 *iB, eWidgetState eWS=WS_NORMAL) const
| Get the background color.
Sint32 | setBgImage (const string &sCDCFile, const string &sName, eWidgetState eWS=WS_NORMAL)
| Set the background image.
Sint32 | setBgImage (Sint32 idCDC, const string &sName, eWidgetState eWS=WS_NORMAL)
| Set the background image.
Sint32 | setBgImage (Sint32 idImage, eWidgetState eWS=WS_NORMAL)
| Set the background image.
Sint32 | getBgImage (eWidgetState eWS=WS_NORMAL) const
| Get the background image.
Sint32 | setBgSprite (const string &sCDCFile, const string &sName, eWidgetState eWS=WS_DEFAULT, Sint32 iAnim=0)
| Set the background sprite.
Sint32 | setBgSprite (Sint32 idCDC, const string &sName, eWidgetState eWS=WS_DEFAULT, Sint32 iAnim=0)
| Set the background sprite.
Sint32 | setBgSprite (Sint32 idSprite, eWidgetState eWS=WS_DEFAULT, Sint32 iAnim=0)
| Set the background sprite.
Sint32 | getBgSprite (eWidgetState eWS=WS_NORMAL, Sint32 *iAnim=nullptr) const
| Get the background sprite.
Sint32 | setFunction (Sint32(*stateFunc)(void *, void *), void *iParam1=nullptr, void *iParam2=nullptr, eWidgetState eWS=WS_ACTION)
| Set a function to be called on given state.