 |
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
Kenneth_Smith
Joined: 18 May 2012 Posts: 853 Location: Lanarkshire, Scotland.
|
Posted: Sun Sep 28, 2025 12:32 pm Post subject: %pl[native,external] + plot_mode@ |
|
|
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 |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8277 Location: Salford, UK
|
Posted: Sun Sep 28, 2025 3:44 pm Post subject: |
|
|
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 |
|
 |
Kenneth_Smith
Joined: 18 May 2012 Posts: 853 Location: Lanarkshire, Scotland.
|
Posted: Mon Sep 29, 2025 7:56 pm Post subject: |
|
|
Paul,
Thanks for confirming that (at present) %pl[native,external,link=user] is not possible. |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8277 Location: Salford, UK
|
Posted: Tue Sep 30, 2025 6:52 am Post subject: |
|
|
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 |
|
 |
Kenneth_Smith
Joined: 18 May 2012 Posts: 853 Location: Lanarkshire, Scotland.
|
Posted: Tue Sep 30, 2025 6:18 pm Post subject: |
|
|
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 |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8277 Location: Salford, UK
|
Posted: Wed Oct 01, 2025 7:01 am Post subject: |
|
|
Ken
I have made a note to review this issue. |
|
Back to top |
|
 |
|
|
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
|