本文整理汇总了C++中DockCont::IsDockAllowed方法的典型用法代码示例。如果您正苦于以下问题:C++ DockCont::IsDockAllowed方法的具体用法?C++ DockCont::IsDockAllowed怎么用?C++ DockCont::IsDockAllowed使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DockCont
的用法示例。
在下文中一共展示了DockCont::IsDockAllowed方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ShowOuterPopUps
void PopUpDockWindow::ShowOuterPopUps(DockCont &dc)
{
Rect wrect = GetScreenRect();
Point cp = wrect.CenterPoint();
Size psz(style->outersize, style->outersize);
Rect prect = Rect(psz);
psz /= 2;
wrect.Deflate(12, 12);
if (dc.IsDockAllowed(DOCK_LEFT)) ShowPopUp(outer[DOCK_LEFT], prect.Offseted(wrect.left + POPUP_SPACING, cp.y - psz.cy));
if (dc.IsDockAllowed(DOCK_TOP)) ShowPopUp(outer[DOCK_TOP], prect.Offseted(cp.x - psz.cx, wrect.top + POPUP_SPACING));
if (dc.IsDockAllowed(DOCK_RIGHT)) ShowPopUp(outer[DOCK_RIGHT], prect.Offseted(wrect.right - POPUP_SPACING - psz.cx*2, cp.y - psz.cy));
if (dc.IsDockAllowed(DOCK_BOTTOM)) ShowPopUp(outer[DOCK_BOTTOM], prect.Offseted(cp.x - psz.cx, wrect.bottom - POPUP_SPACING - psz.cy*2));
}
示例2: ContainerDragMove
void PopUpDockWindow::ContainerDragMove(DockCont &dc)
{
int align = DOCK_NONE;
// Is the highlight the same as last time? (Quick escape)
if (last_popup && last_popup->IsPopUp() && last_popup->GetRect().Contains(GetMousePos()))
return;
DockCont *target = GetMouseDockTarget();
int dock = DOCK_NONE;
if (target) {
dock = GetDockAlign(*target);
if (!dc.IsDockAllowed(dock))
target = NULL;
}
bool target_changed = (target != last_target)
&& !GetHighlightCtrl().GetParent()
&& (!target || !IsPaneAnimating(dock));
// Hide show inner popups as necessary
if (!target && last_target != NULL)
HidePopUps(true, false);
else if (target_changed)
ShowInnerPopUps(dc, target);
ShowOuterPopUps(dc);
last_target = target;
// Get potential alignment
align = PopUpHighlight(inner, 5);
if (align == DOCK_NONE) {
target = NULL;
last_target = NULL;
align = PopUpHighlight(outer, 4);
}
else if (align == 4)
align = DOCK_NONE;
else if (target) {
target = IsTL(align) ? target : dynamic_cast<DockCont*>(target->GetNext());
align = dock;
}
// Do highlight
if (align != DOCK_NONE || target) {
if (align == DOCK_NONE) StopHighlight(false);
dc.SyncUserSize(true, true);
Highlight(align, dc, target);
}
else {
StopHighlight(IsAnimatedHighlight());
last_popup = NULL;
}
}