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