#!/usr/bin/env lisp
;;;
;;; generated by wxGlade 034d891cc947+ on Sat Nov  5 21:42:12 2016
;;;

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


;;; begin wxGlade: dependencies
(use-package :wxButton)
(use-package :wxCL)
(use-package :wxColour)
(use-package :wxEvent)
(use-package :wxEvtHandler)
(use-package :wxFrame)
(use-package :wxSizer)
(use-package :wxStaticLine)
(use-package :wxStaticText)
(use-package :wxWindow)
(use-package :wx_main)
(use-package :wx_wrapper)
;;; end wxGlade

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


(defclass Frame192()
        ((top-window :initform nil :accessor slot-top-window)
        (label-1 :initform nil :accessor slot-label-1)
        (static-line-1 :initform nil :accessor slot-static-line-1)
        (button-2 :initform nil :accessor slot-button-2)
        (button-1 :initform nil :accessor slot-button-1)
        (sizer-local :initform nil :accessor slot-sizer-local)
        (sizer-as-attr :initform nil :accessor slot-sizer-as-attr)))

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

(defmethod init ((obj Frame192))
"Method creates the objects contained in the class."
        ;;; begin wxGlade: Frame192.__init__
        (setf (slot-button-2 obj) (wxButton_Create (slot-top-window obj) wxID_CANCEL "" -1 -1 -1 -1 0))
        (setf (slot-button-1 obj) (wxButton_Create (slot-top-window obj) wxID_OK "" -1 -1 -1 -1 0))
        ;;; end wxGlade
        )

(defmethod set-properties ((obj Frame192))
        ;;; begin wxGlade: Frame192.__set_properties
        (wxFrame_SetTitle (slot-top-window obj) (_"frame_1"))
        (slot-top-window obj).wxWindow_SetSize((300, 300))
        (wxButton_SetDefault (slot-button-2 obj))
        ;;; end wxGlade
        )

(defmethod do-layout ((obj Frame192))
        ;;; begin wxGlade: Frame192.__do_layout
        (setf (slot-sizer-as-attr obj) (wxGridSizer_Create 3 1 0 0))
        (setf (slot-sizer-local obj) (wxBoxSizer_Create wxHORIZONTAL))
        (setf (slot-label-1 obj) (wxStaticText_Create (slot-top-window obj) wxID_ANY (_"Just a text") -1 -1 -1 -1 wxALIGN_CENTER))
        (wxSizer_AddWindow (slot-sizer-as-attr obj) (slot-label-1 obj) 1 (logior wxALIGN_CENTER wxALL wxEXPAND wxSHAPED) 5 nil)
        (setf (slot-static-line-1 obj) (wxStaticLine_Create (slot-top-window obj) wxID_ANY -1 -1 -1 -1 wxLI_HORIZONTAL))
        (wxSizer_AddWindow (slot-sizer-as-attr obj) (slot-static-line-1 obj) 0 (logior wxALL wxEXPAND) 5 nil)
        (wxSizer_AddWindow (slot-sizer-local obj) (slot-button-2 obj) 0 0 0 nil)
        (wxSizer_AddWindow (slot-sizer-local obj) (slot-button-1 obj) 0 0 0 nil)
        (wxSizer_AddSizer (slot-sizer-as-attr obj) (slot-sizer-local obj) 1 (logior wxALIGN_RIGHT wxALL) 5 nil)
        (wxWindow_SetSizer (slot-frame obj) (slot-sizer-as-attr obj))
        (wxSizer_SetSizeHints (slot-slot-sizer-as-attr obj) (slot-frame obj))
        (wxFlexGridSizer_AddGrowableRow (slot-sizer-as-attr obj) 0)
        (wxFlexGridSizer_AddGrowableCol (slot-sizer-as-attr obj) 0)
        (wxFrame_layout (slot-Bug192-Frame self))
        ;;; end wxGlade
        )

;;; end of class Frame192


(defun init-func (fun data evt)
        (let ((Bug192-Frame (make-Frame192)))
        (ELJApp_SetTopWindow (slot-top-window Bug192-Frame))
        (wxWindow_Show (slot-top-window Bug192-Frame))))
;;; end of class MyApp

    (setf (textdomain) "app") ;; replace with the appropriate catalog name
    (defun _ (msgid) (gettext msgid "app"))


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