/////////////////////////////////////////////////////////////////////////////
// Name:        progresspanel.h
// Purpose:     wxProgressPanel abstract interface
// Author:      Francesco Montorsi
// Modified by:
// Created:     15/06/2006 21:21:31
// RCS-ID:      $Id: progresspanel.h,v 1.3 2007/01/20 22:53:26 frm Exp $
// Copyright:   (c) 2004 Francesco Montorsi
// Licence:     wxWidgets license
/////////////////////////////////////////////////////////////////////////////

#ifndef _PMPROGRESSPANEL_H_
#define _PMPROGRESSPANEL_H_

/*!
 * Includes
 */

#include "wx/panel.h"
#include "wxp/package.h"



/*!
 * wxProgressPanel class declaration
 */

class wxProgressPanel: public wxPanel
{
public:
    /// Constructors
    wxProgressPanel( ) {}
    
    
public:     // abstract interface

    virtual void SetPackage(const wxPackage &pkg)
        { m_pkg=pkg; }

    virtual void Start() = 0;
    virtual void Stop() = 0;

    virtual bool IsProcessing() const = 0;
    virtual bool IsSuccessful() const = 0;

    virtual wxString GetLogData() const = 0;
    virtual wxString GetLogLabel() const = 0;

    virtual void ClearControls() = 0;

protected:      // variables

    wxPackage m_pkg;
};


// ----------------------------------------------------------------------------
// wxEVT_COMMAND_PROGRESS_END
// ----------------------------------------------------------------------------

BEGIN_DECLARE_EVENT_TYPES()
    //DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP, wxEVT_COMMAND_FILTER_PACKAGES, 1000000)
    DECLARE_EVENT_TYPE(wxEVT_COMMAND_PROGRESS_END, 2000000)
    DECLARE_EVENT_TYPE(wxEVT_COMMAND_PROGRESS_FAILED, 2003240)
END_DECLARE_EVENT_TYPES()

#define EVT_PROGRESS_END(id, fn) \
    wx__DECLARE_EVT1(wxEVT_COMMAND_PROGRESS_END, id, wxCommandEventHandler(fn))
#define EVT_PROGRESS_FAILED(id, fn) \
    wx__DECLARE_EVT1(wxEVT_COMMAND_PROGRESS_FAILED, id, wxCommandEventHandler(fn))

#endif
    // _PMPROGRESSPANEL_H_
