<?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
-->
<codegen language="C++">

	<templates class="wxPanel">
		<template name="declaration">#class* $name;</template>
		<template name="construction">$name = new #class( #wxparent $name, $id, $pos, $size, $window_style #ifnotnull $window_name @{, $window_name @} );</template>
		<template name="include">@#include &lt;wx/panel.h&gt;</template>
	</templates>

	<templates class="wxCollapsiblePane">
		<template name="declaration">#class* $name;</template>
		<template name="construction">$name = new #class( #wxparent $name, $id, $label, $pos, $size, $style #ifnotnull $window_style @{ |$window_style @} #ifnotnull $window_name @{, wxDefaultValidator, $window_name @} );</template>
		<template name="include">@#include &lt;wx/collpane.h&gt;</template>
		<template name="settings">#ifnotnull $collapsed @{ $name->Collapse( $collapsed ); #nl @}</template>
		<template name="evt_entry_OnCollapsiblePaneChanged">EVT_COLLAPSIBLEPANE_CHANGED( $id, #handler )</template>
		<template name="evt_connect_OnCollapsiblePaneChanged">$name->Connect( wxEVT_COLLAPSIBLEPANE_CHANGED, #handler, NULL, this );</template>
	</templates>

	<templates class="wxSplitterWindow">
		<template name="declaration">#class* $name;</template>
		<template name="construction">$name = new #class( #wxparent $name, $id, $pos, $size, $style #ifnotnull $window_style @{ |$window_style @} #ifnotnull $window_name @{, $window_name @} );</template>
		<template name="include">@#include &lt;wx/splitter.h&gt;</template>
		<template name="settings">
			#ifnotnull $sashgravity
			@{
				#ifnotequal $sashgravity "0.0"
			@{ $name->SetSashGravity( $sashgravity ); #nl @}
			@}
			#ifnotnull $sashsize
			@{
				#ifnotequal $sashsize "-1"
			@{ $name->SetSashSize( $sashsize ); #nl @}
			@}
			#ifnotnull $sashpos
			@{
				#ifnotequal $sashpos "-1"
			@{ $name->Connect( wxEVT_IDLE, wxIdleEventHandler( #form $name::$name #append OnIdle ), NULL, this ); #nl @}
			@}
			#ifnotnull $min_pane_size
			@{
				#ifnotequal $min_pane_size "0"
			@{	$name->SetMinimumPaneSize( $min_pane_size ); #nl @}
			@}
		</template>
		<template name="generated_event_handlers">
			#ifnotnull $sashpos
			@{
				#ifnotequal $sashpos "-1"
				@{
				#nl void $name #append OnIdle( wxIdleEvent&amp; )
				#nl { #indent
					#nl $name->SetSashPosition( $sashpos );
					#nl $name->Disconnect( wxEVT_IDLE, wxIdleEventHandler( #form $name::$name #append OnIdle ), NULL, this ); #unindent
				#nl}
				@}
			@}
		</template>
		<template name="evt_entry_OnSplitterSashPosChanging">EVT_SPLITTER_SASH_POS_CHANGING( $id, #handler )</template>
		<template name="evt_connect_OnSplitterSashPosChanging">$name->Connect( wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING, #handler, NULL, this );</template>
		<template name="evt_entry_OnSplitterSashPosChanged">EVT_SPLITTER_SASH_POS_CHANGED( $id, #handler )</template>
		<template name="evt_connect_OnSplitterSashPosChanged">$name->Connect( wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED, #handler, NULL, this );</template>
		<template name="evt_entry_OnSplitterUnsplit">EVT_SPLITTER_UNSPLIT( $id, #handler )</template>
		<template name="evt_connect_OnSplitterUnsplit">$name->Connect( wxEVT_COMMAND_SPLITTER_UNSPLIT, #handler, NULL, this );</template>
		<template name="evt_entry_OnSplitterDClick">EVT_SPLITTER_DCLICK( $id, #handler )</template>
		<template name="evt_connect_OnSplitterDClick">$name->Connect( wxEVT_COMMAND_SPLITTER_DOUBLECLICKED, #handler, NULL, this );</template>
	</templates>


	<templates class="wxNotebook">
		<template name="declaration">#class* $name;</template>
		<template name="construction">$name = new #class( #wxparent $name, $id, $pos, $size, $style #ifnotnull $window_style @{ |$window_style @} #ifnotnull $window_name @{, $window_name @} );</template>
		<template name="include">
			@#include &lt;wx/notebook.h&gt;
			#ifnotnull $bitmapsize
			@{
				#nl @#include &lt;wx/imaglist.h&gt;
				#nl @#include &lt;wx/image.h&gt;
			@}
		</template>
		<template name="settings">
			#ifnotnull $bitmapsize
			@{
				wxSize $name #append ImageSize = $bitmapsize; #nl
				int $name #append Index = 0; #nl
				wxImageList* $name #append Images = new wxImageList( $name #append ImageSize.GetWidth(), $name #append ImageSize.GetHeight() ); #nl
				$name->AssignImageList( $name #append Images ); #nl
				wxBitmap $name #append Bitmap; #nl
				wxImage $name #append Image;
			@}
		</template>
		<template name="evt_entry_OnNotebookPageChanged">EVT_NOTEBOOK_PAGE_CHANGED( $id, #handler )</template>
		<template name="evt_connect_OnNotebookPageChanged">$name->Connect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, #handler, NULL, this );</template>
		<template name="evt_entry_OnNotebookPageChanging">EVT_NOTEBOOK_PAGE_CHANGING( $id, #handler )</template>
		<template name="evt_connect_OnNotebookPageChanging">$name->Connect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, #handler, NULL, this );</template>
	</templates>

	<templates class="notebookpage">
		<template name="page_add">#parent $name->AddPage( #child $name, $label, $select );</template>
		<template name="settings">
			#ifnotnull #parent $bitmapsize
			@{
				#ifnotnull $bitmap
				@{
					#parent $name #append Bitmap = $bitmap; #nl
					if ( #parent $name #append Bitmap.Ok() ) #nl
					@{ #indent #nl
						#parent $name #append Image = #parent $name #append Bitmap.ConvertToImage(); #nl
						#parent $name #append Images->Add( #parent $name #append Image.Scale( #parent $name #append ImageSize.GetWidth(), #parent $name #append ImageSize.GetHeight() ) ); #nl
						#parent $name->SetPageImage( #parent $name #append Index, #parent $name #append Index ); #nl
						#parent $name #append Index++; #unindent #nl
					@}
				@}
			@}
		</template>
	</templates>

	<templates class="wxListbook">
		<template name="declaration">#class* $name;</template>
		<template name="construction">$name = new #class( #wxparent $name, $id, $pos, $size, $style #ifnotnull $window_style @{ |$window_style @} #ifnotnull $window_name @{, $window_name @} );</template>
		<template name="include">
			@#include &lt;wx/listbook.h&gt; #nl
			@#include &lt;wx/listctrl.h&gt;
			#ifnotnull $bitmapsize
			@{
				#nl @#include &lt;wx/imaglist.h&gt;
				#nl @#include &lt;wx/image.h&gt;
			@}
		</template>
		<template name="settings">
			#ifnotnull $bitmapsize
			@{
				wxSize $name #append ImageSize = $bitmapsize; #nl
				int $name #append Index = 0; #nl
				wxImageList* $name #append Images = new wxImageList( $name #append ImageSize.GetWidth(), $name #append ImageSize.GetHeight() ); #nl
				$name->AssignImageList( $name #append Images ); #nl
				wxBitmap $name #append Bitmap; #nl
				wxImage $name #append Image;
			@}
		</template>
		<template name="after_addchild">
			#ifnull $bitmapsize
			@{
				@#ifdef  __WXGTK__ // Small icon style not supported in GTK #nl
				wxListView* $name #append ListView = $name->GetListView(); #nl
				long $name #append Flags = $name #append ListView->GetWindowStyleFlag(); #nl
				if( $name #append Flags &amp; wxLC_SMALL_ICON ) #nl
				@{ #indent #nl
					$name #append Flags = ( $name #append Flags &amp; ~wxLC_SMALL_ICON ) | wxLC_ICON; #unindent #nl
				@} #nl
				$name #append ListView->SetWindowStyleFlag( $name #append Flags ); #nl
				@#endif
			@}
		</template>
		<template name="evt_entry_OnListbookPageChanged">EVT_LISTBOOK_PAGE_CHANGED( $id, #handler )</template>
		<template name="evt_connect_OnListbookPageChanged">$name->Connect( wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED, #handler, NULL, this );</template>
		<template name="evt_entry_OnListbookPageChanging">EVT_LISTBOOK_PAGE_CHANGING( $id, #handler )</template>
		<template name="evt_connect_OnListbookPageChanging">$name->Connect( wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING, #handler, NULL, this );</template>
	</templates>

	<templates class="listbookpage">
		<template name="page_add">#parent $name->AddPage( #child $name, $label, $select );</template>
		<template name="settings">
			#ifnotnull #parent $bitmapsize
			@{
				#ifnotnull $bitmap
				@{
					#parent $name #append Bitmap = $bitmap; #nl
					if ( #parent $name #append Bitmap.Ok() ) #nl
					@{ #indent #nl
						#parent $name #append Image = #parent $name #append Bitmap.ConvertToImage(); #nl
						#parent $name #append Images->Add( #parent $name #append Image.Scale( #parent $name #append ImageSize.GetWidth(), #parent $name #append ImageSize.GetHeight() ) ); #nl
						#parent $name->SetPageImage( #parent $name #append Index, #parent $name #append Index ); #nl
						#parent $name #append Index++; #unindent #nl
					@}
				@}
			@}
		</template>
	</templates>

	<templates class="wxChoicebook">
		<template name="declaration">#class* $name;</template>
		<template name="construction">$name = new #class( #wxparent $name, $id, $pos, $size, $style #ifnotnull $window_style @{ |$window_style @} #ifnotnull $window_name @{, $window_name @} );</template>
		<template name="include">@#include &lt;wx/choicebk.h&gt;</template>
		<template name="evt_entry_OnChoicebookPageChanged">EVT_CHOICEBOOK_PAGE_CHANGED( $id, #handler )</template>
		<template name="evt_connect_OnChoicebookPageChanged">$name->Connect( wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED, #handler, NULL, this );</template>
		<template name="evt_entry_OnChoicebookPageChanging">EVT_CHOICEBOOK_PAGE_CHANGING( $id, #handler )</template>
		<template name="evt_connect_OnChoicebookPageChanging">$name->Connect( wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING, #handler, NULL, this );</template>
	</templates>

	<templates class="choicebookpage">
		<template name="page_add">#parent $name->AddPage( #child $name, $label, $select );</template>
	</templates>

	<templates class="wxSimplebook">
		<template name="declaration">#class* $name;</template>
		<template name="construction">$name = new #class( #wxparent $name, $id, $pos, $size, $window_style #ifnotnull $window_name @{, $window_name @} );</template>
		<template name="include">@#include &lt;wx/simplebook.h&gt;</template>
		<template name="evt_entry_OnSimplebookPageChanged">EVT_BOOKCTRL_PAGE_CHANGED( $id, #handler )</template>
		<template name="evt_connect_OnSimplebookPageChanged">$name->Connect( wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGED, #handler, NULL, this );</template>
		<template name="evt_entry_OnSimplebookPageChanging">EVT_BOOKCTRL_PAGE_CHANGING( $id, #handler )</template>
		<template name="evt_connect_OnSimplebookPageChanging">$name->Connect( wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGING, #handler, NULL, this );</template>
	</templates>

	<templates class="simplebookpage">
		<template name="page_add">#parent $name->AddPage( #child $name, $label, $select );</template>
	</templates>

	<templates class="wxAuiNotebook">
		<template name="declaration">#class* $name;</template>
		<template name="construction">$name = new #class( #wxparent $name, $id, $pos, $size, $style #ifnotnull $window_style @{ |$window_style @} );</template>
		<template name="include">@#include &lt;wx/aui/auibook.h&gt;</template>
		<template name="evt_entry_OnAuiNotebookPageClose">EVT_AUINOTEBOOK_PAGE_CLOSE( $id, #handler )</template>
		<template name="evt_entry_OnAuiNotebookPageClosed">EVT_AUINOTEBOOK_PAGE_CLOSED( $id, #handler )</template>
		<template name="evt_entry_OnAuiNotebookPageChanged">EVT_AUINOTEBOOK_PAGE_CHANGED( $id, #handler )</template>
		<template name="evt_entry_OnAuiNotebookPageChanging">EVT_AUINOTEBOOK_PAGE_CHANGING( $id, #handler )</template>
		<template name="evt_entry_OnAuiNotebookButton">EVT_AUINOTEBOOK_BUTTON( $id, #handler )</template>
		<template name="evt_entry_OnAuiNotebookBeginDrag">EVT_AUINOTEBOOK_BEGIN_DRAG( $id, #handler )</template>
		<template name="evt_entry_OnAuiNotebookEndDrag">EVT_AUINOTEBOOK_END_DRAG( $id, #handler )</template>
		<template name="evt_entry_OnAuiNotebookDragMotion">EVT_AUINOTEBOOK_DRAG_MOTION( $id, #handler )</template>
		<template name="evt_entry_OnAuiNotebookAllowDND">EVT_AUINOTEBOOK_ALLOW_DND( $id, #handler )</template>
		<template name="evt_entry_OnAuiNotebookDragDone">EVT_AUINOTEBOOK_DRAG_DONE( $id, #handler )</template>
		<template name="evt_entry_OnAuiNotebookTabMiddleDown">EVT_AUINOTEBOOK_TAB_MIDDLE_DOWN( $id, #handler )</template>
		<template name="evt_entry_OnAuiNotebookTabMiddleUp">EVT_AUINOTEBOOK_TAB_MIDDLE_UP( $id, #handler )</template>
		<template name="evt_entry_OnAuiNotebookTabRightDown">EVT_AUINOTEBOOK_TAB_RIGHT_DOWN( $id, #handler )</template>
		<template name="evt_entry_OnAuiNotebookTabRightUp">EVT_AUINOTEBOOK_TAB_RIGHT_UP( $id, #handler )</template>
		<template name="evt_entry_OnAuiNotebookBGDClick">EVT_AUINOTEBOOK_BG_DCLICK( $id, #handler )</template>
		<template name="evt_connect_OnAuiNotebookPageClose">$name->Connect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, #handler, NULL, this );</template>
		<template name="evt_connect_OnAuiNotebookPageClosed">$name->Connect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED, #handler, NULL, this );</template>
		<template name="evt_connect_OnAuiNotebookPageChanged">$name->Connect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, #handler, NULL, this );</template>
		<template name="evt_connect_OnAuiNotebookPageChanging">$name->Connect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, #handler, NULL, this );</template>
		<template name="evt_connect_OnAuiNotebookButton">$name->Connect( wxEVT_COMMAND_AUINOTEBOOK_BUTTON, #handler, NULL, this );</template>
		<template name="evt_connect_OnAuiNotebookBeginDrag">$name->Connect( wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG, #handler, NULL, this );</template>
		<template name="evt_connect_OnAuiNotebookEndDrag">$name->Connect( wxEVT_COMMAND_AUINOTEBOOK_END_DRAG, #handler, NULL, this );</template>
		<template name="evt_connect_OnAuiNotebookDragMotion">$name->Connect( wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION, #handler, NULL, this );</template>
		<template name="evt_connect_OnAuiNotebookAllowDND">$name->Connect( wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND, #handler, NULL, this );</template>
		<template name="evt_connect_OnAuiNotebookDragDone">$name->Connect( wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE, #handler, NULL, this );</template>
		<template name="evt_connect_OnAuiNotebookTabMiddleDown">$name->Connect( wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN, #handler, NULL, this );</template>
		<template name="evt_connect_OnAuiNotebookTabMiddleUp">$name->Connect( wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_IP, #handler, NULL, this );</template>
		<template name="evt_connect_OnAuiNotebookTabRightDown">$name->Connect( wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN, #handler, NULL, this );</template>
		<template name="evt_connect_OnAuiNotebookTabRightUp">$name->Connect( wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP, #handler, NULL, this );</template>
		<template name="evt_connect_OnAuiNotebookBGDClick">$name->Connect( wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK, #handler, NULL, this );</template>
	</templates>

	<templates class="auinotebookpage">
		<template name="page_add">#parent $name->AddPage( #child $name, $label, $select, $bitmap );</template>
	</templates>

	<templates class="wxScrolledWindow">
		<template name="declaration">#class* $name;</template>
		<template name="include">@#include &lt;wx/scrolwin.h&gt;</template>
		<template name="construction">
			  $name = new #class( #wxparent $name, $id, $pos, $size, $window_style #ifnotnull $window_name @{, $window_name @} ); #nl
			  $name->SetScrollRate( $scroll_rate_x, $scroll_rate_y );
		</template>
	</templates>


</codegen>
