/////////////////////////////////////////////////////////////////////////////
// Name:        uploaddlg.h
// Purpose:     wxPackageReferenceEditDlg definition
// Author:      Francesco Montorsi
// Modified by:
// Created:     01/01/2007 16:59:11
// RCS-ID:      $Id: uploaddlg.h,v 1.3 2007/01/01 21:36:44 frm Exp $
// Copyright:   (c) 2006 Francesco Montorsi
// Licence:     wxWidgets license
/////////////////////////////////////////////////////////////////////////////

#ifndef _UPLOADDLG_H_
#define _UPLOADDLG_H_


/*!
 * Includes
 */

#include <wx/dialog.h>


/*!
 * Forward declarations
 */


/*!
 * Control identifiers
 */

////@begin control identifiers
#define SYMBOL_WXPACKAGEUPLOADDLG_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX
#define SYMBOL_WXPACKAGEUPLOADDLG_TITLE _("Upload package by FTP")
#define SYMBOL_WXPACKAGEUPLOADDLG_IDNAME wxID_ANY
#define SYMBOL_WXPACKAGEUPLOADDLG_SIZE wxSize(400, 300)
#define SYMBOL_WXPACKAGEUPLOADDLG_POSITION wxDefaultPosition
#define ID_UPLOAD_FILENAME 10007
#define ID_UPLOAD_USER 10008
#define ID_UPLOAD_PASSWORD 10009
#define ID_UPLOAD_ANONYMOUS 10001
#define ID_UPLOAD_DIRECTORY 10010
////@end control identifiers


// ----------------------------------------------------------------------------
// wxPackageUploadDialog
// ----------------------------------------------------------------------------

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

public:
    /// Constructors
    wxPackageUploadDlg( );
    wxPackageUploadDlg( wxWindow* parent, wxWindowID id = SYMBOL_WXPACKAGEUPLOADDLG_IDNAME, const wxString& caption = SYMBOL_WXPACKAGEUPLOADDLG_TITLE, const wxPoint& pos = SYMBOL_WXPACKAGEUPLOADDLG_POSITION, const wxSize& size = SYMBOL_WXPACKAGEUPLOADDLG_SIZE, long style = SYMBOL_WXPACKAGEUPLOADDLG_STYLE );

    /// Creation
    bool Create( wxWindow* parent, wxWindowID id = SYMBOL_WXPACKAGEUPLOADDLG_IDNAME, const wxString& caption = SYMBOL_WXPACKAGEUPLOADDLG_TITLE, const wxPoint& pos = SYMBOL_WXPACKAGEUPLOADDLG_POSITION, const wxSize& size = SYMBOL_WXPACKAGEUPLOADDLG_SIZE, long style = SYMBOL_WXPACKAGEUPLOADDLG_STYLE );

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

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

public:     // event handlers

    void OnAnonymous(wxCommandEvent &event);

public:

    void SetFileToUpload(const wxString &packagefile);
    void SetDefaults(const wxString &defaults);

    wxString GetUser() const
        { return m_pUser->GetValue(); }
    wxString GetPassword() const
        { return m_pPassword->GetValue(); }
    wxString GetPath() const;
    wxString GetServer() const;

protected:

////@begin wxPackageUploadDlg member variables
    wxStaticText* m_pFileSizeLabel;
    wxTextCtrl* m_pFile;
    wxTextCtrl* m_pUser;
    wxTextCtrl* m_pPassword;
    wxCheckBox* m_pAnonymous;
    wxTextCtrl* m_pDir;
////@end wxPackageUploadDlg member variables
};

#endif
    // _UPLOADDLG_H_
