TeamContextualMenu::TeamContextualMenu() : BPopUpMenu("Team") { minimize_all = new BMenuItem("Minimize All The Team", new BMessage(DOCK_MINIMIZE_ALL)); bring_all_to_front = new BMenuItem("Bring All The Team To Front", new BMessage(DOCK_BRING_FRONT_ALL)); close = new BMenuItem("Close All This Team", new BMessage(DOCK_CLOSE_TEAM)); close_active = new BMenuItem("Close This Window (Experimental)", new BMessage(CLOSE_ACTIVE_WINDOW)); hide_all = new BMenuItem("Clean The Desktop", new BMessage(DOCK_CLEAN)); hide_all_except = new BMenuItem("Hide All Except", new BMessage(DOCK_CLEAN_EXCEPT)); //move_left = new BMenuItem("Move to Left", new BMessage(DOCK_MOVE_LEFT)); AddItem(hide_all); AddItem(hide_all_except); AddSeparatorItem(); AddItem(minimize_all); AddItem(bring_all_to_front); AddItem(close); AddItem(close_active); minimize_all->SetTarget(((XDockApplication*)be_app)->backWindow); bring_all_to_front->SetTarget(((XDockApplication*)be_app)->backWindow); close->SetTarget(((XDockApplication*)be_app)->backWindow); }
virtual void Entered() { _DeleteItems(); if (fDirectory != NULL) { void* cookie; if (fDirectory->Open(&cookie, O_RDONLY) == B_OK) { Node* node; while (fDirectory->GetNextNode(cookie, &node) == B_OK) { BlacklistMenuItem* item = _CreateItem(node); node->Release(); if (item == NULL) break; AddItem(item); item->UpdateBlacklisted(); } fDirectory->Close(cookie); } SortItems(&BlacklistMenuItem::Less); } if (CountItems() > 0) AddSeparatorItem(); AddItem(new(nothrow) MenuItem("Return to parent directory")); }
/** * sort toolbar. * * sorts toolbar items according to the corresponding main menu. * * @param * @return * @exception - * @see */ void CKADToolbar::SortToolbar(CKADMenu* pMenu) { // run over all toolbar items and inser them into lex tree CSBLLexTree<CKADToolbarItem> tItemTree; CKADToolbarItem* pToolbarItem; CKADMenuItem* pMenuItem; int iNumItems; // run over item list and insert them into the lex tree POSITION pos = m_tItemList.GetHeadPosition(); while(pos) { pToolbarItem = m_tItemList.GetAt(pos); if(pToolbarItem->m_iMainMenuItemNo >= 0) { pMenuItem = pMenu->GetMenuItemWithId(pToolbarItem->m_iMainMenuItemNo); ASSERT(pMenuItem); if(pMenuItem) { if(!pMenuItem->m_strOrderKey.IsEmpty()) { VERIFY(tItemTree.insertData(pMenuItem->m_strOrderKey, pToolbarItem)); } else { delete pToolbarItem; } } } m_tItemList.GetNext(pos); } // now delete item array and fill it sorted m_tItemList.RemoveAll(); CStringArray astrOrderKeys; CString strOrderKeyOld; CString strOrderKeyNew; tItemTree.getAllStringsFromSubstring("", astrOrderKeys); iNumItems = astrOrderKeys.GetSize(); for(int iItem = 0; iItem < iNumItems; ++iItem) { strOrderKeyNew = astrOrderKeys[iItem]; pToolbarItem = tItemTree.getData(strOrderKeyNew); if(!strOrderKeyNew.IsEmpty() && !strOrderKeyOld.IsEmpty()) { if(strOrderKeyNew[0] != strOrderKeyOld[0]) { AddSeparatorItem(); } } m_tItemList.AddTail(pToolbarItem); strOrderKeyOld = strOrderKeyNew; } }
void DockIconMenu::Construction(bool is_preferences){ if(is_preferences == false) { AddItem(modify_shortcut); AddItem(modify_icon); AddSeparatorItem(); AddItem(move_left); AddItem(move_right); AddSeparatorItem(); AddItem(remove); AddSeparatorItem(); AddItem(set_as_pref_icon); AddItem(set_as_trash_icon); } else { AddItem(add); AddItem(settings); AddSeparatorItem(); AddItem(move_left); AddItem(move_right); AddSeparatorItem(); AddItem(set_as_pref_icon); AddSeparatorItem(); AddItem(quit); add->SetTarget(((XDockApplication*)be_app)->backWindow); settings->SetTarget(((XDockApplication*)be_app)->backWindow); quit->SetTarget(((XDockApplication*)be_app)->backWindow); } }
void DockIconMenu::ConstructionTrash(bool is_trash){ if(is_trash == false) { AddItem(modify_shortcut); AddItem(modify_icon); AddSeparatorItem(); AddItem(move_left); AddItem(move_right); AddSeparatorItem(); AddItem(remove); AddSeparatorItem(); AddItem(set_as_pref_icon); AddItem(set_as_trash_icon); } else { AddItem(empty_trash); AddSeparatorItem(); AddItem(set_as_trash_icon); //empty_trash->SetTarget(((XDockApplication*)be_app)->backWindow); empty_trash->SetTarget(((XDockApplication*)be_app)->backWindow); } }
void show(const IntRect& rect, FrameView* view, int index) { // Clean out the menu first for (int32 i = CountItems() - 1; i >= 0; i--) delete RemoveItem(i); // Popuplate the menu from the client int itemCount = m_popupClient->listSize(); for (int i = 0; i < itemCount; i++) { if (m_popupClient->itemIsSeparator(i)) AddSeparatorItem(); else { // NOTE: WebCore distinguishes between "Group" and "Label" // here, but both types of item (radio or check mark) currently // look the same on Haiku. BString label(m_popupClient->itemText(i)); BMessage* message = new BMessage(kPopupResult); message->AddInt32("index", i); BMenuItem* item = new BMenuItem(label.String(), message); AddItem(item); item->SetTarget(BMessenger(&m_Handler)); item->SetEnabled(m_popupClient->itemIsEnabled(i)); item->SetMarked(i == index); } } // We need to force a layout now, or the item frames will not be // computed yet, so we cannot move the current item under the mouse. DoLayout(); // Account for frame of menu field BRect screenRect(view->contentsToScreen(rect)); screenRect.OffsetBy(2, 2); // Move currently selected item under the mouse. if (BMenuItem* item = ItemAt(index)) screenRect.OffsetBy(0, -item->Frame().top); BRect openRect = Bounds().OffsetToSelf(screenRect.LeftTop()); Go(screenRect.LeftTop(), true, true, openRect, true); }
WindowsMenu::WindowsMenu( int32 disabledWindow ) : BMenu("Windows") { BMenuItem *menuitem; menuitem = new BMenuItem("Pattern", new BMessage('Win0'), '0'); if (disabledWindow==0) menuitem->SetEnabled(false); AddItem(menuitem); menuitem = new BMenuItem("Song", new BMessage('Win1'), '1'); if (disabledWindow==1) menuitem->SetEnabled(false); AddItem(menuitem); menuitem = new BMenuItem("Drumset", new BMessage('Win2'), '2'); if (disabledWindow==2) menuitem->SetEnabled(false); AddItem(menuitem); SetTargetForItems(be_app); AddSeparatorItem(); AddItem(new BMenuItem( "Move all to this workspace", new BMessage('Work'))); }
void TWindowMenu::AttachedToWindow() { SetFont(be_plain_font); RemoveItems(0, CountItems(), true); int32 miniCount = 0; bool dragging = false; TBarView* barview =(static_cast<TBarApp*>(be_app))->BarView(); if (barview && barview->LockLooper()) { // 'dragging' mode set in BarView::CacheDragData // invoke in MouseEnter in ExpandoMenuBar dragging = barview->Dragging(); if (dragging) { // We don't want to show the menu when dragging, but it's not // possible to remove a submenu once it exists, so we simply hide it // Don't call BMenu::Hide(), it causes the menu to pop up every now // and then. Window()->Hide(); // if in expando (horizontal or vertical) if (barview->Expando()) { SetTrackingHook(barview->MenuTrackingHook, barview->GetTrackingHookData()); } barview->DragStart(); } barview->UnlockLooper(); } int32 parentMenuItems = 0; int32 numTeams = fTeam->CountItems(); for (int32 i = 0; i < numTeams; i++) { team_id theTeam = (team_id)fTeam->ItemAt(i); int32 count = 0; int32* tokens = get_token_list(theTeam, &count); for (int32 j = 0; j < count; j++) { client_window_info* wInfo = get_window_info(tokens[j]); if (wInfo == NULL) continue; if (WindowShouldBeListed(wInfo->feel) && (wInfo->show_hide_level <= 0 || wInfo->is_mini)) { // Don't add new items if we're expanded. We've already done // this, they've just been moved. int32 numItems = CountItems(); int32 addIndex = 0; for (; addIndex < numItems; addIndex++) if (strcasecmp(ItemAt(addIndex)->Label(), wInfo->name) > 0) break; if (!fExpanded) { TWindowMenuItem* item = new TWindowMenuItem(wInfo->name, wInfo->server_token, wInfo->is_mini, ((1 << current_workspace()) & wInfo->workspaces) != 0, dragging); // disable app's window dropping for now if (dragging) item->SetEnabled(false); AddItem(item, TWindowMenuItem::InsertIndexFor(this, 0, item)); } else { TTeamMenuItem* parentItem = static_cast<TTeamMenuItem*>(Superitem()); if (parentItem->ExpandedWindowItem(wInfo->server_token)) { TWindowMenuItem* item = parentItem->ExpandedWindowItem( wInfo->server_token); if (item == NULL) continue; item->SetTo(wInfo->name, wInfo->server_token, wInfo->is_mini, ((1 << current_workspace()) & wInfo->workspaces) != 0, dragging); parentMenuItems++; } } if (wInfo->is_mini) miniCount++; } free(wInfo); } free(tokens); } int32 itemCount = CountItems() + parentMenuItems; if (itemCount < 1) { TWindowMenuItem* noWindowsItem = new TWindowMenuItem("No windows", -1, false, false); noWindowsItem->SetEnabled(false); AddItem(noWindowsItem); // if an application has no windows, this feature makes it easy to quit // it. (but we only add this option if the application is not Tracker.) if (fApplicationSignature.ICompare(kTrackerSignature) != 0) { AddSeparatorItem(); AddItem(new TShowHideMenuItem("Quit application", fTeam, B_QUIT_REQUESTED)); } } else { // if we are in drag mode, then don't add the window controls // to the menu if (!dragging) { TShowHideMenuItem* hide = new TShowHideMenuItem("Hide all", fTeam, B_MINIMIZE_WINDOW); TShowHideMenuItem* show = new TShowHideMenuItem("Show all", fTeam, B_BRING_TO_FRONT); TShowHideMenuItem* close = new TShowHideMenuItem("Close all", fTeam, B_QUIT_REQUESTED); if (miniCount == itemCount) hide->SetEnabled(false); else if (miniCount == 0) show->SetEnabled(false); if (!parentMenuItems) AddSeparatorItem(); AddItem(hide); AddItem(show); AddItem(close); } } BMenu::AttachedToWindow(); }
void OpenWithMenu::DoneBuildingItemList() { // sort by app name fSupportingAppList->SortItems(SortByRelationAndName, this); // check if each app is unique bool isUnique = true; int32 count = fSupportingAppList->CountItems(); for (int32 index = 0; index < count - 1; index++) { // the list is sorted, just compare two adjacent models if (strcmp(fSupportingAppList->ItemAt(index)->fModel->Name(), fSupportingAppList->ItemAt(index + 1)->fModel->Name()) == 0) { isUnique = false; break; } } // add apps as menu items BFont font; GetFont(&font); int32 lastRelation = -1; for (int32 index = 0; index < count ; index++) { RelationCachingModelProxy* modelProxy = fSupportingAppList->ItemAt(index); Model* model = modelProxy->fModel; BMessage* message = new BMessage(fEntriesToOpen); message->AddRef("handler", model->EntryRef()); BContainerWindow* window = dynamic_cast<BContainerWindow*>(fParentWindow); if (window != NULL) { message->AddData("nodeRefsToClose", B_RAW_TYPE, window->TargetModel()->NodeRef(), sizeof(node_ref)); } BString result; if (isUnique) { // just use the app name result = model->Name(); } else { // get a truncated full path BPath path; BEntry entry(model->EntryRef()); if (entry.GetPath(&path) != B_OK) { PRINT(("stale entry ref %s\n", model->Name())); delete message; continue; } result = path.Path(); font.TruncateString(&result, B_TRUNCATE_MIDDLE, kMaxMenuWidth); } #if DEBUG BString relationDescription; fIterator->RelationDescription(&fEntriesToOpen, model, &relationDescription); result += " ("; result += relationDescription; result += ")"; #endif // divide different relations of opening with a separator int32 relation = modelProxy->Relation(fIterator, &fEntriesToOpen); if (lastRelation != -1 && relation != lastRelation) AddSeparatorItem(); lastRelation = relation; ModelMenuItem* item = new ModelMenuItem(model, result.String(), message); AddItem(item); // mark item if it represents the preferred app if (fHaveCommonPreferredApp && *(model->EntryRef()) == fPreferredRef) { //PRINT(("marking item for % as preferred", model->Name())); item->SetMarked(true); } } // target the menu if (target != NULL) SetTargetForItems(target); else SetTargetForItems(fMessenger); if (CountItems() == 0) { BMenuItem* item = new BMenuItem(B_TRANSLATE("no supporting apps"), 0); item->SetEnabled(false); AddItem(item); } }
bool TemplatesMenu::BuildMenu(bool addItems) { // Clear everything... fOpenItem = NULL; int32 count = CountItems(); while (count--) delete RemoveItem((int32)0); // Add the Folder IconMenuItem* menuItem = new IconMenuItem(B_TRANSLATE("New folder"), new BMessage(kNewFolder), B_DIR_MIMETYPE, B_MINI_ICON); AddItem(menuItem); menuItem->SetShortcut('N', 0); // The Templates folder BPath path; find_directory (B_USER_SETTINGS_DIRECTORY, &path, true); path.Append(kTemplatesDirectory); mkdir(path.Path(), 0777); count = 0; BEntry entry; BDirectory templatesDir(path.Path()); while (templatesDir.GetNextEntry(&entry) == B_OK) { BNode node(&entry); BNodeInfo nodeInfo(&node); char fileName[B_FILE_NAME_LENGTH]; entry.GetName(fileName); if (nodeInfo.InitCheck() == B_OK) { char mimeType[B_MIME_TYPE_LENGTH]; nodeInfo.GetType(mimeType); BMimeType mime(mimeType); if (mime.IsValid()) { if (count == 0) AddSeparatorItem(); count++; // If not adding items, we are just seeing if there // are any to list. So if we find one, immediately // bail and return the result. if (!addItems) break; entry_ref ref; entry.GetRef(&ref); BMessage* message = new BMessage(kNewEntryFromTemplate); message->AddRef("refs_template", &ref); message->AddString("name", fileName); AddItem(new IconMenuItem(fileName, message, &nodeInfo, B_MINI_ICON)); } } } AddSeparatorItem(); // This is the message sent to open the templates folder. BMessage* message = new BMessage(B_REFS_RECEIVED); entry_ref dirRef; if (templatesDir.GetEntry(&entry) == B_OK) entry.GetRef(&dirRef); message->AddRef("refs", &dirRef); // Add item to show templates folder. fOpenItem = new BMenuItem(B_TRANSLATE("Edit templates" B_UTF8_ELLIPSIS), message); AddItem(fOpenItem); if (dirRef == entry_ref()) fOpenItem->SetEnabled(false); return count > 0; }
TTransitionMenu::TTransitionMenu(TCueView* target, bool transitionIn) : BPopUpMenu("TransitionMenu") { BMessage* menuMessage; // Create "None" menuMessage = new BMessage(TRAN_NONE_MSG); menuMessage->AddBool("TransitionIn", transitionIn); BMenuItem* noneItem = new BMenuItem("None", menuMessage); AddItem(noneItem); // Seperator01 AddSeparatorItem(); // Create Straight Wipes submenu // BMenu* straightWipesSubMenu = new BMenu("Straight Wipes"); BMenuItem* straightWipesSubMenuItem = new BMenuItem(straightWipesSubMenu); AddItem(straightWipesSubMenuItem); menuMessage = new BMessage(TRAN_WIPE_RIGHT_MSG); menuMessage->AddBool("TransitionIn", transitionIn); BMenuItem* wipeRightItem = new BMenuItem("Right", menuMessage); straightWipesSubMenu->AddItem(wipeRightItem); menuMessage = new BMessage(TRAN_WIPE_LEFT_MSG); menuMessage->AddBool("TransitionIn", transitionIn); BMenuItem* wipeLeftItem = new BMenuItem("Left", menuMessage); straightWipesSubMenu->AddItem(wipeLeftItem); menuMessage = new BMessage(TRAN_WIPE_DOWN_MSG); menuMessage->AddBool("TransitionIn", transitionIn); BMenuItem* wipeDownItem = new BMenuItem("Down", menuMessage); straightWipesSubMenu->AddItem(wipeDownItem); menuMessage = new BMessage(TRAN_WIPE_UP_MSG); menuMessage->AddBool("TransitionIn", transitionIn); BMenuItem* wipeUpItem = new BMenuItem("Up", menuMessage); straightWipesSubMenu->AddItem(wipeUpItem); // Create Diagonal Wipes submenu // BMenu* diagonalWipesSubMenu = new BMenu("Diagonal Wipes"); BMenuItem* diagonalWipesSubMenuItem = new BMenuItem(diagonalWipesSubMenu); AddItem(diagonalWipesSubMenuItem); menuMessage = new BMessage(TRAN_WIPE_TOP_LEFT_BOTTOM_RIGHT_MSG); menuMessage->AddBool("TransitionIn", transitionIn); BMenuItem* wipeTopLeftBottomRightItem = new BMenuItem("Top Left to Bottom Right", menuMessage); diagonalWipesSubMenu->AddItem(wipeTopLeftBottomRightItem); menuMessage = new BMessage(TRAN_WIPE_TOP_RIGHT_BOTTON_LEFT_MSG); menuMessage->AddBool("TransitionIn", transitionIn); BMenuItem* wipeTopRightToBottomLeftItem = new BMenuItem("Top Right to Bottom Left", menuMessage); diagonalWipesSubMenu->AddItem(wipeTopRightToBottomLeftItem); menuMessage = new BMessage(TRAN_WIPE_BOTTOM_LEFT_TOP_RIGHT_MSG); menuMessage->AddBool("TransitionIn", transitionIn); BMenuItem* wipeBottomLeftToTopRightItem = new BMenuItem("Bottom Left to Top Right", menuMessage); diagonalWipesSubMenu->AddItem(wipeBottomLeftToTopRightItem); menuMessage = new BMessage(TRAN_WIPE_BOTTOM_RIGHT_TOP_LEFT_MSG); menuMessage->AddBool("TransitionIn", transitionIn); BMenuItem* wipeBottomRightToTopLeftItem = new BMenuItem("Bottom Right to Top Left", menuMessage); diagonalWipesSubMenu->AddItem(wipeBottomRightToTopLeftItem); // Create Circular Wipes submenu // BMenu* circularWipesSubMenu = new BMenu("Circular Wipes"); BMenuItem* circularWipesSubMenuItem = new BMenuItem(circularWipesSubMenu); AddItem(circularWipesSubMenuItem); // Create Iris Out submenu // BMenu* irisOutSubMenu = new BMenu("Iris Out"); BMenuItem* irisOutSubMenuItem = new BMenuItem(irisOutSubMenu); AddItem(irisOutSubMenuItem); // Create Reveal submenu // BMenu* revealSubMenu = new BMenu("Reveal"); BMenuItem* revealSubMenuItem = new BMenuItem(revealSubMenu); AddItem(revealSubMenuItem); menuMessage = new BMessage(TRAN_REVEAL_RIGHT_MSG); menuMessage->AddBool("TransitionIn", transitionIn); BMenuItem* revealRightItem = new BMenuItem("Right", menuMessage); revealSubMenu->AddItem(revealRightItem); menuMessage = new BMessage(TRAN_REVEAL_LEFT_MSG); menuMessage->AddBool("TransitionIn", transitionIn); BMenuItem* revealLeftItem = new BMenuItem("Left", menuMessage); revealSubMenu->AddItem(revealLeftItem); menuMessage = new BMessage(TRAN_REVEAL_DOWN_MSG); menuMessage->AddBool("TransitionIn", transitionIn); BMenuItem* revealDownItem = new BMenuItem("Down", menuMessage); revealSubMenu->AddItem(revealDownItem); menuMessage = new BMessage(TRAN_REVEAL_UP_MSG); menuMessage->AddBool("TransitionIn", transitionIn); BMenuItem* revealUpItem = new BMenuItem("Up", menuMessage); revealSubMenu->AddItem(revealUpItem); menuMessage = new BMessage(TRAN_REVEAL_TOP_LEFT_BOTTOM_RIGHT_MSG); menuMessage->AddBool("TransitionIn", transitionIn); BMenuItem* revealTLBRItem = new BMenuItem("Top Left to Bottom Right", menuMessage); revealSubMenu->AddItem(revealTLBRItem); menuMessage = new BMessage(TRAN_REVEAL_TOP_RIGHT_BOTTON_LEFT_MSG); menuMessage->AddBool("TransitionIn", transitionIn); BMenuItem* revealTRBLItem = new BMenuItem("Top Right to Bottom Left", menuMessage); revealSubMenu->AddItem(revealTRBLItem); menuMessage = new BMessage(TRAN_REVEAL_BOTTOM_LEFT_TOP_RIGHT_MSG); menuMessage->AddBool("TransitionIn", transitionIn); BMenuItem* revealBLTRItem = new BMenuItem("Bottom Left to Top Right", menuMessage); revealSubMenu->AddItem(revealBLTRItem); menuMessage = new BMessage(TRAN_REVEAL_BOTTOM_RIGHT_TOP_LEFT_MSG); menuMessage->AddBool("TransitionIn", transitionIn); BMenuItem* revealBRTLItem = new BMenuItem("Bottom Right to Top Left", menuMessage); revealSubMenu->AddItem(revealBRTLItem); // Create Blinds submenu // BMenu* blindsSubMenu = new BMenu("Blinds"); BMenuItem* blindsSubMenuItem = new BMenuItem(blindsSubMenu); AddItem(blindsSubMenuItem); // Create Curtains submenu // BMenu* curtainsSubMenu = new BMenu("Curtains"); BMenuItem* curtainsSubMenuItem = new BMenuItem(curtainsSubMenu); AddItem(curtainsSubMenuItem); menuMessage = new BMessage(TRAN_CURTAINS_IN_MSG); menuMessage->AddBool("TransitionIn", transitionIn); BMenuItem* curtainsInItem = new BMenuItem("In", menuMessage); curtainsSubMenu->AddItem(curtainsInItem); menuMessage = new BMessage(TRAN_CURTAINS_OUT_MSG); menuMessage->AddBool("TransitionIn", transitionIn); BMenuItem* curtainsOutItem = new BMenuItem("Out", menuMessage); curtainsSubMenu->AddItem(curtainsOutItem); // Create Horizontal Strips submenu // BMenu* hStripsSubMenu = new BMenu("Horizontal Strips"); BMenuItem* hStripsSubMenuItem = new BMenuItem(hStripsSubMenu); AddItem(hStripsSubMenuItem); // Create Vertical Strips submenu // BMenu* vStripsSubMenu = new BMenu("Vertical Strips"); BMenuItem* vStripsSubMenuItem = new BMenuItem(vStripsSubMenu); AddItem(vStripsSubMenuItem); // Create Dissolve submenu // BMenu* dissolveSubMenu = new BMenu("Dissolve"); BMenuItem* dissolveSubMenuItem = new BMenuItem(dissolveSubMenu); AddItem(dissolveSubMenuItem); // Create Zoom submenu // BMenu* zoomSubMenu = new BMenu("Zoom"); BMenuItem* zoomSubMenuItem = new BMenuItem(zoomSubMenu); AddItem(zoomSubMenuItem); // All these items message to the cue straightWipesSubMenu->SetTargetForItems(target); diagonalWipesSubMenu->SetTargetForItems(target); circularWipesSubMenu->SetTargetForItems(target); irisOutSubMenu->SetTargetForItems(target); revealSubMenu->SetTargetForItems(target); blindsSubMenu->SetTargetForItems(target); curtainsSubMenu->SetTargetForItems(target); hStripsSubMenu->SetTargetForItems(target); vStripsSubMenu->SetTargetForItems(target); dissolveSubMenu->SetTargetForItems(target); zoomSubMenu->SetTargetForItems(target); // Seperator02 AddSeparatorItem(); // Create Settings item menuMessage = new BMessage(TRAN_DURATION); menuMessage->AddBool("TransitionIn", transitionIn); BMenuItem* durationItem = new BMenuItem("Settings...", menuMessage); AddItem(durationItem); // All these items message to the cue SetTargetForItems(target); }