On Oct 29, 2010, at 8:15 AM, Tim Edwards wrote: > Kuba, > >> Nothing seems to check for SELECT_HIDE. Should disable/enable_selects >> be removed, or should the checking be implemented? > > Ah, that's a tricky one! You'll notice that if you select an element > and do "Edit->Select Filter->Disable Selection", it really works. . . > you can't select the element any more! > > Why? Because the SELECT_HIDE bit is stuck (along with some other bits) > in the "type" record of the element. The selection routine is passed > a bitmask of types to look for, and it ignores all others. When the > "SELECT_HIDE" bit is added to an element's type, the type value changes, > and it no longer matches any bitmask value passed to the selection > routine. > > The upper bits (including SELECT_HIDE) are often masked out by using > the ALL_TYPES or VALID_TYPES macros. The other bits, though, like > REMOVE_TAG, NETLIST_INVALID, and DRAW_HIDE, all apply to elements that > would not be selectable anyway (in particular, if you don't draw an > element, you definitely don't want to be able to select it, so DRAW_HIDE > also makes an element unselectable). > > That's probably just the kind of code hack that you despise, since it's > impossible for even a good code reader like you to figure out what's > going on. So feel free to re-implement it.
What I've done is simply removed all this for now. It's a regression, but oh well. It'll be added later. The type field is now an invariant, like it should be. I'm working on getting the parameter system cleaned up (viva QMap<QString, oparam>). Then color inheritance should be done with parameters. And then I can have a sane drawing context. Sigh. If you could give me a tutorial on how parameters are implemented, that'd be great. I have a vague feel for oparam and eparam, but what I don't get is exactly how propagation is supposed to work, and how can you modify the parameters. I can trivially parametrize, say, object's position -- the object then shows up with a little circle on it (that's the parameter indicator), so of course I can't move it anymore. Now how do I specify the value of the parameter? I also think that somewhere along the process I'll completely get rid of XCircuit fonts. Before I do that, the big question: do local fonts print out, or are they merely facades? IOW, is it possible to make custom characters using XCircuit font files without having matching postscript fonts? Using Qt I can implement embedding *any* platform fonts as postscript fonts if there would be a need for it (for document portability and such). -- Kuba _______________________________________________ Xcircuit-dev mailing list [email protected] http://www.opencircuitdesign.com/mailman/listinfo/xcircuit-dev
