"Very nice looking GUI. [..]..but you may have your reasons."
I appreciate that comment from a Chancellor, that must be like a Warlock or something ;-) And no, I really don't have my reasons, except it seemed cool, and this initial experiment confirms so.
Thank you very much for the text positioning snippet, I wonder how many digits away I was ;-)
Can't believe I didn't notice/realize what the clone() function was for *blush*. But there is a different feature of the ButtonFactory() approach - it allows me to isolate a number of arbitrary-depth group/item definitions (i.e. Tk::Zinc::Graphics).
So, does spawning the initial item from a ButtonFactory() and then cloning make any sense? What is the Warlock approach to isolating item templates? - Subclassing, or?
"[..] pop a warning saying scaling is disabled during dragging? How often is someone going to want to do that anyways?"
Considering I will most likely be the only user of this program ever, it is clearly not that much of an issue. Nevertheless, I want to get it right. I can easily imagine doing different tasks on different scale levels, say, zooming out and selecting some items to drag them to the other other side of the workspace, then zoom back in over that area to fine-tune alignment etc. If the program was usable, I would do this all the time.
In mostly any visual GUI sense that I can think of, retaining 1:1 relation between the user's input and visual translation makes the most sense. I expect this to be possible by somehow transforming the coordinates between the two systems, the question is how!;-) (this "feature" seems to be present in the Zinc demos that have both scale and drag, by the way)
"[..] All I can say is I spent a few hours experimenting before I got it right. :-)"
In that case, I think I'll leave it for the next Big Rewrite ;-)
"If you are referring to the drag/scale problem, .."No, actually I was not. Let me clarify. In the interface_math sub, I perform some calculations based on totally random factors;
The point is, this code can break under a huge number of circumstances. My question is if there exists a framework or standardised method for making these interface related decisions?
"[..] if the scale is changing while you drag [..]"
I think you may have missed the point here; The problem is not while you zoom, it's that, once you have zoomed, to any level but the startup factor 1, the dx/dy is borked for the application lifetime. It gets worse the further you are from scale 1, so hit + or - a few times and then move items to see the bug at work.
Apologies for the comment on code clarity in the demos, I was referring to the testGraphics.pl demonstrating tabBox in particular..No spells, please! Will update the main post.
Thanks for your valuable input!
In reply to Re^2: Total Newbies TkZinc questions
by rocklee
in thread Total Newbies TkZinc questions
by rocklee
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |