See ChangeLog entry 2000-11-28 17:15 UTC-0400 David G. Holm <dholm@jsd-llc.com>
This commit is contained in:
@@ -1,3 +1,14 @@
|
||||
2000-11-28 17:15 UTC-0400 David G. Holm <dholm@jsd-llc.com>
|
||||
* include/hbapigt.h
|
||||
+ Added non-DOS definitions of box drawing characters and strings.
|
||||
* source/rtl/oldbox.c
|
||||
% Changed to use same method to test and use numeric parameters as
|
||||
that used by source/rtl/box.c.
|
||||
* tests/boxtest.prg
|
||||
+ Added display of box drawing statement used following each box
|
||||
draw, along with a wait for user input. Removed comment about
|
||||
the first __BOX() call not doing anything, because it does...
|
||||
|
||||
2000-11-28 11:40 UTC+0800 Brian Hays <bhays@abacuslaw.com>
|
||||
* contrib/rdd_ads/ads1.c
|
||||
* fixed retrieval of logical values
|
||||
|
||||
@@ -75,6 +75,7 @@ extern "C" {
|
||||
#define HB_CLR_MAX_ HB_CLR_UNSELECTED
|
||||
|
||||
/* strings for borders (same as box.ch, but defined for use by C) */
|
||||
#ifdef HB_OS_DOS
|
||||
/*01234567*/
|
||||
#define _B_SINGLE "ÚÄ¿³ÙÄÀ³"
|
||||
#define _B_DOUBLE "ÉÍ»º¼ÍȺ"
|
||||
@@ -84,6 +85,16 @@ extern "C" {
|
||||
#define HB_B_SINGLE_H 'Ä'
|
||||
#define HB_B_DOUBLE_V 'º'
|
||||
#define HB_B_DOUBLE_H 'Í'
|
||||
#else
|
||||
#define _B_SINGLE "\xda\xc4\xbf\xb3\xd9\xc4\xc0\xb3"
|
||||
#define _B_DOUBLE "\xc9\xcd\xbb\xba\xbc\xcd\xc8\xba"
|
||||
#define _B_SINGLE_DOUBLE "\xd6\xc4\xb7\xba\xbd\xc4\xd3\xba"
|
||||
#define _B_DOUBLE_SINGLE "\xd5\xcd\xb8\xb3\xbe\xcd\xd4\xb3"
|
||||
#define HB_B_SINGLE_V '\xb3'
|
||||
#define HB_B_SINGLE_H '\xc4'
|
||||
#define HB_B_DOUBLE_V '\xb3'
|
||||
#define HB_B_DOUBLE_H '\xc4'
|
||||
#endif
|
||||
|
||||
/* Used to tell hb_gt_SetPos() when the cursor position
|
||||
is being set. Before or after text is or was displayed.
|
||||
|
||||
@@ -33,27 +33,53 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "hbapi.h"
|
||||
#include "hbapigt.h"
|
||||
#include "hbapiitm.h"
|
||||
|
||||
#ifdef HB_C52_UNDOC
|
||||
|
||||
HB_FUNC( __BOX )
|
||||
{
|
||||
if( ISNUM( 1 ) && ISNUM( 2 ) && ISNUM( 3 ) && ISNUM( 4 ) )
|
||||
hb_gtBox( hb_parni( 1 ), hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ),
|
||||
( BYTE * ) ( ISCHAR( 5 ) ? hb_parc( 5 ) : " " ) );
|
||||
PHB_ITEM pTop = hb_param( 1, HB_IT_NUMERIC );
|
||||
PHB_ITEM pLeft = hb_param( 2, HB_IT_NUMERIC );
|
||||
PHB_ITEM pBottom = hb_param( 3, HB_IT_NUMERIC );
|
||||
PHB_ITEM pRight = hb_param( 4, HB_IT_NUMERIC );
|
||||
|
||||
if( pTop && pLeft && pBottom && pRight )
|
||||
hb_gtBox( hb_itemGetNI( pTop ),
|
||||
hb_itemGetNI( pLeft),
|
||||
hb_itemGetNI( pBottom ),
|
||||
hb_itemGetNI( pRight ),
|
||||
( BYTE * ) ( ISCHAR( 5 ) ? hb_parc( 5 ) : " " ) );
|
||||
}
|
||||
|
||||
HB_FUNC( __BOXD )
|
||||
{
|
||||
if( ISNUM( 1 ) && ISNUM( 2 ) && ISNUM( 3 ) && ISNUM( 4 ) )
|
||||
hb_gtBoxD( hb_parni( 1 ), hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ) );
|
||||
PHB_ITEM pTop = hb_param( 1, HB_IT_NUMERIC );
|
||||
PHB_ITEM pLeft = hb_param( 2, HB_IT_NUMERIC );
|
||||
PHB_ITEM pBottom = hb_param( 3, HB_IT_NUMERIC );
|
||||
PHB_ITEM pRight = hb_param( 4, HB_IT_NUMERIC );
|
||||
|
||||
if( pTop && pLeft && pBottom && pRight )
|
||||
hb_gtBoxD( hb_itemGetNI( pTop ),
|
||||
hb_itemGetNI( pLeft),
|
||||
hb_itemGetNI( pBottom ),
|
||||
hb_itemGetNI( pRight ) );
|
||||
}
|
||||
|
||||
HB_FUNC( __BOXS )
|
||||
{
|
||||
if( ISNUM( 1 ) && ISNUM( 2 ) && ISNUM( 3 ) && ISNUM( 4 ) )
|
||||
hb_gtBoxS( hb_parni( 1 ), hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ) );
|
||||
PHB_ITEM pTop = hb_param( 1, HB_IT_NUMERIC );
|
||||
PHB_ITEM pLeft = hb_param( 2, HB_IT_NUMERIC );
|
||||
PHB_ITEM pBottom = hb_param( 3, HB_IT_NUMERIC );
|
||||
PHB_ITEM pRight = hb_param( 4, HB_IT_NUMERIC );
|
||||
|
||||
if( pTop && pLeft && pBottom && pRight )
|
||||
hb_gtBoxS( hb_itemGetNI( pTop ),
|
||||
hb_itemGetNI( pLeft),
|
||||
hb_itemGetNI( pBottom ),
|
||||
hb_itemGetNI( pRight ) );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -7,11 +7,25 @@ function main()
|
||||
CLS
|
||||
|
||||
@ 0, 0, 15, 50 BOX " " COLOR "W+/B"
|
||||
__BOX( 1, 1, 5, 7 ) // This does nothing
|
||||
__BOX( 1, 1, 5, 7, "" )
|
||||
__BOXD( 2, 2, 6, 8 )
|
||||
__BOXS( 3, 3, 7, 9 )
|
||||
MESSAGE( [@ 0, 0, 15, 50 BOX " " COLOR "W+/B"] )
|
||||
|
||||
DevPos( 12, 1 )
|
||||
__BOX( 1, 1, 5, 7 )
|
||||
MESSAGE( [__BOX( 1, 1, 5, 7 )] )
|
||||
|
||||
__BOX( 1, 1, 5, 7, "X" )
|
||||
MESSAGE( [__BOX( 1, 1, 5, 7, "X" )] )
|
||||
|
||||
__BOXD( 2, 2, 6, 8 )
|
||||
MESSAGE( [__BOXD( 2, 2, 6, 8 )] )
|
||||
|
||||
__BOXS( 3, 3, 7, 9 )
|
||||
MESSAGE( [__BOXS( 3, 3, 7, 9 )] )
|
||||
|
||||
return nil
|
||||
|
||||
procedure MESSAGE( cText )
|
||||
@ 16,0 CLEAR TO 16,79
|
||||
@ 16,0 SAY cText
|
||||
OUTSTD( CHR( 7 ) )
|
||||
INKEY( 0 )
|
||||
return
|
||||
Reference in New Issue
Block a user