/////////////////////////////////////////////////////////////////////////////
//                                                                         //
//  NppTags - CTags plugin for Notepad++                                   //
//  Copyright (C) 2013 Frank Fesevur                                       //
//                                                                         //
//  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 <commctrl.h>
#include "Resource.h"
#include "Version.h"
#include "sqlite3.h"

/////////////////////////////////////////////////////////////////////////////
// Version Information

VS_VERSION_INFO VERSIONINFO
FILEVERSION	VERSION_NUMBER
PRODUCTVERSION	VERSION_NUMBER
FILEFLAGSMASK	0x3fL
FILEFLAGS 0
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_APP
FILESUBTYPE VFT2_UNKNOWN
{
	BLOCK	"VarFileInfo"
	{
		VALUE	"Translation",	0x409,	1200
	}
	BLOCK	"StringFileInfo"
	{
		BLOCK "040904b0"
		{
			VALUE	"CompanyName",			"Frank Fesevur"
			VALUE	"FileDescription",		"CTags plug-in for Notepad++"
			VALUE	"FileVersion",			VERSION_NUMBER_STR
			VALUE	"InternalName",			"NppTags.dll"
			VALUE	"LegalCopyright",		COPYRIGHT_STR
			VALUE	"OriginalFilename",		"NppTags.dll"
			VALUE	"ProductName",			"NppTags"
			VALUE	"ProductVersion",		VERSION_NUMBER_STR
		}
	}
}

/////////////////////////////////////////////////////////////////////////////
// Dialogs

IDD_ABOUTBOX DIALOGEX 0, 0, 224, 187
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_BORDER | WS_SYSMENU
FONT 8, "MS Shell Dlg", 0, 0, 0x1
{
	GROUPBOX		"Exuberant CTags plug-in",IDC_STATIC,10,9,201,154,BS_CENTER
	LTEXT			"Author:",IDC_STATIC,30,23,35,8
	LTEXT			"Frank Fesevur",IDC_STATIC,75,23,74,8
	LTEXT			"Version:",IDC_STATIC,30,38,31,8
	LTEXT			VERSION_NUMBER_STR,IDC_STATIC,75,38,19,8
	LTEXT			"Using SQLite:",IDC_STATIC,30,52,43,8
	LTEXT			SQLITE_VERSION,IDC_STATIC,75,52,43,8
	LTEXT			"Licence:",IDC_STATIC,30,67,43,8
	LTEXT			"GPL-2",IDC_STATIC,75,67,43,8
	LTEXT			"Site:",IDC_STATIC,30,84,27,8
	CONTROL			"<a href=""http://www.fesevur.com/nppsnippets"">http://www.fesevur.com/nppsnippets</a>",IDC_SYSLINK,"SysLink",NOT WS_TABSTOP,75,84,130,8
	EDITTEXT		IDC_CHANGELOG,29,97,175,61,ES_MULTILINE | ES_AUTOVSCROLL | NOT ES_AUTOHSCROLL | ES_READONLY | ES_WANTRETURN | WS_VSCROLL | NOT WS_TABSTOP
	PUSHBUTTON		"Close",IDCANCEL,86,167,50,14
}

IDD_TAGS_TREE DIALOGEX 0, 0, 190, 90
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Tags"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
{
	CONTROL			"Tree1",IDC_TREE,"SysTreeView32", TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP | TVS_SHOWSELALWAYS | TVS_INFOTIP | WS_BORDER | WS_TABSTOP, 0, 7, 186, 90
}

IDD_SELECT_TAG DIALOGEX 0, 0, 365, 143
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Select Tag"
FONT 8, "MS Shell Dlg", 0, 0, 0x1
{
	CONTROL			"List1", IDC_TAG_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOLABELWRAP | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP, 7, 7, 351, 109
	DEFPUSHBUTTON	"&Goto",IDOK,93,122,50,14
	PUSHBUTTON		"&Cancel",IDCANCEL,153,122,50,14
}

/////////////////////////////////////////////////////////////////////////////
// Context Menus

IDCM_TAGS_TREE MENU PRELOAD DISCARDABLE
{
	POPUP "_POPUP_"
	{
		MENUITEM "&Jump to Tag",				IDC_JUMP_TO_TAG
		MENUITEM SEPARATOR
		MENUITEM "&Generate tags database",		IDC_REFRESH_TAGS
		MENUITEM SEPARATOR
		MENUITEM "&Database options...",		IDC_DATABASE_OPTIONS
		MENUITEM SEPARATOR
		MENUITEM "&Tag properties...",			IDC_TAG_PROPERTIES
	}
}

/////////////////////////////////////////////////////////////////////////////
// Bitmaps

IDB_SHOW_TAGS	  	BITMAP	DISCARDABLE		"Res/MainToolbar_ShowTags.bmp"
IDB_REFRESH_TAGS  	BITMAP	DISCARDABLE		"Res/MainToolbar_RefreshTags.bmp"
IDB_JUMP_TO_TAG  	BITMAP	DISCARDABLE		"Res/MainToolbar_JumpToTag.bmp"

/////////////////////////////////////////////////////////////////////////////
// Icons

IDI_TAGS			ICON	DISCARDABLE		"Res/NppTags.ico"

/* Testing an Accelerator and multi line comments */

IDR_MAINFRAME ACCELERATORS PRELOAD MOVEABLE PURE 
BEGIN
    "P",            ID_FILE_PRINT,          VIRTKEY, CONTROL, NOINVERT
    "S",            ID_FILE_SAVE_AS,        VIRTKEY, CONTROL, NOINVERT
    "U",            ID_EDIT_COPYURL,        VIRTKEY, CONTROL, NOINVERT
    "V",            ID_EDIT_PASTE,          VIRTKEY, CONTROL, NOINVERT
    VK_F1,          ID_HELP,                VIRTKEY, NOINVERT
    VK_F1,          ID_CONTEXT_HELP,        VIRTKEY, SHIFT, NOINVERT
    VK_INSERT,      ID_EDIT_PASTE,          VIRTKEY, SHIFT, NOINVERT
    VK_RETURN,      ID_FILE_PROPERTIES,     VIRTKEY, ALT, NOINVERT
END

/////////////////////////////////////////////////////////////////////////////
// And put a CURSOR in it as well

IDC_LINK_CURSOR		CURSOR  DISCARDABLE     "res\\link_cur.cur"

/* And don't forget a font file */

IDF_CM_ROMAN		FONT	"cmroman.fnt"
