refactor forms classes to use RenderContext

Change-Id: I18026eb4a3784afc84c68c4effdb0c267e31e5db
This commit is contained in:
Tomaž Vajngerl
2015-05-18 11:41:36 +09:00
parent e1b653b173
commit 22fd5e0806
2 changed files with 5 additions and 21 deletions

View File

@@ -20,31 +20,26 @@
#include "richtextviewport.hxx"
#include <editeng/editview.hxx>
namespace frm
{
RichTextViewPort::RichTextViewPort( vcl::Window* _pParent )
:Control ( _pParent )
,m_pView(NULL)
,m_bHideInactiveSelection( true )
: Control ( _pParent )
, m_pView(NULL)
, m_bHideInactiveSelection( true )
{
}
void RichTextViewPort::setView( EditView& _rView )
{
m_pView = &_rView;
SetPointer( _rView.GetPointer() );
}
void RichTextViewPort::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& _rRect )
void RichTextViewPort::Paint( vcl::RenderContext& rRenderContext, const Rectangle& _rRect )
{
m_pView->Paint( _rRect );
m_pView->Paint(_rRect, &rRenderContext);
}
void RichTextViewPort::GetFocus()
{
Control::GetFocus();
@@ -55,7 +50,6 @@ namespace frm
}
}
void RichTextViewPort::LoseFocus()
{
if (m_pView)
@@ -66,7 +60,6 @@ namespace frm
Control::LoseFocus();
}
void RichTextViewPort::KeyInput( const KeyEvent& _rKEvt )
{
if ( !m_pView->PostKeyEvent( _rKEvt ) )
@@ -75,14 +68,12 @@ namespace frm
implInvalidateAttributes();
}
void RichTextViewPort::MouseMove( const MouseEvent& _rMEvt )
{
Control::MouseMove( _rMEvt );
m_pView->MouseMove( _rMEvt );
}
void RichTextViewPort::MouseButtonDown( const MouseEvent& _rMEvt )
{
Control::MouseButtonDown( _rMEvt );
@@ -90,7 +81,6 @@ namespace frm
GrabFocus();
}
void RichTextViewPort::MouseButtonUp( const MouseEvent& _rMEvt )
{
Control::MouseButtonUp( _rMEvt );
@@ -98,7 +88,6 @@ namespace frm
implInvalidateAttributes();
}
void RichTextViewPort::SetHideInactiveSelection( bool _bHide )
{
if ( m_bHideInactiveSelection == _bHide )
@@ -108,10 +97,6 @@ namespace frm
m_pView->SetSelectionMode( m_bHideInactiveSelection ? EE_SELMODE_HIDDEN : EE_SELMODE_STD );
}
} // namespace frm
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@@ -25,7 +25,6 @@ class EditView;
namespace frm
{
class RichTextViewPort : public Control
{
private: