Rebecca N. Palmer
a4aff2cb82
remove checkIORules(), replaced by check in fgInitAllowedPaths()
2015-03-13 18:10:31 +00:00
Rebecca N. Palmer
9002696195
Make fgValidatePath always return std::string, not char *
2015-03-13 18:07:24 +00:00
Rebecca N. Palmer
d718d5f3cb
Move Nasal io.open to flightgear, and make it use fgValidatePath
2015-03-13 18:02:46 +00:00
Rebecca N. Palmer
6a30e7086e
Stop using property listener for fgValidatePath
...
This was insecure: while removelistener() won't remove it, there are
other ways to remove a listener from Nasal
2015-03-13 17:54:44 +00:00
James Turner
564177933b
FlightPlan activation, delegate hook.
2015-02-23 13:41:50 +00:00
Rebecca N. Palmer
193f2a3fbc
Fix hang in Nasal->C++->Nasal calls
...
https://bugs.debian.org/750939
http://sourceforge.net/p/flightgear/mailman/message/32969200/
2015-01-18 22:23:21 +00:00
James Turner
e9849ecae9
Remove a warning, let Nasal itself warn if needed.
2015-01-10 19:35:50 +00:00
James Turner
e94371ebfc
Route-path bug fixes.
...
- explicit aircraft performance categories for turn radius
- allow overflight leg course behaviour to be selected
2015-01-08 19:46:04 +00:00
James Turner
a1169e4f75
Expose waypoint heading/course to Nasal.
2014-12-21 09:53:32 +03:00
James Turner
01622dd1f4
Fix flight-plan course and distance computations.
...
Always use the RoutePath system for course and distance computations
in the flight plan, so that dynamic segments are handled correctly.
2014-12-08 17:56:15 +00:00
James Turner
d806b68706
find waypoints in the flight plan.
2014-12-04 15:43:32 +00:00
bcoconni
2122e9eee3
Save a memory allocation each time a property node is wrapped in Nasal. Instead use a direct access to the reference counter and explicitely delete the node if the ref counter is decremented to zero during the ghost destruction.
2014-11-23 14:53:54 +01:00
Thomas Geymayer
0b9e72eb87
Nasal: move IOrules check to better place and exit on failure.
2014-09-19 18:22:47 +02:00
Thomas Geymayer
96a2673dd8
Canvas: expose set/clearFocusElement to Nasal.
2014-08-25 21:54:20 +02:00
Thomas Geymayer
4b59c152ea
canvas::Text: expose more text/cursor methods to Nasal.
2014-08-23 16:06:33 +02:00
Thomas Geymayer
aa1b3c1e31
Expose canvas::Element::setFocus to Nasal.
2014-08-12 17:57:01 +02:00
Thomas Geymayer
6713830254
Nasal Timer: prevent warning on restarting oneshot timer in callback.
2014-08-11 00:31:18 +02:00
Thomas Geymayer
271cf1420d
Canvas: support for pointer grab.
2014-08-11 00:25:26 +02:00
Thomas Geymayer
08263dc1ec
Canvas: expose layout contents margins and alignment to Nasal.
2014-08-05 00:19:40 +02:00
Thomas Geymayer
4f2032a9c2
Canvas: export preventDefault to Nasal and use to stop events on DesktopGroup.
2014-07-30 17:17:24 +02:00
Thomas Geymayer
49df413444
Canvas: Keyboard events and input focus.
...
Also allow events on desktop group if no window is receiving
events. Currently it is not possible to prevent events handled
by the desktop group to further propagate (eg. to normal
control input).
2014-07-30 00:00:03 +02:00
Thomas Geymayer
0646d5f443
Nasal: expose LayoutItem visibility methods.
2014-07-21 00:27:20 +02:00
Thomas Geymayer
a673f4a5f9
Nasal: update for simgear changes.
2014-07-21 00:26:54 +02:00
Thomas Geymayer
5f4ad79954
canvas.Layout: expose missing methods to Nasal.
2014-07-16 11:24:53 +02:00
Thomas Geymayer
a94ad46dc0
Nasal: expose missing Canvas::setLayout
2014-06-26 18:26:43 +02:00
Thomas Geymayer
a66e30aa04
Nasal: Limit SGPath::create_dir access rights to 0755
2014-06-26 16:03:10 +02:00
Thomas Geymayer
694df4b337
Fix compiler warning (naRuntimeError does not return...)
2014-06-23 00:42:17 +02:00
Thomas Geymayer
1b55ab5f40
Nasal: expose SGCondition using nasal::Ghost and improved error checking.
2014-06-22 15:37:48 +02:00
Thomas Geymayer
1d5f229653
Nasal: set CustomEvent::bubbles.
2014-06-21 00:24:57 +02:00
Thomas Geymayer
f4b7ae5da3
Nasal: md5 is now in simgear.
2014-06-18 15:59:41 +02:00
Thomas Geymayer
cfbf9e7e4e
Nasal: expose md5 function.
2014-06-17 22:33:53 +02:00
Thomas Geymayer
da2bb6353e
Nasal: expose canvas::Text::maxWidth.
2014-06-17 17:02:10 +02:00
Thomas Geymayer
26a4948642
NasalSys: process nasal::Ghost deletion queue.
2014-06-15 16:36:35 +02:00
Thomas Geymayer
52a4ded502
Nasal: expose canvas::Layout::clear()
2014-06-14 13:22:22 +02:00
Thomas Geymayer
4409c8cca6
Expose parse_markdown to Nasal.
2014-06-13 19:16:26 +02:00
Thomas Geymayer
b53b1a3a25
Nasal: expose canvas height-for-width layouting methods.
2014-06-13 00:09:33 +02:00
Thomas Geymayer
0fb94ba596
Nasal: expose canvas::Layout item remove and get methods.
2014-06-12 00:44:26 +02:00
Thomas Geymayer
c0eda4a47c
Nasal: expose more methods to Nasal.
2014-06-10 18:44:38 +02:00
Thomas Geymayer
9c0b5a5c54
Nasal: Expose BoxLayout methods for spacer and stretch.
2014-06-08 23:34:37 +02:00
Thomas Geymayer
371b71dd6c
Nasal: expose vbox layout and allow setting item stretch.
2014-06-04 17:50:52 +02:00
Thomas Geymayer
75f5eba002
Update includes (required by simgear changes)
2014-06-04 02:58:14 +02:00
Thomas Geymayer
3c0b7f88b8
Updates for simgear nasal::Ghost changes.
2014-06-03 19:00:25 +02:00
Thomas Geymayer
06a9958689
Canvas: expose more methods to Nasal
2014-06-01 12:15:02 +02:00
Thomas Geymayer
3b4bb10e4f
Canvas: expose layouting to Nasal.
2014-05-31 02:43:03 +02:00
Thomas Geymayer
7c31654b3a
Canvas: store data inside canvas and elements.
...
- jQuery/HTML5 like .data() method on Canvas and Elements to store
custom data in the property tree.
- CustomEvent takes additional parameter hash with 'detail' data
stored in event.
2014-05-29 16:47:32 +02:00
Thomas Geymayer
5b74a72506
Canvas: support for custom events and event dispatching.
2014-05-19 00:28:40 +02:00
Thomas Geymayer
b3946f08f9
NasalCanvas: Update for simgear changes.
2014-05-18 20:21:56 +02:00
Thomas Geymayer
741c3c892c
NasalPositioned: Update for nasal::Ghost changes in SimGear
2014-05-18 17:48:46 +02:00
Thomas Geymayer
0fc2d57211
Scripting: expose flight history as aircraft.history()
...
var hist = aircraft.history();
debug.dump(hist.pathForHistory(50));
2014-05-10 10:56:09 +02:00
Thomas Geymayer
bd29974683
Canvas: move Window class to simgear.
2014-05-09 16:42:54 +02:00
James Turner
b3c7cb7c15
Fix crash with Nasal bindings.
...
naBindFunction doesn't save the function code to the global
hash, so pass an explicit context to various 'call' overloads so
the function can't be GC-ed in between parsing and calling.
(Patch by Nicholas Scheel)
https://code.google.com/p/flightgear-bugs/issues/detail?id=1397
2014-04-15 14:13:46 +01:00
Thomas Geymayer
7f43a09fc5
Canvas: update for new bounding box getters.
2014-03-31 13:29:14 +02:00
Thomas Geymayer
f0ef2b9576
Expose HTTP client to Canvas.
2014-03-18 18:35:35 +01:00
James Turner
070dba29f9
Close dialogs on GUI shutdown
...
- avoids orphaned dialogs on reset
- requires some guards in NasalSys since Nasal is shutdown first, but
dialogs can have Nasal modules.
2014-03-16 22:52:55 +00:00
Torsten Dreyer
aaa7fca621
NasalSys: arg is never null
2014-03-12 22:42:51 +01:00
Thomas Geymayer
ef3f0a2738
Canvas.MouseEvent: fix specific modifier states (ctrl, alt,...)
2014-03-07 16:19:40 +01:00
Thomas Geymayer
88b7d4f530
Update for SGPropertyNode changes.
2014-03-06 00:41:41 +01:00
Thomas Geymayer
36f7ef93aa
Canvas.MouseEvent: expose button/modifier state.
2014-03-04 18:00:57 +01:00
James Turner
34ed79e5f8
getprop/setprop allows integer indices.
...
As suggested by a long-standing enhancement idea,
extend getprop/setprop to accept multiple args,
including integer arguments. This removes the need
for string concatenation (and hence, allocation)
on the Nasal side.
Patch by Nicholas 'Philosopher' Scheel
2014-02-18 20:07:29 -08:00
Thomas Geymayer
3b23892ccf
Canvas: also apply matrix of element to getTransformedBounds.
...
Part of the fix for #1333 .
2014-02-08 00:28:24 +01:00
Thomas Geymayer
61da998e02
Expose SGPath::standardLocation to Nasal.
2014-01-28 01:08:06 +01:00
Thomas Geymayer
67be73fdde
Expose SGPath to Nasal
2013-12-18 10:30:19 +01:00
Thomas Geymayer
3a170e1a39
Scripting: clean up a bit and user more of cppbind.
2013-12-08 19:24:45 +01:00
Thomas Geymayer
cac6407a8e
Add positioned.diff for fast difference calculations on positioned lists.
2013-12-08 19:24:45 +01:00
Thomas Geymayer
fcc6d3edc2
Expose SGPropertyNode::removeAllChildren() to Nasal.
2013-12-07 13:47:10 +01:00
James Turner
9c11dfd545
Reset: free nasal-module-listeners on shutdown.
2013-12-03 21:38:45 +00:00
James Turner
d99109c9e4
Reset: do re-init Ghost bindings.
2013-11-24 15:10:00 +00:00
James Turner
0fbc448af0
Nasal changes for reset
...
- reduce use of global context (will die soon)
- replace static wrappedNode ref which breaks reset
2013-11-22 22:52:33 +00:00
James Turner
fecb475145
Refactor Cocoa helpers.
...
Change away from using deprecated FSFindFolder.
2013-11-16 10:58:17 +00:00
bcoconni
139af0026f
Synchronized FG with the removal of 'using std::*' in simgear's easyxml
2013-11-14 22:07:50 +00:00
James Turner
881df711ba
Reset: Nasal can be shutdown.
...
Also guard against duplicate init of cppbind wrapped classes.
2013-11-12 22:47:41 +00:00
Thomas Geymayer
accdf97785
Allow disabling embedded nasal (load/unload scripts).
2013-11-10 23:32:47 +01:00
James Turner
af6131b556
Bug 1246, Nasal repeating timers fire immediately.
...
Initial delay is passed separately to interval in the
API, oops.
2013-11-09 08:01:57 -08:00
James Turner
8622661237
Further tuning of arg->num conversion.
2013-11-07 06:29:58 -08:00
James Turner
0d740bcfae
Simpler Nasal for leg constraints.
...
Thanks to Philosopher for the suggestion.
2013-11-06 16:58:09 -08:00
James Turner
f0011bc759
Nasal: accept strings-containing-ints as
...
arguments to leg altitude/speed constraints.
2013-11-06 15:50:13 -08:00
Thomas Geymayer
4c9ab24b66
Keep ref_ptr in FGNasalModelData (should fix #1234 )
2013-11-01 20:52:55 +01:00
Thomas Geymayer
ce09c320d3
HTTP: Rename urlretrieve/urlload to save/load.
2013-10-27 23:39:52 +01:00
Thomas Geymayer
cf270bde22
Expose HTTP module to Nasal.
2013-10-27 19:39:22 +01:00
Thomas Geymayer
961905a6cf
NasalCanvas: expose Element::getParent() to Nasal
2013-10-23 17:11:56 +02:00
Thomas Geymayer
771586854b
Make build information readonly and clean up debug output.
2013-10-20 12:59:44 +02:00
Thomas Geymayer
6b88302037
Provide debug information on thread safety of osg::Referenced.
2013-10-19 01:20:28 +02:00
James Turner
1e746500dd
Validate arg to Nasal airport.comms().
...
Thanks to HomerJ for the catch.
2013-10-18 15:54:44 +01:00
Thomas Geymayer
b35119d408
FGNasalModelData: also log path of model.
2013-10-17 13:29:38 +02:00
Thomas Geymayer
d27919cd16
More logging for FGNasalModelData.
2013-10-17 11:48:01 +02:00
Thomas Geymayer
5c38395395
NasalSys: do not print invalid elements for error backtraces.
2013-10-16 23:41:38 +02:00
Thomas Geymayer
26a3573aea
Update/simplify for SimGear changes.
2013-10-15 17:48:13 +02:00
Thomas Geymayer
5c42071fbb
Scripting: get rid of gcHash and use new SimGear/Nasal functions.
2013-10-15 00:58:21 +02:00
Thomas Geymayer
df7e56b049
Canvas: update for SimGear changes.
2013-10-12 00:43:30 +02:00
James Turner
761b4835f9
Make positioned queries more defensive.
...
Validate the filter type range, to avoid crashing on bad ranges.
Accept arbitrary type lists in the Nasal API for searching by distance
2013-10-02 22:28:19 +01:00
James Turner
b2759d018b
Fix a crash with GPS dialog.
...
If an invalid filter type is supplied, don't run the queries.
This showed up with GPS dialog, since the PUI combo box defaults to
no entry selected, not the first entry.
2013-10-02 22:08:17 +01:00
James Turner
52e5a9abe8
Reduce amount of log output at level=debug.
2013-09-28 14:47:20 +01:00
James Turner
33425c671d
Support for multiple data dirs.
2013-09-17 07:47:58 +01:00
Tom Paoletti
b27eb2571c
Performance optimization: empty() instead of size()>0
...
empty() is guaranteed to be constant complexity for both vectors and lists, while size() has linear complexity for lists.
2013-08-19 09:02:15 +01:00
Thomas Geymayer
a75b9e5de9
Expose canvas GUI "desktop" to Nasal.
...
- Restructure GUIMgr and move most parts to implementation class.
- Expose new (simgear::canvas::Group based) DesktopGroup class
to Nasal.
2013-07-25 00:59:59 +02:00
James Turner
3e46c7998c
Additional checks, for waypoint role setting.
...
Added these while investigating a defect, which unfortunately still
remains elusive. But the checks are wise anyway.
2013-07-24 08:51:35 +01:00
Thomas Geymayer
63f19db028
Expose String::ends_with to Nasal
2013-07-15 22:27:10 +02:00
Thomas Geymayer
8ccc1c4d35
Canvas Event: expose currentTarget to Nasal.
2013-07-04 00:56:32 +02:00
James Turner
7de4cb5965
Kill off some unnecessary log messages.
2013-06-28 10:07:39 +01:00
Thomas Geymayer
326ee0c5cf
Add window decoration support to Canvas GUI.
...
canvas::Window now optionally creates a second canvas for showing
window decoration. After setting its dimensions with the property
"decoration-border" a Nasal based window decorator should add the
required elements to the decoration canvas.
Using the properties "shadow-radius" and "shadow-inset" a drop
shadow can be added to the window.
2013-06-06 22:37:16 +02:00
Thomas Geymayer
53c3033135
Expose canvas::Window ghost to Nasal.
2013-06-03 23:46:34 +02:00
Thomas Geymayer
3d3475e965
Small cleanup.
2013-06-03 23:46:27 +02:00
Thomas Geymayer
5146868bfb
Extend Nasal property methods to support relative paths.
...
All methods exposed to the Nasal props module now accept an
optional first parameter refering to another node by a relative
path.
(Thanks to Philosopher for the initial patch)
2013-04-14 11:19:03 +02:00
James Turner
e89df85817
GPSs uses FlightPlans directly.
2013-04-09 10:20:02 +01:00
Thomas Geymayer
8f1df6c358
Helpers to clone SGModelData
...
This is needed for latest SimGear to fix scene model
unload not being called
2013-04-01 13:40:51 +02:00
Thomas Geymayer
913727239d
Expose pose of scenery models to Nasal load/unload scripts.
...
This allows Nasal code attached to scenery models access their
world position and orientation by calling _model.getPose().
Also ensure models are attached to the scenegraph before Nasal
load scripts are called. This ensures that the world position
and orientation are available upon executing the load script.
2013-03-23 12:54:45 +01:00
Thomas Geymayer
eba03b5e46
Allow placing canvas on scenery objects.
2013-03-21 01:16:47 +01:00
James Turner
6f80df0b8d
NasalTimerObject tweaks.
2013-03-20 18:10:27 +00:00
James Turner
9575783491
NasalPositioned-cppbind additions.
...
Expose searching by name, filtering by any type, and sorting by range.
2013-03-19 18:14:56 +00:00
Thomas Geymayer
1e4ba18284
Update/simplify property interpolation to latest SimGear changes
2013-03-17 23:49:15 +01:00
Thomas Geymayer
4b21dc51ee
Replace SGInterpolator with new advanced interpolation system.
...
Allow for advanced animations using easing functions and adapters
for interpolating specific property types (eg. CSS colors).
Old behavior should not have changed.
2013-03-16 16:45:03 +01:00
James Turner
ab939ff772
A real Timer object in Nasal.
...
A persistent timer object which can be stopped, started and restarted. Gosh. Has both singleShot and repeating modes.
2013-03-16 12:44:27 +00:00
Thomas Geymayer
3047c316dc
Clean up/simplify NasalPositioned_cppbind
...
Ensure all FGPositioned related functions return SGSharedPtr
instead of raw pointers to allow automatic conversion to
nasal ghosts without custom helper functions.
2013-03-06 23:21:49 +01:00
Thomas Geymayer
8d56b4664a
Port more airport/navaid methods to cppbind
2013-03-06 01:04:52 +01:00
Thomas Geymayer
c7e846bd2a
Parse geod/position and use it with new airportinfo.
2013-03-05 17:31:26 +01:00
James Turner
f2c267f5d7
MouseInput changes to support hover.
...
This adds the framework for platform cursor implementations; Windows and X11 to be done.
It also extend the mouse-input code to generate hover events suitable for driving tooltips.
Note there should be no visible functionality change from this commit, since everything
is inactive until fgdata changes are made.
2013-03-04 23:35:30 +00:00
Thomas Geymayer
22a1c9b2af
Finish porting airportinfo to cppbind
2013-03-04 23:14:26 +01:00
Thomas Geymayer
4b573ebd13
Start porting NasalPositioned to cppbind.
...
For now it is available in the positioned Nasal
module. FGAirport is fully ported, but especially
procedures/navaids and free functions are still
missing.
2013-03-04 19:24:47 +01:00
Thomas Geymayer
45e3b7e2d1
Clean up/prepare for porting NasalPositioned to cppbind
2013-03-04 16:31:37 +01:00
Thomas Geymayer
664cb474e1
NasalCanvas: clean up
2013-03-03 20:57:08 +01:00
Thomas Geymayer
0587db3b1e
Update for nasal::Ghost changes
2013-03-03 19:30:16 +01:00
Christian Schmitt
ee1c8a8d66
Expose more runway methods to Nasal
2013-03-01 12:53:25 +01:00
Christian Schmitt
8588eb2e4b
Expose heliports to Nasal for future use in maps
2013-02-26 18:20:10 +01:00
James Turner
1eb8ae1fbf
Give the FGAirport class a sane filename.
...
simple.[cxx|hxx] -> airport.[cxx|hxx]
2013-02-21 11:32:02 +00:00
Yves Sablonier
9ac1e82c82
Adding directive for osx sdk 10.5 in ClipBoardCocoa.mm
2013-02-18 09:18:48 +00:00
James Turner
808f42e86a
Linux fix.
...
One day I'm going to figure out why I get all the standard-library includes automatically on Mac, but not on Linux. Today is not that day.
2013-02-09 17:11:55 +00:00
Frederic Bouvier
aa19b2a77e
Include file only needed by MSVC
2013-02-09 17:40:37 +01:00
Frederic Bouvier
87b43057e1
Fix windows build
2013-02-09 17:24:44 +01:00
James Turner
7b663cd7f7
Split huge NasalSys header apart.
2013-02-09 15:33:05 +00:00
James Turner
ce9afecdbd
Support a log-list widget in PUI.
...
Add a puaListBox which can show the contents of a log-buffer. Currently only two buffer sources are supported more to follow (and the dialog XML updates).
2013-02-08 19:39:41 +00:00
Frederic Bouvier
7cc3ffb30f
Fix build for windows after logstream changes
2013-02-08 08:46:34 +01:00
James Turner
b52a61c2cb
Support logging from Nasal at custom levels.
...
For now, print() still logs at SG_ALERT level.
2013-02-07 16:44:24 +00:00
Thomas Geymayer
5b38e00ade
Expose some methods on strings to Nasal
2013-01-31 19:14:23 +01:00
James Turner
2e1fb7972e
Initial work on native file dialog support.
...
Add an abstract interface, version that forwards to the existing PUI dialog, and a Cocoa-native version.
2013-01-19 14:41:45 +00:00
James Turner
6705a2ec6d
Fix compilation on some platforms.
...
No idea why I don't need this on Mac - differing Boost versions?
2012-12-31 20:13:26 +00:00
James Turner
369e6b564f
Flightplan delegate hook for clearing the FP.
...
This allows delegates to take action when the flightlan is cleared, and especially, for the default delegate in the route-manager to deactivate itself, and hence the GPS LEG mode - which fixes bug 940 I hope.
2012-12-31 17:39:52 +00:00
James Turner
6c3853fd0d
Expose an additional flight plan leg data to Nasal.
2012-12-31 11:46:36 +00:00
James Turner
12076bce0e
Expose position along the flight-path to Nasal.
...
Useful to query a point '100nm before wpt X' from Nasal, especially for VNAV calculations (T/C, T/D).
2012-12-26 23:48:19 +00:00
Thomas Geymayer
e844383988
Expose canvas Text::getNearestCursor to Nasal as replacement for old property based method
2012-12-17 00:32:24 +01:00
Thomas Geymayer
cef12d406c
CanvasEvent: expose event target to Nasal
2012-12-17 00:32:24 +01:00
Thomas Geymayer
13cec7bd99
Canvas MouseEvent now provides client and screen position
2012-12-08 15:02:15 +01:00
Thomas Geymayer
91bc5e522a
Canvas add event time and expose current click count
2012-12-06 23:27:25 +01:00
Thomas Geymayer
ed211b043a
Expose canvas::Element::getTransformedBounds to Nasal
2012-12-04 23:59:21 +01:00
Thomas Geymayer
28f2779c4b
Forward mouse events from (PUI) CanvasWidget to Canvas for new DOM like callbacks
2012-12-02 13:33:16 +01:00
Thomas Geymayer
5e85bcacc8
Canvas: Expose more methods to Nasal.
...
- Expose canvas::Group::getElementById to Nasal
- Expose canvas::Group::getChild to Nasal
2012-11-30 17:32:13 +01:00
Thomas Geymayer
f7544744bb
Update for latest SimGear changes and remove some old code
2012-11-29 17:57:01 +01:00
Thomas Geymayer
af0bbfd657
Expose simgear::canvas::Group::createChild to Nasal
2012-11-29 01:25:01 +01:00
Thomas Geymayer
e5286f1217
More work on Canvas event handling/adapt for simgear changes
2012-11-27 13:56:53 +01:00
Thomas Geymayer
d51499382d
Clean up CanvasWidget and more work on Canvas/Nasal bindings
2012-11-18 16:46:03 +01:00
Thomas Geymayer
1a0fcd5f56
NasalCanvas: Clean up and expose Element node ghost
2012-11-16 12:34:38 +01:00
Thomas Geymayer
0761af344d
Visual Studio bug workaround
2012-11-15 12:43:35 +01:00
Thomas Geymayer
859e92a8ed
Experiment with exposing more canvas methods
2012-11-15 12:43:34 +01:00
Thomas Geymayer
892806cb3f
More cleanup an move of helper classes to simgear
2012-11-15 12:43:34 +01:00
Thomas Geymayer
724d54b3a3
Clean up and some more testing
2012-11-15 12:43:34 +01:00
Thomas Geymayer
863cd6a290
Canvas/Nasal and Nasal/C++ binding experiments
2012-11-15 12:43:34 +01:00
ThorstenB
1d99401c04
Remove osg dependency for isNaN only.
2012-11-11 17:22:42 +01:00
James Turner
afcdbd3158
Overhaul the ground-net / parking code.
...
Use the nav-data-cache to cache groundnet information, including
parking positions and the taxi-node graph.
2012-11-08 09:07:05 +00:00
Thomas Geymayer
c79510ef34
Fix include and compiler warning
2012-11-04 23:03:06 +01:00
Thomas Geymayer
28779e7a51
Update for new simgear Canvas system.
...
A refactored version of the Canvas system can now be found in
SimGear.
2012-11-04 14:18:31 +01:00
Thomas Geymayer
79f7907a82
Let Nasal props.Node.removeChildren behaviour consistent (Don't keep deleted nodes)
2012-10-22 17:59:19 +02:00
Thomas Geymayer
b22ede2fd5
Expose SGPropertyNode::addChildren to Nasal
2012-10-14 17:39:53 +02:00
ThorstenB
076bbb8487
Fix some compiler warnings.
...
Unused vars, loss of precision, bool type conversions.
2012-10-13 17:59:47 +02:00
ThorstenB
60eaa22fda
Drop sorting of Nasal scripts.
...
simgear::Dir now always provides results in a deterministic order.
2012-10-13 15:45:15 +02:00
Thomas Geymayer
78b5dfb58b
Expose SGPropertyNode::addChild to Nasal
2012-10-13 15:13:56 +02:00
James Turner
b1ff365a8f
Make FGTaxiNode and FGParking inherit FGPositioned.
...
In preparation for caching the groundnet in the NavCache, make taxi-nodes and parkings inherit from FGPositioned. As part of this, make them heap (as opposed to value) classes, disable their copy-constructors, remove many mutating operations, and give them real constructors.
2012-09-25 00:31:17 +01:00
Stuart Buchanan
a3a40af860
Simplify code for taxiways.
2012-09-20 21:53:31 +01:00
Stuart Buchanan
ac1fc699b7
Expose surface types and taxiways via the airportinfo() Nasal call.
2012-09-19 22:33:43 +01:00
James Turner
3cf7715485
Expose the route-path of leg to Nasal.
...
In advance of converting the Map and NavDisplay to use the canvas, expose the full route-path vector for each flight plan leg, as a vector on the leg. Use leg.path() to get this.
E.g.:
var fp = flightplan();
for (var i=0; i<fp.getPlanSize(); i += 1)
{
var leg = fp.getWP(i);
debug.dump(leg.path());
}
2012-09-19 18:40:34 +01:00
James Turner
9b900e9430
Implement a persistent cache for navigation data.
...
Cache the parsed navigation and airport data in a binary file to reduce
startup times and memory consumption (since only referenced FGPositioned
elements are held in memory).
Data will be reimported when the mod-time of any input file is changed.
If a global file is changed (nav.dat, awy.dat, apt.dat, etc), the cache
will be completely rebuilt, which takes approximately 30 seconds on
moderate hardware. (Future work may reduce this).
2012-09-19 11:38:19 +01:00
ThorstenB
fa0a7f8700
Avoid compiler warnings.
2012-09-17 13:45:31 +02:00
Mathias Froehlich
26664aaff0
Push SGMaterial use into these classes that need it.
2012-08-29 06:29:29 +02:00
James Turner
688d76613e
Expose SGCondition as a ghost to Nasal directly.
2012-08-19 21:13:31 +01:00
James Turner
bd0a5d825d
Cocoa clipboard implementation.
...
Fix OS-X build by supplying a Cocoa clipboard implementation.
2012-08-05 21:00:05 +01:00
Thomas Geymayer
d6a5a911bc
Complete X11 clipboard support.
...
- Now ClipboarX11 also supports writing to the clipboard and
sending the data to another application if requested.
2012-08-05 11:19:24 +02:00
Thomas Geymayer
aa9d0e3a8a
Basic clipboard access from Nasal.
...
- Add platform independent clipboard layer for Nasal access
to clipboard (thanks to Hooray for basic code)
- Add Windows clipboard access
- Add partial X11 clipboard access (only reading from clipboard)
- Add fallback clipboard for application internal clipboard if
platform not supported
- Add some helper functions to FGNasalSys
2012-08-04 17:33:48 +02:00
James Turner
f94b2d127b
Avoid a naming clash on 'canvas'
2012-08-03 10:21:26 +01:00
James Turner
f703882ffa
Skeleton Nasal-Canvas integration.
...
This code is non-functional, but contains most of the stubs to show what's required to add property get/set access, convert to from ghost & C++ types, and manage ownership. Element derived classes & inheritance (e.g., methods on image/path/map elements) will follow, along with some actual functionality!
2012-08-02 12:18:38 +01:00
Thomas Geymayer
a876ff93e1
NasalPositioned: Expose actual postion of parkings
2012-07-31 23:19:22 +02:00
Thomas Geymayer
373d511c69
Canvas: Allow using canvases as PUI widgets.
...
- Add new widget type canvas
- Set canvas view dimension from the gui xml.
- Expose mouse events to canvas widget properties.
2012-07-31 23:19:22 +02:00
Markus Pargmann
ecfbb951ae
Remove most compile warnings
2012-07-26 11:10:27 +01:00
James Turner
ffac5ff889
Standard property to ignore unusably short runways in NavDB.
...
Default values should match existing behaviour. Set
/sim/navdb/min-runway-length-ft to skip short runways
in GPS / Map / ND / Nasal queries.
2012-05-16 16:51:39 +01:00
James Turner
1ef77b2bc2
More route-manager functionality moved to Nasal.
...
The routing behaviour now happens entirely in Nasal,
using a delegate, and can be over-ridden or disable
by aircraft authors. Default behaviour should be
unchanged.
2012-05-15 17:53:30 +01:00
James Turner
ce92730ef6
Expose FlightPlan delegates to Nasal, finally.
...
This will permit Nasal (e.g., FMS) to update nicely when the FlightPlan
is modified from anywhere else.
2012-05-12 17:23:17 +01:00
James Turner
0f61108f5b
Break FlightPlan out into its own file.
2012-05-12 10:25:56 +01:00
James Turner
acd8fa25e6
Expose procedure routing and fixes to Nasal.
2012-05-11 17:07:56 +01:00
James Turner
ea2c73e8b5
Expose airways via Nasal, and allow waypoint creation and deletion via Nasal too.
2012-05-08 21:06:28 +01:00
Frederic Bouvier
71622dc3ca
SID is a predefined type under windows
2012-05-07 10:19:55 +02:00
James Turner
1b7b69b498
Create a real FlightPlan (and Leg) class
...
Convert the route-manager to use a flight-plan internally, and expose
flightplan, leg and procedure data to Nasal. Move the Level-D parser
into its own file.
2012-05-07 00:35:48 +01:00
Frederic Bouvier
75fc136931
Remove redundant inclusion of math/SGMath.hxx
2012-05-05 11:20:04 +02:00
ThorstenB
c808376927
Use separate header file for vector properties.
...
(We could drop the "SGMath.hxx" include in many places now...)
2012-05-05 00:12:41 +02:00
James Turner
f4318044ef
And expose the published navaid range to Nasal, since we can.
2012-04-28 23:35:19 +01:00
James Turner
78afdb3c22
Convert all the Nasal wrappers around FGPositioned to use ghost-member-access
...
Lazy-ness is good. Along the way, expose the course on ILS/LOC navaids to Nasal.
2012-04-28 23:28:12 +01:00
James Turner
a318baa9e2
Update some nasal-positioned code to use new ghost-member support
...
(Requires latest SimGear)
2012-04-28 22:33:13 +01:00
James Turner
de975699fe
Expose single-runway query on airport.
2012-04-26 00:27:18 +01:00
James Turner
4d39882ab2
Expose SGBucket index computation to Nasal.
2012-04-26 00:00:46 +01:00
James Turner
c5781546b9
Expose greatCircleMove to Nasal, and allow geo.Coord to be passed into methods.
2012-04-25 16:54:40 +01:00
Mathias Froehlich
4d6a4eb836
Fix explicit reference counting with waypoints and positions.
2012-04-24 23:25:51 +02:00
James Turner
fb66aeade1
More search functions exposed to Nasal, also airport parking.
2012-04-24 22:12:56 +01:00
James Turner
3d46809ea8
Expose waypoint source (airport/runway/navaid) to Nasal
2012-04-24 10:53:46 +01:00
James Turner
b57d24913a
Hacking to expose route/waypt data via Nasal, API not final yet.
2012-04-23 23:55:22 +01:00