1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161
|
<?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="wxRibbonBar">
<template name="include">import wx.lib.agw.ribbon</template>
<template name="construction">
self.$name = #class( self , $id, $pos, $size, $style #ifnotnull $window_style @{ |$window_style @} #ifnotnull $window_name @{, wx.DefaultValidator, $window_name @} )
</template>
<template name="after_addchild">
self.$name.Realize()
</template>
<template name="setting">
#ifequal $theme "Default"
@{ self.$name.SetArtProvider(wx.lib.agw.ribbon.RibbonDefaultArtProvider) @}
#ifequal $theme "Generic"
@{ self.$name.SetArtProvider(wx.lib.agw.ribbon.RibbonAUIArtProvider) @}
#ifequal $theme "MSW"
@{ self.$name.SetArtProvider(wx.lib.agw.ribbon.RibbonMSWArtProvider) @}
</template>
<template name="evt_connect_OnRibbonButtonClicked">self.Bind( wx.lib.agw.ribbon.EVT_RIBBONBUTTONBAR_CLICKED, #handler, id = $id )</template>
<template name="evt_connect_OnRibbonBarPageChanged">self.Bind( wx.lib.agw.ribbon.EVT_RIBBONBAR_PAGE_CHANGED, #handler, id = $id )</template>
<template name="evt_connect_OnRibbonBarPageChanging">self.Bind( wx.lib.agw.ribbon.EVT_RIBBONBAR_PAGE_CHANGING, #handler, id = $id )</template>
<template name="evt_connect_OnRibbonBarTabMiddleDown">self.Bind( wx.lib.agw.ribbon.EVT_RIBBONBAR_TAB_MIDDLE_DOWN, #handler, id = $id )</template>
<template name="evt_connect_OnRibbonBarTabMiddleUp">self.Bind( wx.lib.agw.ribbon.EVT_RIBBONBAR_TAB_MIDDLE_UP, #handler, id = $id )</template>
<template name="evt_connect_OnRibbonBarTabRightDown">self.Bind( wx.lib.agw.ribbon.EVT_RIBBONBAR_TAB_RIGHT_DOWN, #handler, id = $id )</template>
<template name="evt_connect_OnRibbonBarTabRightUp">self.Bind( wx.lib.agw.ribbon.EVT_RIBBONBAR_TAB_RIGHT_UP, #handler, id = $id )</template>
<template name="evt_connect_OnRibbonBarTabLeftDClick">self.Bind( wx.lib.agw.ribbon.EVT_RIBBONBAR_TAB_LEFT_DCLICK, #handler, id = $id )</template>
<template name="evt_connect_OnRibbonBarToggled">@# event EVT_RIBBONBAR_TOGGLED isn't currently supported by wxPython</template>
<template name="evt_connect_OnRibbonBarHelpClick">@# event EVT_RIBBONBAR_HELP_CLICK isn't currently supported by wxPython</template>
</templates>
<templates class="wxRibbonPage">
<template name="construction">
self.$name = #class( self.#parent $name, $id, $label , $bitmap , 0 )
</template>
<template name="settings">
#ifequal $select "1"
@{ self.#parent $name.SetActivePage( self.$name ) @}
</template>
</templates>
<templates class="wxRibbonPanel">
<template name="construction">
self.$name = #class( self.#parent $name, $id, $label , $bitmap , $pos, $size, $style #ifnotnull $window_style @{ |$window_style @} #ifnotnull $window_name @{, wx.DefaultValidator, $window_name @} )
</template>
<template name="evt_connect_OnRibbonPanelExtbuttonActivated">@# event EVT_COMMAND_RIBBONPANEL_EXTBUTTON_ACTIVATED isn't currently supported by wxPython</template>
</templates>
<templates class="wxRibbonButtonBar">
<template name="construction">
self.$name = #class( self.#parent $name, $id, $pos, $size, 0)
</template>
</templates>
<templates class="ribbonButton">
<template name="construction">
self.#parent $name.AddSimpleButton( $id, $label, $bitmap, $help)
</template>
<template name="evt_connect_OnRibbonButtonClicked">self.Bind( wx.lib.agw.ribbon.EVT_RIBBONBUTTONBAR_CLICKED, #handler, id = $id )</template>
</templates>
<templates class="ribbonDropdownButton">
<template name="construction">
self.#parent $name.AddDropdownButton( $id, $label, $bitmap, $help)
</template>
<template name="evt_connect_OnRibbonButtonDropdownClicked">self.Bind( wx.lib.agw.ribbon.EVT_RIBBONBUTTONBAR_DROPDOWN_CLICKED, #handler, id = $id )</template>
</templates>
<templates class="ribbonHybridButton">
<template name="construction">
self.#parent $name.AddHybridButton( $id, $label, $bitmap, $help)
</template>
<template name="evt_connect_OnRibbonButtonClicked">self.Bind( wx.lib.agw.ribbon.EVT_RIBBONBUTTONBAR_CLICKED, #handler, id = $id )</template>
<template name="evt_connect_OnRibbonButtonDropdownClicked">self.Bind( wx.lib.agw.ribbon.EVT_RIBBONBUTTONBAR_DROPDOWN_CLICKED, #handler, id = $id )</template>
</templates>
<templates class="ribbonToggleButton">
<template name="construction">
self.#parent $name.AddToggleButton( $id, $label, $bitmap, $help)
</template>
<template name="evt_connect_OnRibbonButtonClicked">self.Bind( wx.lib.agw.ribbon.EVT_RIBBONBUTTONBAR_CLICKED, #handler, id = $id )</template>
</templates>
<templates class="wxRibbonToolBar">
<template name="construction">
self.$name = #class( self.#parent $name, $id, $pos, $size, 0)
</template>
</templates>
<templates class="ribbonTool">
<template name="construction">
self.#parent $name.AddSimpleTool( $id, $bitmap, $help)
</template>
<template name="evt_connect_OnRibbonToolClicked">self.Bind( wx.lib.agw.ribbon.EVT_RIBBONTOOLBAR_CLICKED, #handler, id = $id )</template>
</templates>
<templates class="ribbonDropdownTool">
<template name="construction">
self.#parent $name.AddDropdownTool( $id, $bitmap, $help)
</template>
<template name="evt_connect_OnRibbonToolDropdownClicked">self.Bind( wx.lib.agw.ribbon.EVT_RIBBONTOOLBAR_DROPDOWN_CLICKED, #handler, id = $id )</template>
</templates>
<templates class="ribbonHybridTool">
<template name="construction">
self.#parent $name.AddHybridTool( $id, $bitmap, $help)
</template>
<template name="evt_connect_OnRibbonToolClicked">self.Bind( wx.lib.agw.ribbon.EVT_RIBBONTOOLBAR_CLICKED, #handler, id = $id )</template>
<template name="evt_connect_OnRibbonToolDropdownClicked">self.Bind( wx.lib.agw.ribbon.EVT_RIBBONTOOLBAR_DROPDOWN_CLICKED, #handler, id = $id )</template>
</templates>
<templates class="ribbonToggleTool">
<template name="construction">
self.#parent $name.AddToggleTool( $id, $bitmap, $help)
</template>
<template name="evt_connect_OnRibbonToolClicked">self.Bind( wx.lib.agw.ribbon.EVT_RIBBONTOOLBAR_CLICKED, #handler, id = $id )</template>
</templates>
<templates class="wxRibbonGallery">
<template name="construction">
self.$name = #class( self.#parent $name, $id, $pos, $size, 0)
</template>
<template name="generated_event_handlers"></template>
<template name="evt_connect_OnRibbonGallerySelected">self.Bind( wx.lib.agw.ribbon.EVT_RIBBONGALLERY_SELECTED, #handler, id = $id )</template>
<template name="evt_connect_OnRibbonGalleryClicked">self.Bind( wx.lib.agw.ribbon.EVT_RIBBONGALLERY_CLICKED, #handler, id = $id )</template>
<template name="evt_connect_OnRibbonGalleryHoverChanged">self.Bind( wx.lib.agw.ribbon.EVT_RIBBONGALLERY_HOVER_CHANGED, #handler, id = $id )</template>
<template name="evt_connect_OnRibbonGalleryExtensionButtonPressed">self.Bind( wx.EVT_BUTTON, #handler, id = $id )</template>
</templates>
<templates class="ribbonGalleryItem">
<template name="construction">
self.#parent $name.Append( $bitmap, $id)
</template>
</templates>
</codegen>
|