Download shelfThere are two main aspects to the download shelf: the logical shelf ( DownloadShelf), which is cross-platform, and the GUI element which is specific to each platform (on Windows, this is DownloadShelfView). Each download shelf is owned by a TabContents. The logical shelf acts as an abstraction layer and allows the TabContents to act on the shelf in a platform agnostic manner. The GUI shelf inherits from the logical shelf as well as platform-native UI classes. Download items on the shelfThe logical shelf knows nothing of the download items ( DownloadItemModel instances) it contains. For each DownloadItemModel the shelf receives, a GUI shelf item (on Windows, DownloadItemView) gets created and linked to it. All interaction between the shelf and the download item is handled via the GUI shelf item. For example, the circular progress bar is controlled by the shelf item and progress is measured by querying the associated DownloadItemModel. |