FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveMac / FivePhone (iPhone, iPad) iconos orden cabecera browse
Posts: 1516
Joined: Thu May 27, 2010 02:06 PM
iconos orden cabecera browse
Posted: Fri Jul 09, 2010 08:59 AM
aun SIN PROBAR :
Code (fw): Select all Collapse
聽HB_FUNC( BRWSETINDICATORDESCENT ) 聽 // obrw:hWnd , nCol 
{
聽 聽NSTableView * browse = ( NSTableView * ) hb_parnl( 1 ); 
聽 [ browse setIndicatorImage : [NSImage imageNamed:@"NSDescendingSortIndicator" ]
聽 聽 inTableColumn: [ [ browse tableColumns ] objectAtIndex : hb_parnl( 2 ) - 1 ] 聽 聽 ] ; 聽 
}

聽HB_FUNC( BRWSETINDICATORASCEND ) 聽// obrw:hWnd , nCol 
{
聽 聽NSTableView * browse = ( NSTableView * ) hb_parnl( 1 ); 
聽 [ browse setIndicatorImage : [NSImage imageNamed:@"NSAscendingSortIndicator" 聽]
聽 聽 inTableColumn: [  [ browse tableColumns ] objectAtIndex : hb_parnl( 2 ) - 1 ] 聽 聽  ] ; 聽 
}

聽HB_FUNC(COLORCREATE)
聽{
聽 NSColor * color = [ [ NSColor alloc ] colorWithCalibratedRed: hb_parnl( 1 ) green: hb_parnl( 2 ) blue: hb_parnl( 3 ) alpha: hb_parnl( 4 ) 聽] ;
聽 hb_retnl( ( LONG ) color );
聽 }

聽HB_FUNC(GRADIENTCREATE)
{
聽NSGradient * gradient = [ [ NSGradient alloc ] initWithStartingColor: (NSColor *)hb_parnl( 1 ) 
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 endingColor: (NSColor *)hb_parnl( 2 ) ];
聽 hb_retnl( ( LONG ) gradient );

} 聽 
聽

聽
聽HB_FUNC( BRWSETBACKGRAUNDCOLOR )
{
聽 聽NSTableView * browse = ( NSTableView * ) hb_parnl( 1 ); 
聽 聽[ browse setBackgroundColor:(NSColor *)hb_parnl( 2 ) ];
聽 
}
Posts: 1516
Joined: Thu May 27, 2010 02:06 PM
Re: iconos orden cabecera browse
Posted: Fri Jul 09, 2010 01:26 PM
El Gradiente no esta aun probado .
Las otras funciones estan corregidas y FUNCIONANDO .
POngo el codigo corregido :

Code (fw): Select all Collapse
HB_FUNC( BRWSETINDICATORDESCENT ) 聽 // obrw:hWnd , nCol
{
聽 聽 NSTableView * browse = ( NSTableView * ) hb_parnl( 1 );
聽 聽 
聽 聽 [ browse setIndicatorImage : 聽[ NSImage imageNamed:@"NSDescendingSortIndicator" ]
聽 聽 聽 聽 聽 聽 聽 聽 聽 inTableColumn: [ [ browse tableColumns ] objectAtIndex : hb_parnl( 2 ) - 1 ] 聽 聽 ] 聽; 聽
}

HB_FUNC( BRWSETSELECTORSTYLE )
{
    NSTableView * browse = ( NSTableView * ) hb_parnl( 1 );
    [ browse setSelectionHighlightStyle: hb_parnl( 2 ) ];   
}

HB_FUNC( BRWSETINDICATORASCEND ) 聽// obrw:hWnd , nCol
{
聽 聽 NSTableView * browse = ( NSTableView * ) hb_parnl( 1 );
聽 聽 [ browse setIndicatorImage : [ NSImage imageNamed:@"NSAscendingSortIndicator" 聽]
聽 聽 聽 聽 聽 聽 聽 聽 聽 inTableColumn: 聽[ [ browse tableColumns ] objectAtIndex : hb_parnl( 2 ) - 1 ] 聽 聽 ] 聽; 聽
}

HB_FUNC(COLORCREATE)
{
聽 聽 NSColor * color = [ 聽NSColor colorWithCalibratedRed: ( hb_parnl(1)/255.0 ) green: ( hb_parnl(2)/255.0 ) blue: 聽( hb_parnl(3)/255.0 ) 聽alpha: 聽( hb_parnl(4)/100.0 ) 聽 ] ;
聽 聽 聽 聽 hb_retnl( ( LONG ) color );
}



HB_FUNC( BRWSETBACKGRAUNDCOLOR )
{
聽 聽 NSTableView * browse = ( NSTableView * ) hb_parnl( 1 );
聽 聽 [ browse setBackgroundColor:(NSColor *)hb_parnl( 2 ) ];
聽 聽 
}
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: iconos orden cabecera browse
Posted: Sat Jul 10, 2010 07:29 AM

Manuel,

Implementados los nuevos m茅todos para el pr贸ximo build, gracias :-)

En cuanto a la funci贸n ColorCreate(), tenemos ya una nRGBColor() que esta en printers.m, junto a otras m谩s para obtener los valores de cada componente.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1516
Joined: Thu May 27, 2010 02:06 PM
Re: iconos orden cabecera browse
Posted: Sat Jul 10, 2010 08:47 AM
Antonio Linares wrote:Manuel,

En cuanto a la funci贸n ColorCreate(), tenemos ya una nRGBColor() que esta en printers.m, junto a otras m谩s para obtener los valores de cada componente.


No las habia visto . Perfecto . Los parametros a pasar en nRGBcolor() numeran tambien de 0 a 255 o son decimales ?
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: iconos orden cabecera browse
Posted: Sun Jul 11, 2010 07:08 AM

Manuel,

La que ya tenemos usa valores decimales. Igual deberiamos cambiarla para que use valores del 0 al 255, como tu has hecho en tu funci贸n.

De momento solo se ha usado en la impresi贸n. Revisa el nuevo ejemplo TestPrn2.prg

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 82
Joined: Mon Jan 19, 2009 04:40 PM
Re: iconos orden cabecera browse
Posted: Fri Jan 11, 2013 04:13 AM

Estimado al compilar testprn2 y testprn
Me envia este msg

duplicate symbol _HB_FUN_SETTEXTCOLOR in:
./../lib/libfivec.a(printers.o)
./../lib/libfivec.a(says.o)
ld: 1 duplicate symbol for architecture x86_64
collect2: ld returned 1 exit status
done!
./build.sh: line 71: ./testprn.app/Contents/MacOS/testprn: No such file or directory
macmini:samples server$

Saludos
Osvaldo Ramirez

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: iconos orden cabecera browse
Posted: Sun Mar 17, 2013 02:37 PM

It is fixed in the most recent FiveMac :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion