]>
Commit | Line | Data |
---|---|---|
1 | #!/bin/env python | |
2 | #---------------------------------------------------------------------------- | |
3 | ## import all of the wxPython GUI package | |
4 | from wxPython.wx import * | |
5 | ||
6 | ||
7 | #--------------------------------------------------------------------------- | |
8 | class GeneralTab(wxWindow): | |
9 | def __init__(self,parent,id): | |
10 | wxWindow.__init__(self,parent,id,wxPoint(5,25)) | |
11 | self.Opts = {} | |
12 | hdr = wxStaticText(self,-1,"This space left intentionally blank.",wxPoint(5,10)) | |
13 | def GetOpts(self): | |
14 | return self.Opts | |
15 | ||
16 | class ServersTab(wxWindow): | |
17 | def __init__(self,parent,id): | |
18 | wxWindow.__init__(self,parent,id,wxPoint(5,25)) | |
19 | hdr = wxStaticText(self,-1,"This is also blank on purpose.",wxPoint(5,10)) | |
20 | self.Opts = {} | |
21 | def GetOpts(self): | |
22 | return self.Opts | |
23 | ||
24 | class OptionsTab(wxWindow): | |
25 | def __init__(self,parent,id): | |
26 | wxWindow.__init__(self,parent,id,wxPoint(5,25)) | |
27 | hdr = wxStaticText(self,-1,"Quit bugging me!.",wxPoint(5,10)) | |
28 | self.Opts = {} | |
29 | def GetOpts(self): | |
30 | return self.Opts | |
31 | ||
32 | class SettingsWindow(wxFrame): | |
33 | NOTEBOOK = 3201 | |
34 | GENERAL_TAB = 3210 | |
35 | OPTIONS_TAB = 3211 | |
36 | SERVERS_TAB = 3212 | |
37 | ||
38 | def __init__(self,parent,id): | |
39 | self.id = id | |
40 | self.parent = parent | |
41 | wxFrame.__init__(self,parent,id,'Pyces Settings', | |
42 | wxPoint(50,50), wxSize(350,475), | |
43 | wxDIALOG_MODAL|wxSTATIC_BORDER|wxCAPTION|wxSYSTEM_MENU) | |
44 | nb = wxNotebook(self, self.NOTEBOOK) | |
45 | self.GeneralTab = GeneralTab(self,-1) | |
46 | self.OptionsTab = OptionsTab(self,-1) | |
47 | self.ServersTab = ServersTab(self,-1) | |
48 | nb.AddPage(self.GeneralTab,'General') | |
49 | nb.AddPage(self.OptionsTab,'Options') | |
50 | nb.AddPage(self.ServersTab,'Servers') | |
51 | nb.SetSelection(0) | |
52 | nb.SetSize(wxSize(350,420)) | |
53 | ||
54 | ||
55 | ||
56 | #--------------------------------------------------------------------------- | |
57 | ||
58 | class MyApp(wxApp): | |
59 | def OnInit(self): | |
60 | frame = SettingsWindow(NULL, -1) | |
61 | #frame.ShowModal() | |
62 | #return false | |
63 | frame.Show(true) | |
64 | self.SetTopWindow(frame) | |
65 | return true | |
66 | ||
67 | #--------------------------------------------------------------------------- | |
68 | ||
69 | ||
70 | app = MyApp(0) # Create an instance of the application class | |
71 | app.MainLoop() # Tell it to start processing events | |
72 | ||
73 | #---------------------------------------------------------------------------- | |
74 | # | |
75 |