1 import wx
2 import traceback
3
5 """ A base panel to support AUI managerment. """
6 - def __init__(self,
7 parent,
8 id = -1,
9 pos = wx.DefaultPosition,
10 size = wx.DefaultSize,
11 style = wx.TAB_TRAVERSAL,
12 name = ''
13 ):
18
19
23
24
26 """ Set the perspective to restore itself in AUI """
27 self._perspective = perspective
28
29
31 """ Get the perspective to restore itself in AUI """
32 return self._perspective
33
34
36 """ Restore itself in AUI """
37 try:
38 mgr = self.GetParent().GetOwnerManager()
39
40 mgr.LoadPerspective(self.GetPerspective())
41 all_panes = mgr.GetAllPanes()
42 for pane in xrange(len(all_panes)):
43 all_panes[pane].Show()
44 mgr.Update()
45
46 except:
47 pass
48
49 return
50
52 msg = wx.MessageDialog(self, msg, title, wx.ICON_ERROR|wx.OK)
53 msg.ShowModal()
54 msg.Destroy()
55