FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour New! Kinetic Scrolling support in FWH 9.08 !!! :-)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
New! Kinetic Scrolling support in FWH 9.08 !!! :-)
Posted: Sun Aug 23, 2009 10:51 AM

FWH 9.08 implements Kinetic Scrolling in Classes TWBrowse and TXBrowse :-)

What is it the "Kinetic Scrolling" ?
It is the modern and so popular way to manage lists implemented by the iPhone! :-)

Your users are going to discover a new, very intuitive and revolutionary way to "move" the browses as "physical" objects:
Simply grab the browse and move it and/or throw it with a speed and acceleration! See the browses run and slow down progressively!

Kinetic Scrolling on browses requires a little training for your users, but once they get used to it, they will love it :-)
Really nice and usefull and no changes required at all in your applications! Simply use FWH 9.08 and all your browses will have kinetic scrolling support! :-D

Download a WBrowse working demo:

http://www.fivetechsoft.com/files/kineticw.zip

Next demo for XBrowse...

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
Re: New! Kinetic Scrolling support in FWH 9.08 !!! :-)
Posted: Sun Aug 23, 2009 04:00 PM
Antonio,

Very nice, but one time I had this error in the demo :-)

    Application
    ===========
    Path and name: C:\Users\Marc\AppData\Local\Temp\kineticw.exe (32 bits)
    Size: 1,780,736 bytes
    Time from start: 0 hours 0 mins 2 secs
    Error occurred at: 08/23/09, 17:57:31
    Error description: Error BASE/1132 Bound error: array access
    Args:
    [ 1] = A { ... }
    [ 2] = N -3

    Stack Calls
    ===========
    Called from: C:\FWTEAM\samples\kineticw.prg => (b)MAIN(32)
    Called from: .\source\classes\WBROWSE.PRG => (b)TWBROWSE(147)
    Called from: .\source\classes\WBROWSE.PRG => TWBROWSE:DRAWLINE(0)
    Called from: .\source\classes\WBROWSE.PRG => TWBROWSE:GOUP(902)
    Called from: .\source\classes\WBROWSE.PRG => TWBROWSE:MOUSEMOVE(2080)
    Called from: => TWINDOW:HANDLEEVENT(0)
    Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT(1453)
    Called from: .\source\classes\WBROWSE.PRG => TWBROWSE:HANDLEEVENT(1638)
    Called from: .\source\classes\WINDOW.PRG => _FWH(3333)
    Called from: => WINRUN(0)
    Called from: .\source\classes\WINDOW.PRG => TWINDOW:ACTIVATE(952)
    Called from: C:\FWTEAM\samples\kineticw.prg => MAIN(38)[/list:u]

    Regards,
    Marc
Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: New! Kinetic Scrolling support in FWH 9.08 !!! :-)
Posted: Sun Aug 23, 2009 05:01 PM

Marc,

Yes, thanks, we are already cheking it :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: New! Kinetic Scrolling support in FWH 9.08 !!! :-)
Posted: Sun Aug 23, 2009 07:28 PM

Kinetic scrolling for xbrowse demo, as promised :-)

www.fivetechsoft.com/files/kineticx.zip

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: New! Kinetic Scrolling support in FWH 9.08 !!! :-)
Posted: Sun Aug 23, 2009 07:54 PM

Hello Antonio,

Kinetic scrolling will become a nice feature.

I noticed that if xBrowse record selected line is one and you “kinetic scroll” down the first row changes to blue and the text is no longer visible.

Best regards,
Otto

Posts: 858
Joined: Fri Oct 07, 2005 12:00 PM
Re: New! Kinetic Scrolling support in FWH 9.08 !!! :-)
Posted: Mon Aug 24, 2009 07:32 AM

It look really nice. Great work Antonio !!

However there are still some bugs into the previous released class (ttitle and rbbutton),
could be possible to solve those problems ASAP in order to use "at the better way" those classes ?

The bugs are:
- the rbbutton tooltips doesn't runs
- the color clause in titletext doesn't runs
- there is an alignment problem using rbbuttons on ttitle when the rbbutton prompt text is not present

This is an image that show these problems: www.softwarexp.co.uk/beta/ttitle.png
and this is its self contained sample that show the problems

include "fivewin.ch"

include "ttitle.ch"

include "ribbon.ch"

Function main()

local oWnd
local oTitle1, oTitle2, oTitle3, oTitle4, oTitle5
local oBrush1, oBrush2, oBrush3, oBrush4
LOCAL oFont1, oFont2, oFont3
local oBtn

DEFINE WINDOW oWnd TITLE "TTitle Class Test"

@ 015,150 TITLE oTitle1 size 330, 50 of oWnd SHADOW SHADOWSIZE 0 color clr_white
oTitle1:aGrdBack = { { 1, nRGB( 251, 230, 148 ), nRGB( 238, 149, 21 ) } }
oTitle1:lRound:=.f.
oTitle1:lBorder:=.t.
@ 18, 50 TITLETEXT OF oTitle1 TEXT "Some texts" color clr_white

@ 0, 210 RBBTN oBtn1 OF oTitle1 BITMAP "k:\pigc\image\24exit.bmp";
SIZE 100, 50 PROMPT "Text " TRANSPARENT MOSTLEFT TOOLTIP "Test"

@ 066,150 TITLE oTitle2 size 330, 50 of oWnd SHADOW SHADOWSIZE 0
oTitle2:aGrdBack = { { 1, nRGB( 203, 225, 252 ), nRGB( 125, 165, 224 ) } }
oTitle2:lRound:=.f.
oTitle2:lBorder:=.t.
oTitle2:Refresh()

@ 0, 210 RBBTN oBtn OF oTitle2 BITMAP "k:\pigc\image\24exit.bmp";
SIZE 100, 50 PROMPT "" TRANSPARENT MOSTLEFT TOOLTIP "Test";

activate window oWnd maximized

return nil

?
.

quote="Antonio Linares"]Kinetic scrolling for xbrowse demo, as promised :-)

http://www.fivetechsoft.com/files/kineticx.zip[/quote]

Best Regards,



Marco Turco

SOFTWARE XP LLP
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: New! Kinetic Scrolling support in FWH 9.08 !!! :-)
Posted: Mon Aug 24, 2009 08:34 AM

Marco,

> the rbbutton tooltips doesn't runs

We have provided a fix here in the forums to solve it. Simply call Super:MouseMove( ... ) from final return in Method MouseMove() Class TRBtn.

We are working to fix the other two issues, thanks

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: New! Kinetic Scrolling support in FWH 9.08 !!! :-)
Posted: Mon Aug 24, 2009 08:49 AM
Marco,

This is the fix for the tooltip:
Code (fw): Select all Collapse
METHOD MouseMove( nRow, nCol, nKeyFlags ) CLASS TRBtn
...
return Super:MouseMove( nRow, nCol, nKeyFlags )

This is the fix for the Title text colors:
Class TTitle line 805:
Code (fw): Select all Collapse
          nOldClr = SetTextColor( ::hDC, ::aText[ n, TI_TEXTCLR ] )
                
          TextOut( ::hDC,;
                     nRow-1, ;
                     nCol-1, ;
                     ::aText[ n, TI_TEXT ], ;
                     Len( ::aText[ n, TI_TEXT ] ) )

          SetTextColor( ::hDC, nOldClr )

This code works fine now:
Code (fw): Select all Collapse
    @  10,  10  TITLETEXT OF oTitle1 TEXT "FIVEWIN 9.07"  FONT oFont1 /* BRUSH oBrush1 */ COLOR CLR_HRED
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 858
Joined: Fri Oct 07, 2005 12:00 PM
Re: New! Kinetic Scrolling support in FWH 9.08 !!! :-)
Posted: Mon Aug 24, 2009 10:18 AM

Hi Antonio,
the trbbutton's tooltips runs well. Thanks.

About the TITLETEXT, the color problem still appairs.
Pls. take a look to this minimal self-contained sample that show the problem.
The TITLETEXT appairs in grey instead of white. See www.softwarexp.co.uk/beta/test.png

Any ideas ?

Thanks in advance.

include "fivewin.ch"

include "ttitle.ch"

include "colors.ch"

Function main()

local oWnd
local oTitle1,oFontTitles


DEFINE FONT oFontTitles  NAME "Verdana" SIZE 0, -16 BOLD

DEFINE WINDOW oWnd TITLE "TTitle Class Test"

@ 015,150 TITLE oTitle1 size 330, 50 of oWnd SHADOW SHADOWSIZE 0
oTitle1:aGrdBack = { { 1, nRGB( 251, 230, 148 ), nRGB( 238, 149, 21 ) } }
@  18,  50  TITLETEXT OF oTitle1 TEXT "Some texts" FONT oFontTitles COLOR CLR_WHITE

activate window oWnd maximized

oFontTitles:End()

return nil

Best Regards,



Marco Turco

SOFTWARE XP LLP
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: New! Kinetic Scrolling support in FWH 9.08 !!! :-)
Posted: Mon Aug 24, 2009 10:52 AM
Hello Marco

Marco Turco wrote:
- the color clause in titletext doesn't runs


Open TTitle.prg and ocate Last TextOut, write after and before...
Code (fw): Select all Collapse
          nOldClr = SetTextColor( ::hDC, ::aText[ n, TI_TEXTCLR ] )
                
          TextOut( ::hDC,;
                     nRow-1, ;
                     nCol-1, ;
                     ::aText[ n, TI_TEXT ], ;
                     Len( ::aText[ n, TI_TEXT ] ) )

          SetTextColor( ::hDC, nOldClr )


Marco Turco wrote:
- there is an alignment problem using rbbuttons on ttitle when the rbbutton prompt text is not present


Open TRBTN.PRG
Locate this IF and change with
Code (fw): Select all Collapse
      if ! Empty( hBmp )
         if Empty( cCaption )
            nBmpTop = ::nHeight / 2 - nBmpHeight / 2
         endif
         if SetAlpha() .and. ::lAlpha
            ABPaint( ::hDC, nBmpLeft, nBmpTop, hBmp, ::nAlphaLevel() )
         else
            nOldClr = SetBkColor( ::hDC, nRGB( 255, 255, 255 ) )
            TransBmp( hBmp, nBmpWidth, nBmpHeight, nZeroZeroClr, ::hDC,;
                      If( ::lAdjust, 0, nBmpLeft ), ;
                      If( ::lAdjust, 0, nBmpTop ),;
                      If(::lAdjust, ::nWidth, nBmpWidth ) ,;
                      If( ::lAdjust, ::nHeight, nBmpHeight ) )
           SetBkColor( ::hDC, nOldClr )
         endif
      endif


This change was implemented on FWH 9.08
Posts: 858
Joined: Fri Oct 07, 2005 12:00 PM
Re: New! Kinetic Scrolling support in FWH 9.08 !!! :-)
Posted: Mon Aug 24, 2009 01:20 PM

Ok. Solved. Thank you very much Daniel.

Do you also know if is it possible to have a black border around the title ?
Something like this .. www.softwarexp.co.uk/beta/title_border.png

Best Regards,



Marco Turco

SOFTWARE XP LLP
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: New! Kinetic Scrolling support in FWH 9.08 !!! :-)
Posted: Mon Aug 24, 2009 01:31 PM

Hello Marco

add this clausule

@ x,y TITLE ... COLORBOX CLR_BLACK, CLR_BLACK

Posts: 858
Joined: Fri Oct 07, 2005 12:00 PM
Re: New! Kinetic Scrolling support in FWH 9.08 !!! :-)
Posted: Mon Aug 24, 2009 02:11 PM

Hi,
I think there is a bug.

It runs but only with lRound:=.t.,
using lRound:=.f. the border is not complete.

This sample show the problem:

include "fivewin.ch"

include "ttitle.ch"

include "ribbon.ch"

include "COLORS.ch"

Function main()

local oWnd
local oTitle1, oTitle2, oTitle3, oTitle4, oTitle5
local oBrush1, oBrush2, oBrush3, oBrush4
LOCAL oFont1, oFont2, oFont3
local oBtn


DEFINE WINDOW oWnd TITLE "TTitle Class Test"

@ 015,150 TITLE oTitle1 size 330, 50 of oWnd SHADOWSIZE 0 COLORBOX CLR_BLACK,CLR_BLACK
oTitle1:aGrdBack = { { 1, nRGB( 251, 230, 148 ), nRGB( 238, 149, 21 ) } }
oTitle1:lROUND:=.F.
oTitle1:lBorder:=.t.

activate window oWnd maximized

oGenFont:End()

return nil

Best Regards,



Marco Turco

SOFTWARE XP LLP
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: New! Kinetic Scrolling support in FWH 9.08 !!! :-)
Posted: Mon Aug 24, 2009 03:01 PM
Hello Marco...

Fixed...

Please find and replace
Code (fw): Select all Collapse
         WndBox2007( ::hDC, aRect[ 1 ] + ::nXOffSetTitle + 1, ;
                            aRect[ 2 ] + ::nYOffSetTitle + 1, ;
                            aRect[ 3 ] - ::nXOffSetTitle - 1 + nAdjustShadow,;
                            aRect[ 4 ] - ::nYOffSetTitle - 1 + nAdjustShadow, ::nClrLine2 )

         WndBox2007( ::hDC, aRect[ 1 ] + ::nXOffSetTitle, ;
                            aRect[ 2 ] + ::nYOffSetTitle, ;
                            aRect[ 3 ] - ::nXOffSetTitle - 1 + nAdjustShadow,;
                            aRect[ 4 ] - ::nYOffSetTitle - 1 + nAdjustShadow, ::nClrLine1 )

Continue the discussion