Detail Levels - Global & Channel

Started by Harbinger, April 20, 2010, 16:30:32

Previous topic - Next topic

Harbinger

Detail Level changes

I was exploring the DrawPat.cpp and ran across the CViewPattern::UpdateSizes function. I made a note to myself when i found the lines, that decide how wide to draw the channel depending on the Detail Level, that this is where we would look to alter the view of each column in the channels. After deciphering the code, i realized the pattern editor (at least for each channel) is nothing but a big -- though specialized -- text editor! By adjusting how we handle the Detail level, we can handle 2 forum requests in 1. Here's my proposal:

Change m_nDetailLevel to a bitset (or something equivalent). With 4 bits, setting a bit means that column will be drawn. So, for example, 1110 would show all but the Channel FX column, and 1010 would show only the Note and Note FX (volume command) column.
At first we should try this on a global scale -- that is, all channels must abide by the same Detail level. We simply replace the Lo-Med-Hi icons with checkboxes (with indicators like Nt-In-NF-CF for each column). When a checkbox is disabled, the Pattern Editor is redrawn without that column in each channel. I can redraw the patterns.bmp if need be.

If we can get this to work, it shouldn't be too great of a leap to make it per channel. If so, setting a channel to 0000 hides the channel, answering another post in the Features Request forum for hiding channels. The biggest hurdle there is deciding on the interface for it. If we do wish to make it on a per-channel basis, perhaps a tab in the Channel Manager will allow the user to set the checkboxes for each channel, but that's for a later discussion...

Saga Musix

I tried to make this work with a bitset some time ago, but my quick hacks did not get very far (especially because the navigation code would become a lot more complicated). I will try to look into this at some point again, but not anytime soon.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Relabsoluness

I have some preliminary code that deals with the changes needed to customise the pattern drawing(e.g. which subcolumns to draw) and based on that I would reckon that the bitset-thing would be just a little fraction of all the changes needed. Perhaps more of this once more urgent development issues are handled first.