Public Member Functions | Private Attributes | List of all members
nom::ui::MessageBox Class Reference

Simple UI interface for drawing a styled message box. More...

#include <MessageBox.hpp>

Inheritance diagram for nom::ui::MessageBox:
[legend]
Collaboration diagram for nom::ui::MessageBox:
[legend]

Public Member Functions

 MessageBox (int32 x, int32 y, int32 width, int32 height, enum FrameStyle style, const Gradient &background)
 
 MessageBox (int32 x, int32 y, int32 width, int32 height, GrayFrame::SharedPtr style=nullptr, Gradient::SharedPtr background=nullptr)
 
void initialize (void)
 
bool isEnabled (void) const
 
const std::string getWindowTitle (void)
 
const std::string getLabel (void)
 
void disable (void)
 
void enable (void)
 
const Point2i size (void) const
 
const Point2i position (void) const
 
void setWindowTitleFont (const IFont::RawPtr font)
 
void setLabelFont (const IFont::RawPtr font)
 
void setLabelPosition (const Coords &pos)
 
void setLabelTextAlignment (IFont::TextAlignment alignment)
 
void setWindowTitle (const std::string &text)
 
void setLabel (const std::string &text)
 
void update (void)
 
void draw (RenderTarget target) const
 Render the object onto the primary video buffer – your visible screen.
 
- Public Member Functions inherited from nom::IDrawable
 IDrawable (void)
 Do nothing at all default constructor.
 
virtual ~IDrawable (void)
 Do nothing at all destructor.
 

Private Attributes

IDrawable::SharedDrawables drawable
 
IFont::SharedPtr window_title
 
IFont::SharedPtr label
 
Coords coords
 
enum IFont::TextAlignment label_alignment
 
bool enabled
 

Additional Inherited Members

- Public Types inherited from nom::IDrawable
typedef std::unique_ptr
< IDrawable > 
UniquePtr
 std::unique_ptr definition type for your convenience, sir!
 
typedef std::shared_ptr
< IDrawable > 
SharedPtr
 std::shared_ptr definition type at your leisure, sir!
 
typedef std::vector
< std::shared_ptr< IDrawable > > 
SharedDrawables
 Vector of std::shared_ptr definition type for the brotherhood, sir!
 
typedef std::vector
< std::unique_ptr< IDrawable > > 
UniqueDrawables
 std::unique_ptr vector container type
 
typedef const Window & RenderTarget
 

Detailed Description

Simple UI interface for drawing a styled message box.

Definition at line 56 of file MessageBox.hpp.

Member Function Documentation

void nom::ui::MessageBox::update ( void  )
virtual

Intended to be used internally by the class re-implementing this method; for use in preparing the buffer to be drawn using the draw method call. Whereas both Update & Draw are typically publicly exposed to the end-user, only the Draw method call should be expected of the end-user to be explicitly called.

Todo:
Not all the interfaced (inherited) IDrawable objects in this library conform to the expectations stated above. We need to first figure out if we wish to stay on this course (of expectation), or diverge all together. Undecided. Jeffrey Carpenter jeffr.nosp@m.ey.c.nosp@m.arp@g.nosp@m.mail.nosp@m..com @ 2013-10-03

Implements nom::IDrawable.

Definition at line 202 of file MessageBox.cpp.


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