/////////////////////////////////////////////////////////////////////////////
// Name:        condeditpanel.h
// Purpose:     wxPackageConditionPanel definition
// Author:      Francesco Montorsi
// Modified by:
// Created:     Thu 10 Aug 2006 19:14:29 CEST
// RCS-ID:      $Id: condeditpanel.h,v 1.2 2007/01/01 20:06:19 frm Exp $
// Copyright:   (c) 2006 Francesco Montorsi
// Licence:     wxWidgets license
/////////////////////////////////////////////////////////////////////////////

#ifndef _CONDEDITPANEL_H_
#define _CONDEDITPANEL_H_


/*!
 * Includes
 */

#include "wxp/packagecmd.h"


/*!
 * Forward declarations
 */

////@begin forward declarations
////@end forward declarations

/*!
 * Control identifiers
 */

////@begin control identifiers
#define SYMBOL_WXPACKAGECONDITIONPANEL_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX
#define SYMBOL_WXPACKAGECONDITIONPANEL_TITLE _("Dialog")
#define SYMBOL_WXPACKAGECONDITIONPANEL_IDNAME wxID_ANY
#define SYMBOL_WXPACKAGECONDITIONPANEL_SIZE wxSize(400, 300)
#define SYMBOL_WXPACKAGECONDITIONPANEL_POSITION wxDefaultPosition
#define ID_CONDEDIT_BUILDSYS 10008
#define ID_CONDEDIT_PLATFORMS 10009
#define ID_CONDEDIT_FORMATS 10007
#define ID_CONDEDIT_STAGES 10010
////@end control identifiers



// ----------------------------------------------------------------------------
// wxPackageConditionPanel
// ----------------------------------------------------------------------------

class wxPackageConditionPanel: public wxPanel
{
    DECLARE_DYNAMIC_CLASS( wxPackageConditionPanel )
    DECLARE_EVENT_TABLE()

public:
    /// Constructors
    wxPackageConditionPanel( );
    wxPackageConditionPanel( wxWindow* parent, wxWindowID id = SYMBOL_WXPACKAGECONDITIONPANEL_IDNAME, const wxPoint& pos = SYMBOL_WXPACKAGECONDITIONPANEL_POSITION, const wxSize& size = SYMBOL_WXPACKAGECONDITIONPANEL_SIZE, long style = SYMBOL_WXPACKAGECONDITIONPANEL_STYLE );

    /// Creation
    bool Create( wxWindow* parent, wxWindowID id = SYMBOL_WXPACKAGECONDITIONPANEL_IDNAME, const wxPoint& pos = SYMBOL_WXPACKAGECONDITIONPANEL_POSITION, const wxSize& size = SYMBOL_WXPACKAGECONDITIONPANEL_SIZE, long style = SYMBOL_WXPACKAGECONDITIONPANEL_STYLE );

    /// Creates the controls and sizers
    void CreateControls();

    /// Should we show tooltips?
    static bool ShowToolTips();

public:     // public API

    void SetCondition(const wxPackageCondition &cond);
    wxPackageCondition GetCondition() const;

    // interactively warns the user if there is some errors with currently
    // inserted data
    bool IsOk() const;

    // selectively disable of lists:

    void EnableStageList(bool enable = true)
        { m_pStages->Enable(enable); }
    void EnableBuildSystemList(bool enable = true)
        { m_pBuildSystems->Enable(enable); }
    void EnableFormatList(bool enable = true)
        { m_pFormats->Enable(enable); }
    void EnablePlatformList(bool enable = true)
        { m_pPlatforms->Enable(enable); }

protected:      // controls

////@begin wxPackageConditionPanel member variables
    wxCheckListBox* m_pBuildSystems;
    wxCheckListBox* m_pPlatforms;
    wxCheckListBox* m_pFormats;
    wxCheckListBox* m_pStages;
////@end wxPackageConditionPanel member variables
};

#endif
    // _CONDEDITPANEL_H_
