<?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

Python code generation written by
  Michal Bližňák - michal.bliznak@gmail.com
-->
<codegen language="Python">

  <templates class="wxTreeCtrl">
    <template name="construction">self.$name = #class( #wxparent $name, $id, $pos, $size, $style #ifnotnull $window_style @{ |$window_style @} #ifnotnull $window_name @{, wx.DefaultValidator, $window_name @} )</template>
	<template name="evt_connect_OnTreeGetInfo">self.$name.Bind( wx.EVT_TREE_GET_INFO, #handler )</template>
	<template name="evt_connect_OnTreeSetInfo">self.$name.Bind( wx.EVT_TREE_SET_INFO, #handler )</template>
	<template name="evt_connect_OnTreeItemGetTooltip">self.$name.Bind( wx.EVT_TREE_ITEM_GETTOOLTIP, #handler )</template>
	<template name="evt_connect_OnTreeStateImageClick">self.$name.Bind( wx.EVT_TREE_STATE_IMAGE_CLICK, #handler )</template>
  </templates>

  <templates class="wxDataViewCtrl">
	<template name="declaration">#class* $name;</template>
	<template name="include">import wx.dataview</template>
	<template name="construction">
		self.$name = wx.dataview.DataViewCtrl( #wxparent $name, $id, $pos, $size, $style #ifnotnull $window_style @{ |$window_style @} )
	</template>
	<template name="evt_connect_OnDataViewCtrlSelectionChanged">self.$name.Bind( wx.dataview.EVT_DATAVIEW_SELECTION_CHANGED, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewCtrlItemActivated">self.$name.Bind( wx.dataview.EVT_DATAVIEW_ITEM_ACTIVATED, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewCtrlItemStartEditing">self.$name.Bind( wx.dataview.EVT_DATAVIEW_ITEM_START_EDITING, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewCtrlItemEditingStarted">self.$name.Bind( wx.dataview.EVT_DATAVIEW_ITEM_EDITING_STARTED, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewCtrlItemEditingDone">self.$name.Bind( wx.dataview.EVT_DATAVIEW_ITEM_EDITING_DONE, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewCtrlItemCollapsing">self.$name.Bind( wx.dataview.EVT_DATAVIEW_ITEM_COLLAPSING, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewCtrlItemCollapsed">self.$name.Bind( wx.dataview.EVT_DATAVIEW_ITEM_COLLAPSED, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewCtrlItemExpanding">self.$name.Bind( wx.dataview.EVT_DATAVIEW_ITEM_EXPANDING, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewCtrlItemExpanded">self.$name.Bind( wx.dataview.EVT_DATAVIEW_ITEM_EXPANDED, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewCtrlItemValueChanged">self.$name.Bind( wx.dataview.EVT_DATAVIEW_ITEM_VALUE_CHANGED, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewCtrlItemContextMenu">self.$name.Bind( wx.dataview.EVT_DATAVIEW_ITEM_CONTEXT_MENU, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewCtrlColumnHeaderClick">self.$name.Bind( wx.dataview.EVT_DATAVIEW_COLUMN_HEADER_CLICK, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewCtrlColumnHeaderRightClick">self.$name.Bind( wx.dataview.EVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewCtrlColumnSorted">self.$name.Bind( wx.dataview.EVT_DATAVIEW_COLUMN_SORTED, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewCtrlColumnReordered">self.$name.Bind( wx.dataview.EVT_DATAVIEW_COLUMN_REORDERED, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewCtrlItemBeginDrag">self.$name.Bind( wx.dataview.EVT_DATAVIEW_ITEM_BEGIN_DRAG, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewCtrlItemDropPossible">self.$name.Bind( wx.dataview.EVT_DATAVIEW_ITEM_DROP_POSSIBLE, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewCtrlItemDrop">self.$name.Bind( wx.dataview.EVT_DATAVIEW_ITEM_DROP, #handler, id = $id )</template>
  </templates>

  <templates class="wxDataViewTreeCtrl">
	<template name="declaration">#class* $name;</template>
	<template name="include">import wx.dataview</template>
	<template name="construction">
		self.$name = wx.dataview.DataViewTreeCtrl( #wxparent $name, $id, $pos, $size, $style #ifnotnull $window_style @{ |$window_style @} ) 
	</template>
	<template name="evt_connect_OnDataViewTreeCtrlSelectionChanged">self.$name.Bind( wx.dataview.EVT_DATAVIEW_SELECTION_CHANGED, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewTreeCtrlItemActivated">self.$name.Bind( wx.dataview.EVT_DATAVIEW_ITEM_ACTIVATED, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewTreeCtrlItemStartEditing">self.$name.Bind( wx.dataview.EVT_DATAVIEW_ITEM_START_EDITING, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewTreeCtrlItemEditingStarted">self.$name.Bind( wx.dataview.EVT_DATAVIEW_ITEM_EDITING_STARTED, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewTreeCtrlItemEditingDone">self.$name.Bind( wx.dataview.EVT_DATAVIEW_ITEM_EDITING_DONE, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewTreeCtrlItemCollapsing">self.$name.Bind( wx.dataview.EVT_DATAVIEW_ITEM_COLLAPSING, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewTreeCtrlItemCollapsed">self.$name.Bind( wx.dataview.EVT_DATAVIEW_ITEM_COLLAPSED, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewTreeCtrlItemExpanding">self.$name.Bind( wx.dataview.EVT_DATAVIEW_ITEM_EXPANDING, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewTreeCtrlItemExpanded">self.$name.Bind( wx.dataview.EVT_DATAVIEW_ITEM_EXPANDED, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewTreeCtrlItemValueChanged">self.$name.Bind( wx.dataview.EVT_DATAVIEW_ITEM_VALUE_CHANGED, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewTreeCtrlItemContextMenu">self.$name.Bind( wx.dataview.EVT_DATAVIEW_ITEM_CONTEXT_MENU, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewTreeCtrlColumnHeaderClick">self.$name.Bind( wx.dataview.EVT_DATAVIEW_COLUMN_HEADER_CLICK, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewTreeCtrlColumnHeaderRightClick">self.$name.Bind( wx.dataview.EVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewTreeCtrlColumnSorted">self.$name.Bind( wx.dataview.EVT_DATAVIEW_COLUMN_SORTED, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewTreeCtrlColumnReordered">self.$name.Bind( wx.dataview.EVT_DATAVIEW_COLUMN_REORDERED, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewTreeCtrlItemBeginDrag">self.$name.Bind( wx.dataview.EVT_DATAVIEW_ITEM_BEGIN_DRAG, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewTreeCtrlItemDropPossible">self.$name.Bind( wx.dataview.EVT_DATAVIEW_ITEM_DROP_POSSIBLE, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewTreeCtrlItemDrop">self.$name.Bind( wx.dataview.EVT_DATAVIEW_ITEM_DROP, #handler, id = $id )</template>
  </templates>

  <templates class="wxDataViewListCtrl">
	<template name="declaration">#class* $name;</template>
	<template name="include">import wx.dataview</template>
	<template name="construction">
		self.$name = wx.dataview.DataViewListCtrl( #wxparent $name, $id, $pos, $size, $style #ifnotnull $window_style @{ |$window_style @} )
	</template>
	<template name="evt_connect_OnDataViewListCtrlSelectionChanged">self.$name.Bind( wx.dataview.EVT_DATAVIEW_SELECTION_CHANGED, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewListCtrlItemActivated">self.$name.Bind( wx.dataview.EVT_DATAVIEW_ITEM_ACTIVATED, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewListCtrlItemStartEditing">self.$name.Bind( wx.dataview.EVT_DATAVIEW_ITEM_START_EDITING, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewListCtrlItemEditingStarted">self.$name.Bind( wx.dataview.EVT_DATAVIEW_ITEM_EDITING_STARTED, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewListCtrlItemEditingDone">self.$name.Bind( wx.dataview.EVT_DATAVIEW_ITEM_EDITING_DONE, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewListCtrlItemCollapsing">self.$name.Bind( wx.dataview.EVT_DATAVIEW_ITEM_COLLAPSING, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewListCtrlItemCollapsed">self.$name.Bind( wx.dataview.EVT_DATAVIEW_ITEM_COLLAPSED, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewListCtrlItemExpanding">self.$name.Bind( wx.dataview.EVT_DATAVIEW_ITEM_EXPANDING, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewListCtrlItemExpanded">self.$name.Bind( wx.dataview.EVT_DATAVIEW_ITEM_EXPANDED, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewListCtrlItemValueChanged">self.$name.Bind( wx.dataview.EVT_DATAVIEW_ITEM_VALUE_CHANGED, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewListCtrlItemContextMenu">self.$name.Bind( wx.dataview.EVT_DATAVIEW_ITEM_CONTEXT_MENU, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewListCtrlColumnHeaderClick">self.$name.Bind( wx.dataview.EVT_DATAVIEW_COLUMN_HEADER_CLICK, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewListCtrlColumnHeaderRightClick">self.$name.Bind( wx.dataview.EVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewListCtrlColumnSorted">self.$name.Bind( wx.dataview.EVT_DATAVIEW_COLUMN_SORTED, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewListCtrlColumnReordered">self.$name.Bind( wx.dataview.EVT_DATAVIEW_COLUMN_REORDERED, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewListCtrlItemBeginDrag">self.$name.Bind( wx.dataview.EVT_DATAVIEW_ITEM_BEGIN_DRAG, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewListCtrlItemDropPossible">self.$name.Bind( wx.dataview.EVT_DATAVIEW_ITEM_DROP_POSSIBLE, #handler, id = $id )</template>
	<template name="evt_connect_OnDataViewListCtrlItemDrop">self.$name.Bind( wx.dataview.EVT_DATAVIEW_ITEM_DROP, #handler, id = $id )</template>
  </templates>

  <templates class="dataViewListColumn">
	<template name="construction">
		self.$name = self.#parent $name.Append${type}Column( $label, $mode, $width, $align, $flags )
			#ifnotnull $ellipsize
			@{ #nl self.$name.GetRenderer().EnableEllipsize( $ellipsize ); @}
	</template>
  </templates>
  
  <templates class="dataViewColumn">
	<template name="construction">
		self.$name = self.#parent $name.Append${type}Column( $label, $model_column, $mode, $width, $align, $flags )
			#ifnotnull $ellipsize
			@{ #nl self.$name.GetRenderer().EnableEllipsize( $ellipsize ); @}
	</template>
  </templates>

  <templates class="wxTreeListCtrl">
	<template name="declaration">#class* $name;</template>
	<template name="include">import wx.dataview</template>
	<template name="construction">
        self.$name = wx.dataview.TreeListCtrl( #wxparent $name, $id, $pos, $size, $style #ifnotnull $window_style @{ |$window_style @} #ifnotnull $window_name @{, wx.DefaultValidator, $window_name @} )
    </template>
	<template name="evt_connect_OnTreelistSelectionChanged">self.$name.Bind( wx.dataview.EVT_TREELIST_SELECTION_CHANGED, #handler )</template>
	<template name="evt_connect_OnTreelistItemExpanding">self.$name.Bind( wx.dataview.EVT_TREELIST_ITEM_EXPANDING, #handler )</template>
	<template name="evt_connect_OnTreelistItemExpanded">self.$name.Bind( wx.dataview.EVT_TREELIST_ITEM_EXPANDED, #handler )</template>
	<template name="evt_connect_OnTreelistItemChecked">self.$name.Bind( wx.dataview.EVT_TREELIST_ITEM_CHECKED, #handler )</template>
	<template name="evt_connect_OnTreelistItemActivated">self.$name.Bind( wx.dataview.EVT_TREELIST_ITEM_ACTIVATED, #handler )</template>
	<template name="evt_connect_OnTreelistItemContextMenu">self.$name.Bind( wx.dataview.EVT_TREELIST_ITEM_CONTEXT_MENU, #handler )</template>
	<template name="evt_connect_OnTreelistColumnSorted">self.$name.Bind( wx.dataview.EVT_TREELIST_COLUMN_SORTED, #handler )</template>
  </templates>

  <templates class="wxTreeListCtrlColumn">
	  <template name="column_add">self.#parent $name.AppendColumn( $name, $width, $alignment, $flag )</template>
  </templates>

  <templates class="wxCheckListBox">
	<template name="construction">
		$name #append Choices = [$choices] #nl
		self.$name = #class( #wxparent $name, $id, $pos, $size, $name #append Choices, $style #ifnotnull $window_style @{ |$window_style @} #ifnotnull $window_name @{, wx.DefaultValidator, $window_name @} )
		</template>
	<template name="evt_connect_OnCheckListBoxToggled">self.$name.Bind( wx.EVT_CHECKLISTBOX, #handler )</template>
	<template name="evt_connect_OnCheckListBox">self.$name.Bind( wx.EVT_LISTBOX, #handler )</template>
	<template name="evt_connect_OnCheckListBoxDClick">self.$name.Bind( wx.EVT_LISTBOX_DCLICK, #handler )</template>
  </templates>

  <templates class="wxGrid">
	<template name="include">import wx.grid</template>
	<template name="construction">self.$name = #class( #wxparent $name, $id, $pos, $size, $window_style #ifnotnull $window_name @{, $window_name @} )</template>
	<template name="settings">
    	#nl @# Grid
    	#nl self.$name.CreateGrid( $rows, $cols )
		#nl self.$name.EnableEditing( $editing )
		#nl self.$name.EnableGridLines( $grid_lines )
		#ifnotnull $grid_line_color
		@{
			#nl self.$name.SetGridLineColour( $grid_line_color )
		@}
		#nl self.$name.EnableDragGridSize( $drag_grid_size )
		#nl self.$name.SetMargins( $margin_width, $margin_height )
		#nl
		#nl @# Columns
		#foreach $column_sizes
		@{ self.$name.SetColSize( #npred, #pred ) @}
		#ifnotequal $autosize_cols "0"
		@{
			#nl self.$name.AutoSizeColumns()
		@}
		#nl self.$name.EnableDragColMove( $drag_col_move )
		#nl self.$name.EnableDragColSize( $drag_col_size )
		#nl self.$name.SetColLabelSize( $col_label_size )
		#foreach $col_label_values
		@{ self.$name.SetColLabelValue( #npred, #pred ) @}
		#nl self.$name.SetColLabelAlignment( $col_label_horiz_alignment, $col_label_vert_alignment )
		#nl
		#nl @# Rows
		#foreach $row_sizes
		@{ self.$name.SetRowSize( #npred, #pred ) @}
		#ifnotequal $autosize_rows "0"
		@{
			#nl self.$name.AutoSizeRows()
		@}
		#nl self.$name.EnableDragRowSize( $drag_row_size )
		#nl self.$name.SetRowLabelSize( $row_label_size )
		#foreach $row_label_values
		@{ self.$name.SetRowLabelValue( #npred, #pred ) @}
		#nl self.$name.SetRowLabelAlignment( $row_label_horiz_alignment, $row_label_vert_alignment )
		#nl
		#nl @# Label Appearance
		#ifnotnull $label_bg
		@{
			#nl self.$name.SetLabelBackgroundColour( $label_bg )
		@}
		#ifnotnull $label_font
		@{
			#nl self.$name.SetLabelFont( $label_font )
		@}
		#ifnotnull $label_text
		@{
			#nl self.$name.SetLabelTextColour( $label_text )
		@}
		#nl
		#nl @# Cell Defaults
		#ifnotnull $cell_bg
		@{
			#nl self.$name.SetDefaultCellBackgroundColour( $cell_bg )
		@}
		#ifnotnull $cell_text
		@{
			#nl self.$name.SetDefaultCellTextColour( $cell_text )
		@}
		#ifnotnull $cell_font
		@{
			#nl self.$name.SetDefaultCellFont( $cell_font )
		@}
		#nl self.$name.SetDefaultCellAlignment( $cell_horiz_alignment, $cell_vert_alignment )
    </template>
	<template name="evt_connect_OnGridCellLeftClick">self.$name.Bind( wx.grid.EVT_GRID_CELL_LEFT_CLICK, #handler )</template>
	<template name="evt_connect_OnGridCellRightClick">self.$name.Bind( wx.grid.EVT_GRID_CELL_RIGHT_CLICK, #handler )</template>
	<template name="evt_connect_OnGridCellLeftDClick">self.$name.Bind( wx.grid.EVT_GRID_CELL_LEFT_DCLICK, #handler )</template>
	<template name="evt_connect_OnGridCellRightDClick">self.$name.Bind( wx.grid.EVT_GRID_CELL_RIGHT_DCLICK, #handler )</template>
	<template name="evt_connect_OnGridLabelLeftClick">self.$name.Bind( wx.grid.EVT_GRID_LABEL_LEFT_CLICK, #handler )</template>
	<template name="evt_connect_OnGridLabelRightClick">self.$name.Bind( wx.grid.EVT_GRID_LABEL_RIGHT_CLICK, #handler )</template>
	<template name="evt_connect_OnGridLabelLeftDClick">self.$name.Bind( wx.grid.EVT_GRID_LABEL_LEFT_DCLICK, #handler )</template>
	<template name="evt_connect_OnGridLabelRightDClick">self.$name.Bind( wx.grid.EVT_GRID_LABEL_RIGHT_DCLICK, #handler )</template>
	<template name="evt_connect_OnGridCellChange">self.$name.Bind( wx.grid.EVT_GRID_CELL_CHANGED, #handler )</template>
	<template name="evt_connect_OnGridSelectCell">self.$name.Bind( wx.grid.EVT_GRID_SELECT_CELL, #handler )</template>
	<template name="evt_connect_OnGridEditorHidden">self.$name.Bind( wx.grid.EVT_GRID_EDITOR_HIDDEN, #handler )</template>
	<template name="evt_connect_OnGridEditorShown">self.$name.Bind( wx.grid.EVT_GRID_EDITOR_SHOWN, #handler )</template>
	<template name="evt_connect_OnGridCmdCellLeftClick">self.$name.Bind( wx.grid.EVT_GRID_CELL_LEFT_CLICK, #handler )</template>
	<template name="evt_connect_OnGridCmdCellRightClick">self.$name.Bind( wx.grid.EVT_GRID_CELL_RIGHT_CLICK, #handler )</template>
	<template name="evt_connect_OnGridCmdCellLeftDClick">self.$name.Bind( wx.grid.EVT_GRID_CELL_LEFT_DCLICK, #handler )</template>
	<template name="evt_connect_OnGridCmdCellRightDClick">self.$name.Bind( wx.grid.EVT_GRID_CELL_RIGHT_DCLICK, #handler )</template>
	<template name="evt_connect_OnGridCmdLabelLeftClick">self.$name.Bind( wx.grid.EVT_GRID_LABEL_LEFT_CLICK, #handler )</template>
	<template name="evt_connect_OnGridCmdLabelRightClick">self.$name.Bind( wx.grid.EVT_GRID_LABEL_RIGHT_CLICK, #handler )</template>
	<template name="evt_connect_OnGridCmdLabelLeftDClick">self.$name.Bind( wx.grid.EVT_GRID_LABEL_LEFT_DCLICK, #handler )</template>
	<template name="evt_connect_OnGridCmdLabelRightDClick">self.$name.Bind( wx.grid.EVT_GRID_LABEL_RIGHT_DCLICK, #handler )</template>
	<template name="evt_connect_OnGridCmdCellChange">self.$name.Bind( wx.grid.EVT_GRID_CELL_CHANGED, #handler )</template>
	<template name="evt_connect_OnGridCmdSelectCell">self.$name.Bind( wx.grid.EVT_GRID_SELECT_CELL, #handler )</template>
	<template name="evt_connect_OnGridCmdEditorHidden">self.$name.Bind( wx.grid.EVT_GRID_EDITOR_HIDDEN, #handler )</template>
	<template name="evt_connect_OnGridCmdEditorShown">self.$name.Bind( wx.grid.EVT_GRID_EDITOR_SHOWN, #handler )</template>
	<template name="evt_connect_OnGridColSize">self.$name.Bind( wx.grid.EVT_GRID_COL_SIZE, #handler )</template>
	<template name="evt_connect_OnGridRowSize">self.$name.Bind( wx.grid.EVT_GRID_ROW_SIZE, #handler )</template>
	<template name="evt_connect_OnGridCmdColSize">self.$name.Bind( wx.grid.EVT_GRID_COL_SIZE, #handler )</template>
	<template name="evt_connect_OnGridCmdRowSize">self.$name.Bind( wx.grid.EVT_GRID_ROW_SIZE, #handler )</template>
	<template name="evt_connect_OnGridRangeSelect">self.$name.Bind( wx.grid.EVT_GRID_RANGE_SELECT, #handler )</template>
	<template name="evt_connect_OnGridCmdRangeSelect">self.$name.Bind( wx.grid.EVT_GRID_RANGE_SELECT, #handler )</template>
	<template name="evt_connect_OnGridEditorCreated">self.$name.Bind( wx.grid.EVT_GRID_EDITOR_CREATED, #handler )</template>
	<template name="evt_connect_OnGridCmdEditorCreated">self.$name.Bind( wx.grid.EVT_GRID_EDITOR_CREATED, #handler )</template>
  </templates>

  	<templates class="wxPropertyGrid">
		<template name="include">import wx.propgrid as pg</template>
		<template name="construction">
			self.$name = pg.PropertyGrid(#wxparent $name, $id, $pos, $size, $style #ifnotnull $window_style @{ |$window_style @})
		</template>
		<template name="settings">
		    #ifnotnull $extra_style
		    @{ $name.SetExtraStyle( $extra_style ) @}
		</template>
		<template name="evt_connect_OnPropertyGridChanging">self.$name.Bind( pg.EVT_PG_CHANGING, #handler )</template>
		<template name="evt_connect_OnPropertyGridChanged">self.$name.Bind( pg.EVT_PG_CHANGED, #handler )</template>
	</templates>

	<templates class="wxPropertyGridManager">
		<template name="include">import wx.propgrid as pg</template>
		<template name="construction">
			self.$name = pg.PropertyGridManager(#wxparent $name, $id, $pos, $size, $style #ifnotnull $window_style @{ |$window_style @})
		</template>
		<template name="settings">
		    #ifnotnull $extra_style
		    @{ self.$name.SetExtraStyle( $extra_style ) @}
		</template>
		<template name="evt_connect_OnPropertyGridChanging">self.$name.Bind( pg.EVT_PG_CHANGING, #handler )</template>
		<template name="evt_connect_OnPropertyGridChanged">self.$name.Bind( pg.EVT_PG_CHANGED, #handler )</template>
	</templates>
	
	<templates class="propGridItem">
		<template name="construction">
			#ifequal $type "Category"
			@{ self.$name = self.#parent $name.Append( pg.PropertyCategory( $label, $label ) ) @}
			#ifnotequal $type "Category"
			@{
				self.$name = self.#parent $name.Append( pg.${type}Property( $label, $label ) )
				#ifnotnull $help
				@{ #nl self.#parent $name.SetPropertyHelpString( $name, $help ) @}
			@}
		</template>
	</templates>
	
	<templates class="propGridPage">
		<template name="construction">
			#nl self.$name = self.#parent $name.AddPage( $label, $bitmap );
		</template>
	</templates>

</codegen>
