|
@@ -141,6 +141,7 @@ namespace BansheeEngine
|
|
|
mWidgets = bs_new<EditorWidgetContainer>(guiWidget.get(), parentWindow);
|
|
mWidgets = bs_new<EditorWidgetContainer>(guiWidget.get(), parentWindow);
|
|
|
|
|
|
|
|
mWidgets->onWidgetClosed.connect(std::bind(&DockManager::DockContainer::widgetRemoved, this));
|
|
mWidgets->onWidgetClosed.connect(std::bind(&DockManager::DockContainer::widgetRemoved, this));
|
|
|
|
|
+ mWidgets->onMaximized.connect(std::bind(&DockManager::DockContainer::maximizeClicked, this));
|
|
|
|
|
|
|
|
if(mSlider != nullptr)
|
|
if(mSlider != nullptr)
|
|
|
{
|
|
{
|
|
@@ -159,6 +160,7 @@ namespace BansheeEngine
|
|
|
mGUIWidgetSO = guiWidgetSO;
|
|
mGUIWidgetSO = guiWidgetSO;
|
|
|
|
|
|
|
|
mWidgets->onWidgetClosed.connect(std::bind(&DockManager::DockContainer::widgetRemoved, this));
|
|
mWidgets->onWidgetClosed.connect(std::bind(&DockManager::DockContainer::widgetRemoved, this));
|
|
|
|
|
+ mWidgets->onMaximized.connect(std::bind(&DockManager::DockContainer::maximizeClicked, this));
|
|
|
|
|
|
|
|
if(mSlider != nullptr)
|
|
if(mSlider != nullptr)
|
|
|
{
|
|
{
|
|
@@ -213,6 +215,7 @@ namespace BansheeEngine
|
|
|
children[idxB] = bs_new<DockContainer>(mManager, this);
|
|
children[idxB] = bs_new<DockContainer>(mManager, this);
|
|
|
|
|
|
|
|
mWidgets->onWidgetClosed.clear();
|
|
mWidgets->onWidgetClosed.clear();
|
|
|
|
|
+ mWidgets->onMaximized.clear();
|
|
|
|
|
|
|
|
children[idxA]->makeLeaf(mManager->mParentWindow);
|
|
children[idxA]->makeLeaf(mManager->mParentWindow);
|
|
|
children[idxB]->makeLeaf(mGUIWidgetSO, mWidgets);
|
|
children[idxB]->makeLeaf(mGUIWidgetSO, mWidgets);
|
|
@@ -300,6 +303,12 @@ namespace BansheeEngine
|
|
|
{
|
|
{
|
|
|
if(mParent == nullptr) // We're root so we just reset ourselves, can't delete root
|
|
if(mParent == nullptr) // We're root so we just reset ourselves, can't delete root
|
|
|
{
|
|
{
|
|
|
|
|
+ if (mManager->mIsMaximized)
|
|
|
|
|
+ {
|
|
|
|
|
+ mManager->mMaximizedContainer = this;
|
|
|
|
|
+ mManager->mIsMaximized = false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
bs_delete(mWidgets);
|
|
bs_delete(mWidgets);
|
|
|
mWidgets = nullptr;
|
|
mWidgets = nullptr;
|
|
|
|
|
|
|
@@ -322,6 +331,7 @@ namespace BansheeEngine
|
|
|
if (sibling->mIsLeaf)
|
|
if (sibling->mIsLeaf)
|
|
|
{
|
|
{
|
|
|
sibling->mWidgets->onWidgetClosed.clear();
|
|
sibling->mWidgets->onWidgetClosed.clear();
|
|
|
|
|
+ sibling->mWidgets->onMaximized.clear();
|
|
|
|
|
|
|
|
mParent->makeLeaf(sibling->mGUIWidgetSO, sibling->mWidgets);
|
|
mParent->makeLeaf(sibling->mGUIWidgetSO, sibling->mWidgets);
|
|
|
sibling->mWidgets = nullptr;
|
|
sibling->mWidgets = nullptr;
|
|
@@ -344,6 +354,11 @@ namespace BansheeEngine
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ void DockManager::DockContainer::maximizeClicked()
|
|
|
|
|
+ {
|
|
|
|
|
+ mManager->toggleMaximize(this);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
DockManager::DockContainer* DockManager::DockContainer::find(EditorWidgetContainer* widgetContainer)
|
|
DockManager::DockContainer* DockManager::DockContainer::find(EditorWidgetContainer* widgetContainer)
|
|
|
{
|
|
{
|
|
|
if(mIsLeaf)
|
|
if(mIsLeaf)
|
|
@@ -433,7 +448,7 @@ namespace BansheeEngine
|
|
|
|
|
|
|
|
DockManager::DockManager(EditorWindowBase* parentWindow, const GUIDimensions& dimensions)
|
|
DockManager::DockManager(EditorWindowBase* parentWindow, const GUIDimensions& dimensions)
|
|
|
:GUIElementContainer(dimensions), mMouseOverContainer(nullptr), mHighlightedDropLoc(DockLocation::None),
|
|
:GUIElementContainer(dimensions), mMouseOverContainer(nullptr), mHighlightedDropLoc(DockLocation::None),
|
|
|
- mShowOverlay(false), mRootContainer(this), mParentWindow(parentWindow)
|
|
|
|
|
|
|
+ mShowOverlay(false), mRootContainer(this), mParentWindow(parentWindow), mIsMaximized(false), mMaximizedContainer(nullptr)
|
|
|
{
|
|
{
|
|
|
mTopDropPolygon = bs_newN<Vector2>(4);
|
|
mTopDropPolygon = bs_newN<Vector2>(4);
|
|
|
mBotDropPolygon = bs_newN<Vector2>(4);
|
|
mBotDropPolygon = bs_newN<Vector2>(4);
|
|
@@ -567,57 +582,72 @@ namespace BansheeEngine
|
|
|
return widgetNames;
|
|
return widgetNames;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
- DockManagerLayoutPtr layout = bs_shared_ptr_new<DockManagerLayout>();
|
|
|
|
|
- DockManagerLayout::Entry* rootEntry = &layout->getRootEntry();
|
|
|
|
|
-
|
|
|
|
|
- if(mRootContainer.mIsLeaf)
|
|
|
|
|
|
|
+ if (mIsMaximized)
|
|
|
{
|
|
{
|
|
|
- rootEntry->isLeaf = true;
|
|
|
|
|
- rootEntry->widgetNames = GetWidgetNamesInContainer(&mRootContainer);
|
|
|
|
|
|
|
+ DockManagerLayoutPtr layout;
|
|
|
|
|
+
|
|
|
|
|
+ if (mRestoredLayout != nullptr)
|
|
|
|
|
+ layout = mRestoredLayout->clone();
|
|
|
|
|
+ else
|
|
|
|
|
+ layout = bs_shared_ptr_new<DockManagerLayout>();
|
|
|
|
|
+
|
|
|
|
|
+ layout->setIsMaximized(true, GetWidgetNamesInContainer(mMaximizedContainer));
|
|
|
|
|
+ return layout;
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
|
- rootEntry->isLeaf = false;
|
|
|
|
|
- rootEntry->horizontalSplit = mRootContainer.mIsHorizontal;
|
|
|
|
|
- rootEntry->splitPosition = mRootContainer.mSplitPosition;
|
|
|
|
|
- rootEntry->parent = nullptr;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ DockManagerLayoutPtr layout = bs_shared_ptr_new<DockManagerLayout>();
|
|
|
|
|
+ DockManagerLayout::Entry* rootEntry = &layout->getRootEntry();
|
|
|
|
|
|
|
|
- Stack<StackElem> todo;
|
|
|
|
|
- todo.push(StackElem(rootEntry, &mRootContainer));
|
|
|
|
|
|
|
+ if (mRootContainer.mIsLeaf)
|
|
|
|
|
+ {
|
|
|
|
|
+ rootEntry->isLeaf = true;
|
|
|
|
|
+ rootEntry->widgetNames = GetWidgetNamesInContainer(&mRootContainer);
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ rootEntry->isLeaf = false;
|
|
|
|
|
+ rootEntry->horizontalSplit = mRootContainer.mIsHorizontal;
|
|
|
|
|
+ rootEntry->splitPosition = mRootContainer.mSplitPosition;
|
|
|
|
|
+ rootEntry->parent = nullptr;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- while(!todo.empty())
|
|
|
|
|
- {
|
|
|
|
|
- StackElem currentElem = todo.top();
|
|
|
|
|
- todo.pop();
|
|
|
|
|
|
|
+ Stack<StackElem> todo;
|
|
|
|
|
+ todo.push(StackElem(rootEntry, &mRootContainer));
|
|
|
|
|
|
|
|
- if(!currentElem.container->mIsLeaf)
|
|
|
|
|
|
|
+ while (!todo.empty())
|
|
|
{
|
|
{
|
|
|
- for(UINT32 i = 0; i < 2; i++)
|
|
|
|
|
- {
|
|
|
|
|
- if(currentElem.container->mChildren[i] == nullptr)
|
|
|
|
|
- continue;
|
|
|
|
|
|
|
+ StackElem currentElem = todo.top();
|
|
|
|
|
+ todo.pop();
|
|
|
|
|
|
|
|
- if(currentElem.container->mChildren[i]->mIsLeaf)
|
|
|
|
|
- {
|
|
|
|
|
- Vector<String> widgetNames = GetWidgetNamesInContainer(currentElem.container->mChildren[i]);
|
|
|
|
|
- currentElem.layoutEntry->children[i] =
|
|
|
|
|
- DockManagerLayout::Entry::createLeaf(currentElem.layoutEntry, i, widgetNames);
|
|
|
|
|
- }
|
|
|
|
|
- else
|
|
|
|
|
|
|
+ if (!currentElem.container->mIsLeaf)
|
|
|
|
|
+ {
|
|
|
|
|
+ for (UINT32 i = 0; i < 2; i++)
|
|
|
{
|
|
{
|
|
|
- currentElem.layoutEntry->children[i] =
|
|
|
|
|
- DockManagerLayout::Entry::createContainer(currentElem.layoutEntry, i,
|
|
|
|
|
- currentElem.container->mChildren[i]->mSplitPosition,
|
|
|
|
|
- currentElem.container->mChildren[i]->mIsHorizontal);
|
|
|
|
|
-
|
|
|
|
|
- todo.push(StackElem(currentElem.layoutEntry->children[i], currentElem.container->mChildren[i]));
|
|
|
|
|
|
|
+ if (currentElem.container->mChildren[i] == nullptr)
|
|
|
|
|
+ continue;
|
|
|
|
|
+
|
|
|
|
|
+ if (currentElem.container->mChildren[i]->mIsLeaf)
|
|
|
|
|
+ {
|
|
|
|
|
+ Vector<String> widgetNames = GetWidgetNamesInContainer(currentElem.container->mChildren[i]);
|
|
|
|
|
+ currentElem.layoutEntry->children[i] =
|
|
|
|
|
+ DockManagerLayout::Entry::createLeaf(currentElem.layoutEntry, i, widgetNames);
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ currentElem.layoutEntry->children[i] =
|
|
|
|
|
+ DockManagerLayout::Entry::createContainer(currentElem.layoutEntry, i,
|
|
|
|
|
+ currentElem.container->mChildren[i]->mSplitPosition,
|
|
|
|
|
+ currentElem.container->mChildren[i]->mIsHorizontal);
|
|
|
|
|
+
|
|
|
|
|
+ todo.push(StackElem(currentElem.layoutEntry->children[i], currentElem.container->mChildren[i]));
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- return layout;
|
|
|
|
|
|
|
+ return layout;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void DockManager::setLayout(const DockManagerLayoutPtr& layout)
|
|
void DockManager::setLayout(const DockManagerLayoutPtr& layout)
|
|
@@ -625,34 +655,36 @@ namespace BansheeEngine
|
|
|
// Undock all currently docked widgets
|
|
// Undock all currently docked widgets
|
|
|
Vector<EditorWidgetBase*> undockedWidgets;
|
|
Vector<EditorWidgetBase*> undockedWidgets;
|
|
|
|
|
|
|
|
- Stack<DockContainer*> todo;
|
|
|
|
|
- todo.push(&mRootContainer);
|
|
|
|
|
-
|
|
|
|
|
- while(!todo.empty())
|
|
|
|
|
|
|
+ std::function<void(DockContainer*)> undockWidgets = [&](DockContainer* container)
|
|
|
{
|
|
{
|
|
|
- DockContainer* current = todo.top();
|
|
|
|
|
- todo.pop();
|
|
|
|
|
|
|
+ if (!container->mIsLeaf)
|
|
|
|
|
+ {
|
|
|
|
|
+ // Due to the way undocking works a container can be transfromed from non-leaf to leaf
|
|
|
|
|
+ // if its child container is deleted, so we need to check to that specially
|
|
|
|
|
+ undockWidgets(container->mChildren[0]);
|
|
|
|
|
|
|
|
- if(current->mIsLeaf)
|
|
|
|
|
|
|
+ if (!container->mIsLeaf)
|
|
|
|
|
+ undockWidgets(container->mChildren[1]);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (container->mIsLeaf)
|
|
|
{
|
|
{
|
|
|
- if(current->mWidgets != nullptr)
|
|
|
|
|
|
|
+ if (container->mWidgets != nullptr)
|
|
|
{
|
|
{
|
|
|
- while(current->mWidgets->getNumWidgets() > 0)
|
|
|
|
|
|
|
+ UINT32 numWidgets = container->mWidgets->getNumWidgets();
|
|
|
|
|
+
|
|
|
|
|
+ for (UINT32 i = 0; i < numWidgets; i++)
|
|
|
{
|
|
{
|
|
|
- EditorWidgetBase* curWidget = current->mWidgets->getWidget(0);
|
|
|
|
|
- current->mWidgets->remove(*curWidget);
|
|
|
|
|
|
|
+ EditorWidgetBase* curWidget = container->mWidgets->getWidget(0);
|
|
|
|
|
+ container->mWidgets->remove(*curWidget);
|
|
|
|
|
|
|
|
undockedWidgets.push_back(curWidget);
|
|
undockedWidgets.push_back(curWidget);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- todo.push(current->mChildren[0]);
|
|
|
|
|
- todo.push(current->mChildren[1]);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ undockWidgets(&mRootContainer);
|
|
|
mRootContainer = DockContainer(this);
|
|
mRootContainer = DockContainer(this);
|
|
|
|
|
|
|
|
// Load layout
|
|
// Load layout
|
|
@@ -690,55 +722,70 @@ namespace BansheeEngine
|
|
|
// Prune layout by removing invalid leafs (ones with no widgets, or widgets that no longer exist)
|
|
// Prune layout by removing invalid leafs (ones with no widgets, or widgets that no longer exist)
|
|
|
layout->pruneInvalidLeaves();
|
|
layout->pruneInvalidLeaves();
|
|
|
|
|
|
|
|
- // Dock elements
|
|
|
|
|
- const DockManagerLayout::Entry* rootEntry = &layout->getRootEntry();
|
|
|
|
|
- const DockManagerLayout::Entry* leafEntry = GetLeafEntry(rootEntry, 0);
|
|
|
|
|
|
|
+ if (layout->isMaximized())
|
|
|
|
|
+ {
|
|
|
|
|
+ mRestoredLayout = layout->clone();
|
|
|
|
|
+ mRestoredLayout->setIsMaximized(false, Vector<String>());
|
|
|
|
|
|
|
|
- if(leafEntry->widgetNames.size() > 0) // If zero, entire layout is empty
|
|
|
|
|
|
|
+ const Vector<String>& maximizedWidgets = mRestoredLayout->getMaximizedWidgetNames();
|
|
|
|
|
+ if (maximizedWidgets.size() > 0) // If zero, entire layout is empty
|
|
|
|
|
+ {
|
|
|
|
|
+ mRootContainer.makeLeaf(mParentWindow);
|
|
|
|
|
+ OpenWidgets(&mRootContainer, maximizedWidgets);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
{
|
|
{
|
|
|
- mRootContainer.makeLeaf(mParentWindow);
|
|
|
|
|
- OpenWidgets(&mRootContainer, leafEntry->widgetNames);
|
|
|
|
|
|
|
+ // Dock elements
|
|
|
|
|
+ const DockManagerLayout::Entry* rootEntry = &layout->getRootEntry();
|
|
|
|
|
+ const DockManagerLayout::Entry* leafEntry = GetLeafEntry(rootEntry, 0);
|
|
|
|
|
|
|
|
- if(!rootEntry->isLeaf)
|
|
|
|
|
|
|
+ if (leafEntry->widgetNames.size() > 0) // If zero, entire layout is empty
|
|
|
{
|
|
{
|
|
|
- Stack<StackEntry> layoutTodo;
|
|
|
|
|
- layoutTodo.push(StackEntry(rootEntry, &mRootContainer));
|
|
|
|
|
|
|
+ mRootContainer.makeLeaf(mParentWindow);
|
|
|
|
|
+ OpenWidgets(&mRootContainer, leafEntry->widgetNames);
|
|
|
|
|
|
|
|
- while(!layoutTodo.empty())
|
|
|
|
|
|
|
+ if (!rootEntry->isLeaf)
|
|
|
{
|
|
{
|
|
|
- StackEntry curEntry = layoutTodo.top();
|
|
|
|
|
- layoutTodo.pop();
|
|
|
|
|
|
|
+ Stack<StackEntry> layoutTodo;
|
|
|
|
|
+ layoutTodo.push(StackEntry(rootEntry, &mRootContainer));
|
|
|
|
|
|
|
|
- leafEntry = GetLeafEntry(curEntry.layoutEntry->children[1], 0);
|
|
|
|
|
|
|
+ while (!layoutTodo.empty())
|
|
|
|
|
+ {
|
|
|
|
|
+ StackEntry curEntry = layoutTodo.top();
|
|
|
|
|
+ layoutTodo.pop();
|
|
|
|
|
|
|
|
- curEntry.container->splitContainer(curEntry.layoutEntry->horizontalSplit, false, curEntry.layoutEntry->splitPosition);
|
|
|
|
|
|
|
+ leafEntry = GetLeafEntry(curEntry.layoutEntry->children[1], 0);
|
|
|
|
|
|
|
|
- DockContainer* otherChild = curEntry.container->mChildren[1];
|
|
|
|
|
- OpenWidgets(otherChild, leafEntry->widgetNames);
|
|
|
|
|
|
|
+ curEntry.container->splitContainer(curEntry.layoutEntry->horizontalSplit, false, curEntry.layoutEntry->splitPosition);
|
|
|
|
|
|
|
|
- if(!curEntry.layoutEntry->children[0]->isLeaf)
|
|
|
|
|
- layoutTodo.push(StackEntry(curEntry.layoutEntry->children[0], curEntry.container->mChildren[0]));
|
|
|
|
|
|
|
+ DockContainer* otherChild = curEntry.container->mChildren[1];
|
|
|
|
|
+ OpenWidgets(otherChild, leafEntry->widgetNames);
|
|
|
|
|
|
|
|
- if(!curEntry.layoutEntry->children[1]->isLeaf)
|
|
|
|
|
- layoutTodo.push(StackEntry(curEntry.layoutEntry->children[1], curEntry.container->mChildren[1]));
|
|
|
|
|
|
|
+ if (!curEntry.layoutEntry->children[0]->isLeaf)
|
|
|
|
|
+ layoutTodo.push(StackEntry(curEntry.layoutEntry->children[0], curEntry.container->mChildren[0]));
|
|
|
|
|
+
|
|
|
|
|
+ if (!curEntry.layoutEntry->children[1]->isLeaf)
|
|
|
|
|
+ layoutTodo.push(StackEntry(curEntry.layoutEntry->children[1], curEntry.container->mChildren[1]));
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- // Set container sizes
|
|
|
|
|
- {
|
|
|
|
|
- Stack<StackEntry> layoutTodo;
|
|
|
|
|
- layoutTodo.push(StackEntry(rootEntry, &mRootContainer));
|
|
|
|
|
-
|
|
|
|
|
- while(!layoutTodo.empty())
|
|
|
|
|
|
|
+ // Set container sizes
|
|
|
{
|
|
{
|
|
|
- StackEntry curEntry = layoutTodo.top();
|
|
|
|
|
- layoutTodo.pop();
|
|
|
|
|
|
|
+ Stack<StackEntry> layoutTodo;
|
|
|
|
|
+ layoutTodo.push(StackEntry(rootEntry, &mRootContainer));
|
|
|
|
|
|
|
|
- if(!curEntry.layoutEntry->isLeaf)
|
|
|
|
|
|
|
+ while (!layoutTodo.empty())
|
|
|
{
|
|
{
|
|
|
- layoutTodo.push(StackEntry(curEntry.layoutEntry->children[0], curEntry.container->mChildren[0]));
|
|
|
|
|
- layoutTodo.push(StackEntry(curEntry.layoutEntry->children[1], curEntry.container->mChildren[1]));
|
|
|
|
|
|
|
+ StackEntry curEntry = layoutTodo.top();
|
|
|
|
|
+ layoutTodo.pop();
|
|
|
|
|
+
|
|
|
|
|
+ if (!curEntry.layoutEntry->isLeaf)
|
|
|
|
|
+ {
|
|
|
|
|
+ layoutTodo.push(StackEntry(curEntry.layoutEntry->children[0], curEntry.container->mChildren[0]));
|
|
|
|
|
+ layoutTodo.push(StackEntry(curEntry.layoutEntry->children[1], curEntry.container->mChildren[1]));
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -753,6 +800,45 @@ namespace BansheeEngine
|
|
|
setArea(mArea.x, mArea.y, mArea.width, mArea.height);
|
|
setArea(mArea.x, mArea.y, mArea.width, mArea.height);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ void DockManager::toggleMaximize(DockContainer* container)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (mIsMaximized)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (mRestoredLayout != nullptr)
|
|
|
|
|
+ setLayout(mRestoredLayout);
|
|
|
|
|
+
|
|
|
|
|
+ mRestoredLayout = nullptr;
|
|
|
|
|
+ mMaximizedContainer = nullptr;
|
|
|
|
|
+ mIsMaximized = false;
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ mRestoredLayout = getLayout();
|
|
|
|
|
+ mMaximizedContainer = container;
|
|
|
|
|
+
|
|
|
|
|
+ Vector<String> maximizedWidgetNames;
|
|
|
|
|
+ if (container->mWidgets != nullptr)
|
|
|
|
|
+ {
|
|
|
|
|
+ UINT32 numWidgets = container->mWidgets->getNumWidgets();
|
|
|
|
|
+
|
|
|
|
|
+ for (UINT32 i = 0; i < numWidgets; i++)
|
|
|
|
|
+ {
|
|
|
|
|
+ EditorWidgetBase* widget = container->mWidgets->getWidget(i);
|
|
|
|
|
+ maximizedWidgetNames.push_back(widget->getName());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ DockManagerLayoutPtr maxLayout = bs_shared_ptr_new<DockManagerLayout>();
|
|
|
|
|
+ DockManagerLayout::Entry& rootEntry = maxLayout->getRootEntry();
|
|
|
|
|
+
|
|
|
|
|
+ rootEntry.isLeaf = true;
|
|
|
|
|
+ rootEntry.widgetNames = maximizedWidgetNames;
|
|
|
|
|
+
|
|
|
|
|
+ setLayout(maxLayout);
|
|
|
|
|
+ mIsMaximized = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
void DockManager::updateClippedBounds()
|
|
void DockManager::updateClippedBounds()
|
|
|
{
|
|
{
|
|
|
// TODO - Clipping not actually accounted for but shouldn't matter as right now DockManager is only used in one specific situation
|
|
// TODO - Clipping not actually accounted for but shouldn't matter as right now DockManager is only used in one specific situation
|