3#include <EditorFramework/EditorFrameworkDLL.h>
4#include <Foundation/Reflection/Reflection.h>
30 template <
typename TYPE>
33 static_assert((std::is_base_of<plPreferences, TYPE>::value ==
true),
"All preferences objects must be derived from plPreferences");
34 return static_cast<TYPE*
>(QueryPreferences(plGetStaticRTTI<TYPE>(), pDocument));
42 static void SaveDocumentPreferences(
const plDocument* pDocument);
46 static void ClearDocumentPreferences(
const plDocument* pDocument);
49 static void SaveProjectPreferences();
53 static void ClearProjectPreferences();
56 static void SaveApplicationPreferences();
60 static void ClearApplicationPreferences();
86 static void SavePreferences(
const plDocument* pDocument, Domain domain);
87 static void ClearPreferences(
const plDocument* pDocument, Domain domain);
void Broadcast(EventData pEventData, plUInt8 uiMaxRecursionDepth=MaxRecursionDepthDefault)
This function will broadcast to all registered users, that this event has just happened....
Definition Event_inl.h:187
A hybrid array uses in-place storage to handle the first few elements without any allocation....
Definition HybridArray.h:12
Base class for all preferences.
Definition Preferences.h:17
plEvent< plPreferences * > m_ChangedEvent
A simple event that can be fired when any preference property changes. No specific change details are...
Definition Preferences.h:75
void TriggerPreferencesChangedEvent()
Call this to broadcast that this preference object was modified.
Definition Preferences.h:78
static TYPE * QueryPreferences(const plDocument *pDocument=nullptr)
Static function to query a preferences object of the given type. If the instance does not exist yet,...
Definition Preferences.h:31
const plDocument * GetDocumentAssociation() const
If these preferences are per document, the pointer is valid, otherwise nullptr.
Definition Preferences.h:72
Domain GetDomain() const
Whether the preferences are app, project or document specific.
Definition Preferences.h:66
This class holds information about reflected types. Each instance represents one type that is known t...
Definition RTTI.h:30
All classes that should be dynamically reflectable, need to be derived from this base class.
Definition DynamicRTTI.h:86