Mercurial > libervia-backend
comparison frontends/src/wix/main_window.py @ 802:9007bb133009
core, frontends: XMLUI refactoring:
- XMLUI now use objects with 2 main classes: widgets (button, label, etc), and container which contain widgets according to a layout
- widgets and containers classes are found through introspection, thereby it's really easy to add a new one
- there is still the AddWidgetName helper, for example AddText('jid', 'test@example.net') will add a StringWidget with name "jid" and default value "test@example.net"
- container can be inside other containers. changeContainer change the first parent container
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 04 Feb 2014 18:19:00 +0100 |
parents | 46aa5ada61bf |
children | be4c5e24dab9 |
comparison
equal
deleted
inserted
replaced
801:02ee9ef95277 | 802:9007bb133009 |
---|---|
158 assert(current_menu != None) | 158 assert(current_menu != None) |
159 item_id = wx.NewId() | 159 item_id = wx.NewId() |
160 help_string = self.bridge.getMenuHelp(id_, '') | 160 help_string = self.bridge.getMenuHelp(id_, '') |
161 current_menu.Append(item_id, name, help=help_string) | 161 current_menu.Append(item_id, name, help=help_string) |
162 #now we register the event | 162 #now we register the event |
163 def event_answer(e): | 163 def event_answer(e, id_=id_): |
164 self.launchAction(id_, None, profile_key = self.profile) | 164 self.launchAction(id_, None, profile_key = self.profile) |
165 | 165 |
166 wx.EVT_MENU(self, item_id, event_answer) | 166 wx.EVT_MENU(self, item_id, event_answer) |
167 | 167 |
168 | 168 |