34#include <NDEVR/Event.h>
35#include <NDEVR/SoftwareService.h>
36#include <NDEVR/Dictionary.h>
37#include <NDEVR/INIInterface.h>
38#include <NDEVR/TranslatedString.h>
39#include <NDEVR/UUID.h>
Buffer< KeyOption > m_key_options
The collection of registered key option mappings.
const Buffer< KeyOption > & currentKeyMaps() const
Returns the current set of key option mappings.
TranslatedString m_key_controller_title
The display title for this key controller.
bool m_save_ini_on_change_key_option_change
Whether to automatically save INI settings when a key option changes.
bool processKeyEvent(const KeyEvent &key_event, DesignObjectLookup *lookup, Camera *camera) final override
Processes a key event by matching it against registered key options.
BasicKeyController(const TranslatedString &key_controller_title)
Constructs a BasicKeyController with the given title.
const TranslatedString & keyControllerTitle() const
Returns the display title of this key controller.
virtual void resetKeyControllerToDefaults()=0
Resets all key mappings to their default values.
virtual bool processKeyEvent(const StringView &id, const KeyEvent &key_event, DesignObjectLookup *lookup, Camera *camera)=0
Processes a key event identified by its string ID.
virtual void addKeyOption(const KeyOption &option)
Adds a new key option mapping to this controller.
virtual void setKeyOption(const KeyOption &option)
Sets or updates an existing key option mapping.
virtual void getINI(INIFactory &factory) override
Serializes or deserializes key controller settings to/from an INI file.
The equivelent of std::vector but with a bit more control.
A core object representing a user view as well as convenience functions for moving this view through ...
A core class where all Design Objects including models, materials, and geometries are stored.
A hash-based key-value store, useful for quick associative lookups.
Contains methods for easily reading and writing to an INI file including efficient casting,...
INIInterface()
Constructs an INIInterface with no default INI file.
Forward declaration for the camera class.
virtual bool processKeyEvent(const KeyEvent &key_event, DesignObjectLookup *lookup, Camera *camera)=0
Processes a key event and performs the associated action.
void removeController(UUID id)
Removes a sub-controller identified by a UUID.
static KeyController & DefaultKeyController()
Returns the application-wide default KeyController singleton.
bool processKeyEvent(const KeyEvent &event, DesignObjectLookup *lookup, Camera *camera) override
Dispatches a key event to all registered sub-controllers.
Buffer< KeyControllerBase * > controllers() const
Returns all registered sub-controllers.
void addController(UUID id, KeyControllerBase *controller)
Adds a sub-controller identified by a UUID.
virtual ~KeyController()
Destructor.
bool hasController(UUID id) const
Checks whether a sub-controller with the given UUID is registered.
KeyController()
Constructs the KeyController.
Describes a user key press event used to trigger behavior in the NDEVR API.
Software Service Managers take a Software service to modify the behavior of the software.
Base interface for services that extend or modify software behavior through modules.
The core String View class for the NDEVR API.
The core String class for the NDEVR API.
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
The primary namespace for the NDEVR SDK.
An action that can be tied to a specific KeyPress within the software.
String id
Unique identifier for this key option.
TranslatedString display_name
User-facing display name for this key option.
KeyEvent key_event
The key event associated with this option.