Channel.cpp 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603
  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. //[Headers] You can add your own extra header files here...
  14. #include "LinJam.h"
  15. #include "ConfigChannel.h"
  16. #include "./Trace/TraceChannels.h"
  17. //[/Headers]
  18. #include "Channel.h"
  19. //[MiscUserDefs] You can add your own user definitions and misc code here...
  20. //[/MiscUserDefs]
  21. //==============================================================================
  22. Channel::Channel (ValueTree channel_store)
  23. {
  24. setName ("Channel");
  25. addAndMakeVisible (xmitButton = new ToggleButton ("xmitButton"));
  26. xmitButton->setExplicitFocusOrder (1);
  27. xmitButton->setButtonText (TRANS("XMIT"));
  28. xmitButton->setColour (ToggleButton::textColourId, Colours::grey);
  29. addAndMakeVisible (muteButton = new ToggleButton ("muteButton"));
  30. muteButton->setExplicitFocusOrder (2);
  31. muteButton->setButtonText (TRANS("MUTE"));
  32. muteButton->setColour (ToggleButton::textColourId, Colours::grey);
  33. addAndMakeVisible (soloButton = new ToggleButton ("soloButton"));
  34. soloButton->setExplicitFocusOrder (3);
  35. soloButton->setButtonText (TRANS("SOLO"));
  36. soloButton->setColour (ToggleButton::textColourId, Colours::grey);
  37. addAndMakeVisible (removeButton = new TextButton ("removeButton"));
  38. removeButton->setExplicitFocusOrder (4);
  39. removeButton->setButtonText (TRANS("X"));
  40. removeButton->setColour (TextButton::buttonColourId, Colour (0xff400000));
  41. removeButton->setColour (TextButton::buttonOnColourId, Colours::maroon);
  42. removeButton->setColour (TextButton::textColourOnId, Colours::red);
  43. removeButton->setColour (TextButton::textColourOffId, Colours::red);
  44. addAndMakeVisible (configButton = new TextButton ("configButton"));
  45. configButton->setExplicitFocusOrder (5);
  46. configButton->setButtonText (TRANS("?"));
  47. configButton->setColour (TextButton::buttonColourId, Colour (0xff404000));
  48. configButton->setColour (TextButton::buttonOnColourId, Colours::olive);
  49. configButton->setColour (TextButton::textColourOnId, Colours::yellow);
  50. configButton->setColour (TextButton::textColourOffId, Colours::yellow);
  51. addAndMakeVisible (panSlider = new Slider ("panSlider"));
  52. panSlider->setExplicitFocusOrder (6);
  53. panSlider->setRange (-1, 1, 0);
  54. panSlider->setSliderStyle (Slider::Rotary);
  55. panSlider->setTextBoxStyle (Slider::NoTextBox, true, 0, 12);
  56. panSlider->setColour (Slider::textBoxTextColourId, Colours::grey);
  57. panSlider->setColour (Slider::textBoxBackgroundColourId, Colours::black);
  58. panSlider->addListener (this);
  59. addAndMakeVisible (gainSlider = new Slider ("gainSlider"));
  60. gainSlider->setExplicitFocusOrder (7);
  61. gainSlider->setRange (-120, 20, 0);
  62. gainSlider->setSliderStyle (Slider::LinearVertical);
  63. gainSlider->setTextBoxStyle (Slider::NoTextBox, true, 48, 12);
  64. gainSlider->setColour (Slider::textBoxTextColourId, Colours::grey);
  65. gainSlider->setColour (Slider::textBoxBackgroundColourId, Colour (0x00000000));
  66. gainSlider->addListener (this);
  67. addAndMakeVisible (nameLabel = new Label ("nameLabel",
  68. TRANS("channel name")));
  69. nameLabel->setExplicitFocusOrder (8);
  70. nameLabel->setFont (Font (12.00f, Font::plain));
  71. nameLabel->setJustificationType (Justification::centred);
  72. nameLabel->setEditable (true, true, true);
  73. nameLabel->setColour (Label::textColourId, Colours::grey);
  74. nameLabel->setColour (TextEditor::textColourId, Colours::black);
  75. nameLabel->setColour (TextEditor::backgroundColourId, Colour (0x00000000));
  76. nameLabel->addListener (this);
  77. addAndMakeVisible (stereoLabel = new Label ("stereoLabel",
  78. TRANS("ST")));
  79. stereoLabel->setFont (Font (10.00f, Font::bold));
  80. stereoLabel->setJustificationType (Justification::centred);
  81. stereoLabel->setEditable (false, false, false);
  82. stereoLabel->setColour (Label::textColourId, Colours::green);
  83. stereoLabel->setColour (TextEditor::textColourId, Colours::black);
  84. stereoLabel->setColour (TextEditor::backgroundColourId, Colour (0x00000000));
  85. addAndMakeVisible (vuLeftSlider = new Slider ("vuLeftSlider"));
  86. vuLeftSlider->setRange (-120, 20, 0);
  87. vuLeftSlider->setSliderStyle (Slider::LinearBar);
  88. vuLeftSlider->setTextBoxStyle (Slider::NoTextBox, true, 48, 12);
  89. vuLeftSlider->setColour (Slider::textBoxTextColourId, Colours::grey);
  90. vuLeftSlider->setColour (Slider::textBoxBackgroundColourId, Colour (0x00000000));
  91. vuLeftSlider->addListener (this);
  92. addAndMakeVisible (vuRightSlider = new Slider ("vuRightSlider"));
  93. vuRightSlider->setRange (-120, 20, 0);
  94. vuRightSlider->setSliderStyle (Slider::LinearBar);
  95. vuRightSlider->setTextBoxStyle (Slider::NoTextBox, true, 48, 12);
  96. vuRightSlider->setColour (Slider::textBoxTextColourId, Colours::grey);
  97. vuRightSlider->setColour (Slider::textBoxBackgroundColourId, Colour (0x00000000));
  98. vuRightSlider->addListener (this);
  99. addAndMakeVisible (vuLeftLabel = new Label ("vuLeftLabel",
  100. TRANS("-120")));
  101. vuLeftLabel->setFont (Font (10.00f, Font::plain));
  102. vuLeftLabel->setJustificationType (Justification::centred);
  103. vuLeftLabel->setEditable (false, false, false);
  104. vuLeftLabel->setColour (Label::textColourId, Colours::grey);
  105. vuLeftLabel->setColour (TextEditor::textColourId, Colours::black);
  106. vuLeftLabel->setColour (TextEditor::backgroundColourId, Colour (0x00000000));
  107. addAndMakeVisible (vuRightLabel = new Label ("vuRightLabel",
  108. TRANS("-120")));
  109. vuRightLabel->setFont (Font (10.00f, Font::plain));
  110. vuRightLabel->setJustificationType (Justification::centred);
  111. vuRightLabel->setEditable (false, false, false);
  112. vuRightLabel->setColour (Label::textColourId, Colours::grey);
  113. vuRightLabel->setColour (TextEditor::textColourId, Colours::black);
  114. vuRightLabel->setColour (TextEditor::backgroundColourId, Colour (0x00000000));
  115. //[UserPreSize]
  116. this->vuLeftSlider ->setSliderStyle(Slider::LinearBarVertical) ;
  117. this->vuRightSlider->setSliderStyle(Slider::LinearBarVertical) ;
  118. this->vuLeftSlider ->setValue(GUI::VU_DB_MIN) ;
  119. this->vuRightSlider->setValue(GUI::VU_DB_MIN) ;
  120. //[/UserPreSize]
  121. setSize (60, 252);
  122. //[Constructor] You can add your own custom stuff here..
  123. String channel_name = str( channel_store[CONFIG::CHANNEL_NAME_ID]) ;
  124. double volume = double(channel_store[CONFIG::VOLUME_ID ]) ;
  125. double pan = double(channel_store[CONFIG::PAN_ID ]) ;
  126. bool is_xmit = bool( channel_store[CONFIG::IS_XMIT_RCV_ID ]) ;
  127. bool is_muted = bool( channel_store[CONFIG::IS_MUTED_ID ]) ;
  128. bool is_solo = bool( channel_store[CONFIG::IS_SOLO_ID ]) ;
  129. double vu_min = 0.0 ;
  130. double vu_max = GUI::VU_DB_RANGE ;
  131. double gain_min = GUI::VU_DB_MIN ;
  132. double gain_max = GUI::VU_DB_MIN + GUI::VU_DB_RANGE ;
  133. this->gainSlider->setValue( volume) ;
  134. this->panSlider ->setValue( pan) ;
  135. this->xmitButton->setToggleState(is_xmit , juce::dontSendNotification) ;
  136. this->muteButton->setToggleState(is_muted , juce::dontSendNotification) ;
  137. this->soloButton->setToggleState(is_solo , juce::dontSendNotification) ;
  138. this->nameLabel ->setText( channel_name , juce::dontSendNotification) ;
  139. this->gainSlider ->setDoubleClickReturnValue(true , 0.0) ;
  140. this->panSlider ->setDoubleClickReturnValue(true , 0.0) ;
  141. this->vuLeftSlider ->setInterceptsMouseClicks(false , false) ;
  142. this->vuRightSlider->setInterceptsMouseClicks(false , false) ;
  143. this->gainSlider ->setRange(gain_min , gain_max , 0) ;
  144. this->vuLeftSlider ->setRange(vu_min , vu_max , 0) ;
  145. this->vuRightSlider->setRange(vu_min , vu_max , 0) ;
  146. // local event handlers
  147. this->removeButton->addListener(this) ;
  148. this->configButton->addListener(this) ;
  149. this->xmitButton ->addListener(this) ;
  150. this->muteButton ->addListener(this) ;
  151. this->soloButton ->addListener(this) ;
  152. // establish shared config value holders and listeners
  153. this->channelStore = channel_store ;
  154. this->channelName .referTo(LinJamConfig::GetValueHolder(this->channelStore ,
  155. CONFIG::CHANNEL_NAME_ID)) ;
  156. this->stereoStatus .referTo(LinJamConfig::GetValueHolder(this->channelStore ,
  157. CONFIG::STEREO_ID )) ;
  158. this->vuLeft .referTo(LinJamConfig::GetValueHolder(this->channelStore ,
  159. CONFIG::VU_LEFT_ID )) ;
  160. this->vuRight .referTo(LinJamConfig::GetValueHolder(this->channelStore ,
  161. CONFIG::VU_RIGHT_ID )) ;
  162. this->channelName .addListener(this) ;
  163. this->stereoStatus .addListener(this) ;
  164. this->vuLeft .addListener(this) ;
  165. this->vuRight .addListener(this) ;
  166. //[/Constructor]
  167. }
  168. Channel::~Channel()
  169. {
  170. //[Destructor_pre]. You can add your own custom destruction code here..
  171. //[/Destructor_pre]
  172. xmitButton = nullptr;
  173. muteButton = nullptr;
  174. soloButton = nullptr;
  175. removeButton = nullptr;
  176. configButton = nullptr;
  177. panSlider = nullptr;
  178. gainSlider = nullptr;
  179. nameLabel = nullptr;
  180. stereoLabel = nullptr;
  181. vuLeftSlider = nullptr;
  182. vuRightSlider = nullptr;
  183. vuLeftLabel = nullptr;
  184. vuRightLabel = nullptr;
  185. //[Destructor]. You can add your own custom destruction code here..
  186. //[/Destructor]
  187. }
  188. //==============================================================================
  189. void Channel::paint (Graphics& g)
  190. {
  191. //[UserPrePaint] Add your own custom painting code here..
  192. //[/UserPrePaint]
  193. g.setColour (Colours::black);
  194. g.fillRoundedRectangle (0.0f, 0.0f, static_cast<float> (getWidth() - 0), static_cast<float> (getHeight() - 0), 10.000f);
  195. g.setColour (Colours::white);
  196. g.drawRoundedRectangle (0.0f, 0.0f, static_cast<float> (getWidth() - 0), static_cast<float> (getHeight() - 0), 10.000f, 1.000f);
  197. //[UserPaint] Add your own custom painting code here..
  198. //[/UserPaint]
  199. }
  200. void Channel::resized()
  201. {
  202. //[UserPreResize] Add your own custom resize code here..
  203. //[/UserPreResize]
  204. xmitButton->setBounds (4, 4, 36, 12);
  205. muteButton->setBounds (4, 20, 36, 12);
  206. soloButton->setBounds (4, 36, 36, 12);
  207. removeButton->setBounds (45, 0, 15, 16);
  208. configButton->setBounds (45, 16, 15, 16);
  209. panSlider->setBounds (12, 52, 36, 36);
  210. gainSlider->setBounds (22, 92, 16, 128);
  211. nameLabel->setBounds (4, 236, 52, 12);
  212. stereoLabel->setBounds (12, 72, 36, 12);
  213. vuLeftSlider->setBounds (6, 92, 16, 128);
  214. vuRightSlider->setBounds (38, 92, 16, 128);
  215. vuLeftLabel->setBounds (4, 224, 24, 12);
  216. vuRightLabel->setBounds (32, 224, 24, 12);
  217. //[UserResized] Add your own custom resize handling here..
  218. bool is_mono = int(this->stereoStatus.getValue()) == CONFIG::MONO ;
  219. bool is_master = this->channelStore.getParent().getType() == CONFIG::MASTERS_ID &&
  220. this->channelStore .getType() == CONFIG::MASTER_ID ;
  221. if (is_mono && !is_master)
  222. {
  223. vuLeftSlider->setBounds(6 , 92 , 24 , 128) ;
  224. gainSlider ->setBounds(32 , 92 , 24 , 128) ;
  225. }
  226. //[/UserResized]
  227. }
  228. void Channel::sliderValueChanged (Slider* sliderThatWasMoved)
  229. {
  230. //[UsersliderValueChanged_Pre]
  231. var value = var(sliderThatWasMoved->getValue()) ;
  232. Identifier key ;
  233. //[/UsersliderValueChanged_Pre]
  234. if (sliderThatWasMoved == panSlider)
  235. {
  236. //[UserSliderCode_panSlider] -- add your slider handling code here..
  237. key = CONFIG::PAN_ID ;
  238. //[/UserSliderCode_panSlider]
  239. }
  240. else if (sliderThatWasMoved == gainSlider)
  241. {
  242. //[UserSliderCode_gainSlider] -- add your slider handling code here..
  243. key = CONFIG::VOLUME_ID ;
  244. //[/UserSliderCode_gainSlider]
  245. }
  246. else if (sliderThatWasMoved == vuLeftSlider)
  247. {
  248. //[UserSliderCode_vuLeftSlider] -- add your slider handling code here..
  249. // read only - unhandled
  250. //[/UserSliderCode_vuLeftSlider]
  251. }
  252. else if (sliderThatWasMoved == vuRightSlider)
  253. {
  254. //[UserSliderCode_vuRightSlider] -- add your slider handling code here..
  255. // read only - unhandled
  256. //[/UserSliderCode_vuRightSlider]
  257. }
  258. //[UsersliderValueChanged_Post]
  259. setConfig(key , value) ;
  260. //[/UsersliderValueChanged_Post]
  261. }
  262. void Channel::labelTextChanged (Label* labelThatHasChanged)
  263. {
  264. //[UserlabelTextChanged_Pre]
  265. //[/UserlabelTextChanged_Pre]
  266. if (labelThatHasChanged == nameLabel)
  267. {
  268. //[UserLabelCode_nameLabel] -- add your label text handling code here..
  269. DEBUG_TRACE_RENAME_CHANNEL_GUI_VIA_LABEL
  270. String gui_name = this->nameLabel->getText() ;
  271. int stereo_status = int(this->stereoStatus.getValue()) ;
  272. String client_name = LinJamConfig::MakeStereoName(gui_name , stereo_status) ;
  273. setConfig(CONFIG::CHANNEL_NAME_ID , var(client_name)) ;
  274. //[/UserLabelCode_nameLabel]
  275. }
  276. //[UserlabelTextChanged_Post]
  277. //[/UserlabelTextChanged_Post]
  278. }
  279. //[MiscUserCode] You can add your own definitions of your custom methods or any other code here...
  280. /* Channel class private instance methods */
  281. void Channel::buttonClicked(Button* a_button) { handleButtonClicked(a_button) ; }
  282. void Channel::valueChanged(Value& a_value)
  283. {
  284. bool is_vu_left = a_value.refersToSameSourceAs(this->vuLeft ) ;
  285. bool is_vu_right = a_value.refersToSameSourceAs(this->vuRight ) ;
  286. bool is_stereo = a_value.refersToSameSourceAs(this->stereoStatus) ;
  287. bool is_name = a_value.refersToSameSourceAs(this->channelName ) ;
  288. if (is_vu_left ) updateVU(this->vuLeftSlider , this->vuLeftLabel , this->vuLeft) ;
  289. else if (is_vu_right) updateVU(this->vuRightSlider , this->vuRightLabel , this->vuRight) ;
  290. else if (is_stereo ) setStereoState() ;
  291. else if (is_name )
  292. {
  293. DEBUG_TRACE_RENAME_CHANNEL_GUI_VIA_CALLOUTBOX
  294. String client_name = str(this->channelName.getValue()) ;
  295. String gui_name = LinJamConfig::TrimStereoName(client_name) ;
  296. this->nameLabel->setText(gui_name , juce::dontSendNotification) ;
  297. }
  298. }
  299. void Channel::updateVU(Slider* a_vu_slider , Label* a_vu_label , Value vu_var)
  300. {
  301. double vu_value = double(vu_var.getValue()) ;
  302. double actual_vu = vu_value + GUI::VU_DB_MIN ;
  303. bool is_metro = this->channelStore.getType() == CONFIG::METRO_ID ;
  304. bool is_saturated = actual_vu >= 0.0 && !is_metro ;
  305. String label_text = (vu_value <= GUI::VU_DB_RANGE) ? String(int(actual_vu) ) :
  306. String(GUI::INFINITY_CHAR) ;
  307. a_vu_slider->setValue(vu_value) ;
  308. a_vu_label ->setText(label_text , juce::dontSendNotification) ;
  309. a_vu_slider->setColour(Slider::thumbColourId , (is_saturated) ?
  310. Colour(0xFFFF0000) :
  311. Colour(0xFFBBBBFF)) ;
  312. a_vu_slider->setColour(Slider::trackColourId , (is_saturated) ?
  313. Colour(0x80800000) :
  314. Colour(0x80008000)) ;
  315. }
  316. void Channel::setConfig(Identifier a_key , var a_value)
  317. {
  318. if (a_key.isValid()) this->channelStore.setProperty(a_key , a_value , nullptr) ;
  319. }
  320. /* Channel class protected instance methods */
  321. bool Channel::handleButtonClicked(Button* a_button)
  322. {
  323. Identifier key = (a_button == this->xmitButton) ? CONFIG::IS_XMIT_RCV_ID :
  324. (a_button == this->muteButton) ? CONFIG::IS_MUTED_ID :
  325. (a_button == this->soloButton) ? CONFIG::IS_SOLO_ID :
  326. Identifier::null ;
  327. var value = var(a_button->getToggleState()) ;
  328. bool was_handled = key.isValid() ;
  329. if (was_handled) setConfig(key , value) ;
  330. return was_handled ;
  331. }
  332. void Channel::setStereoState()
  333. {
  334. DEBUG_TRACE_STEREO_STATE_GUI
  335. bool is_stereo = int(this->stereoStatus.getValue()) != CONFIG::MONO ;
  336. bool is_metro = this->channelStore.getType() == CONFIG::METRO_ID ;
  337. // show/hide stereo-only components
  338. this->stereoLabel ->setVisible(is_stereo) ;
  339. this->vuRightSlider->setVisible(is_stereo) ;
  340. this->vuRightLabel ->setVisible(is_stereo && !is_metro) ;
  341. // set channel name
  342. String channel_name = str(this->channelName.getValue()) ;
  343. String stereo_postfix = channel_name.getLastCharacters(CLIENT::STEREO_POSTFIX_N_CHARS) ;
  344. if (is_stereo && !stereo_postfix.compare(CLIENT::STEREO_L_POSTFIX))
  345. channel_name = LinJamConfig::TrimStereoName(channel_name) ;
  346. this->nameLabel->setText(channel_name , juce::dontSendNotification) ;
  347. resized() ;
  348. }
  349. /* MasterChannels , LocalChannels , RemoteChannels classes private class methods */
  350. MasterChannel::MasterChannel(ValueTree channel_store) : Channel(channel_store)
  351. {
  352. this->removeButton->setVisible(false) ;
  353. this->configButton->setVisible(false) ;
  354. this->xmitButton ->setVisible(false) ;
  355. this->soloButton ->setVisible(false) ;
  356. this->stereoLabel ->setVisible(true) ;
  357. this->nameLabel ->setEditable(false , false , false) ;
  358. // metro VU used as loop progress indicator
  359. if (this->channelStore.getType() == CONFIG::METRO_ID)
  360. {
  361. this->vuLeftSlider ->setRange(0.0 , 1.0 , 0.0) ;
  362. this->vuRightSlider->setRange(0.0 , 1.0 , 0.0) ;
  363. this->vuLeftLabel ->setVisible(false) ;
  364. this->vuRightLabel ->setVisible(false) ;
  365. }
  366. setStereoState() ;
  367. }
  368. LocalChannel::LocalChannel(ValueTree channel_store) : Channel(channel_store)
  369. {
  370. this->xmitButton->setButtonText(GUI::XMIT_LABEL_TEXT) ;
  371. setStereoState() ;
  372. }
  373. RemoteChannel::RemoteChannel(ValueTree channel_store) : Channel(channel_store)
  374. {
  375. this->nameLabel ->setEditable(false , false , false) ;
  376. this->removeButton->setVisible(false) ;
  377. this->configButton->setVisible(false) ;
  378. this->xmitButton ->setButtonText(GUI::RCV_LABEL_TEXT) ;
  379. setStereoState() ;
  380. }
  381. /* LocalChannel class private instance methods */
  382. void LocalChannel::buttonClicked(Button* a_button)
  383. {
  384. if (handleButtonClicked(a_button)) return ;
  385. if (a_button == this->removeButton)
  386. LinJam::RemoveLocalChannel(this->channelStore) ;
  387. else if (a_button == this->configButton)
  388. {
  389. ConfigChannel* configChannel = new ConfigChannel(this->channelStore) ;
  390. Component* mixer = getParentComponent()->getParentComponent() ;
  391. Component* mainContent = mixer->getParentComponent() ;
  392. // compute CallOutBox arrow target posistion
  393. int modalX = mixer->getX() + getX() + this->configButton->getX() + GUI::HOVER_BTN_XC ;
  394. int modalY = mixer->getY() + getY() + this->configButton->getY() + GUI::HOVER_BTN_YC ;
  395. juce::Rectangle<int> modalRect = juce::Rectangle<int>(modalX , modalY , 1 , 1) ;
  396. // instantiate ConfigChannel as CallOutBox
  397. configChannel->setSize(GUI::CHANNEL_CONFIG_W , GUI::CHANNEL_CONFIG_H) ;
  398. CallOutBox::launchAsynchronously(configChannel , modalRect , mainContent) ;
  399. }
  400. }
  401. //[/MiscUserCode]
  402. //==============================================================================
  403. #if 0
  404. /* -- Introjucer information section --
  405. This is where the Introjucer stores the metadata that describe this GUI layout, so
  406. make changes in here at your peril!
  407. BEGIN_JUCER_METADATA
  408. <JUCER_COMPONENT documentType="Component" className="Channel" componentName="Channel"
  409. parentClasses="public Component, public ButtonListener, public SliderListener, public Value::Listener"
  410. constructorParams="ValueTree channel_store" variableInitialisers=""
  411. snapPixels="8" snapActive="1" snapShown="1" overlayOpacity="0.330"
  412. fixedSize="0" initialWidth="60" initialHeight="252">
  413. <BACKGROUND backgroundColour="0">
  414. <ROUNDRECT pos="0 0 0M 0M" cornerSize="10" fill="solid: ff000000" hasStroke="1"
  415. stroke="1, mitered, butt" strokeColour="solid: ffffffff"/>
  416. </BACKGROUND>
  417. <TOGGLEBUTTON name="xmitButton" id="f45f759640162c62" memberName="xmitButton"
  418. virtualName="" explicitFocusOrder="1" pos="4 4 36 12" txtcol="ff808080"
  419. buttonText="XMIT" connectedEdges="0" needsCallback="0" radioGroupId="0"
  420. state="0"/>
  421. <TOGGLEBUTTON name="muteButton" id="263020526add917" memberName="muteButton"
  422. virtualName="" explicitFocusOrder="2" pos="4 20 36 12" txtcol="ff808080"
  423. buttonText="MUTE" connectedEdges="0" needsCallback="0" radioGroupId="0"
  424. state="0"/>
  425. <TOGGLEBUTTON name="soloButton" id="3b096c8c7df5c792" memberName="soloButton"
  426. virtualName="" explicitFocusOrder="3" pos="4 36 36 12" txtcol="ff808080"
  427. buttonText="SOLO" connectedEdges="0" needsCallback="0" radioGroupId="0"
  428. state="0"/>
  429. <TEXTBUTTON name="removeButton" id="becd368b728d32c0" memberName="removeButton"
  430. virtualName="" explicitFocusOrder="4" pos="45 0 15 16" bgColOff="ff400000"
  431. bgColOn="ff800000" textCol="ffff0000" textColOn="ffff0000" buttonText="X"
  432. connectedEdges="0" needsCallback="0" radioGroupId="0"/>
  433. <TEXTBUTTON name="configButton" id="f0a56a4ebe614916" memberName="configButton"
  434. virtualName="" explicitFocusOrder="5" pos="45 16 15 16" bgColOff="ff404000"
  435. bgColOn="ff808000" textCol="ffffff00" textColOn="ffffff00" buttonText="?"
  436. connectedEdges="0" needsCallback="0" radioGroupId="0"/>
  437. <SLIDER name="panSlider" id="aa7c4f80abb603e9" memberName="panSlider"
  438. virtualName="" explicitFocusOrder="6" pos="12 52 36 36" textboxtext="ff808080"
  439. textboxbkgd="ff000000" min="-1" max="1" int="0" style="Rotary"
  440. textBoxPos="NoTextBox" textBoxEditable="0" textBoxWidth="0" textBoxHeight="12"
  441. skewFactor="1"/>
  442. <SLIDER name="gainSlider" id="e34ef13291b2ec40" memberName="gainSlider"
  443. virtualName="" explicitFocusOrder="7" pos="22 92 16 128" textboxtext="ff808080"
  444. textboxbkgd="0" min="-120" max="20" int="0" style="LinearVertical"
  445. textBoxPos="NoTextBox" textBoxEditable="0" textBoxWidth="48"
  446. textBoxHeight="12" skewFactor="1"/>
  447. <LABEL name="nameLabel" id="66bafa468220da02" memberName="nameLabel"
  448. virtualName="" explicitFocusOrder="8" pos="4 236 52 12" textCol="ff808080"
  449. edTextCol="ff000000" edBkgCol="0" labelText="channel name" editableSingleClick="1"
  450. editableDoubleClick="1" focusDiscardsChanges="1" fontname="Default font"
  451. fontsize="12" bold="0" italic="0" justification="36"/>
  452. <LABEL name="stereoLabel" id="deaf84482cab9f7d" memberName="stereoLabel"
  453. virtualName="" explicitFocusOrder="0" pos="12 72 36 12" textCol="ff008000"
  454. edTextCol="ff000000" edBkgCol="0" labelText="ST" editableSingleClick="0"
  455. editableDoubleClick="0" focusDiscardsChanges="0" fontname="Default font"
  456. fontsize="10" bold="1" italic="0" justification="36"/>
  457. <SLIDER name="vuLeftSlider" id="fbb656fdc87f46ed" memberName="vuLeftSlider"
  458. virtualName="" explicitFocusOrder="0" pos="6 92 16 128" textboxtext="ff808080"
  459. textboxbkgd="0" min="-120" max="20" int="0" style="LinearBar"
  460. textBoxPos="NoTextBox" textBoxEditable="0" textBoxWidth="48"
  461. textBoxHeight="12" skewFactor="1"/>
  462. <SLIDER name="vuRightSlider" id="31c942b6caa362dd" memberName="vuRightSlider"
  463. virtualName="" explicitFocusOrder="0" pos="38 92 16 128" textboxtext="ff808080"
  464. textboxbkgd="0" min="-120" max="20" int="0" style="LinearBar"
  465. textBoxPos="NoTextBox" textBoxEditable="0" textBoxWidth="48"
  466. textBoxHeight="12" skewFactor="1"/>
  467. <LABEL name="vuLeftLabel" id="cdc1fb3056af7c9b" memberName="vuLeftLabel"
  468. virtualName="" explicitFocusOrder="0" pos="4 224 24 12" textCol="ff808080"
  469. edTextCol="ff000000" edBkgCol="0" labelText="-120" editableSingleClick="0"
  470. editableDoubleClick="0" focusDiscardsChanges="0" fontname="Default font"
  471. fontsize="10" bold="0" italic="0" justification="36"/>
  472. <LABEL name="vuRightLabel" id="4bb31261e6795ae1" memberName="vuRightLabel"
  473. virtualName="" explicitFocusOrder="0" pos="32 224 24 12" textCol="ff808080"
  474. edTextCol="ff000000" edBkgCol="0" labelText="-120" editableSingleClick="0"
  475. editableDoubleClick="0" focusDiscardsChanges="0" fontname="Default font"
  476. fontsize="10" bold="0" italic="0" justification="36"/>
  477. </JUCER_COMPONENT>
  478. END_JUCER_METADATA
  479. */
  480. #endif
  481. //[EndFile] You can add extra defines here...
  482. //[/EndFile]