Control box
Posted: Wed Jul 07, 2010 9:56 am
Sin probar aun :
Code: Select all
HB_FUNC( BOXCREATE )
{
NSBox * box = [ [ NSBox alloc ]
initWithFrame : NSMakeRect( hb_parnl( 2 ), hb_parnl( 1 ), hb_parnl( 3 ), hb_parnl( 4 ) ) ];
NSString * string = [ [ [ NSString alloc ] initWithCString: ISCHAR( 5 ) ? hb_parc( 5 ) : "" ] autorelease ];
NSWindow * window = ( NSWindow * ) hb_parnl( 6 );
[box setBoxType: NSBoxPrimary ];
if ( string != NULL ) [box setTitle : string ];
[ GetView( window ) addSubview : box ];
hb_retnl( ( LONG ) box );
}
HB_FUNC( SEPARATOR )
{
NSBox *Separator=[[NSBox alloc]
initWithFrame:NSMakeRect( hb_parnl( 2 ), hb_parnl( 1 ), hb_parnl( 3 ), hb_parnl( 4 ) ) ];
NSWindow * window = ( NSWindow * ) hb_parnl( 6 );
[Separator setBoxType:NSBoxSeparator];
[ GetView( window ) addSubview : Separator ];
hb_retnl( ( LONG ) Separator );
}