From d64fe4d6c20d25a09461ff668fccc95ff67f4f44 Mon Sep 17 00:00:00 2001 From: lsv Date: Wed, 3 Dec 2025 15:14:56 +0500 Subject: [PATCH] Navigation keys in the context help. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Добавлен по страничный скроллинг (PgDn,PgUp), строчный (Up,Down) и начало,конец текста (Home,End). --- include/utils/popuphelp.h | 8 ++++++++ utils/FunctionPGHelper.cpp | 6 +++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/include/utils/popuphelp.h b/include/utils/popuphelp.h index 921e5ec..d720646 100644 --- a/include/utils/popuphelp.h +++ b/include/utils/popuphelp.h @@ -173,6 +173,14 @@ public: p.y=p.y-50; //this->Move(p); } + if (event.GetKeyCode() == WXK_PAGEDOWN) htmlWindow->ScrollPages(1); + if (event.GetKeyCode() == WXK_PAGEUP) htmlWindow->ScrollPages(-1); + if (event.GetKeyCode() == WXK_DOWN) htmlWindow->ScrollLines(1); + if (event.GetKeyCode() == WXK_UP) htmlWindow->ScrollLines(-1); + if (event.GetKeyCode() == WXK_HOME) htmlWindow->ScrollPages(-1000); + if (event.GetKeyCode() == WXK_END) htmlWindow->ScrollPages(1000); + + }); htmlWindow->Bind(wxEVT_RIGHT_UP, [&](wxMouseEvent& event) { wxString name; diff --git a/utils/FunctionPGHelper.cpp b/utils/FunctionPGHelper.cpp index 3415ec2..204de46 100644 --- a/utils/FunctionPGHelper.cpp +++ b/utils/FunctionPGHelper.cpp @@ -262,6 +262,11 @@ wxString FunctionPGHelper::getSqlCommandHelp(wxString fnd) { wxUniChar sep = wxFileName::GetPathSeparator(); fnd.Replace(" ", ""); wxString f = wxFindFirstFile(path + sep + "sql-" + fnd + "*.html"); + if (f.empty()) { + fnd.Replace("_", "-"); + f = wxFindFirstFile(path + sep + "view-" + fnd + "*.html"); + if (f.empty()) f = wxFindFirstFile(path + sep + "catalog-" + fnd + "*.html"); + } wxString last, txt; int c = 0; @@ -389,7 +394,6 @@ void FunctionPGHelper::loadfile() { body.clear(); path = settings->GetPgHelpPath(); wxString tempDir = path + "_func.txt"; - //tempDir="C:\\Users\\lsv\\Source\\Repos\\wxHtmlhint\\1"; if (!wxFileExists(tempDir)) return; wxTextFile tfile; tfile.Open(tempDir);