1 |
xabbu |
1.2 |
#Boa:Dialog:FraggleDialogModules |
2 |
xabbu |
1.1 |
|
3 |
|
|
from wxPython.wx import * |
4 |
|
|
|
5 |
xabbu |
1.3 |
import FraggleCtlModules |
6 |
|
|
|
7 |
xabbu |
1.1 |
def create(parent): |
8 |
xabbu |
1.2 |
return FraggleDialogModules(parent) |
9 |
xabbu |
1.1 |
|
10 |
xabbu |
1.2 |
[wxID_FRAGGLEDIALOGMODULES, wxID_FRAGGLEDIALOGMODULESBUTTON1, |
11 |
|
|
wxID_FRAGGLEDIALOGMODULESBUTTONSAVECLOSE, |
12 |
|
|
wxID_FRAGGLEDIALOGMODULESCHECKLISTBOXMODULES, |
13 |
xabbu |
1.1 |
] = map(lambda _init_ctrls: wxNewId(), range(4)) |
14 |
|
|
|
15 |
xabbu |
1.2 |
class FraggleDialogModules(wxDialog): |
16 |
|
|
|
17 |
xabbu |
1.1 |
def _init_ctrls(self, prnt): |
18 |
|
|
# generated method, don't edit |
19 |
xabbu |
1.2 |
wxDialog.__init__(self, id=wxID_FRAGGLEDIALOGMODULES, |
20 |
|
|
name='FraggleDialogModules', parent=prnt, pos=wxPoint(256, 167), |
21 |
xabbu |
1.3 |
size=wxSize(197, 315), style=wxDEFAULT_DIALOG_STYLE, |
22 |
xabbu |
1.2 |
title='Module Setup') |
23 |
xabbu |
1.1 |
self.SetClientSize(wxSize(189, 288)) |
24 |
|
|
|
25 |
|
|
self.checkListBoxModules = wxCheckListBox(choices=[], |
26 |
xabbu |
1.2 |
id=wxID_FRAGGLEDIALOGMODULESCHECKLISTBOXMODULES, |
27 |
xabbu |
1.1 |
name='checkListBoxModules', parent=self, pos=wxPoint(8, 8), |
28 |
|
|
size=wxSize(168, 248), style=0, validator=wxDefaultValidator) |
29 |
xabbu |
1.3 |
EVT_CHECKLISTBOX(self.checkListBoxModules, |
30 |
|
|
wxID_FRAGGLEDIALOGMODULESCHECKLISTBOXMODULES, |
31 |
|
|
self.OnCheckListBoxModulesChecklistbox) |
32 |
xabbu |
1.1 |
|
33 |
xabbu |
1.2 |
self.buttonSaveClose = wxButton(id=wxID_FRAGGLEDIALOGMODULESBUTTONSAVECLOSE, |
34 |
xabbu |
1.1 |
label='Save and Close', name='buttonSaveClose', parent=self, |
35 |
|
|
pos=wxPoint(8, 264), size=wxSize(88, 16), style=0) |
36 |
|
|
|
37 |
xabbu |
1.2 |
self.button1 = wxButton(id=wxID_FRAGGLEDIALOGMODULESBUTTON1, |
38 |
|
|
label='Cancel', name='button1', parent=self, pos=wxPoint(104, |
39 |
|
|
264), size=wxSize(72, 16), style=0) |
40 |
xabbu |
1.1 |
|
41 |
xabbu |
1.3 |
def __init_listbox__(self,parent): |
42 |
|
|
#print self.modulesCtl.modules.keys() |
43 |
xabbu |
1.4 |
try: |
44 |
|
|
for i in self.modulesCtl.modules.keys(): |
45 |
|
|
self.checkListBoxModules.Append(i) |
46 |
|
|
except AttributeError: |
47 |
|
|
print "No Modules found" |
48 |
|
|
|
49 |
xabbu |
1.1 |
def __init__(self, parent): |
50 |
xabbu |
1.3 |
self.modulesCtl = parent.engine.modules |
51 |
xabbu |
1.1 |
self._init_ctrls(parent) |
52 |
xabbu |
1.3 |
self.__init_listbox__(parent) |
53 |
|
|
|
54 |
|
|
def OnCheckListBoxModulesChecklistbox(self, event): |
55 |
|
|
event.Skip() |
56 |
|
|
|
57 |
|
|
|