openshot-audio  0.1.6
juce_KeyMappingEditorComponent.h
Go to the documentation of this file.
1 /*
2  ==============================================================================
3 
4  This file is part of the JUCE library.
5  Copyright (c) 2015 - ROLI Ltd.
6 
7  Permission is granted to use this software under the terms of either:
8  a) the GPL v2 (or any later version)
9  b) the Affero GPL v3
10 
11  Details of these licenses can be found at: www.gnu.org/licenses
12 
13  JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
14  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
15  A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16 
17  ------------------------------------------------------------------------------
18 
19  To release a closed-source product which uses JUCE, commercial licenses are
20  available: visit www.juce.com for more information.
21 
22  ==============================================================================
23 */
24 
25 #ifndef JUCE_KEYMAPPINGEDITORCOMPONENT_H_INCLUDED
26 #define JUCE_KEYMAPPINGEDITORCOMPONENT_H_INCLUDED
27 
28 
29 //==============================================================================
37 {
38 public:
39  //==============================================================================
48  bool showResetToDefaultButton);
49 
52 
53  //==============================================================================
59  void setColours (Colour mainBackground,
60  Colour textColour);
61 
63  KeyPressMappingSet& getMappings() const noexcept { return mappings; }
64 
66  ApplicationCommandManager& getCommandManager() const noexcept { return mappings.getCommandManager(); }
67 
68 
69  //==============================================================================
75  virtual bool shouldCommandBeIncluded (CommandID commandID);
76 
82  virtual bool isCommandReadOnly (CommandID commandID);
83 
92  virtual String getDescriptionForKeyPress (const KeyPress& key);
93 
94  //==============================================================================
103  {
104  backgroundColourId = 0x100ad00,
105  textColourId = 0x100ad01,
106  };
107 
108  //==============================================================================
110  void parentHierarchyChanged() override;
112  void resized() override;
113 
114 private:
115  //==============================================================================
116  KeyPressMappingSet& mappings;
117  TreeView tree;
118  TextButton resetButton;
119 
120  class TopLevelItem;
121  class ChangeKeyButton;
122  class MappingItem;
123  class CategoryItem;
125  friend class TopLevelItem;
129 
131 };
132 
133 
134 #endif // JUCE_KEYMAPPINGEDITORCOMPONENT_H_INCLUDED
Definition: juce_ApplicationCommandManager.h:84
Definition: juce_KeyPress.h:37
#define noexcept
Definition: juce_CompilerSupport.h:141
Definition: juce_KeyMappingEditorComponent.h:36
Definition: juce_KeyMappingEditorComponent.cpp:334
Definition: juce_TextButton.h:36
ApplicationCommandManager & getCommandManager() const noexcept
Definition: juce_KeyMappingEditorComponent.h:66
Definition: juce_String.h:43
#define JUCE_API
Definition: juce_StandardHeader.h:139
virtual void resized()
Definition: juce_Component.cpp:2272
KeyPressMappingSet & getMappings() const noexcept
Definition: juce_KeyMappingEditorComponent.h:63
Definition: juce_Colour.h:35
Definition: juce_TreeView.h:603
Definition: juce_Component.h:33
Definition: juce_ScopedPointer.h:70
Definition: juce_KeyPressMappingSet.h:84
Definition: juce_KeyMappingEditorComponent.cpp:267
Definition: juce_KeyMappingEditorComponent.cpp:288
virtual void parentHierarchyChanged()
Definition: juce_Component.cpp:1646
Definition: juce_ContainerDeletePolicy.h:44
Definition: juce_KeyMappingEditorComponent.cpp:25
int CommandID
Definition: juce_ApplicationCommandID.h:37
Definition: juce_KeyMappingEditorComponent.cpp:204
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)
Definition: juce_PlatformDefs.h:198
ColourIds
Definition: juce_KeyMappingEditorComponent.h:102