CEL

Public API Reference

iPcMessenger Struct Reference

This is a messenger property class. More...

#include <propclass/messenger.h>

Inheritance diagram for iPcMessenger:

List of all members.

Public Member Functions

virtual void ClearAll ()=0
 Clear all messages from the log.
virtual void ClearId (const char *id)=0
 Clear a given message id from the log.
virtual void ClearType (const char *type)=0
 Clear all messages from the log with a given type.
virtual void DefineSlot (const char *name)=0
 Define a new message slot.
virtual void DefineType (const char *type, const char *slot, const csColor4 &textColor, const char *font, int fontSize, float timeout, float fadetime, bool click, bool log, CycleType cyclefirst, CycleType cyclenext)=0
 Define a new message type.
virtual const char * GetDefaultType () const =0
 Get the default message type.
virtual csPtr
< iMessageLogIterator
GetMessages (const char *type)=0
 Get an iterator over all messages of a given type.
virtual void Message (const char *type, const char *id, const csStringArray &msgs)=0
 Give a message to the user.
virtual void SetDefaultType (const char *type)=0
 Set the default message type.
virtual void SetSlotBoxAttributes (const char *name, const csColor &boxColor, const csColor4 &borderColor, float borderWidth, int roundness, float boxfadetime)=0
 Set the slot box visual attributes.
virtual void SetSlotDimensions (const char *name, int sizex, int sizey, const char *maxsizex, const char *maxsizey, int marginx, int marginy)=0
 Set the slot dimensions.
virtual void SetSlotMessageHandling (const char *name, int maxmessages, bool queue)=0
 Set the slot message handling.
virtual void SetSlotPosition (const char *name, const csVector2 &position, MessageLocationAnchor boxAnchor, MessageLocationAnchor screenAnchor)=0
 Set the slot position.

Detailed Description

This is a messenger property class.

This property class can display various types of messages to the user. Every type of message is configurable (with regards to timing, how and where it is displayed, if it is remembered or not, ...)

Locations on screen where messages can be put are defined as 'slots'. There is one predefined slot called 'none' which doesn't display anything.

Messages are grouped in types. A slot can display messages of different types but a single type can only go to one slot.

This property class supports the following actions (add prefix 'cel.messenger.action.' if you want to access this action through a message):

Definition at line 142 of file messenger.h.


Member Function Documentation

virtual void iPcMessenger::ClearAll (  )  [pure virtual]

Clear all messages from the log.

virtual void iPcMessenger::ClearId ( const char *  id  )  [pure virtual]

Clear a given message id from the log.

virtual void iPcMessenger::ClearType ( const char *  type  )  [pure virtual]

Clear all messages from the log with a given type.

virtual void iPcMessenger::DefineSlot ( const char *  name  )  [pure virtual]

Define a new message slot.

virtual void iPcMessenger::DefineType ( const char *  type,
const char *  slot,
const csColor4 textColor,
const char *  font,
int  fontSize,
float  timeout,
float  fadetime,
bool  click,
bool  log,
CycleType  cyclefirst,
CycleType  cyclenext 
) [pure virtual]

Define a new message type.

virtual const char* iPcMessenger::GetDefaultType (  )  const [pure virtual]

Get the default message type.

virtual csPtr<iMessageLogIterator> iPcMessenger::GetMessages ( const char *  type  )  [pure virtual]

Get an iterator over all messages of a given type.

virtual void iPcMessenger::Message ( const char *  type,
const char *  id,
const csStringArray msgs 
) [pure virtual]

Give a message to the user.

'type' can be 0 in which case the default type is used. 'id' can be 0 in which case this message has no id.

virtual void iPcMessenger::SetDefaultType ( const char *  type  )  [pure virtual]

Set the default message type.

virtual void iPcMessenger::SetSlotBoxAttributes ( const char *  name,
const csColor boxColor,
const csColor4 borderColor,
float  borderWidth,
int  roundness,
float  boxfadetime 
) [pure virtual]

Set the slot box visual attributes.

virtual void iPcMessenger::SetSlotDimensions ( const char *  name,
int  sizex,
int  sizey,
const char *  maxsizex,
const char *  maxsizey,
int  marginx,
int  marginy 
) [pure virtual]

Set the slot dimensions.

maxsizex and maxsizey are strings with the following format:

  • '': empty string or 0 means no maximum given. In that case '90' is assumed.
  • 'number': a specific dimension
  • 'number': a relative dimension (to the maximum screen size). 100 is max.
  • '-number': number of pixels less then maximum screen size. If sizex and/or sizey are -1 then they are considered not giving and the box can grow upto the maximum size.
virtual void iPcMessenger::SetSlotMessageHandling ( const char *  name,
int  maxmessages,
bool  queue 
) [pure virtual]

Set the slot message handling.

virtual void iPcMessenger::SetSlotPosition ( const char *  name,
const csVector2 position,
MessageLocationAnchor  boxAnchor,
MessageLocationAnchor  screenAnchor 
) [pure virtual]

Set the slot position.


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

Generated for CEL: Crystal Entity Layer 2.1 by doxygen 1.6.1