/**
    File        : License.h
    Description : Displays license agreement
    Author      : Raymond Marsh
    Created     : 08/01/2009
    Copyright 2009, 2010 Raymond Marsh

    This program is distributed under the terms of the GNU General Public License.
    To view a copy of the license see the file 'copying.txt'

    This file is part of the Ace Personal Finance Assistant Suite.

    Ace Personal Finance Assistant is free software: you can redistribute it and/or modify it under
    the terms of the GNU General Public License as published by the Free Software Foundation, either
    version 3 of the License, or (at your option) any later version.

    Ace Personal Finance Assistant is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
    without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along with Ace Personal Finance Assistant.
    If not, see <http://www.gnu.org/licenses/>.
**/

#ifndef LICENE_H_INCLUDED
#define LICENE_H_INCLUDED

#include <wx/dialog.h>
#include <wx/string.h>
#include <wx/stattext.h>
#include <wx/statline.h>
#include <wx/textctrl.h>
#include <wx/checkbox.h>
#include <wx/button.h>
#include <wx/sizer.h>
#include <wx/textfile.h>
#include <wx/hyperlink.h>
#include <wx/dcprint.h>  // for printing
#include <wx/cmndata.h>  // for printing
#include <wx/print.h>    // for printing
#include "Dialogs.h"

class CLicenseDlg : public wxDialog
{
    public:
    CLicenseDlg(wxWindow* Parent);
    ~CLicenseDlg();

    private:
    // ID's
    enum
    {
        idChoiceBox = 9870,
        idPrintBtn,
    };

    // event handlers
    void OnContinue(wxCommandEvent &event);
    void OnCancel(wxCommandEvent &event);
    void OnPrint(wxCommandEvent &event);

    // private data
    wxWindow*    m_pParent;
    wxTextCtrl*  m_pLicenseText;
    wxCheckBox*  m_pChoiceBox;
    wxButton*    m_pPrintBtn;
    wxButton*    m_pContinueBtn;
    wxButton*    m_pCancelBtn;
};

class CPrintout: public wxPrintout
{
    public:
    CPrintout(wxDialog* pParent, const wxString& Title);
    ~CPrintout();
    bool OnPrintPage(int page);

    private:
    wxDialog*    m_pParent;
    wxTextFile   m_LicenseText;
};


#endif // LICENE_H_INCLUDED
