Developing T++ annotations

git-svn-id: svn://ultimatepp.org/upp/trunk@559 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2008-10-21 22:31:04 +00:00
parent 6532cf1694
commit e1f7351e1f
10 changed files with 77 additions and 19 deletions

View file

@ -161,8 +161,10 @@ void EditorBar::MouseMove(Point p, dword flags)
int pa = active_annotation;
if(p.x > GetSize().cx - annotations)
active_annotation = p.y / editor->GetFont().Info().GetHeight() + editor->GetScrollPos().y;
if(active_annotation >= editor->GetLineCount())
active_annotation = -1;
else
active_annotation = -1;
if(active_annotation >= editor->GetLineCount())
active_annotation = -1;
if(pa != active_annotation)
WhenAnnotationMove();
if(editor)
@ -179,6 +181,9 @@ void EditorBar::MouseLeave()
void EditorBar::LeftDown(Point p, dword flags)
{
if(p.x > GetSize().cx - annotations)
WhenAnnotationClick();
else
if(editor)
editor->LeftDown(Point(0, p.y), flags);
}