I started off with the final coding sub-phase for the mid-term yesterday.
The whole ColorSelector class and the ColorWheelSelector class and their inheritance is confusing me. I need to get the ColorWheelSelector to access the GimpColorWheel member _wheel of ColorWheelSelector. How do I get hold of that object ?
I tried this snippet, but it seems to be in effective !
SPColorSelector *csel =SP_COLOR_SELECTOR(g_object_get_data((GObject*)psel->selector, "color-selector"));
ColorNotebook *nb = dynamic_cast<ColorNotebook*>(csel->base);
ColorWheelSelector *wsel = dynamic_cast<ColorWheelSelector*>(SP_IS_COLOR_WHEEL_SELECTOR(nb->getCurrentSelector()));
GimpColorWheel *wheel = wsel->getGimpWheel() ;
gimp_wheel_func ( wheel );
Also, I need to get ColorWheelSelector because to my understanding, changing the colors from the ColorWheelSelector class object shall be a good idea. Please correct me if I am wrong in my thinking. For the final working model I will have to cut off the selection signals from the ColorWheelSelector object so that the entire selection's color isn't changed when I edit the colors on the GimpColorWheel.
I hope I am clear with my doubt on the design of the interface. Its mostly 'Where to place the interface that makes the final changes'.