#!/usr/bin/env lisp
;;;
;;; generated by wxGlade 0.7.2 on Tue Aug 08 23:40:19 2017
;;;

(asdf:operate 'asdf:load-op 'wxcl)
(use-package "FFI")
(ffi:default-foreign-language :stdc)


;;; begin wxGlade: dependencies
(use-package :wxCL)
(use-package :wxColour)
(use-package :wxEvent)
(use-package :wxEvtHandler)
(use-package :wxFrame)
(use-package :wxMenu)
(use-package :wxMenuBar)
(use-package :wxWindow)
(use-package :wx_main)
(use-package :wx_wrapper)
;;; end wxGlade

;;; begin wxGlade: extracode
;;; end wxGlade


(defclass MenuTestFrame()
        ((top-window :initform nil :accessor slot-top-window)
        (test-menubar :initform nil :accessor slot-test-menubar)))

(defun make-MenuTestFrame ()
        (let ((obj (make-instance 'MenuTestFrame)))
          (init obj)
          (set-properties obj)
          (do-layout obj)
          obj))

(defmethod init ((obj MenuTestFrame))
"Method creates the objects contained in the class."
        ;;; begin wxGlade: MenuTestFrame.__init__
        (setf (slot-top-window obj) (wxFrame_create nil wxID_ANY "" -1 -1 -1 -1 wxDEFAULT_FRAME_STYLE))
        
        ;;; Menu Bar
        (setf (slot-test-menubar obj) (wxMenuBar_Create 0))
        global mn_ID1; mn_ID1 = wxNewId()
        global mn_ID2; mn_ID2 = wxNewId()
        global mn_ID3; mn_ID3 = wxNewId()
        global mn_ID4; mn_ID4 = wxNewId()
        global mn_ID1C; mn_ID1C = wxNewId()
        global mn_ID2C; mn_ID2C = wxNewId()
        global mn_ID3C; mn_ID3C = wxNewId()
        global mn_ID4C; mn_ID4C = wxNewId()
        global mn_ID1R; mn_ID1R = wxNewId()
        global mn_ID2R; mn_ID2R = wxNewId()
        global mn_ID3R; mn_ID3R = wxNewId()
        global mn_ID4R; mn_ID4R = wxNewId()
        (let ((wxglade_tmp_menu (wxMenu_Create "" 0)))
        (wxMenu_Append wxglade_tmp_menu wxID_OPEN "&Open" "Stock ID" 0)
        (wxMenu_Append wxglade_tmp_menu wxID_HELP "Manual" "Stock ID, handler" 0)
        (wxMenu_Append wxglade_tmp_menu wxID_CLOSE "&Close file" "Stock ID, name, handler" 0)
        (wxMenu_Append wxglade_tmp_menu wxID_EXIT "E&xit" "Stock ID, name" 0)
        (wxMenu_AppendSeparator wxglade_tmp_menu)
        (wxMenu_Append wxglade_tmp_menu wxID_OPEN "&Open" "Stock ID" 1)
        (wxMenu_Append wxglade_tmp_menu wxID_HELP "Manual" "Stock ID, handler" 1)
        (wxMenu_Append wxglade_tmp_menu wxID_CLOSE "&Close file" "Stock ID, name, handler" 1)
        (wxMenu_Append wxglade_tmp_menu wxID_EXIT "E&xit" "Stock ID, name" 1)
        (let ((wxglade_tmp_menu_sub (wxMenu_Create "" 0)))
        (wxMenu_Append wxglade_tmp_menu_sub wxID_OPEN "&Open" "Stock ID" 2)
        (wxMenu_Append wxglade_tmp_menu_sub wxID_HELP "Manual" "Stock ID, handler" 2)
        (wxMenu_Append wxglade_tmp_menu_sub wxID_CLOSE "&Close file" "Stock ID, name, handler" 2)
        (wxMenu_Append wxglade_tmp_menu_sub wxID_EXIT "E&xit" "Stock ID, name" 2)
        (wxMenuBar_AppendSub wxglade_tmp_menu wxID_ANY "Radio" wxglade_tmp_menu_sub ""))
        		(wxMenuBar_Append (slot-test-menubar obj) wxglade_tmp_menu "&Stock IDs"))
        (let ((wxglade_tmp_menu (wxMenu_Create "" 0)))
        (wxMenu_Append wxglade_tmp_menu mn_ID1 "Named 1" "Named ID" 0)
        (wxMenu_Append wxglade_tmp_menu mn_ID2 "Named 2" "Named ID, handler" 0)
        (wxMenu_Append wxglade_tmp_menu mn_ID3 "Named 3" "Named ID, name, handler" 0)
        (wxMenu_Append wxglade_tmp_menu mn_ID4 "Named 4" "Named ID, name" 0)
        (wxMenu_AppendSeparator wxglade_tmp_menu)
        (wxMenu_Append wxglade_tmp_menu mn_ID1C "Named 1" "Named ID" 1)
        (wxMenu_Append wxglade_tmp_menu mn_ID2C "Named 2" "Named ID, handler" 1)
        (wxMenu_Append wxglade_tmp_menu mn_ID3C "Named 3" "Named ID, name, handler" 1)
        (wxMenu_Append wxglade_tmp_menu mn_ID4C "Named 4" "Named ID, name" 1)
        (let ((wxglade_tmp_menu_sub (wxMenu_Create "" 0)))
        (wxMenu_Append wxglade_tmp_menu_sub mn_ID1R "Named 1" "Named ID" 2)
        (wxMenu_Append wxglade_tmp_menu_sub mn_ID2R "Named 2" "Named ID, handler" 2)
        (wxMenu_Append wxglade_tmp_menu_sub mn_ID3R "Named 3" "Named ID, name, handler" 2)
        (wxMenu_Append wxglade_tmp_menu_sub mn_ID4R "Named 4" "Named ID, name" 2)
        (wxMenuBar_AppendSub wxglade_tmp_menu wxID_ANY "Radio" wxglade_tmp_menu_sub ""))
        		(wxMenuBar_Append (slot-test-menubar obj) wxglade_tmp_menu "&Named ID"))
        (let ((wxglade_tmp_menu (wxMenu_Create "" 0)))
        (wxMenu_Append wxglade_tmp_menu wxID_ANY "Auto 1" "Auto ID" 0)
        (wxMenu_Append wxglade_tmp_menu wxID_ANY "Auto 2" "Auto ID, handler" 0)
        (wxMenu_Append wxglade_tmp_menu wxID_ANY "Auto 3" "Auto ID, name, handler" 0)
        (wxMenu_Append wxglade_tmp_menu wxID_ANY "Auto 4" "Auto ID, name" 0)
        (wxMenu_AppendSeparator wxglade_tmp_menu)
        (wxMenu_Append wxglade_tmp_menu wxID_ANY "Auto 1" "Auto ID" 1)
        (wxMenu_Append wxglade_tmp_menu wxID_ANY "Auto 2" "Auto ID, handler" 1)
        (wxMenu_Append wxglade_tmp_menu wxID_ANY "Auto 3" "Auto ID, name, handler" 1)
        (wxMenu_Append wxglade_tmp_menu wxID_ANY "Auto 4" "Auto ID, name" 1)
        (let ((wxglade_tmp_menu_sub (wxMenu_Create "" 0)))
        (wxMenu_Append wxglade_tmp_menu_sub wxID_ANY "Auto 1" "Auto ID" 2)
        (wxMenu_Append wxglade_tmp_menu_sub wxID_ANY "Auto 2" "Auto ID, handler" 2)
        (wxMenu_Append wxglade_tmp_menu_sub wxID_ANY "Auto 3" "Auto ID, name, handler" 2)
        (wxMenu_Append wxglade_tmp_menu_sub wxID_ANY "Auto 4" "Auto ID, name" 2)
        (wxMenuBar_AppendSub wxglade_tmp_menu wxID_ANY "Radio" wxglade_tmp_menu_sub ""))
        		(wxMenuBar_Append (slot-test-menubar obj) wxglade_tmp_menu "&Auto ID"))
        (let ((wxglade_tmp_menu (wxMenu_Create "" 0)))
        (wxMenu_Append wxglade_tmp_menu -1 "Minus1 1" "Minus1 ID" 0)
        (wxMenu_Append wxglade_tmp_menu -1 "Minus1 2" "Minus1 ID, handler" 0)
        (wxMenu_Append wxglade_tmp_menu -1 "Minus1 3" "Minus1 ID, name, handler" 0)
        (wxMenu_Append wxglade_tmp_menu -1 "Minus1 4" "Minus1 ID, name" 0)
        (wxMenu_AppendSeparator wxglade_tmp_menu)
        (wxMenu_Append wxglade_tmp_menu -1 "Minus1 1" "Minus1 ID" 1)
        (wxMenu_Append wxglade_tmp_menu -1 "Minus1 2" "Minus1 ID, handler" 1)
        (wxMenu_Append wxglade_tmp_menu -1 "Minus1 3" "Minus1 ID, name, handler" 1)
        (wxMenu_Append wxglade_tmp_menu -1 "Minus1 4" "Minus1 ID, name" 1)
        (let ((wxglade_tmp_menu_sub (wxMenu_Create "" 0)))
        (wxMenu_Append wxglade_tmp_menu_sub -1 "Minus1 1" "Minus1 ID" 2)
        (wxMenu_Append wxglade_tmp_menu_sub -1 "Minus1 2" "Minus1 ID, handler" 2)
        (wxMenu_Append wxglade_tmp_menu_sub -1 "Minus1 3" "Minus1 ID, name, handler" 2)
        (wxMenu_Append wxglade_tmp_menu_sub -1 "Minus1 4" "Minus1 ID, name" 2)
        (wxMenuBar_AppendSub wxglade_tmp_menu wxID_ANY "Radio" wxglade_tmp_menu_sub ""))
        		(wxMenuBar_Append (slot-test-menubar obj) wxglade_tmp_menu "&Minus1 ID"))
        (wxFrame_SetMenuBar (slot-top-window obj) (slot-test-menubar obj))
        ;;; Menu Bar end

        ;;; end wxGlade
        )

(defmethod set-properties ((obj MenuTestFrame))
        ;;; begin wxGlade: MenuTestFrame.__set_properties
        (wxFrame_SetTitle (slot-top-window obj) "All Widgets")
        ;;; generating code for setting icons is not implemented
        (slot-top-window obj).wxWindow_SetSize((800, 417))
        ;;; end wxGlade
        )

(defmethod do-layout ((obj MenuTestFrame))
        ;;; begin wxGlade: MenuTestFrame.__do_layout
        (wxFrame_layout (slot-MenuTest self))
        (wxFrame_Centre (slot-top-window obj) wxBOTH)
        ;;; end wxGlade
        )

;;; end of class MenuTestFrame


(defun init-func (fun data evt)
        (let ((MenuTest (make-MenuTestFrame)))
        (ELJApp_SetTopWindow (slot-top-window MenuTest))
        (wxWindow_Show (slot-top-window MenuTest))))
;;; end of class MenuTestClass


(unwind-protect
    (Eljapp_initializeC (wxclosure_Create #'init-func nil) 0 nil)
    (ffi:close-foreign-library "../miscellaneous/wxc-msw2.6.2.dll"))
