[mythtv] Trouble adding mouse support in MythVideo VideoManager

Anthony D'Alberto afd1009 at hotmail.com
Thu Oct 4 01:26:58 UTC 2007

Hello everyone,
I am currently reworking the patches for mouse support in Myth.  The MythVideo plugin seems to use a couple of items I was not expecting.  I am trying to add mouse support to the VideoManager portion, and cannot seem to find a way to do it.

Specifically, I would like the movie list to be "clickable".  It appears the m_video_list object is where the mouse press should be calculated/handled.  It appears, though, a new container and list are created in the updateMovieList member of VideoManager, used to draw the items, then dropped.  Could someone explain this a little better?  I figure the UIListType is used for ease of painting, but is not persistent.  If the list were persistent, it would be much easier to make a mouse press resolve to the list.  Is this on track? The only other way I can see of getting the mouse to work is adding an up and down arrow to the screen and manipulate the list from there.

I come from a windows programming background, so please forgive me if I tread on toes.  Should list types be subclassed?  I mean, in editing mythmusic, the UIListBtnType is used for a list with Checkboxes and such.  In order to get this to work, I had to place checkbox handler code in the class for the databasebox window.  So, instead of the list class handling the checkbox selecting and unselecting, I added a signal which is mapped in the databasebox class.  It just seems to me one would want the checkbox selection to be handled in a class derived from UIListBtnType called something like UICheckBoxListType or something.  The specific functionality is then contained in this class.  

Again, I'm not trying to make people mad. It's just as I'm going through the plugins adding mouse handler code, I have to place certain parts of the handlers in the UI types and some in the window classes which have the UI type as a member.  It seems it would be cleaner to add the handler code for special things like buttons and checkboxes and such to a subclass of the main UItype.  Sorry if I've offended.  If this is something which was decided, I again appologize.

Boo! Scare away worms, viruses and so much more! Try Windows Live OneCare!

More information about the mythtv-dev mailing list