| 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 modules » Widgets

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 GUIThemeSkin * | getSkin (eWidgetType eWT, eWidgetState eWS) const
| Get a read-only skin entry for one widget type and one state.
const GUITooltipStyle * | getTooltipStyle () 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

  eWT | Widget type.
  eWS | Widget 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

  eWT | Widget type.
  eWS | Widget state.
  skin | Complete 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

  eWT | Widget type.
  eWS | Widget state.
  iR | Red component.
  iG | Green component.
  iB | Blue 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

  eWT | Widget type.
  eWS | Widget state.
  iR | Red component.
  iG | Green component.
  iB | Blue component.
  iA | Alpha 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

  eWT | Widget type.
  eWS | Widget state.
  iWidth | Border 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

  eWT | Widget type.
  eWS | Widget state.
  iCorner | Border 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

  eWT | Widget type.
  eWS | Widget state.
  iR | Red component.
  iG | Green component.
  iB | Blue component.
  iA | Alpha 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

  style | Complete 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

  iR | Red component.
  iG | Green component.
  iB | Blue component.
  iA | Alpha 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

  iR | Red component.
  iG | Green component.
  iB | Blue component.
  iA | Alpha 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

  eWT | Widget type.
  eWS | Widget state.
  sFontName | Font 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

  sFontName | Font 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

  eWT | Widget type.
  eWS | Widget state.
  idFont | Runtime 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

  idFont | Runtime 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.