|
|
|
10-14-2018, 08:38 AM
|
#1
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,714
|
gfx.init returns HWND for script GUI
Several API functions that are applicable to script GUIs require window HWNDs, particularly the docking functions such as DockWindowAdd.
gfx.init currently only returns some undocumented integer value. It would be more helpful if gfx.init could instead return the HWND of the newly created GUI. (A nil or 0 return HWND could indicate failure.)
|
|
|
10-15-2018, 08:44 AM
|
#2
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
+1
this is very much needed.
With your extension, we could only get the HWND, if all gfx.init-windows currently opened have different names, so it would be really helpful to have the right HWND as well.
|
|
|
11-17-2019, 01:35 PM
|
#3
|
Human being with feelings
Join Date: Aug 2012
Location: Finland
Posts: 2,668
|
|
|
|
11-17-2019, 02:38 PM
|
#4
|
Human being with feelings
Join Date: Feb 2019
Location: Southern Vermont
Posts: 864
|
Would also be cool if gfx.init were recoded to deprecate gfx.dock
In an ideal world you could return the following values with an input of '0' and an hwnd:
name, x, y, w, h, d, window_style = gfx.init( 0, hwnd ) But to set:
hwnd = gfx.init( name, x, y, w, h, d, window_style) If this were coupled with the newest behaviour of gfx.init, where supplying "" as name sets values to the script's gfx window instead of re-initializing, I think that would be great.
Also, dock should be numbered 0-4 instead of 0-1.
0 - undocked
1 - docked left
2 - docked top
3 - docked right
4 - docked bottom
Last edited by Dafarkias; 11-17-2019 at 02:50 PM.
|
|
|
11-17-2019, 03:06 PM
|
#5
|
Human being with feelings
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
|
Isn't dockstate entirely dependent on how the user has their dockers set up? It's not just "is docked" and "is not docked".
|
|
|
11-17-2019, 03:25 PM
|
#6
|
Human being with feelings
Join Date: Aug 2012
Location: Finland
Posts: 2,668
|
Quote:
Originally Posted by Lokasenna
Isn't dockstate entirely dependent on how the user has their dockers set up? It's not just "is docked" and "is not docked".
|
Docker IDs seem to be dynamic somehow...
It would be nice to have a function to get the closest docker's ID from a point (x, y)
Then it would be easier to implement something like this (drag and drop to dock script windows):
https://forum.cockos.com/showpost.ph...03&postcount=2
|
|
|
11-18-2019, 02:11 PM
|
#7
|
Human being with feelings
Join Date: Feb 2019
Location: Southern Vermont
Posts: 864
|
Couldn't the dock states be specified by location, though?
If you could set docks to screen position and then resize using gfx.w & gfx.h, you could write a script that allows REAPER to remember the docking positions of unique windows. Or it could be integrated natively, ideally.
I mean of course, ignoring the blatantly obvious conclusion that it would cause a horrendous inconvenience to Schwa and J in the unlikely event they decide to code such a change.
|
|
|
11-19-2019, 09:10 AM
|
#8
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
I made a request on docker-related functions here:
https://forum.cockos.com/showthread.php?t=222314
I also described, how the dockers seem to work over there.
|
|
|
11-19-2019, 09:55 AM
|
#9
|
Human being with feelings
Join Date: Feb 2019
Location: Southern Vermont
Posts: 864
|
I didn't mention docking originally to try and de-rail the thread, it just kinda popped into my head, think it could also be integrated into gfx.init.
My apologies.
I believe, if I'm not mistaken, there's another related feature request out-and-about somewhere, something to do with docker positions for unique windows being 'remembered' by REAPER.
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 03:03 AM.
|