// SynchronousAudioRouter
// Copyright (C) 2015 Mackenzie Straight
//
// 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 3 of the License, or
// (at your option) 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 SynchronousAudioRouter.  If not, see <http://www.gnu.org/licenses/>.

#include <windows.h>
#include <commctrl.h>
#include <richedit.h>
#include "resource.h"

////////////////////////////////////////////////////////////////////////////////
//
// Registry Scripts
//
////////////////////////////////////////////////////////////////////////////////
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDR_SARASIO        REGISTRY       "SarAsio.rgs"
IDR_SARMMDEVICE    REGISTRY       "SarMMDevice.rgs"


////////////////////////////////////////////////////////////////////////////////
//
// Dialogs
//
////////////////////////////////////////////////////////////////////////////////
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_CONFIG_ENDPOINTS DIALOGEX 0, 0, 320, 180
STYLE DS_SHELLFONT | WS_CAPTION | WS_CHILDWINDOW | WS_DISABLED
CAPTION "Endpoints"
FONT 8, "MS Shell Dlg", 400, 0, 0
{
    GROUPBOX "Hardware Interface", 1000,
        8, 8, 304, 28,
        0, WS_EX_LEFT
    COMBOBOX 1001,
        14, 18, 244, 17,
        CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
    PUSHBUTTON "&Configure", 1002,
        262, 17, 44, 14,
        0, WS_EX_LEFT
    GROUPBOX "Windows Audio Devices", 1003,
        8, 44, 304, 128,
        0, WS_EX_LEFT
    CONTROL "", 1004,
        WC_LISTVIEW, WS_TABSTOP | WS_BORDER | LVS_ALIGNLEFT | LVS_REPORT,
        14, 54, 292, 96
    PUSHBUTTON "&Add", 1005,
        14, 154, 44, 14,
        0, WS_EX_LEFT
    PUSHBUTTON "&Remove", 1006,
        62, 154, 44, 14,
        0, WS_EX_LEFT
}

LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_CONFIG_ENDPOINT_DETAILS DIALOGEX 0, 0, 256, 71
STYLE DS_SHELLFONT | WS_CAPTION | WS_POPUP | WS_SYSMENU | DS_MODALFRAME
CAPTION "Endpoint Details"
FONT 8, "MS Shell Dlg", 400, 0, 0
{
    LTEXT "Name:", 1100,
        4, 6, 56, 12
    EDITTEXT 1101,
        68, 5, 184, 12,
        ES_LEFT | ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
    LTEXT "Type:", 1102,
        4, 22, 56, 12
    COMBOBOX 1103,
        68, 21, 184, 12,
        CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
    LTEXT "Channel count:", 1104,
        4, 38, 56, 12
    EDITTEXT 1105,
        68, 37, 16, 12,
        ES_LEFT | ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
    PUSHBUTTON "&OK", IDOK,
        160, 53, 44, 14
    PUSHBUTTON "&Cancel", IDCANCEL,
        208, 53, 44, 14
}

LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_CONFIG_APPLICATIONS DIALOGEX 0, 0, 320, 180
STYLE DS_SHELLFONT | WS_CAPTION | WS_CHILDWINDOW | WS_DISABLED
CAPTION "Applications"
FONT 8, "MS Shell Dlg", 400, 0, 0
{
    AUTOCHECKBOX "Enable per-application audio routing rules", 1200,
        8, 8, 304, 10
    GROUPBOX "Applications", 1201,
        8, 22, 304, 150
    CONTROL "", 1202,
        WC_LISTVIEW, WS_TABSTOP | WS_BORDER | LVS_ALIGNLEFT | LVS_REPORT,
        14, 32, 292, 118
    PUSHBUTTON "&Add", 1203,
        14, 154, 44, 14,
        0, WS_EX_LEFT
    PUSHBUTTON "&Remove", 1204,
        62, 154, 44, 14,
        0, WS_EX_LEFT
}

LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_CONFIG_APPLICATION_DETAILS DIALOGEX 0, 0, 260, 196
STYLE DS_SHELLFONT | WS_CAPTION | WS_POPUP | WS_SYSMENU | DS_MODALFRAME
CAPTION "Application Details"
FONT 8, "MS Shell Dlg", 400, 0, 0
{
    LTEXT "Name:", 1307,
        8, 8, 24, 12
    EDITTEXT 1308,
        36, 6, 216, 12,
        ES_LEFT | ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
    LTEXT "Path:", 1300,
        8, 24, 24, 12
    EDITTEXT 1301,
        36, 22, 216, 12,
        ES_LEFT | ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
    AUTOCHECKBOX "Use regular expressions", 1302,
        8, 38, 100, 14
    PUSHBUTTON "&Running Applications...", 1303,
        116, 38, 88, 14,
        0, WS_EX_LEFT
    PUSHBUTTON "&Browse...", 1304,
        208, 38, 44, 14,
        0, WS_EX_LEFT
    GROUPBOX "Default Endpoints", 1305,
        8, 56, 244, 112
    LTEXT "Application restart may be required.", 1306,
        8, 177, 156, 12
    PUSHBUTTON "&OK", IDOK,
        160, 174, 44, 14,
        0, WS_EX_LEFT
    PUSHBUTTON "&Cancel", IDCANCEL,
        208, 174, 44, 14,
        0, WS_EX_LEFT

    LTEXT "Playback (System):", 1310,
        14, 68, 98, 12
    LTEXT "Playback (Communications):", 1311,
        14, 84, 98, 12
    LTEXT "Playback (Multimedia):", 1312,
        14, 100, 98, 12
    LTEXT "Recording (System):", 1313,
        14, 116, 98, 12
    LTEXT "Recording (Communications):", 1314,
        14, 132, 98, 12
    LTEXT "Recording (Multimedia):", 1315,
        14, 148, 98, 12

    COMBOBOX 1320,
        116, 66, 130, 12,
        CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
    COMBOBOX 1321,
        116, 82, 130, 12,
        CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
    COMBOBOX 1322,
        116, 98, 130, 12,
        CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
    COMBOBOX 1323,
        116, 114, 130, 12,
        CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
    COMBOBOX 1324,
        116, 130, 130, 12,
        CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
    COMBOBOX 1325,
        116, 146, 130, 12,
        CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_LEFT
}
