Class Theme

Inheritance Relationships

Base Type

Class Documentation

class Theme : public nanogui::Object

Storage class for basic theme-related properties.

Public Functions

Theme(NVGcontext *ctx)

Public Members

int mFontNormal

The standard font face (default: "sans" from resources/roboto_regular.ttf).

int mFontBold

The bold font face (default: "sans-bold" from resources/roboto_regular.ttf).

int mFontIcons

The icon font face (default: "icons" from resources/entypo.ttf).

float mIconScale

The amount of scaling that is applied to each icon to fit the size of NanoGUI widgets. The default value is 0.77f, setting to e.g. higher than 1.0f is generally discouraged.

int mStandardFontSize

The font size for all widgets other than buttons and textboxes (default: 16).

int mButtonFontSize

The font size for buttons (default: 20).

int mTextBoxFontSize

The font size for text boxes (default: 20).

int mWindowCornerRadius

Rounding radius for Window widget corners (default: 2).

int mWindowHeaderHeight

Default size of Window widget titles (default: 30).

int mWindowDropShadowSize

Size of drop shadow rendered behind the Window widgets (default: 10).

int mButtonCornerRadius

Rounding radius for Button (and derived types) widgets (default: 2).

float mTabBorderWidth

The border width for TabHeader widgets (default: 0.75f).

int mTabInnerMargin

The inner margin on a TabHeader widget (default: 5).

int mTabMinButtonWidth

The minimum size for buttons on a TabHeader widget (default: 20).

int mTabMaxButtonWidth

The maximum size for buttons on a TabHeader widget (default: 160).

int mTabControlWidth

Used to help specify what lies “in bound” for a TabHeader widget (default: 20).

int mTabButtonHorizontalPadding

The amount of horizontal padding for a TabHeader widget (default: 10).

int mTabButtonVerticalPadding

The amount of vertical padding for a TabHeader widget (default: 2).

Color mDropShadow

The color of the drop shadow drawn behind widgets (default: intensity=0, alpha=128; see nanogui::Color::Color(int,int)).

Color mTransparent

The transparency color (default: intensity=0, alpha=0; see nanogui::Color::Color(int,int)).

Color mBorderDark

The dark border color (default: intensity=29, alpha=255; see nanogui::Color::Color(int,int)).

Color mBorderLight

The light border color (default: intensity=92, alpha=255; see nanogui::Color::Color(int,int)).

Color mBorderMedium

The medium border color (default: intensity=35, alpha=255; see nanogui::Color::Color(int,int)).

Color mTextColor

The text color (default: intensity=255, alpha=160; see nanogui::Color::Color(int,int)).

Color mDisabledTextColor

The disable dtext color (default: intensity=255, alpha=80; see nanogui::Color::Color(int,int)).

Color mTextColorShadow

The text shadow color (default: intensity=0, alpha=160; see nanogui::Color::Color(int,int)).

Color mIconColor

The icon color (default: nanogui::Theme::mTextColor).

Color mButtonGradientTopFocused

The top gradient color for buttons in focus (default: intensity=64, alpha=255; see nanogui::Color::Color(int,int)).

Color mButtonGradientBotFocused

The bottom gradient color for buttons in focus (default: intensity=48, alpha=255; see nanogui::Color::Color(int,int)).

Color mButtonGradientTopUnfocused

The top gradient color for buttons not in focus (default: intensity=74, alpha=255; see nanogui::Color::Color(int,int)).

Color mButtonGradientBotUnfocused

The bottom gradient color for buttons not in focus (default: intensity=58, alpha=255; see nanogui::Color::Color(int,int)).

Color mButtonGradientTopPushed

The top gradient color for buttons currently pushed (default: intensity=41, alpha=255; see nanogui::Color::Color(int,int)).

Color mButtonGradientBotPushed

The bottom gradient color for buttons currently pushed (default: intensity=29, alpha=255; see nanogui::Color::Color(int,int)).

Color mWindowFillUnfocused

The fill color for a Window that is not in focus (default: intensity=43, alpha=230; see nanogui::Color::Color(int,int)).

Color mWindowFillFocused

The fill color for a Window that is in focus (default: intensity=45, alpha=230; see nanogui::Color::Color(int,int)).

Color mWindowTitleUnfocused

The title color for a Window that is not in focus (default: intensity=220, alpha=160; see nanogui::Color::Color(int,int)).

Color mWindowTitleFocused

The title color for a Window that is in focus (default: intensity=255, alpha=190; see nanogui::Color::Color(int,int)).

Color mWindowHeaderGradientTop

The top gradient color for Window headings (default: nanogui::Theme::mButtonGradientTopUnfocused).

Color mWindowHeaderGradientBot

The bottom gradient color for Window headings (default: nanogui::Theme::mButtonGradientBotUnfocused).

Color mWindowHeaderSepTop

The Window header top separation color (default: nanogui::Theme::mBorderLight).

Color mWindowHeaderSepBot

The Window header bottom separation color (default: nanogui::Theme::mBorderDark).

Color mWindowPopup

The popup window color (default: intensity=50, alpha=255; see nanogui::Color::Color(int,int))).

Color mWindowPopupTransparent

The transparent popup window color (default: intensity=50, alpha=0; see nanogui::Color::Color(int,int))).

int mCheckBoxIcon

Icon to use for CheckBox widgets (default: ENTYPO_ICON_CHECK).

int mMessageInformationIcon

Icon to use for informational MessageDialog widgets (default: ENTYPO_ICON_INFO_WITH_CIRCLE).

int mMessageQuestionIcon

Icon to use for interrogative MessageDialog widgets (default: ENTYPO_ICON_HELP_WITH_CIRCLE).

int mMessageWarningIcon

Icon to use for warning MessageDialog widgets (default: ENTYPO_ICON_WARNING).

int mMessageAltButtonIcon

Icon to use on MessageDialog alt button (default: ENTYPO_ICON_CIRCLE_WITH_CROSS).

int mMessagePrimaryButtonIcon

Icon to use on MessageDialog primary button (default: ENTYPO_ICON_CHECK).

int mPopupChevronRightIcon

Icon to use for PopupButton widgets opening to the right (default: ENTYPO_ICON_CHEVRON_RIGHT).

int mPopupChevronLeftIcon

Icon to use for PopupButton widgets opening to the left (default: ENTYPO_ICON_CHEVRON_LEFT).

int mTabHeaderLeftIcon

Icon to indicate hidden tabs to the left on a TabHeader (default: ENTYPO_ICON_ARROW_BOLD_LEFT).

int mTabHeaderRightIcon

Icon to indicate hidden tabs to the right on a TabHeader (default: ENTYPO_ICON_ARROW_BOLD_RIGHT).

int mTextBoxUpIcon

Icon to use when a TextBox has an up toggle (e.g. IntBox) (default: ENTYPO_ICON_CHEVRON_UP).

int mTextBoxDownIcon

Icon to use when a TextBox has a down toggle (e.g. IntBox) (default: ENTYPO_ICON_CHEVRON_DOWN).

Protected Functions

virtual ~Theme()

Default destructor does nothing; allows for inheritance.