Just be aware, that my implementation is not foolproof, fx. the mutual exclusion part only works under certain conditions, and of course there is only one level of submenus.
And also it seems, that multiple selection of menu entries doesn't spawn multiple intuimessages, which means that checking and unchecking items with right mouse down is going to mess up the system. Nothing I can do about it I'm afraid.
Note that the menus come out in black, I don't why I can't make them look like the Workbench menus, for some reason that's how GadTools put them out. The same problem in my Termie app...
Mmm so it seems it's the time to ask the core developers to improve OS4 (GadTools = Massimo Tantignone ?) to be able to use such modern framework "more natively" as possible :-/
@alfkil From other side, AmiFIG which i port from aros fully gadtools based and seems works fine (i remember there was something related to some ugly-default menu look, but yannick somehow fix it later). Imho need try to ask on os4coding.net (qt topic some of developers can not visit too offten).
And also it seems, that multiple selection of menu entries doesn't spawn multiple intuimessages, which means that checking and unchecking items with right mouse down is going to mess up the system. Nothing I can do about it I'm afraid.
Usually there is some sort of loop through to collect all the menu events for multi-select.
Quote:
Note that the menus come out in black, I don't why I can't make them look like the Workbench menus, for some reason that's how GadTools put them out. The same problem in my Termie app...
You need GTMN_NewLookMenus tag in your LayoutMenus call.
No I'm not... And I'm not sure I understand completely...
Apparently this has to do with the Reaction Window class, no? Currently I'm not using the Window class, just IIntuition->OpenWindowTags. Does that make your solution possible?
No I'm not... And I'm not sure I understand completely...
Apparently this has to do with the Reaction Window class, no? Currently I'm not using the Window class, just IIntuition->OpenWindowTags. Does that make your solution possible?
No, it's the same pretty much. I'm glad trixie posted that as I couldn't remember exactly how the loop needed to work
To requote, this is the important line: menuNumber = menuItem->NextSelect;
You should already have code getting your menuNumber/menuItem - menuNumber is the code part of the IntuiMessage IIRC (please check that, it's been years since I've had to write any menu event handling code)
edit this is my version: 'code' comes from RA_HandleInput but I think it's the same as the code part of the IntuiMessage.
case WMHI_MENUPICK:
item = ItemAddress(win->MenuStrip,code);
while (code != MENUNULL)
{
[handle menu item]
Currently I'm not using the Window class, just IIntuition->OpenWindowTags. Does that make your solution possible?
Yes, the menu multiselect handling is the same for ReAction as well as the regular Intuition windows. Just go through this chapter of the RKRM to read more about it. You can also find some menu examples in the RKRM that show you how to do event handling with menu multiselect.
@alkil Common , we monitor 2 days the site, and when i see "alfkil" online, i in hope that "aha, now he write some new cool posts in qt-thread" , bring it on ! :))
The new "hot news" is, that suddenly the opengl doesn't crash anymore with the public minigl. I don't know how it happened, for sure I didn't really change anything. Just so you know: For next release, get rid of the custom minigl build!
About koffice I don't know, is it based on Qt? I have only checked the front page of koffice.org, and I don't see any references to Qt. If it is based on Qt, then a port would surely be feasible, I should think.
About code for other Amiga clones, then I don't know, since I don't have either a MorphOS machine or AROS. The biggest problem is of course, that I have not used inline4 code, so every time I call an intuition function I go
Status: I am working on some annoying problems with GLWidgets. When that is done I will try and build the Assistant and the Designer apps. Give me a week, and I will have a fresh release .
@alkfil How about native menus btw ?:) Now all looks good, and works as should, all collects/reacts fine, etc ? Just in interest to know how all of this now works/looks like. And how menus itself looks like now: like a buttons, or visually its the same QT menu, but when you press on it, it spawn reaction menu ?