0ad/source/gui/Scripting
trompetin17 0f156e3544
GUIProxy: Support property introspection for debugging
This commit enables proper property enumeration and inspection for GUI
proxy objects in debugging sessions using the SpiderMonkey Debugger API.

Interface (IGUIProxyObject):
- Added a pure virtual method getPropsNames() to expose cached property
  names from the GUI object implementation.

Proxy handler (JSI_GUIProxy):
- Implemented ownPropertyKeys() to enumerate all visible properties of
  the proxy, including: -- Built-in GUI fields: "name", "parent",
  "children". -- Dynamic settings stored in m_Settings. -- Script event
  handlers prefixed with "on" from m_ScriptHandlers. -- Function
  properties returned by getPropsNames().
- Implemented getOwnPropertyDescriptor() to synthesize descriptors for
  debugger queries: -- Returns undefined if the property is not defined.
  -- Returns a read-only enumerable descriptor otherwise.
- Both methods are marked final and override SpiderMonkey's
  BaseProxyHandler.

Why:
- SpiderMonkey’s Debugger API requires ownPropertyKeys and
  getOwnPropertyDescriptor for proxy objects to be introspectable in dev
  tools like VS Code.
- Without these, properties of GUI objects are hidden during debugging.
- This change improves the developer experience by making all meaningful
  GUI object fields visible and explorable at runtime.
2025-07-11 11:06:06 -05:00
..
GuiScriptConversions.cpp Fix most headers in gui 2025-07-05 12:42:34 +02:00
JSInterface_CGUISize.cpp Fix most headers in gui 2025-07-05 12:42:34 +02:00
JSInterface_CGUISize.h Allow setting CGUISize properties directly 2025-06-17 12:57:33 -05:00
JSInterface_GUIManager.cpp Replace ScriptException::Raise in Engine functions 2025-07-08 19:11:49 +02:00
JSInterface_GUIManager.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00
JSInterface_GUIProxy.cpp Fix most headers in gui 2025-07-05 12:42:34 +02:00
JSInterface_GUIProxy.h GUIProxy: Support property introspection for debugging 2025-07-11 11:06:06 -05:00
JSInterface_GUIProxy_impl.h GUIProxy: Support property introspection for debugging 2025-07-11 11:06:06 -05:00
JSInterface_GUISize.cpp Fix most headers in gui 2025-07-05 12:42:34 +02:00
JSInterface_GUISize.h Fix most headers in gui 2025-07-05 12:42:34 +02:00
ScriptFunctions.cpp Fix most headers in gui 2025-07-05 12:42:34 +02:00
ScriptFunctions.h Revert non-ASCII characters from source and configuration files introduced in 157c6af18e. 2023-12-03 00:30:12 +00:00