#Include "wx-c 0.9.2/wx.bi"

Declare Function App_OnInit WXCALL ( ) As wxBool
Declare Function App_OnExit WXCALL ( ) As wxInt

Declare Sub bmpbutton0_cb( )
Declare Sub bmpbutton1_cb( )

Dim Shared As wxApp Ptr wx_app
Dim Shared As wxFrame Ptr wx_frame
Dim Shared As wxPanel Ptr wx_panel

Dim Shared As wxBitmapButton Ptr bmpbuttons( 2 )

Function App_OnInit WXCALL ( ) As wxBool
	
	wx_frame = wxFrame_ctor( )
	wxFrame_Create( wx_frame, WX_NULL, -1, wxString_ctorUTF8("Testfile1"), 458, 237, 267, 711, wxFRAME_DEFAULT_STYLE Or wxCLOSE_BOX Xor wxMAXIMIZE_BOX Xor wxRESIZE_BORDER, WX_NULL )
	wx_panel = wxPanel_ctor2( wx_frame, -1, -1, -1, -1, -1, 0, WX_NULL )
	
	''
	'' create widget button0
	''
	Dim As wxButton Ptr button0
	button0 = wxButton_ctor( )
	wxButton_Create( button0, wx_panel, -1, wxString_ctorUTF8("button0"), 0, 0, -1, 24, 0, 0, 0 )
	
	
	''
	'' create widget button1
	''
	Dim As wxButton Ptr button1
	button1 = wxButton_ctor( )
	wxButton_Create( button1, wx_panel, -1, wxString_ctorUTF8("button1"), 0, 30, -1, 24, 0, 0, 0 )
	
	
	''
	'' create widget button2
	''
	Dim As wxButton Ptr button2
	button2 = wxButton_ctor( )
	wxButton_Create( button2, wx_panel, -1, wxString_ctorUTF8("button2"), 0, 60, -1, 24, 0, 0, 0 )
	
	
	''
	'' create widget togglebutton0
	''
	Dim As wxToggleButton Ptr togglebutton0
	togglebutton0 = wxToggleButton_ctor( )
	wxToggleButton_Create( togglebutton0, wx_panel, -1, wxString_ctorUTF8("togglebutton0"), 170, 0, -1, 24, 0, 0, 0 )
	
	
	''
	'' create widget togglebutton1
	''
	Dim As wxToggleButton Ptr togglebutton1
	togglebutton1 = wxToggleButton_ctor( )
	wxToggleButton_Create( togglebutton1, wx_panel, -1, wxString_ctorUTF8("togglebutton1"), 170, 30, -1, 24, 0, 0, 0 )
	
	
	''
	'' create widget togglebutton2
	''
	Dim As wxToggleButton Ptr togglebutton2
	togglebutton2 = wxToggleButton_ctor( )
	wxToggleButton_Create( togglebutton2, wx_panel, -1, wxString_ctorUTF8("togglebutton2"), 170, 60, -1, 24, 0, 0, 0 )
	
	
	''
	'' create widget checkbox0
	''
	Dim As wxCheckBox Ptr checkbox0
	checkbox0 = wxCheckBox_ctor( )
	wxCheckBox_Create( checkbox0, wx_panel, -1, wxString_ctorUTF8("checkbox0"), 10, 200, -1, -1, 0, 0, 0 )
	
	''
	'' create widget checkbox1
	''
	Dim As wxCheckBox Ptr checkbox1
	checkbox1 = wxCheckBox_ctor( )
	wxCheckBox_Create( checkbox1, wx_panel, -1, wxString_ctorUTF8("checkbox1"), 10, 220, -1, -1, 0, 0, 0 )
	
	''
	'' create widget checkbox2
	''
	Dim As wxCheckBox Ptr checkbox2
	checkbox2 = wxCheckBox_ctor( )
	wxCheckBox_Create( checkbox2, wx_panel, -1, wxString_ctorUTF8("checkbox2"), 10, 240, -1, -1, 0, 0, 0 )
	
	''
	'' create widget textctrl0
	''
	Dim As wxTextCtrl Ptr textctrl0
	textctrl0 = wxTextCtrl_ctor( )
	wxTextCtrl_Create( textctrl0, wx_panel, -1, wxString_ctorUTF8("textctrl0"), 150, 200, -1, -1, 0, 0, 0 )
	
	
	''
	'' create widget textctrl1
	''
	Dim As wxTextCtrl Ptr textctrl1
	textctrl1 = wxTextCtrl_ctor( )
	wxTextCtrl_Create( textctrl1, wx_panel, -1, wxString_ctorUTF8("textctrl1"), 150, 230, -1, -1, 0, 0, 0 )
	
	
	''
	'' create widget staticline0
	''
	Dim As wxStaticLine Ptr staticline0
	staticline0 = wxStaticLine_ctor( )
	wxStaticLine_Create( staticline0, wx_panel, -1, 110, 10, 30, 260, 0, 0 )
	
	
	''
	'' create widget spinbutton0
	''
	Dim As wxSpinButton Ptr spinbutton0
	spinbutton0 = wxSpinButton_ctor( )
	wxSpinButton_Create( spinbutton0, wx_panel, -1, 170, 100, 80, 30, 0, 0 )
	
	
	''
	'' create widget slider0
	''
	Dim As wxSlider Ptr slider0
	slider0 = wxSlider_ctor( )
	wxSlider_Create( slider0, wx_panel, -1, 0, 0, 100, 10, 280, 230, 50, 0 Or wxSL_LABELS, 0, 0 )
	wxSlider_SetValue( slider0, 0 )
	
	
	''
	'' create widget gauge0
	''
	Dim As wxGauge Ptr gauge0
	gauge0 = wxGauge_ctor( )
	wxGauge_Create( gauge0, wx_panel, -1, 100, 20, 340, 220, 20, 0, 0, 0 )
	wxGauge_SetValue( gauge0, 50 )
	
	
	''
	'' create widget spinctrl0
	''
	Dim As wxSpinCtrl Ptr spinctrl0
	spinctrl0 = wxSpinCtrl_ctor( )
	wxSpinCtrl_Create( spinctrl0, wx_panel, -1, wxString_ctorUTF8(""), 20, 380, 220, 20, wxSP_ARROW_KEYS, 0, 100, 0, 0 )
	
	
	''
	'' create widget calendar0
	''
	Dim As wxCalendarCtrl Ptr calendar0
	calendar0 = wxCalendarCtrl_ctor( )
	wxCalendarCtrl_Create( calendar0, wx_panel, -1, wxDateTime_ctor( ), 20, 410, 220, 130, 0, 0 )
	
	
	''
	'' create widget stattext0
	''
	Dim As wxStaticText Ptr stattext0
	stattext0 = wxStaticText_ctor( )
	wxStaticText_Create( stattext0, wx_panel, -1, wxString_ctorUTF8("1234567890123"), 10, 100, 80, 20, 0, 0 )
	
	
	''
	'' create widget bmpbutton0
	''
	Dim As wxBitmap Ptr picbmpbutton0
	Dim As wxBitmapButton Ptr bmpbutton0
	
	picbmpbutton0 = wxBitmap_ctor( )
	wxBitmap_LoadFile( picbmpbutton0, wxString_ctorUTF8("media\close.bmp"), wxBITMAP_TYPE_BMP )
	bmpbutton0 = wxBitmapButton_ctor( )
	
	wxBitmapButton_RegisterVirtual( bmpbutton0, Cast(Virtual_OnSetBitmap, @bmpbutton0_cb) )
	bmpbuttons( 0 ) = bmpbutton0
	
	wxBitmapButton_Create( bmpbutton0, wx_panel, -1, picbmpbutton0, 10, 130, -1, -1, wxBU_AUTODRAW, 0, 0 )
	wxWindow_SetBackgroundColour( bmpbutton0, wxColour_ctorByParts( 255, 255, 255 ) )
	
	
	''
	'' create widget bmpbutton1
	''
	Dim As wxBitmap Ptr picbmpbutton1
	Dim As wxBitmapButton Ptr bmpbutton1
	
	picbmpbutton1 = wxBitmap_ctor( )
	wxBitmap_LoadFile( picbmpbutton1, wxString_ctorUTF8("media\close.bmp"), wxBITMAP_TYPE_BMP )
	bmpbutton1 = wxBitmapButton_ctor( )
	
	wxBitmapButton_RegisterVirtual( bmpbutton1, Cast(Virtual_OnSetBitmap, @bmpbutton1_cb) )
	bmpbuttons( 1 ) = bmpbutton1
	
	wxBitmapButton_Create( bmpbutton1, wx_panel, -1, picbmpbutton1, 50, 130, -1, -1, wxBU_AUTODRAW, 0, 0 )
	wxWindow_SetBackgroundColour( bmpbutton1, wxColour_ctorByParts( 255, 255, 255 ) )
	
	
	''
	'' create widget image0
	''
	Dim As wxBitmap Ptr picimage0
	Dim As wxStaticBitmap Ptr image0
	
	picimage0 = wxBitmap_ctor( )
	image0 = wxStaticBitmap_ctor( )
	
	wxBitmap_LoadFile( picimage0, wxString_ctorUTF8("media\close.bmp"), wxBITMAP_TYPE_BMP )
	wxStaticBitmap_Create( image0, wx_panel, -1, picimage0, 10, 170, -1, -1, 0, 0 )
	
	
	''
	'' create widget image1
	''
	Dim As wxBitmap Ptr picimage1
	Dim As wxStaticBitmap Ptr image1
	
	picimage1 = wxBitmap_ctor( )
	image1 = wxStaticBitmap_ctor( )
	
	wxBitmap_LoadFile( picimage1, wxString_ctorUTF8("media\close.bmp"), wxBITMAP_TYPE_BMP )
	wxStaticBitmap_Create( image1, wx_panel, -1, picimage1, 40, 170, -1, -1, 0, 0 )
	
	
	''
	'' create widget richtext0
	''
	Dim As wxTextCtrl Ptr richtext0
	richtext0 = wxTextCtrl_ctor( )
	wxTextCtrl_Create( richtext0, wx_panel, -1, wxString_ctorUTF8("richtext0"), 20, 550, -1, -1, wxTE_PROCESS_ENTER Or wxTE_MULTILINE Or wxTE_Rich Or wxTE_RICH2, 0, 0 )
	
	
	''
	'' create widget richtext1
	''
	Dim As wxTextCtrl Ptr richtext1
	richtext1 = wxTextCtrl_ctor( )
	wxTextCtrl_Create( richtext1, wx_panel, -1, wxString_ctorUTF8("richtext1"), 140, 550, -1, -1, wxTE_PROCESS_ENTER Or wxTE_MULTILINE Or wxTE_Rich Or wxTE_RICH2, 0, 0 )
	
	
	''
	'' create widget staticbox0
	''
	Dim As wxStaticBox Ptr staticbox0
	staticbox0 = wxStaticBox_ctor( )
	wxStaticBox_Create( staticbox0, wx_panel, -1, wxString_ctorUTF8("staticbox0"), 160, 140, 80, 50, 0, 0 )
	
	
	wxWindow_Show( wx_frame, 1 )
	wxApp_OnInit( wx_app )
	Return 1
	
End Function

Function App_OnExit WXCALL ( ) As wxInt
	
	Return wxApp_OnExit( wx_app )
	
End Function

Sub bmpbutton0_cb( )
	wxBitmapButton_OnSetBitmap( bmpbuttons( 0 ) )
End Sub

Sub bmpbutton1_cb( )
	wxBitmapButton_OnSetBitmap( bmpbuttons( 1 ) )
End Sub


''main
wx_app = wxApp_ctor( )
wxApp_RegisterVirtual ( wx_app, @App_OnInit, @App_OnExit )
wxApp_Run(0, 0)
