#!/usr/bin/env python
# -*- coding: UTF-8 -*-
#
# generated by wxGlade 0.9.4 on Fri Jan 31 23:18:12 2020
#

import wx

# begin wxGlade: dependencies
# end wxGlade

# begin wxGlade: extracode
# end wxGlade


class MyDialog(wx.Dialog):
    def __init__(self, *args, **kwds):
        # begin wxGlade: MyDialog.__init__
        kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_DIALOG_STYLE | wx.MAXIMIZE_BOX | wx.MINIMIZE_BOX | wx.RESIZE_BORDER
        wx.Dialog.__init__(self, *args, **kwds)
        self.SetSize((561, 271))
        self.text_ctrl_txt = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_MULTILINE | wx.TE_NO_VSCROLL)
        self.btnclear = wx.Button(self, wx.ID_ANY, "Clear")
        self.btngenerate = wx.Button(self, wx.ID_ANY, "Generate")
        self.btnplay = wx.Button(self, wx.ID_ANY, "Play")
        self.btnopen = wx.Button(self, wx.ID_ANY, "Open")
        self.btnsave = wx.Button(self, wx.ID_ANY, "Save")
        self.btnexit = wx.Button(self, wx.ID_ANY, "Exit")
        self.text_ctrl_morse = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_MULTILINE | wx.TE_NO_VSCROLL)

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_BUTTON, self.OnClear, self.btnclear)
        self.Bind(wx.EVT_BUTTON, self.OnGenerate, self.btngenerate)
        self.Bind(wx.EVT_BUTTON, self.OnPlay, self.btnplay)
        self.Bind(wx.EVT_BUTTON, self.OnOpen, self.btnopen)
        self.Bind(wx.EVT_BUTTON, self.OnSave, self.btnsave)
        self.Bind(wx.EVT_BUTTON, self.OnExit, self.btnexit)
        # end wxGlade

    def __set_properties(self):
        # begin wxGlade: MyDialog.__set_properties
        self.SetTitle("Morse Code Generator")
        self.SetSize((561, 271))
        self.text_ctrl_txt.SetToolTip("Enter the text to translate to morse code")
        self.text_ctrl_txt.SetFocus()
        self.text_ctrl_morse.SetToolTip("Morse Code will be generated in this text box")
        # end wxGlade

    def __do_layout(self):
        # begin wxGlade: MyDialog.__do_layout
        sizer_1 = wx.BoxSizer(wx.VERTICAL)
        sizer_2 = wx.BoxSizer(wx.VERTICAL)
        sizer_3 = wx.BoxSizer(wx.HORIZONTAL)
        label_1 = wx.StaticText(self, wx.ID_ANY, "Morse Code Generator", style=wx.ALIGN_CENTER)
        label_1.SetFont(wx.Font(12, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, 0, ""))
        sizer_2.Add(label_1, 0, wx.EXPAND, 0)
        sizer_2.Add(self.text_ctrl_txt, 1, wx.ALL | wx.EXPAND, 10)
        sizer_3.Add(self.btnclear, 0, 0, 0)
        sizer_3.Add(self.btngenerate, 0, 0, 0)
        sizer_3.Add(self.btnplay, 0, 0, 0)
        sizer_3.Add(self.btnopen, 0, 0, 0)
        sizer_3.Add(self.btnsave, 0, 0, 0)
        sizer_3.Add(self.btnexit, 0, 0, 0)
        sizer_2.Add(sizer_3, 0, wx.ALIGN_CENTER, 0)
        sizer_2.Add(self.text_ctrl_morse, 1, wx.ALL | wx.EXPAND, 9)
        sizer_1.Add(sizer_2, 1, wx.EXPAND, 0)
        self.SetSizer(sizer_1)
        self.Layout()
        # end wxGlade

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

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

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

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

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

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

# end of class MyDialog

class MyMenuBar(wx.MenuBar):
    def __init__(self, *args, **kwds):
        # begin wxGlade: MyMenuBar.__init__
        wx.MenuBar.__init__(self, *args, **kwds)
        wxglade_tmp_menu = wx.Menu()
        wxglade_tmp_menu.Append(1, "Open", "")
        self.Bind(wx.EVT_MENU, self.onOpen, id=1)
        wxglade_tmp_menu.Append(2, "Save", "")
        self.Bind(wx.EVT_MENU, self.onSave, id=2)
        wxglade_tmp_menu.AppendSeparator()
        wxglade_tmp_menu.Append(3, "Generate", "")
        self.Bind(wx.EVT_MENU, self.onGenerate, id=3)
        wxglade_tmp_menu.Append(4, "Play", "")
        self.Bind(wx.EVT_MENU, self.onPlay, id=4)
        wxglade_tmp_menu.AppendSeparator()
        wxglade_tmp_menu.Append(5, "Exit", "")
        self.Bind(wx.EVT_MENU, self.onExit, id=5)
        self.Append(wxglade_tmp_menu, "File")

        self.__set_properties()
        self.__do_layout()

        # end wxGlade

    def __set_properties(self):
        # begin wxGlade: MyMenuBar.__set_properties
        pass
        # end wxGlade

    def __do_layout(self):
        # begin wxGlade: MyMenuBar.__do_layout
        pass
        # end wxGlade

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

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

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

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

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

# end of class MyMenuBar

class MyApp(wx.App):
    def OnInit(self):
        self.dialog = MyDialog(None, wx.ID_ANY, "")
        self.SetTopWindow(self.dialog)
        self.dialog.ShowModal()
        self.dialog.Destroy()
        return True

# end of class MyApp

if __name__ == "__main__":
    PyMorsecode = MyApp(0)
    PyMorsecode.MainLoop()
