Page 1 of 1

iconos orden cabecera browse

PostPosted: Fri Jul 09, 2010 8:59 am
by mastintin
aun SIN PROBAR :
Code: Select all  Expand view

 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 ) ];
 
}
 

Re: iconos orden cabecera browse

PostPosted: Fri Jul 09, 2010 1:26 pm
by mastintin
El Gradiente no esta aun probado .
Las otras funciones estan corregidas y FUNCIONANDO .
POngo el codigo corregido :

Code: Select all  Expand view


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 ) ];
   
}
 

Re: iconos orden cabecera browse

PostPosted: Sat Jul 10, 2010 7:29 am
by Antonio Linares
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.

Re: iconos orden cabecera browse

PostPosted: Sat Jul 10, 2010 8:47 am
by mastintin
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 ?

Re: iconos orden cabecera browse

PostPosted: Sun Jul 11, 2010 7:08 am
by Antonio Linares
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

Re: iconos orden cabecera browse

PostPosted: Fri Jan 11, 2013 4:13 am
by ramirezosvaldo2
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

Re: iconos orden cabecera browse

PostPosted: Sun Mar 17, 2013 2:37 pm
by Antonio Linares
It is fixed in the most recent FiveMac :-)