Canvas widgets: Difference between revisions

Jump to navigation Jump to search
Line 209: Line 209:


We probably want to support Java-style Key listeners and Key bindings, so that widget-behavior can be easily implemented in Nasal space
We probably want to support Java-style Key listeners and Key bindings, so that widget-behavior can be easily implemented in Nasal space
=== Multiplatform Clipboard Support (native Copy/Paste) ===
Had to be individually implemented for each supported window manager environment (Windows, OSX, X11):
* X11: [https://gitorious.org/fg/flightgear/blobs/next/src/Scripting/ClipboardX11.cxx Scripting/ClipboardX11.cxx] {{Done}}
* Windows: [https://gitorious.org/fg/flightgear/blobs/next/src/Scripting/ClipboardWindows.cxx Scripting/ClipboardWindows.cxx] {{Done}}
* OSX: To be based on: [https://gitorious.org/fg/flightgear/blobs/next/src/Scripting/ClipboardFallback.cxx Scripting/ClipboardFallback.cxx] {{Done}}
* '''Hooray''': "Also, copy/paste usually involves getting a bounding box for the area and retrieving the text in that area (drawing a rectangle and inverting the font color)"
Should probably be done at the Nasal level, using two new custom extension function:
* f_setClipboardText( text ) {{Done}}
* f_getClipboardText() {{Done}}
Usage examples can be found at [[Howto:Clipboard access using Nasal]].


=== Reimplementing CanvasWindow without PUI dependency using osgGA (in progress) {{Pending}} ===
=== Reimplementing CanvasWindow without PUI dependency using osgGA (in progress) {{Pending}} ===

Navigation menu