HoverRace  2.0
Public Member Functions | Protected Member Functions | Private Types | Private Attributes | List of all members
HoverRace::Client::MessageAnnouncement Class Reference

Basic message. More...

#include <MessageAnnouncement.h>

+ Inheritance diagram for HoverRace::Client::MessageAnnouncement:

Public Member Functions

 MessageAnnouncement (const std::string &label, std::shared_ptr< Player::Player > player={})
 
 MessageAnnouncement (const std::string &label, const std::string &text, std::shared_ptr< Player::Player > player={})
 
virtual ~MessageAnnouncement ()
 
void CreateContents (Display::Display &display, Display::FlexGrid &grid) const override
 Fill in the UI contents of the announcement. More...
 
std::shared_ptr< Display::BoxCreateIcon (Display::Display &display, Display::Container &parent) const override
 Create the optional icon to display next to the announcement. More...
 
- Public Member Functions inherited from HoverRace::Client::Announcement
 Announcement (const std::string &postType, const std::string &label, std::shared_ptr< Player::Player > player)
 Constructor. More...
 
virtual ~Announcement ()
 
const std::string & GetLabel () const
 
std::shared_ptr< Player::PlayerGetPlayer () const
 
const std::string & GetPostType () const
 
virtual void OnClick ()
 Handle when the announcement is clicked. More...
 
Announcementoperator= (const Announcement &)=delete
 
virtual std::ostream & StreamOut (std::ostream &os) const
 

Protected Member Functions

 MessageAnnouncement (const std::string &postType, const std::string &label, const std::string &text, std::shared_ptr< Player::Player > player={})
 

Private Types

using SUPER = Announcement
 

Private Attributes

const std::string text
 

Detailed Description

Basic message.

Author
Michael Imamura

Member Typedef Documentation

Constructor & Destructor Documentation

HoverRace::Client::MessageAnnouncement::MessageAnnouncement ( const std::string &  label,
std::shared_ptr< Player::Player player = {} 
)
inline
HoverRace::Client::MessageAnnouncement::MessageAnnouncement ( const std::string &  label,
const std::string &  text,
std::shared_ptr< Player::Player player = {} 
)
inline
HoverRace::Client::MessageAnnouncement::MessageAnnouncement ( const std::string &  postType,
const std::string &  label,
const std::string &  text,
std::shared_ptr< Player::Player player = { } 
)
protected
virtual HoverRace::Client::MessageAnnouncement::~MessageAnnouncement ( )
inlinevirtual

Member Function Documentation

void HoverRace::Client::MessageAnnouncement::CreateContents ( Display::Display display,
Display::FlexGrid grid 
) const
overridevirtual

Fill in the UI contents of the announcement.

Parameters
displayThe display the announcement will appear on.
gridThe grid (initially empty) to which components should be added.

Implements HoverRace::Client::Announcement.

std::shared_ptr< Display::Box > HoverRace::Client::MessageAnnouncement::CreateIcon ( Display::Display display,
Display::Container parent 
) const
overridevirtual

Create the optional icon to display next to the announcement.

Parameters
displayThe display the announcement will appear on.
parentThe container the icon will be added to.
Returns
The created icon (may be nullptr).

Implements HoverRace::Client::Announcement.

Reimplemented in HoverRace::Client::PlayerStatusAnnouncement.

Member Data Documentation

const std::string HoverRace::Client::MessageAnnouncement::text
private

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