public

Inheritance Graph

graph BT
	Component
	Component --> AttributeProvider
	Component --> ReferenceCounter
	Container --> Component
	Icon --> Component
	Image --> Component
	Label --> Component
	NextColumn --> Component
	NextRow --> Component
	Splitter --> Component
	Textfield --> Component
	click Component "classGUI_1_1Component"
	click AttributeProvider "classUtil_1_1AttributeProvider"
	click ReferenceCounter "classUtil_1_1ReferenceCounter"
	click Container "classGUI_1_1Container"
	click Icon "classGUI_1_1Icon"
	click Image "classGUI_1_1Image"
	click Label "classGUI_1_1Label"
	click NextColumn "classGUI_1_1NextColumn"
	click NextRow "classGUI_1_1NextRow"
	click Splitter "classGUI_1_1Splitter"
	click Textfield "classGUI_1_1Textfield"

Description

Classes

   
struct GUI::Component::Visitor

Main

   
   
typedef uint32_t flag_t
   
typedef Util::Reference < Component > Ref
   
  Component( GUI_Manager & gui, flag_t flags)
   
  Component( GUI_Manager & gui, const Geometry::Rect & relRect, flag_t flags)
   
  ~Component()
   
GUI_Manager & getGUI() const
   
std::string toString() const
   
void destroy( Component * c)

Tree management

   
   
void _setParent(const Util::WeakPointer < Container > & c)
   
void _updateNeighbors(const Ref & newPrev, const Ref & newNext)
   
void bringToFront()
   
Container * getParent() const
   
Component * getNext() const
   
Component * getPrev() const
   
bool hasParent() const
   
void setNext(const Ref & newNext)
   
void setPrev(const Ref & newPrev)

Flags

   
   
const flag_t DISABLED
   
const flag_t TRANSPARENT_COMPONENT
component is not found by getComponentAtPos(…); its not clickable!
   
const flag_t AUTO_MAXIMIZE
   
const flag_t AUTO_MINIMIZE
Experimental: The component should resize to enclose all children.
   
const flag_t BORDER
   
const flag_t RAISED_BORDER
   
const flag_t LOWERED_BORDER
   
const flag_t BACKGROUND
   
const flag_t USE_SCISSOR
   
const flag_t SELECTABLE
   
const flag_t IS_CLIENT_AREA
Used to mark internal components so that the external layout can use the parent of the component as reference.
   
const flag_t ALWAYS_ON_TOP
Used to mark (top-level) components which should never be behind non ALWAYS_ON_TOP components.
   
const flag_t LOCKED
Input components are read only.
   
const flag_t HAS_MOUSECURSOR_PROPERTY
   
const flag_t DESTROYED
   
const flag_t ABS_POSITION_VALID
   
const flag_t LAYOUT_VALID
   
const flag_t SUBTREE_LAYOUT_VALID
   
const flag_t SELECTED
   
void activate()
   
void deactivate()
   
void disable()
   
void enable()
   
bool getFlag( flag_t f) const
   
bool isActive() const
   
bool isDestroyed() const
   
bool isEnabled() const
   
bool isLocked() const
   
bool isSelected() const
   
bool isSelectable() const
   
bool isVisible() const
   
void setEnabled(bool e)
   
void setFlag( flag_t f, bool value)
   
void setLocked(bool b)
   
void unselect()
   
void select()
   
void unselectSubtree()

Layout

   
   
void addLayouter( Util::Reference < AbstractLayouter > layouter)
   
void clearLayouters()
   
void doLayout()
   
std::vector< Util::Reference < AbstractLayouter > > getLayouters() const
template< class Layouter_t >  
Layouter_t * getLayouter() const
   
bool hasLayouter() const
   
void invalidateLayout()
   
void invalidateSubtreeLayout()
   
uint32_t layout()
   
uint32_t layoutChildren()
   
void removeLayouter( Util::WeakPointer < AbstractLayouter > layouter)
template< class Layouter_t >  
bool removeLayouter()

Display properties

   
   
typedef std::vector< Util::Reference < DisplayProperty > > properties_t
   
void addProperty( DisplayProperty * p)
   
void removeProperty( DisplayProperty * p)
   
void clearProperties()
   
const properties_t & getProperties() const
   
void addLocalProperty( DisplayProperty * p)
   
void removeLocalProperty( DisplayProperty * p)
   
void clearLocalProperties()
   
const properties_t & getLocalProperties() const

Display

   
   
void display(const Geometry::Rect & region)
   
void enableLocalDisplayProperties()
   
void disableLocalDisplayProperties()
   
void displayDefaultShapes()

Position and bounds

   
   
bool coversAbsPosition(const Geometry::Vec2 & p)
   
bool coversLocalPosition(const Geometry::Vec2 & localPos)
   
Geometry::Vec2 getAbsPosition()
   
Geometry::Rect getAbsRect()
   
Geometry::Rect getInnerRect() const
   
float getHeight() const
   
Geometry::Rect getLocalRect() const
   
Geometry::Rect getRect() const
   
Geometry::Vec2 getPosition() const
   
float getWidth() const
   
void invalidateAbsPosition()
   
void invalidateRegion()
   
void moveRel(const Geometry::Vec2 & v)
   
void setPosition(const Geometry::Vec2 & newPos)
   
void setRect(const Geometry::Rect & newRect)
   
void setRect(const Geometry::Vec2 & pos, const Geometry::Vec2 & size)
   
void setSize(float width, float height)
   
void setSize(const Geometry::Vec2 & s)
   
void setHeight(float f)
   
void setWidth(float f)

Helper

   
   
Component * getComponentAtPos(const Geometry::Vec2 & pos)
   
Component * findSelectedComponent()

Events Handler

   
   
bool onSelect()
   
bool onUnselect()

Traversal

   
   
enum visitorResult_t {CONTINUE_TRAVERSAL, BREAK_TRAVERSAL, EXIT_TRAVERSAL}
   
visitorResult_t traverseChildren( Visitor & void)
   
visitorResult_t traverseSubtree( Visitor & v)

MouseCursor

   
   
bool hasMouseCursorProperty() const
   
void setMouseCursorProperty( propertyName_t type)
   
propertyName_t getMouseCursorProperty()

Tooltip

   
   
bool hasTooltip() const
   
std::string getTooltip() const
   
void setTooltip(const std::string & s)
   
void removeTooltip()

Public Functions

   
   
void setExtLayout(uint32_t flags, const Geometry::Vec2 & extPos, const Geometry::Vec2 & extRelSize)
   
void setExtLayout(uint32_t flags, const Geometry::Vec2 & extPos)
   
void removeExternalLayout()

Documentation

typedef
GUI::Component::flag_t

public
 
 
typedef uint32_t flag_t

Defined in GUI/Components/Component.h:47


typedef
GUI::Component::Ref

public
 
 
typedef Util::Reference < Component > Ref

Defined in GUI/Components/Component.h:48


function
GUI::Component::Component

public
     
     
Component( GUI_Manager & gui,
  flag_t flags
)    

Defined in GUI/Components/Component.h:50


function
GUI::Component::Component

public
     
     
Component( GUI_Manager & gui,
  const Geometry::Rect & relRect,
  flag_t flags
)    

Defined in GUI/Components/Component.h:51


function
GUI::Component::~Component

public virtual
   
   
~Component( )

Defined in GUI/Components/Component.h:52


function
GUI::Component::getGUI

public const inline
   
   
GUI_Manager & getGUI( ) const

Defined in GUI/Components/Component.h:54


function
GUI::Component::toString

public const virtual
   
   
std::string toString( ) const

Defined in GUI/Components/Component.h:61


function
GUI::Component::destroy

public static
     
     
void destroy( Component * c )

Defined in GUI/Components/Component.h:58


function
GUI::Component::_setParent

public inline
     
     
void _setParent( const Util::WeakPointer < Container > & c )

Defined in GUI/Components/Component.h:77


function
GUI::Component::_updateNeighbors

public
     
     
void _updateNeighbors( const Ref & newPrev,
  const Ref & newNext
)    

Defined in GUI/Components/Component.h:78


function
GUI::Component::bringToFront

public
   
   
void bringToFront( )

Defined in GUI/Components/Component.h:80


function
GUI::Component::getParent

public const inline
   
   
Container * getParent( ) const

Defined in GUI/Components/Component.h:82


function
GUI::Component::getNext

public const inline
   
   
Component * getNext( ) const

Defined in GUI/Components/Component.h:83


function
GUI::Component::getPrev

public const inline
   
   
Component * getPrev( ) const

Defined in GUI/Components/Component.h:84


function
GUI::Component::hasParent

public const inline
   
   
bool hasParent( ) const

Defined in GUI/Components/Component.h:85


function
GUI::Component::setNext

protected inline
     
     
void setNext( const Ref & newNext )

Defined in GUI/Components/Component.h:73


function
GUI::Component::setPrev

protected inline
     
     
void setPrev( const Ref & newPrev )

Defined in GUI/Components/Component.h:74


variable
GUI::Component::DISABLED

public static
 
 
const flag_t DISABLED

Defined in GUI/Components/Component.h:97


variable
GUI::Component::TRANSPARENT_COMPONENT

public static
 
 
const flag_t TRANSPARENT_COMPONENT

component is not found by getComponentAtPos(…); its not clickable!

Defined in GUI/Components/Component.h:98


variable
GUI::Component::AUTO_MAXIMIZE

public static
 
 
const flag_t AUTO_MAXIMIZE

Defined in GUI/Components/Component.h:99


variable
GUI::Component::AUTO_MINIMIZE

public static
 
 
const flag_t AUTO_MINIMIZE

Experimental: The component should resize to enclose all children.

Defined in GUI/Components/Component.h:100


variable
GUI::Component::BORDER

public static
 
 
const flag_t BORDER

Defined in GUI/Components/Component.h:101


variable
GUI::Component::RAISED_BORDER

public static
 
 
const flag_t RAISED_BORDER

Defined in GUI/Components/Component.h:102


variable
GUI::Component::LOWERED_BORDER

public static
 
 
const flag_t LOWERED_BORDER

Defined in GUI/Components/Component.h:103


variable
GUI::Component::BACKGROUND

public static
 
 
const flag_t BACKGROUND

Defined in GUI/Components/Component.h:104


variable
GUI::Component::USE_SCISSOR

public static
 
 
const flag_t USE_SCISSOR

Defined in GUI/Components/Component.h:105


variable
GUI::Component::SELECTABLE

public static
 
 
const flag_t SELECTABLE

Defined in GUI/Components/Component.h:106


variable
GUI::Component::IS_CLIENT_AREA

public static
 
 
const flag_t IS_CLIENT_AREA

Used to mark internal components so that the external layout can use the parent of the component as reference.

Defined in GUI/Components/Component.h:107


variable
GUI::Component::ALWAYS_ON_TOP

public static
 
 
const flag_t ALWAYS_ON_TOP

Used to mark (top-level) components which should never be behind non ALWAYS_ON_TOP components.

Defined in GUI/Components/Component.h:108


variable
GUI::Component::LOCKED

public static
 
 
const flag_t LOCKED

Input components are read only.

Defined in GUI/Components/Component.h:109


variable
GUI::Component::HAS_MOUSECURSOR_PROPERTY

public static
 
 
const flag_t HAS_MOUSECURSOR_PROPERTY

Defined in GUI/Components/Component.h:110


variable
GUI::Component::DESTROYED

public static
 
 
const flag_t DESTROYED

Defined in GUI/Components/Component.h:112


variable
GUI::Component::ABS_POSITION_VALID

public static
 
 
const flag_t ABS_POSITION_VALID

Defined in GUI/Components/Component.h:113


variable
GUI::Component::LAYOUT_VALID

public static
 
 
const flag_t LAYOUT_VALID

Defined in GUI/Components/Component.h:114


variable
GUI::Component::SUBTREE_LAYOUT_VALID

public static
 
 
const flag_t SUBTREE_LAYOUT_VALID

Defined in GUI/Components/Component.h:115


variable
GUI::Component::SELECTED

public static
 
 
const flag_t SELECTED

Defined in GUI/Components/Component.h:116


function
GUI::Component::activate

public
   
   
void activate( )

Defined in GUI/Components/Component.h:118


function
GUI::Component::deactivate

public
   
   
void deactivate( )

Defined in GUI/Components/Component.h:119


function
GUI::Component::disable

public
   
   
void disable( )

Defined in GUI/Components/Component.h:120


function
GUI::Component::enable

public
   
   
void enable( )

Defined in GUI/Components/Component.h:121


function
GUI::Component::getFlag

public const inline
     
     
bool getFlag( flag_t f ) const

Defined in GUI/Components/Component.h:122


function
GUI::Component::isActive

public const
   
   
bool isActive( ) const

Defined in GUI/Components/Component.h:123


function
GUI::Component::isDestroyed

public const inline
   
   
bool isDestroyed( ) const

Defined in GUI/Components/Component.h:124


function
GUI::Component::isEnabled

public const inline
   
   
bool isEnabled( ) const

Defined in GUI/Components/Component.h:125


function
GUI::Component::isLocked

public const inline
   
   
bool isLocked( ) const

Defined in GUI/Components/Component.h:126


function
GUI::Component::isSelected

public const inline
   
   
bool isSelected( ) const

Defined in GUI/Components/Component.h:127


function
GUI::Component::isSelectable

public const inline
   
   
bool isSelectable( ) const

Defined in GUI/Components/Component.h:128


function
GUI::Component::isVisible

public const
   
   
bool isVisible( ) const

Defined in GUI/Components/Component.h:129


function
GUI::Component::setEnabled

public inline
     
     
void setEnabled( bool e )

Defined in GUI/Components/Component.h:130


function
GUI::Component::setFlag

public inline
     
     
void setFlag( flag_t f,
  bool value
)    

Defined in GUI/Components/Component.h:131


function
GUI::Component::setLocked

public inline
     
     
void setLocked( bool b )

Defined in GUI/Components/Component.h:132


function
GUI::Component::unselect

public inline
   
   
void unselect( )

Defined in GUI/Components/Component.h:135


function
GUI::Component::select

public
   
   
void select( )

Defined in GUI/Components/Component.h:136


function
GUI::Component::unselectSubtree

public
   
   
void unselectSubtree( )

Defined in GUI/Components/Component.h:137


function
GUI::Component::addLayouter

public inline
     
     
void addLayouter( Util::Reference < AbstractLayouter > layouter )

Defined in GUI/Components/Component.h:147


function
GUI::Component::clearLayouters

public inline
   
   
void clearLayouters( )

Defined in GUI/Components/Component.h:148


function
GUI::Component::doLayout

public inline virtual
   
   
void doLayout( )

Defined in GUI/Components/Component.h:150


function
GUI::Component::getLayouters

public const inline
   
   
std::vector< Util::Reference < AbstractLayouter > > getLayouters( ) const

Defined in GUI/Components/Component.h:151


function
GUI::Component::getLayouter

public const inline
   
template< class Layouter_t >  
Layouter_t * getLayouter( ) const

Defined in GUI/Components/Component.h:154


function
GUI::Component::hasLayouter

public const inline
   
   
bool hasLayouter( ) const

Defined in GUI/Components/Component.h:164


function
GUI::Component::invalidateLayout

public
   
   
void invalidateLayout( )

Defined in GUI/Components/Component.h:166


function
GUI::Component::invalidateSubtreeLayout

public
   
   
void invalidateSubtreeLayout( )

Defined in GUI/Components/Component.h:167


function
GUI::Component::layout

public
   
   
uint32_t layout( )

The size of the component is set correctly (if necessary) and all children are layouted recursivly.

Defined in GUI/Components/Component.h:170


function
GUI::Component::layoutChildren

public
   
   
uint32_t layoutChildren( )

Defined in GUI/Components/Component.h:171


function
GUI::Component::removeLayouter

public
     
     
void removeLayouter( Util::WeakPointer < AbstractLayouter > layouter )

Defined in GUI/Components/Component.h:173


function
GUI::Component::removeLayouter

public inline
   
template< class Layouter_t >  
bool removeLayouter( )

Defined in GUI/Components/Component.h:176


typedef
GUI::Component::properties_t

public
 
 
typedef std::vector< Util::Reference < DisplayProperty > > properties_t

Defined in GUI/Components/Component.h:192


function
GUI::Component::addProperty

public inline
     
     
void addProperty( DisplayProperty * p )

Defined in GUI/Components/Component.h:193


function
GUI::Component::removeProperty

public
     
     
void removeProperty( DisplayProperty * p )

Defined in GUI/Components/Component.h:194


function
GUI::Component::clearProperties

public inline
   
   
void clearProperties( )

Defined in GUI/Components/Component.h:195


function
GUI::Component::getProperties

public const inline
   
   
const properties_t & getProperties( ) const

Defined in GUI/Components/Component.h:196


function
GUI::Component::addLocalProperty

public inline
     
     
void addLocalProperty( DisplayProperty * p )

Defined in GUI/Components/Component.h:197


function
GUI::Component::removeLocalProperty

public
     
     
void removeLocalProperty( DisplayProperty * p )

Defined in GUI/Components/Component.h:198


function
GUI::Component::clearLocalProperties

public inline
   
   
void clearLocalProperties( )

Defined in GUI/Components/Component.h:199


function
GUI::Component::getLocalProperties

public const inline
   
   
const properties_t & getLocalProperties( ) const

Defined in GUI/Components/Component.h:200


function
GUI::Component::display

public
     
     
void display( const Geometry::Rect & region )

Defined in GUI/Components/Component.h:212


function
GUI::Component::enableLocalDisplayProperties

protected
   
   
void enableLocalDisplayProperties( )

Defined in GUI/Components/Component.h:219


function
GUI::Component::disableLocalDisplayProperties

protected
   
   
void disableLocalDisplayProperties( )

Defined in GUI/Components/Component.h:220


function
GUI::Component::displayDefaultShapes

protected
   
   
void displayDefaultShapes( )

Defined in GUI/Components/Component.h:221


function
GUI::Component::coversAbsPosition

public inline
     
     
bool coversAbsPosition( const Geometry::Vec2 & p )

Defined in GUI/Components/Component.h:235


function
GUI::Component::coversLocalPosition

public virtual
     
     
bool coversLocalPosition( const Geometry::Vec2 & localPos )

Defined in GUI/Components/Component.h:237


function
GUI::Component::getAbsPosition

public
   
   
Geometry::Vec2 getAbsPosition( )

Defined in GUI/Components/Component.h:239


function
GUI::Component::getAbsRect

public inline
   
   
Geometry::Rect getAbsRect( )

Defined in GUI/Components/Component.h:240


function
GUI::Component::getInnerRect

public const inline virtual
   
   
Geometry::Rect getInnerRect( ) const

o The component’s inner rectangle defines the area, that may be covered by children (=content) (not regarding scrolling). It can be used as a hint for the maximum size of children.

Defined in GUI/Components/Component.h:246


function
GUI::Component::getHeight

public const inline
   
   
float getHeight( ) const

Defined in GUI/Components/Component.h:248


function
GUI::Component::getLocalRect

public const inline
   
   
Geometry::Rect getLocalRect( ) const

Defined in GUI/Components/Component.h:249


function
GUI::Component::getRect

public const inline
   
   
Geometry::Rect getRect( ) const

Defined in GUI/Components/Component.h:250


function
GUI::Component::getPosition

public const inline
   
   
Geometry::Vec2 getPosition( ) const

Defined in GUI/Components/Component.h:251


function
GUI::Component::getWidth

public const inline
   
   
float getWidth( ) const

Defined in GUI/Components/Component.h:252


function
GUI::Component::invalidateAbsPosition

public
   
   
void invalidateAbsPosition( )

Defined in GUI/Components/Component.h:254


function
GUI::Component::invalidateRegion

public virtual
   
   
void invalidateRegion( )

Defined in GUI/Components/Component.h:256


function
GUI::Component::moveRel

public inline
     
     
void moveRel( const Geometry::Vec2 & v )

Defined in GUI/Components/Component.h:258


function
GUI::Component::setPosition

public inline
     
     
void setPosition( const Geometry::Vec2 & newPos )

Defined in GUI/Components/Component.h:260


function
GUI::Component::setRect

public
     
     
void setRect( const Geometry::Rect & newRect )

Defined in GUI/Components/Component.h:261


function
GUI::Component::setRect

public inline
     
     
void setRect( const Geometry::Vec2 & pos,
  const Geometry::Vec2 & size
)    

Defined in GUI/Components/Component.h:262


function
GUI::Component::setSize

public inline
     
     
void setSize( float width,
  float height
)    

Defined in GUI/Components/Component.h:265


function
GUI::Component::setSize

public inline
     
     
void setSize( const Geometry::Vec2 & s )

Defined in GUI/Components/Component.h:266


function
GUI::Component::setHeight

public inline
     
     
void setHeight( float f )

Defined in GUI/Components/Component.h:267


function
GUI::Component::setWidth

public inline
     
     
void setWidth( float f )

Defined in GUI/Components/Component.h:268


function
GUI::Component::getComponentAtPos

public
     
     
Component * getComponentAtPos( const Geometry::Vec2 & pos )

Defined in GUI/Components/Component.h:286


function
GUI::Component::findSelectedComponent

public
   
   
Component * findSelectedComponent( )

Defined in GUI/Components/Component.h:287


function
GUI::Component::onSelect

public virtual
   
   
bool onSelect( )

Defined in GUI/Components/Component.h:296


function
GUI::Component::onUnselect

public virtual
   
   
bool onUnselect( )

Defined in GUI/Components/Component.h:297


enum
GUI::Component::visitorResult_t

public
 
 
enum visitorResult_t
Enumerator   Description
Enumerator   Description
CONTINUE_TRAVERSAL    
BREAK_TRAVERSAL    
EXIT_TRAVERSAL    

Defined in GUI/Components/Component.h:305


function
GUI::Component::traverseChildren

public inline virtual
     
     
visitorResult_t traverseChildren( Visitor & void )

Defined in GUI/Components/Component.h:314


function
GUI::Component::traverseSubtree

public inline virtual
     
     
visitorResult_t traverseSubtree( Visitor & v )

Defined in GUI/Components/Component.h:315


function
GUI::Component::hasMouseCursorProperty

public const inline
   
   
bool hasMouseCursorProperty( ) const

Defined in GUI/Components/Component.h:324


function
GUI::Component::setMouseCursorProperty

public
     
     
void setMouseCursorProperty( propertyName_t type )

Defined in GUI/Components/Component.h:325


function
GUI::Component::getMouseCursorProperty

public
   
   
propertyName_t getMouseCursorProperty( )

Defined in GUI/Components/Component.h:326


function
GUI::Component::hasTooltip

public const virtual
   
   
bool hasTooltip( ) const

Defined in GUI/Components/Component.h:335


function
GUI::Component::getTooltip

public const virtual
   
   
std::string getTooltip( ) const

Defined in GUI/Components/Component.h:336


function
GUI::Component::setTooltip

public virtual
     
     
void setTooltip( const std::string & s )

Defined in GUI/Components/Component.h:337


function
GUI::Component::removeTooltip

public virtual
   
   
void removeTooltip( )

Defined in GUI/Components/Component.h:338


function
GUI::Component::setExtLayout

public
     
     
void setExtLayout( uint32_t flags,
  const Geometry::Vec2 & extPos,
  const Geometry::Vec2 & extRelSize
)    

Enable automatic layouting.

Defined in GUI/Components/Component.h:275


function
GUI::Component::setExtLayout

public
     
     
void setExtLayout( uint32_t flags,
  const Geometry::Vec2 & extPos
)    

Defined in GUI/Components/Component.h:276


function
GUI::Component::removeExternalLayout

public
   
   
void removeExternalLayout( )

Disable automatic layouting.

Defined in GUI/Components/Component.h:278