Ask Your Question

betacentauri's profile - activity

2020-04-09 14:05:58 -0500 received badge  Notable Question (source)
2018-06-28 02:23:49 -0500 received badge  Popular Question (source)
2015-08-03 11:55:52 -0500 commented answer Trackbar callback as a member function

Thank you Steven, I'm aware of this. The fact is, much of the operation in my app is determined by the kind of control trackbars provide. So I'm doing initial testing with the native GUI elements and then I am confident to deal with the whole under GTK+.

2015-08-03 07:49:12 -0500 received badge  Editor (source)
2015-08-03 07:17:49 -0500 commented answer Trackbar callback as a member function

===> W O N D E R F U L <===

Sorry to clutter the forum like this but I'm too excited - I've searched so hard for this. THANK YOU.

2015-08-03 07:15:59 -0500 received badge  Supporter (source)
2015-08-03 07:15:55 -0500 received badge  Scholar (source)
2015-08-03 06:33:57 -0500 asked a question Trackbar callback as a member function

I am modeling my whole app with one class, let's call it X. As I intend to have many X objects, I need to use a Videocapture object as a member of each X object and I need to have a member function thereof to act as a callback for GUI trackbars. Plus, my callback needs to access X.cap status. However, C++ pointers to functions as required by createTrackbar() have to be either global or static, thus defeating the idea of having many X objects. Has somebody worked around this problem? StackOverflow and other communities present non-working or non-feasible solutions. Thank you in advance!

EDIT: In all fairness, StackOverflow user Danieloffers a good, similar response I was not able to understand in