wxFlatMenu & wxFlatMenuBar
wxFlatMenu & wxFlatMenuBar
Hi,
here is another component I wrote for my own needs, like the name implies, it is a generic menu.
The current implementation was tested on windows, as soon as I will finish all functionlity I will build it on Linux as well.
(the code should compile and run on Linux, but I know there are some still problems with the events)
I tried to provide a full functionlity for menu and menubar.
Some things still needs to be solved, like:
- Radio items are not handled yet
- Linux port ofc
- Integration with docking library (mainly AUI)
- Automatic scroll bar when menu's height capture full screen height
- Accelerators (Alt+F, Alt+S etc)
and probably some other points that I missed out
The above list is what it cant do, so what can it does?
- Fires all the events (UI & Cmd)
- Check items
- Separators
- Enable / Disable
- Images
- etc etc
Link to source files:
http://www.eistware.com/flatmenu/wxFlatMenu.zip
Demo (Zipped win32 exe):
http://www.eistware.com/flatmenu/wxflatmenu_test.zip
I think it looks pretty cool
here are some screenshots of the demo application:
Modern look:
XP default look:
Modern look hover:
here is another component I wrote for my own needs, like the name implies, it is a generic menu.
The current implementation was tested on windows, as soon as I will finish all functionlity I will build it on Linux as well.
(the code should compile and run on Linux, but I know there are some still problems with the events)
I tried to provide a full functionlity for menu and menubar.
Some things still needs to be solved, like:
- Radio items are not handled yet
- Linux port ofc
- Integration with docking library (mainly AUI)
- Automatic scroll bar when menu's height capture full screen height
- Accelerators (Alt+F, Alt+S etc)
and probably some other points that I missed out
The above list is what it cant do, so what can it does?
- Fires all the events (UI & Cmd)
- Check items
- Separators
- Enable / Disable
- Images
- etc etc
Link to source files:
http://www.eistware.com/flatmenu/wxFlatMenu.zip
Demo (Zipped win32 exe):
http://www.eistware.com/flatmenu/wxflatmenu_test.zip
I think it looks pretty cool
here are some screenshots of the demo application:
Modern look:
XP default look:
Modern look hover:
Last edited by eranif on Sun Nov 05, 2006 7:25 pm, edited 1 time in total.
-
- Experienced Solver
- Posts: 75
- Joined: Sat Dec 10, 2005 10:38 pm
- Location: Michigan, USA
- Contact:
Looks very good. Thanks for sharing. I can't wait for this control to mature.
- Ryan
RJP Computing
wxPack - Precompiled wxWidgets package.
Ubuntu 9.04 x86_64/WinXP, AMD Athlon x2 3000+, 4000MB RAM, AC 97 Audio, nVidia GeForce 9400GS 1GB
RJP Computing
wxPack - Precompiled wxWidgets package.
Ubuntu 9.04 x86_64/WinXP, AMD Athlon x2 3000+, 4000MB RAM, AC 97 Audio, nVidia GeForce 9400GS 1GB
Andrea has his work cut out for him to surprise the wxPython community again with a good port of your great work eranif!
Looks great! I think a lot of people will like this as it was a long standung request to get office 2003 like menus in common apps with wxWidgets!
Regards,
- Jorgen
Looks great! I think a lot of people will like this as it was a long standung request to get office 2003 like menus in common apps with wxWidgets!
Regards,
- Jorgen
Forensic Software Engineer
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb
-
- Experienced Solver
- Posts: 89
- Joined: Tue Oct 03, 2006 6:30 pm
- Location: London, UK
- Contact:
Ah, this is excellent Eran! Extremely nice, really.
Andrea.
Well, I have extended the work Eran has done with FancyButtonPanel with a lot *LOT* of new things... Jorg, stay tuned on the wxPython mailing list, I think this evening I will post the latest releaseAndrea has his work cut out for him to surprise the wxPython community again with a good port of your great work eranif!
Andrea.
Basically, I am completing this functionality now (more or less in that order):Is it possible to open the top level menus when the mouse moves upon them?
- Accelerators for menus - Done
- Accelerators for menubar
- Mouse moving to another menu while menu is opened, should open other menu and close current one
- Radio items in menus
- Integration with AUI (finding a workaroud to co-exist)
- Scrolling when menu is too big to fit the screen
-
- wxWorld Domination!
- Posts: 1339
- Joined: Wed Aug 03, 2005 8:10 am
- Location: BANGALORE, INDIA
- Contact:
Hi,
Another update on this control,
I updated the source files + demo.
The changes I have made:
- Accelerators are now supported (inside menus & for the menu bar)
- Hovering with a mouse on another top level menu, while a menu is opened, will close the current one and will open the other one
- It is now possible to navigate between top level menus using the arrows: if a menu is opened, and user press right arrow, the following logic applies:
+ if the menu has sub menu - it will open
+ if the menu has no sub-menu, the menu bar will attempt to open the next top level menu
similar logic for left arrow
Links:
Link to source files:
http://www.eistware.com/flatmenu/wxFlatMenu.zip
Demo (Zipped win32 exe):
http://www.eistware.com/flatmenu/wxflatmenu_test.zip
Eran
Another update on this control,
I updated the source files + demo.
The changes I have made:
- Accelerators are now supported (inside menus & for the menu bar)
- Hovering with a mouse on another top level menu, while a menu is opened, will close the current one and will open the other one
- It is now possible to navigate between top level menus using the arrows: if a menu is opened, and user press right arrow, the following logic applies:
+ if the menu has sub menu - it will open
+ if the menu has no sub-menu, the menu bar will attempt to open the next top level menu
similar logic for left arrow
Links:
Link to source files:
http://www.eistware.com/flatmenu/wxFlatMenu.zip
Demo (Zipped win32 exe):
http://www.eistware.com/flatmenu/wxflatmenu_test.zip
Eran
Update:
It now supports AUI, at least for v0.9.2 (wx2.6.3), it means that you can place a menu bar as an AUI window (the work was to find the correct settings that will result in acceptable behavior). AUI source are unmodified ofc.
I updated the source files & added another executable that includes the AUI binary for windows (so you can get impression, report bugs ):
http://www.eistware.com/flatmenu/wxflat ... th_AUI.zip
Eran
It now supports AUI, at least for v0.9.2 (wx2.6.3), it means that you can place a menu bar as an AUI window (the work was to find the correct settings that will result in acceptable behavior). AUI source are unmodified ofc.
I updated the source files & added another executable that includes the AUI binary for windows (so you can get impression, report bugs ):
http://www.eistware.com/flatmenu/wxflat ... th_AUI.zip
Eran
-
- Experienced Solver
- Posts: 89
- Joined: Tue Oct 03, 2006 6:30 pm
- Location: London, UK
- Contact:
Hi Eran,
it is very impressive, nice work! If I may report one strange thing in the latest executable (with wxAUI support):
If I drag the top sash to enlarge the frame menu, I am not able anymore to click on "File", "Edit" and so on. The menu texts are correctly positioned in the middle, but the menu highlight is still in the old position (at the top).
@Jorgen: I am afraid it would be impossible to port it to wxPython as it is; other than the platform dependent code (that is easily implemented also in wxPython), there are calls to the MS Windows API which can not be ported to wxPython unless ctypes or win32all extensions are used (and I am not sure it can be done anyway, the MSWGetCreateWindowFlags and similar functions are impossible to translate IMHO). I don't think Robin will accepts something that runs only on Windows. Eran has done an excellent work with this control but wxPythoneers like me should only hope for a class that works also on GTK ans MAC and then wait that Robin wraps it with SWIG.
Andrea.
it is very impressive, nice work! If I may report one strange thing in the latest executable (with wxAUI support):
If I drag the top sash to enlarge the frame menu, I am not able anymore to click on "File", "Edit" and so on. The menu texts are correctly positioned in the middle, but the menu highlight is still in the old position (at the top).
@Jorgen: I am afraid it would be impossible to port it to wxPython as it is; other than the platform dependent code (that is easily implemented also in wxPython), there are calls to the MS Windows API which can not be ported to wxPython unless ctypes or win32all extensions are used (and I am not sure it can be done anyway, the MSWGetCreateWindowFlags and similar functions are impossible to translate IMHO). I don't think Robin will accepts something that runs only on Windows. Eran has done an excellent work with this control but wxPythoneers like me should only hope for a class that works also on GTK ans MAC and then wait that Robin wraps it with SWIG.
Andrea.
The demo doesn't work here on Win2k. I get lots of 1407 "window class not found" errors for the menus.eranif wrote:Update:
It now supports AUI, at least for v0.9.2 (wx2.6.3), it means that you can place a menu bar as an AUI window (the work was to find the correct settings that will result in acceptable behavior). AUI source are unmodified ofc.
I updated the source files & added another executable that includes the AUI binary for windows (so you can get impression, report bugs ):
http://www.eistware.com/flatmenu/wxflat ... th_AUI.zip
Eran
It does not run only on windows, dont let people get the wrong impression...I don't think Robin will accepts something that runs only on Windows
The WIN API code used there is only for shadow for the menu on windows, and can be safely ignored. (it is surrounded with WXWIN ifdefs)
Once I will complete the control, I will fine tune it to GTK as well.
I compiled it when I started working on it on GTK and it worked perfectly.
The only different is that on GTK it does not have shadow under it.
The errors you are getting are probably related to the same issue - using the native windows call to shadow the menu.The demo doesn't work here on Win2k. I get lots of 1407 "window class not found" errors for the menus.
Eran