HoverRace  2.0
Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | List of all members
HoverRace::Display::SDL::SdlBoxView< T > Class Template Reference

Base class for FillBox views. More...

#include <SdlBoxView.h>

+ Inheritance diagram for HoverRace::Display::SDL::SdlBoxView< T >:

Public Member Functions

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

Protected Member Functions

void CalcScreenBounds ()
 Update the screen-space bounds from the UI-space bounds. More...
 

Protected Attributes

Vec2 screenPos
 
Vec2 screenSize
 
- Protected Attributes inherited from HoverRace::Display::SDL::SdlView< T >
SdlDisplaydisplay
 
T & model
 

Private Types

using SUPER = SdlView< T >
 

Detailed Description

template<class T>
class HoverRace::Display::SDL::SdlBoxView< T >

Base class for FillBox views.

Author
Michael Imamura

Member Typedef Documentation

template<class T>
using HoverRace::Display::SDL::SdlBoxView< T >::SUPER = SdlView<T>
private

Constructor & Destructor Documentation

template<class T>
HoverRace::Display::SDL::SdlBoxView< T >::SdlBoxView ( SdlDisplay disp,
T &  model 
)
inline
template<class T>
virtual HoverRace::Display::SDL::SdlBoxView< T >::~SdlBoxView ( )
inlinevirtual

Member Function Documentation

template<class T>
void HoverRace::Display::SDL::SdlBoxView< T >::CalcScreenBounds ( )
inlineprotected

Update the screen-space bounds from the UI-space bounds.

template<class T>
Vec2 HoverRace::Display::SDL::SdlBoxView< T >::GetScreenPos ( ) const
inlineoverridevirtual

Retrieve the screen-space position, if available.

The availability of this information varies from view to view.

Returns
The screen position, or (0, 0) if unavailable..

Reimplemented from HoverRace::Display::View.

template<class T>
Vec2 HoverRace::Display::SDL::SdlBoxView< T >::GetScreenSize ( ) const
inlineoverridevirtual

Retrieve the screen-space size, if available.

The availability of this information varies from view to view.

Returns
The screen size, or (0, 0) if unavailable.

Reimplemented from HoverRace::Display::View.

Member Data Documentation

template<class T>
Vec2 HoverRace::Display::SDL::SdlBoxView< T >::screenPos
protected
template<class T>
Vec2 HoverRace::Display::SDL::SdlBoxView< T >::screenSize
protected

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