本文整理汇总了C++中DockCont::GetPrev方法的典型用法代码示例。如果您正苦于以下问题:C++ DockCont::GetPrev方法的具体用法?C++ DockCont::GetPrev怎么用?C++ DockCont::GetPrev使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DockCont
的用法示例。
在下文中一共展示了DockCont::GetPrev方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
DockCont *DockWindow::FindDockTarget(DockCont &dc, int &dock)
{
Point p = GetMousePos();
Rect r = GetScreenView();
DockCont *target = NULL;
int align = DOCK_NONE;
dock = DOCK_NONE;
if (r.Contains(p)) {
dock = GetPointAlign(p, r, true, true, true);
if (dock != DOCK_NONE && dockpane[dock].IsVisible())
dock = DOCK_NONE;
}
else {
target = GetMouseDockTarget();
if (target) {
r = target->GetScreenRect();
dock = GetDockAlign(*target);
align = GetPointAlign(p, r, IsTabbing(), IsTB(dock), !IsTB(dock));
}
else
return NULL;
}
if (dock != DOCK_NONE && (!dc.IsDockAllowed(dock)
|| IsPaneAnimating(dock) || IsFrameAnimating(dock))
|| (dock == DOCK_NONE && !target)) {
dock = DOCK_NONE;
return NULL;
}
// Prepare for highlight
if (target) {
GetHighlightCtrl().bounds = GetAlignBounds(align, r, IsTabbing(), IsTB(dock), !IsTB(dock));
if (align == DOCK_NONE)
dock = DOCK_NONE; // Tabbing
// The following code handles the case of an insertion between two docked controls. In this case we must set
// the highlight bounds to be a union of the bounds from each control. Very ugly.
if (dock != DOCK_NONE) {
Ctrl *c = IsTL(align) ? target->GetPrev() : target->GetNext();
if (c) {
int opal = align > 1 ? align-2 : align+2;
GetHighlightCtrl().bounds.Union(GetAlignBounds(opal, c->GetScreenRect(), IsTabbing()));
}
target = IsTL(align) ? target : dynamic_cast<DockCont*>(target->GetNext());
}
}
else if (dock != DOCK_NONE)
GetHighlightCtrl().bounds = GetAlignBounds(dock, r, true);
return target;
}