blackball / nvidia-widgets

Automatically exported from code.google.com/p/nvidia-widgets
0 stars 0 forks source link

UIContext Class not as open as it could be... #7

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
This is an enhancement/feature request.

Since this is an open library, I'd like the ability to extend the widgets
of the UIContext class in nvwidgets.h without having to necessarily rewrite
some of the current private functions. That is, change some of the private
functions to be protected:

static bool UIContext::overlap(const Rect & rect, const Point & p);
bool UIContext::hasFocus(const Rect & rect);
bool UIContext::isHover(const Rect & rect);

Just so that if a user of the library only wants to add a couple widgets or
recombine them... rewriting the mouse calls and duplicating mouse data
wouldn't be necessary. You'd have to move some of the mouse data from
private to protected as well. 

Other functions are more intricately laced with the class and
understandably should be rewritten in the case that an inherited context is
being used...

Also, I understand that if I start adding to the classes, I have to be
ready for these functions to totally be changed or removed, and possibly it
will hurt development if someone wants to change them and a lot of people
use an older class interface. Soooooo..... this is just a request. See what
you guys think about it.

As an example, I want to add tablet support to the library... and then make
a couple redo's of the widgets to make them support pressure and tilt
changes. Perhaps that gives you an idea of what would be done... and what
might need to be added.

Original issue reported on code.google.com by Dudy...@gmail.com on 10 Jun 2009 at 7:01

GoogleCodeExporter commented 9 years ago
Thanks for the request. Similar functionality has been requested by multiple 
users
already. I agree there's a risk of breaking users code if we expose too much and
change the inner workings later. So, we have be careful with that.

BTW, if you have any patches that add support for other input devices I'd be 
happy to
integrate them.

Original comment by cast...@gmail.com on 10 Jun 2009 at 7:41