6 This program will load and run one of the individual demos in this 7 directory within its own frame window. Just specify the module name 13 import wx.lib.mixins.inspection
17 from libCatKernel
import *
24 overviewText =
"CAT Configuration Window" 25 def __init__(self, app, parent, obj , objpath, objtype):
26 wx.Frame.__init__(self, parent, wx.NewId(), objpath)
32 self.
path=os.path.join(os.environ.get(
"CATPATH"),
"CatPython",
"python")
34 res=xrc.XmlResource(os.path.join(self.
path,
"xrc/ConfPanel.xrc"))
35 self.
main=res.LoadPanel(self,
"ConfPanel")
36 self.Bind(wx.EVT_CLOSE, self.
onClose)
37 self.
onEdit(obj, objpath, objtype)
39 def onEdit(self, obj, path, objtype):
65 '''Retrieves the given control (within a dialog) by its xmlid''' 66 control = panel.FindWindowById(xrc.XRCID(xmlid))
67 assert control !=
None,
'Programming error: a control with xml id ' + xmlid +
' was not found.' 72 TB_CLOSEALL=wx.NewId()
75 self.
toolBar = self.CreateToolBar(wx.TB_DOCKABLE)
76 self.
toolBar.AddLabelTool(TB_CLOSE,
'', wx.Bitmap(os.path.join(self.
path,
"xrc/icons/closeall.png")))
78 self.
toolBar.AddLabelTool(TB_RELOAD,
'', wx.Bitmap(os.path.join(self.
path,
"xrc/icons/reload.png")))
80 self.Bind(wx.EVT_TOOL, self.
onReLoad , id=TB_RELOAD)
81 self.Bind(wx.EVT_TOOL, self.
onClose , id=TB_CLOSE)
84 '''Responds to idle time in the system''' 90 self.
parent.cfgFrame.Show(
False)
101 for p
in range(len(self.
parent.paths)):
103 self.
parent.cfgpanels.pop(p)
def __init__(self, app, parent, obj, objpath, objtype)
def getControl(self, panel, xmlid)
def Edit(cat, obj, panel, path)
def onIconize(self, event)
def onChange(self, event)
def onReLoad(self, event)
def onEdit(self, obj, path, objtype)