int hb_MaxCol( BOOL bVisible ) { /* See the note about MaxRow(.t.) above */ if( bVisible ) { PHB_GT pGT = hb_gt_Base(); HB_GT_INFO gtInfo; gtInfo.pNewVal = gtInfo.pResult = NULL; assert( pGT ); HB_GTSELF_INFO( pGT, HB_GTI_VIEWPORTWIDTH, >Info ); if( gtInfo.pResult ) { int iMaxCol = hb_itemGetNI( gtInfo.pResult ); hb_itemRelease( gtInfo.pResult ); return iMaxCol; } else { return hb_gtMaxCol(); } } else { return hb_gtMaxCol(); } }
HB_ERRCODE hb_gtInfo( int iType, PHB_GT_INFO pInfo ) { HB_ERRCODE errCode = HB_FAILURE; PHB_GT pGT; HB_TRACE( HB_TR_DEBUG, ( "hb_gtInfo(%d, %p)", iType, pInfo ) ); pGT = hb_gt_Base(); if( pGT ) { if( HB_GTSELF_INFO( pGT, iType, pInfo ) ) errCode = HB_SUCCESS; hb_gt_BaseFree( pGT ); } return errCode; }
int hb_MaxRow( BOOL bVisible ) { /* * if called with logical .T. parameter then return real screen high - 1 * It gives exactly the same result in all standard GT drivers so we * are still Clipper compatible. The difference can appear in some extended * GT drivers which have additional functionality, f.e. CTW GT which * is upper level GT and add CTIII Window support. When it's activated * then MaxRow() will return current window max row and MaxRow(.t.) real * screen (window 0) max row what is the exact behavior of MaxRow() * in CT3, [druzus] */ if( bVisible ) { PHB_GT pGT = hb_gt_Base(); HB_GT_INFO gtInfo; gtInfo.pNewVal = gtInfo.pResult = NULL; assert( pGT ); HB_GTSELF_INFO( pGT, HB_GTI_VIEWPORTHEIGHT, >Info ); if( gtInfo.pResult ) { int iMaxRow = hb_itemGetNI( gtInfo.pResult ); hb_itemRelease( gtInfo.pResult ); return iMaxRow; } else { return hb_gtMaxRow(); } } else { return hb_gtMaxRow(); } }