def _add_file_menu(self):
        """Adds the file menu"""
        fileMenu = wx.Menu()
        self._add_menu_item(fileMenu, ide.ID_NEW, ide.id_text_new,
                            menu_icons.get_icon_new())

        fileMenu.AppendSeparator()

        self._add_menu_item(fileMenu, ide.ID_OPEN, ide.id_text_open,
                            menu_icons.get_icon_open())

        fileMenu.AppendSeparator()

        self._add_menu_item(fileMenu, ide.ID_SAVE, ide.id_text_save,
                            menu_icons.get_icon_save())

        self._add_menu_item(fileMenu, ide.ID_SAVEAS, ide.id_text_saveas,
                            menu_icons.get_icon_saveas())

        fileMenu.AppendSeparator()

        self._add_menu_item(fileMenu, ide.ID_CLOSETAB, ide.id_text_closetab,
                            menu_icons.get_icon_close())

        self._add_menu_item(fileMenu, ide.ID_EXITAPP, ide.id_text_exitapp,
                            menu_icons.get_icon_quit())

        self.Append(fileMenu, "&File")
    def _add_file_menu(self):
        """Adds the file menu"""
        fileMenu = wx.Menu()
        self._add_menu_item(fileMenu, ide.ID_NEW, ide.id_text_new, menu_icons.get_icon_new())

        fileMenu.AppendSeparator()

        self._add_menu_item(fileMenu, ide.ID_OPEN, ide.id_text_open, menu_icons.get_icon_open())

        fileMenu.AppendSeparator()

        self._add_menu_item(fileMenu, ide.ID_SAVE, ide.id_text_save, menu_icons.get_icon_save())

        self._add_menu_item(fileMenu, ide.ID_SAVEAS, ide.id_text_saveas, menu_icons.get_icon_saveas())

        fileMenu.AppendSeparator()

        self._add_menu_item(fileMenu, ide.ID_CLOSETAB, ide.id_text_closetab, menu_icons.get_icon_close())

        self._add_menu_item(fileMenu, ide.ID_EXITAPP, ide.id_text_exitapp, menu_icons.get_icon_quit())

        self.Append(fileMenu, "&File")
Exemple #3
0
    def __init__(self, *args, **kwargs):
        """Create the toolbar"""
        super(ToolBar, self).__init__(*args, **kwargs)
        self.SetToolBitmapSize((16, 16))
        self._add_toolbar_btn(ide.ID_NEW, ide.id_text_new,
                              menu_icons.get_icon_new())

        self._add_toolbar_btn(ide.ID_OPEN, ide.id_text_open,
                              menu_icons.get_icon_open())

        self._add_toolbar_btn(ide.ID_SAVE, ide.id_text_save,
                              menu_icons.get_icon_save())

        self._add_toolbar_btn(ide.ID_SAVEAS, ide.id_text_saveas,
                              menu_icons.get_icon_saveas())

        self.AddSeparator()

        self._add_toolbar_btn(ide.ID_CUT, ide.id_text_cut,
                              menu_icons.get_icon_cut())

        self._add_toolbar_btn(ide.ID_COPY, ide.id_text_copy,
                              menu_icons.get_icon_copy())

        self._add_toolbar_btn(ide.ID_PASTE, ide.id_text_paste,
                              menu_icons.get_icon_paste())

        self.AddSeparator()

        self._add_toolbar_btn(ide.ID_UNDO, ide.id_text_undo,
                              menu_icons.get_icon_undo())

        self._add_toolbar_btn(ide.ID_REDO, ide.id_text_redo,
                              menu_icons.get_icon_redo())

        self.Realize()