/////////////////////////////////////////////////////////////////////////////
// Name:        excludedlg.h
// Purpose:     wxPackageExcludeDialog definition
// Author:      Francesco Montorsi
// Modified by:
// Created:     26/12/2006 23:17:17
// RCS-ID:      $Id: excludedlg.h,v 1.5 2007/01/01 20:06:20 frm Exp $
// Copyright:   (c) 2006 Francesco Montorsi
// Licence:     wxWidgets license
/////////////////////////////////////////////////////////////////////////////

#ifndef _EXCLUDEDLG_H_
#define _EXCLUDEDLG_H_

/*!
 * Includes
 */

////@begin includes
#include "wx/choicebk.h"
#include "wx/listctrl.h"
////@end includes

#include "wxp/packageinfo.h"        // for wxPackageExcludeMode

/*!
 * Forward declarations
 */

class wxCheckedListCtrl;


/*!
 * Control identifiers
 */

////@begin control identifiers
#define SYMBOL_WXPACKAGEEXCLUDEDLG_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX
#define SYMBOL_WXPACKAGEEXCLUDEDLG_TITLE _("Exclude files/directories/patterns")
#define SYMBOL_WXPACKAGEEXCLUDEDLG_IDNAME wxID_ANY
#define SYMBOL_WXPACKAGEEXCLUDEDLG_SIZE wxSize(400, 300)
#define SYMBOL_WXPACKAGEEXCLUDEDLG_POSITION wxDefaultPosition
#define ID_EXCLUDEDLG_CHOICEBOOK 10019
#define ID_EXCLUDEDLG_FILES 10001
#define ID_EXCLUDEDLG_DIRECTORIES 10003
#define ID_EXCLUDEDLG_PATTERN 10002
#define ID_EXCLUDEDLG_PATTERN_LIST 10005
////@end control identifiers


// ----------------------------------------------------------------------------
// wxPackageExcludeDialog
// ----------------------------------------------------------------------------

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

public:
    /// Constructors
    wxPackageExcludeDlg( );
    wxPackageExcludeDlg( wxWindow* parent, wxWindowID id = SYMBOL_WXPACKAGEEXCLUDEDLG_IDNAME, const wxString& caption = SYMBOL_WXPACKAGEEXCLUDEDLG_TITLE, const wxPoint& pos = SYMBOL_WXPACKAGEEXCLUDEDLG_POSITION, const wxSize& size = SYMBOL_WXPACKAGEEXCLUDEDLG_SIZE, long style = SYMBOL_WXPACKAGEEXCLUDEDLG_STYLE );

    /// Creation
    bool Create( wxWindow* parent, wxWindowID id = SYMBOL_WXPACKAGEEXCLUDEDLG_IDNAME, const wxString& caption = SYMBOL_WXPACKAGEEXCLUDEDLG_TITLE, const wxPoint& pos = SYMBOL_WXPACKAGEEXCLUDEDLG_POSITION, const wxSize& size = SYMBOL_WXPACKAGEEXCLUDEDLG_SIZE, long style = SYMBOL_WXPACKAGEEXCLUDEDLG_STYLE );

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

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

public:     // public API

    void SetFileList(const wxString &prefix, 
                     const wxArrayString &arr);
    void SetDirList(const wxString &prefix, 
                     const wxArrayString &arr);

    wxArrayString GetSelectedFiles() const;
    wxArrayString GetSelectedDirs() const;
    wxArrayString GetMatchingFiles(wxArrayLong *sz = NULL) const;

    wxPackageExcludeMode GetMode() const
        { return (wxPackageExcludeMode)m_pChoiceBook->GetSelection(); }

    wxString GetPattern() const
        { return m_pPattern->GetValue(); }

public:     // event handlers

    void OnText(wxCommandEvent& event);

protected:
////@begin wxPackageExcludeDlg member variables
    wxChoicebook* m_pChoiceBook;
    wxListCtrl* m_pFileList;
    wxListCtrl* m_pDirList;
    wxTextCtrl* m_pPattern;
    wxListCtrl* m_pPatternList;
////@end wxPackageExcludeDlg member variables
};

#endif
    // _EXCLUDEDLG_H_
