status_t TaskFS::Load(void) { status_t err = B_OK; BEntry *tmpEntry = new BEntry(); TaskList *newTaskList = NULL; Task *newTask = NULL; tasks->MakeEmpty(); taskLists->MakeEmpty(); while (tasksDir.GetNextEntry(tmpEntry, false) == B_OK) { if (tmpEntry->IsDirectory()){ newTaskList = DirectoryToList(tmpEntry); if (newTaskList != NULL){ BMessage *msg = new BMessage(); msg->AddPointer("tasklist",newTaskList); Looper()->SendNotices(ADD_TASK_LIST,msg); taskLists->AddItem(newTaskList); } } } while (tasksDir.GetNextEntry(tmpEntry, false) == B_OK) { if (tmpEntry->IsDirectory()){ newTaskList = DirectoryToList(tmpEntry); if (newTaskList != NULL){ BMessage *msg = new BMessage(); msg->AddPointer("tasklist",newTaskList); Looper()->SendNotices(ADD_TASK_LIST,msg); taskLists->AddItem(newTaskList); } } } tasksDir.Rewind(); return err; }
void LoginAlert::MessageReceived(BMessage *message) { switch (message->what) { case 'ALTB': { int32 which; if (message->FindInt32("which", &which) < B_OK) break; // not 'Ok' if (which != 1) break; BMessage *m = new BMessage(*message); m->what = 'nsLO'; m->AddPointer("URL", fUrl); m->AddString("Host", fHost.String()); m->AddString("Realm", fRealm.String()); m->AddPointer("callback", (void *)fCallback); m->AddPointer("callback_pw", (void *)fCallbackPw); m->AddString("User", fUserControl->Text()); m->AddString("Pass", fPassControl->Text()); BString auth(fUserControl->Text()); auth << ":" << fPassControl->Text(); m->AddString("Auth", auth.String()); // notify the main thread // the event dispatcher will handle it nsbeos_pipe_message(m, NULL, NULL); } break; default: break; } BAlert::MessageReceived(message); }
PropPointEditor::PropPointEditor(PObject *obj, PProperty *prop) : PropertyEditor(obj,prop), fXEditor(NULL), fYEditor(NULL), fMsgr(NULL) { fPropName = new BString(); SetResizingMode(B_FOLLOW_LEFT_RIGHT | B_FOLLOW_TOP); SetFlags(Flags() | B_FRAME_EVENTS); BString label("PointEditor"); BString text; if (GetProperty()) label = GetProperty()->GetName(); BMessage *editMsg = new BMessage(M_EDIT); if (obj && prop) { editMsg->AddPointer("object",obj); editMsg->AddPointer("property",prop); editMsg->AddInt64("objectid",obj->GetID()); editMsg->AddString("name",prop->GetName()); *fPropName = prop->GetName(); } fLabel = new BStringView(BRect(0,2,1,3),"label",label.String(),B_FOLLOW_LEFT_RIGHT | B_FOLLOW_TOP); fLabel->ResizeToPreferred(); fXEditor = new NumBox(Bounds(),"editor","X:","",editMsg, B_FOLLOW_LEFT | B_FOLLOW_TOP); fYEditor = new NumBox(Bounds(),"editor","Y:","",editMsg, B_FOLLOW_LEFT | B_FOLLOW_TOP); Update(); }
BPopUpMenu* AmTrackInfoView::NewPropertiesMenu() const { BPopUpMenu* menu = new BPopUpMenu( "properties menu" ); if( !menu ) return 0; BMenuItem* item; /* The Duplicate menu item. */ BMessage* msg = new BMessage( DUPLICATE_INFO_MSG ); if( msg && (item = new BMenuItem( "Duplicate", msg )) ) { msg->AddPointer( SZ_VIEW_ID, this ); msg->AddString( SZ_FACTORY_SIGNATURE, mFactorySignature.String() ); msg->AddString( SZ_FACTORY_VIEW_NAME, mViewName.String() ); menu->AddItem( item ); } /* The Change View menu item. */ if( (item = NewChangeViewItem()) ) menu->AddItem( item ); /* The Remove menu item. */ msg = new BMessage( REMOVE_INFO_MSG ); if( msg && (item = new BMenuItem( "Remove", msg )) ) { msg->AddPointer( SZ_VIEW_ID, this ); menu->AddItem( item ); } return menu; }
status_t Converter::CreateConnection(BMessage *container,TiXmlElement *start,TiXmlElement *end) { BMessage *connection = new BMessage(P_C_CONNECTION_TYPE); BMessage *data = new BMessage(); char *idFrom = (char*)start->Attribute("ID"); connection->AddPointer("Node::from",(void *)GetID(idFrom)); char *idTo; const char *value= end->Value(); int32 found = strcmp(end->Value(),"node"); if (found == 0) { idTo = (char*)end->Attribute("ID"); data->AddString("Name","Unnamed"); } else { idTo = (char*)end->Attribute("DESTINATION"); if (end->Attribute("TEXT")) data->AddString("Name",end->Attribute("TEXT")); else data->AddString("Name","Unnamed"); } connection->AddPointer("Node::to",(void *)GetID(idTo)); connection->AddMessage("Node::Data",data); container->AddMessage("nodes", connection); }
struct gui_download_window *gui_download_window_create(download_context *ctx, struct gui_window *parent) { struct gui_download_window *download = (struct gui_download_window*)malloc(sizeof *download); if (download == NULL) return NULL; download->storageLock = new BLocker("storage_lock"); download->storage = new BMallocIO(); download->ctx = ctx; download->window = new NSDownloadWindow(ctx); // Also ask the user where to save the file BMessage* msg = new BMessage(B_SAVE_REQUESTED); BFilePanel* panel = new BFilePanel(B_SAVE_PANEL, new BMessenger(download->window), NULL, 0, false); panel->SetSaveText(download_context_get_filename(ctx)); msg->AddPointer("source", panel); msg->AddPointer("dw", download); panel->SetMessage(msg); panel->Show(); return download; }
void FavView::_ShowPopUpMenu(BPoint screen) { if (fShowingPopUpMenu) return; ContextPopUp* menu = new ContextPopUp("PopUpMenu", this); FavItem *currentFav = dynamic_cast<FavItem *>(ItemAt(CurrentSelection())); BMessage* msg = NULL; msg = new BMessage(FAV_EDIT); msg->AddPointer("fav", currentFav); BMenuItem* item = new BMenuItem(B_TRANSLATE("Edit title"), msg); menu->AddItem(item); msg = new BMessage(FAV_DELETE); msg->AddPointer("fav", currentFav); item = new BMenuItem(B_TRANSLATE("Remove favorite"),msg); menu->AddItem(item); msg = new BMessage(PASTE_SPRUNGE); msg->AddPointer("fav", currentFav); item = new BMenuItem(B_TRANSLATE("Paste to Sprunge.us"), msg); menu->AddItem(item); menu->SetTargetForItems(Looper()); menu->Go(screen, true, true, true); fShowingPopUpMenu = true; }
PropStringEditor::PropStringEditor(PObject *obj, PProperty *prop) : PropertyEditor(obj,prop), fEditor(NULL), fMsgr(NULL) { fPropName = new BString(); SetResizingMode(B_FOLLOW_LEFT_RIGHT | B_FOLLOW_TOP); BString label("StringEditor"); BString text; if (GetProperty()) { label = GetProperty()->GetName(); text = GetProperty()->GetValueAsString(); } BMessage *editMsg = new BMessage(M_EDIT); if (obj && prop) { editMsg->AddPointer("object",obj); editMsg->AddPointer("property",prop); editMsg->AddInt64("objectid",obj->GetID()); editMsg->AddString("name",prop->GetName()); *fPropName = prop->GetName(); } fEditor = new AutoTextControl(Bounds(),"editor",label.String(),text.String(), editMsg, B_FOLLOW_LEFT_RIGHT | B_FOLLOW_TOP); }
void ClipView::_ShowPopUpMenu(BPoint screen) { if (fShowingPopUpMenu) return; ContextPopUp* menu = new ContextPopUp("PopUpMenu", this); ClipItem* currentClip = dynamic_cast<ClipItem *>(ItemAt(CurrentSelection())); BMessage* msg = NULL; msg = new BMessage(PASTE_SPRUNGE); msg->AddPointer("clip", currentClip); BMenuItem* item = new BMenuItem(B_TRANSLATE("Paste to Sprunge.us"), msg, 'P'); menu->AddItem(item); msg = new BMessage(FAV_ADD); msg->AddPointer("clip", currentClip); item = new BMenuItem(B_TRANSLATE("Add to favorites"), msg, 'A'); menu->AddItem(item); msg = new BMessage(DELETE); msg->AddPointer("clip", currentClip); item = new BMenuItem(B_TRANSLATE("Remove"), msg); menu->AddItem(item); menu->SetTargetForItems(Looper()); menu->Go(screen, true, true, true); fShowingPopUpMenu = true; }
// DisplayPopupMenu bool SplitManipulator::DisplayPopupMenu(BPoint where) { BPopUpMenu* menu = new BPopUpMenu("item popup", false, false); BMessage* message; BMenuItem* item; bool separator = false; if (fItem->HasVideo()) { message = new BMessage(MSG_SET_VIDEO_MUTED); message->AddPointer("item", fItem); item = new BMenuItem("Enabled Video", message); item->SetMarked(!fItem->IsVideoMuted()); menu->AddItem(item); separator = true; } if (fItem->HasAudio()) { message = new BMessage(MSG_SET_AUDIO_MUTED); message->AddPointer("item", fItem); item = new BMenuItem("Enabled Audio", message); item->SetMarked(!fItem->IsAudioMuted()); menu->AddItem(item); separator = true; } if (separator) menu->AddSeparatorItem(); BMenuItem* selectClipItem = NULL; if (ClipPlaylistItem* clipItem = dynamic_cast<ClipPlaylistItem*>(fItem)) { message = new BMessage(MSG_SELECT_AND_SHOW_CLIP); message->AddPointer("clip", clipItem->Clip()); selectClipItem = new BMenuItem("Select Clip", message); menu->AddItem(selectClipItem); } else separator = false; if (separator) menu->AddSeparatorItem(); message = new BMessage(MSG_REMOVE_ITEM); message->AddPointer("item", fItem); item = new BMenuItem("Remove Clip", message); menu->AddItem(item); menu->SetTargetForItems(fView); if (selectClipItem) selectClipItem->SetTarget(fView->Window()); show_popup_menu(menu, where, fView, false); return true; }
BMessage* Paste::Do(PDocument *doc, BMessage *settings) { BMessage *clip = NULL; BMessage *node = new BMessage(); BMessage *deIndexedNode = NULL; BMessage *connect = NULL; bool connectselect = false; BMessage *copyMessage = new BMessage; int32 messagelen = 0; int32 i = 0; Indexer *indexer = new Indexer(doc); if (be_clipboard->Lock()) { if (clip = be_clipboard->Data()) { // clip->FindData("application/x-vnd.projectconceptor-document", B_MIME_TYPE, (const void **)©Message, &messagelen); clip->FindMessage("test",copyMessage); copyMessage->PrintToStream(); } be_clipboard->Unlock(); } if (copyMessage) { BMessage *inserter = new BMessage(P_C_EXECUTE_COMMAND); BMessage *select = new BMessage(P_C_EXECUTE_COMMAND); inserter->AddString("Command::Name","Insert"); select->AddString("Command::Name","Select"); while (copyMessage->FindMessage("node",i,node) == B_OK) { if (node->what == P_C_CONNECTION_TYPE) deIndexedNode = indexer->DeIndexConnection(node); else { deIndexedNode = indexer->RegisterDeIndexNode(node); //only select nodes.. because es the copy and paste funktion with selected nodes dosent work proper select->AddPointer("node",deIndexedNode); } inserter->AddPointer("node",deIndexedNode); i++; node = new BMessage(); } i=0; while (inserter->FindPointer("node",i,(void **)&node) == B_OK) { if (node->what != P_C_CONNECTION_TYPE) indexer->DeIndexNode(node); i++; } inserter->AddMessage("PCommand::subPCommand",select); PRINT_OBJECT(*inserter); (new BMessenger(NULL,doc))->SendMessage(inserter); } return settings; }
/*********************************************************** * AddPerson ***********************************************************/ void HAddressView::AddPerson(BMenu *menu ,const char* title ,const char* group ,BMessage *msg , char shortcut , uint32 modifiers) { BMenu *subMenu(NULL); HApp *app = (HApp*)be_app; MenuUtils utils; if(::strlen(group) > 0) { // Find group item int32 count = menu->CountItems(); for(int32 i = 0;i < count;i++) { BMenuItem *tmpMenu = menu->ItemAt(i); if(tmpMenu && tmpMenu->Submenu()) { if(::strcmp(tmpMenu->Label(),group) == 0) { subMenu = tmpMenu->Submenu(); break; } } } // Add group item if(!subMenu) { subMenu = new BMenu(group); BMessage *message = new BMessage(M_SEL_GROUP); message->AddString("group",group); BTextControl *control; msg->FindPointer("pointer",(void**)&control); message->AddPointer("control",control); message->AddPointer("menu",subMenu); BFont font(be_plain_font); font.SetSize(10); subMenu->SetFont(&font); IconMenuItem *iconItem = new IconMenuItem(subMenu,message,0,0 ,app->GetIcon("OpenFolder"),false); iconItem->SetTarget(this,Window()); menu->AddItem(iconItem); } // Add item utils.AddMenuItem(subMenu,title,msg,this,Window(),shortcut,modifiers ,app->GetIcon("Person"),false); }else utils.AddMenuItem(menu,title,msg,this,Window(),shortcut,modifiers ,app->GetIcon("Person"),false); }
void PrepareToShow(BLooper* parentLooper, BHandler* targetHandler, Settings* settings, OptionsSetting* setting) { BMessage* message = new BMessage( MSG_SETTINGS_MENU_IMPL_OPTION_ITEM_SELECTED); if (message == NULL) return; message->AddPointer("setting", static_cast<Setting*>(setting)); message->AddPointer("option", fOption); SetMessage(message); SetTarget(targetHandler); }
void jView::Draw(BRect update) { DBG(AWT_EVT, printf( "jView::Draw(" )); DBG(AWT_EVT, update.PrintToStream()); DBG(AWT_EVT, printf( "\n" )); #if 0 DBG(AWT_EVT, printf("Draw\n")); // !!! NOT THE BEST PLACE, // it would be better to intercept events before they are dispatched to the handlers // (see event_hook) BMessage * msg = new BMessage(); msg->what = UPDATE_EVENT; /* custom update event */ msg->AddPointer(sourceTag, Window()); msg->AddRect("frame", Frame()); /* update the entire frame */ bigtime_t t = system_time(); msg->AddInt64("when", t); update.PrintToStream(); javaApp->AddMessage( msg ); #endif }
S9xRefreshWindow::S9xRefreshWindow(BRect rect, BWindow *parent, uint32 closemsg) : BWindow(rect, "FullScreen - Refresh Rate", B_FLOATING_WINDOW, B_NOT_ZOOMABLE | B_NOT_RESIZABLE), fWindow(parent), fS9xMsg(closemsg) { display_mode *modes; uint32 mode_count; if(BScreen().GetModeList(&modes, &mode_count) == B_NO_ERROR) { BMenu *menu = new BMenu("menu"); for(unsigned int i = 0; i < mode_count; i++) { // if((modes[i].virtual_width == 640) && (modes[i].space == B_RGB16)) { BMessage *msg = new BMessage(ID_REFRESH); msg->AddPointer("refr_rate", (void *)&modes[i]); BString item_name; item_name << (modes[i].timing.pixel_clock * 1000) / (modes[i].timing.h_total * modes[i].timing.v_total) << " Hz"; menu->AddItem(new BMenuItem(item_name.String(), msg)); // } } BRect r(20, 20, 200, 60); BMenuField *field = new BMenuField(r, "field", "Refresh Rate:", menu); AddChild(field); menu->SetLabelFromMarked(true); menu->ItemAt(0)->SetMarked(true); menu->SetTargetForItems(fWindow); } Show(); }
bool TMuseumClipboard::AddItem( BMessage *theItem ) { if ( Lock() ) { // Clear clipboard data Clear(); // Get pointer to clipboard data BMessage *clipData = Data(); // Determine type of data being placed on clipboard switch( theItem->what) { case CUE_LIST_MSG: { clipData->AddPointer("CueList", theItem); } break; default: break; } // Inform clipboard to save data Commit(); Unlock(); } return true; }
/*! \brief Send the invocation message. */ status_t CalendarControl::Invoke( BMessage* in ) { BMessage* toSend = NULL, *tempMessage = in; if ( tempMessage == NULL ) { tempMessage = this->Message(); if ( !tempMessage ) { tempMessage = new BMessage( kCalendarControlInvoked ); if ( !tempMessage ) { return B_BAD_VALUE; } } } toSend = new BMessage( tempMessage->what ); if ( !toSend ) { return B_NO_MEMORY; } toSend->AddInt64( "when", system_time() ); toSend->AddPointer( "source", this ); toSend->AddInt32( "Day", ( int32 )fRepresentedTime.tm_mday ); toSend->AddInt32( "Month", ( int32 )fRepresentedTime.tm_mon ); toSend->AddInt32( "Year", ( int32 )fRepresentedTime.tm_year ); toSend->AddString( "Calendar Module", fRepresentedTime.GetCalendarModule() ); status_t toReturn = BControl::Invoke( toSend ); delete toSend; return toReturn; } // <-- end of function CalendarControl::Invoke
BMessage* Resize::Do(PDocument *doc, BMessage *settings) { BMessage *undoMessage = new BMessage(); BList *selected = doc->GetSelected(); BList *changed = doc->GetChangedNodes(); float dx,dy; BRect *newFrame = new BRect(0,0,100,100); BRect *oldFrame = new BRect(0,0,100,100); BMessage *node = new BMessage(); int32 i = 0; if ( (settings->FindFloat("dx",&dx)==B_OK) && (settings->FindFloat("dy",&dy)==B_OK) ) { for (i=0;i<selected->CountItems();i++) { node=(BMessage *)selected->ItemAt(i); node->FindRect("Node::frame",oldFrame); undoMessage->AddRect("oldFrame",*oldFrame); undoMessage->AddPointer("node",node); *newFrame = *oldFrame; newFrame->right += dx; newFrame->bottom += dy; if ( (newFrame->IsValid()) && (newFrame->Width()>20) && ((newFrame->Height()>20)) ) { node->ReplaceRect("Node::frame",*newFrame); changed->AddItem(node); } } } doc->SetModified(); settings->RemoveName("Resize::Undo"); settings->AddMessage("Resize::Undo",undoMessage); settings= PCommand::Do(doc,settings); return settings; }
bool ChatWindow::QuitRequested() { BMessage *mesg = new BMessage( CLOSE_MESSAGE ); mesg->AddPointer( "win", this ); BMessenger( iNetwork ).SendMessage( mesg ); delete mesg; return false; }
void TMIDICue::ShowPanel() { TCueView::ShowPanel(); // Create messenger to send panel messages to our channel. We cannot send it to // ourself as we are not part of the view heirarchy. BMessenger* messenger = new BMessenger( fChannel, ((MuseumApp*)be_app)->GetCueSheet()); // Create message containing pointer to ourself BMessage* message = new BMessage(); message->AddPointer("TheCue", this); // Construct a file panel and set it to modal fPanel = new BFilePanel( B_OPEN_PANEL, messenger, NULL, B_FILE_NODE, false, message, NULL, true, true ); // Set it to application's home directory app_info appInfo; be_app->GetAppInfo(&appInfo); BEntry entry(&appInfo.ref); BDirectory parentDir; entry.GetParent(&parentDir); fPanel->SetPanelDirectory(&parentDir); // Center Panel CenterWindow(fPanel->Window()); fPanel->Show(); // Clean up delete messenger; delete message; }
BMenuItem* AmTrackInfoView::NewChangeViewItem() const { AmViewFactory* factory = AmGlobals().FactoryNamed(mFactorySignature); if (!factory) return NULL; BMenu* menu = new BMenu(AM_INFO_CHANGE_VIEW_STR); if (!menu) return NULL; BMenuItem* item; BString name; for (uint32 k = 0; factory->DataNameAt(k, mViewType, name) == B_OK; k++) { BMessage* msg = new BMessage(CHANGE_INFO_MSG); if( msg && (item = new BMenuItem( name.String(), msg )) ) { msg->AddPointer(SZ_VIEW_ID, this); msg->AddString(SZ_FACTORY_SIGNATURE, mFactorySignature.String() ); msg->AddString(SZ_FACTORY_VIEW_NAME, name.String() ); item->SetTarget(this); menu->AddItem(item); if (name == mViewName) item->SetEnabled(false); } name = (const char*)NULL; } item = new BMenuItem(menu); if( !item ) { delete menu; return NULL; } menu->SetFontSize( Prefs().Size(FONT_Y) ); menu->SetFont( be_plain_font ); return item; }
void NavigatorEditor::InsertNewList(BListView *source) { TRACE(); int32 selection = -1; BaseListItem *item = NULL; selection = source->CurrentSelection(0); if (selection>=0) { item =(BaseListItem *) source->ItemAt(selection); //vorher alle überfüssigen Views löschen BView *sibling=source->Parent()->NextSibling(); while (sibling != NULL) { RemoveChild(sibling); sibling=source->Parent()->NextSibling(); } if (item->GetSupportedType() == P_C_CLASS_TYPE) { BRect listrect = Bounds(); listrect.left = source->Parent()->Frame().right+5; listrect.right = listrect.left +400; if (listrect.right > Bounds().right) { ResizeTo(listrect.right+B_V_SCROLL_BAR_WIDTH+5,Bounds().bottom); } BListView *list = new MessageListView(doc,listrect,((NodeItem *)item)->GetNode()); BMessage *invoked = new BMessage(N_A_INVOKATION); invoked->AddPointer("ListView",list); list->SetInvocationMessage(invoked); list->SetTarget(this); AddChild(new BScrollView("root",list,B_FOLLOW_LEFT | B_FOLLOW_TOP_BOTTOM,0,false,true)); } Invalidate(); } }
BMenuItem* FaberEffect::BuildItem() { BMessage* mess = CommandBuilder(FABER_EFFECT_CALL); mess->AddPointer("faber:effect_pointer", this); return new BMenuItem(Name(), mess, 0, 0); }
status_t PDocument::Archive(BMessage* archive, bool deep) const { TRACE(); BLooper::Archive(archive, deep); Indexer *indexer = new Indexer((PDocument *)this); int32 i = 0; BMessage *commandManage = new BMessage(); BMessage *tmpNode = NULL; BMessage *allNodesMessage = new BMessage(); BMessage *allConnectionsMessage = new BMessage(); BMessage *selectedMessage = new BMessage(); archive->AddMessage("PDocument::documentSetting",documentSetting); //save all Nodes for (i=0; i<allNodes->CountItems();i++) { tmpNode=(BMessage *)allNodes->ItemAt(i); allNodesMessage->AddMessage("node",indexer->IndexNode(tmpNode)); } archive->AddMessage("PDocument::allNodes",allNodesMessage); //save all Connections for (i=0; i<allConnections->CountItems();i++) { tmpNode=(BMessage *)allConnections->ItemAt(i); allConnectionsMessage->AddMessage("node",indexer->IndexConnection(tmpNode)); } archive->AddMessage("PDocument::allConnections",allConnectionsMessage); //save the selected List for (i=0; i<selected->CountItems();i++) { selectedMessage->AddPointer("node",selected->ItemAt(i)); } archive->AddMessage("PDocument::selected",selectedMessage); //save all Command related Stuff like Undo/Makor // commandManager->Archive(commandManage); for (i=0;i<(commandManager->GetUndoList())->CountItems();i++) { commandManage->AddMessage("undo",indexer->IndexMacroCommand((BMessage *)(commandManager->GetUndoList())->ItemAt(i))); } for (i=0;i<(commandManager->GetMacroList())->CountItems();i++) { commandManage->AddMessage("macro",(BMessage *)(commandManager->GetMacroList())->ItemAt(i)); } commandManage->AddInt32("undoStatus",commandManager->GetUndoIndex()); archive->AddMessage("PDocument::commandManager", commandManage); delete indexer; delete commandManage; //delete tmpNode; delete allNodesMessage; delete allConnectionsMessage; delete selectedMessage; return B_OK; }
status_t _AmFilterEntry::AddTo(BMessage& msg) const { ArpASSERT(mId); if (!mId) return B_ERROR; msg.AddPointer("pipeline_id", mId); for (int32 k = 0; k < _NUM_PIPELINE; k++) if (mTypes[k]) msg.AddInt32("pipeline_type", k); return B_OK; }
SHNodeSpec shAcceptLinkPolicy :: GetListeningLocation() { BMessage pwdMsg; pwdMsg.AddString("password", _password); pwdMsg.AddPointer(SH_NAME_LINKOPID, _link); return(SHNodeSpec("<shAcceptLinkPolicy>", "", 0, pwdMsg)); }
void DeviceDiscovered(RemoteDevice* btDevice, DeviceClass cod) { BMessage* message = new BMessage(kMsgAddListDevice); message->AddPointer("remoteItem", new DeviceListItem(btDevice)); fInquiryPanel->PostMessage(message); }
void CheckBoxElement::AttachedToWindow() { //Set the Message and Target BMessage *message = new BMessage(CHECKBOX_ELEMENT_MESSAGE); message->AddPointer("element",this); SetMessage(message); SetTarget((BHandler *)parentView); BCheckBox::AttachedToWindow(); }
void ButtonElement::AttachedToWindow() { //Set the Message and Target BMessage *message = new BMessage(BUTTON_ELEMENT_MESSAGE); message->AddPointer("element",this); SetMessage(message); SetTarget((BHandler *)parentView); BButton::AttachedToWindow(); }
void PropEnumEditor::HandleEdit(int32 value) { PObject *obj = GetObject(); PProperty *prop = obj->FindProperty(fPropName->String()); obj->SetIntProperty(fPropName->String(),value); BMessage *editMsg = new BMessage(M_PROPERTY_EDITED); if (obj && prop) { editMsg->AddPointer("object",obj); editMsg->AddPointer("property",prop); editMsg->AddInt64("objectid",obj->GetID()); editMsg->AddString("name",prop->GetName()); *fPropName = prop->GetName(); } fMsgr->SendMessage(editMsg); }