ide: Navigator scope dblclick #1068

git-svn-id: svn://ultimatepp.org/upp/trunk@8725 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2015-07-22 12:38:18 +00:00
parent 4274b258f0
commit e4e022f342
3 changed files with 19 additions and 2 deletions

View file

@ -90,6 +90,7 @@ struct Navigator {
Vector<NavLine> GetNavLines(const NavItem& m);
void Navigate();
void ScopeDblClk();
void NavigatorClick();
void NavigatorEnter();
void SyncLines();

View file

@ -8,8 +8,10 @@
#define LDUMP(x) // DDUMP(x)
#ifndef _DEBUG
#define CLOG(x) // RLOG(x)
#ifdef _DEBUG
#define CLOG(x)
#else
#define CLOG(x) RLOG(x)
#endif
#define CPP_CODEBASE_VERSION 314159

View file

@ -74,6 +74,7 @@ Navigator::Navigator()
scope.AddColumn().SetDisplay(Single<ScopeDisplay>());
scope.NoWantFocus();
scope.WhenSel = THISBACK(Scope);
scope.WhenLeftDouble = THISBACK(ScopeDblClk);
list.NoHeader();
list.AddRowNumColumn().SetDisplay(navidisplay);
@ -258,6 +259,19 @@ void Navigator::Navigate()
navigating = false;
}
void Navigator::ScopeDblClk()
{
if(!scope.IsCursor())
return;
String h = scope.GetKey();
if((byte)*h == 0xff)
theide->GotoPos(h.Mid(1), 1);
else {
list.GoBegin();
Navigate();
}
}
void Navigator::NavigatorClick()
{
if(dlgmode)