A component to allow editing of the keymaps stored by a KeyPressMappingSet object. More...
Inherits Component, TreeViewItem, ChangeListener, and ButtonListener.
Public Types | |
| enum | ColourIds { backgroundColourId = 0x100ad00, textColourId = 0x100ad01 } |
A set of colour IDs to use to change the colour of various aspects of the editor. More... | |
Public Member Functions | |
| KeyMappingEditorComponent (KeyPressMappingSet *mappingSet, bool showResetToDefaultButton) | |
| Creates a KeyMappingEditorComponent. | |
| virtual | ~KeyMappingEditorComponent () |
| Destructor. | |
| void | setColours (const Colour &mainBackground, const Colour &textColour) |
| Sets up the colours to use for parts of the component. | |
| KeyPressMappingSet * | getMappings () const throw () |
| Returns the KeyPressMappingSet that this component is acting upon. | |
| virtual bool | shouldCommandBeIncluded (CommandID commandID) |
| Can be overridden if some commands need to be excluded from the list. | |
| virtual bool | isCommandReadOnly (CommandID commandID) |
| Can be overridden to indicate that some commands are shown as read-only. | |
| virtual const String | getDescriptionForKeyPress (const KeyPress &key) |
| This can be overridden to let you change the format of the string used to describe a keypress. | |
| void | parentHierarchyChanged () |
| void | resized () |
| void | changeListenerCallback (void *) |
| bool | mightContainSubItems () |
| const String | getUniqueName () const |
| void | buttonClicked (Button *button) |
A component to allow editing of the keymaps stored by a KeyPressMappingSet object.
A set of colour IDs to use to change the colour of various aspects of the editor.
These constants can be used either via the Component::setColour(), or LookAndFeel::setColour() methods.
To change the colours of the menu that pops up
| KeyMappingEditorComponent::KeyMappingEditorComponent | ( | KeyPressMappingSet * | mappingSet, | |
| bool | showResetToDefaultButton | |||
| ) |
Creates a KeyMappingEditorComponent.
| mappingSet | this is the set of mappings to display and edit. Make sure the mappings object is not deleted before this component! | |
| showResetToDefaultButton | if true, then at the bottom of the list, the component will include a 'reset to defaults' button. |
| virtual KeyMappingEditorComponent::~KeyMappingEditorComponent | ( | ) | [virtual] |
Destructor.
| void KeyMappingEditorComponent::setColours | ( | const Colour & | mainBackground, | |
| const Colour & | textColour | |||
| ) |
Sets up the colours to use for parts of the component.
| mainBackground | colour to use for most of the background | |
| textColour | colour to use for the text |
| KeyPressMappingSet* KeyMappingEditorComponent::getMappings | ( | ) | const throw () |
Returns the KeyPressMappingSet that this component is acting upon.
| virtual bool KeyMappingEditorComponent::shouldCommandBeIncluded | ( | CommandID | commandID | ) | [virtual] |
Can be overridden if some commands need to be excluded from the list.
By default this will use the KeyPressMappingSet's shouldCommandBeVisibleInEditor() method to decide what to return, but you can override it to handle special cases.
| virtual bool KeyMappingEditorComponent::isCommandReadOnly | ( | CommandID | commandID | ) | [virtual] |
Can be overridden to indicate that some commands are shown as read-only.
By default this will use the KeyPressMappingSet's shouldCommandBeReadOnlyInEditor() method to decide what to return, but you can override it to handle special cases.
| virtual const String KeyMappingEditorComponent::getDescriptionForKeyPress | ( | const KeyPress & | key | ) | [virtual] |
This can be overridden to let you change the format of the string used to describe a keypress.
This is handy if you're using non-standard KeyPress objects, e.g. for custom keys that are triggered by something else externally. If you override the method, be sure to let the base class's method handle keys you're not interested in.
| void KeyMappingEditorComponent::parentHierarchyChanged | ( | ) | [virtual] |
For internal use only.
Reimplemented from Component.
| void KeyMappingEditorComponent::resized | ( | ) | [virtual] |
For internal use only.
Reimplemented from Component.
| void KeyMappingEditorComponent::changeListenerCallback | ( | void * | ) | [virtual] |
For internal use only.
Implements ChangeListener.
| bool KeyMappingEditorComponent::mightContainSubItems | ( | ) | [virtual] |
For internal use only.
Implements TreeViewItem.
| const String KeyMappingEditorComponent::getUniqueName | ( | ) | const [virtual] |
For internal use only.
Reimplemented from TreeViewItem.
| void KeyMappingEditorComponent::buttonClicked | ( | Button * | button | ) | [virtual] |
For internal use only.
Implements ButtonListener.
1.6.3