Canvas widgets: Difference between revisions

Jump to navigation Jump to search
m
Line 60: Line 60:
* '''[[Canvas Properties#Static Textures & Cascaded Canvases|Support images inside Canvas]]''' (will also be needed for implementing the 2D panel wrapper): We need a new element type to also display images and other textures (eg. also the texture of another canvas) inside a canvas. Not everything can easily be represented using just vector graphics, so images will also be needed. {{Not done}}
* '''[[Canvas Properties#Static Textures & Cascaded Canvases|Support images inside Canvas]]''' (will also be needed for implementing the 2D panel wrapper): We need a new element type to also display images and other textures (eg. also the texture of another canvas) inside a canvas. Not everything can easily be represented using just vector graphics, so images will also be needed. {{Not done}}
* '''Window Stacking''': New windows always appear on top of older windows. It would be nice to have the possibility to change stacking order (either reorder the windows or use z-buffer with different z-values) The window manager could eg. listen on a special signal property on each window (eg. /sim/gui/canvas/window[i]/raise) which moves the according window to the top of the current window stack. I'd prefer window reordering because it would make checking for a window at a given position very ease, because we'd just have to check for the first match in revers stacking order (from topmost to lowest window).{{Not done}}
* '''Window Stacking''': New windows always appear on top of older windows. It would be nice to have the possibility to change stacking order (either reorder the windows or use z-buffer with different z-values) The window manager could eg. listen on a special signal property on each window (eg. /sim/gui/canvas/window[i]/raise) which moves the according window to the top of the current window stack. I'd prefer window reordering because it would make checking for a window at a given position very ease, because we'd just have to check for the first match in revers stacking order (from topmost to lowest window).{{Not done}}
* '''[[Canvas Widgets#Picking & Widget_Callbacks|Picking]]''': For mouse handling some kind of picking would be nice. As already mentioned, at least bounding box intersections will be needed.Forward mouse events to canvas elements (trigger onhover, onclick, etc.) The canvas could listen for creation of the signal properties and then add the according region to a list of monitored regions. If the cursor is in one of the regions the property is signaled.[[File:Progress 40%.png]]
* '''[[Canvas Widgets#Picking & Widget_Callbacks|Picking]]''': For mouse handling some kind of picking would be nice. As already mentioned, at least bounding box intersections will be needed.Forward mouse events to canvas elements (trigger onhover, onclick, etc.) The canvas could listen for creation of the signal properties and then add the according region to a list of monitored regions. If the cursor is in one of the regions the property is signaled. {{Progressbar|40}}
* '''[[#Multiplatform Clipboard Support (native Copy/Paste)|Support copy&paste]]''': I'm working on the selection part, but have no clue yet on how to access the system clipboard.{{Pending}} [[File:Progress 30%.png]]
* '''[[#Multiplatform Clipboard Support (native Copy/Paste)|Support copy&paste]]''': I'm working on the selection part, but have no clue yet on how to access the system clipboard.{{Pending}} {{Progressbar|30}}
* '''Keyboard input''': I haven't thought too much about it and also haven't done anything, but we will definitely need access to keyboard events {{Not done}}
* '''Keyboard input''': I haven't thought too much about it and also haven't done anything, but we will definitely need access to keyboard events {{Not done}}
* '''Clipping''': For different reasons we will need to be able to clip some elements to certain regions. It should work with specifying either a clipping rectangle or by using a path. OpenVG seems to have support for it, although I haven't looked into it too deep. We also need to ensure that it also works with text. At least rectangular regions are needed.(eg. group/clip-min[0..1], group/clip-max[0..1]) {{Not done}}
* '''Clipping''': For different reasons we will need to be able to clip some elements to certain regions. It should work with specifying either a clipping rectangle or by using a path. OpenVG seems to have support for it, although I haven't looked into it too deep. We also need to ensure that it also works with text. At least rectangular regions are needed.(eg. group/clip-min[0..1], group/clip-max[0..1]) {{Not done}}
* '''[[Canvas Maps|Geographic Mapping]]''': It's very experimental, missing different projection modes (eg. vertical projection) and especially the Nasal API feels very hackish. [[File:Progress 50%.png]]
* '''[[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 be 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 be 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.
* <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}}

Navigation menu