Hello Miguel!
I hope it does not mind you that I put in CC the developers mailing
list. This kind of questions could be very interesting for other
developers.
A wxWidgets event can be handled by multiple member functions. This is
achieved calling the function event.Skip( ) inside the first member
function that handles the event. If there are other member functions
pending to process this event, the next member function will be called. You
can read more here:
http://docs.wxwidgets.org/2.8/wx_eventhandlingoverview.html#eventhandlingoverview
.
The class wxSliderWithTextCtrl defines two member functions:
OnTextCtrl() and OnSlider() for handling the changes in the values of the
controls wxTextCtrl and wxFloatSlider. Inside these member functions, the
function event.Skip() is already called. You can define your member
functions in your panel widget and these will be called automatically to
handle this events.
For example, if you panel widget name is MyPanelWidget and the parent
class is MyPanelWidgetUI, this will be the event handler definition table:
BEGIN_EVENT_TABLE(MyPanelWidget,MyPanelWidgetUI)
EVT_TEXT(wxID_ANY, MyPanelWidget::OnTextCtrl)
EVT_COMMAND_SCROLL(wxID_ANY, MyPanelWidget::OnSlider)
END_EVENT_TABLE()
Each member function needs to retrieve what is the Event Object that
generated the event and do the corresponding functionality. To do this, we
should add two functions in the class wxSliderWithTextCtrl to retrieve the
wxTextCtrl and the wxFloatSlider control instances and compare these.
Another option could be the one you proposed: to create a subclass of
wxSliderWithTextCtrl and overwrite the handlers of the parent class.
However, this will also require to change the two member functions of
wxSliderWithTextCtrl to virtual.
I propose you to work on the first option and send me the modifications
that you need, so I can apply them to GIMIAS-1.5. Plese let me know if this
works or you have more questions.
Best regards,
Xavi
2012/12/14 Miguel Martin-Fernandez <[email protected]>
> wxSliderWithTextCtrl
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Gimias-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gimias-developers