93451f91118e71572579ce5f3b5f05c5ad425cca
[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 HWND hTBar, hTree, hEdit, hStatus;
23 HTREEITEM nodes [MAXNODES];
24
25 /* Window Callbacks */
26
27 LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
28 INT_PTR CALLBACK StatusProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
29 INT_PTR CALLBACK OptionsProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
30
31 /* Prototypes */
32
33 void Help (void);
34
35 int AddItem (int id, const char* name, int parent, int icon);
36 int SetText (const char* text);
37 int SetStatus (int status1, int status2, WCHAR* text);
38 int Ask (const WCHAR* message);
39
40 /* Toolbar Releated */
41
42 #define TBSTYLE_FLAT 2048
43
44 // This is the struct where the toolbar is defined
45 TBBUTTON Buttons [] =
46 {
47 {0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, 0L, 0},
48
49 {0, 1, TBSTATE_INDETERMINATE, TBSTYLE_BUTTON, 0L, 0}, // No Action
50 {1, 2, TBSTATE_INDETERMINATE, TBSTYLE_BUTTON, 0L, 0}, // Install
51 {2, 3, TBSTATE_INDETERMINATE, TBSTYLE_BUTTON, 0L, 0}, // Install from source
52 {3, 4, TBSTATE_INDETERMINATE, TBSTYLE_BUTTON, 0L, 0}, // Update
53 {4, 5, TBSTATE_INDETERMINATE, TBSTYLE_BUTTON, 0L, 0}, // Unistall
54
55 {0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, 0L, 0},
56 {5, 6, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0L, 0}, // DoIt (tm)
57 {0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, 0L, 0},
58
59 {6, 7, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0L, 0}, // Help
60 {7, 8, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0L, 0}, // Options
61
62 {0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, 0L, 0},
63 };