Support Forum       G3D Web Page     
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Static Protected Member Functions | Friends | List of all members
G3D::GuiTheme Class Reference

Renders UI elements. More...

Inherits G3D::ReferenceCountedObject.

Classes

class  TextStyle
 
Default style information for captions. More...
 

Public Types

enum  ButtonStyle {
  NORMAL_BUTTON_STYLE,
  TOOL_BUTTON_STYLE,
  NO_BUTTON_STYLE,
  BUTTON_STYLE_COUNT
}
 Controls the appearance of the button. More...
 
enum  CheckBoxStyle {
  NORMAL_CHECK_BOX_STYLE,
  BUTTON_CHECK_BOX_STYLE,
  TOOL_CHECK_BOX_STYLE,
  CHECK_BOX_STYLE_COUNT
}
 
enum  PaneStyle {
  SIMPLE_PANE_STYLE,
  ORNATE_PANE_STYLE,
  NO_PANE_STYLE,
  PANE_STYLE_COUNT
}
 
enum  RadioButtonStyle {
  NORMAL_RADIO_BUTTON_STYLE,
  BUTTON_RADIO_BUTTON_STYLE = 1,
  TOOL_RADIO_BUTTON_STYLE,
  RADIO_BUTTON_STYLE_COUNT
}
 
enum  ScrollPaneStyle {
  BORDERED_SCROLL_PANE_STYLE,
  BORDERLESS_SCROLL_PANE_STYLE,
  SCROLL_PANE_STYLE_COUNT
}
 
enum  SliderScale {
  NO_SLIDER,
  LINEAR_SLIDER,
  LOG_SLIDER
}
 Scale for sliders. More...
 
enum  TextBoxStyle {
  NORMAL_TEXT_BOX_STYLE,
  NO_BACKGROUND_UNLESS_FOCUSED_TEXT_BOX_STYLE
}
 
enum  WindowStyle {
  NORMAL_WINDOW_STYLE,
  TOOL_WINDOW_STYLE,
  DIALOG_WINDOW_STYLE,
  DRAWER_WINDOW_STYLE,
  MENU_WINDOW_STYLE,
  PANEL_WINDOW_STYLE,
  PARTIAL_DISAPPEARING_STYLE,
  FULL_DISAPPEARING_STYLE,
  NO_WINDOW_STYLE,
  WINDOW_STYLE_COUNT
}
 Controls the appearance of the window's borders and background. More...
 

Public Member Functions

void beginRendering (class RenderDevice *rd, float pixelScale)
 Call before all other render methods. More...
 
Vector2 bounds (const GuiText &text) const
 Computes the rendered size of this text (max of enabled and disabled versions) More...
 
Rect2D canvasToClickBounds (const Rect2D &bounds, float captionHeight) const
 
Rect2D canvasToClientBounds (const Rect2D &bounds, float captionHeight) const
 Given the full bounds around a canvas, returns the internal region for rendering in. More...
 
Rect2D checkBoxToClickBounds (const Rect2D &bounds, const GuiText &caption) const
 Computes the bounds around the checkbox and caption. More...
 
Rect2D clientToPaneBounds (const Rect2D &bounds, const GuiText &caption, PaneStyle paneStyle) const
 
Rect2D clientToWindowBounds (const Rect2D &bounds, WindowStyle frameStyle) const
 Given the area that controls should appear in for a window, returns the bounds that should be used to draw the window. More...
 
const TextStyledefaultStyle () const
 Return the default text style. More...
 
Rect2D dropDownListToClickBounds (const Rect2D &bounds, float captionWidth) const
 Given the bounds of a full dropDownList and caption, returns the bounds around just the control itself. More...
 
void endRendering ()
 Call after all other render methods. More...
 
Rect2D horizontalScrollBarToBarBounds (const Rect2D &bounds) const
 
Rect2D horizontalScrollBarToThumbBounds (const Rect2D &bounds, float pos, float scale) const
 
Rect2D horizontalSliderToThumbBounds (const Rect2D &bounds, float pos, float captionWidth) const
 Returns the position of the thumb button, which is needed for processing UI events for the slider. More...
 
Rect2D horizontalSliderToTrackBounds (const Rect2D &bounds, float captionWidth) const
 
Vector2 minButtonSize (const GuiText &text, ButtonStyle buttonStyle) const
 Returns the size a button would have to be to enclose this caption. More...
 
Rect2D paneToClientBounds (const Rect2D &bounds, const GuiText &caption, PaneStyle paneStyle) const
 
void pauseRendering ()
 Invoke from a custom GuiControl::render to make arbitrary RenderDevice calls. More...
 
void popClientRect ()
 
void pushClientRect (const Rect2D &r)
 
Offsets all subsequent rendering by r.x0y0() and sets the clipping region to r. More...
 
Rect2D radioButtonToClickBounds (const Rect2D &bounds, const GuiText &caption) const
 Computes the bounds around the radio button and caption. More...
 
void renderButton (const Rect2D &bounds, bool enabled, bool focused, bool pushed, const GuiText &text, ButtonStyle buttonStyle)
 Only call between beginRendering and endRendering. More...
 
void renderButtonBorder (const Rect2D &bounds, bool focused, ButtonStyle buttonStyle)
 Only call between beginRendering and endRendering. More...
 
void renderCanvas (const Rect2D &bounds, bool enabled, bool focused, const GuiText &caption, float captionHeight)
 Render a drawing area with borders that look like a text box. More...
 
void renderCheckBox (const Rect2D &bounds, bool enabled, bool focused, bool checked, const GuiText &text)
 Only call between beginRendering and endRendering. More...
 
void renderDropDownList (const Rect2D &bounds, bool enabled, bool focused, bool menuOpen, const GuiText &contentText, const GuiText &text, float captionWidth)
 
void renderHorizontalScrollBar (const Rect2D &bounds, float pos, float scale, bool focused)
 
void renderHorizontalSlider (const Rect2D &bounds, float pos, bool enabled, bool focused, const GuiText &text, float captionWidth)
 Only call between beginRendering and endRendering. More...
 
void renderLabel (const Rect2D &bounds, const GuiText &text, GFont::XAlign xalign, GFont::YAlign yalign, bool enabled, bool wordWrap=false) const
 Only call between beginRendering and endRendering. More...
 
void renderMultiLineTextBox (const Rect2D &bounds, bool enabled, bool focused, const GuiText &caption, float captionWidth, const GuiText &text, const GuiText &cursor, int cursorPosition, int highlightPosition, TextBoxStyle style)
 
void renderPane (const Rect2D &fullBounds, const GuiText &caption, PaneStyle paneStyle)
 
void renderRadioButton (const Rect2D &bounds, bool enabled, bool focused, bool checked, const GuiText &text)
 Only call between beginRendering and endRendering. More...
 
void renderSelection (const Rect2D &bounds)
 Render the selection region for a menu or list. More...
 
void renderTextBox (const Rect2D &bounds, bool enabled, bool focused, const GuiText &caption, float captionWidth, const GuiText &text, const GuiText &cursor, int cursorPosition, int highlightPosition, TextBoxStyle style)
 Render a single-line text box. More...
 
void renderTextBoxBorder (const Rect2D &fullBounds, bool enabled, bool focused)
 Render the border that is used for a text box. More...
 
void renderVerticalScrollBar (const Rect2D &bounds, float pos, float scale, bool focused)
 Only call between beginRendering and endRendering. More...
 
void renderWindow (const Rect2D &bounds, bool focused, bool hasCloseButton, bool closeButtonIsDown, bool closeIsFocused, const GuiText &text, WindowStyle frameStyle)
 Only call between beginRendering and endRendering. More...
 
void resumeRendering ()
 
float scrollBarWidth () const
 
float textBoxBorderWidth () const
 
Pad textBoxPadding () const
 
Rect2D textBoxToClickBounds (const Rect2D &bounds, float captionWidth) const
 
Rect2D verticalScrollBarToBarBounds (const Rect2D &bounds) const
 
Rect2D verticalScrollBarToThumbBounds (const Rect2D &bounds, float pos, float scale) const
 Returns the position of the thumb button, which is needed for processing UI events for the scrollBar. More...
 
Rect2D windowToClientBounds (const Rect2D &bounds, WindowStyle frameStyle) const
 Given the bounds on a window's borders, returns the bounds of the area inside the window where controls will appear. More...
 
Rect2D windowToCloseButtonBounds (const Rect2D &bounds, WindowStyle frameStyle) const
 
Rect2D windowToTitleBounds (const Rect2D &bounds, WindowStyle frameStyle) const
 

Static Public Member Functions

static shared_ptr< GuiThemefromFile (const String &filename, shared_ptr< GFont > fallbackFont=shared_ptr< GFont >(), float fallbackSize=11, const Color4 &fallbackColor=Color3::black(), const Color4 &fallbackOutlineColor=Color4::clear())
 
May return a cached copy. More...
 
static void makeThemeFromSourceFiles (const String &sourceDir, const String &whiteName, const String &blackName, const String &coordsFile, const String &destFile)
 Create a .gtm file from source files. More...
 

Static Public Attributes

static weak_ptr< GuiThemelastThemeLoaded
 

Static Protected Member Functions

template<class T , class ... ArgTypes>
static shared_ptr< T > createShared (ArgTypes &&... args)
 Like std::make_shared, but works for protected constructors. More...
 

Friends

class GuiThemeEditor
 
class GuiWindow
 

Detailed Description

Renders UI elements.

Loads and renders G3D GUI .gtm files, which can be used with G3D::Gui. .gtm files can be found in the data module data/gui directory.

Can also be used to explicitly render a UI without actual controls behind it, for example:

 theme->beginRendering(rd);
     theme->renderWindow(Rect2D::xywh(80, 70, 550, 250), false, false, false, false, "Window", GuiTheme::NORMAL_WINDOW_STYLE);
     theme->renderWindow(Rect2D::xywh(500, 120, 50, 150), true, true, true, "Tools", GuiTheme::TOOL_WINDOW_STYLE);
     theme->renderCheckBox(Rect2D::xywh(100, 100, 20, 20), true, true, true, "Check box");
     theme->renderRadioButton(Rect2D::xywh(100, 120, 20, 20), true, false, false, "Radio button");
     theme->renderButton(Rect2D::xywh(100, 160, 80, 27), true, true, true, "Button");
     theme->setFont(timesFont, 12, Color3::black(), Color4::clear());
     theme->renderButton(Rect2D::xywh(200, 160, 80, 27), true, true, true, "New Font");
     theme->setFont(arialFont, 10, Color3::black(), Color4::clear());
     theme->renderHorizontalSlider(Rect2D::xywh(100, 200, 150, 27), 0.5f, true, false, "Slider");
     int s = 30;
     theme->renderButton(Rect2D::xywh(100 + s * 0, 230, 30, 30), true, false, false, GuiText("7", iconFont));
     theme->renderButton(Rect2D::xywh(100 + s * 1, 230, 30, 30), true, false, false, GuiText("4", iconFont));
     theme->renderButton(Rect2D::xywh(100 + s * 2, 230, 30, 30), true, false, false, GuiText("=", iconFont));
     theme->renderButton(Rect2D::xywh(100 + s * 3, 230, 30, 30), true, false, true, GuiText(";", iconFont));
     theme->renderButton(Rect2D::xywh(100 + s * 4, 230, 30, 30), true, false, false, GuiText("<", iconFont));
     theme->renderButton(Rect2D::xywh(100 + s * 5, 230, 30, 30), true, false, false, GuiText("8", iconFont));
     theme->setFont(arialFont, 10, Color3::black(), Color4::clear());
  theme->endRendering();
 
See also
G3D::GuiWindow

Member Enumeration Documentation

◆ ButtonStyle

Controls the appearance of the button.

Tool buttons are square and less 3D. They are also able to shrink to smaller sizes.

Enumerator
NORMAL_BUTTON_STYLE 
TOOL_BUTTON_STYLE 
NO_BUTTON_STYLE 
BUTTON_STYLE_COUNT 

◆ CheckBoxStyle

Enumerator
NORMAL_CHECK_BOX_STYLE 

the normal checkbox appearance

BUTTON_CHECK_BOX_STYLE 

makes checkbox that looks like a button

TOOL_CHECK_BOX_STYLE 

appears as a tool-bar button.

CHECK_BOX_STYLE_COUNT 

◆ PaneStyle

Enumerator
SIMPLE_PANE_STYLE 
ORNATE_PANE_STYLE 
NO_PANE_STYLE 

NO_PANE_STYLE has no visible borders or back.

PANE_STYLE_COUNT 

◆ RadioButtonStyle

Enumerator
NORMAL_RADIO_BUTTON_STYLE 
BUTTON_RADIO_BUTTON_STYLE 
TOOL_RADIO_BUTTON_STYLE 
RADIO_BUTTON_STYLE_COUNT 

◆ ScrollPaneStyle

Enumerator
BORDERED_SCROLL_PANE_STYLE 
BORDERLESS_SCROLL_PANE_STYLE 
SCROLL_PANE_STYLE_COUNT 

◆ SliderScale

Scale for sliders.

Enumerator
NO_SLIDER 
LINEAR_SLIDER 
LOG_SLIDER 

◆ TextBoxStyle

Enumerator
NORMAL_TEXT_BOX_STYLE 
NO_BACKGROUND_UNLESS_FOCUSED_TEXT_BOX_STYLE 

Do not render the background of the text box unless it has focus.

◆ WindowStyle

Controls the appearance of the window's borders and background.

Enumerator
NORMAL_WINDOW_STYLE 

Regular border and title.

TOOL_WINDOW_STYLE 

small title, thin border

DIALOG_WINDOW_STYLE 

thicker border

DRAWER_WINDOW_STYLE 

Reserved for future use.

MENU_WINDOW_STYLE 

Menu; no title-bar, stays on top.

PANEL_WINDOW_STYLE 

Looks like Menu, but stays in back.

PARTIAL_DISAPPEARING_STYLE 

Like NORMAL_WINDOW_STYLE, but without border and title when not moused-over.

FULL_DISAPPEARING_STYLE 

Like NORMAL_WINDOW_SYLE, but the whole window disappears when not moused-over.

NO_WINDOW_STYLE 

Do not render a background, stay behind other windows, and do not process events that occur in space not covered by controls.

Useful for giving the appearance of controls embedded directly on the screen.

WINDOW_STYLE_COUNT 

Member Function Documentation

◆ beginRendering()

void G3D::GuiTheme::beginRendering ( class RenderDevice rd,
float  pixelScale 
)

Call before all other render methods.

See also
endRendering, pauseRendering, resumeRendering

◆ bounds()

Vector2 G3D::GuiTheme::bounds ( const GuiText text) const

Computes the rendered size of this text (max of enabled and disabled versions)

◆ canvasToClickBounds()

Rect2D G3D::GuiTheme::canvasToClickBounds ( const Rect2D bounds,
float  captionHeight 
) const

◆ canvasToClientBounds()

Rect2D G3D::GuiTheme::canvasToClientBounds ( const Rect2D bounds,
float  captionHeight 
) const

Given the full bounds around a canvas, returns the internal region for rendering in.

◆ checkBoxToClickBounds()

Rect2D G3D::GuiTheme::checkBoxToClickBounds ( const Rect2D bounds,
const GuiText caption 
) const

Computes the bounds around the checkbox and caption.

◆ clientToPaneBounds()

Rect2D G3D::GuiTheme::clientToPaneBounds ( const Rect2D bounds,
const GuiText caption,
PaneStyle  paneStyle 
) const

◆ clientToWindowBounds()

Rect2D G3D::GuiTheme::clientToWindowBounds ( const Rect2D bounds,
WindowStyle  frameStyle 
) const

Given the area that controls should appear in for a window, returns the bounds that should be used to draw the window.

Note that the window's shadow or other effects may exceed these bounds when rendering.

◆ createShared()

template<class T , class ... ArgTypes>
static shared_ptr<T> G3D::ReferenceCountedObject::createShared ( ArgTypes &&...  args)
inlinestaticprotectedinherited

Like std::make_shared, but works for protected constructors.

Call as createShared<myclass>.

◆ defaultStyle()

const TextStyle& G3D::GuiTheme::defaultStyle ( ) const
inline

Return the default text style.

◆ dropDownListToClickBounds()

Rect2D G3D::GuiTheme::dropDownListToClickBounds ( const Rect2D bounds,
float  captionWidth 
) const

Given the bounds of a full dropDownList and caption, returns the bounds around just the control itself.

◆ endRendering()

void G3D::GuiTheme::endRendering ( )

Call after all other render methods.

See also
pauseRendering, beginRendering, resumeRendering

◆ fromFile()

static shared_ptr<GuiTheme> G3D::GuiTheme::fromFile ( const String filename,
shared_ptr< GFont fallbackFont = shared_ptr< GFont >(),
float  fallbackSize = 11,
const Color4 fallbackColor = Color3::black(),
const Color4 fallbackOutlineColor = Color4::clear() 
)
static


May return a cached copy.

Parameters
filenameName of the .gtm file.

◆ horizontalScrollBarToBarBounds()

Rect2D G3D::GuiTheme::horizontalScrollBarToBarBounds ( const Rect2D bounds) const

◆ horizontalScrollBarToThumbBounds()

Rect2D G3D::GuiTheme::horizontalScrollBarToThumbBounds ( const Rect2D bounds,
float  pos,
float  scale 
) const

◆ horizontalSliderToThumbBounds()

Rect2D G3D::GuiTheme::horizontalSliderToThumbBounds ( const Rect2D bounds,
float  pos,
float  captionWidth 
) const

Returns the position of the thumb button, which is needed for processing UI events for the slider.

◆ horizontalSliderToTrackBounds()

Rect2D G3D::GuiTheme::horizontalSliderToTrackBounds ( const Rect2D bounds,
float  captionWidth 
) const

◆ makeThemeFromSourceFiles()

static void G3D::GuiTheme::makeThemeFromSourceFiles ( const String sourceDir,
const String whiteName,
const String blackName,
const String coordsFile,
const String destFile 
)
static

Create a .gtm file from source files.

Used as a preprocess when creating new themes. You probably don't need to call this because most people will want to use pre-existing skins (making a theme is a time-consuming artistic process!)

Parameters
sourceDirDirectory containing the whiteName, blackName and coordsFile files.
whiteNameImage of controls on a white background, must be in sourceDir
blackNameImage of controls on a black background, must be in sourceDir
coordsFileText file describing the location of controls
destFileOutput filename for the built gui theme (should use .gtm extension)

◆ minButtonSize()

Vector2 G3D::GuiTheme::minButtonSize ( const GuiText text,
ButtonStyle  buttonStyle 
) const

Returns the size a button would have to be to enclose this caption.

◆ paneToClientBounds()

Rect2D G3D::GuiTheme::paneToClientBounds ( const Rect2D bounds,
const GuiText caption,
PaneStyle  paneStyle 
) const

◆ pauseRendering()

void G3D::GuiTheme::pauseRendering ( )

Invoke from a custom GuiControl::render to make arbitrary RenderDevice calls.

Be sure to call resumeRendering() when done. Invokes RenderDevice::pushState automatically.

◆ popClientRect()

void G3D::GuiTheme::popClientRect ( )

◆ pushClientRect()

void G3D::GuiTheme::pushClientRect ( const Rect2D r)


Offsets all subsequent rendering by r.x0y0() and sets the clipping region to r.

Call only between beginRendering and endRendering.

◆ radioButtonToClickBounds()

Rect2D G3D::GuiTheme::radioButtonToClickBounds ( const Rect2D bounds,
const GuiText caption 
) const

Computes the bounds around the radio button and caption.

◆ renderButton()

void G3D::GuiTheme::renderButton ( const Rect2D bounds,
bool  enabled,
bool  focused,
bool  pushed,
const GuiText text,
ButtonStyle  buttonStyle 
)

Only call between beginRendering and endRendering.

◆ renderButtonBorder()

void G3D::GuiTheme::renderButtonBorder ( const Rect2D bounds,
bool  focused,
ButtonStyle  buttonStyle 
)

Only call between beginRendering and endRendering.

◆ renderCanvas()

void G3D::GuiTheme::renderCanvas ( const Rect2D bounds,
bool  enabled,
bool  focused,
const GuiText caption,
float  captionHeight 
)

Render a drawing area with borders that look like a text box.

The caption for a canvas is rendered above it and the canvas has the full width of its bounds.

◆ renderCheckBox()

void G3D::GuiTheme::renderCheckBox ( const Rect2D bounds,
bool  enabled,
bool  focused,
bool  checked,
const GuiText text 
)

Only call between beginRendering and endRendering.

◆ renderDropDownList()

void G3D::GuiTheme::renderDropDownList ( const Rect2D bounds,
bool  enabled,
bool  focused,
bool  menuOpen,
const GuiText contentText,
const GuiText text,
float  captionWidth 
)

◆ renderHorizontalScrollBar()

void G3D::GuiTheme::renderHorizontalScrollBar ( const Rect2D bounds,
float  pos,
float  scale,
bool  focused 
)

◆ renderHorizontalSlider()

void G3D::GuiTheme::renderHorizontalSlider ( const Rect2D bounds,
float  pos,
bool  enabled,
bool  focused,
const GuiText text,
float  captionWidth 
)

Only call between beginRendering and endRendering.

Label is on the right, slider is aligned with the left edge

Parameters
pos0 = left edge, 1 = right edge

◆ renderLabel()

void G3D::GuiTheme::renderLabel ( const Rect2D bounds,
const GuiText text,
GFont::XAlign  xalign,
GFont::YAlign  yalign,
bool  enabled,
bool  wordWrap = false 
) const

Only call between beginRendering and endRendering.

◆ renderMultiLineTextBox()

void G3D::GuiTheme::renderMultiLineTextBox ( const Rect2D bounds,
bool  enabled,
bool  focused,
const GuiText caption,
float  captionWidth,
const GuiText text,
const GuiText cursor,
int  cursorPosition,
int  highlightPosition,
TextBoxStyle  style 
)

◆ renderPane()

void G3D::GuiTheme::renderPane ( const Rect2D fullBounds,
const GuiText caption,
PaneStyle  paneStyle 
)

◆ renderRadioButton()

void G3D::GuiTheme::renderRadioButton ( const Rect2D bounds,
bool  enabled,
bool  focused,
bool  checked,
const GuiText text 
)

Only call between beginRendering and endRendering.

◆ renderSelection()

void G3D::GuiTheme::renderSelection ( const Rect2D bounds)

Render the selection region for a menu or list.

◆ renderTextBox()

void G3D::GuiTheme::renderTextBox ( const Rect2D bounds,
bool  enabled,
bool  focused,
const GuiText caption,
float  captionWidth,
const GuiText text,
const GuiText cursor,
int  cursorPosition,
int  highlightPosition,
TextBoxStyle  style 
)

Render a single-line text box.

Only call between beginRendering and endRendering. Automatically shifts text so that a cursor at character index given by cursorPosition is visible on screen.

◆ renderTextBoxBorder()

void G3D::GuiTheme::renderTextBoxBorder ( const Rect2D fullBounds,
bool  enabled,
bool  focused 
)

Render the border that is used for a text box.

Only call between beginRendering and endRendering. Used to render the border for scrollPane.

◆ renderVerticalScrollBar()

void G3D::GuiTheme::renderVerticalScrollBar ( const Rect2D bounds,
float  pos,
float  scale,
bool  focused 
)

Only call between beginRendering and endRendering.

Parameters
pos0 when the thumb is at the top of the scroll bar and it is equal to the other param scale when it is at the bottom of the bar
scaleis the maximum value that pos can be
Precondition
scale > 0 and pos >= 0

◆ renderWindow()

void G3D::GuiTheme::renderWindow ( const Rect2D bounds,
bool  focused,
bool  hasCloseButton,
bool  closeButtonIsDown,
bool  closeIsFocused,
const GuiText text,
WindowStyle  frameStyle 
)

Only call between beginRendering and endRendering.

Parameters
boundsCorresponds to the footprint of the window; dropshadows and glows may still render outside this area.

◆ resumeRendering()

void G3D::GuiTheme::resumeRendering ( )

◆ scrollBarWidth()

float G3D::GuiTheme::scrollBarWidth ( ) const
inline

◆ textBoxBorderWidth()

float G3D::GuiTheme::textBoxBorderWidth ( ) const
inline

◆ textBoxPadding()

Pad G3D::GuiTheme::textBoxPadding ( ) const
inline

◆ textBoxToClickBounds()

Rect2D G3D::GuiTheme::textBoxToClickBounds ( const Rect2D bounds,
float  captionWidth 
) const

◆ verticalScrollBarToBarBounds()

Rect2D G3D::GuiTheme::verticalScrollBarToBarBounds ( const Rect2D bounds) const

◆ verticalScrollBarToThumbBounds()

Rect2D G3D::GuiTheme::verticalScrollBarToThumbBounds ( const Rect2D bounds,
float  pos,
float  scale 
) const

Returns the position of the thumb button, which is needed for processing UI events for the scrollBar.

◆ windowToClientBounds()

Rect2D G3D::GuiTheme::windowToClientBounds ( const Rect2D bounds,
WindowStyle  frameStyle 
) const

Given the bounds on a window's borders, returns the bounds of the area inside the window where controls will appear.

◆ windowToCloseButtonBounds()

Rect2D G3D::GuiTheme::windowToCloseButtonBounds ( const Rect2D bounds,
WindowStyle  frameStyle 
) const

◆ windowToTitleBounds()

Rect2D G3D::GuiTheme::windowToTitleBounds ( const Rect2D bounds,
WindowStyle  frameStyle 
) const

Friends And Related Function Documentation

◆ GuiThemeEditor

friend class GuiThemeEditor
friend

◆ GuiWindow

friend class GuiWindow
friend

Member Data Documentation

◆ lastThemeLoaded

weak_ptr<GuiTheme> G3D::GuiTheme::lastThemeLoaded
static

documentation generated on Wed Nov 24 2021 08:01:57 using doxygen 1.8.15