iconos orden cabecera browse

iconos orden cabecera browse

Postby mastintin » Fri Jul 09, 2010 8:59 am

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 ) ];
 
}
 
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

Re: iconos orden cabecera browse

Postby mastintin » Fri Jul 09, 2010 1:26 pm

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 ) ];
   
}
 
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

Re: iconos orden cabecera browse

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

Re: iconos orden cabecera browse

Postby mastintin » Sat Jul 10, 2010 8: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 ?
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

Re: iconos orden cabecera browse

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

Re: iconos orden cabecera browse

Postby ramirezosvaldo2 » Fri Jan 11, 2013 4: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
ramirezosvaldo2
 
Posts: 58
Joined: Mon Jan 19, 2009 4:40 pm

Re: iconos orden cabecera browse

Postby Antonio Linares » Sun Mar 17, 2013 2:37 pm

It is fixed in the most recent FiveMac :-)
regards, saludos

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


Return to FiveMac / FivePhone (iPhone, iPad)

Who is online

Users browsing this forum: No registered users and 5 guests