From: <sv...@ww...> - 2008-01-14 21:38:35
|
Author: nsmoooose Date: 2008-01-14 13:38:24 -0800 (Mon, 14 Jan 2008) New Revision: 2207 Modified: branches/layout_tool_improvements/csp/tools/layout2/cpp/OsgGraphicsWindow.h branches/layout_tool_improvements/csp/tools/layout2/scripts/ui/MainFrame.py Log: Reorganized the ui a little. This makes it possible to display several tool windows to the left. Removed a strange inheritance that wasn't in use. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=2207 Modified: branches/layout_tool_improvements/csp/tools/layout2/cpp/OsgGraphicsWindow.h =================================================================== --- branches/layout_tool_improvements/csp/tools/layout2/cpp/OsgGraphicsWindow.h 2008-01-12 23:10:52 UTC (rev 2206) +++ branches/layout_tool_improvements/csp/tools/layout2/cpp/OsgGraphicsWindow.h 2008-01-14 21:38:24 UTC (rev 2207) @@ -36,7 +36,7 @@ /* This is a graphical window that we can draw 3D into. It is called from a wxPython window (wx.glcanvas.GLCanvas inherited class). This makes it possible to integrate wxPython and open scene graph. */ -class OsgGraphicsWindow : public osgViewer::GraphicsWindow { +class OsgGraphicsWindow { public: typedef sigc::signal<void> VoidSignal; Modified: branches/layout_tool_improvements/csp/tools/layout2/scripts/ui/MainFrame.py =================================================================== --- branches/layout_tool_improvements/csp/tools/layout2/scripts/ui/MainFrame.py 2008-01-12 23:10:52 UTC (rev 2206) +++ branches/layout_tool_improvements/csp/tools/layout2/scripts/ui/MainFrame.py 2008-01-14 21:38:24 UTC (rev 2207) @@ -54,32 +54,38 @@ # Status bar control at the bottom of the screen. statusBar = wx.StatusBar(self) self.SetStatusBar(statusBar) + + # Divides the document area from the properties control. + # To the left we have a project, properties and that type + # of controls. To the right we have all opened documents. + splitter1 = wx.SplitterWindow(self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.SP_NOBORDER) + propertyNotebook = wx.Notebook(splitter1, wx.ID_ANY, style=wx.NB_LEFT) + documentNotebook = wx.Notebook(splitter1, wx.ID_ANY) + splitter1.SplitVertically(propertyNotebook, documentNotebook, 200) - notebook = wx.Notebook(self, wx.ID_ANY) - startPage = wx.richtext.RichTextCtrl(notebook) + # Add the first document to this window. + startPage = wx.richtext.RichTextCtrl(documentNotebook) startPage.GetBuffer().LoadFile("start.txt") startPage.SetEditable(False) - notebook.AddPage(startPage, "Start") - - - # Create the splitter window that will divide the display in two - # parts. The left part contains the tree control. The right - # part is displaying the 3D scene. - scenePage = wx.SplitterWindow(notebook, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.SP_NOBORDER) - self.leftWindow = wx.TreeCtrl(scenePage, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TR_HAS_BUTTONS | wx.BORDER_NONE) - self.rightWindow = SceneWindow(scenePage, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.BORDER_NONE, "GLCanvas", 0, wx.NullPalette) - scenePage.SplitVertically(self.leftWindow, self.rightWindow) - - notebook.AddPage(scenePage, "Scene") + documentNotebook.AddPage(startPage, "Start") + # Add the tree control that displays all files in the project. + scenePage = SceneWindow(documentNotebook, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.BORDER_NONE, "GLCanvas", 0, wx.NullPalette) + documentNotebook.AddPage(scenePage, "Scene") + self.scene = scenePage + + # Display the tree control with all files in this project. + projectTreePage = wx.TreeCtrl(propertyNotebook, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TR_HAS_BUTTONS | wx.BORDER_NONE) + propertyNotebook.AddPage(projectTreePage, "Project") + # Connect idle event. wx.EVT_IDLE(self, self.on_Idle) def on_Idle(self, event): # Only render when the scene is visible on screen. - if self.rightWindow.IsShownOnScreen(): - self.rightWindow.Frame() + if self.scene.IsShownOnScreen(): + self.scene.Frame() event.RequestMore() def GetSceneWindow(self): - return self.rightWindow \ No newline at end of file + return self.scene \ No newline at end of file |