<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<codegen language="Lua">
  <templates class="Project">
    	<template name="lua_preamble">
		</template>
		<template name="include">
			-- Load the wxLua module, does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit #nl
			package.cpath = package.cpath..";./?.dll;./?.so;../lib/?.so;../lib/vc_dll/?.dll;../lib/bcc_dll/?.dll;../lib/mingw_dll/?.dll;" #nl
			require("wx") #nl
		</template>
    <template name="lua_epilogue">
      #nl #nl --wx.wxGetApp():MainLoop()
    </template>
  </templates>
  <templates class="wxWindow">
		<template name="settings">
			#ifnotnull $window_extra_style
			@{ #utbl$name:SetExtraStyle( $window_extra_style ) #nl @}

			#ifnotnull $font
			@{ #utbl$name:SetFont( $font ) #nl @}

			#ifnotnull $fg
			@{ #utbl$name:SetForegroundColour( $fg ) #nl @}

			#ifnotnull $bg
			@{ #utbl$name:SetBackgroundColour( $bg ) #nl @}

			#ifequal $enabled "0"
			@{ #utbl$name:Enable( $enabled ) #nl @}

			#ifequal $hidden "1"
			@{ #utbl$name:Hide() #nl @}

			#ifnotnull $tooltip
			@{ #utbl$name:SetToolTip( $tooltip ) #nl @}

			#ifnotnull $context_help
			@{ #utbl$name:SetHelpText( $context_help ) #nl @}

			#ifnotnull $minimum_size
			@{ #utbl$name:SetMinSize( $minimum_size ) #nl @}

			#ifnotnull $maximum_size
			@{ #utbl$name:SetMaxSize( $maximum_size ) #nl @}

			#ifparenttypeequal "form"
			@{
			#ifequal #parent $aui_managed "1"
			@{ 
			#iftypeequal "widget || container || notebook || auinotebook || flatnotebook || listbook || choicebook || treelistctrl || splitter"
			@{
				#utbl#wxparent $name.m_mgr:AddPane( #utbl$name, wxaui.wxAuiPaneInfo()
				#ifnotnull $aui_name @{:Name( $aui_name )@}:$docking()
				#ifnotnull $caption @{:Caption( $caption )@}
				#ifequal $caption_visible "0" @{:CaptionVisible( $caption_visible )@}
				#ifequal $close_button "0" @{:CloseButton( $close_button )@}
				#ifequal $maximize_button "1" @{:MaximizeButton( $maximize_button )@}
				#ifequal $minimize_button "1" @{:MinimizeButton( $minimize_button )@}
				#ifequal $pin_button "1" @{:PinButton( $pin_button )@}
				#ifequal $pane_border "0" @{:PaneBorder( $pane_border )@}
				#ifequal $gripper "1" @{:Gripper()@}
				#ifequal $show "0" @{:Hide()@}
				#ifequal $moveable "0" @{:Movable( $moveable )@}
				#ifnotnull $dock @{:$dock()#ifequal $dock "Float" @{:FloatingPosition( $pane_position )@}@}
				#ifnotnull $resize @{:$resize()#ifequal $resize "Resizable"	@{:FloatingSize( $pane_size )@}@}
				#ifequal $dock_fixed "1" @{:Fixed( $dock_fixed )@}
				#ifequal $BottomDockable "0" @{:BottomDockable( $BottomDockable )@}
				#ifequal $TopDockable "0" @{:TopDockable( $TopDockable )@}
				#ifequal $LeftDockable "0" @{:LeftDockable( $LeftDockable )@}
				#ifequal $RightDockable "0"	@{:RightDockable( $RightDockable )@}
				#ifequal $floatable "0"	@{:Floatable( $floatable )@}
				#ifnotnull $aui_row	@{:Row( $aui_row )@}
				#ifnotnull $aui_position @{:Position( $aui_position )@}
				#ifnotnull $best_size @{:BestSize( $best_size )@}
				#ifnotnull $min_size @{:MinSize( $min_size )@}
				#ifnotnull $max_size @{:MaxSize( $max_size )@}
				#ifnotnull $aui_layer @{:Layer( $aui_layer )@}
				#ifequal $center_pane "1" @{:CentrePane()@}
				#ifequal $default_pane "1" @{:DefaultPane()@}
				#ifequal $toolbar_pane "1" @{:ToolbarPane()@}
				) #nl				
			@}
			@}
			@}

			#ifparenttypeequal "toolbar_form"
			@{ #utbl#wxparent $name:AddControl( #utbl$name ) @}
		</template>

		<!-- wxKeyEvent -->
		<template name="evt_connect_OnChar">#utbl$name:Connect( wx.wxEVT_CHAR, function(event)#nl --implements  #handler#nl #skip #nl end  )</template>
		<template name="evt_connect_OnCharHook">#utbl$name:Connect( wx.wxEVT_CHAR_HOOK, function(event)#nl --implements  #handler#nl #skip #nl end  )</template>
		<template name="evt_connect_OnKeyDown">#utbl$name:Connect( wx.wxEVT_KEY_DOWN, function(event)#nl --implements  #handler#nl #skip #nl end  )</template>
		<template name="evt_connect_OnKeyUp">#utbl$name:Connect( wx.wxEVT_KEY_UP, function(event)#nl --implements  #handler#nl #skip #nl end  )</template>

		<!-- wxMouseEvent -->
		<template name="evt_connect_OnEnterWindow">#utbl$name:Connect( wx.wxEVT_ENTER_WINDOW, function(event)#nl --implements  #handler#nl #skip #nl end  )</template>
		<template name="evt_connect_OnLeaveWindow">#utbl$name:Connect( wx.wxEVT_LEAVE_WINDOW, function(event)#nl --implements  #handler#nl #skip #nl end  )</template>
		<template name="evt_connect_OnLeftDClick">#utbl$name:Connect( wx.wxEVT_LEFT_DCLICK, function(event)#nl --implements  #handler#nl #skip #nl end  )</template>
		<template name="evt_connect_OnLeftDown">#utbl$name:Connect( wx.wxEVT_LEFT_DOWN, function(event)#nl --implements  #handler#nl #skip #nl end  )</template>
		<template name="evt_connect_OnLeftUp">#utbl$name:Connect( wx.wxEVT_LEFT_UP, function(event)#nl --implements  #handler#nl #skip #nl end  )</template>
		<template name="evt_connect_OnMiddleDClick">#utbl$name:Connect( wx.wxEVT_MIDDLE_DCLICK, function(event)#nl --implements  #handler#nl #skip #nl end  )</template>
		<template name="evt_connect_OnMiddleDown">#utbl$name:Connect( wx.wxEVT_MIDDLE_DOWN, function(event)#nl --implements  #handler#nl #skip #nl end  )</template>
		<template name="evt_connect_OnMiddleUp">#utbl$name:Connect( wx.wxEVT_MIDDLE_UP, function(event)#nl --implements  #handler#nl #skip #nl end  )</template>
		<template name="evt_connect_OnMotion">#utbl$name:Connect( wx.wxEVT_MOTION, function(event)#nl --implements  #handler#nl #skip #nl end  )</template>
		<template name="evt_connect_OnMouseWheel">#utbl$name:Connect( wx.wxEVT_MOUSEWHEEL, function(event)#nl --implements  #handler#nl #skip #nl end  )</template>
		<template name="evt_connect_OnRightDClick">#utbl$name:Connect( wx.wxEVT_RIGHT_DCLICK, function(event)#nl --implements  #handler#nl #skip #nl end  )</template>
		<template name="evt_connect_OnRightDown">#utbl$name:Connect( wx.wxEVT_RIGHT_DOWN, function(event)#nl --implements  #handler#nl #skip #nl end  )</template>
		<template name="evt_connect_OnRightUp">#utbl$name:Connect( wx.wxEVT_RIGHT_UP, function(event)#nl --implements  #handler#nl #skip #nl end  )</template>
		<template name="evt_connect_OnAux1DClick">#utbl$name:Connect( wx.wxEVT_AUX1_DCLICK, function(event)#nl --implements  #handler#nl #skip #nl end  )</template>
		<template name="evt_connect_OnAux1Down">#utbl$name:Connect( wx.wxEVT_AUX1_DOWN, function(event)#nl --implements  #handler#nl #skip #nl end  )</template>
		<template name="evt_connect_OnAux1Up">#utbl$name:Connect( wx.wxEVT_AUX1_UP, function(event)#nl --implements  #handler#nl #skip #nl end  )</template>
		<template name="evt_connect_OnAux2DClick">#utbl$name:Connect( wx.wxEVT_AUX2_DCLICK, function(event)#nl --implements  #handler#nl #skip #nl end  )</template>
		<template name="evt_connect_OnAux2Down">#utbl$name:Connect( wx.wxEVT_AUX2_DOWN, function(event)#nl --implements  #handler#nl #skip #nl end  )</template>
		<template name="evt_connect_OnAux2Up">#utbl$name:Connect( wx.wxEVT_AUX2_UP, function(event)#nl --implements  #handler#nl #skip #nl end  )</template>
		<template name="evt_connect_OnMouseEvents">
			#utbl$name:Connect( wx.wxEVT_LEFT_DOWN, function(event)#nl --implements  #handler#nl #skip #nl end  ) #nl
			#utbl$name:Connect( wx.wxEVT_LEFT_UP, function(event)#nl --implements  #handler#nl #skip #nl end  ) #nl
			#utbl$name:Connect( wx.wxEVT_MIDDLE_DOWN, function(event)#nl --implements  #handler#nl #skip #nl end  ) #nl
			#utbl$name:Connect( wx.wxEVT_MIDDLE_UP, function(event)#nl --implements  #handler#nl #skip #nl end  ) #nl
			#utbl$name:Connect( wx.wxEVT_RIGHT_DOWN, function(event)#nl --implements  #handler#nl #skip #nl end  ) #nl
			#utbl$name:Connect( wx.wxEVT_RIGHT_UP, function(event)#nl --implements  #handler#nl #skip #nl end  ) #nl
			#utbl$name:Connect( wx.wxEVT_AUX1_DOWN, function(event)#nl --implements  #handler#nl #skip #nl end  ) #nl
			#utbl$name:Connect( wx.wxEVT_AUX1_UP, function(event)#nl --implements  #handler#nl #skip #nl end  ) #nl
			#utbl$name:Connect( wx.wxEVT_AUX2_DOWN, function(event)#nl --implements  #handler#nl #skip #nl end  ) #nl
			#utbl$name:Connect( wx.wxEVT_AUX2_UP, function(event)#nl --implements  #handler#nl #skip #nl end  ) #nl
			#utbl$name:Connect( wx.wxEVT_MOTION, function(event)#nl --implements  #handler#nl #skip #nl end  ) #nl
			#utbl$name:Connect( wx.wxEVT_LEFT_DCLICK, function(event)#nl --implements  #handler#nl #skip #nl end  ) #nl
			#utbl$name:Connect( wx.wxEVT_MIDDLE_DCLICK, function(event)#nl --implements  #handler#nl #skip #nl end  ) #nl
			#utbl$name:Connect( wx.wxEVT_RIGHT_DCLICK, function(event)#nl --implements  #handler#nl #skip #nl end  ) #nl
			#utbl$name:Connect( wx.wxEVT_AUX1_DCLICK, function(event)#nl --implements  #handler#nl #skip #nl end  ) #nl
			#utbl$name:Connect( wx.wxEVT_AUX2_DCLICK, function(event)#nl --implements  #handler#nl #skip #nl end  ) #nl
			#utbl$name:Connect( wx.wxEVT_LEAVE_WINDOW, function(event)#nl --implements  #handler#nl #skip #nl end  ) #nl
			#utbl$name:Connect( wx.wxEVT_ENTER_WINDOW, function(event)#nl --implements  #handler#nl #skip #nl end  ) #nl
			#utbl$name:Connect( wx.wxEVT_MOUSEWHEEL, function(event)#nl --implements  #handler#nl #skip #nl end  )
		</template>

		<!-- wxFocusEvent -->
		<template name="evt_connect_OnKillFocus">#utbl$name:Connect( wx.wxEVT_KILL_FOCUS, function(event)#nl --implements  #handler#nl #skip #nl end  )</template>
		<template name="evt_connect_OnSetFocus">#utbl$name:Connect( wx.wxEVT_SET_FOCUS, function(event)#nl --implements  #handler#nl #skip #nl end  )</template>
.
		<!-- wxPaintEvent -->
		<template name="evt_connect_OnPaint">#utbl$name:Connect( wx.wxEVT_PAINT, function(event)#nl --implements  #handler#nl #skip #nl end  )</template>

		<!-- wxEraseEvent -->
		<template name="evt_connect_OnEraseBackground">#utbl$name:Connect( wx.wxEVT_ERASE_BACKGROUND, function(event)#nl --implements  #handler#nl #skip #nl end  )</template>

		<!-- wxSizeEvent -->
		<template name="evt_connect_OnSize">#utbl$name:Connect( wx.wxEVT_SIZE, function(event)#nl --implements  #handler#nl #skip #nl end  )</template>

		<!-- wxUpdateUIEvent -->
		<template name="evt_connect_OnUpdateUI">#utbl$name:Connect( wx.wxEVT_UPDATE_UI, function(event)#nl --implements  #handler#nl #skip #nl end  )</template>
  </templates>
  <templates class="wxTreeCtrlBase">
	<template name="evt_connect_OnTreeBeginDrag">#utbl$name:Connect( wx.wxEVT_COMMAND_TREE_BEGIN_DRAG, function(event)#nl --implements  #handler#nl #skip #nl end  )</template>
	<template name="evt_connect_OnTreeBeginRDrag">#utbl$name:Connect( wx.wxEVT_COMMAND_TREE_BEGIN_RDRAG, function(event)#nl --implements  #handler#nl #skip #nl end  )</template>
	<template name="evt_connect_OnTreeEndDrag">#utbl$name:Connect( wx.wxEVT_COMMAND_TREE_END_DRAG, function(event)#nl --implements  #handler#nl #skip #nl end  )</template>
	<template name="evt_connect_OnTreeBeginLabelEdit">#utbl$name:Connect( wx.wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, function(event)#nl --implements  #handler#nl #skip #nl end  )</template>
	<template name="evt_connect_OnTreeEndLabelEdit">#utbl$name:Connect( wx.wxEVT_COMMAND_TREE_END_LABEL_EDIT, function(event)#nl --implements  #handler#nl #skip #nl end  )</template>
	<template name="evt_connect_OnTreeDeleteItem">#utbl$name:Connect( wx.wxEVT_COMMAND_TREE_DELETE_ITEM, function(event)#nl --implements  #handler#nl #skip #nl end  )</template>
	<template name="evt_connect_OnTreeItemActivated">#utbl$name:Connect( wx.wxEVT_COMMAND_TREE_ITEM_ACTIVATED, function(event)#nl --implements  #handler#nl #skip #nl end  )</template>
	<template name="evt_connect_OnTreeItemCollapsed">#utbl$name:Connect( wx.wxEVT_COMMAND_TREE_ITEM_COLLAPSED, function(event)#nl --implements  #handler#nl #skip #nl end  )</template>
	<template name="evt_connect_OnTreeItemCollapsing">#utbl$name:Connect( wx.wxEVT_COMMAND_TREE_ITEM_COLLAPSING, function(event)#nl --implements  #handler#nl #skip #nl end  )</template>
	<template name="evt_connect_OnTreeItemExpanded">#utbl$name:Connect( wx.wxEVT_COMMAND_TREE_ITEM_EXPANDED, function(event)#nl --implements  #handler#nl #skip #nl end  )</template>
	<template name="evt_connect_OnTreeItemExpanding">#utbl$name:Connect( wx.wxEVT_COMMAND_TREE_ITEM_EXPANDING, function(event)#nl --implements  #handler#nl #skip #nl end  )</template>
	<template name="evt_connect_OnTreeItemRightClick">#utbl$name:Connect( wx.wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, function(event)#nl --implements  #handler#nl #skip #nl end  )</template>
	<template name="evt_connect_OnTreeItemMiddleClick">#utbl$name:Connect( wx.wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK, function(event)#nl --implements  #handler#nl #skip #nl end  )</template>
	<template name="evt_connect_OnTreeSelChanged">#utbl$name:Connect( wx.wxEVT_COMMAND_TREE_SEL_CHANGED, function(event)#nl --implements  #handler#nl #skip #nl end  )</template>
	<template name="evt_connect_OnTreeSelChanging">#utbl$name:Connect( wx.wxEVT_COMMAND_TREE_SEL_CHANGING, function(event)#nl --implements  #handler#nl #skip #nl end  )</template>
	<template name="evt_connect_OnTreeKeyDown">#utbl$name:Connect( wx.wxEVT_COMMAND_TREE_KEY_DOWN, function(event)#nl --implements  #handler#nl #skip #nl end  )</template>
	<template name="evt_connect_OnTreeItemMenu">#utbl$name:Connect( wx.wxEVT_COMMAND_TREE_ITEM_MENU, function(event)#nl --implements  #handler#nl #skip #nl end  )</template>
  </templates>
  <templates class="UserClasses">
		<template name="file_comment">
			 --Here you can extend functionality of $gen_file  module.
		</template>
		<template name="event_handler_comment">
			@-- Handlers for $basename events.
		</template>
		<template name="source_include"> #nl require ("$gen_file")</template>
		<template name="class_decl">
			@# Implementing $basename #nl
			class #utbl$name( $gen_file.$basename ):
		</template>
		<template name="Frame_cons_def">
			def __init__( self, parent ): #indent #nl
				$gen_file.$basename.__init__( self, parent ) #unindent #nl
		</template>
		<template name="Panel_cons_def">
			def __init__( self, parent ): #indent #nl
				$gen_file.$basename.__init__( self, parent ) #unindent #nl
		</template>
		<template name="Dialog_cons_def">
			def __init__( self, parent ): #indent #nl
				$gen_file.$basename.__init__( self, parent ) #unindent #nl
		</template>
		<template name="Wizard_cons_def">
			def __init__( self, parent ): #indent #nl
				$gen_file.$basename.__init__( self, parent ) #unindent #nl
		</template>
  </templates>
</codegen>
