ShishGL  1.0
A simple modular cross-platform graphics library
Sh::UIWindow Class Reference

#include <UIWindow.hpp>

Inheritance diagram for Sh::UIWindow:
Collaboration diagram for Sh::UIWindow:

Public Types

enum  States {
  NORMAL, HOVER, CLICK, HOLD,
  SELECTED
}
 

Public Member Functions

template<int SomeState, typename... Args>
UIWindowapplyStyle (Args &&... args)
 
template<typename SomeShape , typename... Args>
UIWindowapplyShape (Args &&... args)
 
template<typename SomeBehavior , typename... Args>
UIWindowsetBehavior (Args &&... args)
 
int getState () const
 
void setState (int new_state)
 
bool contains (const Vector2< double > &point) const override
 
void translate (const Vector2< double > &delta) override
 
void setPos (const Vector2< double > &pos) override
 
void setParent (Window *new_parent) override
 
BehaviorgetBehavior () const
 
 ~UIWindow () override
 
- Public Member Functions inherited from Sh::Window
 Window ()=delete
 
 ~Window () override=default
 
 Window (const Window &other)=delete
 
Windowoperator= (const Window &other)=delete
 
const WindowgetParent () const
 
template<typename SomeWindow , typename... Args>
SomeWindow * attach (Args &&... args)
 
template<typename SomeWindow >
SomeWindow * attach (SomeWindow *child)
 
Windowdetach (Window *child)
 
const FramegetFrame () const
 
const Vector2< double > & getSize () const
 
const Vector2< double > & getPos () const
 
const std::list< Window * > & getChildren ()
 
- Public Member Functions inherited from Sh::Listener
virtual ~Listener ()
 

Protected Types

using StyleMap = std::unordered_map< int, StylePack >
 

Protected Member Functions

 UIWindow (const Frame &viewport)
 
void onRender () override
 
StyleMapstyles ()
 
const Shape2Dshape () const
 
void notifyBehavior ()
 
- Protected Member Functions inherited from Sh::Window
 Window (const Frame &frame)
 

Friends

class WindowManager
 

Member Typedef Documentation

◆ StyleMap

using Sh::UIWindow::StyleMap = std::unordered_map<int, StylePack>
protected

Member Enumeration Documentation

◆ States

Enumerator
NORMAL 
HOVER 
CLICK 
HOLD 
SELECTED 

Constructor & Destructor Documentation

◆ ~UIWindow()

UIWindow::~UIWindow ( )
override

◆ UIWindow()

UIWindow::UIWindow ( const Frame viewport)
explicitprotected

Member Function Documentation

◆ applyShape()

template<typename SomeShape , typename... Args>
UIWindow * UIWindow::applyShape ( Args &&...  args)

◆ applyStyle()

template<int SomeState, typename... Args>
UIWindow * UIWindow::applyStyle ( Args &&...  args)

◆ contains()

bool UIWindow::contains ( const Vector2< double > &  point) const
overridevirtual

Reimplemented from Sh::Window.

◆ getBehavior()

Behavior* Sh::UIWindow::getBehavior ( ) const
inline

◆ getState()

int UIWindow::getState ( ) const

◆ notifyBehavior()

void Sh::UIWindow::notifyBehavior ( )
inlineprotected

◆ onRender()

void UIWindow::onRender ( )
overrideprotectedvirtual

Reimplemented from Sh::Window.

◆ setBehavior()

template<typename SomeBehavior , typename... Args>
UIWindow * UIWindow::setBehavior ( Args &&...  args)

◆ setParent()

void Sh::UIWindow::setParent ( Window new_parent)
inlineoverridevirtual

Reimplemented from Sh::Window.

◆ setPos()

void Sh::UIWindow::setPos ( const Vector2< double > &  pos)
inlineoverridevirtual

Reimplemented from Sh::Window.

◆ setState()

void UIWindow::setState ( int  new_state)

◆ shape()

const Shape2D & UIWindow::shape ( ) const
protected

◆ styles()

UIWindow::StyleMap & UIWindow::styles ( )
protected

◆ translate()

void Sh::UIWindow::translate ( const Vector2< double > &  delta)
inlineoverridevirtual

Reimplemented from Sh::Window.

Friends And Related Function Documentation

◆ WindowManager

friend class WindowManager
friend

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