Silverfrost Forums

Welcome to our forums

Problem with 'at' character input/output

22 May 2013 7:45 #12268

Many thanks for all your contributions.

Here is an alternative sample based on Eddie's code

winapp 
program at
include <clearwin.ins>
integer ia,kontrol,icw_handle,hfont2,hfont3 
ia=winio@('%ww%ca[Test for embedded CW window]&')
ia=winio@('%pv%60.10`cw&', 99, icw_handle) 
ia=winio@('%ac[F1]&','COPY')
ia=winio@('%it%gf%`it&', hfont2) 
ia=winio@('%ul%gf%`ul&', hfont3) 
ia=winio@('%ff%nl%rj%6bt[Stop]%lw', kontrol) 
call add_text_descriptor(icw_handle, hfont2, rgb@(255,0,0)) 
call add_text_descriptor(icw_handle, hfont3, rgb@(0,0,255)) 
write(99,*) '@t1This is the default font - maybe for headings' 
write(99,*) '@t2This is the first additional font - red, italic' 
write(99,*) '@t3This is the next additional font - blue, upright' 
end 
22 May 2013 5:46 #12269

Oh, that's excellent! Avoids that awful CreateFont stuff.

Eddie

22 May 2013 9:44 #12270

Paul - Many thanks for taking all this seriously and coming up with such an elegant solution! Really appreciated.

  • Steve
23 May 2013 2:58 #12271

That rainbow of colors makes CWP very nice looking. Is it possible to change the font in Simpleplot %pl control similar way?

29 Sep 2016 8:25 #18059

I would like to get my hands on a copy of this old manual for these functions specifically. I've tried searching, but, alas, no valid hits.

Is there a way for someone to upload it and post the link here so the rest of us can get a copy?

Assuming it is in PDF or some electronic form!

I have implemented the @t construct to notify my users of important status messages! And learned some valuable information along the way.

29 Sep 2016 9:33 #18060

Bill,

Perhaps just download this: http://www.silverfrost.com/manuals/clearwin.pdf

Eddie

29 Sep 2016 10:17 #18061

Nope, this says 'Refer to the ClearWin+ Supplemental Manual' for details on these obsolete functions.

That's the one I'm looking for (I think). There may be a diofferent one, possible a Fortran specific one. I have:

Salford Clearwin Salford F77 User Guide and Salford FTN 95

30 Sep 2016 10:08 #18062

Here is a link to the required documentation...

http://www.silverfrost.com/manuals/clearwinuserssupplement.zip

30 Sep 2016 10:47 #18063

Paul,

I'm not sure that this is what is wanted. I'm afraid that I didn't look further than the title page before recommending the documentation. I have a print copy of a very early version of the Clearwin+ Fortran Edition manual dated June 1995. By then, quite a number of things had seemed to become obsolete, often associated with 16-bit Windows, VBX controls, and DBOS (also FTN77).

At the risk of being called 'know-all', what seems to have happened is that the baby was thrown out with the bath water over the confusing terminology 'ClearWin windows'. Windows generated with WINIO@ seem to be referred to as 'Format windows', but Clearwin windows are either or both of:

(a) Windows generated with CREATE_WINDOW and managed with routines such as CLEAR_WINDOW, DESTROY_WINDOW etc.

(b) Text display areas created with %cw in a Format window

The first category of these are clearly supplanted by Format windows, but the second category are not, and they remain of use for anyone who want to use traditional Fortran formatted output (admittedly, using ESCape sequences to add bold, italic, underline, colour etc) , which one does inside the %cw text area, having attached a Fortran LUN to the %cw area with (say) OPEN_TO_WINDOW@. The earlier content of this topic related to the @ symbol, which eventually was tracked down to it being the default ESCape code, resettable by SET_WIN_ESCAPE.

Sadly, the documentation for both categories (a) and (b) above is interwoven, and despite your very clear example (and my suggestions, which I had all but forgotten), there seems to be no clear exposition of what you can or can't do with a %cw text area as distinct from a Windows Window NOT generated with WINIO@.

Even the 1995 manual needs a lot of searching in, and I can't find any better anywhere.

Eddie

30 Sep 2016 11:14 #18064

Eddie

The intention (but maybe not always the practise) is outlined in the help files under Win32 platform->ClearWin+->Introduction->How to use this guide.

A 'ClearWin' window is produced, for example, via %cw. A 'Format' window is anything produced by a call to winio@.

The documentation mentioned above describes ClearWin which was basically ClearWin+ without winio@. It includes a description of add_text_descriptor@ (an alternative name for add_text_descriptor) together with other routines relating to 'ClearWin' windows.

30 Sep 2016 11:55 #18065

Hi Paul,

Point(s) taken. You know that I am fond of an aphorism of the form: 'When is an X not an X?' As a long time devotee of Clearwin+, I am often confused by ClearWin, Clearwin, Clearwin+, Clearwin window etc and when one needs to delve into two decades old documentation, that describes things that no longer exist, interdigitated with things that are still present and useful.

I'm not sure that anything is helped by a peremptory command that 'You must provide a list of X, Y and Z', but honestly, life would be easier if somewhere one could find certain things more easily in the documentation.

The other day, trawling through some old papers, I found the registration paperwork for my attendance at the Clearwin launch seminar at Salford, so that gives me around 24 years of dabbling with it, but I still get 'Eureka' moments when I discover that something obsolete is still in there, or how to do something that perhaps one needs only once per decade.

There is a fundamental problem in psychology that it is easier to understand what is meant when an object is given two names than when the same name is given to two different objects. Quite clearly in the older documentation, a ClearWin window is one generated by Create_Window as well as a window created by %cw.

The problem is not eased with complex names that contain the same elements transposed. Despite more than 2 decades of use, I still have to look up (in the documentation or an example program of mine) the difference between UPDATE_WINDOW@ and WINDOW_UPDATE@.

As always, you have succinctly described the current position, but the confusion arises when one needs to refer to older documentation because it is difficult to find the matter in the current documentation.

Eddie

30 Sep 2016 1:12 #18066

John

I think that Dan's request was missed at the time. You can set the line colour in the existing %pl but not the text colour. As far as I know the Simplot library does not allow you to set the colour of the various text components.

Please login to reply.