Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Protected Attributes | Static Protected Attributes
CMultiDownloadProgress Class Reference

#include <UDownloadDisplay.h>

Inheritance diagram for CMultiDownloadProgress:
Inheritance graph
[legend]
Collaboration diagram for CMultiDownloadProgress:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 CMultiDownloadProgress ()
virtual ~CMultiDownloadProgress ()
virtual void AddDownloadItem (CDownload *aDownloadItem)
virtual Boolean AllowSubRemoval (LCommander *inSub)
virtual Boolean AttemptQuitSelf (SInt32 inSaveOption)
virtual void ListenToMessage (MessageT inMessage, void *ioParam)

Protected Attributes

CMultiDownloadProgressWindowmWindow

Static Protected Attributes

static bool sRegisteredViewClasses = false

Detailed Description

Definition at line 69 of file UDownloadDisplay.h.


Constructor & Destructor Documentation

Definition at line 62 of file UDownloadDisplay.cpp.

                                               :
    mWindow(nil)
{
    if (!sRegisteredViewClasses) {
        RegisterClass_(CMultiDownloadProgressWindow);
        RegisterClass_(CDownloadProgressView);
        RegisterClass_(CIconServicesIcon);
        sRegisteredViewClasses = true;
    }
}

Definition at line 73 of file UDownloadDisplay.cpp.

{
}

Member Function Documentation

void CMultiDownloadProgress::AddDownloadItem ( CDownload aDownloadItem) [virtual]

Implements ADownloadProgressView.

Definition at line 77 of file UDownloadDisplay.cpp.

{
    if (!mWindow) {
        mWindow = static_cast<CMultiDownloadProgressWindow*>
            (LWindow::CreateWindow(wind_DownloadProgress, this));
        ThrowIfNil_(mWindow);
        
        // Add this as a listener to the window so we can know when it's destroyed.
        mWindow->AddListener(this);
    }
    
    // Create the view...
    LView::SetDefaultView(mWindow);
    LCommander::SetDefaultCommander(mWindow);
    LAttachable::SetDefaultAttachable(nil);

    CDownloadProgressView *itemView = static_cast<CDownloadProgressView*>
        (UReanimator::ReadObjects(ResType_PPob, view_DownloadProgressItem));
    ThrowIfNil_(itemView);
    
    // and add it to the window.
    mWindow->AddDownloadView(itemView);
    itemView->SetDownload(aDownloadItem);
}

Here is the call graph for this function:

Boolean CMultiDownloadProgress::AllowSubRemoval ( LCommander *  inSub) [virtual]

Definition at line 105 of file UDownloadDisplay.cpp.

{
    return (!mWindow || (inSub == mWindow && mWindow->ConfirmClose()));
}

Here is the call graph for this function:

Boolean CMultiDownloadProgress::AttemptQuitSelf ( SInt32  inSaveOption) [virtual]

Definition at line 113 of file UDownloadDisplay.cpp.

{
    return (!mWindow || mWindow->ConfirmClose());
}

Here is the call graph for this function:

void CMultiDownloadProgress::ListenToMessage ( MessageT  inMessage,
void ioParam 
) [virtual]

Definition at line 118 of file UDownloadDisplay.cpp.

{
    if (inMessage == msg_BroadcasterDied &&
        (CMultiDownloadProgressWindow*)((LBroadcaster*)ioParam) == mWindow)
        mWindow = nil;
}

Member Data Documentation

Definition at line 91 of file UDownloadDisplay.h.

Definition at line 89 of file UDownloadDisplay.h.


The documentation for this class was generated from the following files: