Game Develop Core: LinkEvent.h Source File

| Game Develop Core Core library for developing platforms and tools compatible with Game Develop.

- Main Page
- Modules
- Classes

- File List
- File Members

All Classes Files Functions Variables Typedefs Enumerations Macros Groups Pages
LinkEvent.h
Go to the documentation of this file.
1
5 #ifndef GDCORE_LINKEVENT_H
6 #define GDCORE_LINKEVENT_H
7 #include "GDCore/Events/Event.h"
8 #include <string>
9
10 namespace gd
11 {
12
17 class GD_CORE_API LinkEvent : public gd::BaseEvent
18 {
19 public:
20 LinkEvent() : BaseEvent(), includeAll(true), includeStart(std::string::npos), includeEnd(std::string::npos), linkWasInvalid(false) {};
21 virtual ~LinkEvent();
22 virtual gd::BaseEventSPtr Clone() const { return boost::shared_ptr<gd::BaseEvent>(new LinkEvent(*this));}
23
27 const std::string & GetTarget() const { return target; };
28
32 void SetTarget(const std::string & target_) { target = target_; };
33
37 bool IncludeAllEvents() const { return includeAll; };
38
42 void SetIncludeAllEvents(bool includeAllEvents) { includeAll = includeAllEvents; };
43
47 void SetIncludeStartAndEnd(unsigned int includeStart_, unsigned int includeEnd_) { includeStart = includeStart_; includeEnd = includeEnd_; };
48
52 unsigned int GetIncludeStart() const { return includeStart; };
53
57 unsigned int GetIncludeEnd() const { return includeEnd; };
58
62 virtual bool MustBePreprocessed() { return true;}
63
69 void ReplaceLinkByLinkedEvents(gd::Project & project, std::vector < gd::BaseEventSPtr > & eventList, unsigned int indexOfTheEventInThisList);
70
71 virtual bool IsExecutable() const { return true; };
72
76 virtual void Render(wxDC & dc, int x, int y, unsigned int width, gd::EventsEditorItemsAreas & areas, gd::EventsEditorSelection & selection, const gd::Platform & platform);
77
81 virtual unsigned int GetRenderedHeight(unsigned int width, const gd::Platform & platform) const;
82
83 virtual EditEventReturnType EditEvent(wxWindow* parent_, gd::Project & game_, gd::Layout & scene_, gd::MainFrameWrapper & mainFrameWrapper_);
84
85
86 virtual void SaveToXml(TiXmlElement * eventElem) const;
87 virtual void LoadFromXml(gd::Project & project, const TiXmlElement * eventElem);
88
89 private:
90 std::string target;
91 bool includeAll;
92 unsigned int includeStart;
93 unsigned int includeEnd;
94 bool linkWasInvalid;
95 };
96
97 }
98
99 #endif // GDCORE_LINKEVENT_H