Channels.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. /*
  2. ==============================================================================
  3. This is an automatically generated GUI class created by the Introjucer!
  4. Be careful when adding custom code to these files, as only the code within
  5. the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
  6. and re-saved.
  7. Created with Introjucer version: 3.1.1
  8. ------------------------------------------------------------------------------
  9. The Introjucer is part of the JUCE library - "Jules' Utility Class Extensions"
  10. Copyright 2004-13 by Raw Material Software Ltd.
  11. ==============================================================================
  12. */
  13. #ifndef _CHANNELS_H_
  14. #define _CHANNELS_H_
  15. //[Headers] -- You can add your own extra header files here --
  16. #include "Channel.h"
  17. //[/Headers]
  18. //==============================================================================
  19. /**
  20. //[Comments]
  21. Channels is the abstract superclass of channel mixergroups:
  22. LocalChannels, RemoteChannels, MaseterChannels
  23. which are containers for related Channel mixer slices
  24. //[/Comments]
  25. */
  26. class Channels : public Component
  27. {
  28. public:
  29. //==============================================================================
  30. Channels ();
  31. ~Channels();
  32. //==============================================================================
  33. //[UserMethods] -- You can add your own custom methods in this section.
  34. bool addChannel( ValueTree channel_store) ;
  35. void removeChannel( Identifier channel_id) ;
  36. int getNumChannels() ;
  37. //[/UserMethods]
  38. void paint (Graphics& g);
  39. void resized();
  40. private:
  41. //[UserVariables] -- You can add your own custom variables in this section.
  42. protected:
  43. virtual Channel* newChannel(ValueTree channel_store) = 0 ;
  44. Channel* getChannel(Identifier channel_id) ;
  45. //[/UserVariables]
  46. //==============================================================================
  47. ScopedPointer<Label> channelsLabel;
  48. ScopedPointer<TextButton> addButton;
  49. ScopedPointer<TextButton> expandButton;
  50. ScopedPointer<TextButton> ignoreButton;
  51. //==============================================================================
  52. JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Channels)
  53. };
  54. //[EndFile] You can add extra defines here...
  55. class MasterChannels : public Channels
  56. {
  57. public:
  58. MasterChannels() ;
  59. private:
  60. void buttonClicked(Button* buttonThatWasClicked) ;
  61. Channel* newChannel( ValueTree channel_store) override ;
  62. } ;
  63. class LocalChannels : public Channels , public Button::Listener
  64. {
  65. public:
  66. LocalChannels() ;
  67. private:
  68. void buttonClicked(Button* buttonThatWasClicked) ;
  69. Channel* newChannel( ValueTree channel_store) override ;
  70. } ;
  71. class RemoteChannels : public Channels , public Button::Listener
  72. {
  73. public:
  74. RemoteChannels(ValueTree user_store , ValueTree blacklist_store) ;
  75. private:
  76. ValueTree userStore ;
  77. ValueTree blacklistStore ;
  78. bool isExpanded ;
  79. void buttonClicked( Button* buttonThatWasClicked) ;
  80. void toggleExpandChannels() ;
  81. void addUserToBlacklist() ;
  82. Channel* newChannel( ValueTree channel_store) override ;
  83. } ;
  84. //[/EndFile]
  85. #endif // _CHANNELS_H_