本文整理汇总了C++中DockCont::IsFloating方法的典型用法代码示例。如果您正苦于以下问题:C++ DockCont::IsFloating方法的具体用法?C++ DockCont::IsFloating怎么用?C++ DockCont::IsFloating使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DockCont
的用法示例。
在下文中一共展示了DockCont::IsFloating方法的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: FloatContainer
void DockWindow::FloatContainer(DockCont &c, Point p)
{
ASSERT(IsOpen());
if (c.IsFloating()) return;
if (p.IsNullInstance())
p = GetScreenRect().CenterPoint();
Detach(c);
c.StateFloating(*this);
Size best = CtrlBestSize(c, false);
c.SetRect(Rect(p, best));
c.Open(this);
}