From: Dave F. <dav...@co...> - 2004-03-31 13:09:50
|
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 -- Visit my website! http://www.davefancella.com/?event=em An authority is a person who can tell you more about something than you really care to know. |
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 > > > |
From: Dave F. <dav...@co...> - 2004-04-01 08:13:24
|
On Wednesday 31 March 2004 12:43 pm, Joakim Verona wrote: > 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! The dialog explains everything! :) So, when you select, the GUI sets the filter to the events you selected. Then, when you copy or cut, the GUI uses the filter to copy or cut the events from the track into the clipboard. Then when you paste, it just copies events from the clipboard into the track. Hurray! ;) So I'm thinking we should keep the Filter around but put it in jppProject rather than have it hanging around as a global variable. Dave > /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 > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > jazzplusplus-devel mailing list > jaz...@li... > https://lists.sourceforge.net/lists/listinfo/jazzplusplus-devel -- Visit my website! http://www.davefancella.com/?event=em "...Unix, MS-DOS, and Windows NT (also known as the Good, the Bad, and the Ugly)." (By Matt Welsh) |
From: Joakim V. <jo...@ve...> - 2004-04-01 08:33:28
|
Dave Fancella wrote: > >The dialog explains everything! :) So, when you select, the GUI sets the >filter to the events you selected. Then, when you copy or cut, the GUI uses >the filter to copy or cut the events from the track into the clipboard. Then >when you paste, it just copies events from the clipboard into the track. >Hurray! ;) > >So I'm thinking we should keep the Filter around but put it in jppProject >rather than have it hanging around as a global variable. > > That sounds about right... Im not shure any copying is done until very late in the process. That is because the selection + filter is used as a source for a number of commands. So I dont think there really is a clipboard in the classical sense, just a way to indicate which events you want to act on, and different commands that take this notion of selected events as argument, and then acts on them. /Joakim >Dave > > > >>/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 >>> >>> >>------------------------------------------------------- >>This SF.Net email is sponsored by: IBM Linux Tutorials >>Free Linux tutorial presented by Daniel Robbins, President and CEO of >>GenToo technologies. Learn everything from fundamentals to system >>administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click >>_______________________________________________ >>jazzplusplus-devel mailing list >>jaz...@li... >>https://lists.sourceforge.net/lists/listinfo/jazzplusplus-devel >> >> > > > |