Rose
Classes | Namespaces | Functions
Visual.h File Reference

User Interface Visual types. More...

#include <iostream>
#include <utility>
#include <optional>
#include <limits>
#include "Callbacks.h"
#include "StructuredTypes.h"
#include "Types.h"
#include "Utilities.h"
#include "Texture.h"
Include dependency graph for Visual.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  rose::State
 A type to specify a state. More...
 
struct  rose::SemanticGesture
 The type of semantic gesture supported by a Widget. More...
 
class  rose::LayoutHint
 
class  rose::Visual
 The properties common to all visual objects on the screen. More...
 
class  rose::Screen
 An abstraction of the available display screen. More...
 
class  rose::Window
 A Window is a visual abstraction of a number of related user interface objects. More...
 
class  rose::LayoutManager
 A pure virtual base class for layout managers. More...
 
class  rose::SimpleLayout
 A Simple layout manager. More...
 
class  rose::LayoutManagerError
 An exception to indicate runtime error during layout. More...
 
class  rose::Widget
 An element of the application user interface. More...
 
class  rose::Manager
 A Widget which manages contained Widgets. More...
 
class  rose::Parent
 A type used to extract the parent from a Widget. More...
 

Namespaces

 rose
 ToDo: There is an issue that the initial scroll interaction is lost if the click/press lands on a Widget and not a Container (by user observation).
 

Functions

template<class Layout , typename ... Args>
std::unique_ptr< Layoutrose::makeLayout (Args ... args)
 
template<class WidgetClass , typename ... Args>
std::shared_ptr< WidgetClass > rose::wdg (Args ... args)
 Create a Widget. More...
 
template<class WidgetClass >
std::shared_ptr< WidgetClass > operator>> (std::shared_ptr< WidgetClass > widget, std::shared_ptr< rose::Widget > &store)
 An extraction operator to store a Widget in a std::shared_ptr<Widget>. More...
 
template<class WidgetClass >
std::shared_ptr< WidgetClass > operator>> (std::shared_ptr< WidgetClass > widget, std::shared_ptr< WidgetClass > &store)
 An extraction operator to store a Widget in a specifically typed std::shared_ptr<WidgetClass>. More...
 
template<class WidgetClass >
std::shared_ptr< rose::Manageroperator<< (std::shared_ptr< WidgetClass > widget, const rose::Parent &)
 An insertion operator that take a Parent value and returns the parent of a Widget. More...
 
template<class WidgetClass >
std::shared_ptr< WidgetClass > operator<< (std::shared_ptr< WidgetClass > widget, const rose::Size &size)
 An insertion operator to set the preferred size of a Widget. More...
 
template<class WidgetClass >
std::shared_ptr< WidgetClass > operator<< (std::shared_ptr< WidgetClass > widget, const rose::Position< int > &position)
 An insertion operator to set the preferred Position of a Widget. More...
 
template<class ContainerClass , class WidgetClass >
std::shared_ptr< WidgetClass > operator<< (std::shared_ptr< ContainerClass > container, std::shared_ptr< WidgetClass > widget)
 Insertion operator to place a Widget in a Container. More...
 
template<class WidgetClass >
std::shared_ptr< WidgetClass > operator<< (std::shared_ptr< WidgetClass > widget, std::unique_ptr< rose::LayoutManager > &&layout)
 An insertion operator to set the LayoutManager of a Manager. More...
 
template<class WidgetClass >
std::shared_ptr< WidgetClass > operator<< (std::shared_ptr< WidgetClass > widget, const rose::Padding &padding)
 An insertion operator to set the Padding of a Widget. More...
 
template<class WidgetClass >
std::shared_ptr< WidgetClass > operator<< (std::shared_ptr< WidgetClass > widget, const rose::LayoutHint &hint)
 An insertion operator to set a LyoutHing on a Widget. More...
 

Detailed Description

User Interface Visual types.

Author
Richard Buckley richa.nosp@m.rd.b.nosp@m.uckle.nosp@m.y@ie.nosp@m.ee.or.nosp@m.g
Version
1.0
Date
2021-03-04

Function Documentation

◆ operator<<() [1/7]

template<class WidgetClass >
std::shared_ptr<WidgetClass> operator<< ( std::shared_ptr< WidgetClass >  widget,
const rose::LayoutHint hint 
)
inline

An insertion operator to set a LyoutHing on a Widget.

Template Parameters
WidgetClassThe class of the Widget.
Parameters
widgetThe Widget.
hintThe LayoutHint.
Returns
The Widget.

◆ operator<<() [2/7]

template<class WidgetClass >
std::shared_ptr<rose::Manager> operator<< ( std::shared_ptr< WidgetClass >  widget,
const rose::Parent  
)
inline

An insertion operator that take a Parent value and returns the parent of a Widget.

Template Parameters
WidgetClassThe class of the Widget.
Parameters
widgetThe Widget.
Returns
The Manager of the Widget, or an empty pointer if the Widget has no Manager.

◆ operator<<() [3/7]

template<class ContainerClass , class WidgetClass >
std::shared_ptr<WidgetClass> operator<< ( std::shared_ptr< ContainerClass >  container,
std::shared_ptr< WidgetClass >  widget 
)
inline

Insertion operator to place a Widget in a Container.

Template Parameters
ContainerClassThe class of the Container.
WidgetClassThe class of the Widget.
Parameters
containerThe container.
widgetThe Widget.
Returns
The Widget.

◆ operator<<() [4/7]

template<class WidgetClass >
std::shared_ptr<WidgetClass> operator<< ( std::shared_ptr< WidgetClass >  widget,
std::unique_ptr< rose::LayoutManager > &&  layout 
)
inline

An insertion operator to set the LayoutManager of a Manager.

Template Parameters
WidgetClassThe class of the Manager.
Parameters
widgetThe Manager.
layoutThe LayoutManger.
Returns
The Widget.

◆ operator<<() [5/7]

template<class WidgetClass >
std::shared_ptr<WidgetClass> operator<< ( std::shared_ptr< WidgetClass >  widget,
const rose::Position< int > &  position 
)
inline

An insertion operator to set the preferred Position of a Widget.

Template Parameters
WidgetClassThe class of the Widget.
Parameters
widgetThe Widget.
positionThe Position.
Returns
The Widget.

◆ operator<<() [6/7]

template<class WidgetClass >
std::shared_ptr<WidgetClass> operator<< ( std::shared_ptr< WidgetClass >  widget,
const rose::Padding padding 
)
inline

An insertion operator to set the Padding of a Widget.

Template Parameters
WidgetClassThe class of the Widget.
Parameters
widgetThe Widget.
paddingThe Padding.
Returns
The Widget.

◆ operator<<() [7/7]

template<class WidgetClass >
std::shared_ptr<WidgetClass> operator<< ( std::shared_ptr< WidgetClass >  widget,
const rose::Size size 
)
inline

An insertion operator to set the preferred size of a Widget.

Template Parameters
WidgetClassThe class of the Widget.
Parameters
widgetThe Widget.
sizeThe Size.
Returns
The Widget.

◆ operator>>() [1/2]

template<class WidgetClass >
std::shared_ptr<WidgetClass> operator>> ( std::shared_ptr< WidgetClass >  widget,
std::shared_ptr< rose::Widget > &  store 
)
inline

An extraction operator to store a Widget in a std::shared_ptr<Widget>.

Acting like a 'Tee' operation the Widget is both saved and passed on to be used in further processing.

Template Parameters
WidgetClassThe class of the Widget.
Parameters
widgetThe widget.
storeThe variable that will store the std::shared_ptr<Widget>.
Returns
The Widget.

◆ operator>>() [2/2]

template<class WidgetClass >
std::shared_ptr<WidgetClass> operator>> ( std::shared_ptr< WidgetClass >  widget,
std::shared_ptr< WidgetClass > &  store 
)
inline

An extraction operator to store a Widget in a specifically typed std::shared_ptr<WidgetClass>.

Acting like a 'Tee' operation the Widget is both saved and passed on to be used in further processing.

Template Parameters
WidgetClassThe class of the Widget.
Parameters
widgetThe widget.
storeThe variable that will store the std::shared_ptr<WidgetClass>.
Returns
The Widget.