本文整理汇总了C++中hdMouseEvent::LeftDClick方法的典型用法代码示例。如果您正苦于以下问题:C++ hdMouseEvent::LeftDClick方法的具体用法?C++ hdMouseEvent::LeftDClick怎么用?C++ hdMouseEvent::LeftDClick使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类hdMouseEvent
的用法示例。
在下文中一共展示了hdMouseEvent::LeftDClick方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: mouseDown
void hdSimpleTextTool::mouseDown(hdMouseEvent &event)
{
setAnchorCoords(event.GetPosition().x, event.GetPosition().y);
// Right click to get the contextual menu
if(txtFigure->menuEnabled() && event.RightDown())
{
wxMenu menu;
event.getView()->setSimpleTextToolFigure(txtFigure, true);
txtFigure->createMenu(menu);
event.getView()->connectPopUpMenu(menu);
hdPoint p = event.GetPosition();
event.getView()->CalcScrolledPosition(p.x, p.y, &p.x, &p.y);
event.getView()->PopupMenu(&menu, p);
return;
}
// Double click to rename an object
if(event.LeftDClick())
{
if(withoutDialog)
{
event.getView()->setSimpleTextToolFigure(txtFigure);
showEdit = true;
event.getView()->getSimpleTextToolEdit()->ChangeValue(txtFigure->getText()); //Same as SetValue but don't generated wxEVT_COMMAND_TEXT_UPDATED event
calculateSizeEntry(event.getView());
event.getView()->getSimpleTextToolEdit()->SetFocus();
event.getView()->getSimpleTextToolEdit()->Show();
event.getView()->getOkTxt()->Show();
event.getView()->getCancelTxt()->Show();
}
else
{
callDialog(event.getView());
}
return;
}
getDefaultTool()->mouseDown(event);
}