[Freemint-list] Remove a window menubar

Helmut Karlowski helmut.karlowski at ish.de
Sat Oct 1 16:44:00 MSD 2016


Am 01.10.2016, 11:41 Uhr, schrieb Jean-François Lemaire:

> Hi,
>
> I'm wondering if it's at all possible to remove a menubar attached to a
> window with
>      win_set(handle, WF_MENU, ...);
>
> TOSHYP does not give any info about this capability.
>
> Since one can remove a toolbar with the call
>      wind_set(handle, WF_TOOLBAR, NULL, NULL, ...);
>
> I tried
>      wind_set(handle, WF_MENU, NULL, NULL,...);
>
> but NULL pointers are not accepted parameters. So it doesn't seem to be
> possible -- unless there's a new feature I'm missing.

 From viewing at the XaAES-source this should work

       OBJECT *ob = ptr_from_shorts(pb->intin[2], pb->intin[3]);
       XA_WIDGET *widg = get_widget(w, XAW_MENU);

       if (ob)
       {
...

       }
       else if (widg->stuff)
       {
         DIAGS(("  --- Remove menu"));
         remove_widget(lock, w, XAW_MENU);
         w->active_widgets &= ~XaMENU;
       }

Maybe it wants short-0 not NULL?

       wind_set(handle, WF_MENU, 0, 0,...);


-Helmut

--



More information about the Freemint-list mailing list