New! Kinetic Scrolling support in FWH 9.08 !!! :-)

New! Kinetic Scrolling support in FWH 9.08 !!! :-)

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 41858
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: New! Kinetic Scrolling support in FWH 9.08 !!! :-)

Postby Marc Vanzegbroeck » Sun Aug 23, 2009 4: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)

Regards,
Marc
Regards,
Marc

FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Re: New! Kinetic Scrolling support in FWH 9.08 !!! :-)

Postby Antonio Linares » Sun Aug 23, 2009 5:01 pm

Marc,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41858
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: New! Kinetic Scrolling support in FWH 9.08 !!! :-)

Postby Antonio Linares » Sun Aug 23, 2009 7:28 pm

Kinetic scrolling for xbrowse demo, as promised :-)
www.fivetechsoft.com/files/kineticx.zip
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41858
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: New! Kinetic Scrolling support in FWH 9.08 !!! :-)

Postby Otto » Sun Aug 23, 2009 7: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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6255
Joined: Fri Oct 07, 2005 7:07 pm

Re: New! Kinetic Scrolling support in FWH 9.08 !!! :-)

Postby Marco Turco » Mon Aug 24, 2009 7: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
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London

Re: New! Kinetic Scrolling support in FWH 9.08 !!! :-)

Postby Antonio Linares » Mon Aug 24, 2009 8: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41858
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: New! Kinetic Scrolling support in FWH 9.08 !!! :-)

Postby Antonio Linares » Mon Aug 24, 2009 8:49 am

Marco,

This is the fix for the tooltip:
Code: Select all  Expand view

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: Select all  Expand view

          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: Select all  Expand view

    @  10,  10  TITLETEXT OF oTitle1 TEXT "FIVEWIN 9.07"  FONT oFont1 /* BRUSH oBrush1 */ COLOR CLR_HRED
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41858
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: New! Kinetic Scrolling support in FWH 9.08 !!! :-)

Postby Marco Turco » 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
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London

Re: New! Kinetic Scrolling support in FWH 9.08 !!! :-)

Postby Daniel Garcia-Gil » 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: Select all  Expand view

          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: Select all  Expand view

      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
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: New! Kinetic Scrolling support in FWH 9.08 !!! :-)

Postby Marco Turco » Mon Aug 24, 2009 1: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
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London

Re: New! Kinetic Scrolling support in FWH 9.08 !!! :-)

Postby Daniel Garcia-Gil » Mon Aug 24, 2009 1:31 pm

Hello Marco

add this clausule

@ x,y TITLE ... COLORBOX CLR_BLACK, CLR_BLACK
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: New! Kinetic Scrolling support in FWH 9.08 !!! :-)

Postby Marco Turco » Mon Aug 24, 2009 2: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
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London

Re: New! Kinetic Scrolling support in FWH 9.08 !!! :-)

Postby Daniel Garcia-Gil » Mon Aug 24, 2009 3:01 pm

Hello Marco...

Fixed...

Please find and replace
Code: Select all  Expand view
        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 )
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: nageswaragunupudi and 65 guests