Window.CloseRequest and windows gadgets

Discuss GUI programming with the RapaGUI plugin here

Window.CloseRequest and windows gadgets

Postby ilbarbax » Wed Nov 30, 2016 5:53 pm

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

Re: Window.CloseRequest and windows gadgets

Postby airsoftsoftwair » Sat Dec 03, 2016 1:08 am

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".
User avatar
airsoftsoftwair
 
Posts: 2105
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany

Re: Window.CloseRequest and windows gadgets

Postby ilbarbax » Sun Jan 01, 2017 8:05 pm

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

Re: Window.CloseRequest and windows gadgets

Postby airsoftsoftwair » Tue Jan 03, 2017 10:44 pm

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
airsoftsoftwair
 
Posts: 2105
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany

Re: Window.CloseRequest and windows gadgets

Postby lazi » Tue Jan 03, 2017 11:00 pm

On AmigaOS4 there is a maximize window feature with SHIFT clicking the size gadget.
Nothing to do with RapaGUI, but maybe good to know :)
User avatar
lazi
 
Posts: 229
Joined: Fri Feb 25, 2011 12:08 am

Re: Window.CloseRequest and windows gadgets

Postby ilbarbax » Wed Jan 04, 2017 1:07 pm

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

Re: Window.CloseRequest and windows gadgets

Postby airsoftsoftwair » Wed Jan 04, 2017 11:15 pm

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 :)
User avatar
airsoftsoftwair
 
Posts: 2105
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany


Return to RapaGUI

Who is online

Users browsing this forum: No registered users and 1 guest