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

GUI theme object. More...

Detailed Description

GUI theme object.

Public Member Functions

const string & getName () const
 Get the theme name.
Uint32 getID () const
 Get the theme id.
const GUIThemeSkingetSkin (eWidgetType eWT, eWidgetState eWS) const
 Get a read-only skin entry for one widget type and one state.
const GUITooltipStylegetTooltipStyle () const
 Get the shared tooltip style for this theme.
Sint32 setSkin (eWidgetType eWT, eWidgetState eWS, const GUIThemeSkin &skin)
 Replace one skin entry for one widget type and one state.
Sint32 setSkinBackgroundColor (eWidgetType eWT, eWidgetState eWS, Uint8 iR, Uint8 iG, Uint8 iB)
 Set the background color for one widget type and one state.
Sint32 setSkinBorderColor (eWidgetType eWT, eWidgetState eWS, Uint8 iR, Uint8 iG, Uint8 iB, Uint8 iA)
 Set the border color for one widget type and one state.
Sint32 setSkinBorderWidth (eWidgetType eWT, eWidgetState eWS, Sint32 iWidth)
 Set the border width for one widget type and one state.
Sint32 setSkinBorderCorner (eWidgetType eWT, eWidgetState eWS, Sint32 iCorner)
 Set the border corner radius for one widget type and one state.
Sint32 setSkinSelectionColor (eWidgetType eWT, eWidgetState eWS, Uint8 iR, Uint8 iG, Uint8 iB, Uint8 iA)
 Set the selection highlight color for one widget type and one state.
Sint32 setTooltipStyle (const GUITooltipStyle &style)
 Replace the shared tooltip style for this theme.
Sint32 setTooltipBackgroundColor (Uint8 iR, Uint8 iG, Uint8 iB, Uint8 iA)
 Set the shared tooltip background color for this theme.
Sint32 setTooltipBorderColor (Uint8 iR, Uint8 iG, Uint8 iB, Uint8 iA)
 Set the shared tooltip border color for this theme.
Sint32 setSkinFontName (eWidgetType eWT, eWidgetState eWS, const string &sFontName)
 Set the theme font name for one widget type and one state.
Sint32 setTooltipFontName (const string &sFontName)
 Set the shared tooltip font name for this theme.
Sint32 setSkinFont (eWidgetType eWT, eWidgetState eWS, Sint32 idFont)
 Set the runtime font id for one widget type and one state.
Sint32 setTooltipFont (Sint32 idFont)
 Set the runtime tooltip font id for this theme.

Member Function Documentation

◆ getName()

const string & CRM64Pro::GUITheme::getName ( ) const

Get the theme name.

Returns
Theme name string.

◆ getID()

Uint32 CRM64Pro::GUITheme::getID ( ) const

Get the theme id.

Returns
Theme unique identifier.

◆ getSkin()

const GUIThemeSkin * CRM64Pro::GUITheme::getSkin ( eWidgetType eWT,
eWidgetState eWS ) const

Get a read-only skin entry for one widget type and one state.

Parameters
eWTWidget type.
eWSWidget state.
Returns
nullptr on failure or a pointer to the requested skin entry on success.

◆ getTooltipStyle()

const GUITooltipStyle * CRM64Pro::GUITheme::getTooltipStyle ( ) const

Get the shared tooltip style for this theme.

Returns
Pointer to the shared tooltip style, always valid while the theme exists.

◆ setSkin()

Sint32 CRM64Pro::GUITheme::setSkin ( eWidgetType eWT,
eWidgetState eWS,
const GUIThemeSkin & skin )

Replace one skin entry for one widget type and one state.

Parameters
eWTWidget type.
eWSWidget state.
skinComplete skin definition to store.
Returns
0 on success, or a negative error code on failure.

◆ setSkinBackgroundColor()

Sint32 CRM64Pro::GUITheme::setSkinBackgroundColor ( eWidgetType eWT,
eWidgetState eWS,
Uint8 iR,
Uint8 iG,
Uint8 iB )

Set the background color for one widget type and one state.

Parameters
eWTWidget type.
eWSWidget state.
iRRed component.
iGGreen component.
iBBlue component.
Returns
0 on success, or a negative error code on failure.

◆ setSkinBorderColor()

Sint32 CRM64Pro::GUITheme::setSkinBorderColor ( eWidgetType eWT,
eWidgetState eWS,
Uint8 iR,
Uint8 iG,
Uint8 iB,
Uint8 iA )

Set the border color for one widget type and one state.

Parameters
eWTWidget type.
eWSWidget state.
iRRed component.
iGGreen component.
iBBlue component.
iAAlpha component.
Returns
0 on success, or a negative error code on failure.

◆ setSkinBorderWidth()

Sint32 CRM64Pro::GUITheme::setSkinBorderWidth ( eWidgetType eWT,
eWidgetState eWS,
Sint32 iWidth )

Set the border width for one widget type and one state.

Parameters
eWTWidget type.
eWSWidget state.
iWidthBorder width in pixels.
Returns
0 on success, or a negative error code on failure.

◆ setSkinBorderCorner()

Sint32 CRM64Pro::GUITheme::setSkinBorderCorner ( eWidgetType eWT,
eWidgetState eWS,
Sint32 iCorner )

Set the border corner radius for one widget type and one state.

Parameters
eWTWidget type.
eWSWidget state.
iCornerBorder corner radius in pixels.
Returns
0 on success, or a negative error code on failure.

◆ setSkinSelectionColor()

Sint32 CRM64Pro::GUITheme::setSkinSelectionColor ( eWidgetType eWT,
eWidgetState eWS,
Uint8 iR,
Uint8 iG,
Uint8 iB,
Uint8 iA )

Set the selection highlight color for one widget type and one state.

Parameters
eWTWidget type.
eWSWidget state.
iRRed component.
iGGreen component.
iBBlue component.
iAAlpha component.
Returns
0 on success, or a negative error code on failure.

◆ setTooltipStyle()

Sint32 CRM64Pro::GUITheme::setTooltipStyle ( const GUITooltipStyle & style)

Replace the shared tooltip style for this theme.

Parameters
styleComplete tooltip style definition to store.
Returns
0 on success, or a negative error code on failure.

◆ setTooltipBackgroundColor()

Sint32 CRM64Pro::GUITheme::setTooltipBackgroundColor ( Uint8 iR,
Uint8 iG,
Uint8 iB,
Uint8 iA )

Set the shared tooltip background color for this theme.

Parameters
iRRed component.
iGGreen component.
iBBlue component.
iAAlpha component.
Returns
0 on success, or a negative error code on failure.

◆ setTooltipBorderColor()

Sint32 CRM64Pro::GUITheme::setTooltipBorderColor ( Uint8 iR,
Uint8 iG,
Uint8 iB,
Uint8 iA )

Set the shared tooltip border color for this theme.

Parameters
iRRed component.
iGGreen component.
iBBlue component.
iAAlpha component.
Returns
0 on success, or a negative error code on failure.

◆ setSkinFontName()

Sint32 CRM64Pro::GUITheme::setSkinFontName ( eWidgetType eWT,
eWidgetState eWS,
const string & sFontName )

Set the theme font name for one widget type and one state.

Parameters
eWTWidget type.
eWSWidget state.
sFontNameFont name. Built-in fonts should use the full @c64/font/... name.
Returns
0 on success, or a negative error code on failure.

◆ setTooltipFontName()

Sint32 CRM64Pro::GUITheme::setTooltipFontName ( const string & sFontName)

Set the shared tooltip font name for this theme.

Parameters
sFontNameFont name. Built-in fonts should use the full @c64/font/... name.
Returns
0 on success, or a negative error code on failure.

◆ setSkinFont()

Sint32 CRM64Pro::GUITheme::setSkinFont ( eWidgetType eWT,
eWidgetState eWS,
Sint32 idFont )

Set the runtime font id for one widget type and one state.

Parameters
eWTWidget type.
eWSWidget state.
idFontRuntime font id. Set to -1 to clear the direct font id. The theme stores a borrowed reference and will not close it.
Returns
0 on success, or a negative error code on failure.

◆ setTooltipFont()

Sint32 CRM64Pro::GUITheme::setTooltipFont ( Sint32 idFont)

Set the runtime tooltip font id for this theme.

Parameters
idFontRuntime font id. Set to -1 to clear the direct tooltip font id. The theme stores a borrowed reference and will not close it.
Returns
0 on success, or a negative error code on failure.