On 24 Jul 2012, at 23:11, Thomas Geymayer wrote:

>> Do you think
>> you'd be able to handle a blinking insertion point and a standard
>> draggable text selection area in this approach? Obviously it might
>> need some additional C++ helpers but that's okay since text-editing
>> is a pretty specialised behaviour.
> 
> Yes :)
> 
> http://youtu.be/CIS8UyuJLgM
> 
> I have just added some property change listeners to get the position of
> the next character at a given position. The highlighting happens only
> from Nasal. What is currently missing is the possibility to also change
> the color of the selected text and to actually get the selected text,
> but this shouldn't be too hard to implement.

Videos convince me very easily!

I think we need a bit of discussion about the architecture for this approach, 
especially to define a widget abstraction (maybe C++, maybe nasal) so dialog 
authors can't break widget functionality unintentionally, but aside from that I 
can't see many potential problems; Nasal can already process the GUI files 
since they're property lists.

(I'm imagining a C++ factory function that takes a property node and builds a 
widget - this would be exposed via a Nasal API - and even if it called back to 
a Nasal definition for each widget type, would still allow us to build custom 
widgets using the C++ canvas API if required)

The map-widget, route-manager waypoint list and airport-list widgets would need 
some porting, but that's all pretty valuable anyway - especially for the 
map-widget. As you say once it's done it would be re-usable for in-cockpit 
displays which is all good. Since I created the Map-widget I've added a whole 
bunch of Nasal APIs to query the navDB so that part of the map-widget is doable 
without C++ now too.

Oh, and we need the option to keep the native menu-bar on Mac of course ;)

James
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to