nomlib
Loading...
Searching...
No Matches
nom::Decorator Class Reference

Customized GUI widget theme style. More...

#include <Decorator.hpp>

Inheritance diagram for nom::Decorator:
[legend]

Public Types

typedef Decorator self_type
typedef self_type * raw_ptr
typedef std::unique_ptr< self_type > unique_ptr
typedef std::shared_ptr< self_type > shared_ptr
Public Types inherited from nom::IDecorator
typedef IDecorator self_type
typedef self_type * raw_ptr
typedef std::unique_ptr< self_type > unique_ptr
typedef std::shared_ptr< self_type > shared_ptr
Public Types inherited from nom::Transformable
typedef Transformable self_type
Public Types inherited from nom::IDrawable
typedef IDrawable self_type
typedef self_type * raw_ptr
 A type definition for a C pointer – raw pointer – to an IDrawable object.
typedef std::unique_ptr< self_type > unique_ptr
 A type definition for a C++11 std::unique_ptr to an IDrawable object.
typedef std::shared_ptr< self_type > shared_ptr
 A type definition for a C++11 std::shared_ptr to an IDrawable object.
typedef const RenderWindow RenderTarget
Public Types inherited from nom::IObject
typedef IObject self_type
typedef IObjectraw_ptr

Public Member Functions

 Decorator (void)
 Default constructor; do nothing.
virtual ~Decorator (void)
 Destructor.
virtual IntRect margins (void) const
virtual IntRect frame_bounds (void) const
 Get the unaffected rendering area coordinates of the border.
virtual void invalidate (void)
 Implements IDecorator::invalidate.
virtual ObjectTypeInfo type (void) const
 Re-implements IObject::type.
virtual void set_bounds (const IntRect &bounds)
virtual void set_margins (const IntRect &margins)
virtual void set_frame_bounds (const IntRect &bounds)
 Set the intended boundaries of the "client area", meaning the unaffected rendering area of the rendered border.
Public Member Functions inherited from nom::IDecorator
 IDecorator (void)
 Default constructor.
virtual ~IDecorator (void)
 Destructor.
Public Member Functions inherited from nom::Transformable
 Transformable (const Point2i &pos, const Size2i &size)
 Transformable (const IntRect &bounds)
 Construct an object using a complete set of coordinates (bounds).
ObjectTypeInfo type () const override
 Re-implements the IObject::type method.
const Point2i & position (void) const
 Getter for stored positioning coordinates.
const Size2i & size (void) const
 Getter for stored size dimensions.
virtual void set_position (const Point2i &coords)
 Set the positioning – X & Y rendering coordinates – of the object.
virtual void set_size (const Size2i &size)
 Set the size dimensions– width & height rendering coordinates of the object.
void set_position (int x, int y)
void set_size (int w, int h)
virtual void translate (const Point2i &pos)
Public Member Functions inherited from nom::IDrawable
 IDrawable (void)
 Do nothing at all default constructor.
virtual ~IDrawable (void)
 Do nothing at all destructor.
virtual void update (void)=0
virtual void draw (RenderTarget &) const =0
 Render the object onto the primary video buffer – your visible screen.
Public Member Functions inherited from nom::IObject
 IObject (void)
 Default constructor.
virtual ~IObject (void)
 Virtual destructor.
virtual bool is_type (const ObjectTypeInfo &rhs) const
 Compare this object type with another object's type.

Protected Attributes

Drawables drawables_
 Internal container state for rendered objects.

Private Attributes

IntRect margins_
IntRect frame_bounds_
 The rendering area unaffected by the rendered border.

Additional Inherited Members

Static Public Member Functions inherited from nom::IObject
template<typename Base, typename Derived>
static bool is_a (const Derived object)
 Compare two objects to determine if a derived class inherits from a base class object.
static void * operator new (nom::size_type mem)
static void operator delete (void *ptr)
Static Public Attributes inherited from nom::IObject
static uint64 total_alloc_bytes
static uint64 total_dealloc_bytes

Detailed Description

Customized GUI widget theme style.

Todo
Implement interface for calculating and providing border dimensions so that our widget(s) are able to better account for their own size requirements.

Note that you must first set the bounds – position and size – of this object before a decorator can render anything. See also: set_bounds.

Definition at line 45 of file Decorator.hpp.

Member Typedef Documentation

◆ raw_ptr

typedef self_type* nom::Decorator::raw_ptr

Definition at line 50 of file Decorator.hpp.

◆ self_type

typedef Decorator nom::Decorator::self_type

Definition at line 48 of file Decorator.hpp.

◆ shared_ptr

typedef std::shared_ptr<self_type> nom::Decorator::shared_ptr

Definition at line 52 of file Decorator.hpp.

◆ unique_ptr

typedef std::unique_ptr<self_type> nom::Decorator::unique_ptr

Definition at line 51 of file Decorator.hpp.

Member Function Documentation

◆ frame_bounds()

virtual IntRect nom::Decorator::frame_bounds ( void ) const
virtual

Get the unaffected rendering area coordinates of the border.

Remarks
Implements IDecorator::frame_bounds.

Implements nom::IDecorator.

◆ invalidate()

virtual void nom::Decorator::invalidate ( void )
virtual

Implements IDecorator::invalidate.

Remarks
Alias for ::update.

Implements nom::IDecorator.

◆ margins()

virtual IntRect nom::Decorator::margins ( void ) const
virtual
Remarks
Implements IDecorator::margins.

Implements nom::IDecorator.

◆ set_bounds()

virtual void nom::Decorator::set_bounds ( const IntRect & bounds)
virtual
Remarks
Re-implements Transformable::set_bounds.

Reimplemented from nom::Transformable.

◆ set_frame_bounds()

virtual void nom::Decorator::set_frame_bounds ( const IntRect & bounds)
virtual

Set the intended boundaries of the "client area", meaning the unaffected rendering area of the rendered border.

Remarks
The boundary coordinates should exclude the rendering area used by the rendering of the border, leaving only what is free (think: safe) for others to render on.
Note
This information is provided as a convenience for visual interfaces that require such detail about their environment, such as a GUI engine – nom::UIWidget and friends.

◆ set_margins()

virtual void nom::Decorator::set_margins ( const IntRect & margins)
virtual
Remarks
Implements IDecorator::set_margins.

Implements nom::IDecorator.

◆ type()

virtual ObjectTypeInfo nom::Decorator::type ( void ) const
virtual

Re-implements IObject::type.

Remarks
This uniquely identifies the object's type.

Reimplemented from nom::IDrawable.

Reimplemented in nom::FinalFantasyDecorator, and nom::MinimalDecorator.

Member Data Documentation

◆ drawables_

Drawables nom::Decorator::drawables_
protected

Internal container state for rendered objects.

Definition at line 98 of file Decorator.hpp.

◆ frame_bounds_

IntRect nom::Decorator::frame_bounds_
private

The rendering area unaffected by the rendered border.

Definition at line 104 of file Decorator.hpp.

◆ margins_

IntRect nom::Decorator::margins_
private

Definition at line 101 of file Decorator.hpp.


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