Updated German translation
[dasher.git] / Src / DasherCore / Event.h
blob522e0c8c89f80f61d14d4e061d7fc054ba5206cf
1 #ifndef __event_h__
2 #define __event_h__
4 // Classes representing different event types.
6 #include <string>
7 #include "DasherTypes.h"
10 namespace Dasher {
11 class CEditEvent;
12 class CGameNodeDrawEvent;
13 class CDasherNode; //fwd decl, avoid include...we just store ptr
15 /// \ingroup Core
16 /// @{
18 /// \defgroup Events Events generated by Dasher modules.
19 /// @{
21 /**
22 * An event that notifies listeners that a node previously flagged for
23 * game mode has been drawn.
25 class Dasher::CGameNodeDrawEvent {
26 public:
27 CGameNodeDrawEvent(CDasherNode* pNode, myint y1, myint y2)
28 : m_pNode(pNode), m_y1(y1), m_y2(y2) {
31 /**
32 * The node itself.
34 CDasherNode* m_pNode;
36 /**
37 * the y range of the node (in dasher coords)
39 myint m_y1, m_y2;
42 class Dasher::CEditEvent {
43 friend class CDasherInterfaceBase;
44 CEditEvent(int iEditType, const std::string & sText, CDasherNode *pNode)
45 : m_iEditType(iEditType), m_sText(sText), m_pNode(pNode) {
46 };
47 public:
48 static const int EDIT_OUTPUT=1, EDIT_DELETE=2, EDIT_CONVERT=10, EDIT_PROTECT=11;
49 const int m_iEditType;
50 const std::string m_sText;
51 /// Node causing the event - allows calling GetSymbolProb, offset(), etc.
52 /// _if necessary_
53 const CDasherNode *m_pNode;
56 /// @}
57 /// @}
59 #endif