Page 1 of 1

Window.CloseRequest and windows gadgets

Posted: Wed Nov 30, 2016 4:53 pm
by ilbarbax
Can please someone put an example on how to manage Window.CloseRequest. The manual is quite cryptic and despite different attempts I couldn't get how to use them.

For the windows gadgets (minimaze maximize etc.) I understand they can not be removed under OS4 as the manual states Windows, Linux, Mac OS only. There is a way to have a window with any gadget?

thanks

Re: Window.CloseRequest and windows gadgets

Posted: Sat Dec 03, 2016 12:08 am
by airsoftsoftwair
ilbarbax wrote:Can please someone put an example on how to manage Window.CloseRequest. The manual is quite cryptic and despite different attempts I couldn't get how to use them.
You need to listen to the "CloseRequest" attribute like this:

Code: Select all

<window notify="closerequest">
...
</window>
Whenever the user hits the close box of your window, the window isn't automatically closed then but your script will receive a "CloseRequest" notification instead. Your script can then choose to close the window manually or do something else, e.g. pop up a requester like "Do you really want to quit?" etc.
For the windows gadgets (minimaze maximize etc.) I understand they can not be removed under OS4 as the manual states Windows, Linux, Mac OS only. There is a way to have a window with any gadget?
Sorry, but I don't know what you mean by "a window with any gadget".

Re: Window.CloseRequest and windows gadgets

Posted: Sun Jan 01, 2017 7:05 pm
by ilbarbax
Concerning the gadgets let me clarify better. The manual states:

NAME
Window.MaximizeGadget -- configure window's maximize gadget

PLATFORMS
Windows, Linux, Mac OS <<<<============= NO AMIGA

FUNCTION
Set this to FALSE if you don't want to have a maximize gadget for your
window. Defaults to FALSE if Window.Toolwindow is set, otherwise to
TRUE.

TYPE
Boolean

APPLICABILITY
I



So why this function does not work under Amiga (infact it doesn't) when on standard Hollywood the DISPLAY command supports NoHide flag?
Then in RapaGui if I want a window with just the close gadget how can I do?

thanks

Re: Window.CloseRequest and windows gadgets

Posted: Tue Jan 03, 2017 9:44 pm
by airsoftsoftwair
Well, the maximize gadget isn't the same as the minimize gadget. The maximize gadget increases a window's size to the largest possible. AmigaOS and compatibles don't have this feature.

Re: Window.CloseRequest and windows gadgets

Posted: Tue Jan 03, 2017 10:00 pm
by lazi
On AmigaOS4 there is a maximize window feature with SHIFT clicking the size gadget.
Nothing to do with RapaGUI, but maybe good to know :)

Re: Window.CloseRequest and windows gadgets

Posted: Wed Jan 04, 2017 12:07 pm
by ilbarbax
Sorry I messed up a bit my reply, but the meaning is: I just want only the close gadget on my Rapagui windows. Other gadgets (minimize maximize depth etc..) NO. How can I do that this ? it seems that Rapagui accept this on windows/linux systems, but not on Amiga systems.

Re: Window.CloseRequest and windows gadgets

Posted: Wed Jan 04, 2017 10:15 pm
by airsoftsoftwair
Ok, I see. The problem is that MUI doesn't really allow this because it's user-configurable. In the MUI prefs, the user can decide which buttons should appear in the title bar. AFAIK, there is no way to programmatically prevent those items from appearing in the title bar. The only exception is the depth gadget. Hiding the depth gadget is supported by MUI so I could add a new attribute in RapaGUI that allows you to hide the depth gadget but you won't get rid of the other gadgets. But you can always file a feature request over at http://muidev.de of course :)