/*
* Glide64 - Glide video plugin for Nintendo 64 emulators.
* Copyright (c) 2002  Dave2001
* Copyright (c) 2003-2009  Sergey 'Gonetz' Lipski
*
* This program 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 2 of the License, or
* any later version.
*
* This program 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 this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

//****************************************************************
//
// Glide64 - Glide Plugin for Nintendo 64 emulators (tested mostly with Project64)
// Project started on December 29th, 2001
//
// Authors:
// Dave2001, original author, founded the project in 2001, left it in 2002
// Gugaman, joined the project in 2002, left it in 2002
// Sergey 'Gonetz' Lipski, joined the project in 2002, main author since fall of 2002
// Hiroshi 'KoolSmoky' Morii, joined the project in 2007
//
//****************************************************************
//
// To modify Glide64:
// * Write your name and (optional)email, commented by your work, so I know who did it, and so that you can find which parts you modified when it comes time to send it to me.
// * Do NOT send me the whole project or file that you modified.  Take out your modified code sections, and tell me where to put them.  If people sent the whole thing, I would have many different versions, but no idea how to combine them all.
//
//****************************************************************
//
// Glide64 dialogs
// Created by Gonetz, 2008
//
//****************************************************************

// -*- C++ -*- generated by wxGlade 0.6.3 on Wed Oct 08 18:56:23 2008

#include <wx/wx.h>
#include <wx/image.h>
// begin wxGlade: ::dependencies
#include <wx/spinctrl.h>
#include <wx/notebook.h>
// end wxGlade


#ifndef CONFIG_H
#define CONFIG_H


// begin wxGlade: ::extracode
// end wxGlade


class ConfigNotebook: public wxNotebook {
public:
    // begin wxGlade: ConfigNotebook::ids
    enum {
        wxID_VRAM = wxID_HIGHEST + 1000,
        wxID_FBEnable = wxID_HIGHEST + 1002,
        wxID_TexEdit = wxID_HIGHEST + 1004,
        wxID_Performance = wxID_HIGHEST + 1006,
        wxID_Quality = wxID_HIGHEST + 1008,
    };
    // end wxGlade

    ConfigNotebook(wxWindow* parent, int id, const wxPoint& pos=wxDefaultPosition, const wxSize& size=wxDefaultSize, long style=0);

private:
    // begin wxGlade: ConfigNotebook::methods
    void set_properties();
    void do_layout();
    // end wxGlade

protected:
    // begin wxGlade: ConfigNotebook::attributes
    wxStaticBox* BasicRenderingSizer_staticbox;
    wxStaticBox* OnScreenDisplaySizer_staticbox;
    wxStaticBox* SpeedSizer_staticbox;
    wxStaticBox* TimeSizer_staticbox;
    wxStaticText* lblResolution;
    wxComboBox* cmbResolution;
    wxCheckBox* cbxVSync;
    wxCheckBox* cbxFPS;
    wxCheckBox* cbxVIS;
    wxCheckBox* cbxPercent;
    wxCheckBox* cbxClockEnabled;
    wxCheckBox* cbxClock24;
    wxCheckBox* cbxTextTransparent;
    wxStaticBox* WrapperSizer_staticbox;
    wxStaticBox* WrapperFBOptionsSizer_staticbox;
    wxStaticText* lblFSResolution;
    wxComboBox* cmbFSResolution;
    wxCheckBox* cbxAnisotropic;
    wxCheckBox* cbxVRAM;
    wxStaticText* lblVRAM;
    wxSpinCtrl* spinVRAM;
    wxStaticText* lblMb;
    wxCheckBox* cbxFBO;
    wxStaticBox* OtherSizer_staticbox;
    wxCheckBox* cbxTextureSettings;
    wxStaticText* lblScreenShotFormat;
    wxComboBox* cmbScreenShotFormat;
    wxPanel* BasicSettingsPanel;

    wxStaticBox* EmuSettingsBoxSizer_staticbox;
    wxStaticBox* EmuSettingsLeftSizer_staticbox;
    wxStaticBox* DepthBufferSizer_staticbox;
    wxStaticBox* FrameBufferSizer_staticbox;
    wxStaticText* lbFiltering;
    wxComboBox* cmbFiltering;
    wxStaticText* lbBufferSwap;
    wxComboBox* cmbBufferSwap;
    wxStaticText* lblLOD;
    wxComboBox* cmbLOD;
    wxStaticText* lblAspect;
    wxComboBox* cmbAspect;
    wxCheckBox* cbxFog;
    wxCheckBox* cbxBuffer;
    wxCheckBox* cbxFBEnable;
    wxCheckBox* cbxFBHWFBE;
    wxCheckBox* cbxFBGetFBI;
    wxCheckBox* cbxFBReadEveryFrame;
    wxCheckBox* cbxFBasTex;
    wxCheckBox* cbxDetect;
    wxCheckBox* cbxFBDepthBuffer;
    wxPanel* EmuSettingsPanel;

#ifdef TEXTURE_FILTER
    wxStaticBox* PresetsSizer_staticbox;
    wxStaticBox* CommonSizer_staticbox;
    wxStaticBox* TextureRightSizer_staticbox;
    wxStaticBox* EnhTexSizer_staticbox;
    wxStaticBox* HRTexPerfTweaksSizer_staticbox;
    wxStaticBox* EnhTexPerfTweaksSizer_staticbox;
    wxStaticText* lblFilter;
    wxComboBox* cmbEnhFilter;
    wxStaticText* lblEnhancement;
    wxComboBox* cmbEnhEnhancement;
    wxStaticText* lblTexCache;
    wxSpinCtrl* spinEnhCacheSize;
    wxStaticText* lblTexCacheMB;
    wxCheckBox* cbxEnhIgnoreBG;
    wxCheckBox* cbxEnhTexCompression;
    wxCheckBox* cbxEnhCompressCache;
    wxStaticText* lblHrsFormat;
    wxComboBox* cmbHrsFormat;
    wxCheckBox* cbxHrsTile;
    wxCheckBox* cbxHrsForce16;
    wxCheckBox* cbxHrsAltCRC;
    wxCheckBox* cbxHrsTexCompression;
    wxCheckBox* cbxHrsCompressCache;
    wxCheckBox* cbxHrsLetFly;
    wxCheckBox* cbxHrsTexEdit;
    wxStaticText* lblTexCompression;
    wxComboBox* cmbTextureCompression;
    wxCheckBox* cbxSaveTexCache;
    wxButton* btnPerformance;
    wxButton* btnQuality;
    wxPanel* TexturePanel;
#endif //TEXTURE_FILTER

#ifndef _ENDUSER_RELEASE_
    wxStaticBox* DebugSizer_staticbox;
    wxStaticBox* DevSettingsSizer_staticbox;
    wxCheckBox* cbxAutoUcode;
    wxStaticText* lblForceUcode;
    wxComboBox* cmbForceUcode;
    wxCheckBox* cbxWireframe;
    wxComboBox* cmbWireframe;
    wxCheckBox* cbxLog;
    wxCheckBox* cbxCombRed;
    wxCheckBox* cbxLogClear;
    wxCheckBox* cbxCmbLog;
    wxCheckBox* cbxWindowLog;
    wxCheckBox* cbxCmbLogClear;
    wxCheckBox* cbxErrLog;
    wxCheckBox* cbxBilinearTexCache;
    wxPanel* DebugPanel;
#endif //_ENDUSER_RELEASE_

    // end wxGlade

    DECLARE_EVENT_TABLE();

public:
    virtual void OnClickVRAM(wxCommandEvent &event); // wxGlade: <event_handler>
    virtual void OnClickFB(wxCommandEvent &event); // wxGlade: <event_handler>
#ifdef TEXTURE_FILTER
    virtual void onPerformace(wxCommandEvent &event); // wxGlade: <event_handler>
    virtual void onQuality(wxCommandEvent &event); // wxGlade: <event_handler>
    virtual void OnClickTexEdit(wxCommandEvent &event); // wxGlade: <event_handler>
#endif //TEXTURE_FILTER

//    virtual void onPageChanged(wxNotebookEvent &event); // wxGlade: <event_handler>
//    virtual void onPageChanging(wxNotebookEvent &event); // wxGlade: <event_handler>
        void SaveSettings();
}; // wxGlade: end class


class Glide64ConfigDialog: public wxDialog {
public:
    // begin wxGlade: Glide64ConfigDialog::ids
    // end wxGlade

    Glide64ConfigDialog(wxWindow* parent, int id, const wxString& title, const wxPoint& pos=wxDefaultPosition, const wxSize& size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE);
    void OnClose(wxCloseEvent& event);

private:
    // begin wxGlade: Glide64ConfigDialog::methods
    void set_properties();
    void do_layout();
    // end wxGlade

protected:
    // begin wxGlade: Glide64ConfigDialog::attributes
    ConfigNotebook* Config;
    wxButton* btnOK;
    wxButton* btnCancel;
    // end wxGlade

    DECLARE_EVENT_TABLE();

public:
//    virtual void onPageChanged(wxNotebookEvent &event); // wxGlade: <event_handler>
//    virtual void onPageChanging(wxNotebookEvent &event); // wxGlade: <event_handler>
    virtual void OnOK(wxCommandEvent &event); // wxGlade: <event_handler>
    virtual void OnCancel(wxCommandEvent &event); // wxGlade: <event_handler>
}; // wxGlade: end class


class AboutDialog: public wxDialog {
public:
    // begin wxGlade: AboutDialog::ids
    // end wxGlade

    AboutDialog(wxWindow* parent, int id, const wxString& title, const wxPoint& pos=wxDefaultPosition, const wxSize& size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE);

private:
    // begin wxGlade: AboutDialog::methods
    void set_properties();
    void do_layout();
    // end wxGlade

protected:
    // begin wxGlade: AboutDialog::attributes
    wxButton* button_ok;
    // end wxGlade
}; // wxGlade: end class

enum {
	// General Settings
	Set_CardId, Set_Resolution, Set_vsync, Set_ssformat, Set_ShowFps, Set_clock, 
	Set_clock_24_hr, Set_texenh_options, Set_hotkeys, Set_wrpResolution, Set_wrpVRAM,
	Set_wrpFBO, Set_wrpAnisotropic, Set_autodetect_ucode, Set_ucode, Set_wireframe,
	Set_wfmode, Set_logging, Set_log_clear, Set_elogging, Set_run_in_window, 
	Set_filter_cache, Set_unk_as_red, Set_log_unk, Set_unk_clear, Set_ghq_fltr,
	Set_ghq_cmpr, Set_ghq_enht, Set_ghq_hirs, Set_ghq_enht_cmpr, Set_ghq_enht_tile,
	Set_ghq_enht_f16bpp, Set_ghq_enht_gz, Set_ghq_enht_nobg, Set_ghq_hirs_cmpr,
	Set_ghq_hirs_tile, Set_ghq_hirs_f16bpp, Set_ghq_hirs_gz, Set_ghq_hirs_altcrc,
	Set_ghq_cache_save, Set_ghq_cache_size, Set_ghq_hirs_let_texartists_fly,
	Set_ghq_hirs_dump,

	//Game Settings
	Set_alt_tex_size, Set_use_sts1_only, Set_force_calc_sphere, Set_correct_viewport,
	Set_increase_texrect_edge, Set_decrease_fillrect_edge, Set_texture_correction,
	Set_pal230, Set_stipple_mode, Set_stipple_pattern, Set_force_microcheck, Set_force_quad3d,
	Set_clip_zmin, Set_clip_zmax, Set_fast_crc, Set_adjust_aspect, Set_zmode_compare_less,
	Set_old_style_adither, Set_n64_z_scale, Set_optimize_texrect, Set_ignore_aux_copy,
	Set_hires_buf_clear, Set_fb_read_alpha, Set_useless_is_useless, Set_fb_crc_mode,
	Set_filtering, Set_fog, Set_buff_clear, Set_swapmode, Set_aspect, Set_lodmode,
	Set_fb_smart, Set_fb_hires, Set_fb_read_always, Set_read_back_to_screen, 
	Set_detect_cpu_write, Set_fb_get_info, Set_fb_render,

	//RDB Setting
	Set_ucodeLookup,
};

extern short Set_basic_mode, Set_texture_dir;

extern void
    general_setting(short setting_ID, const char * name, unsigned int value);
extern void
    game_setting(short setting_ID, const char * name, unsigned int value);

#endif // CONFIG_H
