replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - %pl[native,external] + plot_mode@
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 

%pl[native,external] + plot_mode@

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



Joined: 18 May 2012
Posts: 853
Location: Lanarkshire, Scotland.

PostPosted: Sun Sep 28, 2025 12:32 pm    Post subject: %pl[native,external] + plot_mode@ Reply with quote

Paul,

A very quick question.

A %pl[native,external] cannot have a callback and consequently plot_mode@ cannot be used with the [external] option.

Is this correct, or am I missing something?
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Sun Sep 28, 2025 3:44 pm    Post subject: Reply with quote

Ken

At the moment you can't have a callback function with %pl[external] but my comment in the ClearWin+ code has "at least for now". So at the time I must have thought that a callback might be possible and useful.

A parent %gr (for %pl) could possibly have a callback which could then be used for mouse events (in %pl) particularly when [full_mouse_input] is enabled. But I have not experimented with this.
Back to top
View user's profile Send private message AIM Address
Kenneth_Smith



Joined: 18 May 2012
Posts: 853
Location: Lanarkshire, Scotland.

PostPosted: Mon Sep 29, 2025 7:56 pm    Post subject: Reply with quote

Paul,

Thanks for confirming that (at present) %pl[native,external,link=user] is not possible.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Tue Sep 30, 2025 6:52 am    Post subject: Reply with quote

Ken

Could you explain when it might be useful?

At the moment my thinking is that the callback would have to be attached to the parent %gr and one could do that as things are.
Back to top
View user's profile Send private message AIM Address
Kenneth_Smith



Joined: 18 May 2012
Posts: 853
Location: Lanarkshire, Scotland.

PostPosted: Tue Sep 30, 2025 6:18 pm    Post subject: Reply with quote

Paul,

The following code is a very simple example to demonstrate using %gr and %pl[external], and to copy the contents of the hidden %pl[external] over to the visible %gr region.

The question of %pl[external,link=user] which requires a %pl callback stems from this example, simply as the next "improvement". At which point I saw the error message about this particular %pl not being allowed a callback - one which I don't remember seeing before.

Code:
module pl_external1_mod
use clrwin
use mswin
implicit none
integer :: uidgr1=1000, uidgr2=2000, gw=500, gh=500
contains
  integer function start()
  integer :: i, iw, ilw
  real*8 x(20), y(20)

    x = [(i,i=1,20)]
    y = x*x

    iw = winio@('%fn[Tahoma]%ts&',1.5d0)
    iw = winio@('%`gr[green]&',500,500,uidgr1)
    iw = winio@('%lw',ilw)   

    call sleep@(5.0)
   
    i = create_graphics_region@(uidgr2,500,500)
    if (i .ne. 1) STOP 'create_graphics_region@ failed.'
     
    i = select_graphics_object@(uidgr2)
    if (i .ne. 1) STOP 'select_graphics_region@ failed.'
   
    call winop@('%pl[native,x_array,frame,colour=blue,width=3,external]')
    iw = winio@('%pl',20,x,y)
   
    iw = copy_graphics_region@(uidgr1, 0, 0, 500, 500, &
                               uidgr2, 0, 0, 500, 500, srccopy )
                               
    i = delete_graphics_region@(uidgr2)
    if (i .ne. 1) STOP 'delete_graphics_region@ failed.'
     
    start = 1
  end function start
 
end module pl_external1_mod

program pl_external1
use pl_external1_mod
 i = start()
end program pl_external1
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Wed Oct 01, 2025 7:01 am    Post subject: Reply with quote

Ken

I have made a note to review this issue.
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