/////////////////////////////////////////////////////////////////////////////
// Name:        optpresetchooserdlg.h
// Purpose:     wxPackageOptionPresetChooserDialog
// Author:      Francesco Montorsi
// Modified by:
// Created:     18/09/2006 23:11:38
// RCS-ID:      $Id: optpresetchooserdlg.h,v 1.4 2007/01/27 23:15:35 frm Exp $
// Copyright:   (c) 2006 Francesco Montorsi
// Licence:     wxWidgets license
/////////////////////////////////////////////////////////////////////////////

#ifndef _OPTPRESETCHOOSERDLG_H_
#define _OPTPRESETCHOOSERDLG_H_

/*!
 * Includes
 */

#include "wxp/wxp.h"


/*!
 * Forward declarations
 */

////@begin forward declarations
class wxOptionListCtrl;
////@end forward declarations

/*!
 * Control identifiers
 */

////@begin control identifiers
#define ID_OPTPRESETCHOOSER_PRESETS 10013
#define ID_OPTPRESETCHOOSER_DESC 10014
#define ID_OPTPRESETCHOOSER_PREVIEW 10012
#define SYMBOL_WXPACKAGEOPTIONPRESETCHOOSERDLG_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX
#define SYMBOL_WXPACKAGEOPTIONPRESETCHOOSERDLG_TITLE _("Choose an option preset")
#define SYMBOL_WXPACKAGEOPTIONPRESETCHOOSERDLG_IDNAME wxID_ANY
#define SYMBOL_WXPACKAGEOPTIONPRESETCHOOSERDLG_SIZE wxSize(400, -1)
#define SYMBOL_WXPACKAGEOPTIONPRESETCHOOSERDLG_POSITION wxDefaultPosition
////@end control identifiers


// ----------------------------------------------------------------------------
// wxPackageOptionPresetChooserDialog
// ----------------------------------------------------------------------------

class wxPackageOptionPresetChooserDlg: public wxDialog
{    
    DECLARE_DYNAMIC_CLASS( wxPackageOptionPresetChooserDlg )
    DECLARE_EVENT_TABLE()

public:
    /// Constructors
    wxPackageOptionPresetChooserDlg( );
    wxPackageOptionPresetChooserDlg( wxWindow* parent, 
        wxWindowID id = SYMBOL_WXPACKAGEOPTIONPRESETCHOOSERDLG_IDNAME, 
        wxPackageBuildSystemType type = wxPBST_INVALID,
        const wxString& caption = SYMBOL_WXPACKAGEOPTIONPRESETCHOOSERDLG_TITLE, 
        const wxPoint& pos = SYMBOL_WXPACKAGEOPTIONPRESETCHOOSERDLG_POSITION, 
        const wxSize& size = SYMBOL_WXPACKAGEOPTIONPRESETCHOOSERDLG_SIZE, 
        long style = SYMBOL_WXPACKAGEOPTIONPRESETCHOOSERDLG_STYLE );

    /// Creation
    bool Create( wxWindow* parent, wxWindowID id = SYMBOL_WXPACKAGEOPTIONPRESETCHOOSERDLG_IDNAME, 
        wxPackageBuildSystemType type = wxPBST_INVALID, 
        const wxString& caption = SYMBOL_WXPACKAGEOPTIONPRESETCHOOSERDLG_TITLE, 
        const wxPoint& pos = SYMBOL_WXPACKAGEOPTIONPRESETCHOOSERDLG_POSITION, 
        const wxSize& size = SYMBOL_WXPACKAGEOPTIONPRESETCHOOSERDLG_SIZE, 
        long style = SYMBOL_WXPACKAGEOPTIONPRESETCHOOSERDLG_STYLE );

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

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

public:     // public API

    const wxPackageCommandOptionArray &GetSelectedPreset() const
        { return wxPresetXMLDescriptor::s_hashmapOptions[m_pPresets->GetStringSelection()]; }

public:     // event handlers

    void OnPreset(wxCommandEvent &ev);

protected:
////@begin wxPackageOptionPresetChooserDlg member variables
    wxChoice* m_pPresets;
    wxTextCtrl* m_pDescription;
    wxOptionListCtrl* m_pPreview;
////@end wxPackageOptionPresetChooserDlg member variables
};

#endif
    // _OPTPRESETCHOOSERDLG_H_
