<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!--
wxFormBuilder - A Visual Dialog Editor for wxWidgets.
Copyright (C) 2005 José Antonio Hurtado

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Written by
  José Antonio Hurtado - joseantonio.hurtado@gmail.com
  Juan Antonio Ortega  - jortegalalmolda@gmail.com

PHP code generation writen by
  Jefferson González - jgmdev@gmail.com
-->
<codegen language="PHP">

	<templates class="wxTopLevelWindow">
		<template name="evt_connect_OnActivate">@$this->Connect( wxEVT_ACTIVATE, #handler );</template>
		<template name="evt_disconnect_OnActivate">@$this->Disconnect( wxEVT_ACTIVATE );</template>
		<template name="evt_connect_OnActivateApp">@$this->Connect( wxEVT_ACTIVATE_APP, #handler );</template>
		<template name="evt_disconnect_OnActivateApp">@$this->Disconnect( wxEVT_ACTIVATE_APP );</template>
		<template name="evt_connect_OnClose">@$this->Connect( wxEVT_CLOSE_WINDOW, #handler );</template>
		<template name="evt_disconnect_OnClose">@$this->Disconnect( wxEVT_CLOSE_WINDOW );</template>
		<template name="evt_connect_OnHibernate">@$this->Connect( wxEVT_HIBERNATE, #handler );</template>
		<template name="evt_disconnect_OnHibernate">@$this->Disconnect( wxEVT_HIBERNATE );</template>
		<template name="evt_connect_OnIconize">@$this->Connect( wxEVT_ICONIZE, #handler );</template>
		<template name="evt_disconnect_OnIconize">@$this->Disconnect( wxEVT_ICONIZE );</template>
		<template name="evt_connect_OnMaximize">@$this->Connect( wxEVT_MAXIMIZE, #handler );</template>
		<template name="evt_disconnect_OnMaximize">@$this->Disconnect( wxEVT_MAXIMIZE );</template>
		<template name="evt_connect_OnMove">@$this->Connect( wxEVT_MOVE, #handler );</template>
		<template name="evt_disconnect_OnMove">@$this->Disconnect( wxEVT_MOVE );</template>
		<template name="evt_connect_OnMoving">@$this->Connect( wxEVT_MOVING, #handler );</template>
		<template name="evt_disconnect_OnMoving">@$this->Disconnect( wxEVT_MOVING );</template>
		<template name="evt_connect_OnMoveStart">@$this->Connect( wxEVT_MOVE_START, #handler );</template>
		<template name="evt_disconnect_OnMoveStart">@$this->Disconnect( wxEVT_MOVE_START );</template>
		<template name="evt_connect_OnMoveEnd">@$this->Connect( wxEVT_MOVE_END, #handler );</template>
		<template name="evt_disconnect_OnMoveEnd">@$this->Disconnect( wxEVT_MOVE_END );</template>
		<template name="evt_connect_OnShow">@$this->Connect( wxEVT_SHOW, #handler );</template>
		<template name="evt_disconnect_OnShow">@$this->Disconnect( wxEVT_SHOW );</template>
		<template name="evt_connect_OnIdle">@$this->Connect( wxEVT_IDLE, #handler );</template>
		<template name="evt_disconnect_OnIdle">@$this->Disconnect( wxEVT_IDLE );</template>
	</templates>
	
	<templates class="AUI Events">
		<template name="evt_connect_OnAuiPaneButton">@$this->Connect( wxEVT_AUI_PANE_BUTTON, #handler );</template>
		<template name="evt_disconnect_OnAuiPaneButton">@$this->Disconnect( wxEVT_AUI_PANE_BUTTON );</template>
		<template name="evt_connect_OnAuiPaneClose">@$this->Connect( wxEVT_AUI_PANE_CLOSE, #handler );</template>
		<template name="evt_disconnect_OnAuiPaneClose">@$this->Disconnect( wxEVT_AUI_PANE_CLOSE );</template>
		<template name="evt_connect_OnAuiPaneMaximize">@$this->Connect( wxEVT_AUI_PANE_MAXIMIZE, #handler );</template>
		<template name="evt_disconnect_OnAuiPaneMaximize">@$this->Disconnect( wxEVT_AUI_PANE_MAXIMIZE );</template>
		<template name="evt_connect_OnAuiPaneRestore">@$this->Connect( wxEVT_AUI_PANE_RESTORE, #handler );</template>
		<template name="evt_disconnect_OnAuiPaneRestore">@$this->Disconnect( wxEVT_AUI_PANE_RESTORE );</template>
		<template name="evt_connect_OnAuiPaneActivated">@$this->Connect( wxEVT_AUI_PANE_ACTIVATED, #handler );</template>
		<template name="evt_disconnect_OnAuiPaneActivated">@$this->Disconnect( wxEVT_AUI_PANE_ACTIVATED );</template>
		<template name="evt_connect_OnAuiRender">@$this->Connect( wxEVT_AUI_RENDER, #handler );</template>
		<template name="evt_disconnect_OnAuiRender">@$this->Disconnect( wxEVT_AUI_RENDER );</template>
	</templates>
  
	<templates class="Frame">
		<!-- The duplication of these templates is not ideal, but the ripup is too big to be done before version 3 -->
		<template name="base">
			#ifnotnull $subclass/name
			@{ $subclass/name @}

			#ifnull $subclass/name
			@{ wxFrame @}
		</template>
		<template name="cons_def">
			function __construct( @$parent=null ){
		</template>
		<template name="cons_call">
			parent::__construct ( @$parent, $id, $title, $pos, $size, $style #ifnotnull $window_style @{ |$window_style @} #ifnotnull $window_name @{, $window_name @} );
		</template>
		<template name="destruction">
			#ifequal $aui_managed "1"
			@{ @$this->m_mgr->UnInit(); #nl @}
		</template>
		<template name="include" />
		<template name="settings">
			@$this->SetSizeHints( $minimum_size, $maximum_size ); #nl
			
			#ifnotnull $window_extra_style
			@{ @$this->SetExtraStyle( $window_extra_style ); #nl @}

			#ifnotnull $extra_style
			@{ @$this->SetExtraStyle( $extra_style ); #nl @}

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

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

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

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

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

			#ifnotnull $tooltip
			@{ @$this->SetToolTip( $tooltip ); #nl @}
			
			#ifequal $aui_managed "1"
			@{ 
				@$this->m_mgr = new wxAuiManager(); #nl
				@$this->m_mgr->SetManagedWindow( @$this ); #nl
				#ifnotnull $aui_manager_style
				@{ @$this->m_mgr->SetFlags($aui_manager_style); #nl @}
			@}
		</template>
		<template name="after_addchild">
			#ifequal $aui_managed "1"
			@{ #nl  @$this->m_mgr->Update(); @} 
			#ifnotnull $center
			@{ #nl  @$this->Centre( $center ); @}
		</template>
		<template name="evt_connect_OnChar">@$this->Connect( wxEVT_CHAR, #handler );</template>
		<template name="evt_disconnect_OnChar">@$this->Disconnect( wxEVT_CHAR );</template>
		<template name="evt_connect_OnEnterWindow">@$this->Connect( wxEVT_ENTER_WINDOW, #handler );</template>
		<template name="evt_disconnect_OnEnterWindow">@$this->Disconnect( wxEVT_ENTER_WINDOW );</template>
		<template name="evt_connect_OnEraseBackground">@$this->Connect( wxEVT_ERASE_BACKGROUND, #handler );</template>
		<template name="evt_disconnect_OnEraseBackground">@$this->Disconnect( wxEVT_ERASE_BACKGROUND );</template>
		<template name="evt_connect_OnCharHook">@$this->Connect( wxEVT_CHAR_HOOK, #handler );</template>
		<template name="evt_disconnect_OnCharHook">@$this->Disconnect( wxEVT_CHAR_HOOK );</template>
		<template name="evt_connect_OnKeyDown">@$this->Connect( wxEVT_KEY_DOWN, #handler );</template>
		<template name="evt_disconnect_OnKeyDown">@$this->Disconnect( wxEVT_KEY_DOWN );</template>
		<template name="evt_connect_OnKeyUp">@$this->Connect( wxEVT_KEY_UP, #handler );</template>
		<template name="evt_disconnect_OnKeyUp">@$this->Disconnect( wxEVT_KEY_UP );</template>
		<template name="evt_connect_OnKillFocus">@$this->Connect( wxEVT_KILL_FOCUS, #handler );</template>
		<template name="evt_disconnect_OnKillFocus">@$this->Disconnect( wxEVT_KILL_FOCUS );</template>
		<template name="evt_connect_OnLeaveWindow">@$this->Connect( wxEVT_LEAVE_WINDOW, #handler );</template>
		<template name="evt_disconnect_OnLeaveWindow">@$this->Disconnect( wxEVT_LEAVE_WINDOW );</template>
		<template name="evt_connect_OnLeftDClick">@$this->Connect( wxEVT_LEFT_DCLICK, #handler );</template>
		<template name="evt_disconnect_OnLeftDClick">@$this->Disconnect( wxEVT_LEFT_DCLICK );</template>
		<template name="evt_connect_OnLeftDown">@$this->Connect( wxEVT_LEFT_DOWN, #handler );</template>  
		<template name="evt_disconnect_OnLeftDown">@$this->Disconnect( wxEVT_LEFT_DOWN );</template>
		<template name="evt_connect_OnLeftUp">@$this->Connect( wxEVT_LEFT_UP, #handler );</template>  
		<template name="evt_disconnect_OnLeftUp">@$this->Disconnect( wxEVT_LEFT_UP );</template>
		<template name="evt_connect_OnMiddleDClick">@$this->Connect( wxEVT_MIDDLE_DCLICK, #handler );</template>
		<template name="evt_disconnect_OnMiddleDClick">@$this->Disconnect( wxEVT_MIDDLE_DCLICK );</template>
		<template name="evt_connect_OnMiddleDown">@$this->Connect( wxEVT_MIDDLE_DOWN, #handler );</template>
		<template name="evt_disconnect_OnMiddleDown">@$this->Disconnect( wxEVT_MIDDLE_DOWN );</template>
		<template name="evt_connect_OnMiddleUp">@$this->Connect( wxEVT_MIDDLE_UP, #handler );</template>
		<template name="evt_disconnect_OnMiddleUp">@$this->Disconnect( wxEVT_MIDDLE_UP );</template>
		<template name="evt_connect_OnAux1DClick">@$this->Connect( wxEVT_AUX1_DCLICK, #handler );</template>
		<template name="evt_disconnect_OnAux1DClick">@$this->Disconnect( wxEVT_AUX1_DCLICK );</template>
		<template name="evt_connect_OnAux1Down">@$this->Connect( wxEVT_AUX1_DOWN, #handler );</template>
		<template name="evt_disconnect_OnAux1Down">@$this->Disconnect( wxEVT_AUX1_DOWN );</template>
		<template name="evt_connect_OnAux1Up">@$this->Connect( wxEVT_AUX1_UP, #handler );</template>
		<template name="evt_disconnect_OnAux1Up">@$this->Disconnect( wxEVT_AUX1_UP );</template>
		<template name="evt_connect_OnAux2DClick">@$this->Connect( wxEVT_AUX2_DCLICK, #handler );</template>
		<template name="evt_disconnect_OnAux2DClick">@$this->Disconnect( wxEVT_AUX2_DCLICK );</template>
		<template name="evt_connect_OnAux2Down">@$this->Connect( wxEVT_AUX2_DOWN, #handler );</template>
		<template name="evt_disconnect_OnAux2Down">@$this->Disconnect( wxEVT_AUX2_DOWN );</template>
		<template name="evt_connect_OnAux2Up">@$this->Connect( wxEVT_AUX2_UP, #handler );</template>
		<template name="evt_disconnect_OnAux2Up">@$this->Disconnect( wxEVT_AUX2_UP );</template>
		<template name="evt_connect_OnMotion">@$this->Connect( wxEVT_MOTION, #handler );</template>
		<template name="evt_disconnect_OnMotion">@$this->Disconnect( wxEVT_MOTION );</template>
		<template name="evt_connect_OnMouseEvents">@$this->Connect( wxEVT_MOUSE, #handler );</template>
		<template name="evt_disconnect_OnMouseEvents">
			@$this->Disconnect( wxEVT_LEFT_DOWN, #handler ); #nl
			@$this->Disconnect( wxEVT_LEFT_UP, #handler ); #nl
			@$this->Disconnect( wxEVT_MIDDLE_DOWN, #handler ); #nl
			@$this->Disconnect( wxEVT_MIDDLE_UP, #handler ); #nl
			@$this->Disconnect( wxEVT_RIGHT_DOWN, #handler ); #nl
			@$this->Disconnect( wxEVT_RIGHT_UP, #handler ); #nl
			@$this->Disconnect( wxEVT_AUX1_DOWN, #handler ); #nl
			@$this->Disconnect( wxEVT_AUX1_UP, #handler ); #nl
			@$this->Disconnect( wxEVT_AUX2_DOWN, #handler ); #nl
			@$this->Disconnect( wxEVT_AUX2_UP, #handler ); #nl
			@$this->Disconnect( wxEVT_MOTION, #handler ); #nl
			@$this->Disconnect( wxEVT_LEFT_DCLICK, #handler ); #nl
			@$this->Disconnect( wxEVT_MIDDLE_DCLICK, #handler ); #nl
			@$this->Disconnect( wxEVT_RIGHT_DCLICK, #handler ); #nl
			@$this->Disconnect( wxEVT_AUX1_DCLICK, #handler ); #nl
			@$this->Disconnect( wxEVT_AUX2_DCLICK, #handler ); #nl
			@$this->Disconnect( wxEVT_LEAVE_WINDOW, #handler ); #nl
			@$this->Disconnect( wxEVT_ENTER_WINDOW, #handler ); #nl
			@$this->Disconnect( wxEVT_MOUSEWHEEL, #handler );
		</template>
		<template name="evt_connect_OnMouseEvents">
			@$this->Connect( wxEVT_LEFT_DOWN, #handler ); #nl
			@$this->Connect( wxEVT_LEFT_UP, #handler ); #nl
			@$this->Connect( wxEVT_MIDDLE_DOWN, #handler ); #nl
			@$this->Connect( wxEVT_MIDDLE_UP, #handler ); #nl
			@$this->Connect( wxEVT_RIGHT_DOWN, #handler ); #nl
			@$this->Connect( wxEVT_RIGHT_UP, #handler ); #nl
			@$this->Connect( wxEVT_AUX1_DOWN, #handler ); #nl
			@$this->Connect( wxEVT_AUX1_UP, #handler ); #nl
			@$this->Connect( wxEVT_AUX2_DOWN, #handler ); #nl
			@$this->Connect( wxEVT_AUX2_UP, #handler ); #nl
			@$this->Connect( wxEVT_MOTION, #handler ); #nl
			@$this->Connect( wxEVT_LEFT_DCLICK, #handler ); #nl
			@$this->Connect( wxEVT_MIDDLE_DCLICK, #handler ); #nl
			@$this->Connect( wxEVT_RIGHT_DCLICK, #handler ); #nl
			@$this->Connect( wxEVT_AUX1_DCLICK, #handler ); #nl
			@$this->Connect( wxEVT_AUX2_DCLICK, #handler ); #nl
			@$this->Connect( wxEVT_LEAVE_WINDOW, #handler ); #nl
			@$this->Connect( wxEVT_ENTER_WINDOW, #handler ); #nl
			@$this->Connect( wxEVT_MOUSEWHEEL, #handler );
		</template>
		<template name="evt_connect_OnMouseWheel">@$this->Connect( wxEVT_MOUSEWHEEL, #handler );</template>
		<template name="evt_disconnect_OnMouseWheel">@$this->Disconnect( wxEVT_MOUSEWHEEL );</template>
		<template name="evt_connect_OnPaint">@$this->Connect( wxEVT_PAINT, #handler );</template>
		<template name="evt_disconnect_OnPaint">@$this->Disconnect( wxEVT_PAINT );</template>
		<template name="evt_connect_OnRightDClick">@$this->Connect( wxEVT_RIGHT_DCLICK, #handler );</template>
		<template name="evt_disconnect_OnRightDClick">@$this->Disconnect( wxEVT_RIGHT_DCLICK );</template>
		<template name="evt_connect_OnRightDown">@$this->Connect( wxEVT_RIGHT_DOWN, #handler );</template>
		<template name="evt_disconnect_OnRightDown">@$this->Disconnect( wxEVT_RIGHT_DOWN );</template>
		<template name="evt_connect_OnRightUp">@$this->Connect( wxEVT_RIGHT_UP, #handler );</template>
		<template name="evt_disconnect_OnRightUp">@$this->Disconnect( wxEVT_RIGHT_UP );</template>
		<template name="evt_connect_OnSetFocus">@$this->Connect( wxEVT_SET_FOCUS, #handler );</template>
		<template name="evt_disconnect_OnSetFocus">@$this->Disconnect( wxEVT_SET_FOCUS );</template>
		<template name="evt_connect_OnSize">@$this->Connect( wxEVT_SIZE, #handler );</template>
		<template name="evt_disconnect_OnSize">@$this->Disconnect( wxEVT_SIZE );</template>
		<template name="evt_connect_OnUpdateUI">@$this->Connect( wxEVT_UPDATE_UI, #handler );</template>
		<template name="evt_disconnect_OnUpdateUI">@$this->Disconnect( wxEVT_UPDATE_UI );</template>
	</templates>

	<templates class="Panel">
		<!-- The duplication of these templates is not ideal, but the ripup is too big to be done before version 3 -->
		<template name="base">
			#ifnotnull $subclass/name
			@{ public $subclass/name @}

			#ifnull $subclass/name
			@{ wxPanel @}
		</template>
		<template name="cons_def">
			function __construct( @$parent=null, @$id=$id, @$pos=$pos, @$size=$size, @$style=$window_style, @$name=$window_name ){
		</template>
		<template name="cons_call">
			parent::__construct( @$parent, @$id, @$pos, @$size, @$style, @$name );
		</template>
		<template name="destruction">
			#ifequal $aui_managed "1"
			@{ @$this->m_mgr->UnInit(); #nl @}
		</template>
		<template name="include" />
		<template name="settings">
			#ifnotnull $window_extra_style
			@{ @$this->SetExtraStyle( $window_extra_style ); #nl @}

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

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

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

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

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

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

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

			#ifequal $aui_managed "1"
			@{ 
				@$this->m_mgr = new wxAuiManager(); #nl
				@$this->m_mgr->SetManagedWindow( @$this ); #nl
				#ifnotnull $aui_manager_style
				@{ @$this->m_mgr->SetFlags($aui_manager_style); #nl @}
			@}
		</template>
		<template name="after_addchild">
			#ifequal $aui_managed "1"
			@{ #nl @$this->m_mgr->Update(); @} 
		</template>
		<template name="evt_connect_OnInitDialog">@$this->Connect( wxEVT_INIT_DIALOG, #handler );</template>
		<template name="evt_disconnect_OnInitDialog">@$this->Disconnect( wxEVT_INIT_DIALOG );</template>
		<template name="evt_connect_OnChar">@$this->Connect( wxEVT_CHAR, #handler );</template>
		<template name="evt_disconnect_OnChar">@$this->Disconnect( wxEVT_CHAR );</template>
		<template name="evt_connect_OnEnterWindow">@$this->Connect( wxEVT_ENTER_WINDOW, #handler );</template>
		<template name="evt_disconnect_OnEnterWindow">@$this->Disconnect( wxEVT_ENTER_WINDOW );</template>
		<template name="evt_connect_OnEraseBackground">@$this->Connect( wxEVT_ERASE_BACKGROUND, #handler );</template>
		<template name="evt_disconnect_OnEraseBackground">@$this->Disconnect( wxEVT_ERASE_BACKGROUND );</template>
		<template name="evt_connect_OnCharHook">@$this->Connect( wxEVT_CHAR_HOOK, #handler );</template>
		<template name="evt_disconnect_OnCharHook">@$this->Disconnect( wxEVT_CHAR_HOOK );</template>
		<template name="evt_connect_OnKeyDown">@$this->Connect( wxEVT_KEY_DOWN, #handler );</template>
		<template name="evt_disconnect_OnKeyDown">@$this->Disconnect( wxEVT_KEY_DOWN );</template>
		<template name="evt_connect_OnKeyUp">@$this->Connect( wxEVT_KEY_UP, #handler );</template>
		<template name="evt_disconnect_OnKeyUp">@$this->Disconnect( wxEVT_KEY_UP );</template>
		<template name="evt_connect_OnKillFocus">@$this->Connect( wxEVT_KILL_FOCUS, #handler );</template>
		<template name="evt_disconnect_OnKillFocus">@$this->Disconnect( wxEVT_KILL_FOCUS );</template>
		<template name="evt_connect_OnLeaveWindow">@$this->Connect( wxEVT_LEAVE_WINDOW, #handler );</template>
		<template name="evt_disconnect_OnLeaveWindow">@$this->Disconnect( wxEVT_LEAVE_WINDOW );</template>
		<template name="evt_connect_OnLeftDClick">@$this->Connect( wxEVT_LEFT_DCLICK, #handler );</template>
		<template name="evt_disconnect_OnLeftDClick">@$this->Disconnect( wxEVT_LEFT_DCLICK );</template>
		<template name="evt_connect_OnLeftDown">@$this->Connect( wxEVT_LEFT_DOWN, #handler );</template>  
		<template name="evt_disconnect_OnLeftDown">@$this->Disconnect( wxEVT_LEFT_DOWN );</template>
		<template name="evt_connect_OnLeftUp">@$this->Connect( wxEVT_LEFT_UP, #handler );</template>  
		<template name="evt_disconnect_OnLeftUp">@$this->Disconnect( wxEVT_LEFT_UP );</template>
		<template name="evt_connect_OnMiddleDClick">@$this->Connect( wxEVT_MIDDLE_DCLICK, #handler );</template>
		<template name="evt_disconnect_OnMiddleDClick">@$this->Disconnect( wxEVT_MIDDLE_DCLICK );</template>
		<template name="evt_connect_OnMiddleDown">@$this->Connect( wxEVT_MIDDLE_DOWN, #handler );</template>
		<template name="evt_disconnect_OnMiddleDown">@$this->Disconnect( wxEVT_MIDDLE_DOWN );</template>
		<template name="evt_connect_OnMiddleUp">@$this->Connect( wxEVT_MIDDLE_UP, #handler );</template>
		<template name="evt_disconnect_OnMiddleUp">@$this->Disconnect( wxEVT_MIDDLE_UP );</template>
		<template name="evt_connect_OnAux1DClick">@$this->Connect( wxEVT_AUX1_DCLICK, #handler );</template>
		<template name="evt_disconnect_OnAux1DClick">@$this->Disconnect( wxEVT_AUX1_DCLICK );</template>
		<template name="evt_connect_OnAux1Down">@$this->Connect( wxEVT_AUX1_DOWN, #handler );</template>
		<template name="evt_disconnect_OnAux1Down">@$this->Disconnect( wxEVT_AUX1_DOWN );</template>
		<template name="evt_connect_OnAux1Up">@$this->Connect( wxEVT_AUX1_UP, #handler );</template>
		<template name="evt_disconnect_OnAux1Up">@$this->Disconnect( wxEVT_AUX1_UP );</template>
		<template name="evt_connect_OnAux2DClick">@$this->Connect( wxEVT_AUX2_DCLICK, #handler );</template>
		<template name="evt_disconnect_OnAux2DClick">@$this->Disconnect( wxEVT_AUX2_DCLICK );</template>
		<template name="evt_connect_OnAux2Down">@$this->Connect( wxEVT_AUX2_DOWN, #handler );</template>
		<template name="evt_disconnect_OnAux2Down">@$this->Disconnect( wxEVT_AUX2_DOWN );</template>
		<template name="evt_connect_OnAux2Up">@$this->Connect( wxEVT_AUX2_UP, #handler );</template>
		<template name="evt_disconnect_OnAux2Up">@$this->Disconnect( wxEVT_AUX2_UP );</template>
		<template name="evt_connect_OnMotion">@$this->Connect( wxEVT_MOTION, #handler );</template>
		<template name="evt_disconnect_OnMotion">@$this->Disconnect( wxEVT_MOTION );</template>
		<template name="evt_connect_OnMouseEvents">@$this->Connect( wxEVT_MOUSE, #handler );</template>
		<template name="evt_disconnect_OnMouseEvents">
			@$this->Disconnect( wxEVT_LEFT_DOWN, #handler ); #nl
			@$this->Disconnect( wxEVT_LEFT_UP, #handler ); #nl
			@$this->Disconnect( wxEVT_MIDDLE_DOWN, #handler ); #nl
			@$this->Disconnect( wxEVT_MIDDLE_UP, #handler ); #nl
			@$this->Disconnect( wxEVT_RIGHT_DOWN, #handler ); #nl
			@$this->Disconnect( wxEVT_RIGHT_UP, #handler ); #nl
			@$this->Disconnect( wxEVT_AUX1_DOWN, #handler ); #nl
			@$this->Disconnect( wxEVT_AUX1_UP, #handler ); #nl
			@$this->Disconnect( wxEVT_AUX2_DOWN, #handler ); #nl
			@$this->Disconnect( wxEVT_AUX2_UP, #handler ); #nl
			@$this->Disconnect( wxEVT_MOTION, #handler ); #nl
			@$this->Disconnect( wxEVT_LEFT_DCLICK, #handler ); #nl
			@$this->Disconnect( wxEVT_MIDDLE_DCLICK, #handler ); #nl
			@$this->Disconnect( wxEVT_RIGHT_DCLICK, #handler ); #nl
			@$this->Disconnect( wxEVT_AUX1_DCLICK, #handler ); #nl
			@$this->Disconnect( wxEVT_AUX2_DCLICK, #handler ); #nl
			@$this->Disconnect( wxEVT_LEAVE_WINDOW, #handler ); #nl
			@$this->Disconnect( wxEVT_ENTER_WINDOW, #handler ); #nl
			@$this->Disconnect( wxEVT_MOUSEWHEEL, #handler );
		</template>
		<template name="evt_connect_OnMouseEvents">
			@$this->Connect( wxEVT_LEFT_DOWN, #handler ); #nl
			@$this->Connect( wxEVT_LEFT_UP, #handler ); #nl
			@$this->Connect( wxEVT_MIDDLE_DOWN, #handler ); #nl
			@$this->Connect( wxEVT_MIDDLE_UP, #handler ); #nl
			@$this->Connect( wxEVT_RIGHT_DOWN, #handler ); #nl
			@$this->Connect( wxEVT_RIGHT_UP, #handler ); #nl
			@$this->Connect( wxEVT_AUX1_DOWN, #handler ); #nl
			@$this->Connect( wxEVT_AUX1_UP, #handler ); #nl
			@$this->Connect( wxEVT_AUX2_DOWN, #handler ); #nl
			@$this->Connect( wxEVT_AUX2_UP, #handler ); #nl
			@$this->Connect( wxEVT_MOTION, #handler ); #nl
			@$this->Connect( wxEVT_LEFT_DCLICK, #handler ); #nl
			@$this->Connect( wxEVT_MIDDLE_DCLICK, #handler ); #nl
			@$this->Connect( wxEVT_RIGHT_DCLICK, #handler ); #nl
			@$this->Connect( wxEVT_AUX1_DCLICK, #handler ); #nl
			@$this->Connect( wxEVT_AUX2_DCLICK, #handler ); #nl
			@$this->Connect( wxEVT_LEAVE_WINDOW, #handler ); #nl
			@$this->Connect( wxEVT_ENTER_WINDOW, #handler ); #nl
			@$this->Connect( wxEVT_MOUSEWHEEL, #handler );
		</template>
		<template name="evt_connect_OnMouseWheel">@$this->Connect( wxEVT_MOUSEWHEEL, #handler );</template>
		<template name="evt_disconnect_OnMouseWheel">@$this->Disconnect( wxEVT_MOUSEWHEEL );</template>
		<template name="evt_connect_OnPaint">@$this->Connect( wxEVT_PAINT, #handler );</template>
		<template name="evt_disconnect_OnPaint">@$this->Disconnect( wxEVT_PAINT );</template>
		<template name="evt_connect_OnRightDClick">@$this->Connect( wxEVT_RIGHT_DCLICK, #handler );</template>
		<template name="evt_disconnect_OnRightDClick">@$this->Disconnect( wxEVT_RIGHT_DCLICK );</template>
		<template name="evt_connect_OnRightDown">@$this->Connect( wxEVT_RIGHT_DOWN, #handler );</template>
		<template name="evt_disconnect_OnRightDown">@$this->Disconnect( wxEVT_RIGHT_DOWN );</template>
		<template name="evt_connect_OnRightUp">@$this->Connect( wxEVT_RIGHT_UP, #handler );</template>
		<template name="evt_disconnect_OnRightUp">@$this->Disconnect( wxEVT_RIGHT_UP );</template>
		<template name="evt_connect_OnSetFocus">@$this->Connect( wxEVT_SET_FOCUS, #handler );</template>
		<template name="evt_disconnect_OnSetFocus">@$this->Disconnect( wxEVT_SET_FOCUS );</template>
		<template name="evt_connect_OnSize">@$this->Connect( wxEVT_SIZE, #handler );</template>
		<template name="evt_disconnect_OnSize">@$this->Disconnect( wxEVT_SIZE );</template>
		<template name="evt_connect_OnUpdateUI">@$this->Connect( wxEVT_UPDATE_UI, #handler );</template>
		<template name="evt_disconnect_OnUpdateUI">@$this->Disconnect( wxEVT_UPDATE_UI );</template>
	</templates>


	<templates class="Dialog">
		<!-- The duplication of these templates is not ideal, but the ripup is too big to be done before version 3 -->
		<template name="base">
			#ifnotnull $subclass/name
			@{ public $subclass/name @}

			#ifnull $subclass/name
			@{ wxDialog @}
		</template>
		<template name="cons_def">
			function __construct( @$parent=null ){
		</template>
		<template name="cons_call">
			parent::__construct( @$parent, $id, $title, $pos, $size, $style #ifnotnull $window_style @{ |$window_style @} #ifnotnull $window_name @{, $window_name @} );
		</template>
		<template name="destruction">
			#ifequal $aui_managed "1"
			@{ @$this->m_mgr->UnInit(); #nl @}
		</template>
		<template name="include" />
		<template name="settings">
			@$this->SetSizeHints( $minimum_size, $maximum_size ); #nl
			
			#ifnotnull $window_extra_style
			@{ @$this->SetExtraStyle( @$this->GetExtraStyle() | $window_extra_style ); #nl @}

			#ifnotnull $extra_style
			@{ @$this->SetExtraStyle( $extra_style ); #nl @}

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

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

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

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

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

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

			#ifequal $aui_managed "1"
			@{ 
				@$this->m_mgr = new wxAuiManager(); #nl
				@$this->m_mgr->SetManagedWindow( @$this ); #nl
				#ifnotnull $aui_manager_style
				@{ @$this->m_mgr->SetFlags($aui_manager_style); #nl @}
			@}
		</template>
		<template name="after_addchild">
			#ifequal $aui_managed "1"
			@{ #nl @$this->m_mgr->Update(); @} 
			#ifnotnull $center
			@{ #nl @$this->Centre( $center ); @}
		</template>
		<template name="evt_connect_OnInitDialog">@$this->Connect( wxEVT_INIT_DIALOG, #handler );</template>
		<template name="evt_disconnect_OnInitDialog">@$this->Disconnect( wxEVT_INIT_DIALOG );</template>
		<template name="evt_connect_OnChar">@$this->Connect( wxEVT_CHAR, #handler );</template>
		<template name="evt_disconnect_OnChar">@$this->Disconnect( wxEVT_CHAR );</template>
		<template name="evt_connect_OnEnterWindow">@$this->Connect( wxEVT_ENTER_WINDOW, #handler );</template>
		<template name="evt_disconnect_OnEnterWindow">@$this->Disconnect( wxEVT_ENTER_WINDOW );</template>
		<template name="evt_connect_OnCharHook">@$this->Connect( wxEVT_CHAR_HOOK, #handler );</template>
		<template name="evt_disconnect_OnCharHook">@$this->Disconnect( wxEVT_CHAR_HOOK );</template>
		<template name="evt_connect_OnEraseBackground">@$this->Connect( wxEVT_ERASE_BACKGROUND, #handler );</template>
		<template name="evt_disconnect_OnEraseBackground">@$this->Disconnect( wxEVT_ERASE_BACKGROUND );</template>
		<template name="evt_connect_OnKeyDown">@$this->Connect( wxEVT_KEY_DOWN, #handler );</template>
		<template name="evt_disconnect_OnKeyDown">@$this->Disconnect( wxEVT_KEY_DOWN );</template>
		<template name="evt_connect_OnKeyUp">@$this->Connect( wxEVT_KEY_UP, #handler );</template>
		<template name="evt_disconnect_OnKeyUp">@$this->Disconnect( wxEVT_KEY_UP );</template>
		<template name="evt_connect_OnKillFocus">@$this->Connect( wxEVT_KILL_FOCUS, #handler );</template>
		<template name="evt_disconnect_OnKillFocus">@$this->Disconnect( wxEVT_KILL_FOCUS );</template>
		<template name="evt_connect_OnLeaveWindow">@$this->Connect( wxEVT_LEAVE_WINDOW, #handler );</template>
		<template name="evt_disconnect_OnLeaveWindow">@$this->Disconnect( wxEVT_LEAVE_WINDOW );</template>
		<template name="evt_connect_OnLeftDClick">@$this->Connect( wxEVT_LEFT_DCLICK, #handler );</template>
		<template name="evt_disconnect_OnLeftDClick">@$this->Disconnect( wxEVT_LEFT_DCLICK );</template>
		<template name="evt_connect_OnLeftDown">@$this->Connect( wxEVT_LEFT_DOWN, #handler );</template>  
		<template name="evt_disconnect_OnLeftDown">@$this->Disconnect( wxEVT_LEFT_DOWN );</template>
		<template name="evt_connect_OnLeftUp">@$this->Connect( wxEVT_LEFT_UP, #handler );</template>  
		<template name="evt_disconnect_OnLeftUp">@$this->Disconnect( wxEVT_LEFT_UP );</template>
		<template name="evt_connect_OnMiddleDClick">@$this->Connect( wxEVT_MIDDLE_DCLICK, #handler );</template>
		<template name="evt_disconnect_OnMiddleDClick">@$this->Disconnect( wxEVT_MIDDLE_DCLICK );</template>
		<template name="evt_connect_OnMiddleDown">@$this->Connect( wxEVT_MIDDLE_DOWN, #handler );</template>
		<template name="evt_disconnect_OnMiddleDown">@$this->Disconnect( wxEVT_MIDDLE_DOWN );</template>
		<template name="evt_connect_OnMiddleUp">@$this->Connect( wxEVT_MIDDLE_UP, #handler );</template>
		<template name="evt_disconnect_OnMiddleUp">@$this->Disconnect( wxEVT_MIDDLE_UP );</template>
		<template name="evt_connect_OnAux1DClick">@$this->Connect( wxEVT_AUX1_DCLICK, #handler );</template>
		<template name="evt_disconnect_OnAux1DClick">@$this->Disconnect( wxEVT_AUX1_DCLICK );</template>
		<template name="evt_connect_OnAux1Down">@$this->Connect( wxEVT_AUX1_DOWN, #handler );</template>
		<template name="evt_disconnect_OnAux1Down">@$this->Disconnect( wxEVT_AUX1_DOWN );</template>
		<template name="evt_connect_OnAux1Up">@$this->Connect( wxEVT_AUX1_UP, #handler );</template>
		<template name="evt_disconnect_OnAux1Up">@$this->Disconnect( wxEVT_AUX1_UP );</template>
		<template name="evt_connect_OnAux2DClick">@$this->Connect( wxEVT_AUX2_DCLICK, #handler );</template>
		<template name="evt_disconnect_OnAux2DClick">@$this->Disconnect( wxEVT_AUX2_DCLICK );</template>
		<template name="evt_connect_OnAux2Down">@$this->Connect( wxEVT_AUX2_DOWN, #handler );</template>
		<template name="evt_disconnect_OnAux2Down">@$this->Disconnect( wxEVT_AUX2_DOWN );</template>
		<template name="evt_connect_OnAux2Up">@$this->Connect( wxEVT_AUX2_UP, #handler );</template>
		<template name="evt_disconnect_OnAux2Up">@$this->Disconnect( wxEVT_AUX2_UP );</template>
		<template name="evt_connect_OnMotion">@$this->Connect( wxEVT_MOTION, #handler );</template>
		<template name="evt_disconnect_OnMotion">@$this->Disconnect( wxEVT_MOTION );</template>
		<template name="evt_connect_OnMouseEvents">@$this->Connect( wxEVT_MOUSE, #handler );</template>
		<template name="evt_connect_OnMouseEvents">
			@$this->Connect( wxEVT_LEFT_DOWN, #handler ); #nl
			@$this->Connect( wxEVT_LEFT_UP, #handler ); #nl
			@$this->Connect( wxEVT_MIDDLE_DOWN, #handler ); #nl
			@$this->Connect( wxEVT_MIDDLE_UP, #handler ); #nl
			@$this->Connect( wxEVT_RIGHT_DOWN, #handler ); #nl
			@$this->Connect( wxEVT_RIGHT_UP, #handler ); #nl
			@$this->Connect( wxEVT_AUX1_DOWN, #handler ); #nl
			@$this->Connect( wxEVT_AUX1_UP, #handler ); #nl
			@$this->Connect( wxEVT_AUX2_DOWN, #handler ); #nl
			@$this->Connect( wxEVT_AUX2_UP, #handler ); #nl
			@$this->Connect( wxEVT_MOTION, #handler ); #nl
			@$this->Connect( wxEVT_LEFT_DCLICK, #handler ); #nl
			@$this->Connect( wxEVT_MIDDLE_DCLICK, #handler ); #nl
			@$this->Connect( wxEVT_RIGHT_DCLICK, #handler ); #nl
			@$this->Connect( wxEVT_AUX1_DCLICK, #handler ); #nl
			@$this->Connect( wxEVT_AUX2_DCLICK, #handler ); #nl
			@$this->Connect( wxEVT_LEAVE_WINDOW, #handler ); #nl
			@$this->Connect( wxEVT_ENTER_WINDOW, #handler ); #nl
			@$this->Connect( wxEVT_MOUSEWHEEL, #handler );
		</template>
		<template name="evt_disconnect_OnMouseEvents">
			@$this->Disconnect( wxEVT_LEFT_DOWN, #handler ); #nl
			@$this->Disconnect( wxEVT_LEFT_UP, #handler ); #nl
			@$this->Disconnect( wxEVT_MIDDLE_DOWN, #handler ); #nl
			@$this->Disconnect( wxEVT_MIDDLE_UP, #handler ); #nl
			@$this->Disconnect( wxEVT_RIGHT_DOWN, #handler ); #nl
			@$this->Disconnect( wxEVT_RIGHT_UP, #handler ); #nl
			@$this->Disconnect( wxEVT_AUX1_DOWN, #handler ); #nl
			@$this->Disconnect( wxEVT_AUX1_UP, #handler ); #nl
			@$this->Disconnect( wxEVT_AUX2_DOWN, #handler ); #nl
			@$this->Disconnect( wxEVT_AUX2_UP, #handler ); #nl
			@$this->Disconnect( wxEVT_MOTION, #handler ); #nl
			@$this->Disconnect( wxEVT_LEFT_DCLICK, #handler ); #nl
			@$this->Disconnect( wxEVT_MIDDLE_DCLICK, #handler ); #nl
			@$this->Disconnect( wxEVT_RIGHT_DCLICK, #handler ); #nl
			@$this->Disconnect( wxEVT_AUX1_DCLICK, #handler ); #nl
			@$this->Disconnect( wxEVT_AUX2_DCLICK, #handler ); #nl
			@$this->Disconnect( wxEVT_LEAVE_WINDOW, #handler ); #nl
			@$this->Disconnect( wxEVT_ENTER_WINDOW, #handler ); #nl
			@$this->Disconnect( wxEVT_MOUSEWHEEL, #handler );
		</template>
		<template name="evt_connect_OnMouseWheel">@$this->Connect( wxEVT_MOUSEWHEEL, #handler );</template>
		<template name="evt_disconnect_OnMouseWheel">@$this->Disconnect( wxEVT_MOUSEWHEEL );</template>
		<template name="evt_connect_OnPaint">@$this->Connect( wxEVT_PAINT, #handler );</template>
		<template name="evt_disconnect_OnPaint">@$this->Disconnect( wxEVT_PAINT );</template>
		<template name="evt_connect_OnRightDClick">@$this->Connect( wxEVT_RIGHT_DCLICK, #handler );</template>
		<template name="evt_disconnect_OnRightDClick">@$this->Disconnect( wxEVT_RIGHT_DCLICK );</template>
		<template name="evt_connect_OnRightDown">@$this->Connect( wxEVT_RIGHT_DOWN, #handler );</template>
		<template name="evt_disconnect_OnRightDown">@$this->Disconnect( wxEVT_RIGHT_DOWN );</template>
		<template name="evt_connect_OnRightUp">@$this->Connect( wxEVT_RIGHT_UP, #handler );</template>
		<template name="evt_disconnect_OnRightUp">@$this->Disconnect( wxEVT_RIGHT_UP );</template>
		<template name="evt_connect_OnSetFocus">@$this->Connect( wxEVT_SET_FOCUS, #handler );</template>
		<template name="evt_disconnect_OnSetFocus">@$this->Disconnect( wxEVT_SET_FOCUS );</template>
		<template name="evt_connect_OnSize">@$this->Connect( wxEVT_SIZE, #handler );</template>
		<template name="evt_disconnect_OnSize">@$this->Disconnect( wxEVT_SIZE );</template>
		<template name="evt_connect_OnUpdateUI">@$this->Connect( wxEVT_UPDATE_UI, #handler );</template>
		<template name="evt_disconnect_OnUpdateUI">@$this->Disconnect( wxEVT_UPDATE_UI );</template>
	</templates>
	
	<templates class="Wizard">
		<!-- The duplication of these templates is not ideal, but the ripup is too big to be done before version 3 -->
		<template name="base">
			#ifnotnull $subclass/name
			@{ public $subclass/name @}

			#ifnull $subclass/name
			@{ wxWizard @}
		</template>
		<template name="cons_def">
			function __construct( @$parent ){
		</template>
		<template name="cons_call">
			parent::__construct( @$parent, $id, $title, $bitmap, $pos, $style #ifnotnull $window_style @{ |$window_style @} #ifnotnull $window_name @{, $window_name @} );
		</template>
		<template name="include" />
		<template name="settings">
			#ifnotnull $window_extra_style
			@{ @$this->SetExtraStyle( $window_extra_style ); #nl @}

			#ifnotnull $extra_style
			@{ @$this->SetExtraStyle( $extra_style ); #nl @}

			@$this->SetSizeHints( $minimum_size, $maximum_size ); #nl

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

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

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

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

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

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

            @$this->m_pages = array(); #nl
		</template>
		<template name="after_addchild">
			#ifnotnull $center
			@{ @$this->Centre( $center ); #nl @}
		</template>
		<template name="evt_connect_OnInitDialog">@$this->Connect( wxEVT_INIT_DIALOG, #handler );</template>
		<template name="evt_disconnect_OnInitDialog">@$this->Disconnect( wxEVT_INIT_DIALOG );</template>
		<template name="evt_connect_OnChar">@$this->Connect( wxEVT_CHAR, #handler );</template>
		<template name="evt_disconnect_OnChar">@$this->Disconnect( wxEVT_CHAR );</template>
		<template name="evt_connect_OnEnterWindow">@$this->Connect( wxEVT_ENTER_WINDOW, #handler );</template>
		<template name="evt_disconnect_OnEnterWindow">@$this->Disconnect( wxEVT_ENTER_WINDOW );</template>
		<template name="evt_connect_OnCharHook">@$this->Connect( wxEVT_CHAR_HOOK, #handler );</template>
		<template name="evt_disconnect_OnCharHook">@$this->Disconnect( wxEVT_CHAR_HOOK );</template>
		<template name="evt_connect_OnEraseBackground">@$this->Connect( wxEVT_ERASE_BACKGROUND, #handler );</template>
		<template name="evt_disconnect_OnEraseBackground">@$this->Disconnect( wxEVT_ERASE_BACKGROUND );</template>
		<template name="evt_connect_OnKeyDown">@$this->Connect( wxEVT_KEY_DOWN, #handler );</template>
		<template name="evt_disconnect_OnKeyDown">@$this->Disconnect( wxEVT_KEY_DOWN );</template>
		<template name="evt_connect_OnKeyUp">@$this->Connect( wxEVT_KEY_UP, #handler );</template>
		<template name="evt_disconnect_OnKeyUp">@$this->Disconnect( wxEVT_KEY_UP );</template>
		<template name="evt_connect_OnKillFocus">@$this->Connect( wxEVT_KILL_FOCUS, #handler );</template>
		<template name="evt_disconnect_OnKillFocus">@$this->Disconnect( wxEVT_KILL_FOCUS );</template>
		<template name="evt_connect_OnLeaveWindow">@$this->Connect( wxEVT_LEAVE_WINDOW, #handler );</template>
		<template name="evt_disconnect_OnLeaveWindow">@$this->Disconnect( wxEVT_LEAVE_WINDOW );</template>
		<template name="evt_connect_OnLeftDClick">@$this->Connect( wxEVT_LEFT_DCLICK, #handler );</template>
		<template name="evt_disconnect_OnLeftDClick">@$this->Disconnect( wxEVT_LEFT_DCLICK );</template>
		<template name="evt_connect_OnLeftDown">@$this->Connect( wxEVT_LEFT_DOWN, #handler );</template>  
		<template name="evt_disconnect_OnLeftDown">@$this->Disconnect( wxEVT_LEFT_DOWN );</template>
		<template name="evt_connect_OnLeftUp">@$this->Connect( wxEVT_LEFT_UP, #handler );</template>  
		<template name="evt_disconnect_OnLeftUp">@$this->Disconnect( wxEVT_LEFT_UP );</template>
		<template name="evt_connect_OnMiddleDClick">@$this->Connect( wxEVT_MIDDLE_DCLICK, #handler );</template>
		<template name="evt_disconnect_OnMiddleDClick">@$this->Disconnect( wxEVT_MIDDLE_DCLICK );</template>
		<template name="evt_connect_OnMiddleDown">@$this->Connect( wxEVT_MIDDLE_DOWN, #handler );</template>
		<template name="evt_disconnect_OnMiddleDown">@$this->Disconnect( wxEVT_MIDDLE_DOWN );</template>
		<template name="evt_connect_OnMiddleUp">@$this->Connect( wxEVT_MIDDLE_UP, #handler );</template>
		<template name="evt_disconnect_OnMiddleUp">@$this->Disconnect( wxEVT_MIDDLE_UP );</template>
		<template name="evt_connect_OnAux1DClick">@$this->Connect( wxEVT_AUX1_DCLICK, #handler );</template>
		<template name="evt_disconnect_OnAux1DClick">@$this->Disconnect( wxEVT_AUX1_DCLICK );</template>
		<template name="evt_connect_OnAux1Down">@$this->Connect( wxEVT_AUX1_DOWN, #handler );</template>
		<template name="evt_disconnect_OnAux1Down">@$this->Disconnect( wxEVT_AUX1_DOWN );</template>
		<template name="evt_connect_OnAux1Up">@$this->Connect( wxEVT_AUX1_UP, #handler );</template>
		<template name="evt_disconnect_OnAux1Up">@$this->Disconnect( wxEVT_AUX1_UP );</template>
		<template name="evt_connect_OnAux2DClick">@$this->Connect( wxEVT_AUX2_DCLICK, #handler );</template>
		<template name="evt_disconnect_OnAux2DClick">@$this->Disconnect( wxEVT_AUX2_DCLICK );</template>
		<template name="evt_connect_OnAux2Down">@$this->Connect( wxEVT_AUX2_DOWN, #handler );</template>
		<template name="evt_disconnect_OnAux2Down">@$this->Disconnect( wxEVT_AUX2_DOWN );</template>
		<template name="evt_connect_OnAux2Up">@$this->Connect( wxEVT_AUX2_UP, #handler );</template>
		<template name="evt_disconnect_OnAux2Up">@$this->Disconnect( wxEVT_AUX2_UP );</template>
		<template name="evt_connect_OnMotion">@$this->Connect( wxEVT_MOTION, #handler );</template>
		<template name="evt_disconnect_OnMotion">@$this->Disconnect( wxEVT_MOTION );</template>
		<template name="evt_connect_OnMouseEvents">
			@$this->Connect( wxEVT_LEFT_DOWN, #handler ); #nl
			@$this->Connect( wxEVT_LEFT_UP, #handler ); #nl
			@$this->Connect( wxEVT_MIDDLE_DOWN, #handler ); #nl
			@$this->Connect( wxEVT_MIDDLE_UP, #handler ); #nl
			@$this->Connect( wxEVT_RIGHT_DOWN, #handler ); #nl
			@$this->Connect( wxEVT_RIGHT_UP, #handler ); #nl
			@$this->Connect( wxEVT_AUX1_DOWN, #handler ); #nl
			@$this->Connect( wxEVT_AUX1_UP, #handler ); #nl
			@$this->Connect( wxEVT_AUX2_DOWN, #handler ); #nl
			@$this->Connect( wxEVT_AUX2_UP, #handler ); #nl
			@$this->Connect( wxEVT_MOTION, #handler ); #nl
			@$this->Connect( wxEVT_LEFT_DCLICK, #handler ); #nl
			@$this->Connect( wxEVT_MIDDLE_DCLICK, #handler ); #nl
			@$this->Connect( wxEVT_RIGHT_DCLICK, #handler ); #nl
			@$this->Connect( wxEVT_AUX1_DCLICK, #handler ); #nl
			@$this->Connect( wxEVT_AUX2_DCLICK, #handler ); #nl
			@$this->Connect( wxEVT_LEAVE_WINDOW, #handler ); #nl
			@$this->Connect( wxEVT_ENTER_WINDOW, #handler ); #nl
			@$this->Connect( wxEVT_MOUSEWHEEL, #handler );
		</template>
		<template name="evt_connect_OnMouseEvents">@$this->Connect( wxEVT_MOUSE, #handler );</template>
		<template name="evt_disconnect_OnMouseEvents">
			@$this->Disconnect( wxEVT_LEFT_DOWN, #handler ); #nl
			@$this->Disconnect( wxEVT_LEFT_UP, #handler ); #nl
			@$this->Disconnect( wxEVT_MIDDLE_DOWN, #handler ); #nl
			@$this->Disconnect( wxEVT_MIDDLE_UP, #handler ); #nl
			@$this->Disconnect( wxEVT_RIGHT_DOWN, #handler ); #nl
			@$this->Disconnect( wxEVT_RIGHT_UP, #handler ); #nl
			@$this->Disconnect( wxEVT_AUX1_DOWN, #handler ); #nl
			@$this->Disconnect( wxEVT_AUX1_UP, #handler ); #nl
			@$this->Disconnect( wxEVT_AUX2_DOWN, #handler ); #nl
			@$this->Disconnect( wxEVT_AUX2_UP, #handler ); #nl
			@$this->Disconnect( wxEVT_MOTION, #handler ); #nl
			@$this->Disconnect( wxEVT_LEFT_DCLICK, #handler ); #nl
			@$this->Disconnect( wxEVT_MIDDLE_DCLICK, #handler ); #nl
			@$this->Disconnect( wxEVT_RIGHT_DCLICK, #handler ); #nl
			@$this->Disconnect( wxEVT_AUX1_DCLICK, #handler ); #nl
			@$this->Disconnect( wxEVT_AUX2_DCLICK, #handler ); #nl
			@$this->Disconnect( wxEVT_LEAVE_WINDOW, #handler ); #nl
			@$this->Disconnect( wxEVT_ENTER_WINDOW, #handler ); #nl
			@$this->Disconnect( wxEVT_MOUSEWHEEL, #handler );
		</template>
		<template name="evt_connect_OnMouseWheel">@$this->Connect( wxEVT_MOUSEWHEEL, #handler );</template>
		<template name="evt_disconnect_OnMouseWheel">@$this->Disconnect( wxEVT_MOUSEWHEEL );</template>
		<template name="evt_connect_OnPaint">@$this->Connect( wxEVT_PAINT, #handler );</template>
		<template name="evt_disconnect_OnPaint">@$this->Disconnect( wxEVT_PAINT );</template>
		<template name="evt_connect_OnRightDClick">@$this->Connect( wxEVT_RIGHT_DCLICK, #handler );</template>
		<template name="evt_disconnect_OnRightDClick">@$this->Disconnect( wxEVT_RIGHT_DCLICK );</template>
		<template name="evt_connect_OnRightDown">@$this->Connect( wxEVT_RIGHT_DOWN, #handler );</template>
		<template name="evt_disconnect_OnRightDown">@$this->Disconnect( wxEVT_RIGHT_DOWN );</template>
		<template name="evt_connect_OnRightUp">@$this->Connect( wxEVT_RIGHT_UP, #handler );</template>
		<template name="evt_disconnect_OnRightUp">@$this->Disconnect( wxEVT_RIGHT_UP );</template>
		<template name="evt_connect_OnSetFocus">@$this->Connect( wxEVT_SET_FOCUS, #handler );</template>
		<template name="evt_disconnect_OnSetFocus">@$this->Disconnect( wxEVT_SET_FOCUS );</template>
		<template name="evt_connect_OnSize">@$this->Connect( wxEVT_SIZE, #handler );</template>
		<template name="evt_disconnect_OnSize">@$this->Disconnect( wxEVT_SIZE );</template>
		<template name="evt_connect_OnUpdateUI">@$this->Connect( wxEVT_UPDATE_UI, #handler );</template>
		<template name="evt_disconnect_OnUpdateUI">@$this->Disconnect( wxEVT_UPDATE_UI );</template>
		<template name="evt_connect_OnWizardPageChanged">@$this->Connect( wxEVT_WIZARD_PAGE_CHANGED, #handler );</template>
		<template name="evt_disconnect_OnWizardPageChanged">@$this->Disconnect( wxEVT_WIZARD_PAGE_CHANGED );</template>
		<template name="evt_connect_OnWizardPageChanging">@$this->Connect( wxEVT_WIZARD_PAGE_CHANGING, #handler );</template>
		<template name="evt_disconnect_OnWizardPageChanging">@$this->Disconnect( wxEVT_WIZARD_PAGE_CHANGING );</template>
		<template name="evt_connect_OnWizardPageShown">@$this->Connect( wxEVT_WIZARD_PAGE_SHOWN, #handler );</template>
		<template name="evt_disconnect_OnWizardPageShown">@$this->Disconnect( wxEVT_WIZARD_PAGE_SHOWN );</template>
		<template name="evt_connect_OnWizardCancel">@$this->Connect( wxEVT_WIZARD_CANCEL, #handler );</template>
		<template name="evt_disconnect_OnWizardCancel">@$this->Disconnect( wxEVT_WIZARD_CANCEL );</template>
		<template name="evt_connect_OnWizardHelp">@$this->Connect( wxEVT_WIZARD_HELP, #handler );</template>
		<template name="evt_disconnect_OnWizardHelp">@$this->Disconnect( wxEVT_WIZARD_HELP );</template>
		<template name="evt_connect_OnWizardFinished">@$this->Connect( wxEVT_WIZARD_FINISHED, #handler );</template>
		<template name="evt_disconnect_OnWizardFinished">@$this->Disconnect( wxEVT_WIZARD_FINISHED );</template>

	</templates>

    <templates class="WizardPageSimple">
        <template name="construction">
            @$this->$name = new wxWizardPageSimple( @$this #ifnotnull $bitmap @{ , null, null, $bitmap @} ); #nl
            @$this->AddPage( @$this->$name ); #nl
        </template>
    </templates>

	<templates class="MenuBar">
		<template name="base">
			#ifnotnull $subclass/name
			@{ public $subclass/name @}

			#ifnull $subclass/name
			@{ wxMenuBar @}
		</template>
		<template name="cons_def">
			function __construct( ){
		</template>
		<template name="cons_call">
			parent::__construct( $window_style );
		</template>
		<template name="include" />
	</templates>

	<templates class="ToolBar">
		<template name="base">
			#ifnotnull $subclass/name
			@{ public $subclass/name @}

			#ifnull $subclass/name
			@{ wxToolBar @}
		</template>
		<template name="cons_def">
			function __construct( @$parent=null ){
		</template>
		<template name="cons_call">
			parent::__construct( @$parent, $id, $pos, $size, $style #ifnotnull $window_style @{ |$window_style @} #ifnotnull $window_name @{, $window_name @} );
		</template>
		<template name="include" />
		<template name="settings">
			#ifnotnull $bitmapsize @{@$this->SetToolBitmapSize( $bitmapsize ); #nl @}

			#ifnotnull $separation
			@{
				#ifnotequal $separation "5"
				@{ @$this->SetToolSeparation( $separation ); #nl @}
			@}

			#ifnotnull $margins 
			@{ @$this->SetMargins( $margins ); #nl @}

			#ifnotnull $packing
			@{
				#ifnotequal $packing "1"
				@{ @$this->SetToolPacking( $packing ); #nl @}
			@}
    		</template>
    		<template name="after_addchild">#nl @$this->Realize();</template>
	</templates>

</codegen>
