forked from bruderstein/PythonScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathShortcutDlg.h
More file actions
79 lines (60 loc) · 1.77 KB
/
ShortcutDlg.h
File metadata and controls
79 lines (60 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#ifndef _SHORTCUTDLG_H
#define _SHORTCUTDLG_H
#ifndef STATIC_DIALOG_H
#include "StaticDialog.h"
#endif
#ifndef _CONFIGFILE_H
#include "ConfigFile.h"
#endif
struct NppData;
class ShortcutDlg : public StaticDialog
{
public:
ShortcutDlg(HINSTANCE hInst, NppData& nppData, const TCHAR *scriptDirAppend);
void doDialog();
protected:
INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam);
private:
ShortcutDlg(); // default constructor disabled
void populateScripts(tstring dir, HTREEITEM parent = TVI_ROOT);
void onInitDialog();
void populateUserScripts();
void populateMachineScripts();
void clearScripts();
void addMenuItem();
void addMenuItem(const TCHAR *item);
void removeMenuItem();
void addToolbarItem();
void addToolbarItem(const TCHAR *item, HBITMAP iconPath);
void removeToolbarItem();
void populateCurrentItems();
void scriptSelected();
void nonScriptSelected();
void toolbarSetIcon();
void saveConfig();
void ctrlOnClick();
HTREEITEM addTreeItem(HTREEITEM parent, HTREEITEM lastItem, TCHAR *fullPath, TCHAR *text, bool isDirectory);
tstring m_userScriptDir;
tstring m_machineScriptDir;
HWND m_hTree;
HWND m_hListMenuItems;
HWND m_hListToolbarItems;
HWND m_hComboInitialisation;
HWND m_hButtonColor;
HIMAGELIST m_hImageList;
int m_hDefaultImageIndex;
HIMAGELIST m_hIcons;
int m_iconFolderOpen;
int m_iconFolderClosed;
int m_iconPython;
idx_t m_toolbarItemCount;
idx_t m_menuItemCount;
size_t m_toolbarColumnWidth;
size_t m_menuItemColumnWidth;
std::list< std::shared_ptr<TCHAR> > m_itemList;
TCHAR *m_currentScript;
ConfigFile::MenuItemsTD m_menuItems;
ConfigFile::ToolbarItemsTD m_toolbarItems;
static const int COLUMN_PADDING = 5;
};
#endif