|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
DanRRight
Joined: 10 Mar 2008 Posts: 2816 Location: South Pole, Antarctica
|
Posted: Tue Jan 15, 2013 6:55 pm Post subject: Set of thumbnail graphics windows |
|
|
in scrollable side panel AND on the other panel large main graphics window - the structure resembling Powerpoint. Possible?
Last edited by DanRRight on Wed Jan 16, 2013 1:18 pm; edited 1 time in total |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Tue Jan 15, 2013 10:12 pm Post subject: |
|
|
Yes, two %gr regions, the long tall one definitely scrollable. The problem is that only one can take a pivot (%pv), so resizing can only be the thumbnails OR the main image. I suggest that the main image resizes with the pivot. If your thumbnails are just selectable, then change the mouse pointer to the hand with forefinger - with either the default cross or arrow cursor in the main window.
Your problem with the column of thumbnails isn't writing or updating them, or even scrolling them, as that is a matter of getting the offset from the scroll control and shifting the image relative to the thumbnail window - the problem is the reverse process of seeing which thumbnail has been selected with a click!
Eddie |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2816 Location: South Pole, Antarctica
|
Posted: Thu Jan 17, 2013 12:34 am Post subject: |
|
|
So basically the answer fits my experience and is "No" or "Not that simple"...Pity, because this is #1 most desirable and common type of GUI designs - even Plato has it. And let's me tell, if Paul made such template in Visual Clearwin so we'd manipulate such complex projects without programming with just the mouse clicks, Clearwin would be very popular. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Thu Jan 17, 2013 9:09 am Post subject: |
|
|
Thanks for the feedback. I have noted your request. |
|
Back to top |
|
|
jalih
Joined: 30 Jul 2012 Posts: 196
|
Posted: Thu Jan 17, 2013 10:24 am Post subject: Re: |
|
|
LitusSaxonicum wrote: |
Your problem with the column of thumbnails isn't writing or updating them, or even scrolling them, as that is a matter of getting the offset from the scroll control and shifting the image relative to the thumbnail window - the problem is the reverse process of seeing which thumbnail has been selected with a click!
Eddie |
If you handle thumbnails like a simple tile map, the process should be quite straightforward:
Code: |
tilex = (mousex + map_posx)/tilewidth
tiley = (mousey + map_posy)/tileheight
|
For vertical thumbnail row, I would create 1 x num of thumbnails sized tile map and link the map y-offset with a slider control. Drawing thumbnails as map tiles and allow selection with mouse should then be quite straightforward to do.
If my time permits, I can try to write a simple proof of concept in ClearWin+. |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2816 Location: South Pole, Antarctica
|
Posted: Thu Jan 17, 2013 2:38 pm Post subject: |
|
|
I will appreciate all possible solutions. The idea is to expand left panel with more small resizable graphs (ideally all around the main window, but at least in just one stripe like in this pic below which is my present state).
|
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Fri Jan 18, 2013 5:27 pm Post subject: |
|
|
Jalih programs really well - wait for his proof of concept!
What about only one control taking a pivot?
Eddie |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2816 Location: South Pole, Antarctica
|
Posted: Fri Jan 18, 2013 6:26 pm Post subject: |
|
|
That's pity, as well as lack of ability to move the boundary inside %N.Mob/cb. But resize of both windows (or just one while another will still use pivot) together with ob/cb (in the picture above ob/cb are set as invisible) possibly can be solved by resizing windows via API function and using up/down button instead of two pivots. May be |
|
Back to top |
|
|
jalih
Joined: 30 Jul 2012 Posts: 196
|
Posted: Sat Jan 19, 2013 5:28 pm Post subject: |
|
|
Just a quick hack... Is this the kind of interface you are after? : test proggy
No source available yet... I will add proper handling of tilemap with resize capability and then put the program template available for download. |
|
Back to top |
|
|
jalih
Joined: 30 Jul 2012 Posts: 196
|
Posted: Sat Jan 19, 2013 10:37 pm Post subject: |
|
|
No resize capability, but maybe this simple example source helps someone anyway: thumbview.zip |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2816 Location: South Pole, Antarctica
|
Posted: Sun Jan 20, 2013 3:57 am Post subject: |
|
|
Yes, something like that with graphics regions set preferably using winio@('%gr') syntax instead of create_graphics_region@ if possible of course.
May be also just with more standard looking %vx and %tx scroll bars instead of sliders...but your slider is also OK, it can be "painted" later on and be very nice looking. |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2816 Location: South Pole, Antarctica
|
Posted: Sun Feb 24, 2013 12:24 pm Post subject: |
|
|
I got almost all i wanted with this code, only a half of which i succeeded to post due to size restrictions (too small!). If someone will make a post after this one i will be able to post the end of this demo
Code: | winapp
PROGRAM ScrollWin
include <windows.ins>
common /Scroll_/ &
iScrollstep,iScrollVertTotal,iScrollVertRelVal, &
iScrollHorzTotal,iScrollHorzRelVal, &
lwMainParenWin_0Dkin, iHWleftFrameWin, &
iSizeScrollWinVert ,iSizeScrollWinHorz, iscrolDirection
integer key_rb(200), key_No(200)
PARAMETER(N=100)
REAL*8 x(N),y(N)
integer*4 itmpd1,itmpd2
integer iViewVarScrollRadiobut, icb_mouseScroll, empty
external iViewVarScrollRadiobut, icb_mouseScroll, empty
save
!... parameters to make mouse scroll smooth
iscrolDirection = 1
iScrollStep = 1
iScrollVertTotal = 100
iScrollVertRelVal = 0
iScrollHorzTotal = 80
iScrollHorzRelVal = 0
!...initial data for graphs
ixsiz=640; iysiz=480
do i=1,N
x(i)=i-1
y(i)=x(i)**2
enddo
i=winio@('%ca[Scrolling Windows]&')
i=winio@('%ww[no_border]&')
i=winio@('%ob[invisible]&')
i=winio@('%`bg[black]%^vx&',iScrollStep, iScrollVertTotal,&
iScrollVertRelVal, icb_mouseScroll)
i=winio@('%^hx&',iScrollStep, iScrollHorzTotal,&
iScrollHorzRelVal,icb_mouseScroll)
i=winio@('%fr&', 200, 430)
i=winio@('%cb&')
i=winio@('%ob[invisible]%pv&')
! i=winio@('%`^gr[black,box_selection, user_resize,rgb_colours]&',ixsiz, iysiz, ihwblack, empty)
i=winio@('%pl[x_array]&', ixsiz,iysiz, N-4, x, y)
i=winio@('%cb&')
! i=winio@(' %ob[invisible]%nd%nr&')
! do k=1,20
! key_rb(k) = random() + 0.5
! key_No (k) = k
! i=winio@('%`rb[Name of Radiobutton Nonscroll] %`rd%ff&', &
! key_rb(k), key_No (k))
! enddo
! i=winio@('%cb&')
i = winio@('%ac[Esc]&','exit')
i=winio@('%lw',lwMainParenWin_0Dkin)
jj = iViewVarScrollRadiobut()
end
!----------------------------------------------------
integer*4 function icb_mouseScroll()
include <windows.ins>
common /Scroll_/ &
iScrollstep,iScrollVertTotal,iScrollVertRelVal, &
iScrollHorzTotal,iScrollHorzRelVal, &
lwMainParenWin_0Dkin, iHWleftFrameWin, &
iSizeScrollWinVert ,iSizeScrollWinHorz, iscrolDirection
save
ivstep = max(1, iSizeScrollWinVert/iScrollVertTotal )
ihstep = max(1, iSizeScrollWinHorz/iScrollHorzTotal )
iyloc = -iScrollVertRelVal * ivstep
ixloc = -iScrollHorzRelVal * ihstep
call move_window@(iHWleftFrameWin,ixloc,5+iyloc)
icb_mouseScroll=2
end
!-----------------------------------------------------
|
Last edited by DanRRight on Wed Feb 27, 2013 2:57 am; edited 2 times in total |
|
Back to top |
|
|
jalih
Joined: 30 Jul 2012 Posts: 196
|
Posted: Tue Feb 26, 2013 8:26 pm Post subject: Re: |
|
|
DanRRight wrote: | If someone will make a post after this one i will be able to post the end of this demo |
Can you put the whole source available somewhere (pastebin, dropbox,... )?
I have been playing with Win API and have created one version with the resize capability. I am currently trying to use splitter windows to provide a better user interface. |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2816 Location: South Pole, Antarctica
|
Posted: Wed Feb 27, 2013 2:25 am Post subject: |
|
|
I think i will fit it here. (The source code posting limits should be increased, storage and bandwidth technology jumped up and price per stored/transfer bit jumped down by several orders of magnitude in last decade but the limits are the same).
Have to warn you that I also edited the beginning of the file, so take it now, and here is the end. The functionality when you click on small graph at the left and it appears in main window not shown (i have done it in my large and fuzzy real code). The SAVE statement in last function is important. Actually this prototype was gathering dust in my development for decade or more because it glitched. The general trick with always using SAVE with CWP i learned here from Paul just a year ago. May be vertical and horizontal scroll bars realization is also his hint (or someone else here, i don't remember, sorry for Alzheimer don't hesitate to remind me) but will acknowledge that, i pulled a lot of hairs by reaching that !
Code: | integer*4 function iViewVarScrollRadiobut()
include <windows.ins>
common /Scroll_/ &
iScrollstep,iScrollVertTotal,iScrollVertRelVal, &
iScrollHorzTotal,iScrollHorzRelVal, &
lwMainParenWin_0Dkin, iHWleftFrameWin, &
iSizeScrollWinVert ,iSizeScrollWinHorz, iscrolDirection
integer key_rb(200), key_No (200)
PARAMETER(N=100)
REAL*8 x(N),y(N)
integer*4 itmpd1,itmpd2
save ! this SAVE is important, without it radiobuttons hiccup
ixsiz =200; iysiz =150
ixsiz2=170; iysiz2=150
do i=1,N; x(i)=i-1; y(i)=x(i)**2; enddo
i=winio@('%aw&',lwMainParenWin_0Dkin)
i=winio@('%ww[no_border,no_edge,no_caption,no_frame]&')
i=winio@('%nd%nr&')
i=winio@('%1.7ob[raised]&')
i=winio@('%`gr[gray,rgb_colours]&',ixsiz,iysiz,ihwgray)
call draw_text@('Scroll this panel',30,60,rgb@(255,0,0))
i=winio@('%cb&')
i=winio@('%`gr[red,rgb_colours]&',ixsiz,iysiz,ihwRed)
call draw_text@('You can add mouse weel too',5,60,rgb@(0,255,255))
i=winio@('%cb&')
do i=1,N; x(i)=i-1; y(i)=sin(i/30.)**2; enddo
i=winio@('%pl[x_array]&', ixsiz2,iysiz2, N-4, x, y)
i=winio@('%cb&')
i=winio@('%`gr[blue,rgb_colours]&',ixsiz,iysiz,ihwblue)
i=winio@('%cb&')
i=winio@('%`gr[green,rgb_colours]&',ixsiz,iysiz,ihwgreen)
i=winio@('%cb&')
i=winio@('%`gr[gray,rgb_colours]&',ixsiz,iysiz,ihwgray)
i=winio@('%cb&')
do k=1,30
key_rb(k) = random() + 0.5
key_No (k) = k
i=winio@('%`rb[ Scrollable Window Radiobutton No ] %`rd%ff&', &
key_rb(k), key_No (k))
enddo
i=winio@('%cb&')
i=winio@('%hw',iHWleftFrameWin)
call get_window_location@( iHWleftFrameWin, &
itmpd1,itmpd2, iSizeScrollWinHorz, iSizeScrollWinVert)
iViewVarScrollRadiobut=2
end
integer function empty()
empty = 1
end |
|
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2816 Location: South Pole, Antarctica
|
Posted: Mon Apr 01, 2013 5:03 pm Post subject: Color of %VX |
|
|
We tried to move to dark window color scheme and one thing stops that: we failed to make dark scroll bars, because white ones ruin the whole idea. The %'bg instead of changing the color of next control changes color of the window. Can this be done? Here is example
Code: | winapp
include <windows.ins>
integer cb
external cb
save
ixsiz=600;iysiz=500
iscrolDirection = 1
iScrollStep = 1
iScrollVertTotal = 100
iScrollVertRelVal = 0
iScrollHorzTotal = 80
iScrollHorzRelVal = 0
i=winio@('%ca[Scrolling Windows]&')
i=winio@('%ww%bg&',rgb@(25,25,25))
i=winio@('%`bg%^vx&',rgb@(75,25,25),&
iScrollStep, iScrollVertTotal, iScrollVertRelVal,cb)
i=winio@('%^hx&',iScrollStep, &
iScrollHorzTotal, iScrollHorzRelVal,cb)
i=winio@('%fr&', ixsiz,iysiz)
i=winio@('%ac[esc]&','exit')
i=winio@('%pv%gr[black]%ff&',ixsiz,iysiz)
i=winio@('%gr[black]', 2*ixsiz+20,iysiz/2)
end
integer function cb()
cb=1
end function
|
|
|
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
|