295 |
295 |
296 self.PluginChilds = wx.Choice(id=ID_BEREMIZPLUGINCHILDS, |
296 self.PluginChilds = wx.Choice(id=ID_BEREMIZPLUGINCHILDS, |
297 name='PluginChilds', parent=self.LeftPanel, pos=wx.Point(0, 0), |
297 name='PluginChilds', parent=self.LeftPanel, pos=wx.Point(0, 0), |
298 size=wx.Size(-1, -1), style=0) |
298 size=wx.Size(-1, -1), style=0) |
299 |
299 |
300 self.AddButton = wx.lib.buttons.GenBitmapButton(ID=ID_BEREMIZADDBUTTON, bitmap=wx.Bitmap(os.path.join('images', 'Add.png')), |
300 if wx.VERSION < (2, 8, 0): |
301 name='AddBusButton', parent=self.LeftPanel, pos=wx.Point(0, 0), |
301 self.AddButton = wx.lib.buttons.GenBitmapButton(ID=ID_BEREMIZADDBUTTON, bitmap=wx.Bitmap(os.path.join('images', 'Add.png')), |
302 size=wx.Size(32, 32), style=wx.NO_BORDER) |
302 name='AddBusButton', parent=self.LeftPanel, pos=wx.Point(0, 0), |
|
303 size=wx.Size(32, 32), style=wx.NO_BORDER) |
|
304 else: |
|
305 self.AddButton = wx.lib.buttons.GenBitmapButton(id=ID_BEREMIZADDBUTTON, bitmap=wx.Bitmap(os.path.join('images', 'Add.png')), |
|
306 name='AddBusButton', parent=self.LeftPanel, pos=wx.Point(0, 0), |
|
307 size=wx.Size(32, 32), style=wx.NO_BORDER) |
|
308 |
303 self.AddButton.SetToolTipString("Add a plugin of the type selected") |
309 self.AddButton.SetToolTipString("Add a plugin of the type selected") |
304 self.AddButton.Bind(wx.EVT_BUTTON, self.OnAddButton, |
310 self.AddButton.Bind(wx.EVT_BUTTON, self.OnAddButton, |
305 id=ID_BEREMIZADDBUTTON) |
311 id=ID_BEREMIZADDBUTTON) |
306 |
312 |
307 self.DeleteButton = wx.lib.buttons.GenBitmapButton(ID=ID_BEREMIZDELETEBUTTON, bitmap=wx.Bitmap(os.path.join('images', 'Delete.png')), |
313 if wx.VERSION < (2, 8, 0): |
308 name='DeleteBusButton', parent=self.LeftPanel, pos=wx.Point(0, 0), |
314 self.DeleteButton = wx.lib.buttons.GenBitmapButton(ID=ID_BEREMIZDELETEBUTTON, bitmap=wx.Bitmap(os.path.join('images', 'Delete.png')), |
309 size=wx.Size(32, 32), style=wx.NO_BORDER) |
315 name='DeleteBusButton', parent=self.LeftPanel, pos=wx.Point(0, 0), |
|
316 size=wx.Size(32, 32), style=wx.NO_BORDER) |
|
317 else: |
|
318 self.DeleteButton = wx.lib.buttons.GenBitmapButton(id=ID_BEREMIZDELETEBUTTON, bitmap=wx.Bitmap(os.path.join('images', 'Delete.png')), |
|
319 name='DeleteBusButton', parent=self.LeftPanel, pos=wx.Point(0, 0), |
|
320 size=wx.Size(32, 32), style=wx.NO_BORDER) |
310 self.DeleteButton.SetToolTipString("Delete the current selected plugin") |
321 self.DeleteButton.SetToolTipString("Delete the current selected plugin") |
311 self.DeleteButton.Bind(wx.EVT_BUTTON, self.OnDeleteButton, |
322 self.DeleteButton.Bind(wx.EVT_BUTTON, self.OnDeleteButton, |
312 id=ID_BEREMIZDELETEBUTTON) |
323 id=ID_BEREMIZDELETEBUTTON) |
313 |
324 |
314 self.RightPanel = wx.Panel(id=ID_BEREMIZLEFTPANEL, |
325 self.RightPanel = wx.Panel(id=ID_BEREMIZLEFTPANEL, |
503 self.MenuSizer.AddSizer(boxsizer, 0, border=5, flag=wx.GROW|wx.ALL) |
514 self.MenuSizer.AddSizer(boxsizer, 0, border=5, flag=wx.GROW|wx.ALL) |
504 for plugin_infos in self.PluginRoot.PluginMethods: |
515 for plugin_infos in self.PluginRoot.PluginMethods: |
505 if "method" in plugin_infos: |
516 if "method" in plugin_infos: |
506 id = wx.NewId() |
517 id = wx.NewId() |
507 if "bitmap" in plugin_infos: |
518 if "bitmap" in plugin_infos: |
508 button = wx.lib.buttons.GenBitmapTextButton(ID=id, parent=self.RightPanel, |
519 if wx.VERSION < (2, 8, 0): |
509 bitmap=wx.Bitmap(plugin_infos["bitmap"]), label=plugin_infos["name"], |
520 button = wx.lib.buttons.GenBitmapTextButton(ID=id, parent=self.RightPanel, |
510 name=plugin_infos["name"], pos=wx.Point(0, 0), style=wx.BU_EXACTFIT|wx.NO_BORDER) |
521 bitmap=wx.Bitmap(plugin_infos["bitmap"]), label=plugin_infos["name"], |
|
522 name=plugin_infos["name"], pos=wx.Point(0, 0), style=wx.BU_EXACTFIT|wx.NO_BORDER) |
|
523 else: |
|
524 button = wx.lib.buttons.GenBitmapTextButton(id=id, parent=self.RightPanel, |
|
525 bitmap=wx.Bitmap(plugin_infos["bitmap"]), label=plugin_infos["name"], |
|
526 name=plugin_infos["name"], pos=wx.Point(0, 0), style=wx.BU_EXACTFIT|wx.NO_BORDER) |
|
527 |
511 else: |
528 else: |
512 button = wx.Button(id=id, label=plugin_infos["name"], |
529 button = wx.Button(id=id, label=plugin_infos["name"], |
513 name=plugin_infos["name"], parent=self.RightPanel, |
530 name=plugin_infos["name"], parent=self.RightPanel, |
514 pos=wx.Point(0, 0), style=wx.BU_EXACTFIT) |
531 pos=wx.Point(0, 0), style=wx.BU_EXACTFIT) |
515 button.SetToolTipString(plugin_infos["tooltip"]) |
532 button.SetToolTipString(plugin_infos["tooltip"]) |
522 self.MenuSizer.AddSizer(boxsizer, 0, border=5, flag=wx.GROW|wx.ALL) |
539 self.MenuSizer.AddSizer(boxsizer, 0, border=5, flag=wx.GROW|wx.ALL) |
523 for plugin_infos in plugin.PluginMethods: |
540 for plugin_infos in plugin.PluginMethods: |
524 if "method" in plugin_infos: |
541 if "method" in plugin_infos: |
525 id = wx.NewId() |
542 id = wx.NewId() |
526 if "bitmap" in plugin_infos: |
543 if "bitmap" in plugin_infos: |
527 button = wx.lib.buttons.GenBitmapTextButton(ID=id, parent=self.RightPanel, |
544 if wx.VERSION < (2, 8, 0): |
528 bitmap=wx.Bitmap(plugin_infos["bitmap"]), label=plugin_infos["name"], |
545 button = wx.lib.buttons.GenBitmapTextButton(ID=id, parent=self.RightPanel, |
529 name=plugin_infos["name"], pos=wx.Point(0, 0), style=wx.BU_EXACTFIT|wx.NO_BORDER) |
546 bitmap=wx.Bitmap(plugin_infos["bitmap"]), label=plugin_infos["name"], |
|
547 name=plugin_infos["name"], pos=wx.Point(0, 0), style=wx.BU_EXACTFIT|wx.NO_BORDER) |
|
548 else: |
|
549 button = wx.lib.buttons.GenBitmapTextButton(id=id, parent=self.RightPanel, |
|
550 bitmap=wx.Bitmap(plugin_infos["bitmap"]), label=plugin_infos["name"], |
|
551 name=plugin_infos["name"], pos=wx.Point(0, 0), style=wx.BU_EXACTFIT|wx.NO_BORDER) |
530 else: |
552 else: |
531 button = wx.Button(id=id, label=plugin_infos["name"], |
553 button = wx.Button(id=id, label=plugin_infos["name"], |
532 name=plugin_infos["name"], parent=self.RightPanel, |
554 name=plugin_infos["name"], parent=self.RightPanel, |
533 pos=wx.Point(0, 0), style=wx.BU_EXACTFIT) |
555 pos=wx.Point(0, 0), style=wx.BU_EXACTFIT) |
534 button.SetToolTipString(plugin_infos["tooltip"]) |
556 button.SetToolTipString(plugin_infos["tooltip"]) |