/*************************************************************************** * _ARP_CONTROLLER_RANGE_PANEL ***************************************************************************/ _ArpControllerRangePanel::_ArpControllerRangePanel( const char* name, AmFilterConfigLayout* target, const BMessage& initSettings, const char* settingsKey, list_view_type type) : inherited(name), mListView(NULL) { _ArpControllerRangeList* lv = new _ArpControllerRangeList("list_view", target, settingsKey, type); if (lv) { AddLayoutChild(lv); lv->GenerateItems(&initSettings); mListView = lv; } }
ArpTelnetSettings::ArpTelnetSettings( const BMessenger& telnet, const BMessage& initSettings, const BFont* font, uint32 resizingMode, uint32 flags) : ArpRootLayout(BRect(0,0,100,100), "Telnet", resizingMode, flags), mTelnet(telnet), mSettings(initSettings), mImpl(telnet, this, mSettings) { ArpD(cdb << ADH << "ArpTelnetSettings init vals: " << mSettings << endl); try { AddLayoutChild((new ArpRunningBar("TopHBar")) ->SetParams(ArpMessage() .SetInt32(ArpRunningBar::OrientationP, B_HORIZONTAL) .SetFloat(ArpRunningBar::IntraSpaceP, .5) ) ->AddLayoutChild((new ArpTextControl( ArpTelnet::HostConfigName,"Host:","", mImpl.AttachTextControl(ArpTelnet::HostConfigName))) ->SetParams(ArpMessage() .SetString(ArpTextControl::MinTextStringP, "WWWWWWW") .SetString(ArpTextControl::PrefTextStringP, "WWWWWWWWWWWWW") ) ->SetConstraints(ArpMessage() .SetFloat(ArpRunningBar::WeightC,3) .SetInt32(ArpRunningBar::FillC,ArpEastWest) ) ) ->AddLayoutChild((new ArpTextControl( ArpTelnet::PortConfigName,"Port:","23", mImpl.AttachTextControl(ArpTelnet::PortConfigName))) ->SetParams(ArpMessage() .SetString(ArpTextControl::MinTextStringP, "88") .SetString(ArpTextControl::PrefTextStringP, "88888") ) ->SetConstraints(ArpMessage() .SetFloat(ArpRunningBar::WeightC,1) .SetInt32(ArpRunningBar::FillC,ArpEastWest) ) ) ); } catch(...) { throw; } mImpl.RefreshControls(mSettings); }
/***************************************************************************** * ARP-UNCERTAIN-CHORUS-SETTINGS *****************************************************************************/ ArpUncertainChorusSettings::ArpUncertainChorusSettings( AmFilterHolderI* target, const BMessage& initSettings) : inherited(target, initSettings) { float labelW = -1, intW = -1; const BFont* font = be_plain_font; if (font) { labelW = font->StringWidth("Frequency:") + 5; intW = font->StringWidth("Always") + 5; } try { ArpKnobPanel* freqPanel = NULL; AddLayoutChild((new ArpRunningBar("TopVBar")) ->SetParams(ArpMessage() .SetInt32(ArpRunningBar::OrientationP, B_VERTICAL) .SetFloat(ArpRunningBar::IntraSpaceP, .5) ) ->AddLayoutChild((new ArpTextControl( SZ_FILTER_LABEL, "Label:","", mImpl.AttachTextControl(SZ_FILTER_LABEL))) ->SetParams(ArpMessage() .SetString(ArpTextControl::MinTextStringP, "8") .SetString(ArpTextControl::PrefTextStringP, "8888888888") ) ->SetConstraints(ArpMessage() .SetFloat(ArpRunningBar::WeightC,3) .SetInt32(ArpRunningBar::FillC,ArpEastWest) ) ) ->AddLayoutChild((new ArpViewWrapper(freqPanel = new ArpKnobPanel(FREQUENCY_STR, "Frequency:", mImpl.AttachControl(FREQUENCY_STR), 0, 100, true, B_HORIZONTAL, ARP_TIGHT_RING_ADORNMENT, labelW, intW))) ->SetConstraints(ArpMessage() .SetFloat(ArpRunningBar::WeightC,3) .SetInt32(ArpRunningBar::FillC,ArpEastWest) ) ) ); if (freqPanel) { ArpIntControl* intCtrl = freqPanel->IntControl(); if (intCtrl) intCtrl->SetFormatter(arp_new_frequency_formatter() ); } } catch(...) { throw; } Implementation().RefreshControls(mSettings); }
_RhythmiCcFilterSettings::_RhythmiCcFilterSettings( AmFilterHolderI* target, const BMessage& initSettings) : AmFilterConfigLayout(target, initSettings), mRhythmField(NULL) { float labelW = -1, intW = -1; const BFont* font = be_plain_font; if( font ) { labelW = font->StringWidth( "Proximity to beat:"); intW = font->StringWidth("Furthest") + 5; } try { ArpBaseLayout* topVBar = (new ArpRunningBar("TopVBar")) ->SetParams(ArpMessage() .SetInt32(ArpRunningBar::OrientationP, B_VERTICAL) .SetFloat(ArpRunningBar::IntraSpaceP, .5) ); AddLayoutChild( topVBar ); topVBar->AddLayoutChild((new ArpTextControl( SZ_FILTER_LABEL, "Label:","", mImpl.AttachTextControl(SZ_FILTER_LABEL))) ->SetParams(ArpMessage() .SetString(ArpTextControl::MinTextStringP, "8") .SetString(ArpTextControl::PrefTextStringP, "8888888888") ) ->SetConstraints(ArpMessage() .SetFloat(ArpRunningBar::WeightC,3) .SetInt32(ArpRunningBar::FillC,ArpEastWest) ) ); ArpBaseLayout* colHBar = (new ArpRunningBar("ColHBar")) ->SetParams(ArpMessage() .SetInt32(ArpRunningBar::OrientationP, B_HORIZONTAL) .SetFloat(ArpRunningBar::IntraSpaceP, .5) ); topVBar->AddLayoutChild( colHBar ); AddViews(colHBar, mImpl, labelW, intW, initSettings); } catch(...) { throw; } Implementation().RefreshControls(mSettings); }
ArpAccentRandomizerFilterSettings( AmFilterHolderI* target, const BMessage& initSettings) : AmFilterConfigLayout(target, initSettings) { float labelW = -1; const BFont* font = be_plain_font; if (font) labelW = font->StringWidth("Randomize Amount:"); try { ArpKnobPanel* randomizePanel = NULL; AddLayoutChild((new ArpRunningBar("TopVBar")) ->SetParams(ArpMessage() .SetInt32(ArpRunningBar::OrientationP, B_VERTICAL) .SetFloat(ArpRunningBar::IntraSpaceP, .5) ) ->AddLayoutChild((new ArpTextControl( SZ_FILTER_LABEL, "Label:","", mImpl.AttachTextControl(SZ_FILTER_LABEL))) ->SetParams(ArpMessage() .SetString(ArpTextControl::MinTextStringP, "8") .SetString(ArpTextControl::PrefTextStringP, "8888888888") ) ->SetConstraints(ArpMessage() .SetFloat(ArpRunningBar::WeightC,3) .SetInt32(ArpRunningBar::FillC,ArpEastWest) ) ) ->AddLayoutChild((new ArpViewWrapper(randomizePanel = new ArpKnobPanel("randomize_amount", "Randomize Amount:", mImpl.AttachControl("randomize_amount"), 0, 25, true, B_HORIZONTAL, ARP_TIGHT_RING_ADORNMENT, labelW))) ->SetConstraints(ArpMessage() .SetFloat(ArpRunningBar::WeightC, 3) .SetInt32(ArpRunningBar::FillC, ArpEastWest) ) ) ); } catch(...) { throw; } Implementation().RefreshControls(mSettings); }
/***************************************************************************** * _CONTROLLER-RANGE-SETTINGS *****************************************************************************/ _ControllerRangeSettings::_ControllerRangeSettings( AmFilterHolderI* target, const BMessage& initSettings) : inherited(target, initSettings), mTable(0), mLowCtrl(0), mHighCtrl(0) { try { AddLayoutChild((new ArpRunningBar("TopVBar")) ->SetParams(ArpMessage() .SetInt32(ArpRunningBar::OrientationP, B_VERTICAL) .SetFloat(ArpRunningBar::IntraSpaceP, .5) ) ->AddLayoutChild((new ArpTextControl( SZ_FILTER_LABEL, "Label:","", mImpl.AttachTextControl(SZ_FILTER_LABEL))) ->SetParams(ArpMessage() .SetString(ArpTextControl::MinTextStringP, "8") .SetString(ArpTextControl::PrefTextStringP, "8888888888") ) ->SetConstraints(ArpMessage() .SetFloat(ArpRunningBar::WeightC,0) .SetInt32(ArpRunningBar::FillC,ArpEastWest) .SetBool(ArpRunningBar::AlignLabelsC,false) ) ) ->AddLayoutChild((mTable = new _ArpControllerRangePanel("Control Changes", this, initSettings, _RANGE_MSG)) ->SetParams(ArpMessage() .SetBool(ArpScrollArea::ScrollHorizontalP,false) .SetBool(ArpScrollArea::ScrollVerticalP,true) .SetBool(ArpScrollArea::InsetCornerP,false) .SetInt32(ArpScrollArea::BorderStyleP,B_FANCY_BORDER) ) ->SetConstraints(ArpMessage() .SetFloat(ArpRunningBar::WeightC,1) .SetInt32(ArpRunningBar::FillC,ArpWest) .SetBool(ArpRunningBar::AlignLabelsC,false) ) ) ->AddLayoutChild((mLowCtrl = new ArpIntControl( _LOW_VALUE, "Low value:", mImpl.AttachControl(_LOW_VALUE), 0, 127)) ->SetConstraints(ArpMessage() .SetFloat(ArpRunningBar::WeightC,0) .SetInt32(ArpRunningBar::FillC,ArpEastWest) .SetBool(ArpRunningBar::AlignLabelsC,true) ) ) ->AddLayoutChild((mHighCtrl = new ArpIntControl( _HIGH_VALUE, "High value:", mImpl.AttachControl(_HIGH_VALUE), 0, 127)) ->SetConstraints(ArpMessage() .SetFloat(ArpRunningBar::WeightC,0) .SetInt32(ArpRunningBar::FillC,ArpEastWest) .SetBool(ArpRunningBar::AlignLabelsC,true) ) ) ); } catch(...) { throw; } Implementation().RefreshControls(mSettings); }
ArpVelocityMapSettings(AmFilterHolderI* target, const BMessage& initSettings) : AmFilterConfigLayout(target, initSettings) { try { AddLayoutChild((new ArpRunningBar("TopVBar")) ->SetParams(ArpMessage() .SetInt32(ArpRunningBar::OrientationP, B_VERTICAL) .SetFloat(ArpRunningBar::IntraSpaceP, .5) ) ->AddLayoutChild((new ArpTextControl( SZ_FILTER_LABEL, "Label:","", mImpl.AttachTextControl(SZ_FILTER_LABEL))) ->SetParams(ArpMessage() .SetString(ArpTextControl::MinTextStringP, "8") .SetString(ArpTextControl::PrefTextStringP, "8888888888") ) ->SetConstraints(ArpMessage() .SetFloat(ArpRunningBar::WeightC,0) .SetInt32(ArpRunningBar::FillC,ArpEastWest) .SetBool(ArpRunningBar::AlignLabelsC,false) ) ) ->AddLayoutChild((new ArpIntControl( FROM_MIN, "From start:", mImpl.AttachControl(FROM_MIN), 0, 127)) ->SetConstraints(ArpMessage() .SetFloat(ArpRunningBar::WeightC,0) .SetInt32(ArpRunningBar::FillC,ArpEastWest) .SetBool(ArpRunningBar::AlignLabelsC,true) ) ) ->AddLayoutChild((new ArpIntControl( FROM_MAX, "From end:", mImpl.AttachControl(FROM_MAX), 0, 127)) ->SetConstraints(ArpMessage() .SetFloat(ArpRunningBar::WeightC,0) .SetInt32(ArpRunningBar::FillC,ArpEastWest) .SetBool(ArpRunningBar::AlignLabelsC,true) ) ) ->AddLayoutChild((new ArpIntControl( TO_MIN, "To start:", mImpl.AttachControl(TO_MIN), 0, 127)) ->SetConstraints(ArpMessage() .SetFloat(ArpRunningBar::WeightC,0) .SetInt32(ArpRunningBar::FillC,ArpEastWest) .SetBool(ArpRunningBar::AlignLabelsC,true) ) ) ->AddLayoutChild((new ArpIntControl( TO_MAX, "To end:", mImpl.AttachControl(TO_MAX), 0, 127)) ->SetConstraints(ArpMessage() .SetFloat(ArpRunningBar::WeightC,0) .SetInt32(ArpRunningBar::FillC,ArpEastWest) .SetBool(ArpRunningBar::AlignLabelsC,true) ) ) ); } catch(...) { throw; } Implementation().RefreshControls(mSettings); }