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 

Scrollable format window?
Goto page Previous  1, 2, 3, 4  Next
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
PaulLaidler
Site Admin


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

PostPosted: Mon Nov 18, 2013 8:42 am    Post subject: Reply with quote

These are all old features (say 15 years old).
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 1983
Location: Sydney

PostPosted: Mon Nov 18, 2013 1:07 pm    Post subject: Reply with quote

Paul,

My version does not recognise "!FTN95$WINAPP" Is this a new compiler control syntax ?

I then get a run-time error "%bb requires button_icon/button_string" at line 30
Is this a consequence of recent changes to %bb ?
Code:
[FTN95/Win32 Ver. 6.10.0 Copyright (c) Silverfrost Ltd 1993-2011]

0001) !FTN95$WINAPP
*** Missing expression
    PROCESSING MODULE  [<VV> FTN95/Win32 v6.10.0]
        1 ERROR  [<CB> FTN95/Win32 v6.10.0]
    NO ERRORS  [<VV> FTN95/Win32 v6.10.0]
    NO ERRORS  [<MAIN> FTN95/Win32 v6.10.0]
[Silverfrost SRC/WIN32 Ver 3.65 Copyright (c) Silverfrost Ltd 2011]
    NO ERRORS  [<SRCTEMP@SRC/WIN32 Ver 3.65]
*** Compilation failed

[FTN95/Win32 Ver. 6.10.0 Copyright (c) Silverfrost Ltd 1993-2011]

    PROCESSING MODULE  [<VV> FTN95/Win32 v6.10.0]
        NO ERRORS  [<CB> FTN95/Win32 v6.10.0]
    NO ERRORS  [<VV> FTN95/Win32 v6.10.0]
    NO ERRORS  [<MAIN> FTN95/Win32 v6.10.0]
[Silverfrost SRC/WIN32 Ver 3.65 Copyright (c) Silverfrost Ltd 2011]
    NO ERRORS  [<SRCTEMP@SRC/WIN32 Ver 3.65]
Creating executable: vv.EXE


I need to get more up to date with the changes to Clearwin+

John
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 1844
Location: Yateley, Hants, UK

PostPosted: Mon Nov 18, 2013 3:48 pm    Post subject: Reply with quote

%vs is documented in CWPLUS.ENH as number 35, as far back as ver 4.2, and we are over 330 now!

CWPLUS.ENH enhancements are sometimes in FTN95.CHM, sometimes not.

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


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

PostPosted: Mon Nov 18, 2013 8:08 pm    Post subject: Reply with quote

Yes %bb is new. Replace it with %bt.
Use WINAPP in place of the comment embedded directive.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Tue Nov 19, 2013 11:28 am    Post subject: Reply with quote

A large part of my sample program could be built into the ClearWin+ library via a new option %ch[vscrollbar]. There is also the potential for a similar horizontal scroll bar.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Fri Nov 22, 2013 11:00 pm    Post subject: Reply with quote

I have uploaded a new ClearWin+ beta to http://www.silverfrost.com/beta/salflibc.exe

This contains new options that provide a window with scrolling controls.

Here is a sample that illustrates how it works...

Code:
!FTN95$WINAPP
program main
  integer ii, ctrl, wd, ht
  !child window with controls...
  ii=winio@("%sh&",ctrl)
  !Add your controls here...
  ii=winio@("Sample containing scrolling child window..&")
  ii=winio@("%3nl%cn%6bb[OK]&")
  ii=winio@("%3nl%cn%6bb[Cancel]")
  !Main window to display child with vertical scroll bar...
  ii=winio@("%ww[no_maxbox]&")
  ii=winio@("%ca[Scroll demo]&")
  wd = 280;  ht = 150
  ii=winio@("%sz&",wd,ht)
  ii=winio@("%ch[vscrollbar]",ctrl)
end program

RESOURCES
1 24 default.manifest
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 1872
Location: South Pole, Antarctica

PostPosted: Sat Nov 23, 2013 7:21 am    Post subject: Reply with quote

Nice! All these features (and now options to set transparency and font and line smoothing I found in the archive) are very welcome. That antialiasing makes 2D scientific graphs look very professional and transparency opens the way to do things before possible only with OpenGL. Scrolling is needed for making more complex GUIs. Just for full happiness would be great also to have few options for scroll bars of different styles/widths and colors like we now see in current mobile applications.

Follow up: Also i noticed that CWP texts became transparent (the ones like i=winio@('Here is some text') ) when they are written on wallpaper textures. A lot of good additions lately!
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 1872
Location: South Pole, Antarctica

PostPosted: Wed Nov 27, 2013 1:26 am    Post subject: Reply with quote

Followup2 The couple problems with this SALFLIBC i found is that older compiled EXEs do not start now with the message "The procedure entry point _export_pcx could not be located in dynamic link library". If i recompile the files all works OK

And another is under investigation (preliminary, the default thickness of the lines equal to one pixel plotted by draw_line@ has been changed to 2 or even 3 or most probably i have an error somewhere because this takes place only on one part of the code)
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Wed Nov 27, 2013 8:06 am    Post subject: Reply with quote

Dan

If you don't manage to fix this problem in your code, can you post a sample to illustrate it.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Thu Nov 28, 2013 8:56 am    Post subject: Reply with quote

I have uploaded a new salflibc.dll (same URL as above).
This brings the GDI+ additions (for smoothing and opacity) up to date.
draw_characters can now use the GDI+ library for rotated text.
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 1872
Location: South Pole, Antarctica

PostPosted: Fri Nov 29, 2013 12:30 am    Post subject: Reply with quote

I was not able to reproduce yet the first mentioned problem (better say annoyance, since after recompilation all works fine. But in the future when some problems will happen with my code and I will try to run older versions of it to find the difference I will need to use older salflibc to run) with export_pcx on smaller program. The second one is most probably my own bug. This latest salflibc does not yet fix some conflict with something in pcx part. Did not looked yet at smoothing and opacity in detail
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 1872
Location: South Pole, Antarctica

PostPosted: Sun Dec 08, 2013 12:42 am    Post subject: Reply with quote

UPDATE

I've ran the example shown in ENH file which adds GDI+ and transparency which works but when i added user_resize to %gr i got just empty screen.

Code:

winapp
program main
include <windows.ins>
c_external nARGB@              '__nargb'(VAL,VAL,VAL,VAL):integer
c_external SET_SMOOTHING_MODE@ '__set_smoothing_mode'(VAL):integer
integer  cb
external cb

!
!  iw = winio@("%pv%^gr[black,full_mouse_input,box_selection,user_resize,rgb_colours,popup]&",450,200, cb)
!  iw = winio@("%pv%gr[black,full_mouse_input,box_selection,rgb_colours,popup]&",450,200)
  iw = winio@("%pv%^gr[user_resize]&",450,200,cb)

  iw = winio@("%ac[esc]&",'exit')
  call draw_line_between@(5,158,440,188,         RGB@(0,20,0))


  call select_font@("Arial")
  call size_in_pixels@(16,0)
!  call italic_font@(1)
  call bold_font@(1)
  call draw_characters@("No antiAlias Smoothing", 65, 200, RGB@(0,20,0,255))

  call set_line_width@(8)
  call set_line_style@(PS_GEOMETRIC+PS_ENDCAP_SQUARE)
  call draw_line_between@(5,4,5,108,  nARGB@(255,0,0,255))
  call draw_line_between@(25,4,25,108,  RGB@(255,0,0))
  call draw_line_between@(5,10,25,10, nARGB@(255,0,255,0))
  call draw_line_between@(5,30,25,30, nARGB@(112,0,255,0))
  call draw_line_between@(5,50,25,50,   RGB@(255,0,255))
  call set_line_style@(PS_GEOMETRIC+PS_ENDCAP_FLAT)
  call set_line_width@(16)
  iw = set_smoothing_mode@(5)        !SmoothingModeAntiAlias8x8
  call draw_line_between@(50,4,150,104,         RGB@(255,0,0))
  call draw_line_between@(150,4,50,104,       nARGB@(192,0,0,255))
  call draw_ellipse@(225,60,50,50,            nARGB@(255,0,255,0))
  call draw_filled_ellipse@(225,60,50,50,     nARGB@(192,255,0,0))
  call draw_rectangle@(320,10,420,110,        nARGB@(255,255,0,0))
  call draw_filled_rectangle@(320,10,420,110, nARGB@(192,0,255,0))
  call set_line_width@(1)
  call draw_line_between@(5,154,440,184,         RGB@(255,0,0))

  call select_font@("Arial")
  call size_in_pixels@(16,0)
!  call italic_font@(1)
  call bold_font@(1)
  call draw_characters@("AntiAlias Smoothing", 65, 150, RGB@(255,0,0,255))

  iw = winio@(" ")
end

  integer function cb()
  cb=1
  end function cb      



Also seems Windows 8 already has all fonts antialiased by default so using AA option does not change anything - or i have done something wrong5,10,25,10, nARGB@
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Sun Dec 08, 2013 10:21 am    Post subject: Reply with quote

As I recall, with %gr[user_resize], you need to do the redrawing in the callback function.
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 1872
Location: South Pole, Antarctica

PostPosted: Sun Dec 08, 2013 3:38 pm    Post subject: Reply with quote

Not sure this is the case here but my another error is definitely present in the code above. Here is modified code with just one line moved up and introduction of %lw. Since it works fine with user_resize my first suspicion was wrong. Well, will try to search for another reason i do not get transparency in my larger code where i have tried to add this transparency feature. And this was actual reason for my post above. Since the change in the code to add GDI+ is mere 2-3 more lines of code plus the substitution of RGB@ to nARGB@, i'm still puzzling where is problem - i get all the plots as if there is no transparency at all. The line AA smoothing works perfect, all curves now look unusually great. Plotting goes slower though, clearly visible with 100 curves plotted simultaneously. Since OpenGL would do that instantly great would be to try to accelerate GDI+ if possible.

(By the way this search in the dark forest is typical for programming with CWP. For example, i just noticed another puzzle -- why %pv does not resize in this demo code? For everyone who wants some warm up in non-normative language try to fix that in less then 1 hour. That is why i lovely call it Swearwin. Smile. Things like %pv happen 10 times per day, so don't actually lose your time to answer that question! )

Code:

winapp
program main
include <windows.ins>
!use clrwin
c_external nARGB@              '__nargb'(VAL,VAL,VAL,VAL):integer
c_external SET_SMOOTHING_MODE@ '__set_smoothing_mode'(VAL):integer
integer  cb
external cb

!
!  iw = winio@("%pv%^gr[black,full_mouse_input,box_selection,user_resize,rgb_colours,popup]&",ix,iy,cb)
!  iw = winio@("%pv%gr[black,full_mouse_input,box_selection,rgb_colours,popup]&",ix,iy,cb)

  ix=450;iy=200
  iw = winio@('%pv%^gr[user_resize]&',ix,iy,cb)
  iw = winio@("%ac[esc]&",'exit')
  iw = winio@("%lw",ilw)

  call draw_line_between@(5,158,440,188,         RGB@(0,20,0))


  call select_font@("Arial")
  call size_in_pixels@(16,0)
  call italic_font@(1)
  call bold_font@(1)
  call draw_characters@("No AntiAlias Smoothing", 165, 200, RGB@(0,20,0))

  call set_line_width@(8)
  call set_line_style@(PS_GEOMETRIC+PS_ENDCAP_SQUARE)
  call draw_line_between@(5,4,5,108,  nARGB@(255,0,0,255))
  call draw_line_between@(25,4,25,108,  RGB@(255,0,0))
  call draw_line_between@(5,10,25,10, nARGB@(255,0,255,0))
  call draw_line_between@(5,30,25,30, nARGB@(112,0,255,0))
  call draw_line_between@(5,50,25,50,   RGB@(255,0,255))
  call set_line_style@(PS_GEOMETRIC+PS_ENDCAP_FLAT)
  call set_line_width@(16)
  iw = set_smoothing_mode@(5)        !SmoothingModeAntiAlias8x8
  call draw_line_between@(50,4,150,104,         RGB@(255,0,0))
  call draw_line_between@(150,4,50,104,       nARGB@(192,0,0,255))
  call draw_ellipse@(225,60,50,50,            nARGB@(255,0,255,0))
  call draw_filled_ellipse@(225,60,50,50,     nARGB@(192,255,0,0))
  call draw_rectangle@(320,10,420,110,        nARGB@(255,255,0,0))
  call draw_filled_rectangle@(320,10,420,110, nARGB@(192,0,255,0))
  call set_line_width@(1)
  call draw_line_between@(5,154,440,184,         RGB@(255,0,0))

  call select_font@("Arial")
  call size_in_pixels@(16,0)
  call italic_font@(1)
  call bold_font@(1)
  call draw_characters@("AntiAlias Smoothing", 165, 156, RGB@(255,0,0,255))


end
  integer function cb()
  cb=1
  end function cb      



Last edited by DanRRight on Mon Dec 09, 2013 2:51 pm; edited 1 time in total
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Mon Dec 09, 2013 9:21 am    Post subject: Reply with quote

I have tried your sample and cannot see any problems.

However, my DLLs are more recent so I have uploaded the new versions to http://www.silverfrost.com/beta/clearwin64.exe and http://www.silverfrost.com/beta/salflibc.exe.

To make the (%pv) pivot effective with %gr you need [metafile_resize] or [user_resize] with a redraw in the callback function.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Goto page Previous  1, 2, 3, 4  Next
Page 2 of 4

 
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