示例#1
0
// --------------------------------------------------------------------------------------
//  pxWindowTextWriter  Implementations
// --------------------------------------------------------------------------------------
pxWindowTextWriter::pxWindowTextWriter( wxDC& dc )
	: m_dc( dc )
{
	m_curpos = wxPoint();
	m_align = wxALIGN_CENTER;
	m_leading = 0;

	OnFontChanged();
}
示例#2
0
//************************************************************************
// CLCDInput::OnSizeChanged
//************************************************************************
void CLCDInput::OnSizeChanged(SIZE OldSize)
{
	// if the width has changed, offsets need to be recalculated
	if(GetWidth() != OldSize.cx)
		OnFontChanged();
	// otherwise, just update scrollbar & linecount
	else if(m_pScrollbar)
	{
		m_iLineCount = GetHeight() / m_iFontHeight;
		m_pScrollbar->SetSliderSize(m_iLineCount);
	}
}
示例#3
0
CEditView::CEditView( CEdit *pCtrl, CBuffer *pBuffer, int nLeftIndex, int nTopIndex )
{
	m_pCtrl = pCtrl;
	m_hWndView = pCtrl->GetWindow();
	m_pBuffer = pBuffer;
	SetRectEmpty( &m_rcAll );
	SetRectEmpty( &m_rcView );
	m_hWndHScroll = m_hWndVScroll = NULL;
	m_nBottomIndex = m_nRightIndex = m_nBottomIndexFullyVisible = m_nRightIndexFullyVisible = 0;
	m_nLeftIndex = nLeftIndex;
	m_nTopIndex = nTopIndex;
	m_nLineDamageStart = MAXROW;
	m_nLineDamageEnd = -1;
	m_nEditLevel = 0;
	if ( !m_bInit )
	{
		CharFill( m_szSpace, _T(' '), CBuffer::MAX_TABSIZE );
		m_bInit = TRUE;
	}
	OnFontChanged( pCtrl->GetFont( FALSE ), pCtrl->GetCharWidth() );
}