本文整理汇总了C++中CFrame::open方法的典型用法代码示例。如果您正苦于以下问题:C++ CFrame::open方法的具体用法?C++ CFrame::open怎么用?C++ CFrame::open使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFrame
的用法示例。
在下文中一共展示了CFrame::open方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: open
bool CSmartelectronixDisplayEditor::open(void* ptr)
{
CBitmap* hBackground = new CBitmap("body.bmp");
CRect frameSize (rect.left, rect.top, rect.right, rect.bottom);
CFrame* newFrame = new CFrame (frameSize, this);
newFrame->open (ptr);
newFrame->setBackground(hBackground);
newFrame->setBackgroundColor (kWhiteCColor);
/*
setKnobMode(kLinearMode);
CBitmap* heads = new CBitmap(IDB_BITMAPHEADS);
CBitmap* readout = new CBitmap(IDB_BITMAPREADOUT);
//display = new CWaveDisplay(CRect(38,16,663,285),(CSmartelectronixDisplay*)effect,hBackground,heads,readout);
display = new CWaveDisplay(CRect(38, 16, 665, 285), (CSmartelectronixDisplay*)effect, hBackground, heads, readout);
frame->addView(display);
heads->forget();
readout->forget();
// top row
CBitmap* knob = new CBitmap(IDB_BITMAPKNOB);
// time windows
timeWindow = new CAnimKnob(CRect(697, 31, 697 + knob->getWidth(), 31 + knob->getHeight() / 75), this, CSmartelectronixDisplay::kTimeWindow, 75, 33, knob, CPoint(0, 0));
timeWindow->setDefaultValue(0.5f);
timeWindow->setValue(effect->getParameter(CSmartelectronixDisplay::kTimeWindow));
frame->addView(timeWindow);
((CSmartelectronixDisplay*)effect)->getDisplay(CSmartelectronixDisplay::kTimeWindow, temp);
timeLabel = new CLabel(CRect(696, 72, 730, 83), temp);
frame->addView(timeLabel);
// amp window
ampWindow = new CAnimKnob(CRect(762, 31, 762 + knob->getWidth(), 31 + knob->getHeight() / 75), this, CSmartelectronixDisplay::kAmpWindow, 75, 33, knob, CPoint(0, 0));
ampWindow->setDefaultValue(0.5f);
ampWindow->setValue(effect->getParameter(CSmartelectronixDisplay::kAmpWindow));
frame->addView(ampWindow);
((CSmartelectronixDisplay*)effect)->getDisplay(CSmartelectronixDisplay::kAmpWindow, temp);
ampLabel = new CLabel(CRect(760, 72, 794, 83), temp);
frame->addView(ampLabel);
// trigger speed
triggerSpeed = new CAnimKnob(CRect(700, 134, 700 + knob->getWidth(), 134 + knob->getHeight() / 75), this, CSmartelectronixDisplay::kTriggerSpeed, 75, 33, knob, CPoint(0, 0));
triggerSpeed->setDefaultValue(0.5f);
triggerSpeed->setValue(effect->getParameter(CSmartelectronixDisplay::kTriggerSpeed));
frame->addView(triggerSpeed);
((CSmartelectronixDisplay*)effect)->getDisplay(CSmartelectronixDisplay::kTriggerSpeed, temp);
trigLabel = new CLabel(CRect(698, 175, 732, 186), temp);
frame->addView(trigLabel);
// trigger limit
triggerLimit = new CAnimKnob(CRect(765, 134, 765 + knob->getWidth(), 134 + knob->getHeight() / 75), this, CSmartelectronixDisplay::kTriggerLimit, 75, 33, knob, CPoint(0, 0));
triggerLimit->setDefaultValue(0.5f);
triggerLimit->setValue(effect->getParameter(CSmartelectronixDisplay::kTriggerLimit));
frame->addView(triggerLimit);
((CSmartelectronixDisplay*)effect)->getDisplay(CSmartelectronixDisplay::kTriggerLimit, temp);
threshLabel = new CLabel(CRect(765, 175, 799, 186), temp);
frame->addView(threshLabel);
knob->forget();
// trigger type
CBitmap* triggerBitmap = new CBitmap(IDB_BITMAPTRIGGER);
#if SIMPLE_VERSION
trigger = new CMultiStateButton(CRect(718, 94, 718 + triggerBitmap->getWidth(), 94 + triggerBitmap->getHeight() / 5), this, CSmartelectronixDisplay::kTriggerType, triggerBitmap, 4, triggerBitmap->getHeight() / 5);
#else
trigger = new CMultiStateButton(CRect(718, 94, 718 + triggerBitmap->getWidth(), 94 + triggerBitmap->getHeight() / 5), this, CSmartelectronixDisplay::kTriggerType, triggerBitmap, 5, triggerBitmap->getHeight() / 5);
#endif
trigger->setValue(effect->getParameter(CSmartelectronixDisplay::kTriggerType));
frame->addView(trigger);
triggerBitmap->forget();
CBitmap* onOff = new CBitmap(IDB_BITMAPONOFF);
CBitmap* channel = new CBitmap(IDB_BITMAPCHANNEL);
// sync redraw
syncDraw = new COnOffButton(CRect(696, 221, 696 + onOff->getWidth(), 221 + onOff->getHeight() / 2), this, CSmartelectronixDisplay::kSyncDraw, onOff);
syncDraw->setValue(effect->getParameter(CSmartelectronixDisplay::kSyncDraw));
frame->addView(syncDraw);
// dc
dc = new COnOffButton(CRect(690, 259, 690 + onOff->getWidth(), 259 + onOff->getHeight() / 2), this, CSmartelectronixDisplay::kDCKill, onOff);
dc->setValue(effect->getParameter(CSmartelectronixDisplay::kDCKill));
frame->addView(dc);
// freeze
freeze = new COnOffButton(CRect(754, 221, 754 + onOff->getWidth(), 221 + onOff->getHeight() / 2), this, CSmartelectronixDisplay::kFreeze, onOff);
freeze->setValue(effect->getParameter(CSmartelectronixDisplay::kFreeze));
frame->addView(freeze);
// channel
channelSelector = new COnOffButton(CRect(748, 259, 748 + onOff->getWidth(), 259 + onOff->getHeight() / 2), this, CSmartelectronixDisplay::kChannel, channel);
channelSelector->setValue(effect->getParameter(CSmartelectronixDisplay::kChannel));
frame->addView(channelSelector);
//.........这里部分代码省略.........