Example #1
0
 def __checkChanged(self, evt):
     index = evt.GetSelection()
     label = self._toolbarListBox.GetString(index)
     
     isChecked = False
     if self._toolbarListBox.IsChecked(index):
         isChecked = True
         
     shownToolbars = Application.getMainFrame().getLayoutManager().getToolbars()
         
     toolbars = Application.getMainFrame().getToolbarManager().getToolbars()
     if not toolbars.has_key(label):
         return
     
     toolbar = toolbars[label]
     if toolbar is None:
         return
     
     if isChecked:
         if shownToolbars.has_key(label):
             return
         Application.getMainFrame().getLayoutManager().addToolbar(label, toolbar)
     else:
         if not shownToolbars.has_key(label):
             return
         Application.getMainFrame().getLayoutManager().removeToolbar(label)
Example #2
0
 def __initializeComponents(self):
     sizer = wx.BoxSizer(wx.VERTICAL)
     
     toolbars = Application.getMainFrame().getToolbarManager().getToolbars()
     shownToolbars = Application.getMainFrame().getLayoutManager().getToolbars()
     
     self._toolbarListBox = wx.CheckListBox(self, -1, choices=toolbars.keys())
     
     index = 0
     indexes = []
     for toolbarName in toolbars.keys():
         if shownToolbars.has_key(toolbarName):
             indexes.append(index)
         index += 1
     self._toolbarListBox.SetChecked(indexes)            
     
     sizer.Add(self._toolbarListBox, 0, wx.EXPAND | wx.ALL, 5)
     
     self.Bind(wx.EVT_CHECKLISTBOX, self.__checkChanged, self._toolbarListBox)
     
     self.SetSizer(sizer)
     sizer.Fit(self)
Example #3
0
    def execute(self, evt):
        info = wx.AboutDialogInfo()
        info.Name = "Graver"
        info.Version = "0.0.1"
        #        info.Copyright = "(C) 2006 Programmers and Coders Everywhere"
        info.Description = wordwrap(
            "Graver is a light text editor which created by Python and wxPython.\n"
            "This text editor implemented plugin interface for developers.\n"
            "Developers could create their own panels, editors, menus and toolbars to extend the function of this editor.\n"
            "In the future, this text editor will be implemented to a lightly IDE.\n",
            350,
            wx.ClientDC(Application.getMainFrame()),
        )
        info.WebSite = ("http://graver.sourceforge.net", "Graver Home Page")
        info.Developers = ["Tiny Strimp"]

        #        info.License = wordwrap(licenseText, 500, wx.ClientDC(self))

        # Then we call wx.AboutBox giving it that info object
        wx.AboutBox(info)
Example #4
0
 def initApp(self, argv):
     self.initData(argv)
     self.initUI(argv)
     
     Application.getMainFrame().Show(True)
Example #5
0
 def execute(self, evt):
     mainFrm = Application.getMainFrame()
     if mainFrm is None:
         return
     mainFrm.Close()