/*
this file is part of notepad++
Copyright (C)2003 Don HO ( donho@altern.org )

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 (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, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/

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


#define NOTEPAD_PLUS_VERSION	"Notepad++ v2.3"

// The GCC resouce compiler has different behavior the M$ resource compiler
#ifdef __GNUC__
#include ".\\ScitillaComponent\\UserDefineDialog.rc"
#include ".\\ScitillaComponent\\FindReplaceDlg.rc"
#include ".\\WinControls\\StaticDialog\\RunDlg\\RunDlg.rc"
#include ".\\WinControls\\ColourPicker\\ColourPopup.rc"
#include ".\\WinControls\\ColourPicker\\WordStyleDlg.rc"
#else
1 TEXTINCLUDE DISCARDABLE
BEGIN
    "#include "".\\ScitillaComponent\\UserDefineDialog.rc""\0"
END

2 TEXTINCLUDE DISCARDABLE
BEGIN
    "#include "".\\ScitillaComponent\\FindReplaceDlg.rc""\0"
END

3 TEXTINCLUDE DISCARDABLE
BEGIN
    "#include "".\\WinControls\\StaticDialog\\RunDlg\\RunDlg.rc""\0"
END

4 TEXTINCLUDE DISCARDABLE
BEGIN
    "#include "".\\WinControls\\ColourPicker\\ColourPopup.rc""\0"
END

5 TEXTINCLUDE DISCARDABLE
BEGIN
    "#include "".\\WinControls\\ColourPicker\\WordStyleDlg.rc""\0"
END
#endif //__GNUC__



// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_M30ICON             ICON                    "icons\\npp.ico"
IDI_NEW_OFF_ICON        ICON                    "icons\\new_off.ico"
IDI_OPEN_OFF_ICON       ICON                    "icons\\open_off.ico"
IDI_SAVE_OFF_ICON       ICON                    "icons\\save_off.ico"
IDI_SAVEALL_OFF_ICON    ICON                    "icons\\saveall_off.ico"
IDI_CLOSE_OFF_ICON      ICON                    "icons\\supp_off.ico"
IDI_CLOSEALL_OFF_ICON   ICON                    "icons\\suppall_off.ico"
IDI_CUT_OFF_ICON        ICON                    "icons\\cut_off.ico"
IDI_COPY_OFF_ICON       ICON                    "icons\\dupli_off.ico"
IDI_PASTE_OFF_ICON      ICON                    "icons\\paste_off.ico"
IDI_UNDO_OFF_ICON       ICON                    "icons\\undo_off.ico"
IDI_REDO_OFF_ICON       ICON                    "icons\\redo_off.ico"
IDI_FIND_OFF_ICON       ICON                    "icons\\find_off.ico"
IDI_REPLACE_OFF_ICON    ICON                    "icons\\findrep_off.ico"
IDI_ZOOMIN_OFF_ICON      ICON                    "icons\\zoomIn_off.ico"
IDI_ZOOMOUT_OFF_ICON      ICON                    "icons\\zoomOut_off.ico"
IDI_VIEW_UD_DLG_OFF_ICON   ICON           "icons\\userDefineDlg_off.ico"
IDI_VIEW_ALL_CHAR_OFF_ICON  ICON            "icons\\allChars_off.ico"
IDI_VIEW_INDENT_OFF_ICON   ICON			"icons\\indentGuide_off.ico"
IDI_VIEW_WRAP_OFF_ICON    ICON			"icons\\wrap_off.ico"
IDI_PRINT_OFF_ICON      ICON                    "icons\\imprim_off.ico"

IDI_NEW_ON_ICON         ICON                    "icons\\new_on.ico"
IDI_OPEN_ON_ICON        ICON                    "icons\\open_on.ico"
IDI_SAVE_ON_ICON        ICON                    "icons\\save_on.ico"
IDI_SAVEALL_ON_ICON     ICON                    "icons\\saveall_on.ico"
IDI_CLOSE_ON_ICON       ICON                    "icons\\supp_on.ico"
IDI_CLOSEALL_ON_ICON    ICON                    "icons\\suppall_on.ico"
IDI_CUT_ON_ICON         ICON                    "icons\\cut_on.ico"
IDI_COPY_ON_ICON        ICON                    "icons\\dupli_on.ico"
IDI_PASTE_ON_ICON       ICON                    "icons\\paste_on.ico"
IDI_UNDO_ON_ICON        ICON                    "icons\\undo_on.ico"
IDI_REDO_ON_ICON        ICON                    "icons\\redo_on.ico"
IDI_FIND_ON_ICON        ICON                    "icons\\find_on.ico"
IDI_REPLACE_ON_ICON     ICON                    "icons\\findrep_on.ico"
IDI_ZOOMIN_ON_ICON      ICON                    "icons\\zoomIn_on.ico"
IDI_ZOOMOUT_ON_ICON      ICON                    "icons\\zoomOut_on.ico"
IDI_VIEW_UD_DLG_ON_ICON   ICON           "icons\\userDefineDlg_on.ico"
IDI_VIEW_ALL_CHAR_ON_ICON  ICON            "icons\\allChars_on.ico"
IDI_VIEW_INDENT_ON_ICON   ICON			"icons\\indentGuide_on.ico"
IDI_VIEW_WRAP_ON_ICON    ICON			"icons\\wrap_on.ico"
IDI_PRINT_ON_ICON       ICON                    "icons\\imprim_on.ico"

//IDI_NEW_DISABLE_ICON         ICON                    "icons\\new_on.ico"
//IDI_OPEN_DISABLE_ICON        ICON                    "icons\\open_on.ico"
IDI_SAVE_DISABLE_ICON        ICON                    "icons\\save_dis.ico"
IDI_SAVEALL_DISABLE_ICON     ICON                    "icons\\saveall_dis.ico"
//IDI_CLOSE_DISABLE_ICON       ICON                    "icons\\supp_on.ico"
//IDI_CLOSEALL_DISABLE_ICON    ICON                    "icons\\suppall_on.ico"
IDI_CUT_DISABLE_ICON         ICON                    "icons\\cut_dis.ico"
IDI_COPY_DISABLE_ICON        ICON                    "icons\\dupli_dis.ico"
IDI_PASTE_DISABLE_ICON       ICON                    "icons\\paste_dis.ico"
IDI_UNDO_DISABLE_ICON        ICON                    "icons\\undo_dis.ico"
IDI_REDO_DISABLE_ICON        ICON                    "icons\\redo_dis.ico"
//IDI_FIND_DISABLE_ICON        ICON                    "icons\\find_on.ico"
//IDI_REPLACE_DISABLE_ICON     ICON                    "icons\\findrep_on.ico"
//IDI_PRINT_DISABLE_ICON       ICON                    "icons\\imprim_on.ico"
IDI_SAVED_ICON           ICON                    "icons\\saved.ico"
IDI_UNSAVED_ICON       ICON                    "icons\\unsaved.ico"
IDI_READONLY_ICON       ICON                    "icons\\readonly.ico"

IDC_DRAG_TAB       CURSOR                    "cursors\\drag.cur"
IDC_DRAG_INTERDIT_TAB       CURSOR         "cursors\\drag_interdit.cur"
IDC_DRAG_PLUS_TAB       CURSOR         "cursors\\drag_plus.cur"

IDR_SAVEALL		BITMAP		"icons\\saveAll.bmp"
IDR_CLOSEFILE	BITMAP		"icons\\closeFile.bmp"
IDR_CLOSEALL	BITMAP		"icons\\closeAll.bmp"
IDR_FIND			BITMAP		"icons\\find.bmp"
IDR_REPLACE		BITMAP		"icons\\findReplace.bmp"
IDR_ZOOMIN		BITMAP		"icons\\zoomIn.bmp"
IDR_ZOOMOUT	BITMAP		"icons\\zoomOut.bmp"
IDR_WRAP		BITMAP		"icons\\wrap.bmp"
IDR_INVISIBLECHAR  BITMAP		"icons\\invisibleChar.bmp"
IDR_INDENTGUIDE	  BITMAP		"icons\\indentGuide.bmp"
IDR_SHOWPANNEL	BITMAP		"icons\\showPannel.bmp"
                           
IDR_M30_MENU MENU 
BEGIN
    POPUP "&File"
    BEGIN
        MENUITEM "&New\tCtrl+N",                IDM_FILE_NEW
        MENUITEM "&Open...\tCtrl+O",            IDM_FILE_OPEN
        MENUITEM "Close\tCtrl+F4, Ctrl+W",              IDM_FILE_CLOSE
        MENUITEM "C&lose All",                  	  IDM_FILE_CLOSEALL
	MENUITEM "Close All BUT Current Document",  IDM_FILE_CLOSEALL_BUT_CURRENT
        MENUITEM "&Save\tCtrl+S",               IDM_FILE_SAVE
	MENUITEM "Sav&e All",               IDM_FILE_SAVEALL
        MENUITEM "Save &As...",                 IDM_FILE_SAVEAS
	//MENUITEM SEPARATOR
	//POPUP "Encoding"
	//BEGIN
		//MENUITEM "Traditional Chinese",                IDM_FILE_ASIAN_LANG
	//END
	MENUITEM SEPARATOR
	MENUITEM "Print...",			IDM_FILE_PRINT
	MENUITEM SEPARATOR
        MENUITEM "E&xit",                       IDM_FILE_EXIT
    END
   
    POPUP "&Edit"
    BEGIN
        MENUITEM "&Undo\tCtrl+Z",               IDM_EDIT_UNDO
        MENUITEM "&Redo\tCtrl+Y",               IDM_EDIT_REDO
        MENUITEM SEPARATOR
        MENUITEM "Cu&t\tCtrl+X",                IDM_EDIT_CUT
        MENUITEM "&Copy\tCtrl+C",               IDM_EDIT_COPY
        MENUITEM "&Paste\tCtrl+V",              IDM_EDIT_PASTE
        MENUITEM "&Delete\tDel",                IDM_EDIT_DELETE
        MENUITEM "Select A&ll\tCtrl+A",         IDM_EDIT_SELECTALL
    END
    
    POPUP "&Search"
    BEGIN
	MENUITEM "&Find...\tCtrl+F",                	IDM_SEARCH_FIND
	MENUITEM "Find &Next\tF3",                		IDM_SEARCH_FINDNEXT
        MENUITEM "Replace...\tCtrl+H",             	IDM_SEARCH_REPLACE
	MENUITEM "Go to line...\tCtrl+G",             	IDM_SEARCH_GOTOLINE
	MENUITEM SEPARATOR
	MENUITEM "Toggle Bookmark\tCtrl+F2" ,	IDM_SEARCH_TOGGLE_BOOKMARK	
	MENUITEM "Next Bookmark\tF2",			IDM_SEARCH_NEXT_BOOKMARK
	MENUITEM "Previous Bookmark\tShift+F2",	IDM_SEARCH_PREV_BOOKMARK
	MENUITEM "Clear all Bookmarks",		IDM_SEARCH_CLEAR_BOOKMARKS
    END

	POPUP "&View"
	BEGIN
		MENUITEM "Fold / Unfold all",              		IDM_VIEW_TOGGLE_FOLDALL
		MENUITEM SEPARATOR
		POPUP "Tool Bar"
		BEGIN
			MENUITEM "Hide me",               	IDM_VIEW_TOOLBAR_HIDE	
			MENUITEM "Reduce me (with nice icons)",               IDM_VIEW_TOOLBAR_REDUCE	
			MENUITEM "Enlarge me (with nice icons)",               IDM_VIEW_TOOLBAR_ENLARGE
			MENUITEM "Give me the ugly, hideous, standard icons",               IDM_VIEW_TOOLBAR_STANDARD
		END
		
		POPUP "Tab Bar"
		BEGIN
			MENUITEM "Reduce me",              				IDM_VIEW_REDUCETABBAR
			MENUITEM "Lock me (No Drag 'N' Drop)",               IDM_VIEW_LOCKTABBAR
			
			MENUITEM "Draw the inactive tabs",              IDM_VIEW_DRAWTABBAR_INACIVETAB
			MENUITEM "Draw the orange top bar",              IDM_VIEW_DRAWTABBAR_TOPBAR
		END                                        
		MENUITEM "Status Bar",               IDM_VIEW_STATUSBAR
		//MENUITEM "Standard Cursor",               IDM_VIEW_STDCURSOR
		MENUITEM "User Define Dialog",               	IDM_VIEW_USER_DLG
		MENUITEM SEPARATOR
		
		MENUITEM "Line Number Margin",       IDM_VIEW_LINENUMBER
		MENUITEM "BookMark Margin",           IDM_VIEW_SYMBOLMARGIN
		
		POPUP "Folder Margin"
		BEGIN
			MENUITEM "Show me",               IDM_VIEW_FOLDERMAGIN
			MENUITEM SEPARATOR
			MENUITEM "Simple Style",               IDM_VIEW_FOLDERMAGIN_SIMPLE
			MENUITEM "Arrow Style",               IDM_VIEW_FOLDERMAGIN_ARROW
			MENUITEM "Circle Tree Style",         IDM_VIEW_FOLDERMAGIN_CIRCLE
			MENUITEM "Box Tree Style",            IDM_VIEW_FOLDERMAGIN_BOX
		END
		MENUITEM SEPARATOR
        MENUITEM "Show White Space and TAB",          IDM_VIEW_TAB_SPACE
        MENUITEM "Show End Of Line",          IDM_VIEW_EOL
		MENUITEM "Show all characters",          IDM_VIEW_ALL_CHARACTERS
        MENUITEM SEPARATOR
		MENUITEM "Vertical Edge Line mode",           IDM_VIEW_EDGELINE
		MENUITEM "Vertical Edge Background mode",           IDM_VIEW_EDGEBACKGROUND
		MENUITEM SEPARATOR
		MENUITEM "Show Indent guide",           IDM_VIEW_INDENT_GUIDE
		MENUITEM "Current Line HighLighting", IDM_VIEW_CURLINE_HILITING
		MENUITEM "Wrap",           			IDM_VIEW_WRAP
		MENUITEM SEPARATOR
		MENUITEM "Zoom &in\tCtrl-Mouse Wheel Up",               IDM_VIEW_ZOOMIN
		MENUITEM "Zoom &out\tCtrl-Mouse Wheel Down",               IDM_VIEW_ZOOMOUT
	END
	POPUP "For&mat"
	BEGIN
		MENUITEM "Convert to Windows Format",       IDM_FORMAT_TODOS
		MENUITEM "Convert to UNIX Format",              IDM_FORMAT_TOUNIX
		MENUITEM "Convert to MAC Format",              IDM_FORMAT_TOMAC
	END  
	
	POPUP "&Document"
	BEGIN
		MENUITEM "Go to another view",               	IDC_DOC_GOTO_ANOTHER_VIEW
		MENUITEM "Clone to another view",               	IDC_DOC_CLONE_TO_ANOTHER_VIEW
	END

	POPUP "&Language"
	BEGIN
		MENUITEM "C",					IDM_LANG_C
		MENUITEM "C++",				IDM_LANG_CPP
		MENUITEM "rc resource file",			IDM_LANG_RC
		MENUITEM "Java",				IDM_LANG_JAVA
        MENUITEM "C#",				IDM_LANG_CS
		MENUITEM "Makefile",				IDM_LANG_MAKEFILE
		MENUITEM "M$ INI file",			IDM_LANG_INI
		MENUITEM "HTML",				IDM_LANG_HTML
		MENUITEM "XML",				IDM_LANG_XML
        MENUITEM "Javascript",				IDM_LANG_JS
		MENUITEM "PHP",				IDM_LANG_PHP
		MENUITEM "ASP",				IDM_LANG_ASP
        MENUITEM "CSS",				IDM_LANG_CSS
		  
		MENUITEM "Pascal",			IDM_LANG_PASCAL
		MENUITEM "Python",				IDM_LANG_PYTHON
        MENUITEM "Perl",				IDM_LANG_PERL
		MENUITEM "Objective C",		IDM_LANG_OBJC
        MENUITEM "Lua",		IDM_LANG_LUA
		MENUITEM "SQL",				IDM_LANG_SQL
		MENUITEM "VB",				IDM_LANG_VB
		MENUITEM "Batch",			IDM_LANG_BATCH
		MENUITEM "M$ Dos Style",		IDM_LANG_ASCII	
        MENUITEM "Normal Text",		IDM_LANG_TEXT
        MENUITEM SEPARATOR	
		MENUITEM "User Define",		IDM_LANG_USER
        //MENUITEM "UD1",		IDM_LANG_USER_1
		MENUITEM SEPARATOR	
		MENUITEM "Styler Configurator...",               	IDM_LANGSTYLE_CONFIG_DLG
	END

	POPUP "Se&ttings"
	BEGIN
		POPUP "Tab setting"
		BEGIN
			MENUITEM "Size...",               	IDM_SETTING_TAB_SIZE
			MENUITEM "Replace by space",    	IDM_SETTING_TAB_REPLCESPACE
		END
        MENUITEM "Set Max Number of History File...",               	IDM_SETTING_HISTORY_SIZE
		//POPUP "Vertical Edge Line"
		//BEGIN
        MENUITEM "Set # Column for Vertical Edge Line...",             IDM_SETTING_EDGE_SIZE
			//MENUITEM "Set Colour...",      	IDM_SETTING_EDGE_COLOUR
		//END
	END
	
	MENUITEM "&Run...",               	IDM_EXECUTE

	POPUP "&?", HELP
	BEGIN
		MENUITEM "About...",			IDM_ABOUT
		// WebControl bug
		//MENUITEM "Try",				IDM_TRY
	END

END

IDD_ABOUTBOX DIALOGEX 0, 0, 279, 225
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_SYSMENU | WS_BORDER
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
    LTEXT        NOTEPAD_PLUS_VERSION ,IDC_STATIC,21,18,84,11
					
    GROUPBOX        "GNU General Public Licence",IDC_STATIC,19,65,231,121,BS_CENTER
    DEFPUSHBUTTON      "Okey",IDOK,106,195,50,14,BS_FLAT,WS_GROUP
    LTEXT           "Author :",IDC_STATIC,21,33,31,8
	LTEXT           "Don HO",IDC_STATIC,78,33,25,8
	LTEXT           "don.h@free.fr",IDC_EMAIL_ADDR,107,33,62,8
	
    LTEXT           "Home Page :",IDC_STATIC,21,46,47,8
    LTEXT           "http://notepad-plus.sourceforge.net/",IDC_HOME_ADDR,78,46,126,8

    EDITTEXT        IDC_LICENCE_EDIT,31,79,209,96,ES_MULTILINE | 
                    ES_AUTOVSCROLL | ES_READONLY | NOT WS_BORDER |WS_VSCROLL
END

IDD_GOLINE DIALOGEX 26, 41, 223, 62
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_CAPTION
CAPTION "Go To Line #"
FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN
    LTEXT           "You are here :", ID_URHERE_STATIC,5,8,95,8,NOT WS_GROUP
    LTEXT           "0123456789",ID_CURRLINE,100,8,40,8,NOT WS_GROUP
    LTEXT           "You want to go :", ID_UGO_STATIC,5,21,95,8
    EDITTEXT        ID_GOLINE_EDIT,100,20,30,12,ES_NUMBER
    LTEXT           "You can't go further than :", ID_NOMORETHAN_STATIC,5,49,92,8,NOT WS_GROUP
    LTEXT           "0123456789",ID_LASTLINE,99,49,40,8,NOT WS_GROUP
    DEFPUSHBUTTON   "&Go !",IDOK,145,21,70,14,BS_NOTIFY
    PUSHBUTTON      "I'm going nowhere",IDCANCEL,145,43,70,14,BS_NOTIFY
END

IDD_VALUE_DLG DIALOGEX 0, 0, 74, 17
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | 
    WS_SYSMENU
EXSTYLE WS_EX_TOOLWINDOW
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
    LTEXT           "STATIC :",IDC_VALUE_STATIC,6,4,45,8
    EDITTEXT        IDC_VALUE_EDIT,49,2,18,14,ES_NUMBER,WS_EX_DLGMODALFRAME
END


IDD_SETTING_DLG DIALOGEX 0, 0, 80, 17
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | 
    WS_SYSMENU
EXSTYLE WS_EX_TOOLWINDOW
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
    LTEXT           "STATIC :",IDC_VALUE_STATIC,6,4,45,8
    EDITTEXT        IDC_VALUE_EDIT,49,2,18,14,ES_NUMBER,WS_EX_DLGMODALFRAME
END


IDR_M30_ACCELERATORS ACCELERATORS 
BEGIN
    "N",            IDM_FILE_NEW,           VIRTKEY, CONTROL
    "O",            IDM_FILE_OPEN,          VIRTKEY, CONTROL
    VK_F4,      IDM_FILE_CLOSE,          VIRTKEY, CONTROL
    "W",      IDM_FILE_CLOSE,          VIRTKEY, CONTROL
    "S",            IDM_FILE_SAVE,          VIRTKEY, CONTROL
	"F",            IDM_SEARCH_FIND,          VIRTKEY, CONTROL
	"H",            IDM_SEARCH_REPLACE,       VIRTKEY, CONTROL
	"G",            IDM_SEARCH_GOTOLINE,       VIRTKEY, CONTROL
    VK_F2,      	IDM_SEARCH_TOGGLE_BOOKMARK,      VIRTKEY, CONTROL
	VK_F2,  	    IDM_SEARCH_NEXT_BOOKMARK, VIRTKEY
	VK_F2,  	    IDM_SEARCH_PREV_BOOKMARK, VIRTKEY, SHIFT
	VK_F3,          IDM_SEARCH_FINDNEXT,      VIRTKEY
	VK_F5,          IDM_EXECUTE,            VIRTKEY
	VK_TAB,    IDC_PREV_DOC,  VIRTKEY, CONTROL, SHIFT
	VK_TAB,    IDC_NEXT_DOC,  VIRTKEY, CONTROL
                VK_SPACE,       IDC_AUTOCOMPLETE,    VIRTKEY, CONTROL
END  


