View objects need a new concept which I describe as "flow". Cleanup layout and alignment, for instance, both should act only on a certain subset of objects. I think these are the same subset too - presently plots. View objects should have a boolean flag that can be queried to determine if an object followsFlow() and only then should they be used for flow-related operation. This will give a performance boost and cleanup the code for gridding and aligning.
Can you explain a bit more ? Attach a (even fake) screenshot ?
On Thursday 29 December 2005 09:00, StXXphane Gourichon wrote: > ------- Can you explain a bit more ? Attach a (even fake) screenshot ? The important thing, to start, is that "cleanup" will only cleanup objects like plots. They will go onto a grid, whereas non-plots (lines, labels) which are at the top level will just float or stay where they are. I don't have a screenshot right now.
Is this done?
No
Should be fixed for 1.2.1 release
I think it is a good idea to layout only plot objects and not top-level objects (like labels), better anyway than what is done right now. However, I don't see how we can avoid covering some plots with the top-level floating objects (which will result in user complaints), unless we implement the "flow-around" part of bug #109430. In the discussion attached to bug #109430, George mentioned that there is no clear concept as to how this could be done. Maybe I have missed some issues, but to me it does not sound utterly complicated to maintain a list of objects with the "flow-around" property set, and determine the area available to layout plots as the biggest interior rectangle. "Cleanup layout" would only use this area, thus avoiding interference with objects that the users may have put on the sides... Note that this is a very important request for me, as many people here complain that they cannot easily add extra information in their windows while preserving all the nice layouting functionality kst offers.
view objects currently have a followsFlow method which cleanup() uses to decide if an object should be moved or not. Currently labels and plots seems to set followsFlow and everthing else does not. I propose that the following objects follow flow: -2dplots -non-transparent labels with autoresizefortext not set everything else should not follow flow.
Created attachment 16648 [details] Proposed patch Implements flow for plots and non-transpraent non-auto-resize labels, as proposed by Barth.
Looks good to me.
Upon consideration, perhaps metaplots and boxes might want to flow. Would it be useful to have flow settable in the dialog for certain objects?
After discussion on the list, and more thinking I change my suggestion to: -change nothing except whether certain objects follow flow. -plots, meta plots, and boxes follow flow. Nothing else does. If you want a legend or label to follow flow, put it in a box. Don't change any of the class structure. flip/flop/flip/flop... sigh...
In which case no changes are required. Can this be withdrawn then?
Right now labels also follow flow... I guess that they shouldn't.
SVN commit 552215 by arwalker: BUG:115136 Do not have labels follow flow M +0 -2 kstviewlabel.cpp --- trunk/extragear/graphics/kst/src/libkstapp/kstviewlabel.cpp #552214:552215 @@ -59,7 +59,6 @@ : KstBorderedViewObject("Label") { _fallThroughTransparency = false; _container = false; - setFollowsFlow(true); _dataPrecision = 8; _autoResize = false; // avoid madness _txt = txt; @@ -84,7 +83,6 @@ // some defaults and invariants _fallThroughTransparency = false; _container = false; - setFollowsFlow(true); _type = "Label"; _dataPrecision = 8; _autoResize = false; // avoid madness
So, how can one create say a box at the bottom of the page to put some textual information, and prevent it from covering/being covered by plots when cleaning up the layout ? Maybe there are two different notions here: followsFlow() to say it should be moved when relayouting and borderObject() (or smth of the kind) to say plots or other view objects should not cover that object (basically, they would be "pinned on top" and determine areas where cleanup layout can't put anything). We could add a checkbox in the UI for such objects, and try to find a simple enough algorithm to determine the useful plotting area (in the simplest case, the interior rectangle as explained above, and it would be up to the user to make sure that he does not put such objects in the middle). Should I open a separate report for this as I don't think the current functionality allows it ? I could also post screenshots of what I expect to be able to do easily...
Change version to 1.x