// ------------------------------------------------------------------- void DRRegrView::MessageReceived(BMessage* theMesg) { BMessage* dispMesg; int16 itemChecked; BMenu* theMenu; switch (theMesg->what) { case apply_change : dispMesg = new BMessage(set_display); dispMesg->AddInt64(disp_set_name,mKey); dispMesg->AddInt16(disp_mark_name,mPlotMark->PlotMark()); dispMesg->AddInt32(mark_col_name,mColorCtrl->Value()); theMenu = mLineSelect->Menu(); itemChecked = theMenu->IndexOf(theMenu->FindMarked()); dispMesg->AddInt16(disp_line_name,itemChecked); be_app->PostMessage(dispMesg); delete dispMesg; break; default : BView::MessageReceived(theMesg); } }
GDWindow::GDWindow(BRect frame) : BWindow(frame, "GrafDemo 4.6", B_DOCUMENT_WINDOW,0) { Lock(); // Add the graph to the window BRect grafRect = Bounds(); grafRect.top += mb_height + 2; mGraphView= new GDView(grafRect); AddChild(mGraphView); SetSizeLimits(frame.right - frame.left,9999,frame.bottom - frame.top,9999); // Add the main menu bar and menus BRect menuRect(0,0,1000,mb_height); BMenuBar* menuBar = new BMenuBar(menuRect,"MB"); BMenu* fileMenu = new BMenu("File"); BMenuItem* aboutItem = new BMenuItem("About...",new BMessage(B_ABOUT_REQUESTED)); aboutItem->SetTarget(be_app); fileMenu->AddItem(aboutItem); fileMenu->AddSeparatorItem(); fileMenu->AddItem(new BMenuItem("Quit",new BMessage(B_QUIT_REQUESTED))); menuBar->AddItem(fileMenu); BMenu* editMenu = new BMenu("Edit"); editMenu->AddItem(new BMenuItem("Erase",new BMessage(G_erase_data))); editMenu->AddItem(new BMenuItem("Reset Axes",new BMessage(G_reset_axes))); editMenu->SetTargetForItems(mGraphView); menuBar->AddItem(editMenu); BMenu* paramsMenu = new BMenu("Params"); BMessage* cFitMesg = new BMessage(G_set_params); cFitMesg->AddInt16(pName,0); BMessage* p2Mesg = new BMessage(G_set_params); p2Mesg->AddInt16(pName,2); BMessage* p3Mesg = new BMessage(G_set_params); p3Mesg->AddInt16(pName,3); BMessage* p4Mesg = new BMessage(G_set_params); p4Mesg->AddInt16(pName,4); paramsMenu->AddItem(new BMenuItem("Cubic Spline",cFitMesg)); paramsMenu->AddSeparatorItem(); paramsMenu->AddItem(new BMenuItem("1st Order",p2Mesg)); paramsMenu->AddItem(new BMenuItem("2nd Order",p3Mesg)); paramsMenu->AddItem(new BMenuItem("3rd Order",p4Mesg)); paramsMenu->SetRadioMode(true); paramsMenu->FindItem("2nd Order")->SetMarked(true); paramsMenu->SetTargetForItems(mGraphView); menuBar->AddItem(paramsMenu); BMenu* axisMenu = new BMenu("Axes"); axisMenu->AddItem(new BMenuItem("Set Axes"B_UTF8_ELLIPSIS,new BMessage(G_change_axis))); axisMenu->SetTargetForItems(mGraphView); menuBar->AddItem(axisMenu); AddChild(menuBar); Unlock(); }
void LocalDeviceImpl::ConnectionRequest(struct hci_ev_conn_request* event, BMessage* request) { size_t size; void* command; TRACE_BT("LocalDeviceImpl: Connection Incoming type %x from %s...\n", event->link_type, bdaddrUtils::ToString(event->bdaddr).String()); // TODO: add a possible request in the queue if (true) { // Check Preferences if we are to accept this connection // Keep ourselves as slave command = buildAcceptConnectionRequest(event->bdaddr, 0x01 , &size); BMessage* newrequest = new BMessage; newrequest->AddInt16("eventExpected", HCI_EVENT_CMD_STATUS); newrequest->AddInt16("opcodeExpected", PACK_OPCODE(OGF_LINK_CONTROL, OCF_ACCEPT_CONN_REQ)); newrequest->AddInt16("eventExpected", HCI_EVENT_CONN_COMPLETE); newrequest->AddInt16("eventExpected", HCI_EVENT_PIN_CODE_REQ); newrequest->AddInt16("eventExpected", HCI_EVENT_ROLE_CHANGE); newrequest->AddInt16("eventExpected", HCI_EVENT_LINK_KEY_NOTIFY); newrequest->AddInt16("eventExpected", HCI_EVENT_PAGE_SCAN_REP_MODE_CHANGE); #if 0 newrequest->AddInt16("eventExpected", HCI_EVENT_MAX_SLOT_CHANGE); newrequest->AddInt16("eventExpected", HCI_EVENT_DISCONNECTION_COMPLETE); #endif AddWantedEvent(newrequest); if ((fHCIDelegate)->IssueCommand(command, size) == B_ERROR) { TRACE_BT("LocalDeviceImpl: Command issued error for Accepting connection\n"); // remove the request? } else { TRACE_BT("LocalDeviceImpl: Command issued for Accepting connection\n"); } } }
void TProjectSettings::GetDialogSettings() { // Set cue sheet's TimeFormat based on user changes BMessage *message = new BMessage(TIMEFORMAT_CHANGED_MSG); short format = m_TimeFormat; message->AddInt16("TimeFormat", format); TCueSheetWindow *theWindow = static_cast<MuseumApp *>(be_app)->GetCueSheet(); TCueSheetView *theView = theWindow->GetCueSheetView(); theWindow->PostMessage( message, theView); delete message; // Set new start time // Now set duration. We can use this and ignore the end time because it has // already been verified as good at entry time }
status_t DefaultCatalog::Flatten(BDataIO *dataIO) { UpdateFingerprint(); // make sure we have the correct fingerprint before we flatten it status_t res; BMessage archive; int32 count = fCatMap.Size(); res = archive.AddString("class", "DefaultCatalog"); if (res == B_OK) res = archive.AddInt32("c:sz", count); if (res == B_OK) res = archive.AddInt16("c:ver", kCatArchiveVersion); if (res == B_OK) res = archive.AddString("c:lang", fLanguageName.String()); if (res == B_OK) res = archive.AddString("c:sig", fSignature.String()); if (res == B_OK) res = archive.AddInt32("c:fpr", fFingerprint); if (res == B_OK) res = archive.Flatten(dataIO); CatMap::Iterator iter = fCatMap.GetIterator(); CatMap::Entry entry; while (res == B_OK && iter.HasNext()) { entry = iter.Next(); archive.MakeEmpty(); res = archive.AddString("c:ostr", entry.key.fString.String()); if (res == B_OK) res = archive.AddString("c:ctxt", entry.key.fContext.String()); if (res == B_OK) res = archive.AddString("c:comt", entry.key.fComment.String()); if (res == B_OK) res = archive.AddInt32("c:hash", entry.key.fHashVal); if (res == B_OK) res = archive.AddString("c:tstr", entry.value.String()); if (res == B_OK) res = archive.Flatten(dataIO); } return res; }
void LocalDeviceImpl::ConnectionComplete(struct hci_ev_conn_complete* event, BMessage* request) { if (event->status == BT_OK) { uint8 cod[3] = {0, 0, 0}; // TODO: Review, this rDevice is leaked ConnectionIncoming* iConnection = new ConnectionIncoming( new RemoteDevice(event->bdaddr, cod)); iConnection->Show(); TRACE_BT("LocalDeviceImpl: %s: Address %s handle=%#x type=%d encrypt=%d\n", __FUNCTION__, bdaddrUtils::ToString(event->bdaddr).String(), event->handle, event->link_type, event->encrypt_mode); } else { TRACE_BT("LocalDeviceImpl: %s: failed with error %s\n", __FUNCTION__, BluetoothError(event->status)); } // it was expected if (request != NULL) { BMessage reply; reply.AddInt8("status", event->status); if (event->status == BT_OK) reply.AddInt16("handle", event->handle); printf("%s: Sending reply...\n", __func__); status_t status = request->SendReply(&reply); if (status < B_OK) printf("%s: Error sending reply!\n", __func__); // debug reply.PrintToStream(); // This request is not gonna be used anymore ClearWantedEvent(request); } }
status_t TouchpadPref::UpdateSettings() { if (!fConnected) return B_ERROR; LOG("UpdateSettings of device %s\n", fTouchPad->Name()); BMessage msg; msg.AddBool("scroll_twofinger", fSettings.scroll_twofinger); msg.AddBool("scroll_twofinger_horizontal", fSettings.scroll_twofinger_horizontal); msg.AddFloat("scroll_rightrange", fSettings.scroll_rightrange); msg.AddFloat("scroll_bottomrange", fSettings.scroll_bottomrange); msg.AddInt16("scroll_xstepsize", fSettings.scroll_xstepsize); msg.AddInt16("scroll_ystepsize", fSettings.scroll_ystepsize); msg.AddInt8("scroll_acceleration", fSettings.scroll_acceleration); msg.AddInt8("tapgesture_sensibility", fSettings.tapgesture_sensibility); return fTouchPad->Control(MS_SET_TOUCHPAD_SETTINGS, &msg); }
void MainWindow::SaveSettings(void) { BMessage settings; settings.AddBool("playsounds",gPlaySounds); settings.AddInt32("level",gDifficulty); settings.AddString("theme",gGameStyle->StyleName()); settings.AddInt16("begbest",gBestTimes[DIFFICULTY_BEGINNER].time); settings.AddInt16("intbest",gBestTimes[DIFFICULTY_INTERMEDIATE].time); settings.AddInt16("expbest",gBestTimes[DIFFICULTY_EXPERT].time); settings.AddString("begname",gBestTimes[DIFFICULTY_BEGINNER].name); settings.AddString("intame",gBestTimes[DIFFICULTY_INTERMEDIATE].name); settings.AddString("expname",gBestTimes[DIFFICULTY_EXPERT].name); settings.AddInt16("customwidth",gCustomWidth); settings.AddInt16("customheight",gCustomHeight); settings.AddInt16("customcount",gCustomMines); BFile file("/boot/home/config/settings/BeMines", B_READ_WRITE | B_ERASE_FILE | B_CREATE_FILE); if (file.InitCheck() != B_OK) return; settings.Flatten(&file); }
void DDApp::sendmessage(int32 apmessno) { if (apmessno == 0) // Operation Complete { editwindow->PostMessage(APP_DONE,editwindow); } if (apmessno == 1) // new current effect - tell editwindow { BMessage *msg = new BMessage(APP_CURRENT); // Tell EDIT which effect selected msg->AddInt32("aplisttype", aplisttype); msg->AddInt32("aplistnumber", aplistnumber); editwindow->PostMessage(msg,editwindow); delete msg; } if (apmessno == 2) // GO on ALLFX, new current effect { // send slider vals and mapped FX numbers to Effector BMessage *msg = new BMessage(APP_SETTINGS); msg->AddInt32("apfxtype", apfxtype); msg->AddInt32("apfxnumber", apfxnumber); msg->AddInt16("apslider1", apslider1); msg->AddInt16("apslider2", apslider2); msg->AddInt16("apslider3", apslider3); msg->AddInt16("apslider4", apslider4); msg->AddInt16("apslider", apslider); msg->AddInt16("apradio1", apradio1); msg->AddInt16("apradio2", apradio2); samplewindow->PostMessage(msg,samplewindow); delete (msg); } if (apmessno == 3) { if (aplisttype < 20) // If Effect ask ALLFX for FX settings { allfxwindow->PostMessage(APP_GETSETTINGS,allfxwindow); // request settings } else // not effect { if (((aplistnumber >= 1) && (aplistnumber <= 3)) && (aplisttype == 22)) // Load & Save { Domenuops(); } else { if (aplistnumber == 33) // is it a mono/stereo setting { apchanmode=aplistnumber; if (apslider1 == 3) // Mono { allfxwindow->PostMessage(APP_MONO,allfxwindow); } else // not Mono { allfxwindow->PostMessage(APP_STEREO,allfxwindow); } } BMessage *msg = new BMessage(APP_SETTINGS); msg->AddInt32("apfxtype", aplisttype); // > 20 don't need MAPPER msg->AddInt32("apfxnumber", aplistnumber); msg->AddInt16("apslider1", apslider1); msg->AddInt16("apslider2", 0); msg->AddInt16("apslider3", 0); msg->AddInt16("apslider4", 0); msg->AddInt16("apslider", 256); // just in case used in the future msg->AddInt16("apradio1", 0); msg->AddInt16("apradio2", 0); samplewindow->PostMessage(msg,samplewindow); delete (msg); } } } if (apmessno == 4) // Tell EDIT about ALLFX GO, which effect started { BMessage *msg = new BMessage(APP_FXGO); msg->AddInt32("aplisttype", aplisttype); msg->AddInt32("aplistnumber", aplistnumber); editwindow->PostMessage(msg,editwindow); delete msg; } if (apmessno == 5) // Tell EDIT a menu has been selected { if (aplistnumber == 0) { BMessage *msg = new BMessage(APP_FXGONONEW); // no change to current effect msg->AddInt32("aplisttype", aplisttype); msg->AddInt32("aplistnumber", aplistnumber); editwindow->PostMessage(msg,editwindow); delete msg; } else { BMessage *msg = new BMessage(APP_FXGO); msg->AddInt32("aplisttype", aplisttype); msg->AddInt32("aplistnumber", aplistnumber); editwindow->PostMessage(msg,editwindow); delete msg; } } if (apmessno == 6) // Update Drawbar on EDIT { BMessage *msg = new BMessage(APP_DRAWBAR); msg->AddInt16("apbar1", apslider1); msg->AddInt16("apbar2", apslider2); msg->AddInt16("apbar3", apslider3); msg->AddInt16("apbar4", apslider4); msg->AddInt16("apbar5", apslider); msg->AddInt16("apbar6", apradio1); editwindow->PostMessage(msg,editwindow); delete (msg); } if (apmessno == 7) // Send new display vals to EDIT { BMessage *msg = new BMessage(SAM_RNGVALS); msg->AddInt32("apcusr", apcusr); msg->AddInt32("aprange", aprange); msg->AddInt32("apzone", apzone); editwindow->PostMessage(msg,editwindow); delete (msg); } if (apmessno == 8) // Draw Attractor { if (attractwin == 1) { BMessage *msg = new BMessage(APP_DRAWATTRACT); msg->AddPointer("appoint", appoint); msg->AddInt32("aphalfmemsize", aphalfmemsize); msg->AddInt32("aprngstrval", attrngstr); msg->AddInt32("aprnglenval", aprange); msg->AddInt32("apmakechans", apchanmode); attractorwindow->PostMessage(msg,attractorwindow); delete (msg); } } if (apmessno == 9) // Send Load/Save Data { BMessage *msg = new BMessage(APP_LOADDATA); // set to SAVE AS msg->AddPointer("appoint", appoint); msg->AddInt32("chanmode", apchanmode); msg->AddInt32("halfmemsize", aphalfmemsize); msg->AddInt32("samstart", apsamstart); msg->AddInt32("samend", apsamend); msg->AddInt32("samlen", apsamlen); loadwindow->PostMessage(msg,loadwindow); delete (msg); } if (apmessno == 10) // Send Individual Effects Windows Data { if (apiewtyp == 0) // 0=EQ7 { BMessage *msg = new BMessage(IAP_NEWVAL); msg->AddInt32("listtype", aplisttype); msg->AddInt32("listnumber", aplistnumber); msg->AddInt32("fxtype", apfxtype); msg->AddInt32("fxnumber", apfxnumber); msg->AddInt16("eqmsgtyp", apiewmsgtyp); msg->AddInt16("eqtyp", apiewtyp); eq7window->PostMessage(msg,eq7window); delete (msg); } if (apiewtyp == 1) // 1=EQ20 { BMessage *msg = new BMessage(IAP_NEWVAL); msg->AddInt32("listtype", aplisttype); msg->AddInt32("listnumber", aplistnumber); msg->AddInt32("fxtype", apfxtype); msg->AddInt32("fxnumber", apfxnumber); msg->AddInt16("eqmsgtyp", apiewmsgtyp); msg->AddInt16("eqtyp", apiewtyp); eq20window->PostMessage(msg,eq20window); delete (msg); } BMessage *msg = new BMessage(APP_CURRENT); // Tell EDIT new current effect msg->AddInt32("aplisttype", aplisttype); msg->AddInt32("aplistnumber", aplistnumber); editwindow->PostMessage(msg,editwindow); delete (msg); if (apiewmsgtyp == 0) // update ALLFX window with setting change { BMessage *msg = new BMessage(IAP_NEWVAL); msg->AddInt32("listtype", aplisttype); msg->AddInt32("listnumber", aplistnumber); msg->AddInt32("fxtype", apfxtype); msg->AddInt32("fxnumber", apfxnumber); msg->AddInt16("eqmsgtyp", 0); msg->AddInt16("iewtyp", apiewtyp); // 0=EQ7 1=EQ20 msg->AddInt16("eq0lev", tmp0); msg->AddInt16("eq1lev", tmp1); msg->AddInt16("eq2lev", tmp2); msg->AddInt16("eq3lev", tmp3); msg->AddInt16("eq4lev", tmp4); msg->AddInt16("eq5lev", tmp5); msg->AddInt16("eq6lev", tmp6); msg->AddInt16("eq7lev", tmp7); msg->AddInt16("eq8lev", tmp8); msg->AddInt16("eq9lev", tmp9); msg->AddInt16("eq10lev", tmp10); msg->AddInt16("eq11lev", tmp11); msg->AddInt16("eq12lev", tmp12); msg->AddInt16("eq13lev", tmp13); msg->AddInt16("eq14lev", tmp14); msg->AddInt16("eq15lev", tmp15); msg->AddInt16("eq16lev", tmp16); msg->AddInt16("eq17lev", tmp17); msg->AddInt16("eq18lev", tmp18); msg->AddInt16("eq19lev", tmp19); msg->AddInt16("eq20lev", tmp20); allfxwindow->PostMessage(msg,allfxwindow); delete (msg); } } if (apmessno == 11) // Send Individual Effects Windows settings { BMessage *msg = new BMessage(IAP_SET); msg->AddInt32("listtype", aplisttype); msg->AddInt32("listnumber", aplistnumber); msg->AddInt32("fxtype", apfxtype); msg->AddInt32("fxnumber", apfxnumber); msg->AddInt16("eqmsgtyp", 0); msg->AddInt16("iewtyp", apiewtyp); // 0=EQ7 1=EQ20 msg->AddInt16("eq0lev", tmp0); msg->AddInt16("eq1lev", tmp1); msg->AddInt16("eq2lev", tmp2); msg->AddInt16("eq3lev", tmp3); msg->AddInt16("eq4lev", tmp4); msg->AddInt16("eq5lev", tmp5); msg->AddInt16("eq6lev", tmp6); msg->AddInt16("eq7lev", tmp7); msg->AddInt16("eq8lev", tmp8); msg->AddInt16("eq9lev", tmp9); msg->AddInt16("eq10lev", tmp10); msg->AddInt16("eq11lev", tmp11); msg->AddInt16("eq12lev", tmp12); msg->AddInt16("eq13lev", tmp13); msg->AddInt16("eq14lev", tmp14); msg->AddInt16("eq15lev", tmp15); msg->AddInt16("eq16lev", tmp16); msg->AddInt16("eq17lev", tmp17); msg->AddInt16("eq18lev", tmp18); msg->AddInt16("eq19lev", tmp19); msg->AddInt16("eq20lev", tmp20); if (apiewtyp == 0) eq7window->PostMessage(msg,eq7window); // EQ7 if (apiewtyp == 1) eq20window->PostMessage(msg,eq20window); // EQ20 delete (msg); } if (apmessno == 12) // Send Individual Effects Windows settings { BMessage *msg = new BMessage(IAPGO_SET); msg->AddInt32("listtype", aplisttype); msg->AddInt32("listnumber", aplistnumber); msg->AddInt32("fxtype", apfxtype); msg->AddInt32("fxnumber", apfxnumber); msg->AddInt16("eqmsgtyp", 0); msg->AddInt16("iewtyp", apiewtyp); // 0=EQ7 1=EQ20 msg->AddInt16("eq0lev", tmp0); msg->AddInt16("eq1lev", tmp1); msg->AddInt16("eq2lev", tmp2); msg->AddInt16("eq3lev", tmp3); msg->AddInt16("eq4lev", tmp4); msg->AddInt16("eq5lev", tmp5); msg->AddInt16("eq6lev", tmp6); msg->AddInt16("eq7lev", tmp7); msg->AddInt16("eq8lev", tmp8); msg->AddInt16("eq9lev", tmp9); msg->AddInt16("eq10lev", tmp10); msg->AddInt16("eq11lev", tmp11); msg->AddInt16("eq12lev", tmp12); msg->AddInt16("eq13lev", tmp13); msg->AddInt16("eq14lev", tmp14); msg->AddInt16("eq15lev", tmp15); msg->AddInt16("eq16lev", tmp16); msg->AddInt16("eq17lev", tmp17); msg->AddInt16("eq18lev", tmp18); msg->AddInt16("eq19lev", tmp19); msg->AddInt16("eq20lev", tmp20); samplewindow->PostMessage(msg,samplewindow); delete (msg); } }
void DDApp::MessageReceived(BMessage* msg) { int32 attup; int32 apmemmemsize; int32 listtemp; // msg->PrintToStream(); // BApplication::MessageReceived(msg); switch(msg->what) { case MEM_FETCH: // Memory window is asking to allocate this much RAM msg->FindInt32("memmemsize", &apmemmemsize); Setupmemory(apmemmemsize); break; case SAM_QUIT: OpenQuitWindow(); break; case FXR_DONE: // Operation complete sendmessage(0); sendmessage(8); break; case SAM_RNGVALS: // Update main values msg->FindInt32("samrng1", &apcusr); msg->FindInt32("samrng2", &aprange); msg->FindInt32("samrngsel", &apzone); msg->FindInt32("makechans", &tempchanmode); msg->FindInt32("samstart", &iapsamstart); apsamstart=iapsamstart; if (tempzone != -10) apzone=tempzone; if (tempchanmode != -10) apchanmode=tempchanmode; apsamlen=aprange; apsamend=apsamstart+apsamlen; sendmessage(7); // Now send to EDIT break; case SAM_GOMENU: // Menu selected msg->FindInt32("samlisttype", &aplisttype); msg->FindInt32("samlistnumber", &aplistnumber); Domenuops(); break; case FXR_DRAWBAR: // Update Drawbar on Edit Window msg->FindInt16("apbar1", &apslider1); msg->FindInt16("apbar2", &apslider2); msg->FindInt16("apbar3", &apslider3); msg->FindInt16("apbar4", &apslider4); msg->FindInt16("apbar5", &apslider); msg->FindInt16("apbar6", &apradio1); sendmessage(6); break; case APP_DRAWATTRACT: // Draw Attractor msg->FindInt32("rng", &attrngstr); msg->FindInt32("updateattract", &attup); if (attup == 1) sendmessage(8); break; case ATT_CLOSED: // Attractor is closed attractwin=0; break; case ALLFX_SETTINGS: // ALLFX SETTINGS msg->FindInt32("listtype", &aplisttype); msg->FindInt32("listnumber", &aplistnumber); msg->FindInt32("fxtype", &apfxtype); msg->FindInt32("fxnumber", &apfxnumber); msg->FindInt16("slider1", &apslider1); msg->FindInt16("slider2", &apslider2); msg->FindInt16("slider3", &apslider3); msg->FindInt16("slider4", &apslider4); msg->FindInt16("slider", &apslider); msg->FindInt16("radio1", &apradio1); msg->FindInt16("radio2", &apradio2); sendmessage(2); break; case ALLFX_FXCURRENT: // New Current Effect msg->FindInt32("listtype", &aplisttype); msg->FindInt32("listnumber", &aplistnumber); if ((aplisttype == 1) && (aplistnumber <= 1)) { if (aplistnumber == 0) // open EQ7 { if (eq7win == 0) { eq7window = new EQ7(); // 7 Band EQ eq7win = 1; } apiewmsgtyp = 3; // request settings from allfx apiewtyp = 0; } if (aplistnumber == 1) // open EQ20 { if (eq20win == 0) { eq20window = new EQ20(); // 7 Band EQ eq20win = 1; } apiewmsgtyp = 3; // request settings from allfx apiewtyp = 1; } BMessage *msg = new BMessage(IAP_REQSET); // request settings for window msg->AddInt16("iewtyp", apiewtyp); allfxwindow->PostMessage(msg,allfxwindow); delete (msg); } sendmessage(1); break; case ALLFX_FXGO: // ALLFX 'GO' is pressed... msg->FindInt32("listtype", &aplisttype); msg->FindInt32("listnumber", &aplistnumber); if ((aplisttype == 1) && (aplistnumber <= 1)) { if (aplistnumber == 0) // EQ7 { apiewmsgtyp = 3; // request settings from allfx apiewtyp = 0; } if (aplistnumber == 1) // EQ20 { apiewmsgtyp = 3; // request settings from allfx apiewtyp = 1; } BMessage *msg = new BMessage(IAPGO_REQSET); // Go pressed request settings for effector msg->AddInt16("iewtyp", apiewtyp); allfxwindow->PostMessage(msg,allfxwindow); delete (msg); sendmessage(4); } else { sendmessage(4); sendmessage(3); } break; case EDIT_EDITGO: // EDIT GO pressed msg->FindInt32("edlisttype", &aplisttype); msg->FindInt32("edlistnumber", &aplistnumber); msg->FindInt16("edvalue", &apslider1); if ((aplisttype == 1) && (aplistnumber <= 1)) { if (aplistnumber == 0) // EQ7 { apiewmsgtyp = 3; // request settings from allfx apiewtyp = 0; } if (aplistnumber == 1) // EQ20 { apiewmsgtyp = 3; // request settings from allfx apiewtyp = 1; } BMessage *msg = new BMessage(IAPGO_REQSET); // Go pressed request settings for effector msg->AddInt16("iewtyp", apiewtyp); allfxwindow->PostMessage(msg,allfxwindow); delete (msg); //sendmessage(4); } else { sendmessage(3); // Get Settings //sendmessage(4); } break; case LOAD_REQUESTDATA: // Send data to LOAD sendmessage(9); break; case IW_CLOSED: // IEW closed msg->FindInt16("iewtyp", &apiewtyp); if (apiewtyp == 0) eq7win = 0; if (apiewtyp == 1) eq20win = 0; apiewtyp = 100; break; case IW_NEWVAL: // New Val in Individual Effects window msg->FindInt32("listtype", &aplisttype); msg->FindInt32("listnumber", &aplistnumber); msg->FindInt32("fxtype", &apfxtype); msg->FindInt32("fxnumber", &apfxnumber); msg->FindInt16("iewmsgtyp", &apiewmsgtyp); msg->FindInt16("iewtyp", &apiewtyp); msg->FindInt16("eq0lev", &tmp0); msg->FindInt16("eq1lev", &tmp1); msg->FindInt16("eq2lev", &tmp2); msg->FindInt16("eq3lev", &tmp3); msg->FindInt16("eq4lev", &tmp4); msg->FindInt16("eq5lev", &tmp5); msg->FindInt16("eq6lev", &tmp6); msg->FindInt16("eq7lev", &tmp7); msg->FindInt16("eq8lev", &tmp8); msg->FindInt16("eq9lev", &tmp9); msg->FindInt16("eq10lev", &tmp10); msg->FindInt16("eq11lev", &tmp11); msg->FindInt16("eq12lev", &tmp12); msg->FindInt16("eq13lev", &tmp13); msg->FindInt16("eq14lev", &tmp14); msg->FindInt16("eq15lev", &tmp15); msg->FindInt16("eq16lev", &tmp16); msg->FindInt16("eq17lev", &tmp17); msg->FindInt16("eq18lev", &tmp18); msg->FindInt16("eq19lev", &tmp19); msg->FindInt16("eq20lev", &tmp20); sendmessage(10); //sendmessage(1); // tell edit new current effect break; case IAL_SET: // Settings for Individual Effects Window msg->FindInt32("listtype", &aplisttype); msg->FindInt32("listnumber", &aplistnumber); msg->FindInt32("fxtype", &apfxtype); msg->FindInt32("fxnumber", &apfxnumber); msg->FindInt16("iewmsgtyp", &apiewmsgtyp); msg->FindInt16("iewtyp", &apiewtyp); msg->FindInt16("eq0lev", &tmp0); msg->FindInt16("eq1lev", &tmp1); msg->FindInt16("eq2lev", &tmp2); msg->FindInt16("eq3lev", &tmp3); msg->FindInt16("eq4lev", &tmp4); msg->FindInt16("eq5lev", &tmp5); msg->FindInt16("eq6lev", &tmp6); msg->FindInt16("eq7lev", &tmp7); msg->FindInt16("eq8lev", &tmp8); msg->FindInt16("eq9lev", &tmp9); msg->FindInt16("eq10lev", &tmp10); msg->FindInt16("eq11lev", &tmp11); msg->FindInt16("eq12lev", &tmp12); msg->FindInt16("eq13lev", &tmp13); msg->FindInt16("eq14lev", &tmp14); msg->FindInt16("eq15lev", &tmp15); msg->FindInt16("eq16lev", &tmp16); msg->FindInt16("eq17lev", &tmp17); msg->FindInt16("eq18lev", &tmp18); msg->FindInt16("eq19lev", &tmp19); msg->FindInt16("eq20lev", &tmp20); sendmessage(11); break; case IALGO_SET: // GO pressed Settings for Individual Effects Window msg->FindInt32("listtype", &aplisttype); msg->FindInt32("listnumber", &aplistnumber); msg->FindInt32("fxtype", &apfxtype); msg->FindInt32("fxnumber", &apfxnumber); msg->FindInt16("iewmsgtyp", &apiewmsgtyp); msg->FindInt16("iewtyp", &apiewtyp); msg->FindInt16("eq0lev", &tmp0); msg->FindInt16("eq1lev", &tmp1); msg->FindInt16("eq2lev", &tmp2); msg->FindInt16("eq3lev", &tmp3); msg->FindInt16("eq4lev", &tmp4); msg->FindInt16("eq5lev", &tmp5); msg->FindInt16("eq6lev", &tmp6); msg->FindInt16("eq7lev", &tmp7); msg->FindInt16("eq8lev", &tmp8); msg->FindInt16("eq9lev", &tmp9); msg->FindInt16("eq10lev", &tmp10); msg->FindInt16("eq11lev", &tmp11); msg->FindInt16("eq12lev", &tmp12); msg->FindInt16("eq13lev", &tmp13); msg->FindInt16("eq14lev", &tmp14); msg->FindInt16("eq15lev", &tmp15); msg->FindInt16("eq16lev", &tmp16); msg->FindInt16("eq17lev", &tmp17); msg->FindInt16("eq18lev", &tmp18); msg->FindInt16("eq19lev", &tmp19); msg->FindInt16("eq20lev", &tmp20); sendmessage(12); break; default: BApplication::MessageReceived(msg); break; } }