2002-04-18 01:43:08 -04:00
|
|
|
|
2003-12-08 20:23:28 -05:00
|
|
|
import wx
|
|
|
|
|
|
|
|
import MDIDemo
|
|
|
|
import MDISashDemo
|
2002-04-18 01:43:08 -04:00
|
|
|
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
|
2003-12-08 20:23:28 -05:00
|
|
|
class TestPanel(wx.Panel):
|
2002-04-18 01:43:08 -04:00
|
|
|
def __init__(self, parent, log):
|
|
|
|
self.log = log
|
2003-12-08 20:23:28 -05:00
|
|
|
wx.Panel.__init__(self, parent, -1)
|
2002-04-18 01:43:08 -04:00
|
|
|
|
2003-12-08 20:23:28 -05:00
|
|
|
b1 = wx.Button(self, -1, "MDI demo")
|
|
|
|
self.Bind(wx.EVT_BUTTON, self.ShowMDIDemo, b1)
|
2002-04-18 01:43:08 -04:00
|
|
|
|
2003-12-08 20:23:28 -05:00
|
|
|
b2 = wx.Button(self, -1, "MDI with SashWindows demo")
|
2003-12-29 20:06:02 -05:00
|
|
|
self.Bind(wx.EVT_BUTTON, self.ShowMDISashDemo, b2)
|
2002-04-18 01:43:08 -04:00
|
|
|
|
2003-12-08 20:23:28 -05:00
|
|
|
box = wx.BoxSizer(wx.VERTICAL)
|
2003-11-12 16:34:20 -05:00
|
|
|
box.Add((20, 30))
|
2003-12-08 20:23:28 -05:00
|
|
|
box.Add(b1, 0, wx.ALIGN_CENTER|wx.ALL, 15)
|
|
|
|
box.Add(b2, 0, wx.ALIGN_CENTER|wx.ALL, 15)
|
2003-03-25 01:35:27 -05:00
|
|
|
self.SetAutoLayout(True)
|
2002-04-18 01:43:08 -04:00
|
|
|
self.SetSizer(box)
|
|
|
|
|
|
|
|
|
|
|
|
def ShowMDIDemo(self, evt):
|
|
|
|
frame = MDIDemo.MyParentFrame()
|
|
|
|
frame.Show()
|
|
|
|
|
|
|
|
def ShowMDISashDemo(self, evt):
|
|
|
|
frame = MDISashDemo.MyParentFrame()
|
|
|
|
frame.Show()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
|
|
|
|
def runTest(frame, nb, log):
|
|
|
|
win = TestPanel(nb, log)
|
|
|
|
return win
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
overview = """<html><body>
|
|
|
|
<h2><center>Multiple Document Interface</center></h2>
|
|
|
|
|
|
|
|
Although Microsoft has deprecated the MDI model, wxWindows still supports
|
2003-12-08 20:23:28 -05:00
|
|
|
it. Here are a couple samples of how to use it - one straightforward, the other
|
|
|
|
showing how the MDI interface can be integrated into a SashWindow interface.
|
2002-04-18 01:43:08 -04:00
|
|
|
|
|
|
|
</body></html>
|
|
|
|
"""
|
2003-07-02 19:13:10 -04:00
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
import sys,os
|
|
|
|
import run
|
|
|
|
run.main(['', os.path.basename(sys.argv[0])])
|