1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
CContentsView::CContentsView()
:
m_bFont( FALSE ),
m_nLineHeight( 8 ), m_nAvgCharWidth( 8 ),
m_nHorizOffset( 0 ), m_dwInternational( CHAR_ENGLISH ),
m_pszBuffer( NULL ),
m_pszCursor( NULL ),
m_pszStartSel( NULL ),
m_pszTopOfView( NULL ),
m_pszMouseDown( NULL ),
m_pszLastMouse( NULL ),
m_nWheelMoves( 0 ),
m_bDoubleClick( FALSE ),
m_bOutline( FALSE ),
m_bHideHtml( TRUE ),
m_nWordWrap( 80 ),
m_nTabWidth( 4)
{
int nOutline = regGetInt( HKEY_CURRENT_USER,"Contents View", "Outline", 1 );
m_bOutline = (nOutline != 0);
int nHideHtml = regGetInt( HKEY_CURRENT_USER,"Contents View", "HideHtml", 1 );
m_bHideHtml = (nHideHtml != 0);
int nNotFoundAtTop = regGetInt( HKEY_CURRENT_USER,"Contents View", "NotFoundAtTop", 1 );
m_bNotFoundAtTop = (nNotFoundAtTop != 0 );
setCharMask();
// set the printable non alphabetic characters
memset( m_bNonAlphaChar, 0, 256 * sizeof( bool ) );
m_bNonAlphaChar[ 9 ] = true; // horizontal tab
for( int i = 32; i <= 47; i++ )
m_bNonAlphaChar[ i ] = true;
for( i = 58; i <= 64; i++ )
m_bNonAlphaChar[ i ] = true;
for( i = 91; i <= 96; i++ )
m_bNonAlphaChar[ i ] = true;
for( i = 123; i <= 126; i++ )
m_bNonAlphaChar[ i ] = true;
for( i = 130; i <= 137; i++ )
m_bNonAlphaChar[ i ] = true;
m_bNonAlphaChar[ 139 ];
for( i = 145; i <= 153; i++ )
m_bNonAlphaChar[ i ] = true;
m_bNonAlphaChar[ 155 ] = true;
} |