#!/usr/bin/env python
# -*- coding: UTF-8 -*-
#
# generated by wxGlade 0.9.6 on Thu Aug 20 17:44:03 2020
#

import wx

# begin wxGlade: dependencies
import gettext
# end wxGlade

# begin wxGlade: extracode
## those are constant IDs for toolbar's buttons
tool_file_new = 1
tool_file_open = 2
tool_file_save = 3
tool_edit_undo = 4
tool_edit_redo = 5
tool_edit_cut = 6
tool_edit_copy = 7
tool_edit_paste = 8
tool_build_compile = 9
tool_build_upload = 10
tool_device_detect = 11
tool_about_help = 12
# end wxGlade


class MyFrame(wx.Frame):
    def __init__(self, *args, **kwds):
        # begin wxGlade: MyFrame.__init__
        kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE
        wx.Frame.__init__(self, *args, **kwds)
        self.SetSize((925, 683))
        
        # Menu Bar
        self.Microhope_menubar = wx.MenuBar()
        self.i_file = wx.Menu()
        self.Microhope_menubar.i_file_new = self.i_file.Append(wx.ID_ANY, _("&New\tCtrl+N"), _("Create a new document"))
        self.Bind(wx.EVT_MENU, self.file_new, id=self.Microhope_menubar.i_file_new.GetId())
        self.i_file.AppendSeparator()
        self.Microhope_menubar.i_file_open = self.i_file.Append(wx.ID_ANY, _("&Open\tCtrl+O"), _("Open a file"))
        self.Bind(wx.EVT_MENU, self.file_open, id=self.Microhope_menubar.i_file_open.GetId())
        self.i_file_sub = wx.Menu()
        self.i_file_sub.Append(wx.ID_ANY, _("None"), "", wx.ITEM_RADIO)
        self.i_file.Append(wx.ID_ANY, _("Examples"), self.i_file_sub, "")
        self.Microhope_menubar.i_file_save = self.i_file.Append(wx.ID_ANY, _("&Save\tCtrl+S"), _("Save the current file"))
        self.Bind(wx.EVT_MENU, self.file_save, id=self.Microhope_menubar.i_file_save.GetId())
        self.Microhope_menubar.i_file_save_as = self.i_file.Append(wx.ID_ANY, _("Save&As\tShift+Ctrl+S"), _("Save the current file with a different name"))
        self.Bind(wx.EVT_MENU, self.file_save_as, id=self.Microhope_menubar.i_file_save_as.GetId())
        self.i_file.AppendSeparator()
        self.Microhope_menubar.i_file_init = self.i_file.Append(wx.ID_ANY, _("&Init()\tCtrl+I"), _("Initialize Microhope working directory"))
        self.Bind(wx.EVT_MENU, self.file_init, id=self.Microhope_menubar.i_file_init.GetId())
        self.Microhope_menubar.i_file_exit = self.i_file.Append(wx.ID_ANY, _("E&xit\tCtrl+Q"), _("Quit the programme"))
        self.Bind(wx.EVT_MENU, self.file_exit, id=self.Microhope_menubar.i_file_exit.GetId())
        self.Microhope_menubar.Append(self.i_file, _("&File"))
        self.i_edit = wx.Menu()
        self.Microhope_menubar.i_edit_undo = self.i_edit.Append(wx.ID_ANY, _("&Undo\tCtrl+Z"), _("Undo the last action"))
        self.Microhope_menubar.i_edit_redo = self.i_edit.Append(wx.ID_ANY, _("&Redo\tCtrl+Y"), _("Redo the last undone action"))
        self.i_edit.AppendSeparator()
        self.Microhope_menubar.i_edit_cut = self.i_edit.Append(wx.ID_ANY, _("Cu&t\tCtrl+X"), _("Cut the selected text"))
        self.Microhope_menubar.i_edit_copy = self.i_edit.Append(wx.ID_ANY, _("&Copy\tCtrl+C"), _("Copy the selected text"))
        self.Microhope_menubar.i_edit_paste = self.i_edit.Append(wx.ID_ANY, _("&Paste\tCtrl+V"), _("Paste the content of the clipboard"))
        self.Microhope_menubar.i_edit_delete = self.i_edit.Append(wx.ID_ANY, _("&Delete"), "")
        self.Bind(wx.EVT_MENU, self.edit_delete, id=self.Microhope_menubar.i_edit_delete.GetId())
        self.i_edit.AppendSeparator()
        self.Microhope_menubar.i_edit_select_all = self.i_edit.Append(wx.ID_ANY, _("Select &All\tCtrl+A"), _("Select the complete document"))
        self.Bind(wx.EVT_MENU, self.edit_select_all, id=self.Microhope_menubar.i_edit_select_all.GetId())
        self.Microhope_menubar.Append(self.i_edit, _("&Edit"))
        self.i_view = wx.Menu()
        self.Microhope_menubar.i_view_statusbar = self.i_view.Append(wx.ID_ANY, _("&StatusBar"), _("Sow or hide the status bar in the current window"), wx.ITEM_CHECK)
        self.Bind(wx.EVT_MENU, self.view_statusbar, id=self.Microhope_menubar.i_view_statusbar.GetId())
        i_view_theme = wx.Menu()
        self.Microhope_menubar.i_view_bw = i_view_theme.Append(wx.ID_ANY, _("&Black on white (default)"), "", wx.ITEM_RADIO)
        self.Bind(wx.EVT_MENU, self.view_bw, id=self.Microhope_menubar.i_view_bw.GetId())
        self.Microhope_menubar.i_view_wb = i_view_theme.Append(wx.ID_ANY, _("&White on black"), "", wx.ITEM_RADIO)
        self.Bind(wx.EVT_MENU, self.view_wb, id=self.Microhope_menubar.i_view_wb.GetId())
        self.i_view.Append(wx.ID_ANY, _("&Theme"), i_view_theme, "")
        self.Microhope_menubar.Append(self.i_view, _("&View"))
        self.i_device = wx.Menu()
        self.Microhope_menubar.i_device_detect = self.i_device.Append(wx.ID_ANY, _("&Detect board\tCtrl+B"), _("Detect the hardware"))
        self.Bind(wx.EVT_MENU, self.device_detect, id=self.Microhope_menubar.i_device_detect.GetId())
        self.i_device.AppendSeparator()
        self.Microhope_menubar.i_device_set_bootloader = self.i_device.Append(wx.ID_ANY, _("Set &bootloader"), _("For setting the MCU by uploading the bootloader"))
        self.Bind(wx.EVT_MENU, self.device_set_bootloader, id=self.Microhope_menubar.i_device_set_bootloader.GetId())
        self.Microhope_menubar.i_device_soft_rst = self.i_device.Append(wx.ID_ANY, _("Soft &RST"), _("Software RESET"))
        self.Bind(wx.EVT_MENU, self.device_soft_rst, id=self.Microhope_menubar.i_device_soft_rst.GetId())
        self.Microhope_menubar.Append(self.i_device, _("&Device"))
        self.i_build = wx.Menu()
        self.Microhope_menubar.i_build_compile = self.i_build.Append(wx.ID_ANY, _("&Compile\tCtrl+K"), _("To compile the program"))
        self.Bind(wx.EVT_MENU, self.build_compile, id=self.Microhope_menubar.i_build_compile.GetId())
        self.Microhope_menubar.i_build_assemble = self.i_build.Append(wx.ID_ANY, _("&Assemble\tCtrl+J"), _("To assemble the program"))
        self.Bind(wx.EVT_MENU, self.build_assemble, id=self.Microhope_menubar.i_build_assemble.GetId())
        self.i_build.AppendSeparator()
        self.Microhope_menubar.i_build_upload = self.i_build.Append(wx.ID_ANY, _("&Upload\tCtrl+L"), _("To upload the program to MCU"))
        self.Bind(wx.EVT_MENU, self.build_upload, id=self.Microhope_menubar.i_build_upload.GetId())
        self.Microhope_menubar.i_build_upload_USBASP = self.i_build.Append(wx.ID_ANY, _("Upload &via USBASP"), _("Upload program via USBASP"))
        self.Bind(wx.EVT_MENU, self.build_upload_USBASP, id=self.Microhope_menubar.i_build_upload_USBASP.GetId())
        self.Microhope_menubar.Append(self.i_build, _("&Build"))
        self.i_about = wx.Menu()
        self.Microhope_menubar.i_about_help = self.i_about.Append(wx.ID_ANY, _("&Help\tShift+Ctrl+H"), "")
        self.Bind(wx.EVT_MENU, self.about_help, id=self.Microhope_menubar.i_about_help.GetId())
        self.Microhope_menubar.i_about_about = self.i_about.Append(wx.ID_ANY, _("&About"), "")
        self.Bind(wx.EVT_MENU, self.about_about, id=self.Microhope_menubar.i_about_about.GetId())
        self.Microhope_menubar.i_about_author = self.i_about.Append(wx.ID_ANY, _("Au&thor"), "")
        self.Bind(wx.EVT_MENU, self.about_author, id=self.Microhope_menubar.i_about_author.GetId())
        self.Microhope_menubar.Append(self.i_about, _("&About"))
        self.SetMenuBar(self.Microhope_menubar)
        # Menu Bar end
        self.Microhope_statusbar = self.CreateStatusBar(1)
        
        # Tool Bar
        self.Microhope_toolbar = wx.ToolBar(self, -1)
        self.SetToolBar(self.Microhope_toolbar)
        self.Microhope_toolbar.AddTool(tool_file_new, _("new"), wx.Bitmap("/usr/share/icons/gnome/24x24/actions/document-new.png", wx.BITMAP_TYPE_ANY), wx.NullBitmap, wx.ITEM_NORMAL, "", "")
        self.Microhope_toolbar.AddTool(tool_file_open, _("open"), wx.Bitmap("/usr/share/icons/gnome/24x24/actions/document-open.png", wx.BITMAP_TYPE_ANY), wx.NullBitmap, wx.ITEM_NORMAL, "", "")
        self.Microhope_toolbar.AddTool(tool_file_save, _("save"), wx.Bitmap("/usr/share/icons/gnome/24x24/actions/document-save.png", wx.BITMAP_TYPE_ANY), wx.NullBitmap, wx.ITEM_NORMAL, "", "")
        self.Microhope_toolbar.AddSeparator()
        self.Microhope_toolbar.AddTool(tool_edit_undo, _("undo"), wx.Bitmap("/usr/share/icons/gnome/24x24/actions/undo.png", wx.BITMAP_TYPE_ANY), wx.NullBitmap, wx.ITEM_NORMAL, "", "")
        self.Microhope_toolbar.AddTool(tool_edit_redo, _("redo"), wx.Bitmap("/usr/share/icons/gnome/24x24/actions/redo.png", wx.BITMAP_TYPE_ANY), wx.NullBitmap, wx.ITEM_NORMAL, "", "")
        self.Microhope_toolbar.AddSeparator()
        self.Microhope_toolbar.AddTool(tool_edit_cut, _("cut"), wx.Bitmap("/usr/share/icons/gnome/24x24/actions/editcut.png", wx.BITMAP_TYPE_ANY), wx.NullBitmap, wx.ITEM_NORMAL, "", "")
        self.Microhope_toolbar.AddTool(tool_edit_copy, _("copy"), wx.Bitmap("/usr/share/icons/gnome/24x24/actions/edit-copy.png", wx.BITMAP_TYPE_ANY), wx.NullBitmap, wx.ITEM_NORMAL, "", "")
        self.Microhope_toolbar.AddTool(tool_edit_paste, _("paste"), wx.Bitmap("/usr/share/icons/gnome/24x24/actions/edit-paste.png", wx.BITMAP_TYPE_ANY), wx.NullBitmap, wx.ITEM_NORMAL, "", "")
        self.Microhope_toolbar.AddSeparator()
        self.Microhope_toolbar.AddTool(tool_build_compile, _("compile"), wx.Bitmap("/usr/share/icons/gnome/24x24/actions/gtk-execute.png", wx.BITMAP_TYPE_ANY), wx.NullBitmap, wx.ITEM_NORMAL, "", "")
        self.Microhope_toolbar.AddTool(tool_build_upload, _("upload"), wx.Bitmap("/usr/share/icons/gnome/24x24/actions/go-up.png", wx.BITMAP_TYPE_ANY), wx.NullBitmap, wx.ITEM_NORMAL, "", "")
        self.Microhope_toolbar.AddTool(tool_device_detect, _("detect"), wx.Bitmap("/usr/share/microhope/pixmaps/hardware.png", wx.BITMAP_TYPE_ANY), wx.NullBitmap, wx.ITEM_NORMAL, "", "")
        self.Microhope_toolbar.AddSeparator()
        self.Microhope_toolbar.AddTool(tool_about_help, _("help"), wx.Bitmap("/usr/share/icons/gnome/24x24/actions/help.png", wx.BITMAP_TYPE_ANY), wx.NullBitmap, wx.ITEM_NORMAL, "", "")
        # Tool Bar end
        self.control = wx.stc.StyledTextCtrl(self, wx.ID_ANY, style=wx.TE_MULTILINE)

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_TOOL, self.file_new, id=tool_file_new)
        self.Bind(wx.EVT_TOOL, self.file_open, id=tool_file_open)
        self.Bind(wx.EVT_TOOL, self.file_save, id=tool_file_save)
        self.Bind(wx.EVT_TOOL, self.edit_undo, id=tool_edit_undo)
        self.Bind(wx.EVT_TOOL, self.edit_redo, id=tool_edit_redo)
        self.Bind(wx.EVT_TOOL, self.edit_cut, id=tool_edit_cut)
        self.Bind(wx.EVT_TOOL, self.edit_copy, id=tool_edit_copy)
        self.Bind(wx.EVT_TOOL, self.edit_paste, id=tool_edit_paste)
        self.Bind(wx.EVT_TOOL, self.build_compile, id=tool_build_compile)
        self.Bind(wx.EVT_TOOL, self.build_upload, id=tool_build_upload)
        self.Bind(wx.EVT_TOOL, self.device_detect, id=tool_device_detect)
        self.Bind(wx.EVT_TOOL, self.about_help, id=tool_about_help)
        # end wxGlade

    def __set_properties(self):
        # begin wxGlade: MyFrame.__set_properties
        self.SetTitle(_("Microhope"))
        _icon = wx.NullIcon
        _icon.CopyFromBitmap(wx.Bitmap("/usr/share/microhope/pixmaps/mh-logo.png", wx.BITMAP_TYPE_ANY))
        self.SetIcon(_icon)
        self.Microhope_statusbar.SetStatusWidths([-1])

        self.Microhope_toolbar.Realize()
        # end wxGlade

    def __do_layout(self):
        # begin wxGlade: MyFrame.__do_layout
        sizer_1 = wx.BoxSizer(wx.VERTICAL)
        sizer_1.Add(self.control, 1, wx.EXPAND, 0)
        self.SetSizer(sizer_1)
        self.Layout()
        # end wxGlade

    def file_new(self, event):  # wxGlade: MyFrame.<event_handler>
        print("Event handler 'file_new' not implemented!")
        event.Skip()

    def file_open(self, event):  # wxGlade: MyFrame.<event_handler>
        print("Event handler 'file_open' not implemented!")
        event.Skip()

    def file_save(self, event):  # wxGlade: MyFrame.<event_handler>
        print("Event handler 'file_save' not implemented!")
        event.Skip()

    def file_save_as(self, event):  # wxGlade: MyFrame.<event_handler>
        print("Event handler 'file_save_as' not implemented!")
        event.Skip()

    def file_init(self, event):  # wxGlade: MyFrame.<event_handler>
        print("Event handler 'file_init' not implemented!")
        event.Skip()

    def file_exit(self, event):  # wxGlade: MyFrame.<event_handler>
        print("Event handler 'file_exit' not implemented!")
        event.Skip()

    def edit_delete(self, event):  # wxGlade: MyFrame.<event_handler>
        print("Event handler 'edit_delete' not implemented!")
        event.Skip()

    def edit_select_all(self, event):  # wxGlade: MyFrame.<event_handler>
        print("Event handler 'edit_select_all' not implemented!")
        event.Skip()

    def view_statusbar(self, event):  # wxGlade: MyFrame.<event_handler>
        print("Event handler 'view_statusbar' not implemented!")
        event.Skip()

    def view_bw(self, event):  # wxGlade: MyFrame.<event_handler>
        print("Event handler 'view_bw' not implemented!")
        event.Skip()

    def view_wb(self, event):  # wxGlade: MyFrame.<event_handler>
        print("Event handler 'view_wb' not implemented!")
        event.Skip()

    def device_detect(self, event):  # wxGlade: MyFrame.<event_handler>
        print("Event handler 'device_detect' not implemented!")
        event.Skip()

    def device_set_bootloader(self, event):  # wxGlade: MyFrame.<event_handler>
        print("Event handler 'device_set_bootloader' not implemented!")
        event.Skip()

    def device_soft_rst(self, event):  # wxGlade: MyFrame.<event_handler>
        print("Event handler 'device_soft_rst' not implemented!")
        event.Skip()

    def build_compile(self, event):  # wxGlade: MyFrame.<event_handler>
        print("Event handler 'build_compile' not implemented!")
        event.Skip()

    def build_assemble(self, event):  # wxGlade: MyFrame.<event_handler>
        print("Event handler 'build_assemble' not implemented!")
        event.Skip()

    def build_upload(self, event):  # wxGlade: MyFrame.<event_handler>
        print("Event handler 'build_upload' not implemented!")
        event.Skip()

    def build_upload_USBASP(self, event):  # wxGlade: MyFrame.<event_handler>
        print("Event handler 'build_upload_USBASP' not implemented!")
        event.Skip()

    def about_help(self, event):  # wxGlade: MyFrame.<event_handler>
        print("Event handler 'about_help' not implemented!")
        event.Skip()

    def about_about(self, event):  # wxGlade: MyFrame.<event_handler>
        print("Event handler 'about_about' not implemented!")
        event.Skip()

    def about_author(self, event):  # wxGlade: MyFrame.<event_handler>
        print("Event handler 'about_author' not implemented!")
        event.Skip()

    def edit_undo(self, event):  # wxGlade: MyFrame.<event_handler>
        print("Event handler 'edit_undo' not implemented!")
        event.Skip()

    def edit_redo(self, event):  # wxGlade: MyFrame.<event_handler>
        print("Event handler 'edit_redo' not implemented!")
        event.Skip()

    def edit_cut(self, event):  # wxGlade: MyFrame.<event_handler>
        print("Event handler 'edit_cut' not implemented!")
        event.Skip()

    def edit_copy(self, event):  # wxGlade: MyFrame.<event_handler>
        print("Event handler 'edit_copy' not implemented!")
        event.Skip()

    def edit_paste(self, event):  # wxGlade: MyFrame.<event_handler>
        print("Event handler 'edit_paste' not implemented!")
        event.Skip()

# end of class MyFrame

class MyApp(wx.App):
    def OnInit(self):
        self.Microhope = MyFrame(None, wx.ID_ANY, "")
        self.SetTopWindow(self.Microhope)
        self.Microhope.Show()
        return True

# end of class MyApp

if __name__ == "__main__":
    gettext.install("app") # replace with the appropriate catalog name

    app = MyApp(0)
    app.MainLoop()
