Silverfrost Forums

Welcome to our forums

Updating a format window

10 Feb 2006 12:06 #533

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

11 Feb 2006 12:54 #534

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 
Please login to reply.