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 

Handling of I/O-Window

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



Joined: 26 Oct 2017
Posts: 4

PostPosted: Sat Dec 02, 2017 5:45 pm    Post subject: Handling of I/O-Window Reply with quote

To handle my I/O-window I need some more informations:
- get the width of the used font (the heigth is get over clearwin_info@('system_font_height') and why not the width in the same way??)
- get and set the cursor position
- possibility to scroll the text, so that the cursor remains approximately at the middle of the I/O-window, independent from input and output.
Has anybody proposals or results?

Here my test-program:
WINAPP
PROGRAM EA_FENSTER
INCLUDE <windows.ins>
INTEGER win,xsize,ysize,xpos,ypos,xscreen,yscreen,font_h,font_w
INTEGER rand_o,rand_l
INTEGER KRW
CHARACTER*40 NAMEFS /'KIPEIN Eingabe-Ausgabe-Kontrollfenster '/
KRW=5
leiste_u=16
rand_o=5
rand_l=5
NROW = 81
xscreen=clearwin_info@('screen_width')
yscreen=clearwin_info@('screen_depth')
font_h=clearwin_info@('system_font_height')
font_w=font_h*6/10
xsize=NROW*font_w
ysize=yscreen-(2*leiste_u+rand_o)
xpos=xscreen-xsize-rand_l
ypos=rand_o
LINES=ysize/font_h
win=create_window@(NAMEFS,xpos,ypos,xsize,ysize)
CALL set_default_window@(win)
CALL open_to_window@(KRW,win)
WRITE(KRW,'("xscreen=",I10)')xscreen
WRITE(KRW,'("yscreen=",I10)')yscreen
WRITE(KRW,'("xsize=",I10)')xsize
WRITE(KRW,'("ysize=",I10)')ysize
WRITE(KRW,'("xposi=",I10)')xpos
WRITE(KRW,'("yposi=",I10)')ypos
WRITE(KRW,'("fonth=",I10)')font_h
WRITE(KRW,'("fontw=",I10)')font_w
WRITE(KRW,'("LINES=",I10)')LINES
WRITE(KRW,'(8("1234567890"))')
END
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Sat Dec 02, 2017 7:15 pm    Post subject: Reply with quote

Routines like create_window@ and set_default_window@ date back to the early days of ClearWin before ClearWin+ (the + relates to winio@ and everything that goes with it).

You should avoid writing new code based on these routines.

Have a look at winio@. If you can't work out how to use it then report back with an outline of what you want to do.

You can get a equivalent result to your code by using %cw in a call to winio@ but this may not be the simplest way to get what you want.
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 1683
Location: Yateley, Hants, UK

PostPosted: Sat Dec 02, 2017 10:18 pm    Post subject: Reply with quote

I suggest you read the confusingly-named 'ClearWin windows' under the section 'ClearWin+' in FTN95.CHM.

A year or so ago there was an extensive discussion around these, setting fonts in text windows, etc.

Eddie
Back to top
View user's profile Send private message
FK_GER



Joined: 26 Oct 2017
Posts: 4

PostPosted: Mon Dec 04, 2017 5:44 pm    Post subject: Reply with quote

At first it will be helpfull to tell a little bit about my fortran knowledge. I have efficient know-how in Fortran4, but more or less few in F77 and F90, and I'm not versed in FTN95.
During my active job at the University I have developed several fortran-programs, which are very helpfull to calculate special problems in the field of constuction engineering. I have migrated the programs from the punchcards to VAX-Systems at first and to Windows-PCs later on. In this process the I/O was changed to the windows procedure and upgraded with a graphic part to visualize the results. For this purpose I have used fortran compilers from DEQ, Watcom, HP and at least Compaq. The operating systems are Win98, W2k, NT and XP. Unfortunately the Compaq compiler is not available for Win7 and the subsequent operating systems.
Because these programs are still used until today from students and civil engineers (at present with a virtual XP-System at Win7 or Win8), it is necessary to migrate the program system to a newer operating system, e.g. WIN7 at first.
In the Compaq-Manual some paradigm are given, how to manage the windows on the screen. I only have modified these examples for my purposes. Dependent on the dimensions of the screen, which were asked with a special F90-fortran function (called 'initialsettings') from the operation system, a frame-window is opened at first. In this frame-window the scrollable I/O-window is placed, which fits exactly into the inner border of the frame. In doing so the full heigth of the screen is used, and the width is restricted to 80 visible characters. This is the standard for all my programs.
For those programs with graphic output the frame-window is widened for two I/O-windows, on the right the text, on the left the diagrams. One special-program uses for the graphic the Compaq 'Array Viewer', which creates own windows directly besides the text-window.
This is a general survey what to do. I hope that I get assistance from you.[/b]
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 1645
Location: South Pole, Antarctica

PostPosted: Tue Dec 05, 2017 6:29 am    Post subject: Reply with quote

Can you post pictures from your screen (via Postimage etc)? This will fill more reality into the words.
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 1683
Location: Yateley, Hants, UK

PostPosted: Tue Dec 05, 2017 12:22 pm    Post subject: Reply with quote

I have a feeling that you are trying to create a text-only interface for your programs in Windows, and frankly, not only is that rather difficult, it also impairs the rapid learning curve that many Windows users experience if software conforms to the user experience they are familiar with.

If you want to get on a plane to London Heathrow and spend the day with me, then I'd willingly offer the time to explain using Clearwin+ to create a proper Windows graphical user interface. I see that flights from Germany are only around 100 return.

Teaching yourself Clearwin+ takes time, and the documentation is not a self-instruction text. When someone shows you how simple it is, it shortens the learning process.

Eddie
Back to top
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 739

PostPosted: Tue Dec 05, 2017 2:40 pm    Post subject: Re: Reply with quote

FK_GER wrote:
Unfortunately the Compaq compiler is not available for Win7 and the subsequent operating systems.

That is only half true. You can install from the CVF CD if you run the 32-bit Setup.exe. Alternatively, you can move a Compaq Visual Fortran installation to Win7, Win8 or Win10 and get it working there, provided you have a working installation of CVF on Windows XP. I have CVF working fine on Win10-64.

For your situation, I think that converting all your applications from QuickWin to ClearWin++ is going to be a bigger hurdle than using FTN95 instead of CVF. If that is the case, it would be most useful to have both CVF6.6 and FTN95 working on your present computer, so that you can do the graphics conversion at your own comfortable pace.
Back to top
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 739

PostPosted: Tue Dec 05, 2017 2:40 pm    Post subject: Re: Reply with quote

FK_GER wrote:
Unfortunately the Compaq compiler is not available for Win7 and the subsequent operating systems.

That is only half true. You can install from the CVF CD if you run the 32-bit Setup.exe. Alternatively, you can move a Compaq Visual Fortran installation to Win7, Win8 or Win10 and get it working there, provided you have a working installation of CVF on Windows XP. I have CVF working fine on Win10-64.

For your situation, I think that converting all your applications from QuickWin to ClearWin++ is going to be a bigger hurdle than using FTN95 instead of CVF. If that is the case, it would be most useful to have both CVF6.6 and FTN95 working on your present computer, so that you can do the graphics conversion at your own comfortable pace.

If you decide to stay with QuickWin graphics, it is worth considering using a current Intel compiler (compiler runs only on 64-bit Windows, but can produce 32-bit objects).
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 631

PostPosted: Wed Dec 06, 2017 4:25 pm    Post subject: Reply with quote

Quote:
That is only half true.


it's not true at all is it if you can install from 32 bit setup.exe ?
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