The JUCE cross-platform C++ framework, with DISTRHO/KXStudio specific changes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

92 lines
3.3KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library - "Jules' Utility Class Extensions"
  4. Copyright 2004-10 by Raw Material Software Ltd.
  5. ------------------------------------------------------------------------------
  6. JUCE can be redistributed and/or modified under the terms of the GNU General
  7. Public License (Version 2), as published by the Free Software Foundation.
  8. A copy of the license is included in the JUCE distribution, or can be found
  9. online at www.gnu.org/licenses.
  10. JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
  11. WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  12. A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  13. ------------------------------------------------------------------------------
  14. To release a closed-source product which uses JUCE, commercial licenses are
  15. available: visit www.rawmaterialsoftware.com/juce for more information.
  16. ==============================================================================
  17. */
  18. #ifndef __JUCE_COMPONENTEDITOR_H_6CAE6B7E__
  19. #define __JUCE_COMPONENTEDITOR_H_6CAE6B7E__
  20. #include "../jucer_DocumentEditorComponent.h"
  21. #include "../../model/Component/jucer_ComponentDocument.h"
  22. #include "../Editor Base/jucer_EditorCanvas.h"
  23. //==============================================================================
  24. /**
  25. */
  26. class ComponentEditor : public DocumentEditorComponent
  27. {
  28. public:
  29. //==============================================================================
  30. ComponentEditor (OpenDocumentManager::Document* document,
  31. Project* project,
  32. ComponentDocument* componentDocument);
  33. ~ComponentEditor();
  34. //==============================================================================
  35. void getAllCommands (Array <CommandID>& commands);
  36. void getCommandInfo (CommandID commandID, ApplicationCommandInfo& result);
  37. bool perform (const InvocationInfo& info);
  38. void paint (Graphics& g);
  39. void resized();
  40. //==============================================================================
  41. ComponentDocument& getDocument() const { return *componentDocument; }
  42. const StringArray getSelectedIds() const;
  43. void deleteSelection();
  44. void deselectNonComponents();
  45. void selectionToFront();
  46. void selectionToBack();
  47. void showNewComponentMenu (Component* componentToAttachTo);
  48. //==============================================================================
  49. void test();
  50. EditorCanvasBase::SelectedItems& getSelection() { return selection; }
  51. private:
  52. class ClassInfoHolder;
  53. class LayoutEditorHolder;
  54. class BackgroundEditorHolder;
  55. class CodeEditorHolder;
  56. Project* project;
  57. ComponentDocument* componentDocument;
  58. EditorCanvasBase::SelectedItems selection;
  59. TabbedComponent* tabs;
  60. ClassInfoHolder* classInfoHolder;
  61. LayoutEditorHolder* layoutEditorHolder;
  62. BackgroundEditorHolder* backgroundEditorHolder;
  63. CodeEditorHolder* codeEditorHolder;
  64. ComponentEditor (const ComponentEditor&);
  65. ComponentEditor& operator= (const ComponentEditor&);
  66. };
  67. #endif // __JUCE_COMPONENTEDITOR_H_6CAE6B7E__