1<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> 2<!-- 3wxFormBuilder - A Visual Dialog Editor for wxWidgets. 4Copyright (C) 2005 José Antonio Hurtado 5 6This program is free software; you can redistribute it and/or 7modify it under the terms of the GNU General Public License 8as published by the Free Software Foundation; either version 2 9of the License, or (at your option) any later version. 10 11This program is distributed in the hope that it will be useful, 12but WITHOUT ANY WARRANTY; without even the implied warranty of 13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14GNU General Public License for more details. 15 16You should have received a copy of the GNU General Public License 17along with this program; if not, write to the Free Software 18Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 20Written by 21 José Antonio Hurtado - joseantonio.hurtado@gmail.com 22 Juan Antonio Ortega - jortegalalmolda@gmail.com 23 24Python code generation writen by 25 Michal Bližňák - michal.bliznak@gmail.com 26--> 27<codegen language="Python"> 28 <templates class="wxRibbonBar"> 29 <template name="include">import wx.lib.agw.ribbon as rb</template> 30 <template name="construction"> 31 self.$name = rb.RibbonBar( self , $id, $pos, $size, $style #ifnotnull $window_style @{ |$window_style @} #ifnotnull $window_name @{, wx.DefaultValidator, $window_name @} ) 32 </template> 33 <template name="after_addchild"> 34 self.$name.Realize() 35 </template> 36 <template name="setting"> 37 #ifequal $theme "Default" 38 @{ self.$name.SetArtProvider(rb.RibbonDefaultArtProvider) @} 39 #ifequal $theme "Generic" 40 @{ self.$name.SetArtProvider(rb.RibbonAUIArtProvider) @} 41 #ifequal $theme "MSW" 42 @{ self.$name.SetArtProvider(rb.RibbonMSWArtProvider) @} 43 </template> 44 <template name="evt_connect_OnRibbonButtonClicked">self.Bind( rb.EVT_RIBBONBUTTONBAR_CLICKED, #handler, id = $id )</template> 45 <template name="evt_connect_OnRibbonBarPageChanged">self.Bind( rb.EVT_RIBBONBAR_PAGE_CHANGED, #handler, id = $id )</template> 46 <template name="evt_connect_OnRibbonBarPageChanging">self.Bind( rb.EVT_RIBBONBAR_PAGE_CHANGING, #handler, id = $id )</template> 47 <template name="evt_connect_OnRibbonBarTabMiddleDown">self.Bind( rb.EVT_RIBBONBAR_TAB_MIDDLE_DOWN, #handler, id = $id )</template> 48 <template name="evt_connect_OnRibbonBarTabMiddleUp">self.Bind( rb.EVT_RIBBONBAR_TAB_MIDDLE_UP, #handler, id = $id )</template> 49 <template name="evt_connect_OnRibbonBarTabRightDown">self.Bind( rb.EVT_RIBBONBAR_TAB_RIGHT_DOWN, #handler, id = $id )</template> 50 <template name="evt_connect_OnRibbonBarTabRightUp">self.Bind( rb.EVT_RIBBONBAR_TAB_RIGHT_UP, #handler, id = $id )</template> 51 <template name="evt_connect_OnRibbonBarTabLeftDClick">self.Bind( rb.EVT_RIBBONBAR_TAB_LEFT_DCLICK, #handler, id = $id )</template> 52 <template name="evt_connect_OnRibbonBarToggled">@# event EVT_RIBBONBAR_TOGGLED isn't currently supported by wxPython</template> 53 <template name="evt_connect_OnRibbonBarHelpClick">@# event EVT_RIBBONBAR_HELP_CLICK isn't currently supported by wxPython</template> 54 </templates> 55 56 <templates class="wxRibbonPage"> 57 <template name="construction"> 58 self.$name = rb.RibbonPage( self.#parent $name, $id, $label , $bitmap , 0 ) 59 </template> 60 <template name="settings"> 61 #ifequal $select "1" 62 @{ self.#parent $name.SetActivePage( self.$name ) @} 63 </template> 64 </templates> 65 66 <templates class="wxRibbonPanel"> 67 <template name="construction"> 68 self.$name = rb.RibbonPanel( self.#parent $name, $id, $label , $bitmap , $pos, $size, $style #ifnotnull $window_style @{ |$window_style @} #ifnotnull $window_name @{, wx.DefaultValidator, $window_name @} ) 69 </template> 70 <template name="evt_connect_OnRibbonPanelExtbuttonActivated">@# event EVT_COMMAND_RIBBONPANEL_EXTBUTTON_ACTIVATED isn't currently supported by wxPython</template> 71 </templates> 72 73 <templates class="wxRibbonButtonBar"> 74 <template name="construction"> 75 self.$name = rb.RibbonButtonBar( self.#parent $name, $id, $pos, $size, 0) 76 </template> 77 </templates> 78 79 <templates class="ribbonButton"> 80 <template name="construction"> 81 self.#parent $name.AddSimpleButton( $id, $label, $bitmap, $help) 82 </template> 83 <template name="evt_connect_OnRibbonButtonClicked">self.Bind( rb.EVT_RIBBONBUTTONBAR_CLICKED, #handler, id = $id )</template> 84 </templates> 85 86 <templates class="ribbonDropdownButton"> 87 <template name="construction"> 88 self.#parent $name.AddDropdownButton( $id, $label, $bitmap, $help) 89 </template> 90 <template name="evt_connect_OnRibbonButtonDropdownClicked">self.Bind( rb.EVT_RIBBONBUTTONBAR_DROPDOWN_CLICKED, #handler, id = $id )</template> 91 </templates> 92 93 <templates class="ribbonHybridButton"> 94 <template name="construction"> 95 self.#parent $name.AddHybridButton( $id, $label, $bitmap, $help) 96 </template> 97 <template name="evt_connect_OnRibbonButtonClicked">self.Bind( rb.EVT_RIBBONBUTTONBAR_CLICKED, #handler, id = $id )</template> 98 <template name="evt_connect_OnRibbonButtonDropdownClicked">self.Bind( rb.EVT_RIBBONBUTTONBAR_DROPDOWN_CLICKED, #handler, id = $id )</template> 99 </templates> 100 101 <templates class="ribbonToggleButton"> 102 <template name="construction"> 103 self.#parent $name.AddToggleButton( $id, $label, $bitmap, $help) 104 </template> 105 <template name="evt_connect_OnRibbonButtonClicked">self.Bind( rb.EVT_RIBBONBUTTONBAR_CLICKED, #handler, id = $id )</template> 106 </templates> 107 108 <templates class="wxRibbonToolBar"> 109 <template name="construction"> 110 self.$name = rb.RibbonToolBar( self.#parent $name, $id, $pos, $size, 0) 111 </template> 112 </templates> 113 114 <templates class="ribbonTool"> 115 <template name="construction"> 116 self.#parent $name.AddSimpleTool( $id, $bitmap, $help) 117 </template> 118 <template name="evt_connect_OnRibbonToolClicked">self.Bind( rb.EVT_RIBBONTOOLBAR_CLICKED, #handler, id = $id )</template> 119 </templates> 120 121 <templates class="ribbonDropdownTool"> 122 <template name="construction"> 123 self.#parent $name.AddDropdownTool( $id, $bitmap, $help) 124 </template> 125 <template name="evt_connect_OnRibbonToolDropdownClicked">self.Bind( rb.EVT_RIBBONTOOLBAR_DROPDOWN_CLICKED, #handler, id = $id )</template> 126 </templates> 127 128 <templates class="ribbonHybridTool"> 129 <template name="construction"> 130 self.#parent $name.AddHybridTool( $id, $bitmap, $help) 131 </template> 132 <template name="evt_connect_OnRibbonToolClicked">self.Bind( rb.EVT_RIBBONTOOLBAR_CLICKED, #handler, id = $id )</template> 133 <template name="evt_connect_OnRibbonToolDropdownClicked">self.Bind( rb.EVT_RIBBONTOOLBAR_DROPDOWN_CLICKED, #handler, id = $id )</template> 134 </templates> 135 136 <templates class="ribbonToggleTool"> 137 <template name="construction"> 138 self.#parent $name.AddToggleTool( $id, $bitmap, $help) 139 </template> 140 <template name="evt_connect_OnRibbonToolClicked">self.Bind( rb.EVT_RIBBONTOOLBAR_CLICKED, #handler, id = $id )</template> 141 </templates> 142 143 <templates class="wxRibbonGallery"> 144 <template name="construction"> 145 self.$name = rb.RibbonGallery( self.#parent $name, $id, $pos, $size, 0) 146 </template> 147 <template name="generated_event_handlers"></template> 148 <template name="evt_connect_OnRibbonGallerySelected">self.Bind( rb.EVT_RIBBONGALLERY_SELECTED, #handler, id = $id )</template> 149 <template name="evt_connect_OnRibbonGalleryClicked">self.Bind( rb.EVT_RIBBONGALLERY_CLICKED, #handler, id = $id )</template> 150 <template name="evt_connect_OnRibbonGalleryHoverChanged">self.Bind( rb.EVT_RIBBONGALLERY_HOVER_CHANGED, #handler, id = $id )</template> 151 <template name="evt_connect_OnRibbonGalleryExtensionButtonPressed">self.Bind( wx.EVT_BUTTON, #handler, id = $id )</template> 152 </templates> 153 154 <templates class="ribbonGalleryItem"> 155 <template name="declaration"></template> 156 <template name="construction"> 157 self.#parent $name.Append( $bitmap, $id) 158 </template> 159 </templates> 160 161</codegen> 162