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 

Updating a format window

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



Joined: 02 Feb 2006
Posts: 3

PostPosted: Fri Feb 10, 2006 1:06 am    Post subject: Updating a format window Reply with quote

I whish to graphically display data which arrive via an interface in an irregular temporal sequence. Was unable to figure out how to update the screen upon arrival of each new data set (while still displaying the previous data). If the window is set up by winio@('%gr'... and the program ends by calling winio@('%lw'.., the whole data set (or nothing) is displayed, but not the gradual build-up which I would like to see. What is the correct sequence of calls to my purpose? Pointing to a sample program would also help. (FTN95 V 4.90 under W 98 2nd Ed)

Paul Brinckmann
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Sat Feb 11, 2006 1:54 am    Post subject: Updating a format window Reply with quote

Paul

Here is an example that might give you some ideas.
It displays a set of traffic lights. When you click on a light it changes colour.


winapp
c---------------------------------------------------------------
integer i,winio@
external fill_func,start_cb

i=winio@('%ww[no_maxminbox]&')
i=winio@('%mn[&Exit]&','EXIT')
i=winio@('%^gr[black,rgb_colours]&',100,250,fill_func)
i=winio@('%sc',start_cb)
end
c---------------------------------------------------------------
integer function start_cb()
include <clearwin.ins>
integer i,w
call set_line_width@(2)
w=RGB@(200,200,200)
call rectangle@(1,1,99,249,w)
do i=50,200,75
call ellipse@(50,i,32,32,w)
enddo
start_cb=1
end
c-------------------------------------------------------------
integer function fill_func()
include <clearwin.ins>
integer x,y,v,r,a,g,w
call get_mouse_info@(x,y,v)
call get_rgb_value@(x,y,v)
r=get_matched_colour@(RGB@(255,0,0))
g=get_matched_colour@(RGB@(0,255,0))
a=get_matched_colour@(RGB@(255,168,0))
w=get_matched_colour@(RGB@(200,200,200))

if(v.eq.0)then
call fill_surface@(x,y,v,r)
elseif(v.eq.r)then
call fill_surface@(x,y,v,a)
elseif(v.eq.a)then
call fill_surface@(x,y,v,g)
else
call fill_to_border@(x,y,0,w)
endif

fill_func=1
end
Back to top
View user's profile Send private message AIM Address
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