11 #include "GDCore/Serialization/SerializerElement.h"
12 #include "GDCore/String.h"
13 #include "GDCore/Project/QuickCustomization.h"
18 class SerializerElement;
19 class EventsFunctionsContainer;
60 bool IsFolder()
const {
return !folderName.empty(); }
90 if (IsFolder())
return children.size();
122 if (parent ==
nullptr) {
123 return badFunctionFolderOrFunction;
137 void MoveChild(std::size_t oldIndex, std::size_t newIndex);
149 void RemoveRecursivelyFunctionNamed(
const gd::String& name);
161 std::size_t position = (
size_t)-1);
168 std::size_t position);
186 void MoveFunctionFolderOrFunctionToAnotherFolder(
189 std::size_t newPosition);
207 void UpdateGroupNameOfAllFunctions();
210 void DoUpdateGroupNameOfAllFunctions(
const gd::String& groupPath);
225 std::vector<std::unique_ptr<FunctionFolderOrFunction>>
Events that can be generated as a stand-alone function, and used as a condition, action or expression...
Definition: EventsFunction.h:38
Used as a base class for classes that will own events-backed functions.
Definition: EventsFunctionsContainer.h:27
Class representing a folder structure in order to organize functions in folders (to be used with a Ev...
Definition: FunctionFolderOrFunction.h:30
const gd::String & GetFolderName() const
Returns the name of the folder.
Definition: FunctionFolderOrFunction.h:65
FunctionFolderOrFunction & GetParent()
Returns the parent of the instance. If the instance has no parent (root folder), the null function is...
Definition: FunctionFolderOrFunction.h:121
gd::EventsFunction & GetFunction() const
Returns the function behind the instance.
Definition: FunctionFolderOrFunction.h:55
bool IsRootFolder()
Returns true if the instance is a root folder (that's to say it has no parent).
Definition: FunctionFolderOrFunction.h:132
bool IsFolder() const
Returns true if the instance represents a folder.
Definition: FunctionFolderOrFunction.h:60
std::size_t GetChildrenCount() const
Returns the number of children. Returns 0 if the instance represents a function.
Definition: FunctionFolderOrFunction.h:89
A generic container that can represent a value ( containing a string, double, bool or int),...
Definition: SerializerElement.h:37
String represents an UTF8 encoded string.
Definition: String.h:33
Definition: CommonTools.h:24