Design Pattern Examples
Overview of object-oriented design patterns
Message Struct Reference

Represents a message sent to the windows. A message contains a type and a position. More...

Collaboration diagram for Message:
Collaboration graph

Public Member Functions

 Message (MessageType type, MessagePosition position)
 Constructor.
 
override string ToString ()
 Convert this message to a string.
 

Public Attributes

MessageType MessageType
 Value from the MessageType enumeration indicating the type of this message.
 
MessagePosition Position
 Position of message when the message was sent. In a real system, this would generally represent the position of a cursor at the time the message was generated.
 

Detailed Description

Represents a message sent to the windows. A message contains a type and a position.

Definition at line 92 of file HandlerChain_Message_Class.cs.

Constructor & Destructor Documentation

◆ Message()

Message ( MessageType  type,
MessagePosition  position 
)
inline

Constructor.

Parameters
typeValue from the MessageType enumeration indicating the type of message being created.
positionPosition of the message, expressed as a MessagePosition object.

Definition at line 113 of file HandlerChain_Message_Class.cs.

References Message.Position.

Member Function Documentation

◆ ToString()

override string ToString ( )
inline

Convert this message to a string.

Returns
Returns a string representation of this message.

Definition at line 123 of file HandlerChain_Message_Class.cs.

References Message.Position.

Member Data Documentation

◆ MessageType

Value from the MessageType enumeration indicating the type of this message.

Definition at line 97 of file HandlerChain_Message_Class.cs.

Referenced by MessageWindow.ProcessMessage(), and Message.ToString().

◆ Position

MessagePosition Position

Position of message when the message was sent. In a real system, this would generally represent the position of a cursor at the time the message was generated.

Definition at line 104 of file HandlerChain_Message_Class.cs.

Referenced by MessageWindow._HandleButtonDownMessage(), MessageWindow._HandleButtonUpMessage(), Message.Message(), and Message.ToString().


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