Cat
LogFrame.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 #----------------------------------------------------------------------------
3 #----------------------------------------------------------------------------
4 
5 """
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
8 on the command line.
9 """
10 
11 import wx
12 import wx.xrc as xrc
13 import wx.lib.mixins.inspection
14 import sys, os
15 
16 import images
17 from libCatKernel import *
18 
19 from tools import opj
20 
21 #----------------------------------------------------------------------------
22 class LogFrame(wx.Frame):
23  overviewText = "CAT Configuration Window"
24  def __init__(self,app,parent,title):
25  wx.Frame.__init__(self, parent, wx.NewId(), title)
26  self.path=os.path.join(os.environ.get("CATLAL"), "CatPython", "python")
27  res=xrc.XmlResource(os.path.join(self.path,"xrc/ConfPanel.xrc"))
28  self.panel=res.LoadPanel(self, "ConfPanel")
29 
30  def onIdle(self, event):
31  '''Responds to idle time in the system'''
32  # when the timer says it's time, we do the actual downloading in the main thread (wx doesn't work well in secondary threads)
33  print "hello"
34 
35  def onCloseConfirm(self, event):
36  '''Closes the application'''
37  dlg = wx.MessageDialog(self, "Exit the program?", "Exit", wx.YES_NO | wx.ICON_QUESTION)
38  if dlg.ShowModal() == wx.ID_YES:
39  dlg.Destroy() # frame
40  self.Destroy()
41 
42  def onClose(self, event):
43  '''Closes the application'''
44  self.Destroy()
45 
46  def onExit(self, event):
47  '''Exit the app'''
48  self.Close(True)
49 # exit(2)
50 
51 
52 
53 #----------------------------------------------------------------------------
54 
55 
56 
def onIdle(self, event)
Definition: LogFrame.py:30
def __init__(self, app, parent, title)
Definition: LogFrame.py:24
def onExit(self, event)
Definition: LogFrame.py:46
def onClose(self, event)
Definition: LogFrame.py:42
def onCloseConfirm(self, event)
Definition: LogFrame.py:35