Custom cell renderer

From Buzztard

Jump to: navigation, search

In buzztard-edits sequence view we use the GtkTreeView.

requirements that are handled or known how to handle:

  • colorized backgrounds
  • folding (zooming/skipping lines)
  • playback position: when the song plays we need an indicator, buzz uses a black line that runs over the view
    • we did this by subclassing the treeview and drawing additional graphics
  • rectangular selections, focus display:
    • idea one
      • we could store selection range and focus cell in a struct (render extenstion)
      • then we have such a struct for each column and row in the model
      • the cell-renderer uses this data to determine the appearance
    • idea two
      • we do this like with the cursor display
      • here we draw first and then call super
      • problem is to determine the x-y cell locations

requirements that are open:

  • cursor display: the current line and row should be framed and only the cursor cell should be inverted
    • right now we just use a different background color for cursor and selections
  • spacing
    • we have a test where we use two tree views and synchronise their scrolling. With this we can have vertical separator lines and can avoid that the focus goes into the label column. On the other hand this makes navigation harder.
  • showing pattern length
    • we could encode the content visible in a cell as a string : "16:8#4_4#" mean 16 lines, 8 used, 4 empty, 4 used
Support Us

Collaboration

SourceForge Logo
GStreamer Logo
Become a Friend of GNOME
Linux Sound Logo
MediaWiki
Valgrind
GNU Library Public Licence
GNU Free Documentation License 1.2