--- nfo/projects/netfraggle/bin/FraggleDialogModules.py 2004/09/01 20:56:32 1.1 +++ nfo/projects/netfraggle/bin/FraggleDialogModules.py 2004/09/04 20:26:01 1.3 @@ -1,39 +1,54 @@ -#Boa:Dialog:wxModuleDialog +#Boa:Dialog:FraggleDialogModules from wxPython.wx import * +import FraggleCtlModules + def create(parent): - return wxModuleDialog(parent) + return FraggleDialogModules(parent) -[wxID_WXMODULEDIALOG, wxID_WXMODULEDIALOGBUTTON1, - wxID_WXMODULEDIALOGBUTTONSAVECLOSE, wxID_WXMODULEDIALOGCHECKLISTBOXMODULES, +[wxID_FRAGGLEDIALOGMODULES, wxID_FRAGGLEDIALOGMODULESBUTTON1, + wxID_FRAGGLEDIALOGMODULESBUTTONSAVECLOSE, + wxID_FRAGGLEDIALOGMODULESCHECKLISTBOXMODULES, ] = map(lambda _init_ctrls: wxNewId(), range(4)) -class wxModuleDialog(wxDialog): - def _init_utils(self): - # generated method, don't edit - pass - +class FraggleDialogModules(wxDialog): + def _init_ctrls(self, prnt): # generated method, don't edit - wxDialog.__init__(self, id=wxID_WXMODULEDIALOG, name='wxModuleDialog', - parent=prnt, pos=wxPoint(256, 167), size=wxSize(189, 288), - style=wxDEFAULT_DIALOG_STYLE, title='Module Setup') - self._init_utils() + wxDialog.__init__(self, id=wxID_FRAGGLEDIALOGMODULES, + name='FraggleDialogModules', parent=prnt, pos=wxPoint(256, 167), + size=wxSize(197, 315), style=wxDEFAULT_DIALOG_STYLE, + title='Module Setup') self.SetClientSize(wxSize(189, 288)) self.checkListBoxModules = wxCheckListBox(choices=[], - id=wxID_WXMODULEDIALOGCHECKLISTBOXMODULES, + id=wxID_FRAGGLEDIALOGMODULESCHECKLISTBOXMODULES, name='checkListBoxModules', parent=self, pos=wxPoint(8, 8), size=wxSize(168, 248), style=0, validator=wxDefaultValidator) + EVT_CHECKLISTBOX(self.checkListBoxModules, + wxID_FRAGGLEDIALOGMODULESCHECKLISTBOXMODULES, + self.OnCheckListBoxModulesChecklistbox) - self.buttonSaveClose = wxButton(id=wxID_WXMODULEDIALOGBUTTONSAVECLOSE, + self.buttonSaveClose = wxButton(id=wxID_FRAGGLEDIALOGMODULESBUTTONSAVECLOSE, label='Save and Close', name='buttonSaveClose', parent=self, pos=wxPoint(8, 264), size=wxSize(88, 16), style=0) - self.button1 = wxButton(id=wxID_WXMODULEDIALOGBUTTON1, label='Cancel', - name='button1', parent=self, pos=wxPoint(104, 264), - size=wxSize(72, 16), style=0) - + self.button1 = wxButton(id=wxID_FRAGGLEDIALOGMODULESBUTTON1, + label='Cancel', name='button1', parent=self, pos=wxPoint(104, + 264), size=wxSize(72, 16), style=0) + + def __init_listbox__(self,parent): + #print self.modulesCtl.modules.keys() + for i in self.modulesCtl.modules.keys(): + self.checkListBoxModules.Append(i) + def __init__(self, parent): + self.modulesCtl = parent.engine.modules self._init_ctrls(parent) + self.__init_listbox__(parent) + + def OnCheckListBoxModulesChecklistbox(self, event): + event.Skip() + +