예제 #1
0
    def __init__(self, parent, ID):
        MultiSplitterWindow.__init__(self, parent, ID)
        self.SetOrientation( wx.VERTICAL )

        self._controller = eDevController()
        self._controller.setNavigator(self)
        self._panels     = list()
예제 #2
0
    def __init__(self, parent, ID):
        wx.Notebook.__init__(self, parent, ID)
        
        self._d_controller = eDevController()
        self._d_mainframe  = self._d_controller.getMainFrame()
        self._editors      = dict()

        #self.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGED, self.OnPageChanged)
        self.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGED, self._onPageChanged)
예제 #3
0
    def __init__(self, parent, title):
        wx.Frame.__init__(self, parent, -1, title,
                          size=(930,660))
        
        new_bmp = wx.ArtProvider_GetBitmap(wx.ART_NEW, wx.ART_TOOLBAR, (16,16))
        open_bmp = wx.ArtProvider_GetBitmap(wx.ART_FILE_OPEN, wx.ART_TOOLBAR, (16,16))
        del_bmp = wx.ArtProvider_GetBitmap(wx.ART_DELETE, wx.ART_TOOLBAR, (16,16))
        save_bmp = wx.ArtProvider_GetBitmap(wx.ART_FILE_SAVE, wx.ART_TOOLBAR, (16,16))
        save_as_bmp = wx.ArtProvider_GetBitmap(wx.ART_FILE_SAVE_AS, wx.ART_TOOLBAR, (16,16))
        close_bmp = wx.ArtProvider_GetBitmap(wx.ART_CROSS_MARK, wx.ART_TOOLBAR, (16,16))
        copy_bmp = wx.ArtProvider_GetBitmap(wx.ART_COPY, wx.ART_TOOLBAR, (16,16))
        cut_bmp = wx.ArtProvider_GetBitmap(wx.ART_CUT, wx.ART_TOOLBAR, (16,16))
        paste_bmp = wx.ArtProvider_GetBitmap(wx.ART_PASTE, wx.ART_TOOLBAR, (16,16))
        redo_bmp = wx.ArtProvider_GetBitmap(wx.ART_REDO, wx.ART_TOOLBAR, (16,16))
        undo_bmp = wx.ArtProvider_GetBitmap(wx.ART_UNDO, wx.ART_TOOLBAR, (16,16))
        quit_bmp = wx.ArtProvider_GetBitmap(wx.ART_QUIT, wx.ART_TOOLBAR, (16,16))
        about_bmp = wx.ArtProvider_GetBitmap(wx.ART_INFORMATION, wx.ART_TOOLBAR, (16,16))
        conf_bmp = wx.ArtProvider_GetBitmap(wx.ART_HELP_SETTINGS, wx.ART_TOOLBAR, (16,16))

        # Assemble Menu
        self._d_menubar = wx.MenuBar()
        self._d_file_menu    = wx.Menu()
        self._d_edit_menu    = wx.Menu()
        self._d_settings_menu= wx.Menu()
        self._d_help_menu    = wx.Menu()
        
        # create items:
        self._d_menu_new     = wx.MenuItem(self._d_file_menu, wx.ID_NEW, "&New", "FIXME")
        self._d_menu_open    = wx.MenuItem(self._d_file_menu, wx.ID_OPEN, "&Open", "FIXME")
        self._d_menu_save    = wx.MenuItem(self._d_file_menu, wx.ID_SAVE, "&Save", "FIXME")
        self._d_menu_save_as = wx.MenuItem(self._d_file_menu, wx.ID_SAVEAS, "Save &as...", "FIXME")
        self._d_menu_delete  = wx.MenuItem(self._d_file_menu, wx.ID_DELETE, "&Delete", "FIXME")
        self._d_menu_quit    = wx.MenuItem(self._d_file_menu, wx.ID_EXIT, "&Quit", "FIXME")
       
        self._d_menu_copy    = wx.MenuItem(self._d_edit_menu, wx.ID_COPY, "&Copy", "FIXME")
        self._d_menu_cut     = wx.MenuItem(self._d_edit_menu, wx.ID_CUT, "Cut", "FIXME")
        self._d_menu_paste   = wx.MenuItem(self._d_edit_menu, wx.ID_PASTE, "&Paste", "FIXME")
        self._d_edit_menu.AppendSeparator()
        self._d_menu_redo    = wx.MenuItem(self._d_edit_menu, wx.ID_REDO, "&Redo", "FIXME")
        self._d_menu_undo    = wx.MenuItem(self._d_edit_menu, wx.ID_UNDO, "&Undo", "FIXME")

        self._d_menu_conf_editor = wx.MenuItem(self._d_settings_menu, wx.ID_PREFERENCES, "&Editor", "???")
        self._d_menu_about   = wx.MenuItem(self._d_help_menu, wx.ID_HELP, "&About", "About edef Developer")

        # Set Menuicons:
        self._d_menu_new.SetBitmap(new_bmp)
        self._d_menu_open.SetBitmap(open_bmp)
        self._d_menu_open.SetBitmap(open_bmp)
        self._d_menu_save.SetBitmap(save_bmp)
        self._d_menu_save_as.SetBitmap(save_as_bmp)
        self._d_menu_delete.SetBitmap(del_bmp)
        self._d_menu_quit.SetBitmap(quit_bmp)
        self._d_menu_copy.SetBitmap(copy_bmp)
        self._d_menu_cut.SetBitmap(cut_bmp)
        self._d_menu_paste.SetBitmap(paste_bmp)
        self._d_menu_redo.SetBitmap(redo_bmp)
        self._d_menu_undo.SetBitmap(undo_bmp)
        self._d_menu_about.SetBitmap(about_bmp)

        # Add Items:
        self._d_file_menu.AppendItem(self._d_menu_new)
        self._d_file_menu.AppendItem(self._d_menu_open)
        self._d_file_menu.AppendItem(self._d_menu_save)
        self._d_file_menu.AppendItem(self._d_menu_save_as)
        self._d_file_menu.AppendItem(self._d_menu_delete)
        self._d_file_menu.AppendSeparator()
        self._d_file_menu.AppendItem(self._d_menu_quit)
        self._d_edit_menu.AppendItem(self._d_menu_copy)
        self._d_edit_menu.AppendItem(self._d_menu_cut)
        self._d_edit_menu.AppendItem(self._d_menu_paste)
        self._d_edit_menu.AppendSeparator()
        self._d_edit_menu.AppendItem(self._d_menu_redo)
        self._d_edit_menu.AppendItem(self._d_menu_undo)
        self._d_settings_menu.AppendItem(self._d_menu_conf_editor)
        self._d_help_menu.AppendItem(self._d_menu_about)

        #assemble menu-bar
        self._d_menubar.Append(self._d_file_menu, "&File")
        self._d_menubar.Append(self._d_edit_menu, "&Edit")
        self._d_menubar.Append(self._d_settings_menu, "&Settings")
        self._d_menubar.Append(self._d_help_menu, "&Help")
        self.SetMenuBar(self._d_menubar)

 
        # Assemble Toolbar:
        self._d_toolbar = self.CreateToolBar()
        self._d_toolbar.SetToolBitmapSize((16,16))
        self._d_toolbar.AddSimpleTool(wx.ID_NEW, new_bmp, "New")
        self._d_toolbar.AddSimpleTool(wx.ID_OPEN, open_bmp, "Open")
        self._d_toolbar.AddSimpleTool(wx.ID_DELETE, del_bmp, "Delete")
        self._d_toolbar.AddSeparator()
        self._d_toolbar.AddSimpleTool(wx.ID_SAVE, save_bmp, "Save")
        self._d_toolbar.AddSimpleTool(wx.ID_SAVEAS, save_as_bmp, "Save as...")
        self._d_toolbar.AddSimpleTool(wx.ID_CLOSE, close_bmp, "Close")
        self._d_toolbar.AddSeparator()
        self._d_toolbar.AddSimpleTool(wx.ID_COPY, copy_bmp, "Copy")
        self._d_toolbar.AddSimpleTool(wx.ID_CUT, cut_bmp, "Cut")
        self._d_toolbar.AddSimpleTool(wx.ID_PASTE, paste_bmp, "Paste")
        self._d_toolbar.AddSeparator()
        self._d_toolbar.AddSimpleTool(wx.ID_REDO, redo_bmp, "Redo")
        self._d_toolbar.AddSimpleTool(wx.ID_UNDO, undo_bmp, "Undo")
        

        self._d_controller = eDevController()
        self._d_controller.setMainFrame(self)

        # status-bar:
        self.CreateStatusBar()

        # add splitter window:
        self._d_splitter = eDevMainSplitter(self, -1)
        self._d_navigator = eDevNavigator(self._d_splitter, -1)
        self._d_notebook = eDevNotebook(self._d_splitter, -1)
        self._d_controller.setNotebook(self._d_notebook)

        self._d_splitter.SplitVertically(self._d_navigator, self._d_notebook)
        self._d_splitter.SetSashPosition(180, True)
        self._d_splitter.SizeWindows()

        # connect events:
        self.Bind(wx.EVT_MENU, self.OnExit, id=wx.ID_EXIT)
        self.bindNew()
        self.bindOpen()
        self.bindDelete()
        self.bindSave()
        self.bindSaveAs()
        self.bindClose()
        self.bindUndo()
        self.bindRedo()
        self.bindCopy()
        self.bindCut()
        self.bindPaste()

        self.Bind(wx.EVT_MENU, self.OnEditorSettings, id=wx.ID_PREFERENCES)
        self.Bind(wx.EVT_MENU, self.OnShowAbout, id=wx.ID_HELP)
예제 #4
0
 def __init__(self, parent, ID, uri, txt):
     py.shell.Shell.__init__(self, parent, ID, introText=txt)
     eDevEditorInterface.__init__(self,False, uri)
     self._controller = eDevController()
     self._mainframe = self._controller .getMainFrame()