本文整理汇总了C++中TBarView::DragStop方法的典型用法代码示例。如果您正苦于以下问题:C++ TBarView::DragStop方法的具体用法?C++ TBarView::DragStop怎么用?C++ TBarView::DragStop使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TBarView
的用法示例。
在下文中一共展示了TBarView::DragStop方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void
TWindowMenu::DetachedFromWindow()
{
// in expando mode the teammenu will not call DragStop,
// thus, it needs to be called from here
TBarView* barview = (dynamic_cast<TBarApp*>(be_app))->BarView();
if (barview && barview->Expando() && barview->Dragging()
&& barview->LockLooper()) {
// We changed the show level in AttachedToWindow(). Undo it.
Window()->Show();
barview->DragStop();
barview->UnlockLooper();
}
BMenu::DetachedFromWindow();
}
示例2: self
void
TTeamMenu::DetachedFromWindow()
{
TBarView* barView = (dynamic_cast<TBarApp*>(be_app))->BarView();
if (barView != NULL) {
BLooper* looper = barView->Looper();
if (looper != NULL && looper->Lock()) {
barView->DragStop();
looper->Unlock();
}
}
BMenu::DetachedFromWindow();
BMessenger self(this);
TBarApp::Unsubscribe(self);
}
示例3: Invoke
status_t
TTeamMenuItem::Invoke(BMessage* message)
{
if ((static_cast<TBarApp*>(be_app))->BarView()->InvokeItem(Signature()))
// handles drop on application
return B_OK;
// if the app could not handle the drag message
// and we were dragging, then kill the drag
// should never get here, disabled item will not invoke
TBarView* barView = (static_cast<TBarApp*>(be_app))->BarView();
if (barView && barView->Dragging())
barView->DragStop();
// bring to front or minimize shortcuts
uint32 mods = modifiers();
if (mods & B_CONTROL_KEY) {
TShowHideMenuItem::TeamShowHideCommon((mods & B_SHIFT_KEY)
? B_MINIMIZE_WINDOW : B_BRING_TO_FRONT, Teams());
}
return BMenuItem::Invoke(message);
}