kenobi
1/5/2015 12:55:00 PM
W dniu poniedzialek, 5 stycznia 2015 13:14:53 UTC+1 uzytkownik malcolm...@btinternet.com napisal:
> On Monday, January 5, 2015 11:49:11 AM UTC, Richard Heathfield wrote:
> > malcolm.mclean5@btinternet.com wrote:
> >
> > <snip>
> >
> > > The question is whether to have a global cursor, or to attach one to each
> > > window.
> >
> > That isn't a question that others can answer for you. But if you decide to
> > go with local cursors, I would do it like this (NB getcursor() is pseudocode
> > for whatever BabyX's cursor-pointer-getting function is called):
> >
> > cursor = wnd->getcursor(); /* get THIS window's cursor */
> > if(cursor == NULL) /* haven't got one? Okay, we have a plan for that... */
> > {
> > if(parent != NULL)
> > {
> > cursor = wnd->parent->getcursor();
> > }
> > else
> > {
> > cursor = getglobalcursor();
> > }
> > }
> >
>
> That sounds like a good system.
>
> Windows made the design decision, bad in hindsight, to attach a cursor to each Window class.
> So all the buttons and all the edit boxes have the same cursor, but a button doesn't necessarily
> have the same cursor as an edit box.
>
think that making a cursor slot in each entity
of any controll is a good idea, on NULl using the parent name (in designer way of what parency meand, may be on type or holder),
such decissions seem to be easy for me personally
> I originally planned for Baby X to be good for mixing and matching under X, so I didn't define
> a total Baby X hierarchy. I found that the experimental programs I was trying out always worked
> best under Baby X only mode. But I'm not sure that still holds true, I can see someone wanting
> the font picker dialog, for example, in a program which is otherwise non-Baby X . He's got to
> pull in a an awful lot of files to do it, but some people don't mind that (in terms of bytes,
> these days it's trivial).