|
From: Tatsuro M. <tma...@ya...> - 2014-06-23 19:33:44
|
Correction
----- Original Message -----
> From: Tatsuro MATSUOKA
> To: Merritt Ethan ; gnuplot-bet
> Cc: Petr Mikulik
> Date: 2014/6/23, Mon 18:23
> Subject: Re: How to get key information from qt terminal to gnuplot
>
> ----- Original Message -----
>
>> From: sfeam
>> To: gnuplot-beta
>> Cc: Petr Mikulik
>> Date: 2014/6/23, Mon 14:52
>> Subject: Re: How to get key information from qt terminal to gnuplot
>>
>
>> That may have been true at the time, but currently the main program is
> linked
>> against both gdk and X11 when it is built on linux. So the same call
>> that wxt uses could be placed in the main code.
>
>> I do not know about MSWin.
>
> For windows terminal (but no wxt on windows),
> SPACE_RAISES_CONSOLE feature is implemented in wgraph.c
>
> Key code is obtained in windows way.
>
> *************************************************************
>
> case WM_CHAR:
> /* All 'normal' keys (letters, digits and the likes) end up
> * here... */
> #ifndef DISABLE_SPACE_RAISES_CONSOLE
> if (wParam == VK_SPACE) {
> WinRaiseConsole();
> return 0L;
> }
> *************************************************************
>
> WinRaiseConsole() is described in winmain.c
>
>
>
>
>
> *************************************************************
>
> void
> WinRaiseConsole(void)
> {
> HWND console = NULL;
> #ifndef WGP_CONSOLE
> console = textwin.hWndParent;
> #else
> console = GetConsoleWindow();
> #endif
> if (console != NULL) {
> ShowWindow(console, SW_SHOWNORMAL);
> BringWindowToTop(console);
> }
> }
> *************************************************************
>
>
>
>
> In wxt terminal on windows (wxt_gui.cpp), key code scan seems to be wrapped by
> event.GetKeyCode()
>
> Using the keycode
> *************************************************************
> switch (keycode) {
>
>
> #ifndef DISABLE_SPACE_RAISES_CONSOLE
> case WXK_SPACE :
> if ((wxt_ctrl==yes && event.ControlDown())
> || wxt_ctrl!=yes) {
> RaiseConsoleWindow();
> return;
> } else {
> gp_keycode = ' ';
> break;
> }
> #endif /* DISABLE_SPACE_RAISES_CONSOLE */
> *************************************************************
> Function RaiseConsoleWindow() is described in winmain.c
should be
Function RaiseConsoleWindow() is described in wxtPanel::RaiseConsoleWindow()
> wxtPanel::RaiseConsoleWindow() is described dependent on platform,
>
>
> The wxt terminal for windows uses WinRaiseConsole() in winmain.c.
>
> For windows terminal it should be required to write wrapper function to keycode
> to implement the Ethan's idea.
>
> Tatsuro
>
>
|