HoverRace  2.0
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
HoverRace::Display::SDL::SdlKeycapIconView Class Reference

SDL view for KeycapIcon. More...

#include <SdlKeycapIconView.h>

+ Inheritance diagram for HoverRace::Display::SDL::SdlKeycapIconView:

Public Member Functions

 SdlKeycapIconView (SdlDisplay &disp, KeycapIcon &model)
 
virtual ~SdlKeycapIconView ()
 
Vec3 Measure () override
 
void OnModelUpdate (int prop) override
 Called by the view model to indicate that a property has changed. More...
 
void PrepareRender () override
 
void Render () override
 
- Public Member Functions inherited from HoverRace::Display::SDL::SdlView< KeycapIcon >
 SdlView (SdlDisplay &display, KeycapIcon &model)
 
virtual ~SdlView ()
 
- Public Member Functions inherited from HoverRace::Display::View
virtual ~View ()
 
virtual Vec2 GetScreenPos () const
 Retrieve the screen-space position, if available. More...
 
virtual Vec2 GetScreenSize () const
 Retrieve the screen-space size, if available. More...
 
Viewoperator= (const View &)=delete
 

Private Types

using SUPER = SdlView< KeycapIcon >
 

Private Member Functions

void UpdateTexture ()
 
void UpdateTextureColor ()
 

Private Attributes

bool colorChanged
 
int height
 
int realHeight
 
int realWidth
 
std::unique_ptr< SdlTexturetexture
 
boost::signals2::scoped_connection uiScaleChangedConnection
 
double unscaledHeight
 
double unscaledWidth
 
int width
 

Additional Inherited Members

- Protected Attributes inherited from HoverRace::Display::SDL::SdlView< KeycapIcon >
SdlDisplaydisplay
 
KeycapIconmodel
 

Detailed Description

SDL view for KeycapIcon.

Author
Michael Imamura

Member Typedef Documentation

Constructor & Destructor Documentation

HoverRace::Display::SDL::SdlKeycapIconView::SdlKeycapIconView ( SdlDisplay disp,
KeycapIcon model 
)
HoverRace::Display::SDL::SdlKeycapIconView::~SdlKeycapIconView ( )
virtual

Member Function Documentation

Vec3 HoverRace::Display::SDL::SdlKeycapIconView::Measure ( )
overridevirtual
void HoverRace::Display::SDL::SdlKeycapIconView::OnModelUpdate ( int  prop)
overridevirtual

Called by the view model to indicate that a property has changed.

The view can use this to decide if view-specific resources need to be reloaded.

Parameters
propThe model-specific ID of the property that changed.

Reimplemented from HoverRace::Display::View.

void HoverRace::Display::SDL::SdlKeycapIconView::PrepareRender ( )
overridevirtual
void HoverRace::Display::SDL::SdlKeycapIconView::Render ( )
overridevirtual
void HoverRace::Display::SDL::SdlKeycapIconView::UpdateTexture ( )
private
void HoverRace::Display::SDL::SdlKeycapIconView::UpdateTextureColor ( )
private

Member Data Documentation

bool HoverRace::Display::SDL::SdlKeycapIconView::colorChanged
private
int HoverRace::Display::SDL::SdlKeycapIconView::height
private
int HoverRace::Display::SDL::SdlKeycapIconView::realHeight
private
int HoverRace::Display::SDL::SdlKeycapIconView::realWidth
private
std::unique_ptr<SdlTexture> HoverRace::Display::SDL::SdlKeycapIconView::texture
private
boost::signals2::scoped_connection HoverRace::Display::SDL::SdlKeycapIconView::uiScaleChangedConnection
private
double HoverRace::Display::SDL::SdlKeycapIconView::unscaledHeight
private
double HoverRace::Display::SDL::SdlKeycapIconView::unscaledWidth
private
int HoverRace::Display::SDL::SdlKeycapIconView::width
private

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