<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<codegen language="PHP">
  <templates class="Project">
    <template name="php_preamble">
			<![CDATA[<?php]]>
	</template>
    <template name="php_epilogue">
			<![CDATA[?>]]>
    </template>
  </templates>
  <templates class="wxWindow">
		<template name="settings">
			#ifnotnull $window_extra_style
			@{ @$this->$name->SetExtraStyle( $window_extra_style ); #nl @}

			#ifnotnull $font
			@{ @$this->$name->SetFont( $font ); #nl @}

			#ifnotnull $fg
			@{ @$this->$name->SetForegroundColour( $fg ); #nl @}

			#ifnotnull $bg
			@{ @$this->$name->SetBackgroundColour( $bg ); #nl @}

			#ifequal $enabled "0"
			@{ @$this->$name->Enable( $enabled ); #nl @}

			#ifequal $hidden "1"
			@{ @$this->$name->Hide(); #nl @}

			#ifnotnull $tooltip
			@{ @$this->$name->SetToolTip( $tooltip ); #nl @}

			#ifnotnull $context_help
			@{ @$this->$name->SetHelpText( $context_help ); #nl @}

			#ifnotnull $minimum_size
			@{ @$this->$name->SetMinSize( $minimum_size ); #nl @}

			#ifnotnull $maximum_size
			@{ @$this->$name->SetMaxSize( $maximum_size ); #nl @}

			#ifparenttypeequal "toolbar_form"
			@{ @$this->AddControl( @$this->$name ); @}

		</template>

		<!-- wxKeyEvent -->
		<template name="evt_connect_OnChar">@$this->$name->Connect( wxEVT_CHAR, #handler );</template>
		<template name="evt_connect_OnCharHook">@$this->$name->Connect( wxEVT_CHAR_HOOK, #handler );</template>
		<template name="evt_connect_OnKeyDown">@$this->$name->Connect( wxEVT_KEY_DOWN, #handler );</template>
		<template name="evt_connect_OnKeyUp">@$this->$name->Connect( wxEVT_KEY_UP, #handler );</template>

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

		<!-- wxFocusEvent -->
		<template name="evt_connect_OnKillFocus">@$this->$name->Connect( wxEVT_KILL_FOCUS, #handler );</template>
		<template name="evt_connect_OnSetFocus">@$this->$name->Connect( wxEVT_SET_FOCUS, #handler );</template>
.
		<!-- wxPaintEvent -->
		<template name="evt_connect_OnPaint">@$this->$name->Connect( wxEVT_PAINT, #handler );</template>

		<!-- wxEraseEvent -->
		<template name="evt_connect_OnEraseBackground">@$this->$name->Connect( wxEVT_ERASE_BACKGROUND, #handler );</template>

		<!-- wxSizeEvent -->
		<template name="evt_connect_OnSize">@$this->$name->Connect( wxEVT_SIZE, #handler );</template>

		<!-- wxUpdateUIEvent -->
		<template name="evt_connect_OnUpdateUI">@$this->$name->Connect( wxEVT_UPDATE_UI, #handler );</template>
  </templates>
  
  <templates class="Validator">
  	<template name="include" />   
	<template name="valvar_declaration" />
	<template name="settings" />           
  </templates>
  
  <templates class="AUI">
	<template name="settings">
		#ifparenttypeequal "form"
		@{
		#ifequal #parent $aui_managed "1"
		@{ 
		#iftypenotequal "toolbar"
		@{ 
			@$this->$name #append PaneInfo = new wxAuiPaneInfo(); #nl
			@$this->$name #append PaneInfo#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"
			@{->DockFixed( $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
			@$this->m_mgr->AddPane( @$this->$name, @$this->$name #append PaneInfo ); #nl				
		@}
		@}
		@}
	</template>
  </templates>
  
  <templates class="wxTreeCtrlBase">
	<template name="evt_connect_OnTreeBeginDrag">@$this->$name->Connect( wxEVT_COMMAND_TREE_BEGIN_DRAG, #handler );</template>
	<template name="evt_connect_OnTreeBeginRDrag">@$this->$name->Connect( wxEVT_COMMAND_TREE_BEGIN_RDRAG, #handler );</template>
	<template name="evt_connect_OnTreeEndDrag">@$this->$name->Connect( wxEVT_COMMAND_TREE_END_DRAG, #handler );</template>
	<template name="evt_connect_OnTreeBeginLabelEdit">@$this->$name->Connect( wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, #handler );</template>
	<template name="evt_connect_OnTreeEndLabelEdit">@$this->$name->Connect( wxEVT_COMMAND_TREE_END_LABEL_EDIT, #handler );</template>
	<template name="evt_connect_OnTreeDeleteItem">@$this->$name->Connect( wxEVT_COMMAND_TREE_DELETE_ITEM, #handler );</template>
	<template name="evt_connect_OnTreeItemActivated">@$this->$name->Connect( wxEVT_COMMAND_TREE_ITEM_ACTIVATED, #handler );</template>
	<template name="evt_connect_OnTreeItemCollapsed">@$this->$name->Connect( wxEVT_COMMAND_TREE_ITEM_COLLAPSED, #handler );</template>
	<template name="evt_connect_OnTreeItemCollapsing">@$this->$name->Connect( wxEVT_COMMAND_TREE_ITEM_COLLAPSING, #handler );</template>
	<template name="evt_connect_OnTreeItemExpanded">@$this->$name->Connect( wxEVT_COMMAND_TREE_ITEM_EXPANDED, #handler );</template>
	<template name="evt_connect_OnTreeItemExpanding">@$this->$name->Connect( wxEVT_COMMAND_TREE_ITEM_EXPANDING, #handler );</template>
	<template name="evt_connect_OnTreeItemRightClick">@$this->$name->Connect( wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, #handler );</template>
	<template name="evt_connect_OnTreeItemMiddleClick">@$this->$name->Connect( wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK, #handler );</template>
	<template name="evt_connect_OnTreeSelChanged">@$this->$name->Connect( wxEVT_COMMAND_TREE_SEL_CHANGED, #handler );</template>
	<template name="evt_connect_OnTreeSelChanging">@$this->$name->Connect( wxEVT_COMMAND_TREE_SEL_CHANGING, #handler );</template>
	<template name="evt_connect_OnTreeKeyDown">@$this->$name->Connect( wxEVT_COMMAND_TREE_KEY_DOWN, #handler );</template>
	<template name="evt_connect_OnTreeItemMenu">@$this->$name->Connect( wxEVT_COMMAND_TREE_ITEM_MENU, #handler );</template>
  </templates>
  
  <templates class="UserClasses">
		<template name="file_comment">
			/*Subclass of $basename, which is generated by wxFormBuilder.*/
		</template>
		<template name="event_handler_comment">
			@// Handlers for $basename events.
		</template>
		<template name="source_include">import wx #nl import $gen_file</template>
		<template name="class_decl">
			@// Implementing $basename #nl
			class $name extends $gen_file$basename {}
		</template>
		<template name="Frame_cons_def">
			function __construct(){ #indent #nl
				parent::__construct( @$parent ); #unindent #nl
			} #nl
		</template>
		<template name="Panel_cons_def">
			function __construct(){ #indent #nl
				parent::__construct( @$parent ); #unindent #nl
			} #nl
		</template>
		<template name="Dialog_cons_def">
			function __construct(){ #indent #nl
				parent::__construct( @$parent ); #unindent #nl
			} #nl
		</template>
		<template name="Wizard_cons_def">
			function __construct(){ #indent #nl
				parent::__construct( @$parent ); #unindent #nl
			} #nl
		</template>
  </templates>
</codegen>
