10-30-2023, 01:36 PM
|
#1 |
|
Human being with feelings
Join Date: May 2017
Location: Somewhere over the Rainbow
Posts: 6,966
|
I try to code tooltips in my gfx-window, when I hover above certain objects shown in my gfx-window.
However, the hovering is also recognized, when I switch to another app(the window is hidden by the other app), so a tooltip is shown "through the other app". So I thought, I can use gfx.getchar(65536)&4 to only show tooltips, when the window is visible and if not, I don't show tooltips. Now here's the problem: &4 is always 4, even if the window is hidden/behind another app. I'm not sure, whether it's intended behavior or a bug, but I could really need for this to work. Is there a way? I tried to circumvent it by only showing tooltips when window is focused but that's not ideal in my usecase. Tested on Windows 7, Reaper 7.01 Edit: done in v7.03 as &8
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - ReaGirl - a GuiLib for guis working for blind people Last edited by Meo-Ada Mespotine; 11-11-2023 at 03:51 PM. |
|
|
10-30-2023, 03:42 PM
|
#2 |
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 4,138
|
gfx.getchar(65536)&4 works here, (Win10)
If I call this to hide the gfx window then the above code returns 0 reaper.JS_Window_Show(hwnd,"HIDE") And returns 4 again when unhide it. |
|
|
10-30-2023, 03:45 PM
|
#3 |
|
Human being with feelings
Join Date: May 2017
Location: Somewhere over the Rainbow
Posts: 6,966
|
Hmm, by hiding you mean, switching to another app?
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - ReaGirl - a GuiLib for guis working for blind people |
|
|
10-30-2023, 03:57 PM
|
#4 |
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 4,138
|
Docs say, &4=window is visible
Which I assumed is same as IsWindowVisible function , if true then doesn't matter if window has focus or not, or is behind some other window. |
|
|
10-31-2023, 02:58 AM
|
#5 |
|
Human being with feelings
Join Date: May 2017
Location: Somewhere over the Rainbow
Posts: 6,966
|
Hmm, ok, then it's not working on Windows 7.
I tried to hide the gfx-window with the IDE as well as my browser. &4 was always 4...
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - ReaGirl - a GuiLib for guis working for blind people |
|
|
10-31-2023, 03:34 AM
|
#6 |
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 4,138
|
Odd that its always 4, but thats not going to help solve your problem anyway.
Whats wrong with only showing tooltips when your gfx window is the foreground/focused window? <strike>Otherwise when its not the focused window I suppose you'd have to enum all the open windows and check if the mouse is inside some other windows RECT area (that intersects with your window), and if it is then don't show/hide the tooltip. ?</strike> EDIT No need for all that, just use JS_Window_FromPoint()? Last edited by Edgemeal; 10-31-2023 at 01:56 PM. |
|
|
10-31-2023, 08:39 AM
|
#7 |
|
Human being with feelings
Join Date: May 2017
Location: Somewhere over the Rainbow
Posts: 6,966
|
I try to code a script that works for blind users and when I hover above a ui-element, I show a tooltip and send a message to the screenreader.
This works also for the Reaper window(like arrange view), if a child-window is currently in focus. That way, blind users can use the mouse to navigate in addition to the keyboard. And I try to mimick it, that hovering over ui-elements in my gui-window shows a tooltip and sends a screenreader message, as long as the window is visible. If I need to focus the window first, all ui elements in the window become invisible for blind users until they focus the window, which can be challenging.
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - ReaGirl - a GuiLib for guis working for blind people |
|
|
10-31-2023, 10:09 AM
|
#8 |
|
Administrator
Join Date: Jan 2005
Location: NYC
Posts: 16,783
|
You can check &2 to see if the window has focus. Visibility is defined as not-hidden, but not defined as not-obscured. I suppose we could add a bit for "check to see if the mouse would hit this window if clicked"?
|
|
|
10-31-2023, 10:31 AM
|
#9 | |
|
Human being with feelings
Join Date: May 2017
Location: Somewhere over the Rainbow
Posts: 6,966
|
Quote:
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - ReaGirl - a GuiLib for guis working for blind people |
|
|
|
10-31-2023, 01:47 PM
|
#10 |
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 4,138
|
Couldn't you do that with JS_Window_FromPoint(), unless you don't want to use dependencies.
|
|
|
11-01-2023, 02:11 AM
|
#11 |
|
Human being with feelings
Join Date: May 2017
Location: Somewhere over the Rainbow
Posts: 6,966
|
I need to avoid dependencies with the exception of Osara for the screenreader messages.
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - ReaGirl - a GuiLib for guis working for blind people |
|
|
![]() |
| Thread Tools | |
|
|