From: Joakim V. <jo...@ve...> - 2004-03-31 13:47:29
|
The in the gui the selection code works by drawing a rectangle round the events you want. The filter is a gui state variable that says what type of events you want to select. A command can basically choose to ignore the filter, thats why its a separate entity from the selection. Heres what the filter dialog used to look like: http://www.jazzware.com/docs/html/jazz42.html#midifilter So the Filter is very clearly not a gui object(except you set the Filter in a gui of course). The drawing code is mostly pretty standard model-view-controller stuff, very similar to what you would do in microsofts MFC, except the jazz code is pretty confused over how this pattern is supposed to work, which I've spent a lot of time trying to fix in various parts of the code. It used to be that drawing occured in the event listeners, which really is a no-no, and led to all sorts of gui bugs in the pre-port code base. Im shure theres plenty of these problems around still. But I digress... i hope I answered your question! /Joakim Dave Fancella wrote: >All, > >Ok, now I'm pretty thoroughly confused, again. :( I'm working on making >selection and the clipboard exist inside jppProject instead of inside the >GUI. Here's what I've got: > >With an empty project, I can select events. There aren't any to select. When >I load a midi file, selection doesn't work anymore at all. (I may have >broken that, sorry!) > >I'm thoroughly confused for several reasons. First, I'm not very good at >graphics/GUI stuff when I have to build my own, so I use stock widgets pretty >much all the time. :) So I don't understand the drawing code all that well, >well, not at all, really. Second, the selection code is extremely >convoluted. I've narrowed it down, I think. > >It looks like when you're done selecting, jazz uses a Filter object to store >the selection. I feel like Marty McFly, but what the hell's a Filter? ;) >So when you do have a selection with real events in it, do the events get >copied to the filter object, or does the filter object just store locations >of those events? > >Dave > > > |