Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: MortenMacFly on September 04, 2008, 10:12:47 am

Title: wxSmith: wxCheckListBox missing events?
Post by: MortenMacFly on September 04, 2008, 10:12:47 am
Dear Byo,

not that you are back (welcome! ;-)) I can post my question, too.

I am using a wxCheckListBox control in a project of mine using wxSmith (of course). I need to connect to the "wxEVT_COMMAND_LISTBOX_DOUBLECLICKED" event. Unfortunately wxSmith does offer only one event - the one special for a wxCheckListBox, namely "wxEVT_COMMAND_CHECKLISTBOX_TOGGLED".

I had a look in the code and I wonder how you handle "event inheritance" in general. I mean: A wxCheckListBox also supports the events of a wxListBox which also supports all events of a wxControlWithItems etc...

Is such thing considered or would I need to add all relevant events to wxCheckListBox (wxschecklistbox{.h/.cpp}) at the risk of duplicates?

What are the design guidelines?
Title: Re: wxSmith: wxCheckListBox missing events?
Post by: byo on September 04, 2008, 11:35:46 pm
Hmm, honestly I haven't even thought about event inheritance in wxWidgets :oops:. Currently I would prefer just to enumerate all events related to item inside item's list because there are no inheritance structures available yet and sometimes it's better to disable specific event available in parent because it doesn't work as it should in child item.

Now since I still have crazy time and very little rest (hope it will end within the next week), can you (or maybe someone else) prepare list of missing events in items ? Or maybe even the sources could be updated since it's quite easy to add new event. If one want to put changes to the source code, I request to check whether added events work on at least windows and linux.

Regards
   BYO
Title: Re: wxSmith: wxCheckListBox missing events?
Post by: MortenMacFly on September 05, 2008, 10:46:46 am
can you (or maybe someone else) prepare list of missing events in items ? Or maybe even the sources could be updated since it's quite easy to add new event.
That's what I was actually asking for. ;-)

I think you are right - events should be directly put into the wx item even at the cost of duplicates. I just wanted to know if you have other design guidelines.

So... I already did this for wxCheckListBox (without telling you :oops:). If I get you right we are allowed to commit such changes and (step-by-step) I think we can update the controls... Sounds good to me.
Title: Re: wxSmith: wxCheckListBox missing events?
Post by: byo on September 08, 2008, 10:33:38 am
can you (or maybe someone else) prepare list of missing events in items ? Or maybe even the sources could be updated since it's quite easy to add new event.
That's what I was actually asking for. ;-)

I think you are right - events should be directly put into the wx item even at the cost of duplicates. I just wanted to know if you have other design guidelines.

So... I already did this for wxCheckListBox (without telling you :oops:). If I get you right we are allowed to commit such changes and (step-by-step) I think we can update the controls... Sounds good to me.

Feel free to update the sources :)

BYO