diff options
Diffstat (limited to 'svtools/source')
-rw-r--r-- | svtools/source/brwbox/brwbox1.cxx | 34 | ||||
-rw-r--r-- | svtools/source/brwbox/brwbox2.cxx | 34 |
2 files changed, 56 insertions, 12 deletions
diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx index 41d1b69f8ed9..8f29fbe5527f 100644 --- a/svtools/source/brwbox/brwbox1.cxx +++ b/svtools/source/brwbox/brwbox1.cxx @@ -2,9 +2,9 @@ * * $RCSfile: brwbox1.cxx,v $ * - * $Revision: 1.12 $ + * $Revision: 1.13 $ * - * last change: $Author: fs $ $Date: 2002-04-11 16:00:16 $ + * last change: $Author: fs $ $Date: 2002-04-11 16:20:41 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -180,7 +180,11 @@ void BrowseBox::Construct( BrowserMode nMode ) bHit = FALSE; bRubber = FALSE; bHideSelect = FALSE; - bHideCursor = FALSE; +#if SUPD<655 + bHideCursor = NO_CURSOR_HIDE; +#else + m_eHideCursorMode = hcNone; +#endif nRowCount = 0; m_bFocusOnlyCursor = TRUE; m_aCursorColor = COL_TRANSPARENT; @@ -2329,7 +2333,29 @@ void BrowseBox::SetMode( BrowserMode nMode ) bKeepHighlight = ( nMode & BROWSER_KEEPSELECTION ) == BROWSER_KEEPSELECTION; bHideSelect = ((nMode & BROWSER_HIDESELECT) == BROWSER_HIDESELECT); - bHideCursor = ((nMode & BROWSER_HIDECURSOR) == BROWSER_HIDECURSOR); + // default: do not hide the cursor at all (untaken scrolling and such) +#if SUPD<655 + bHideCursor = NO_CURSOR_HIDE; +#else + m_eHideCursorMode = hcNone; +#endif + + if ( BROWSER_SMART_HIDECURSOR == ( nMode & BROWSER_SMART_HIDECURSOR ) ) + { // smart cursor hide overrules hard cursor hide +#if SUPD<655 + bHideCursor = SMART_CURSOR_HIDE; +#else + m_eHideCursorMode = hcSmart; +#endif + } + else if ( BROWSER_HIDECURSOR == ( nMode & BROWSER_HIDECURSOR ) ) + { +#if SUPD<655 + bHideCursor = HARD_CURSOR_HIDE; +#else + m_eHideCursorMode = hcAlways; +#endif + } m_bFocusOnlyCursor = ((nMode & BROWSER_CURSOR_WO_FOCUS) == 0); diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx index 7326a4f0ca38..b24a0d3bfce7 100644 --- a/svtools/source/brwbox/brwbox2.cxx +++ b/svtools/source/brwbox/brwbox2.cxx @@ -2,9 +2,9 @@ * * $RCSfile: brwbox2.cxx,v $ * - * $Revision: 1.16 $ + * $Revision: 1.17 $ * - * last change: $Author: fs $ $Date: 2002-04-11 16:01:30 $ + * last change: $Author: fs $ $Date: 2002-04-11 16:20:41 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -405,13 +405,31 @@ void BrowseBox::ToggleSelection( BOOL bForce ) void BrowseBox::DrawCursor() { short nCursorHideCount = GetCursorHideCount(); - BOOL bHidden = bHideCursor || !bSelectionIsVisible || - !IsUpdateMode() || bScrolling || nCurRow < 0; + BOOL bReallyHide = FALSE; +#if SUPD<655 + if ( SMART_CURSOR_HIDE == bHideCursor ) +#else + if ( hcSmart == m_eHideCursorMode ) +#endif + { + if ( !GetSelectRowCount() && !GetSelectColumnCount() ) + bReallyHide = TRUE; + } +#if SUPD<655 + else if ( HARD_CURSOR_HIDE == bHideCursor ) +#else + else if ( hcAlways == m_eHideCursorMode ) +#endif + { + bReallyHide = TRUE; + } + + bReallyHide |= !bSelectionIsVisible || !IsUpdateMode() || bScrolling || nCurRow < 0; if (PaintCursorIfHiddenOnce()) - bHidden |= ( GetCursorHideCount() > 1 ); + bReallyHide |= ( GetCursorHideCount() > 1 ); else - bHidden |= ( GetCursorHideCount() > 0 ); + bReallyHide |= ( GetCursorHideCount() > 0 ); // keine Cursor auf Handle-Column if ( nCurColId == 0 ) @@ -446,14 +464,14 @@ void BrowseBox::DrawCursor() if (m_aCursorColor == COL_TRANSPARENT) { // auf diesem Plattformen funktioniert der StarView-Focus richtig - if ( bHidden ) + if ( bReallyHide ) ((Control*)pDataWin)->HideFocus(); else ((Control*)pDataWin)->ShowFocus( aCursor ); } else { - Color rCol = bHidden ? pDataWin->GetFillColor() : m_aCursorColor; + Color rCol = bReallyHide ? pDataWin->GetFillColor() : m_aCursorColor; Color aOldFillColor = pDataWin->GetFillColor(); Color aOldLineColor = pDataWin->GetLineColor(); pDataWin->SetFillColor(); |