#include "dlgtypes.h"#include "errors.h"Go to the source code of this file.
| Classes | |
| class | Msg | 
| The base Msg class from which all messages must be derived.  More... | |
| class | OpMsg | 
| This message is sent whenever something happens to an operation.  More... | |
| class | DialogMsg | 
| A DialogMsg is sent whenever the user interacts with the gadgets in a dialog box, It is only sensible to send this message to DialogOp objects.  More... | |
| class | DeathMsg | 
| This message is sent just before camelot's death. When a long-life operation receives this message it should tidy-up then call End().  More... | |
| Defines | |
| #define | BROADCAST_TO_ALL(Message) | 
| The BROADCAST_TO_ALL macro is used to send a message to all MessageHandler objects in the system. If any MessageHandler returns a FAIL value then InformError is called. | |
| #define | BROADCAST_TO_CLASS(Message, Class) | 
| The BROADCAST_TO_ALL macro is used to send a message to all MessageHandler objects with a class derived from or equal to Class. | |
| #define | IS_OUR_DIALOG_MSG(Message) | 
| This macro for use in DialogOp classes evaluates to TRUE if the Message is a DialogMsg for the DialogOp. See DialogMsg for a full description of its usage. | |
| #define | DLG_EAT_IF_HUNGRY(DialogMsg) ((DialogMsg)->DlgWndID) == NULL ? OK : EAT_MSG | 
| You should use this macro to return from a DialogOp's Message function after a DialogMsg has been processed. See DialogMsg for a full description of its use. | |
| #define | MESSAGE_IS_A(Message, MsgClass) (Message->IsKindOf(CC_RUNTIME_CLASS(MsgClass))) | 
| This macro determines if Message is a kind of MsgClass. | |
| 
 | 
| Value: MessageHandler::pTmpMsg = new Message, \ (MessageHandler::pTmpMsg == NULL) ? (FAIL) : \ MessageHandler::Broadcast(MessageHandler::pTmpMsg) \ 
 
 
 
 
 EAT_MSG means that a handler processed the message and didn't want it to be passed on. A FAIL value indicates that one or more Message handlers returned a FAIL value from their Message functions. In this situation the broadcast function will call InformError describing the first error which occured. Usage: BROADCAST_TO_ALL(AMsg(p1,p2,p3)) 
 | 
| 
 | 
| Value: MessageHandler::pTmpMsg = new Message, \ (MessageHandler::pTmpMsg == NULL) ? (FAIL) : \ MessageHandler::Broadcast(MessageHandler::pTmpMsg, CC_RUNTIME_CLASS(Class)) \ 
 
 
 
 
 EAT_MSG means that a handler processed the message and didn't want it to be passed on. A FAIL value indicates that one or more Message handlers returned a FAIL value from their Message functions. In this situation the broadcast function will call InformError describing the first error which occured. To send a message to all DialogOp objects BROADCAST_TO_CLASS(DialogMsg(p1,p2,p3), DialogOp) To send a message to all Operation objects, including DialogOp objects. BROADCAST_TO_CLASS(AMsg(p1,p2,p3), Operation) 
 
 | 
| 
 | 
| You should use this macro to return from a DialogOp's Message function after a DialogMsg has been processed. See DialogMsg for a full description of its use. 
 
 
 
 
 
 
 | 
| 
 | 
| Value: (                                                                       \
        (WindowID != NULL) &&                                               \
            (                                                               \
                ((Message)->IsKindOf(CC_RUNTIME_CLASS(DialogMsg))) &&       \
                    (                                                       \
                        (WindowID == ((DialogMsg*)(Message))->DlgWndID) ||  \
                        ( ((DialogMsg*)(Message))->DlgWndID == NULL)        \
                    )                                                       \
            )                                                               \
    )
 
 
 
 
 
 | 
| 
 | 
| This macro determines if Message is a kind of MsgClass. 
 
 
 
 
 
 | 
 1.4.4
 1.4.4