Permalink
Browse files

Add prefixes for TreeListCtrl to make it compatible with wxPython Pho…

…enix

TreeListCtrl resides in wx.dataview
  • Loading branch information...
UsYer committed Dec 6, 2017
1 parent f62a546 commit c1d9829ee2b27f7f3d6ea0a10004db22c69d2220
Showing with 19 additions and 8 deletions.
  1. +12 −8 output/plugins/additional/xml/data.pythoncode
  2. +7 −0 src/codegen/pythoncg.cpp
@@ -125,14 +125,18 @@ Python code generation written by
</templates>
<templates class="wxTreeListCtrl">
<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_OnTreelistSelectionChanged">self.$name.Bind( wx.EVT_TREELIST_SELECTION_CHANGED, #handler )</template>
<template name="evt_connect_OnTreelistItemExpanding">self.$name.Bind( wx.EVT_TREELIST_ITEM_EXPANDING, #handler )</template>
<template name="evt_connect_OnTreelistItemExpanded">self.$name.Bind( wx.EVT_TREELIST_ITEM_EXPANDED, #handler )</template>
<template name="evt_connect_OnTreelistItemChecked">self.$name.Bind( wx.EVT_TREELIST_ITEM_CHECKED, #handler )</template>
<template name="evt_connect_OnTreelistItemActivated">self.$name.Bind( wx.EVT_TREELIST_ITEM_ACTIVATED, #handler )</template>
<template name="evt_connect_OnTreelistItemContextMenu">self.$name.Bind( wx.EVT_TREELIST_ITEM_CONTEXT_MENU, #handler )</template>
<template name="evt_connect_OnTreelistColumnSorted">self.$name.Bind( wx.EVT_TREELIST_COLUMN_SORTED, #handler )</template>
<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">
View
@@ -1705,6 +1705,13 @@ void PythonTemplateParser::SetupModulePrefixes()
ADD_PREDEFINED_PREFIX( wxDV_VERT_RULES, wx.dataview. );
ADD_PREDEFINED_PREFIX( wxDV_VARIABLE_LINE_HEIGHT, wx.dataview. );
ADD_PREDEFINED_PREFIX( wxDV_NO_HEADER, wx.dataview. );
ADD_PREDEFINED_PREFIX( wxTL_SINGLE, wx.dataview. );
ADD_PREDEFINED_PREFIX( wxTL_MULTIPLE, wx.dataview. );
ADD_PREDEFINED_PREFIX( wxTL_CHECKBOX, wx.dataview. );
ADD_PREDEFINED_PREFIX( wxTL_3STATE, wx.dataview. );
ADD_PREDEFINED_PREFIX( wxTL_USER_3STATE, wx.dataview. );
ADD_PREDEFINED_PREFIX( wxTL_DEFAULT_STYLE, wx.dataview. );
ADD_PREDEFINED_PREFIX( wxDP_SPIN, wx.adv. );
ADD_PREDEFINED_PREFIX( wxDP_DROPDOWN, wx.adv. );

0 comments on commit c1d9829

Please sign in to comment.