Event description class. It is used to describe components/controls/forms/list items events in packages.
Since release of 9.0.0 this class supports {namespace} placeholder in signature. It is recommended to use it everywhere instead of using hardcoded namespace. This placeholder will be replaced with namespace set to a package entity assigned to event list of this event. So, instead of signature L"mynamespace::CMyWidget *sender"
we strongly suggests to use signature L"{namespace}CMyWidget *sender"
. This will allow to use namespace overwrite feature of Form Builder correctly.
You can find more information in comments below. Overrided methods can be found in corresponding base interface.
class CEvent :public virtual IEvent
{
public:
IEventList *getEventList() override;
IClass *getParent() override;
String getName() override;
String getSignature() override;
String getArguments() override;
String getValue() override;
bool isChanged() override;
int getHeaderFileCount() override;
String getHeaderFile(const int index) override;
int getForwardDeclarationCount() override;
ForwardDeclaration getForwardDeclaration(const int index) override;
bool setValue(const String &value) override;
void Release() override;
void Save(Variant &dest) override;
void Load(const Variant &src) override;
void Export(std::wofstream &f, const String &shift, const String &control, const String &form, const String &dialog_box) override;
/**
Constructor
@param list Event list to which this event belong
@param parent Parent object whose event this class instance describe
@param name Name of the event(for example, OnClick)
@param signature Event callback function arguments with types(for example, "IForm *sender, const CLOSE_ACTION &action")
@param arguments Event callback function arguments(for example, "send, action")
*/
CEvent(IEventList *list, IClass *parent, const String &name, const String &signature, const String &arguments);
virtual ~CEvent() = default;
CEvent *AddHeaderFile(const String &value); // Add new header file to the list(use path relative to the Packages directory)
CEvent *AddForwardDeclaration(const String &value, const String &header_file, const String &ns);
};
Namespace: | nitisa |
Include: | Nitisa/Package/Core/Event.h |