8 #include "GDCore/Events/Event.h"
9 #include "GDCore/Events/Expression.h"
10 #include "GDCore/Project/MemoryTrackedRegistry.h"
15 class SerializerElement;
31 virtual bool IsExecutable()
const {
return true; }
32 virtual bool CanHaveSubEvents()
const {
return false; }
34 const gd::String& GetInlineCode()
const {
return inlineCode; };
35 void SetInlineCode(
const gd::String& code) { inlineCode = code; };
37 const gd::String& GetParameterObjects()
const {
return parameterObjects.GetPlainString(); };
38 void SetParameterObjects(
const gd::String& objectName) {
39 parameterObjects = gd::Expression(objectName);
42 virtual std::vector<std::pair<gd::Expression*, gd::ParameterMetadata> >
43 GetAllExpressionsWithMetadata();
44 virtual std::vector<std::pair<const gd::Expression*, const gd::ParameterMetadata> >
45 GetAllExpressionsWithMetadata()
const;
47 virtual void SerializeTo(gd::SerializerElement& element)
const;
48 virtual void UnserializeFrom(gd::Project& project,
49 const gd::SerializerElement& element);
50 virtual bool IsUseStrict()
const {
return useStrict; }
52 bool IsEventsSheetExpanded()
const {
return eventsSheetExpanded; }
53 void SetEventsSheetExpanded(
bool enable) { eventsSheetExpanded = enable; };
55 long GetScrollTop()
const {
return scrollTop; }
56 void SetScrollTop(
long value) { scrollTop = value; };
58 long GetCursorColumn()
const {
return cursorColumn; }
59 void SetCursorColumn(
long value) { cursorColumn = value; };
61 long GetCursorLine()
const {
return cursorLine; }
62 void SetCursorLine(
long value) { cursorLine = value; };
67 gd::String inlineCode;
68 gd::Expression parameterObjects;
70 bool useStrict =
true;
73 bool eventsSheetExpanded =
false;
77 long cursorColumn = 0;
80 gd::MemoryTracked _memoryTracked{
this,
"JsCodeEvent"};
Event used to insert raw javascript code into events.
Definition: JsCodeEvent.h:24