[xiph-commits] r7459 - trunk/xinloe
arc at motherfish-iii.xiph.org
arc
Thu Aug 5 19:07:40 PDT 2004
Author: arc
Date: Thu Aug 5 19:07:40 2004
New Revision: 7459
Added:
trunk/xinloe/workbox.py
Modified:
trunk/xinloe/main.py
Log:
Didn't have alot of time tonight, but started moving the project stuff
to it's own file. Hopefully will be more productive tomarrow.
Modified: trunk/xinloe/main.py
===================================================================
--- trunk/xinloe/main.py 2004-08-03 03:11:11 UTC (rev 7458)
+++ trunk/xinloe/main.py 2004-08-03 03:39:15 UTC (rev 7459)
@@ -19,6 +19,7 @@
'''
from general import *
+from workbox import *
from sandbox import *
from infobox import *
@@ -99,37 +100,30 @@
return
def OnNewWindow(self, evt):
- self.winCount = self.winCount + 1
- win = wxPanel(self.mainWin.projectWin, -1)
- self.mainWin.projectWin.AddPage(win, 'Untitled %d' % self.winCount)
- #win = wxMDIChildFrame(self.mainWin.projectWin, -1, "Untitled %d" % self.winCount)
- #canvas = MyCanvas(win)
- #win.Show(True)
+ self.mainWin.workWin.NewProject()
def OnExit(self, evt):
self.Close(True)
+class MyCanvas(wxScrolledWindow):
+ def __init__(self, win):
+ wxScrolledWindow.__init__(self, win)
+ self.SetBackgroundColour('White')
class MainWindow(wxSplitterWindow):
def __init__(self, parent):
wxSplitterWindow.__init__(self, parent, -1)
- # Project Window
- self.projectWin = ProjectPanel(self)
+ # Work Window
+ self.workWin = WorkPanel(self)
# Bottom Window
self.bottomWin = BottomWindow(self)
self.SetMinimumPaneSize(5)
- #self.SplitHorizontally(self.sandboxWin, self.projectWin, 100)
- #self.SplitVertically(self.projectWin, self.sandboxWin, 100)
- self.SplitHorizontally(self.projectWin, self.bottomWin, 250)
+ self.SplitHorizontally(self.workWin, self.bottomWin, 200)
-class ProjectPanel(wxNotebook):
- def __init__(self, parent):
- wxNotebook.__init__(self, parent, -1, style=wxNB_BOTTOM)
-
class BottomWindow(wxSplitterWindow):
def __init__(self, parent):
wxSplitterWindow.__init__(self, parent, -1)
@@ -141,7 +135,7 @@
self.infoboxWin = InfoboxPanel(self)
self.SetMinimumPaneSize(5)
- self.SplitVertically(self.sandboxWin, self.infoboxWin, 150)
+ self.SplitVertically(self.sandboxWin, self.infoboxWin, 250)
Added: trunk/xinloe/workbox.py
===================================================================
--- trunk/xinloe/workbox.py 2004-08-03 03:11:11 UTC (rev 7458)
+++ trunk/xinloe/workbox.py 2004-08-03 03:39:15 UTC (rev 7459)
@@ -0,0 +1,50 @@
+'''
+ Xinloe -- A Python-Based Non-Linear Ogg Editor
+ Copyright (C) 2004 Arc Riley <arc at Xiph.org>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+'''
+
+from general import *
+
+class WorkPanel(wxNotebook):
+ def __init__(self, parent):
+ wxNotebook.__init__(self, parent, -1, style=wxNB_BOTTOM)
+ self.winCount = 0
+
+ def NewProject(self):
+ self.winCount = self.winCount + 1
+ win = self.MyCanvas(self)
+ self.AddPage(win, 'Untitled %d' % self.winCount)
+
+ class MyCanvas(wxScrolledPanel):
+ def __init__(self, win):
+ wxScrolledPanel.__init__(self, win)
+ self.SetBackgroundColour('White')
+ self.workwin = WorkboxScrolledPanel(self)
+ self.worksizer = wxBoxSizer(wxVERTICAL)
+ self.worksizer.Add(self.workwin, 1, wxEXPAND, 0)
+ self.SetSizer(self.worksizer)
+ self.SetupScrolling()
+ self.SetAutoLayout(1)
+
+
+class WorkboxScrolledPanel(wxWindow, wxPanel):
+ def __init__(self, parent):
+ wxPanel.__init__(self, parent, -1)
+ self.SetBackgroundColour('White')
+ self.SetAutoLayout(1)
+
More information about the commits
mailing list