diff options
author | Luke Dixon <6b8b4567@gmail.com> | 2010-11-16 23:37:09 +0000 |
---|---|---|
committer | Jonas Finnemann Jensen <jopsen@gmail.com> | 2010-11-17 22:21:52 +0100 |
commit | 82018908adb34a02f05e76aef8e4fbbb77762288 (patch) | |
tree | aef7c292eb21b2ccf4345bb74bc964221243d704 /starmath/source/view.cxx | |
parent | 8b74b7f9375fe6775add941330bfb052b2059e8d (diff) |
Draw a visible line under the current line in the visual formula editor.
Diffstat (limited to 'starmath/source/view.cxx')
-rw-r--r-- | starmath/source/view.cxx | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index 87edffcbcedc..cb81da206538 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -116,6 +116,7 @@ SmGraphicWindow::SmGraphicWindow(SmViewShell* pShell): SetHelpId(HID_SMA_WIN_DOCUMENT); SetUniqueId(HID_SMA_WIN_DOCUMENT); + ShowLine(false); CaretBlinkInit(); } @@ -224,6 +225,7 @@ void SmGraphicWindow::GetFocus() //Let view shell know what insertions should be done in visual editor pViewShell->SetInsertIntoEditWindow(false); SetIsCursorVisible(true); + ShowLine(true); CaretBlinkStart(); RepaintViewShellDoc(); } @@ -242,6 +244,7 @@ void SmGraphicWindow::LoseFocus() if (!IsInlineEditEnabled()) return; SetIsCursorVisible(false); + ShowLine(false); CaretBlinkStop(); RepaintViewShellDoc(); } @@ -299,6 +302,13 @@ void SmGraphicWindow::ShowCursor(bool bShow) SetIsCursorVisible(bShow); } +void SmGraphicWindow::ShowLine(bool bShow) +{ + if (!IsInlineEditEnabled()) + return; + + bIsLineVisible = bShow; +} void SmGraphicWindow::SetCursor(const SmNode *pNode) { @@ -371,8 +381,8 @@ void SmGraphicWindow::Paint(const Rectangle&) SetFormulaDrawPos(aPoint); if(IsInlineEditEnabled()) { //Draw cursor if any... - if(pViewShell->GetDoc()->HasCursor() && IsCursorVisible()) - pViewShell->GetDoc()->GetCursor().Draw(*this, aPoint); + if(pViewShell->GetDoc()->HasCursor() && IsLineVisible()) + pViewShell->GetDoc()->GetCursor().Draw(*this, aPoint, IsCursorVisible()); } else { SetIsCursorVisible(false); // (old) cursor must be drawn again |