Channel.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  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 _CHANNEL_H_
  14. #define _CHANNEL_H_
  15. //[Headers] -- You can add your own extra header files here --
  16. #include "JuceHeader.h"
  17. //[/Headers]
  18. //==============================================================================
  19. /**
  20. //[Comments]
  21. instances of Channel represent individual mixer channel slices
  22. they are contained within a Channels group
  23. //[/Comments]
  24. */
  25. class Channel : public Component,
  26. public Button::Listener,
  27. public Slider::Listener,
  28. public Value::Listener,
  29. public Label::Listener
  30. {
  31. public:
  32. //==============================================================================
  33. Channel (ValueTree channel_store);
  34. ~Channel();
  35. //==============================================================================
  36. //[UserMethods] -- You can add your own custom methods in this section.
  37. #if DEBUG
  38. friend class Channels ;
  39. #endif // DEBUG
  40. //[/UserMethods]
  41. void paint (Graphics& g);
  42. void resized();
  43. void sliderValueChanged (Slider* sliderThatWasMoved);
  44. void labelTextChanged (Label* labelThatHasChanged);
  45. private:
  46. //[UserVariables] -- You can add your own custom variables in this section.
  47. Value channelName ;
  48. Value stereoStatus ;
  49. Value vuLeft ;
  50. Value vuRight ;
  51. void buttonClicked(Button* a_button) override ;
  52. void valueChanged( Value& a_value) override ;
  53. void updateVU( Slider* a_vu_slider , Label* a_vu_label , Value vu_var) ;
  54. void setConfig( Identifier a_key , var a_value) ;
  55. protected:
  56. ValueTree channelStore ;
  57. bool handleButtonClicked(Button* a_button) ;
  58. void setStereoState() ;
  59. //[/UserVariables]
  60. //==============================================================================
  61. ScopedPointer<ToggleButton> xmitButton;
  62. ScopedPointer<ToggleButton> muteButton;
  63. ScopedPointer<ToggleButton> soloButton;
  64. ScopedPointer<TextButton> removeButton;
  65. ScopedPointer<TextButton> configButton;
  66. ScopedPointer<Slider> panSlider;
  67. ScopedPointer<Slider> gainSlider;
  68. ScopedPointer<Label> nameLabel;
  69. ScopedPointer<Label> stereoLabel;
  70. ScopedPointer<Slider> vuLeftSlider;
  71. ScopedPointer<Slider> vuRightSlider;
  72. ScopedPointer<Label> vuLeftLabel;
  73. ScopedPointer<Label> vuRightLabel;
  74. //==============================================================================
  75. JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Channel)
  76. };
  77. //[EndFile] You can add extra defines here...
  78. class MasterChannel : public Channel
  79. {
  80. friend class MasterChannels ;
  81. MasterChannel(ValueTree channel_store) ;
  82. } ;
  83. class LocalChannel : public Channel
  84. {
  85. friend class LocalChannels ;
  86. LocalChannel(ValueTree channel_store) ;
  87. void buttonClicked(Button* a_button) ;
  88. } ;
  89. class RemoteChannel : public Channel
  90. {
  91. friend class RemoteChannels ;
  92. RemoteChannel(ValueTree channel_store) ;
  93. } ;
  94. //[/EndFile]
  95. #endif // _CHANNEL_H_