本文整理汇总了C++中Popup::mouseReleased方法的典型用法代码示例。如果您正苦于以下问题:C++ Popup::mouseReleased方法的具体用法?C++ Popup::mouseReleased怎么用?C++ Popup::mouseReleased使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Popup
的用法示例。
在下文中一共展示了Popup::mouseReleased方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: mouseReleased
void Gui::mouseReleased( int x, int y, MouseButtons mb )
{
cout << "Ui::Gui::mouseReleased( " << x << ", " << y << " )" << endl;
if ( pChannelPopup != NULL ) {
pChannelPopup->mouseReleased( x, y, mb );
if ( pChannelPopup != NULL ) {
if ( !pChannelPopup->passEvents() )
return;
}
}
if ( pMouseDragWidget != NULL ) {
pMouseDragWidget->onDestroy.disconnect( this );
pMouseDragWidget = NULL;
}
if ( pMouseChannelWidget != NULL ) {
if ( pMousePressedWidget == pMouseChannelWidget ) {
if ( pLastClick <= pDblClickTicks ) {
pMouseChannelWidget->mouseDblClick( x - pMouseChannelWidget->absoluteXPos(), y - pMouseChannelWidget->absoluteYPos(), mb );
pMouseChannelWidget->mouseClick( x - pMouseChannelWidget->absoluteXPos(), y - pMouseChannelWidget->absoluteYPos(), mb );
pLastClick = pDblClickTicks + 1;
} else {
pMouseChannelWidget->mouseClick( x - pMouseChannelWidget->absoluteXPos(), y - pMouseChannelWidget->absoluteYPos(), mb );
pLastClick = 0;
}
pMousePressedWidget->onDestroy.disconnect( this );
pMousePressedWidget = NULL;
}
pMouseChannelWidget->mouseReleased( x - pMouseChannelWidget->absoluteXPos(), y - pMouseChannelWidget->absoluteYPos(), mb );
} else {
for( int i = 0; i < pPopups.count(); i++ ) {
Popup* p = pPopups.get( i );
Rect r = p->getRect();
if ( r.pointInside( x, y ) ) {
p->mouseReleased( x, y, mb );
if ( !p->passEvents() )
return;
}
}
Widget* o = fgFrame().mouseReleased( x, y, mb );
if ( o != NULL ) {
if ( pMousePressedWidget == o ) {
pMousePressedWidget->onDestroy.disconnect( this );
pMousePressedWidget = NULL;
o->mouseClick( x, y, mb );
}
//o->mouseReleased( x, y, mb );
}
}
}