[Gambas-devel] To Tobias : about gb.ncurses interface

tobi tobias at ...692...
Mon Jun 4 18:14:01 CEST 2012


On Sun, 03 Jun 2012, Benoît Minisini wrote:
> Hi Tobi,
> 
> Here is a few (strong) suggestions about the gb.ncurses interface :-)
> 
> This is mainly some symbol renaming for simplification and coherency 
> with other components.
> 
> Tell me of course if you disagree or if you have a better solution!
> 
> Color class
> -----------
> 
> I suggest splitting the class, and having a Color class for colors, and 
> a Pair class for pairs.
> 
> Color.Capabilities.Color ---> Color.Available
> 
> Color.Capabilities.Change ---> Color.CanChange
> 
> Color.Colors ---> Color.Count
> 
> Color[] ---> Pair[]
> 
> Color.Pairs ---> Pair.Count
> 
> Color.Content & Color.Define ---> Color[].{Red,Green,Blue}
> 
> Color.Define ---> Color.Set
> 
> I strongly suggest to use floating point values between 0.0 and 1.0 for 
> color components, and not the library values between 0 and 1000.
> 
> Window class
> ------------
> 
> ContainerW & ContainerH: I don't like the name of these properties. :-)
> 
> Are they really useful? Can't we assume that the window border is always 
> one character?
> 
> Otherwise, can't you have X,Y,W,H property for the outer, and 
> ClientX,ClientY,ClientW,ClientH for the inner, like in gui components?
> 
> Screen class
> ------------
> 
> Screen.Repeater ---> Screen.RepeatDelay
> 
> That's all at the moment! Now waiting for your comments...
> 
> Regards,
> 
> -- 
> Benoît Minisini
> 
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Gambas-devel mailing list
> Gambas-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-devel
> 

I cannot disagree to "strong" suggestions ;)

In fact, splitting Color to Color and Pair is a good idea.

I didn't concern much with the Color class yet. I remember to have read something about the
[0..1000] arguments but I simply didn't recognise it (strange, because I wrote the code :)),
will be done.

So, the next thing - if I ever finish that NoDelay input mode - would be to implement controls. I
have only some thoughts and half of a draft about that but it will likely turn the Window class into
a container-only object, so, in the future, there will be no distinction (and yes, in the meantime,
we can assume that borders are one character each)

Screen.RepeatDelay is o.k., too.

Regards,
Tobi





More information about the Devel mailing list