summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
Diffstat (limited to 'forms')
-rw-r--r--forms/source/richtext/richtextvclcontrol.cxx16
-rw-r--r--forms/source/richtext/richtextvclcontrol.hxx7
-rw-r--r--forms/source/richtext/richtextviewport.cxx22
-rw-r--r--forms/source/richtext/richtextviewport.hxx8
4 files changed, 44 insertions, 9 deletions
diff --git a/forms/source/richtext/richtextvclcontrol.cxx b/forms/source/richtext/richtextvclcontrol.cxx
index 62bb19ccdd39..308b419c5452 100644
--- a/forms/source/richtext/richtextvclcontrol.cxx
+++ b/forms/source/richtext/richtextvclcontrol.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: richtextvclcontrol.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: rt $ $Date: 2004-05-07 16:14:08 $
+ * last change: $Author: obo $ $Date: 2004-07-05 16:20:40 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -387,6 +387,18 @@ namespace frm
m_pImpl->SetBackgroundColor( _rColor );
}
+ //--------------------------------------------------------------------
+ void RichTextControl::SetHideInactiveSelection( bool _bHide )
+ {
+ m_pImpl->SetHideInactiveSelection( _bHide );
+ }
+
+ //--------------------------------------------------------------------
+ bool RichTextControl::GetHideInactiveSelection() const
+ {
+ return m_pImpl->GetHideInactiveSelection( );
+ }
+
//........................................................................
} // namespace frm
//........................................................................
diff --git a/forms/source/richtext/richtextvclcontrol.hxx b/forms/source/richtext/richtextvclcontrol.hxx
index f57ef73744c7..aea7f86a77ed 100644
--- a/forms/source/richtext/richtextvclcontrol.hxx
+++ b/forms/source/richtext/richtextvclcontrol.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: richtextvclcontrol.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: rt $ $Date: 2004-05-07 16:14:18 $
+ * last change: $Author: obo $ $Date: 2004-07-05 16:20:56 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -170,6 +170,9 @@ namespace frm
void SetReadOnly( bool _bReadOnly );
bool IsReadOnly() const;
+ void SetHideInactiveSelection( bool _bHide );
+ bool GetHideInactiveSelection() const;
+
const EditView& getView() const;
EditView& getView();
diff --git a/forms/source/richtext/richtextviewport.cxx b/forms/source/richtext/richtextviewport.cxx
index 702f773fa7d5..367a18bbc0d5 100644
--- a/forms/source/richtext/richtextviewport.cxx
+++ b/forms/source/richtext/richtextviewport.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: richtextviewport.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: rt $ $Date: 2004-05-07 16:14:29 $
+ * last change: $Author: obo $ $Date: 2004-07-05 16:21:12 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -78,6 +78,7 @@ namespace frm
//--------------------------------------------------------------------
RichTextViewPort::RichTextViewPort( Window* _pParent )
:Control ( _pParent )
+ ,m_bHideInactiveSelection( true )
{
}
@@ -106,7 +107,7 @@ namespace frm
void RichTextViewPort::LoseFocus()
{
m_pView->HideCursor();
- m_pView->SetSelectionMode( EE_SELMODE_HIDDEN );
+ m_pView->SetSelectionMode( m_bHideInactiveSelection ? EE_SELMODE_HIDDEN : EE_SELMODE_STD );
Control::LoseFocus();
}
@@ -142,6 +143,21 @@ namespace frm
implInvalidateAttributes();
}
+ //--------------------------------------------------------------------
+ void RichTextViewPort::SetHideInactiveSelection( bool _bHide )
+ {
+ if ( m_bHideInactiveSelection == _bHide )
+ return;
+ m_bHideInactiveSelection = _bHide;
+ if ( !HasFocus() )
+ m_pView->SetSelectionMode( m_bHideInactiveSelection ? EE_SELMODE_HIDDEN : EE_SELMODE_STD );
+ }
+
+ //--------------------------------------------------------------------
+ bool RichTextViewPort::GetHideInactiveSelection() const
+ {
+ return m_bHideInactiveSelection;
+ }
//........................................................................
} // namespace frm
diff --git a/forms/source/richtext/richtextviewport.hxx b/forms/source/richtext/richtextviewport.hxx
index 8849e34a843a..2dbf07048353 100644
--- a/forms/source/richtext/richtextviewport.hxx
+++ b/forms/source/richtext/richtextviewport.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: richtextviewport.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: rt $ $Date: 2004-05-07 16:14:40 $
+ * last change: $Author: obo $ $Date: 2004-07-05 16:21:30 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -79,6 +79,7 @@ namespace frm
private:
EditView* m_pView;
Link m_aInvalidationHandler;
+ bool m_bHideInactiveSelection;
public:
RichTextViewPort( Window* _pParent );
@@ -87,6 +88,9 @@ namespace frm
inline void setAttributeInvalidationHandler( const Link& _rHandler ) { m_aInvalidationHandler = _rHandler; }
+ void SetHideInactiveSelection( bool _bHide );
+ bool GetHideInactiveSelection() const;
+
protected:
virtual void Paint( const Rectangle& rRect );
virtual void GetFocus();