-
-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add a treevert widget #1164
Comments
This should probably just be an extension of multiselectors, I am thinking? Or perhaps we want arbitrary actions to be performable against each item -- think |
Yeah, I think we ultimately want a generalized multiselector, one where you can define multiple states (as opposed to just 2), specifying at a minimum the channels and state glyph. That gets us just about everything we need for a sweet APT clone. |
This is a necessary element for Project Aptotheosis, and is the major new work goal of 2.3.0. |
So the really fundamental difference here from the other selectors is that one option can affect other options, and one action can affect multiple options. so let's go ahead and make this fully general, which will probably involve some callbacks. i'm thinking:
|
I'm considering various Aptotheosis strategies, and how they might be implemented...
|
are groups wholly distinct from items? i.e. is it always "Group 1, containing Item 1 and Item 2" or can it be "Item 1, containing Item 2 and Item 3"? is there aliasing? i.e. can we have "Group 1, containing Item 1" and "Group 2, containing Item 1"? |
If we do the draw-via-callback outlined above, ought we leave all styling decisions to the callback? Hell, ought we leave all output decisions to the callback? Ought we extend that even to groups/headers?
I think we ought allow aliasing, especially if all we're keeping is a regarding groups vs items...we're going to be supporting most of the actions one can take on an item on groups. i.e. in aptitude one can press '+' to install a package, or '+' to install all the packages of a group. so the callbacks are going to need to know how to handle this for groups already. that could be implemented via distribution, though... groups must support expand+collapse, whereas items do not need to...hrm. but that could just be implemented as e+c for the groups and a null action for the items en callback...hrmmm....would we ever want to stylize groups? i think maybe so. so what is this widget really doing? and i think here we can truly take lessons from
the question becomes: do we also want it responsible for display (not shaping) of items/groups? allowing it to is convenient, but delegating it to the client code is much more flexible. it honestly answers most of our design questions thus far. and we could always of course provide a yessssssssssssssssssssssssssss. so this answers both of our hypothetical scenaria above: you are passed an is it going to be fast enough? if we cache while visible, i'd certainly think so. but in the worst case, we're starting up with a full screen worth of items, none of them seen before. that's at most R callbacks on R rows, using at least R gaze into your omphalos. |
so the final question: are groups distinct from items? i think no. i think the structure we want to prep the struct treeitem {
unsigned childrencount;
struct treeitem* children;
void* curry;
}; and unsigned topcount;
struct treeitem* tops; and that's it. each so, i think we have our design. =] |
Well, there's one last question: how do we indicate change to an item not instigated by a standard action? A: the same way we do with i think best would be: widget-side invalidate with callback on |
As either its own widget or an extension to multiselect, we ought have a selection widget that allows items to be expanded. Think of your canonical linux/freebsd old-skool installer. I ought be able to select "editors" and have them all select/unselect, or expand "editors" and select from among them. "editors" ought then be collapsible.
Probably this is best done as an extension to
multiselector
, assuming we can do it with backwards compatibility.The text was updated successfully, but these errors were encountered: