Simple GUI Library
Sgl::DefaultSkins::MenuItemSkin Class Reference
Inheritance diagram for Sgl::DefaultSkins::MenuItemSkin:
Collaboration diagram for Sgl::DefaultSkins::MenuItemSkin:

Public Member Functions

 MenuItemSkin (Sgl::Button *button)
 
- Public Member Functions inherited from Sgl::DefaultSkins::ButtonBaseSkin
 ButtonBaseSkin (Sgl::Button *button, const StaticStyle *staticStyle, const InteractionStyle *idleStyle, const InteractionStyle *hoveredStyle, const InteractionStyle *pressedStyle)
 
 ButtonBaseSkin (const StaticStyle *staticStyle, const InteractionStyle *idleStyle, const InteractionStyle *hoveredStyle, const InteractionStyle *pressedStyle)
 
virtual void dispose () override
 Should be called by Control when this skin is replaced. More...
 
virtual void attach (Button *button) override
 
virtual void prerenderControl () override
 
virtual const ControlgetControl () const override
 
virtual ControlgetModifiableControl () override
 
virtual int32_t computePrefHeight (int32_t width=-1) const override
 
virtual int32_t computePrefWidth (int32_t height=-1) const override
 
virtual void layoutChildren () override
 
void applyInteractionStyle (InteractionStyle::Type type)
 
- Public Member Functions inherited from Sgl::Skin
virtual ComponentgetHitComponent (int32_t x, int32_t y)
 
virtual int32_t computeMinHeight (int32_t width=-1) const
 
virtual int32_t computeMinWidth (int32_t height=-1) const
 
virtual int32_t computeMaxHeight (int32_t width=-1) const
 
virtual int32_t computeMaxWidth (int32_t height=-1) const
 

Static Public Attributes

static const Insets PADDING = Insets{5, 10}
 
static const int32_t MARGIN = 5
 
static const Border BORDER = Border{0, 0}
 
static const StaticStyle STATIC_STYLE = {PADDING, MARGIN, BORDER}
 
static const Sml::Color IDLE_FOREGROUND = Sml::COLOR_BLACK
 
static const ColorFill IDLE_BACKGROUND_FILL = {Sml::COLOR_TRANSPARENT}
 
static const Background IDLE_BACKGROUND = {&IDLE_BACKGROUND_FILL}
 
static const InteractionStyle IDLE_STYLE
 
static const Sml::Color HOVERED_FOREGROUND = 0xEF'F8'FF'FF
 
static const ColorFill HOVERED_BACKGROUND_FILL = {0x5A'B9'FF'FF}
 
static const Background HOVERED_BACKGROUND = {&HOVERED_BACKGROUND_FILL}
 
static const InteractionStyle HOVERED_STYLE
 

Additional Inherited Members

- Protected Member Functions inherited from Sgl::DefaultSkins::ButtonBaseSkin
int32_t getMargin () const
 
void applyStaticStyle ()
 
- Protected Attributes inherited from Sgl::DefaultSkins::ButtonBaseSkin
const StaticStylem_StaticStyle = nullptr
 
const InteractionStylem_IdleStyle = nullptr
 
const InteractionStylem_HoveredStyle = nullptr
 
const InteractionStylem_PressedStyle = nullptr
 
Sgl::Buttonm_Button = nullptr
 
ButtonBaseSkinEventListenerm_Handler = nullptr
 
Sgl::Text m_Text
 
Sgl::ImageView m_Icon
 

Detailed Description

Definition at line 157 of file default_skins.h.

Constructor & Destructor Documentation

◆ MenuItemSkin() [1/2]

Sgl::DefaultSkins::MenuItemSkin::MenuItemSkin ( )

Definition at line 333 of file default_skins.cpp.

◆ MenuItemSkin() [2/2]

Sgl::DefaultSkins::MenuItemSkin::MenuItemSkin ( Sgl::Button button)

Definition at line 336 of file default_skins.cpp.

Member Data Documentation

◆ BORDER

const Border Sgl::DefaultSkins::MenuItemSkin::BORDER = Border{0, 0}
static

Definition at line 162 of file default_skins.h.

◆ HOVERED_BACKGROUND

const Background Sgl::DefaultSkins::MenuItemSkin::HOVERED_BACKGROUND = {&HOVERED_BACKGROUND_FILL}
static

Definition at line 172 of file default_skins.h.

◆ HOVERED_BACKGROUND_FILL

const ColorFill Sgl::DefaultSkins::MenuItemSkin::HOVERED_BACKGROUND_FILL = {0x5A'B9'FF'FF}
static

Definition at line 171 of file default_skins.h.

◆ HOVERED_FOREGROUND

const Sml::Color Sgl::DefaultSkins::MenuItemSkin::HOVERED_FOREGROUND = 0xEF'F8'FF'FF
static

Definition at line 170 of file default_skins.h.

◆ HOVERED_STYLE

const ButtonBaseSkin::InteractionStyle Sgl::DefaultSkins::MenuItemSkin::HOVERED_STYLE
static
Initial value:
= {HOVERED_FOREGROUND,
&HOVERED_BACKGROUND}

Definition at line 173 of file default_skins.h.

◆ IDLE_BACKGROUND

const Background Sgl::DefaultSkins::MenuItemSkin::IDLE_BACKGROUND = {&IDLE_BACKGROUND_FILL}
static

Definition at line 167 of file default_skins.h.

◆ IDLE_BACKGROUND_FILL

const ColorFill Sgl::DefaultSkins::MenuItemSkin::IDLE_BACKGROUND_FILL = {Sml::COLOR_TRANSPARENT}
static

Definition at line 166 of file default_skins.h.

◆ IDLE_FOREGROUND

const Sml::Color Sgl::DefaultSkins::MenuItemSkin::IDLE_FOREGROUND = Sml::COLOR_BLACK
static

Definition at line 165 of file default_skins.h.

◆ IDLE_STYLE

const ButtonBaseSkin::InteractionStyle Sgl::DefaultSkins::MenuItemSkin::IDLE_STYLE
static
Initial value:
= {IDLE_FOREGROUND,
nullptr}

Definition at line 168 of file default_skins.h.

◆ MARGIN

const int32_t Sgl::DefaultSkins::MenuItemSkin::MARGIN = 5
static

Definition at line 161 of file default_skins.h.

◆ PADDING

const Insets Sgl::DefaultSkins::MenuItemSkin::PADDING = Insets{5, 10}
static

Definition at line 160 of file default_skins.h.

◆ STATIC_STYLE

const ButtonBaseSkin::StaticStyle Sgl::DefaultSkins::MenuItemSkin::STATIC_STYLE = {PADDING, MARGIN, BORDER}
static

Definition at line 163 of file default_skins.h.


The documentation for this class was generated from the following files: