本文整理汇总了C++中DockCont::SyncUserSize方法的典型用法代码示例。如果您正苦于以下问题:C++ DockCont::SyncUserSize方法的具体用法?C++ DockCont::SyncUserSize怎么用?C++ DockCont::SyncUserSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DockCont
的用法示例。
在下文中一共展示了DockCont::SyncUserSize方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ContainerDragStart
void DockWindow::ContainerDragStart(DockCont &dc)
{
if (!dc.IsFloating()) {
// Reposition if not under the mouse
Rect r = dc.GetScreenRect();
Point pt = GetMousePos();
Point tl = r.TopLeft();
bool move = false;
if (r.left > pt.x || r.right < pt.x) {
tl.x += pt.x - r.left - r.Width()/2;
move = true;
}
if (r.top < pt.y) {
tl.y += pt.y - r.top + DOCKCONT_WND_OFFSET;
move = true;
}
// Note: Due to different bugfix, at this point a dragged tab will have docked state but
// no parent and should not be animatehld
dc.SyncUserSize(true, true);
if (IsAnimatedHighlight() && dc.IsDocked() && dc.GetParent()) {
Undock0(dc, true);
dc.StateNotDocked();
}
FloatContainer(dc, move ? tl : Null);
dc.StartMouseDrag(pt);
}
}
示例2: Undock
void DockWindow::Undock(DockCont &c)
{
if (!c.IsFloating() && !c.IsHidden()) {
if (c.IsAutoHide()) {
for (int i = 0; i < 4; i++) {
int ix = hideframe[i].FindCtrl(c);
if (ix >= 0) {
hideframe[i].RemoveCtrl(ix);
hideframe[i].RefreshFrame();
break;
}
}
}
else {
int dock = GetDockAlign(c);
if (dock >= 0 && dock < 4) {
Ctrl *p = &c;
while (p && p->GetParent() != &dockpane[dock]) p = p->GetParent();
ASSERT(p);
bool v = !IsTB(dock);
c.SyncUserSize(v, !v);
}
Undock0(c);
}
c.StateNotDocked();
}
}
示例3: Unfloat
void DockWindow::Unfloat(DockCont &c)
{
if (c.IsFloating()) {
c.SyncUserSize(true, true);
if (c.IsOpen() || c.IsPopUp())
c.Close();
c.StateNotDocked();
}
}
示例4: 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;
}
}