Window.CloseRequest and windows gadgets

Discuss GUI programming with the RapaGUI plugin here
Post Reply
ilbarbax
Posts: 149
Joined: Thu Apr 01, 2010 6:41 pm

Window.CloseRequest and windows gadgets

Post 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
User avatar
airsoftsoftwair
Posts: 5626
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Window.CloseRequest and windows gadgets

Post 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".
ilbarbax
Posts: 149
Joined: Thu Apr 01, 2010 6:41 pm

Re: Window.CloseRequest and windows gadgets

Post 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
User avatar
airsoftsoftwair
Posts: 5626
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Window.CloseRequest and windows gadgets

Post 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.
User avatar
lazi
Posts: 632
Joined: Thu Feb 24, 2011 11:08 pm

Re: Window.CloseRequest and windows gadgets

Post 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 :)
ilbarbax
Posts: 149
Joined: Thu Apr 01, 2010 6:41 pm

Re: Window.CloseRequest and windows gadgets

Post 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.
User avatar
airsoftsoftwair
Posts: 5626
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Window.CloseRequest and windows gadgets

Post 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 :)
Post Reply