/**
    File        : Settings.ch
    Description : Global application settings
    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 SETTINGS_H_INCLUDED
#define SETTINGS_H_INCLUDED

#include <wx/config.h>
#include <wx/confbase.h>
#include <wx/fileconf.h>
#include <wx/wfstream.h>
#include <wx/string.h>
#include <wx/stdpaths.h>
#include <wx/colour.h>

struct SWarnings
{
    bool      IsCategory;
};

struct SGlobal
{
    bool      FirstRun;
    bool      ReoccuringSet;
    bool      HideReconciledTransactionsOnStart;
    int       Language;
};

struct SColors
{
    wxColour MainBGColor;
    wxColour DialogBGColor;
};

namespace ace
{
class COptions
{
    public:
    COptions() { }
    ~COptions() { SaveOptions(); }
    bool Initialize();
    bool LoadOptions();
    bool SaveOptions();
    bool RestoreDefaults();

    SGlobal   GLOBAL;
    SColors   COLORS;
    SWarnings WARNINGS;

    private:
    // default settings
    wxColour          m_DefaultMainBGColor;
    wxColour          m_DefaultDialogBGColor;
    bool              m_DefaultHideReconciledTransactionsOnStart;
    bool              m_DefaultLanguage;
    wxString          m_Filename;
};

extern COptions* g_pOptions;

}; // end namespace ace


#endif // SETTINGS_H_INCLUDED
