CoreComponents 3.0.0
A Modern C++ Toolkit
Loading...
Searching...
No Matches
View Class Reference

User interface building block More...

#include <cc/View>

Inheritance diagram for View:

Classes

class  Layout
 Automatic geometry for children views More...
 
struct  State
 Internal state. More...
 

Public Types

using Id = double
 View identifier
 

Protected Types

using CreateState = State *()
 

Protected Member Functions

 View (State *newState)
 Initialize view.
 
 View (CreateState onDemand)
 Initialize view.
 
template<class T >
grab ()
 Get a weak reference version of this object.
 
template<class T >
T & associate (Out< T > self)
 Convenience method to associate a weak reference to this objet.
 
template<class T >
T & get ()
 Get access to the object's state (create it if needed)
 
template<class T >
const T & get () const
 Get access to the object's state (create it if needed)
 
Stateme ()
 
const Stateme () const
 
bool operator== (const State *other) const
 
- Protected Member Functions inherited from Surface
 Surface (State *newState)
 
State & me ()
 
const State & me () const
 
- Protected Member Functions inherited from Object
template<class T >
weak () const
 
template<class T >
void initOnce ()
 Create the object state when called the first time.
 
template<class T >
void initOncePerThread ()
 Create a distinct object state for each thread when called the first time in that thread.
 
 Object (State *newState)
 Initialize object with newState.
 
 Object (State *state, Alias)
 
 Object (State *state, Weak)
 
Objectoperator= (std::nullptr_t)
 

Static Protected Member Functions

template<class T >
static View::StateonDemand ()
 
- Static Protected Member Functions inherited from Object
template<class T >
static T alias (const State *state)
 Create an alias object for the given state.
 
template<class T >
static T weak (const State *state)
 

Construction

 View ()=default
 Create a primordial view.
 
 View (double width, double height)
 Create a new view of initial size (width, height)
 
Viewassociate (Out< View > self)
 Get a weak reference in self.
 
Viewpopulate (const Function< void(View)> &&f)
 Invoke custom initialization function f.
 
void touch ()
 Materialize if this view is still primordial.
 
void show ()
 Convenience method to show this view.
 
int run ()
 Convenience method to show this view and run the application loop.
 

View Properties

Viewpaint (Definition< void > &&f)
 Define foreground.
 
Color paper () const
 Get background color.
 
Viewpaper (Color newValue)
 Set background color
 
Viewpaper (Definition< Color > &&f)
 Define background color.
 
bool visible () const
 Get visible.
 
Viewvisible (bool newValue)
 Set visible
 
Viewvisible (Definition< bool > &&f)
 Define visible.
 
double opacity () const
 Get opacity.
 
Viewopacity (double newValue)
 Set opacity
 
Viewopacity (Definition< double > &&f)
 Define opacity.
 
ViewopacityEasing (const EasingCurve &easing, double duration)
 Set easing on opacity
 
bool clip () const
 Get clip.
 
Viewclip (bool newValue)
 Set clip
 
Viewclip (Definition< bool > &&f)
 Define clip.
 
bool moving () const
 Get moving.
 
Viewmoving (bool newValue)
 Set moving
 
Viewmoving (Definition< bool > &&f)
 Define moving.
 
Point pos () const
 Get position.
 
Viewpos (Point newValue)
 Set position
 
Viewpos (double x, double y)
 Set position
 
Viewpos (Definition< Point > &&f)
 Define position.
 
ViewposEasing (const EasingCurve &easing, double duration, Function< bool()> &&direct=nullptr)
 Set easing on position
 
Size size () const
 Get size.
 
double x () const
 Get pos()[0].
 
double y () const
 Get pos()[1].
 
double width () const
 Get size()[0].
 
double height () const
 Get size()[1].
 
double innerWidth () const
 Get inner width.
 
double innerHeight () const
 Get inner height.
 
Viewsize (Size newValue)
 Set size to newValue
 
Viewsize (double width, double height)
 Set size to Size{width, height}
 
Viewsize (Definition< Size > &&f)
 Define size.
 
ViewsizeEasing (const EasingCurve &easing, double duration)
 Set easing on size
 
Padding padding () const
 Padding to apply when adding this view to a layout
 
Viewpadding (const Padding &newValue)
 Set padding
 
Viewpadding (Definition< Padding > &&f)
 Define padding.
 
Point pivot () const
 Get rotation center.
 
Viewpivot (Point newValue)
 Set rotation center
 
Viewpivot (Definition< Point > &&f)
 Define rotation center.
 
ViewpivotEasing (const EasingCurve &easing, double duration)
 Set easing on rotation center
 
double angle () const
 Get rotation angle.
 
Viewangle (double newValue)
 Set rotation angle
 
Viewangle (Definition< double > &&f)
 Define rotation angle.
 
ViewangleEasing (const EasingCurve &easing, double duration)
 Set easing on rotation angle
 
double scale () const
 Get scale factor.
 
Viewscale (double newValue)
 Set scale factor
 
Viewscale (Definition< double > &&f)
 Define scale factor.
 
ViewscaleEasing (const EasingCurve &easing, double duration)
 Set easing on scale
 
View decoration () const
 Get decoration.
 
Viewdecoration (const View &newValue)
 Set decoration
 
Viewdecoration (Definition< View > &&f)
 Define decoration.
 
Size preferredSize () const
 Get preferred size.
 
Size minSize () const
 Get minimal size.
 
Size maxSize () const
 Get maximal size.
 
Color basePaper () const
 Get the background paper.
 
const char * objectName () const
 Get the object name (for debugging)
 
ViewobjectName (const char *name)
 Set the object name
 
bool hasWindow () const
 Check if this view is already shown in a window.
 
Window window () const
 Get the window this view is shown in.
 
bool isHandheld () const
 Get window().display().isHandheld()
 

View Hierarchy

Id id () const
 Get view identifier.
 
List< IdfullId () const
 Get view identifier heritage list.
 
bool operator== (const View &other) const
 Equality operator.
 
std::strong_ordering operator<=> (const View &other) const
 Ordering operator.
 
bool hasParent () const
 Check if this is a child view.
 
View parent () const
 Get parent view.
 
View root () const
 Get the root view of this window.
 
long childrenCount () const
 Number of children.
 
long count () const
 Number of children.
 
bool hasChildren () const
 Check if there are any children.
 
Viewadd (const View &child)
 Add new child placed visually above all existing children.
 
ViewaddAbove (const View &child)
 Add new child placed visually above all existing children.
 
ViewaddBelow (const View &child)
 Add child place visually below all existing children.
 
ViewinsertAt (Locator target, const View &child)
 Insert new child at target.
 
ViewinsertAt (long index, const View &child)
 Insert new child at index.
 
void remove (const View &child)
 Remove a child.
 
Viewpush (const View &child)
 Add new child placed visually above all existing children.
 
void pop ()
 Remove the top-most visible child.
 
void deplete ()
 Remove all children.
 
void moveToTop ()
 Make this view be visible above any other visible sibling.
 
void moveToBottom ()
 Make this view be visible beneath any other visible sibling.
 
const Set< View > & children () const
 Get all child views.
 
const Set< View > & visibleChildren () const
 Get visible child views.
 
Rect childrenRect () const
 Get bounding box containing all visible child views including their paddings.
 
Point mapToGlobal (Point l) const
 Map view coordinates l to window coordinates
 
Point mapToLocal (Point g) const
 Map window coordinates g to view coordinates
 
Point mapToChild (const View &child, Point l) const
 Map local coordinates l to child coordinates
 
Point mapToParent (const View &parent, Point l) const
 Map local coordinates l to parent coordinates
 
bool containsLocal (Point l) const
 Check if local point l lays inside this view.
 
bool containsGlobal (Point g) const
 Check if global point l lays inside this view.
 
View findChild (Point l) const
 Find the first child which contains local point l.
 
Control findControl (Point l) const
 Find the first control which contains local point l.
 
bool isParentOf (const View &other) const
 Check if this view is parent of other.
 
bool laysInsideOf (const View &other, double margin) const
 Check if this view is fully visible inside other with given surrounding margin.
 
void update ()
 Manually force repaint.
 
template<class T >
void collectVisible (InOut< List< T > > collection) const
 Get a list of all visible children in this view tree which are of type T.
 
Layout layout () const
 Get layout.
 
Viewlayout (const Layout &newValue)
 Set layout
 
void renderTo (Image &image) const
 Capture a rendered image of this view (including its children) as rendered on the screen.
 

Positional Anchors

double top () const
 Get y-coordinate of this view's top border.
 
double bottom () const
 Get y-coordinate of this view's bottom border.
 
double left () const
 Get x-coordinate of this view's left border.
 
double right () const
 Get x-coordinate of this view's right border.
 
Point topLeft () const
 Get this view's top-left corner.
 
Point topCenter () const
 Get this view's top-center point.
 
Point topRight () const
 Get this view's top-right corner.
 
Point bottomLeft () const
 Get this view's bottom-left corner.
 
Point bottomCenter () const
 Get this view's bottom-center point.
 
Point bottomRight () const
 Get this view's bottom-right corner.
 
Point centerLeft () const
 Get this view's center-left point.
 
Point centerRight () const
 Get this view's center-right point.
 
ViewtopLeft (Point newValue)
 Make this view's top-left match newValue.
 
ViewtopCenter (Point newValue)
 Make this view's top-center match newValue.
 
ViewtopRight (Point newValue)
 Make this view's top-right match newValue.
 
ViewbottomLeft (Point newValue)
 Make this view's bottom-left match newValue.
 
ViewbottomCenter (Point newValue)
 Make this view's bottom-center match newValue.
 
ViewbottomRight (Point newValue)
 Make this view's bottom-right match newValue.
 
ViewcenterLeft (Point newValue)
 Make this view's center-left match newValue.
 
ViewcenterRight (Point newValue)
 Make this view's center-right match newValue.
 
Viewcenter (Point newValue)
 Make this view's center match newValue.
 
ViewtopLeft (Definition< Point > &&a)
 Anchor the top-left corner to a
 
ViewtopCenter (Definition< Point > &&a)
 Anchor the top-center corner to a
 
ViewtopRight (Definition< Point > &&a)
 Anchor the top-right corner to a
 
ViewbottomLeft (Definition< Point > &&a)
 Anchor the bottom-left corner to a
 
ViewbottomCenter (Definition< Point > &&a)
 Anchor the bottom-center corner to a
 
ViewbottomRight (Definition< Point > &&a)
 Anchor the bottom-right corner to a
 
ViewcenterLeft (Definition< Point > &&a)
 Anchor the center-left to a
 
ViewcenterRight (Definition< Point > &&a)
 Anchor the center-right to a
 
Viewcenter (Definition< Point > &&a)
 Anchor the center to a
 
ViewcenterInParent ()
 Anchor this view's center to its parent's center.
 

Triggers and Events

ViewonWindowEntered (Function< void()> &&f)
 Handle window enter event
 
ViewonWindowLeft (Function< void()> &&f)
 Handle window leave event
 
ViewonPointerPressed (Filter< PointerEvent > &&f)
 Handle pointer pressed event
 
ViewonPointerReleased (Filter< PointerEvent > &&f)
 Handle pointer release event
 
ViewonPointerMoved (Filter< PointerEvent > &&f)
 Handle pointer moved event
 
ViewonMousePressed (Filter< MouseEvent > &&f)
 Handle move pressed event
 
ViewonMouseReleased (Filter< MouseEvent > &&f)
 Handle mouse release event
 
ViewonMouseMoved (Filter< MouseEvent > &&f)
 Handle move moved event
 
ViewonFingerPressed (Filter< FingerEvent > &&f)
 Handle finger pressed event
 
ViewonFingerReleased (Filter< FingerEvent > &&f)
 Handle finger released event
 
ViewonFingerMoved (Filter< FingerEvent > &&f)
 Handle finger moved event
 
ViewonWheelMoved (Filter< WheelEvent > &&f)
 Handle mouse wheel moved event
 
ViewonKeyPressed (Filter< KeyEvent > &&f)
 Handle key pressed event
 
ViewonKeyReleased (Filter< KeyEvent > &&f)
 Handle key released event
 
ViewonEndOfLife (Function< void()> &&f)
 Get notified when the View's lifetime ends.
 
Viewattach (const Object &other)
 Attach a non-visual object (e.g.
 
Viewattach (Function< void()> &&f)
 Convenience method for attaching a monitor.
 

Additional Inherited Members

- Public Member Functions inherited from Surface
 Surface ()=default
 Create a null surface.
 
void nextPage (bool clear=true)
 Open next page.
 
cairo_surface_t * cairoSurface ()
 Get a pointer to the underlying Cairo surface.
 
void polish ()
 Prepare surface before start painting.
 
- Public Member Functions inherited from Object
 Object ()=default
 Create a null object.
 
 operator bool () const
 Check if this is a non-null object.
 
bool isNull () const
 Check if this is a null object.
 
template<class T >
bool is () const
 Check if this object is of type T.
 
template<class T >
as () const
 Cast this object to type T.
 
bool isWeak () const
 Check if the underlying object reference is weak.
 
bool operator== (const Object &other) const
 Equality operator.
 
std::strong_ordering operator<=> (const Object &other) const
 Ordering operator.
 
long useCount () const
 Reference count.
 
- Protected Attributes inherited from Object
Handle< Stateme
 Internal object state
 

Detailed Description

User interface building block

Member Typedef Documentation

◆ Id

using Id = double

View identifier

Constructor & Destructor Documentation

◆ View() [1/4]

View ( )
default

Create a primordial view.

◆ View() [2/4]

View ( double width,
double height )

Create a new view of initial size (width, height)

◆ View() [3/4]

View ( State * newState)
explicitprotected

Initialize view.

◆ View() [4/4]

View ( CreateState onDemand)
explicitprotected

Initialize view.

Member Function Documentation

◆ associate() [1/2]

View & associate ( Out< View > self)

Get a weak reference in self.

◆ populate()

View & populate ( const Function< void(View)> && f)

Invoke custom initialization function f.

◆ touch()

void touch ( )

Materialize if this view is still primordial.

◆ show()

void show ( )

Convenience method to show this view.

◆ run()

int run ( )

Convenience method to show this view and run the application loop.

◆ paint()

View & paint ( Definition< void > && f)

Define foreground.

◆ paper() [1/3]

Color paper ( ) const

Get background color.

◆ paper() [2/3]

View & paper ( Color newValue)

Set background color

◆ paper() [3/3]

View & paper ( Definition< Color > && f)

Define background color.

◆ visible() [1/3]

bool visible ( ) const

Get visible.

◆ visible() [2/3]

View & visible ( bool newValue)

Set visible

◆ visible() [3/3]

View & visible ( Definition< bool > && f)

Define visible.

◆ opacity() [1/3]

double opacity ( ) const

Get opacity.

◆ opacity() [2/3]

View & opacity ( double newValue)

Set opacity

◆ opacity() [3/3]

View & opacity ( Definition< double > && f)

Define opacity.

◆ opacityEasing()

View & opacityEasing ( const EasingCurve & easing,
double duration )

Set easing on opacity

◆ clip() [1/3]

bool clip ( ) const

Get clip.

◆ clip() [2/3]

View & clip ( bool newValue)

Set clip

◆ clip() [3/3]

View & clip ( Definition< bool > && f)

Define clip.

◆ moving() [1/3]

bool moving ( ) const

Get moving.

◆ moving() [2/3]

View & moving ( bool newValue)

Set moving

◆ moving() [3/3]

View & moving ( Definition< bool > && f)

Define moving.

◆ pos() [1/4]

Point pos ( ) const

Get position.

◆ pos() [2/4]

View & pos ( Point newValue)

Set position

◆ pos() [3/4]

View & pos ( double x,
double y )

Set position

◆ pos() [4/4]

View & pos ( Definition< Point > && f)

Define position.

◆ posEasing()

View & posEasing ( const EasingCurve & easing,
double duration,
Function< bool()> && direct = nullptr )

Set easing on position

◆ size() [1/4]

Size size ( ) const

Get size.

◆ x()

double x ( ) const

Get pos()[0].

◆ y()

double y ( ) const

Get pos()[1].

◆ width()

double width ( ) const

Get size()[0].

◆ height()

double height ( ) const

Get size()[1].

◆ innerWidth()

double innerWidth ( ) const

Get inner width.

◆ innerHeight()

double innerHeight ( ) const

Get inner height.

◆ size() [2/4]

View & size ( Size newValue)

Set size to newValue

◆ size() [3/4]

View & size ( double width,
double height )

Set size to Size{width, height}

◆ size() [4/4]

View & size ( Definition< Size > && f)

Define size.

◆ sizeEasing()

View & sizeEasing ( const EasingCurve & easing,
double duration )

Set easing on size

◆ padding() [1/3]

Padding padding ( ) const

Padding to apply when adding this view to a layout

The padding also extends the views bounds in terms of event propagation.

See also
View::containsLocal(), View::containsGlobal()

◆ padding() [2/3]

View & padding ( const Padding & newValue)

Set padding

◆ padding() [3/3]

View & padding ( Definition< Padding > && f)

Define padding.

◆ pivot() [1/3]

Point pivot ( ) const

Get rotation center.

◆ pivot() [2/3]

View & pivot ( Point newValue)

Set rotation center

◆ pivot() [3/3]

View & pivot ( Definition< Point > && f)

Define rotation center.

◆ pivotEasing()

View & pivotEasing ( const EasingCurve & easing,
double duration )

Set easing on rotation center

◆ angle() [1/3]

double angle ( ) const

Get rotation angle.

◆ angle() [2/3]

View & angle ( double newValue)

Set rotation angle

◆ angle() [3/3]

View & angle ( Definition< double > && f)

Define rotation angle.

◆ angleEasing()

View & angleEasing ( const EasingCurve & easing,
double duration )

Set easing on rotation angle

◆ scale() [1/3]

double scale ( ) const

Get scale factor.

◆ scale() [2/3]

View & scale ( double newValue)

Set scale factor

◆ scale() [3/3]

View & scale ( Definition< double > && f)

Define scale factor.

◆ scaleEasing()

View & scaleEasing ( const EasingCurve & easing,
double duration )

Set easing on scale

◆ decoration() [1/3]

View decoration ( ) const

Get decoration.

◆ decoration() [2/3]

View & decoration ( const View & newValue)

Set decoration

See also
Shadow

◆ decoration() [3/3]

View & decoration ( Definition< View > && f)

Define decoration.

See also
Shadow

◆ preferredSize()

Size preferredSize ( ) const

Get preferred size.

◆ minSize()

Size minSize ( ) const

Get minimal size.

◆ maxSize()

Size maxSize ( ) const

Get maximal size.

◆ basePaper()

Color basePaper ( ) const

Get the background paper.

◆ objectName() [1/2]

const char * objectName ( ) const

Get the object name (for debugging)

◆ objectName() [2/2]

View & objectName ( const char * name)

Set the object name

◆ hasWindow()

bool hasWindow ( ) const

Check if this view is already shown in a window.

◆ window()

Window window ( ) const

Get the window this view is shown in.

◆ isHandheld()

bool isHandheld ( ) const

Get window().display().isHandheld()

◆ id()

Id id ( ) const

Get view identifier.

◆ fullId()

List< Id > fullId ( ) const

Get view identifier heritage list.

◆ operator==()

bool operator== ( const View & other) const

Equality operator.

◆ operator<=>()

std::strong_ordering operator<=> ( const View & other) const

Ordering operator.

◆ hasParent()

bool hasParent ( ) const

Check if this is a child view.

◆ parent()

View parent ( ) const

Get parent view.

◆ root()

View root ( ) const

Get the root view of this window.

◆ childrenCount()

long childrenCount ( ) const

Number of children.

◆ count()

long count ( ) const

Number of children.

◆ hasChildren()

bool hasChildren ( ) const

Check if there are any children.

◆ add()

View & add ( const View & child)

Add new child placed visually above all existing children.

◆ addAbove()

View & addAbove ( const View & child)

Add new child placed visually above all existing children.

◆ addBelow()

View & addBelow ( const View & child)

Add child place visually below all existing children.

◆ insertAt() [1/2]

View & insertAt ( Locator target,
const View & child )

Insert new child at target.

◆ insertAt() [2/2]

View & insertAt ( long index,
const View & child )

Insert new child at index.

◆ remove()

void remove ( const View & child)

Remove a child.

◆ push()

View & push ( const View & child)

Add new child placed visually above all existing children.

◆ pop()

void pop ( )

Remove the top-most visible child.

◆ deplete()

void deplete ( )

Remove all children.

◆ moveToTop()

void moveToTop ( )

Make this view be visible above any other visible sibling.

◆ moveToBottom()

void moveToBottom ( )

Make this view be visible beneath any other visible sibling.

◆ children()

const Set< View > & children ( ) const

Get all child views.

◆ visibleChildren()

const Set< View > & visibleChildren ( ) const

Get visible child views.

◆ childrenRect()

Rect childrenRect ( ) const

Get bounding box containing all visible child views including their paddings.

◆ mapToGlobal()

Point mapToGlobal ( Point l) const

Map view coordinates l to window coordinates

◆ mapToLocal()

Point mapToLocal ( Point g) const

Map window coordinates g to view coordinates

◆ mapToChild()

Point mapToChild ( const View & child,
Point l ) const

Map local coordinates l to child coordinates

◆ mapToParent()

Point mapToParent ( const View & parent,
Point l ) const

Map local coordinates l to parent coordinates

◆ containsLocal()

bool containsLocal ( Point l) const

Check if local point l lays inside this view.

◆ containsGlobal()

bool containsGlobal ( Point g) const

Check if global point l lays inside this view.

◆ findChild()

View findChild ( Point l) const

Find the first child which contains local point l.

◆ findControl()

Control findControl ( Point l) const

Find the first control which contains local point l.

◆ isParentOf()

bool isParentOf ( const View & other) const

Check if this view is parent of other.

◆ laysInsideOf()

bool laysInsideOf ( const View & other,
double margin ) const

Check if this view is fully visible inside other with given surrounding margin.

◆ update()

void update ( )

Manually force repaint.

◆ collectVisible()

template<class T >
void collectVisible ( InOut< List< T > > collection) const

Get a list of all visible children in this view tree which are of type T.

◆ layout() [1/2]

Layout layout ( ) const

Get layout.

◆ layout() [2/2]

View & layout ( const Layout & newValue)

Set layout

◆ renderTo()

void renderTo ( Image & image) const

Capture a rendered image of this view (including its children) as rendered on the screen.

Parameters
imageOutput image (needs to be allocated by the caller)

◆ top()

double top ( ) const

Get y-coordinate of this view's top border.

◆ bottom()

double bottom ( ) const

Get y-coordinate of this view's bottom border.

◆ left()

double left ( ) const

Get x-coordinate of this view's left border.

◆ right()

double right ( ) const

Get x-coordinate of this view's right border.

◆ topLeft() [1/3]

Point topLeft ( ) const

Get this view's top-left corner.

◆ topCenter() [1/3]

Point topCenter ( ) const

Get this view's top-center point.

◆ topRight() [1/3]

Point topRight ( ) const

Get this view's top-right corner.

◆ bottomLeft() [1/3]

Point bottomLeft ( ) const

Get this view's bottom-left corner.

◆ bottomCenter() [1/3]

Point bottomCenter ( ) const

Get this view's bottom-center point.

◆ bottomRight() [1/3]

Point bottomRight ( ) const

Get this view's bottom-right corner.

◆ centerLeft() [1/3]

Point centerLeft ( ) const

Get this view's center-left point.

◆ centerRight() [1/3]

Point centerRight ( ) const

Get this view's center-right point.

◆ topLeft() [2/3]

View & topLeft ( Point newValue)

Make this view's top-left match newValue.

◆ topCenter() [2/3]

View & topCenter ( Point newValue)

Make this view's top-center match newValue.

◆ topRight() [2/3]

View & topRight ( Point newValue)

Make this view's top-right match newValue.

◆ bottomLeft() [2/3]

View & bottomLeft ( Point newValue)

Make this view's bottom-left match newValue.

◆ bottomCenter() [2/3]

View & bottomCenter ( Point newValue)

Make this view's bottom-center match newValue.

◆ bottomRight() [2/3]

View & bottomRight ( Point newValue)

Make this view's bottom-right match newValue.

◆ centerLeft() [2/3]

View & centerLeft ( Point newValue)

Make this view's center-left match newValue.

◆ centerRight() [2/3]

View & centerRight ( Point newValue)

Make this view's center-right match newValue.

◆ center() [1/2]

View & center ( Point newValue)

Make this view's center match newValue.

◆ topLeft() [3/3]

View & topLeft ( Definition< Point > && a)

Anchor the top-left corner to a

◆ topCenter() [3/3]

View & topCenter ( Definition< Point > && a)

Anchor the top-center corner to a

◆ topRight() [3/3]

View & topRight ( Definition< Point > && a)

Anchor the top-right corner to a

◆ bottomLeft() [3/3]

View & bottomLeft ( Definition< Point > && a)

Anchor the bottom-left corner to a

◆ bottomCenter() [3/3]

View & bottomCenter ( Definition< Point > && a)

Anchor the bottom-center corner to a

◆ bottomRight() [3/3]

View & bottomRight ( Definition< Point > && a)

Anchor the bottom-right corner to a

◆ centerLeft() [3/3]

View & centerLeft ( Definition< Point > && a)

Anchor the center-left to a

◆ centerRight() [3/3]

View & centerRight ( Definition< Point > && a)

Anchor the center-right to a

◆ center() [2/2]

View & center ( Definition< Point > && a)

Anchor the center to a

◆ centerInParent()

View & centerInParent ( )

Anchor this view's center to its parent's center.

◆ onWindowEntered()

View & onWindowEntered ( Function< void()> && f)

Handle window enter event

◆ onWindowLeft()

View & onWindowLeft ( Function< void()> && f)

Handle window leave event

◆ onPointerPressed()

View & onPointerPressed ( Filter< PointerEvent > && f)

Handle pointer pressed event

◆ onPointerReleased()

View & onPointerReleased ( Filter< PointerEvent > && f)

Handle pointer release event

◆ onPointerMoved()

View & onPointerMoved ( Filter< PointerEvent > && f)

Handle pointer moved event

◆ onMousePressed()

View & onMousePressed ( Filter< MouseEvent > && f)

Handle move pressed event

◆ onMouseReleased()

View & onMouseReleased ( Filter< MouseEvent > && f)

Handle mouse release event

◆ onMouseMoved()

View & onMouseMoved ( Filter< MouseEvent > && f)

Handle move moved event

◆ onFingerPressed()

View & onFingerPressed ( Filter< FingerEvent > && f)

Handle finger pressed event

◆ onFingerReleased()

View & onFingerReleased ( Filter< FingerEvent > && f)

Handle finger released event

◆ onFingerMoved()

View & onFingerMoved ( Filter< FingerEvent > && f)

Handle finger moved event

◆ onWheelMoved()

View & onWheelMoved ( Filter< WheelEvent > && f)

Handle mouse wheel moved event

◆ onKeyPressed()

View & onKeyPressed ( Filter< KeyEvent > && f)

Handle key pressed event

◆ onKeyReleased()

View & onKeyReleased ( Filter< KeyEvent > && f)

Handle key released event

◆ onEndOfLife()

View & onEndOfLife ( Function< void()> && f)

Get notified when the View's lifetime ends.

◆ attach() [1/2]

View & attach ( const Object & other)

Attach a non-visual object (e.g.

a Monitor)

◆ attach() [2/2]

View & attach ( Function< void()> && f)

Convenience method for attaching a monitor.

◆ grab()

template<class T >
T grab ( )
protected

Get a weak reference version of this object.

◆ associate() [2/2]

template<class T >
T & associate ( Out< T > self)
protected

Convenience method to associate a weak reference to this objet.

◆ get() [1/2]

template<class T >
T & get ( )
protected

Get access to the object's state (create it if needed)

Template Parameters
TType of internal state

◆ get() [2/2]

template<class T >
const T & get ( ) const
protected

Get access to the object's state (create it if needed)

Template Parameters
TType of internal state