// This file is part of Notepad++ project
// Copyright (C)2021 Don HO <don.h@free.fr>

// 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 this program.  If not, see <https://www.gnu.org/licenses/>.

#pragma code_page(65001)

#include <windows.h>
#include "FindReplaceDlg_rc.h"

IDD_FIND_REPLACE_DLG DIALOGEX 0, 0, 392, 200
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE
CAPTION "Replace"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
    RTEXT           "&Find what:",IDFINDWHAT_STATIC,1,22,73,8
    COMBOBOX        IDFINDWHAT,76,20,170,150,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
    RTEXT           "Rep&lace with:",ID_STATICTEXT_REPLACE,1,40,73,8
    COMBOBOX        IDREPLACEWITH,76,38,170,50,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
    CONTROL         "",IDD_FINDREPLACE_SWAP_BUTTON,"Button",BS_SPLITBUTTON | WS_TABSTOP,250,27,24,17
    RTEXT           "Filter&s:",IDD_FINDINFILES_FILTERS_STATIC,1,58,73,8, SS_NOTIFY
    COMBOBOX        IDD_FINDINFILES_FILTERS_COMBO,76,56,170,150,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
    RTEXT           "Dir&ectory:",IDD_FINDINFILES_DIR_STATIC,7,76,41,8
    COMBOBOX        IDD_FINDINFILES_DIR_COMBO,50,74,196,150,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
    PUSHBUTTON      "...",IDD_FINDINFILES_BROWSE_BUTTON,250,73,16,14

    CONTROL         "Follow current doc.",IDD_FINDINFILES_FOLDERFOLLOWSDOC_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,280,78,94,10
    CONTROL         "In all su&b-folders",IDD_FINDINFILES_RECURSIVE_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,280,90,94,10
    CONTROL         "In &hidden folders",IDD_FINDINFILES_INHIDDENDIR_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,280,102,94,10

    CONTROL         "Project Panel 1",IDD_FINDINFILES_PROJECT1_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,280,78,94,10
    CONTROL         "Project Panel 2",IDD_FINDINFILES_PROJECT2_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,280,90,94,10
    CONTROL         "Project Panel 3",IDD_FINDINFILES_PROJECT3_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,280,102,94,10

    CONTROL         "Book&mark line",IDC_MARKLINE_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,54,140,10
    CONTROL         "Purge for each search",IDC_PURGE_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,66,140,10
    CONTROL         "Backward direction",IDC_BACKWARDDIRECTION,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,78,140,10
    CONTROL         "Match &whole word only",IDWHOLEWORD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,90,140,10
    CONTROL         "Match &case",IDMATCHCASE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,102,140,10
    CONTROL         "Wra&p around",IDWRAP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,114,140,10

    GROUPBOX        "Search Mode",IDC_MODE_STATIC,6,131,200,48
    CONTROL         "&Normal",IDNORMAL,"Button",BS_AUTORADIOBUTTON | WS_GROUP,12,143,150,10
    CONTROL         "E&xtended (\\n, \\r, \\t, \\0, \\x...)",IDEXTENDED,"Button",BS_AUTORADIOBUTTON,12,155,150,10
    CONTROL         "Re&gular expression",IDREGEXP,"Button",BS_AUTORADIOBUTTON,12,167,78,10
    CONTROL         "&. matches newline",IDREDOTMATCHNL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,93,167,101,10

    GROUPBOX        "",IDC_REPLACEINSELECTION,192,50,180,23
    CONTROL         "In select&ion",IDC_IN_SELECTION_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,200,58,59,10

    PUSHBUTTON      "",IDC_FINDPREV,278,20,18,14,WS_GROUP | BS_MULTILINE
    PUSHBUTTON      "",IDC_FINDNEXT,299,20,70,14,WS_GROUP | BS_MULTILINE
    PUSHBUTTON      "Find Next",IDOK,278,20,91,14,WS_GROUP
    CONTROL         "",IDC_2_BUTTONS_MODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,373,22,14,10
    PUSHBUTTON      "Coun&t",IDCCOUNTALL,278,38,91,14
    PUSHBUTTON      "Find All in Current &Document",IDC_FINDALL_CURRENTFILE,278,56,91,21,BS_MULTILINE
    PUSHBUTTON      "Find All in All &Opened Documents",IDC_FINDALL_OPENEDFILES,278,80,91,21,BS_MULTILINE

    PUSHBUTTON      "&Replace",IDREPLACE,278,38,91,14
    PUSHBUTTON      "Replace &All",IDREPLACEALL,278,56,91,14

    PUSHBUTTON      "Replace All in All Opened Doc&uments",IDC_REPLACE_OPENEDFILES,278,74,91,21,BS_MULTILINE

    PUSHBUTTON      "Find All",IDD_FINDINFILES_FIND_BUTTON,278,20,91,14,WS_GROUP
    PUSHBUTTON      "Replace in Files",IDD_FINDINFILES_REPLACEINFILES,278,38,91,14

    PUSHBUTTON      "Replace in Projects",IDD_FINDINFILES_REPLACEINPROJECTS,278,38,91,14

    PUSHBUTTON      "Mark All",IDCMARKALL,278,20,91,14
    PUSHBUTTON      "Clear all marks",IDC_CLEAR_ALL,278,38,91,14
    PUSHBUTTON      "Copy Marked Text",IDC_COPY_MARKED_TEXT,278,56,91,14

    PUSHBUTTON      "Close",IDCANCEL,278,98,91,14

    GROUPBOX        "",IDC_TRANSPARENT_GRPBOX,268,131,99,48
    CONTROL         "Transparenc&y",IDC_TRANSPARENT_CHECK,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,264,131,80,10
    CONTROL         "On losing focus",IDC_TRANSPARENT_LOSSFOCUS_RADIO,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,278,143,85,10
    CONTROL         "Always",IDC_TRANSPARENT_ALWAYS_RADIO,"Button",BS_AUTORADIOBUTTON ,278,155,85,10
    CONTROL         "",IDC_PERCENTAGE_SLIDER,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | TBS_TRANSPARENTBKGND | NOT WS_VISIBLE | WS_TABSTOP,275,166,85,10

    PUSHBUTTON      "",IDD_RESIZE_TOGGLE_BUTTON,375,171,16,14
END

IDB_INCREMENTAL_BG          BITMAP                  "../icons/incrementalBg.bmp"

IDD_INCREMENT_FIND DIALOGEX 0, 0, 680, 20
STYLE DS_SYSMODAL | DS_CONTROL | DS_FIXEDSYS | WS_CHILD | WS_CLIPCHILDREN
FONT 8, TEXT("MS Shell Dlg")
BEGIN
    PUSHBUTTON   "✕",IDCANCEL,2,3,16,14
	RTEXT           "Find:",IDC_INCSTATIC,18,6,46,12
    EDITTEXT        IDC_INCFINDTEXT,65,4,175,12,ES_AUTOHSCROLL | ES_WANTRETURN | WS_TABSTOP
	PUSHBUTTON   "<",IDC_INCFINDPREVOK,243,3,16,14, WS_TABSTOP
	PUSHBUTTON   ">",IDC_INCFINDNXTOK,263,3,16,14, WS_TABSTOP
	CONTROL         "Match &case", IDC_INCFINDMATCHCASE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,290,5,100,12 
	CONTROL         "&Highlight all", IDC_INCFINDHILITEALL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,400,5,100,12
	LTEXT           "",IDC_INCFINDSTATUS,520,6,180,12
END

IDD_FINDRESULT DIALOGEX 0, 0, 223, 67
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_TOOLWINDOW | WS_EX_WINDOWEDGE
CAPTION "Search results"
FONT 8, TEXT("MS Shell Dlg"), 0, 0, 0x0
BEGIN
    DEFPUSHBUTTON   ">",IDC_INCFINDNXTOK,243,0,16,14,NOT WS_VISIBLE // dummy control to prevent issue with focus (search result selection)
END

IDD_FINDINFINDER_DLG DIALOGEX 0, 0, 365, 124
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE
CAPTION "Find in search results"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
    RTEXT           "&Find what:",IDFINDWHAT_STATIC_FIFOLDER,6,11,75,8
    COMBOBOX        IDFINDWHAT_FIFOLDER,83,9,178,150,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_TABSTOP

    CONTROL         "Search &only in found lines",IDC_MATCHLINENUM_CHECK_FIFOLDER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,31,250,10
    CONTROL         "Match &whole word only",IDWHOLEWORD_FIFOLDER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,43,140,10
    CONTROL         "Match &case",IDMATCHCASE_FIFOLDER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,55,140,10

    GROUPBOX        "Search Mode",IDC_MODE_STATIC_FIFOLDER,6,70,200,48
    CONTROL         "&Normal",IDNORMAL_FIFOLDER,"Button",BS_AUTORADIOBUTTON | WS_GROUP,12,82,150,10
    CONTROL         "E&xtended (\\n, \\r, \\t, \\0, \\x...)",IDEXTENDED_FIFOLDER,"Button",BS_AUTORADIOBUTTON,12,94,150,10
    CONTROL         "Re&gular expression",IDREGEXP_FIFOLDER,"Button",BS_AUTORADIOBUTTON,12,106,78,10
    CONTROL         "&. matches newline",IDREDOTMATCHNL_FIFOLDER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,93,106,101,10

    PUSHBUTTON      "Find All",IDOK,268,9,90,14,WS_GROUP
    PUSHBUTTON      "Close",IDCANCEL,268,27,90,14
END
