Scintilla: Added PageUp/Down support.

This commit is contained in:
Branimir Karadžić 2015-07-18 00:30:46 -07:00
parent a7b6d06cd4
commit 0d6b83055f
3 changed files with 15 additions and 1 deletions

View File

@ -65,7 +65,7 @@
#undef PLAT_MACOSX
#define PLAT_MACOSX 1
#if defined(__WIN32__) || defined(_WIN32) || defined(_WIN64)
#elif defined(__WIN32__) || defined(_WIN32) || defined(_WIN64)
#undef PLAT_WIN
#define PLAT_WIN 1

View File

@ -14,6 +14,7 @@
#if defined(SCI_NAMESPACE)
# include "../entry/input.h"
# include "scintilla.h"
#endif // defined(SCI_NAMESPACE)
#include "vs_ocornut_imgui.bin.h"
@ -247,6 +248,11 @@ struct OcornutImguiContext
ImGui::NewFrame();
//ImGui::ShowTestWindow(); //Debug only.
//
#if defined(SCI_NAMESPACE) && 0
bool opened = true;
ImGuiScintilla("Scintilla Editor", &opened, ImVec2(640.0f, 480.0f) );
#endif // 0
}
void endFrame()

View File

@ -666,6 +666,14 @@ public:
{
Editor::KeyDown(SCK_DOWN, shift, ctrl, alt);
}
else if (ImGui::IsKeyPressed(entry::Key::PageUp) )
{
Editor::KeyDown(SCK_PRIOR, shift, ctrl, alt);
}
else if (ImGui::IsKeyPressed(entry::Key::PageDown) )
{
Editor::KeyDown(SCK_NEXT, shift, ctrl, alt);
}
else if (ImGui::IsKeyPressed(entry::Key::Home) )
{
Editor::KeyDown(SCK_HOME, shift, ctrl, alt);