[Wnd-commit] wnd/wnd/controls/menu __init__.py,1.1.1.1,1.2 header.py,1.1.1.1,1.2 methods.py,1.2,1.3
Status: Alpha
Brought to you by:
jurner
|
From: jürgen u. <cer...@us...> - 2005-07-02 09:55:16
|
Update of /cvsroot/wnd/wnd/wnd/controls/menu In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24490 Modified Files: __init__.py header.py methods.py popup.py Log Message: bit of this and a bit of that Index: header.py =================================================================== RCS file: /cvsroot/wnd/wnd/wnd/controls/menu/header.py,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** header.py 29 Apr 2005 15:22:18 -0000 1.1.1.1 --- header.py 2 Jul 2005 09:55:03 -0000 1.2 *************** *** 110,119 **** TPM_RETURNCMD = 256 - MF_BYPOSITION = 1024 MF_UNCHECKED = 0 MF_CHECKED = 8 ! ! --- 110,118 ---- TPM_RETURNCMD = 256 MF_UNCHECKED = 0 MF_CHECKED = 8 ! MF_BYCOMMAND = 0 ! MF_BYPOSITION = 1024 Index: methods.py =================================================================== RCS file: /cvsroot/wnd/wnd/wnd/controls/menu/methods.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** methods.py 17 May 2005 20:13:39 -0000 1.2 --- methods.py 2 Jul 2005 09:55:03 -0000 1.3 *************** *** 1,4 **** --- 1,5 ---- from wnd.controls.menu.header import * + from wnd.controls.menu.popup import Popup #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: *************** *** 165,170 **** #------------------------------------------------------------------ ! # menu iterators ! def Walk(self, hMenu=None): if not hMenu: --- 166,178 ---- #------------------------------------------------------------------ ! ! def Clear(self, hMenu=None): ! if not hMenu: ! hMenu= self.handle ! n = user32.GetMenuItemCount(hMenu) ! for i in range(n): ! user32.DeleteMenu(hMenu, 0, MF_BYPOSITION) ! ! def Walk(self, hMenu=None): if not hMenu: Index: popup.py =================================================================== RCS file: /cvsroot/wnd/wnd/wnd/controls/menu/popup.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** popup.py 17 May 2005 20:13:39 -0000 1.3 --- popup.py 2 Jul 2005 09:55:03 -0000 1.4 *************** *** 5,11 **** - - - class Popup(object): """Popup class returned by the Menu methods --- 5,8 ---- *************** *** 49,53 **** #'menubarbreak': 32,'menubreak':64, state_flags={'disabled' : 3,'checked' : 8,'default':4096} ! type_flags = {'menubarbreak': 32,'menubreak':64} for i in flags: try: itemState |= state_flags[i] --- 46,50 ---- #'menubarbreak': 32,'menubreak':64, state_flags={'disabled' : 3,'checked' : 8,'default':4096} ! type_flags = {'menubarbreak': 32,'menubreak':64, 'ownerdraw':256} for i in flags: try: itemState |= state_flags[i] Index: __init__.py =================================================================== RCS file: /cvsroot/wnd/wnd/wnd/controls/menu/__init__.py,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** __init__.py 29 Apr 2005 15:22:15 -0000 1.1.1.1 --- __init__.py 2 Jul 2005 09:55:03 -0000 1.2 *************** *** 96,99 **** --- 96,101 ---- if msg==278: # WM_INITMENU self.onMSG(hwnd, "menu open", wp, 0) + return 1 + elif msg==279: # WM_INITMENUPOPUP *************** *** 102,105 **** --- 104,108 ---- else: # menu self.onMSG(hwnd, "menu popup", wp, 0) + return 1 |