CRM64Pro GDK v0.17.0
A free cross-platform game development kit built on top of SDL 3.0
Loading...
Searching...
No Matches
CRM64Pro::Widget

Widget Object. More...

Detailed Description

Widget Object.

Inheritance diagram for CRM64Pro::Widget:

Public Member Functions

virtual bool info (Sint32 iMode=0)
 Request Widget object information.
const string & getName () const
 Get the widget name.
Uint32 getID () const
 Get the widget ID.
eWidgetType getType () const
 Get the widget type.
Sint32 disable ()
 Disable a widget.
Sint32 enable ()
 Enable a widget.
Sint32 show ()
 Show a widget.
Sint32 hide ()
 Hide a widget.
eGeneralStatus status () const
 Get the widget status.
bool setFeatures (eWidgetFeature eWF, bool bEnable)
 Set widget feature flags.
eWidgetFeature getFeatures () const
 Get widget feature flags.
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 PositiongetPositionX () const
 Get the widget X position.
const PositiongetPositionY () 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.
Sint32 setAlphaMod (Uint8 iAlpha)
 Set alpha modulation used for rendering this widget.
Uint8 getAlphaMod () const
 Get alpha modulation used for rendering this widget.
eWidgetState getState () const
 Get the widget state.
virtual Sint32 setFont (Sint32 idFont, eWidgetState eWS=WS_DEFAULT)
 Set the font.
Sint32 getFont (eWidgetState eWS=WS_NORMAL) const
 Get the font.
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 effective border color.
Sint32 setBackgroundColor (Uint8 iR, Uint8 iG, Uint8 iB, eWidgetState eWS=WS_DEFAULT)
 Set the background color.
Sint32 getBackgroundColor (Uint8 *iR, Uint8 *iG, Uint8 *iB, eWidgetState eWS=WS_NORMAL) const
 Get the effective background color.
Sint32 setSelectionColor (Uint8 iR, Uint8 iG, Uint8 iB, Uint8 iA, eWidgetState eWS=WS_DEFAULT)
 Set the selection highlight color.
Sint32 getSelectionColor (Uint8 *iR, Uint8 *iG, Uint8 *iB, Uint8 *iA, eWidgetState eWS=WS_NORMAL) const
 Get the effective selection highlight color.
Sint32 resetSkin (eWidgetState eWS=WS_DEFAULT)
 Clear custom skin overrides and custom background resources.
Uint32 getSkinOverrideMask (eWidgetState eWS=WS_NORMAL) const
 Get the custom skin override mask for one state.
Sint32 clearBackground (eWidgetState eWS=WS_DEFAULT)
 Clear custom background resources for one state.
Sint32 setBackgroundImage (const string &sCDCFile, const string &sName, eWidgetState eWS=WS_NORMAL)
 Set the background image.
Sint32 setBackgroundImage (Sint32 idCDC, const string &sName, eWidgetState eWS=WS_NORMAL)
 Set the background image.
Sint32 setBackgroundImage (Sint32 idImage, eWidgetState eWS=WS_NORMAL)
 Set the background image.
Sint32 getBackgroundImage (eWidgetState eWS=WS_NORMAL) const
 Get the background image.
Sint32 setBackgroundSprite (const string &sCDCFile, const string &sName, eWidgetState eWS=WS_DEFAULT, Sint32 iAnim=0)
 Set the background sprite.
Sint32 setBackgroundSprite (Sint32 idCDC, const string &sName, eWidgetState eWS=WS_DEFAULT, Sint32 iAnim=0)
 Set the background sprite.
Sint32 setBackgroundSprite (Sint32 idSprite, eWidgetState eWS=WS_DEFAULT, Sint32 iAnim=0)
 Set the background sprite.
Sint32 getBackgroundSprite (eWidgetState eWS=WS_NORMAL, Sint32 *iAnim=nullptr) const
 Get the background sprite.
Sint32 setOnAction (function< void(Widget &)> callback)
 Set a callback fired when the widget triggers an action.
Sint32 setOnHoverEnter (function< void(Widget &)> callback)
 Set a callback fired when the widget starts being hovered.
Sint32 setOnHoverExit (function< void(Widget &)> callback)
 Set a callback fired when the widget stops being hovered.
Sint32 setOnPressed (function< void(Widget &)> callback)
 Set a callback fired when the widget is pressed.
Sint32 setOnFocusLost (function< void(Widget &)> callback)
 Set a callback fired when the widget loses focus.
Sint32 setOnValueCommitted (function< void(Widget &)> callback)
 Set a callback fired when an edit widget commits a changed value.
Sint32 setOnSelectionChanged (function< void(Widget &)> callback)
 Set a callback fired when a selection widget changes selection.
Sint32 setOnValueChanged (function< void(Widget &)> callback)
 Set a callback fired when a live value widget changes value.
Sint32 setOnToggled (function< void(Widget &)> callback)
 Set a callback fired when a toggle widget changes state.
Sint32 setTooltip (const string &sText)
 Set the tooltip text.
const string & getTooltip () const
 Get the tooltip text.
Sint32 setTooltipTTL (Sint32 iMS)
 Set the tooltip auto-hide time.
Sint32 getTooltipTTL () const
 Get the tooltip auto-hide time.
Sint32 setTooltipFollowCursor (bool bEnable=true)
 Set whether the tooltip follows the cursor.
bool isTooltipFollowingCursor () const
 Check whether the tooltip follows the cursor.
Sint32 setTooltipBackgroundColor (Uint8 iR, Uint8 iG, Uint8 iB, Uint8 iA)
 Set the widget-local tooltip background color override.
Sint32 getTooltipBackgroundColor (Uint8 *iR, Uint8 *iG, Uint8 *iB, Uint8 *iA) const
 Get the effective tooltip background color.
Sint32 setTooltipBorderColor (Uint8 iR, Uint8 iG, Uint8 iB, Uint8 iA)
 Set the widget-local tooltip border color override.
Sint32 getTooltipBorderColor (Uint8 *iR, Uint8 *iG, Uint8 *iB, Uint8 *iA) const
 Get the effective tooltip border color.
Sint32 setTooltipFontName (const string &sFontName)
 Set the widget-local tooltip font name override.
Sint32 setTooltipFont (Sint32 idFont)
 Set the widget-local runtime tooltip font id override.
Sint32 getTooltipFont () const
 Get the effective tooltip font id.
Uint32 getTooltipOverrideMask () const
 Get the widget-local tooltip style override mask.
Sint32 resetTooltipStyle ()
 Reset widget-local tooltip style overrides.