2010-10-22 09:35:00 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#ifndef _FOO_PREFS_H
|
|
|
|
#define _FOO_PREFS_H
|
|
|
|
|
2022-05-01 18:07:53 +02:00
|
|
|
#include <foobar2000/helpers/foobar2000+atl.h>
|
|
|
|
#include <foobar2000/helpers/atl-misc.h>
|
2010-10-22 09:35:00 +02:00
|
|
|
#include "resource.h"
|
|
|
|
|
|
|
|
#define DEFAULT_FADE_SECONDS "10.00"
|
|
|
|
#define DEFAULT_FADE_DELAY_SECONDS "0.00"
|
|
|
|
#define DEFAULT_LOOP_COUNT "2.00"
|
|
|
|
#define DEFAULT_LOOP_FOREVER false
|
|
|
|
#define DEFAULT_IGNORE_LOOP false
|
2017-08-19 12:35:38 +02:00
|
|
|
#define DEFAULT_DISABLE_SUBSONGS false
|
2023-12-03 23:45:26 +01:00
|
|
|
#define DEFAULT_DOWNMIX_CHANNELS "0"
|
2018-11-03 22:58:59 +01:00
|
|
|
#define DEFAULT_TAGFILE_DISABLE false
|
2018-11-04 00:36:28 +01:00
|
|
|
#define DEFAULT_OVERRIDE_TITLE false
|
2019-09-30 00:56:29 +02:00
|
|
|
#define DEFAULT_EXTS_UNKNOWN_ON false
|
|
|
|
#define DEFAULT_EXTS_COMMON_ON false
|
2010-10-22 09:35:00 +02:00
|
|
|
|
|
|
|
class vgmstreamPreferences : public CDialogImpl<vgmstreamPreferences>, public preferences_page_instance {
|
|
|
|
public:
|
2019-09-30 00:56:29 +02:00
|
|
|
//Constructor - invoked by preferences_page_impl helpers -
|
|
|
|
//don't do Create() in here, preferences_page_impl does this for us
|
2010-10-22 09:35:00 +02:00
|
|
|
vgmstreamPreferences(preferences_page_callback::ptr callback) : m_callback(callback) {}
|
|
|
|
|
|
|
|
//Note that we don't bother doing anything regarding destruction of our class.
|
2019-09-30 00:56:29 +02:00
|
|
|
//The host ensures that our dialog is destroyed first, then the last reference to our
|
|
|
|
//preferences_page_instance object is released, causing our object to be deleted.
|
2010-10-22 09:35:00 +02:00
|
|
|
|
|
|
|
|
|
|
|
//dialog resource ID
|
|
|
|
enum {IDD = IDD_CONFIG};
|
|
|
|
// preferences_page_instance methods (not all of them - get_wnd() is supplied by preferences_page_impl helpers)
|
|
|
|
t_uint32 get_state();
|
|
|
|
void apply();
|
|
|
|
void reset();
|
|
|
|
|
|
|
|
//WTL message map
|
|
|
|
BEGIN_MSG_MAP(UsfPreferences)
|
|
|
|
MSG_WM_INITDIALOG(OnInitDialog)
|
|
|
|
COMMAND_HANDLER_EX(IDC_IGNORE_LOOP, BN_CLICKED, OnEditChange)
|
|
|
|
COMMAND_HANDLER_EX(IDC_LOOP_FOREVER, BN_CLICKED, OnEditChange)
|
|
|
|
COMMAND_HANDLER_EX(IDC_LOOP_NORMALLY, BN_CLICKED, OnEditChange)
|
|
|
|
COMMAND_HANDLER_EX(IDC_FADE_SECONDS, EN_CHANGE, OnEditChange)
|
|
|
|
COMMAND_HANDLER_EX(IDC_FADE_DELAY_SECONDS, EN_CHANGE, OnEditChange)
|
|
|
|
COMMAND_HANDLER_EX(IDC_LOOP_COUNT, EN_CHANGE, OnEditChange)
|
2017-08-19 12:35:38 +02:00
|
|
|
COMMAND_HANDLER_EX(IDC_DISABLE_SUBSONGS, BN_CLICKED, OnEditChange)
|
2018-04-29 23:31:52 +02:00
|
|
|
COMMAND_HANDLER_EX(IDC_DOWNMIX_CHANNELS, EN_CHANGE, OnEditChange)
|
2018-11-03 22:58:59 +01:00
|
|
|
COMMAND_HANDLER_EX(IDC_TAGFILE_DISABLE, BN_CLICKED, OnEditChange)
|
2018-11-04 00:36:28 +01:00
|
|
|
COMMAND_HANDLER_EX(IDC_OVERRIDE_TITLE, BN_CLICKED, OnEditChange)
|
2019-09-30 00:56:29 +02:00
|
|
|
COMMAND_HANDLER_EX(IDC_EXTS_UNKNOWN_ON, BN_CLICKED, OnEditChange)
|
|
|
|
COMMAND_HANDLER_EX(IDC_EXTS_COMMON_ON, BN_CLICKED, OnEditChange)
|
2010-10-22 09:35:00 +02:00
|
|
|
END_MSG_MAP()
|
|
|
|
private:
|
|
|
|
BOOL OnInitDialog(CWindow, LPARAM);
|
|
|
|
void OnEditChange(UINT, int, CWindow);
|
|
|
|
bool HasChanged();
|
|
|
|
void OnChanged();
|
|
|
|
|
|
|
|
const preferences_page_callback::ptr m_callback;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-09-30 00:56:29 +02:00
|
|
|
class vgmstream_prefs : public preferences_page_impl<vgmstreamPreferences> {
|
2010-10-22 09:35:00 +02:00
|
|
|
|
|
|
|
public:
|
|
|
|
const char * get_name();
|
|
|
|
GUID get_guid();
|
|
|
|
GUID get_parent_guid();
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|