refactor forms classes to use RenderContext
Change-Id: I18026eb4a3784afc84c68c4effdb0c267e31e5db
This commit is contained in:
@@ -20,31 +20,26 @@
|
|||||||
#include "richtextviewport.hxx"
|
#include "richtextviewport.hxx"
|
||||||
#include <editeng/editview.hxx>
|
#include <editeng/editview.hxx>
|
||||||
|
|
||||||
|
|
||||||
namespace frm
|
namespace frm
|
||||||
{
|
{
|
||||||
|
|
||||||
RichTextViewPort::RichTextViewPort( vcl::Window* _pParent )
|
RichTextViewPort::RichTextViewPort( vcl::Window* _pParent )
|
||||||
:Control ( _pParent )
|
: Control ( _pParent )
|
||||||
,m_pView(NULL)
|
, m_pView(NULL)
|
||||||
,m_bHideInactiveSelection( true )
|
, m_bHideInactiveSelection( true )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void RichTextViewPort::setView( EditView& _rView )
|
void RichTextViewPort::setView( EditView& _rView )
|
||||||
{
|
{
|
||||||
m_pView = &_rView;
|
m_pView = &_rView;
|
||||||
SetPointer( _rView.GetPointer() );
|
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()
|
void RichTextViewPort::GetFocus()
|
||||||
{
|
{
|
||||||
Control::GetFocus();
|
Control::GetFocus();
|
||||||
@@ -55,7 +50,6 @@ namespace frm
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void RichTextViewPort::LoseFocus()
|
void RichTextViewPort::LoseFocus()
|
||||||
{
|
{
|
||||||
if (m_pView)
|
if (m_pView)
|
||||||
@@ -66,7 +60,6 @@ namespace frm
|
|||||||
Control::LoseFocus();
|
Control::LoseFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void RichTextViewPort::KeyInput( const KeyEvent& _rKEvt )
|
void RichTextViewPort::KeyInput( const KeyEvent& _rKEvt )
|
||||||
{
|
{
|
||||||
if ( !m_pView->PostKeyEvent( _rKEvt ) )
|
if ( !m_pView->PostKeyEvent( _rKEvt ) )
|
||||||
@@ -75,14 +68,12 @@ namespace frm
|
|||||||
implInvalidateAttributes();
|
implInvalidateAttributes();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void RichTextViewPort::MouseMove( const MouseEvent& _rMEvt )
|
void RichTextViewPort::MouseMove( const MouseEvent& _rMEvt )
|
||||||
{
|
{
|
||||||
Control::MouseMove( _rMEvt );
|
Control::MouseMove( _rMEvt );
|
||||||
m_pView->MouseMove( _rMEvt );
|
m_pView->MouseMove( _rMEvt );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void RichTextViewPort::MouseButtonDown( const MouseEvent& _rMEvt )
|
void RichTextViewPort::MouseButtonDown( const MouseEvent& _rMEvt )
|
||||||
{
|
{
|
||||||
Control::MouseButtonDown( _rMEvt );
|
Control::MouseButtonDown( _rMEvt );
|
||||||
@@ -90,7 +81,6 @@ namespace frm
|
|||||||
GrabFocus();
|
GrabFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void RichTextViewPort::MouseButtonUp( const MouseEvent& _rMEvt )
|
void RichTextViewPort::MouseButtonUp( const MouseEvent& _rMEvt )
|
||||||
{
|
{
|
||||||
Control::MouseButtonUp( _rMEvt );
|
Control::MouseButtonUp( _rMEvt );
|
||||||
@@ -98,7 +88,6 @@ namespace frm
|
|||||||
implInvalidateAttributes();
|
implInvalidateAttributes();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void RichTextViewPort::SetHideInactiveSelection( bool _bHide )
|
void RichTextViewPort::SetHideInactiveSelection( bool _bHide )
|
||||||
{
|
{
|
||||||
if ( m_bHideInactiveSelection == _bHide )
|
if ( m_bHideInactiveSelection == _bHide )
|
||||||
@@ -108,10 +97,6 @@ namespace frm
|
|||||||
m_pView->SetSelectionMode( m_bHideInactiveSelection ? EE_SELMODE_HIDDEN : EE_SELMODE_STD );
|
m_pView->SetSelectionMode( m_bHideInactiveSelection ? EE_SELMODE_HIDDEN : EE_SELMODE_STD );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} // namespace frm
|
} // namespace frm
|
||||||
|
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||||
|
@@ -25,7 +25,6 @@ class EditView;
|
|||||||
|
|
||||||
namespace frm
|
namespace frm
|
||||||
{
|
{
|
||||||
|
|
||||||
class RichTextViewPort : public Control
|
class RichTextViewPort : public Control
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
Reference in New Issue
Block a user