forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

clearwin window

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
weaverwb



Joined: 04 Aug 2005
Posts: 37
Location: Monterey

PostPosted: Sun Apr 09, 2006 4:13 pm    Post subject: clearwin window Reply with quote

Hi,

How can I tell if a user has manually closed a ClearWin window attached to a Fortran Unit? If s/he has, I'd like, in the best of worlds, to reopen it at the size and position at which they left it. Update doesn't reopen it and inquire doesn't mind that it was manually (but not Fortran) closed.

Thanks,


Bruce Weaver
_________________
Bruce+Weaver
Back to top
View user's profile Send private message
Anonymous
Guest





PostPosted: Mon Apr 10, 2006 12:51 am    Post subject: clearwin window Reply with quote

[Readers: please ignore this reply and follow the thread below. There is a better way and some of my comments below turn out to be inaccurate or just plain wrong. PL]

Bruce

1. If you have not already done so, embed your ClearWin window in a "format" window using %cw.

2. Use %lw or %ch to create a control variable. Its current value will indicate if a user has closed the window.

3. Use %sz for the size. The associated variables will be updated with the current size.

4. Use %gp from time to time to keep the latest window position.

4. When necessary reopen the window using the saved size (%sz) and position (%sp).

Note that you can use standard Fortran output without explicitly creating a ClearWin window and the reopening will happen automatically with the next WRITE statement. However, the size and position will not be the same.

There is a lot more that could be written but this may be enough to get you started.
Back to top
JohnHorspool



Joined: 26 Sep 2005
Posts: 270
Location: Gloucestershire UK

PostPosted: Mon Apr 10, 2006 1:43 am    Post subject: clearwin window Reply with quote

Bruce

Why not just remove the user option of being able to close the window, by using:-

i=winio@('%ww[no_sysmenu]&')


_________________
John Horspool
Roshaz Software Ltd.
Gloucestershire
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Mon Apr 10, 2006 2:06 am    Post subject: clearwin window Reply with quote

Or you could use %cc to control the closure!
Back to top
View user's profile Send private message AIM Address
JohnHorspool



Joined: 26 Sep 2005
Posts: 270
Location: Gloucestershire UK

PostPosted: Mon Apr 10, 2006 5:55 am    Post subject: clearwin window Reply with quote

Paul

In the help manuals the example for %gp shows it to be attached to a button. Is there a method to get a window position other than requiring the user to click on a button? And, how can multiple windows be handled, i.e. when the program creates a text output window and a graphics output window ?

Thanks
John
_________________
John Horspool
Roshaz Software Ltd.
Gloucestershire
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Tue Apr 11, 2006 1:25 am    Post subject: clearwin window Reply with quote

John

It is not clear to me what you are looking for.
%gp gives the position of the next control and allows you to use %sp to set the position of other controls or windows.

%sz can be used to get the size of a window.
GET_WINDOW_LOCATION@ can be used to get its position.
Back to top
View user's profile Send private message AIM Address
JohnHorspool



Joined: 26 Sep 2005
Posts: 270
Location: Gloucestershire UK

PostPosted: Tue Apr 11, 2006 4:28 pm    Post subject: clearwin window Reply with quote

Paul

Thanks, the get_window_location call was exactly what I needed.

John
_________________
John Horspool
Roshaz Software Ltd.
Gloucestershire
Back to top
View user's profile Send private message Visit poster's website
weaverwb



Joined: 04 Aug 2005
Posts: 37
Location: Monterey

PostPosted: Wed Apr 12, 2006 1:28 am    Post subject: clearwin window Reply with quote

Thanks Paul.

I was not embedding it but letting it float like other windows I had opened...now I'll go back and embed them all to keep the screen under control to maximize the amount of info the user can display.

Bruce Weaver
_________________
Bruce+Weaver
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group