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.

53 lines
2.0KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE 6 technical preview.
  4. Copyright (c) 2020 - Raw Material Software Limited
  5. You may use this code under the terms of the GPL v3
  6. (see www.gnu.org/licenses).
  7. For this technical preview, this file is not subject to commercial licensing.
  8. JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
  9. EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
  10. DISCLAIMED.
  11. ==============================================================================
  12. */
  13. #pragma once
  14. #include "../jucer_JucerDocument.h"
  15. //==============================================================================
  16. class ResourceEditorPanel : public Component,
  17. private TableListBoxModel,
  18. private ChangeListener
  19. {
  20. public:
  21. ResourceEditorPanel (JucerDocument& document);
  22. ~ResourceEditorPanel() override;
  23. void resized() override;
  24. void paint (Graphics& g) override;
  25. void visibilityChanged() override;
  26. void changeListenerCallback (ChangeBroadcaster*) override;
  27. int getNumRows() override;
  28. void paintRowBackground (Graphics& g, int rowNumber, int width, int height, bool rowIsSelected) override;
  29. void paintCell (Graphics& g, int rowNumber, int columnId, int width, int height, bool rowIsSelected) override;
  30. Component* refreshComponentForCell (int rowNumber, int columnId, bool isRowSelected, Component* existingComponentToUpdate) override;
  31. int getColumnAutoSizeWidth (int columnId) override;
  32. void sortOrderChanged (int newSortColumnId, bool isForwards) override;
  33. void selectedRowsChanged (int lastRowSelected) override;
  34. private:
  35. void lookAndFeelChanged() override;
  36. void reloadAll();
  37. JucerDocument& document;
  38. std::unique_ptr<TableListBox> listBox;
  39. TextButton addButton, reloadAllButton, delButton;
  40. };