Package Manager: fixed HotKeys (thanks to w3seek) *shamed*
[reactos.git] / rosapps / packmgr / gui / main.h
1 ///////////////////////////////////////////////////
2 //
3 // main.h
4 // main.cpp's lumber room :)
5 ///////////////////////////////////////////////////
6
7 #include <windows.h>
8 #include <ntos/keyboard.h>
9 #include <commctrl.h>
10 #include <iostream>
11 #include <fstream>
12
13 #include <package.hpp>
14 #include "resource.h"
15
16 /* Some Variables */
17
18 int selected, splitter_pos = 50;
19
20 pTree tree;
21 HMENU hPopup;
22 HACCEL hHotKeys;
23 HWND hTBar, hTree, hEdit, hStatus;
24 HTREEITEM nodes [MAXNODES];
25
26 /* Window Callbacks */
27
28 LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
29 INT_PTR CALLBACK StatusProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
30 INT_PTR CALLBACK OptionsProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
31
32 /* Prototypes */
33
34 void Help (void);
35
36 int AddItem (int id, const char* name, int parent, int icon);
37 int SetText (const char* text);
38 int SetStatus (int status1, int status2, WCHAR* text);
39 int Ask (const WCHAR* message);
40
41 /* Toolbar Releated */
42
43 #define TBSTYLE_FLAT 2048
44
45 // This is the struct where the toolbar is defined
46 TBBUTTON Buttons [] =
47 {
48 {0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, 0L, 0},
49
50 {0, 1, TBSTATE_INDETERMINATE, TBSTYLE_BUTTON, 0L, 0}, // No Action
51 {1, 2, TBSTATE_INDETERMINATE, TBSTYLE_BUTTON, 0L, 0}, // Install
52 {2, 3, TBSTATE_INDETERMINATE, TBSTYLE_BUTTON, 0L, 0}, // Install from source
53 {3, 4, TBSTATE_INDETERMINATE, TBSTYLE_BUTTON, 0L, 0}, // Update
54 {4, 5, TBSTATE_INDETERMINATE, TBSTYLE_BUTTON, 0L, 0}, // Unistall
55
56 {0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, 0L, 0},
57 {5, 6, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0L, 0}, // DoIt (tm)
58 {0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, 0L, 0},
59
60 {6, 7, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0L, 0}, // Help
61 {7, 8, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0L, 0}, // Options
62
63 {0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, 0L, 0},
64 };