Usually, a view object has parallel arrays, which map directly to lines in the message list:
- m_keys - msg hdr key
- m_flags - 32 bits, combination of msg hdr flags and view-only flags (e.g., collapsed)
- m_level - the indentation level when in threaded mode).
- m_folders - cross-folder views only (nsMsgSearchDBView and its descendent, nsMsgXFVirtualFolderDBView)
Most of the time, the thread pane is driven by an nsMsgThreadedDBView object (even when we're in a flat sort). If the user does a quick search or picks a view from the view menu, we create an nsMsgQuickSearchDBView. Advanced search results are displayed with an nsMsgSearchDBView, and cross-folder saved searches use nsMsgXFVirtualFolderDBView, which inherits from nsMsgSearchDBView.
nsMsgGroupView is used when grouping is turned on. One unique thing about nsMsgGroupView is that instead of using the msg db's nsMsgThread objects like the other view classes, it uses an nsMsgGroupThread object, which also implements nsIMsgThread.
View Flags and Types
View Interaction with nsITreeView
The nsITreeView methods in nsMsgDBView.cpp control the appearance of the thread pane.
and the theme uses these properties to style the thread pane, e.g., http://mxr.mozilla.org/mailnews/source/mail/themes/qute/mail/mailWindow1.css#85
getCellText tells the treeview what text to display for a particular row and text column.