|
@@ -613,3 +613,25 @@ void GuiSplitContainer::onMouseDragged( const GuiEvent &event )
|
|
solvePanelConstraints(newDragPos, firstPanel, secondPanel, clientRect);
|
|
solvePanelConstraints(newDragPos, firstPanel, secondPanel, clientRect);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+void GuiSplitContainer::setSplitPoint(Point2I splitPoint)
|
|
|
|
+{
|
|
|
|
+ GuiContainer *firstPanel = dynamic_cast<GuiContainer*>(at(0));
|
|
|
|
+ GuiContainer *secondPanel = dynamic_cast<GuiContainer*>(at(1));
|
|
|
|
+
|
|
|
|
+ // This function will constrain the panels to their minExtents and update the mSplitPoint
|
|
|
|
+ if (firstPanel && secondPanel)
|
|
|
|
+ {
|
|
|
|
+ RectI clientRect = getClientRect();
|
|
|
|
+
|
|
|
|
+ solvePanelConstraints(splitPoint, firstPanel, secondPanel, clientRect);
|
|
|
|
+
|
|
|
|
+ layoutControls(clientRect);
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+DefineEngineMethod(GuiSplitContainer, setSplitPoint, void, (Point2I splitPoint), ,
|
|
|
|
+ "Set the position of the split handle.")
|
|
|
|
+{
|
|
|
|
+ object->setSplitPoint(splitPoint);
|
|
|
|
+}
|