Port r13909 from the mainline.
[xiph/unicode.git] / xinloe / workbox.py
blobbf6dc445b5ca420a6577ff6259070e7072a93799
1 '''
2 Xinloe -- A Python-Based Non-Linear Ogg Editor
3 Copyright (C) 2004 Arc Riley <arc@Xiph.org>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 '''
21 from general import *
23 class WorkPanel(wxNotebook):
24 def __init__(self, parent):
25 wxNotebook.__init__(self, parent, -1, style=wxNB_BOTTOM)
26 self.winCount = 0
28 def NewProject(self):
29 self.winCount = self.winCount + 1
30 win = self.MyCanvas(self)
31 self.AddPage(win, 'Untitled %d' % self.winCount)
33 class MyCanvas(wxScrolledPanel):
34 def __init__(self, win):
35 wxScrolledPanel.__init__(self, win)
36 self.SetBackgroundColour('White')
37 self.workwin = WorkboxScrolledPanel(self)
38 self.worksizer = wxBoxSizer(wxVERTICAL)
39 self.worksizer.Add(self.workwin, 1, wxEXPAND, 0)
40 self.SetSizer(self.worksizer)
41 self.SetupScrolling()
42 self.SetAutoLayout(1)
45 class WorkboxScrolledPanel(wxWindow, wxPanel):
46 def __init__(self, parent):
47 wxPanel.__init__(self, parent, -1)
48 self.SetBackgroundColour('White')
49 self.SetAutoLayout(1)