Canvas widgets: Difference between revisions

Jump to navigation Jump to search
Line 48: Line 48:
{{#ev:youtube|CIS8UyuJLgM}}
{{#ev:youtube|CIS8UyuJLgM}}
{{#ev:youtube|Qv-uEX42QZY}}
{{#ev:youtube|Qv-uEX42QZY}}
* '''James''': "copy/paste, text selection. 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." (work in progress as of 07/2012)
* '''Hooray''': "Regarding the blinking cursor, that could obviously be implemented as a Nasal-animated svg image that is changed periodically using a timer - i.e. by showing/hiding the group element with the cursor image"
* '''Hooray''': "On the other hand, one could just as well use your canvas "groups" to support alternating/flashing contents using a new flag - sort of like a GIF image with delays between each image element."
* '''TheTom''': "I think the canvas is now reaching a pretty usable state so maybe it's time for some more documentation, tutorials etc."
* '''TheTom''': "I think the canvas is now reaching a pretty usable state so maybe it's time for some more documentation, tutorials etc."
* '''TheTom''': "I finally found some time to do create a PUI widget for displaying a Canvas object. Have a look at the wiki for a screenshot and some more information Currently there is only a Nasal callback on loading the canvas and it is possible to access the canvas from Nasal command bindings (The load callback uses the same Nasal module). Adding mouse callbacks in the GUI seems like it will be an easy task to do..." [https://gitorious.org/~tomprogs/fg/toms-flightgear/commit/d7cad763f665612f07c615e710d5db0e35cda53a]
* '''TheTom''': "I finally found some time to do create a PUI widget for displaying a Canvas object. Have a look at the wiki for a screenshot and some more information Currently there is only a Nasal callback on loading the canvas and it is possible to access the canvas from Nasal command bindings (The load callback uses the same Nasal module). Adding mouse callbacks in the GUI seems like it will be an easy task to do..." [https://gitorious.org/~tomprogs/fg/toms-flightgear/commit/d7cad763f665612f07c615e710d5db0e35cda53a]
Line 68: Line 64:
* '''[[Canvas Maps|Geographic Mapping]]''': It's very experimental, missing different projection modes (eg. vertical projection) and especially the Nasal API feels very hackish. {{Progressbar|50}}
* '''[[Canvas Maps|Geographic Mapping]]''': It's very experimental, missing different projection modes (eg. vertical projection) and especially the Nasal API feels very hackish. {{Progressbar|50}}
* '''Animations''': I don't know if we should do animations just by using interpolator and settimer from Nasal or if we should implement some time-based animations directly in C++. At least we need some helper functions (eg. for blinking elements -> cursor, fading, ...) It would also be possible to implement animations purely in Nasal space, e.g. by supporting a subset of SMIL for SVG, so that existing tools could be used to created animated vector images that are converted to canvas properties by the Nasal parser.
* '''Animations''': I don't know if we should do animations just by using interpolator and settimer from Nasal or if we should implement some time-based animations directly in C++. At least we need some helper functions (eg. for blinking elements -> cursor, fading, ...) It would also be possible to implement animations purely in Nasal space, e.g. by supporting a subset of SMIL for SVG, so that existing tools could be used to created animated vector images that are converted to canvas properties by the Nasal parser.
** '''James''': "copy/paste, text selection. 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." (work in progress as of 07/2012)
** '''Hooray''': "Regarding the blinking cursor, that could obviously be implemented as a Nasal-animated svg image that is changed periodically using a timer - i.e. by showing/hiding the group element with the cursor image"
** '''Hooray''': "On the other hand, one could just as well use your canvas "groups" to support alternating/flashing contents using a new flag - sort of like a GIF image with delays between each image element."
* <del>Improve PUI to allow eg. receiving mouse over events.</del> (osgGA will be used) {{Done}}
* <del>Improve PUI to allow eg. receiving mouse over events.</del> (osgGA will be used) {{Done}}
* '''Improve the Nasal API''': Add some helper functions for animating different glass cockpit displays (I have already some basic code, but it needs some generalization).
* '''Improve the Nasal API''': Add some helper functions for animating different glass cockpit displays (I have already some basic code, but it needs some generalization).

Navigation menu