Link with mingwex before libntll
[cygwin-setup.git] / choose.h
blob1b295e96690a186cd88be1f7a06f2715f6371058
1 /*
2 * Copyright (c) 2000, Red Hat, Inc.
3 * Copyright (c) 2003 Robert Collins <rbtcollins@hotmail.com>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * A copy of the GNU General Public License can be found at
11 * http://www.gnu.org/
13 * Written by Robert Collins <rbtcollins@hotmail.com>
17 #ifndef SETUP_CHOOSE_H
18 #define SETUP_CHOOSE_H
20 #include "proppage.h"
21 #include "package_meta.h"
22 #include "PickView.h"
23 #include "ListView.h"
25 #define DEFAULT_TIMER_ID 5 //value doesn't matter, as long as it's unique
26 #define SEARCH_TIMER_DELAY 500 //in milliseconds
28 extern bool hasManualSelections;
30 class ChooserPage:public PropertyPage
32 public:
33 ChooserPage ();
34 ~ChooserPage ();
36 virtual bool OnMessageCmd (int id, HWND hwndctl, UINT code);
37 virtual bool OnNotify (NMHDR *pNmHdr, LRESULT *pResult);
38 virtual INT_PTR CALLBACK OnTimerMessage (UINT message, WPARAM wParam,
39 LPARAM lparam);
41 bool Create ();
42 virtual void OnInit ();
43 virtual long OnNext ();
44 virtual long OnBack ();
45 virtual void OnActivate ();
46 virtual long OnUnattended ();
48 static void SetHwndDialog (HWND h)
50 ins_dialog = h;
52 private:
53 void createListview ();
54 void getParentRect (HWND parent, HWND child, RECT * r);
55 void keepClicked();
56 void changeTrust(int button, bool test, bool initial);
57 void logOnePackageResult(packagemeta const *aPkg);
58 void logResults();
59 void PlaceDialog (bool);
60 void applyCommandLinePackageSelection();
61 void initialUpdateState();
63 PickView *chooser;
64 ListView *listview;
65 static HWND ins_dialog;
66 bool cmd_show_set;
67 bool saved_geom;
68 bool saw_geom_change;
69 WINDOWPLACEMENT window_placement;
70 WINDOWPLACEMENT pre_chooser_placement;
71 UINT_PTR timer_id;
72 union writer
74 WINDOWPLACEMENT wp;
75 UINT wpi[sizeof (WINDOWPLACEMENT) / sizeof (UINT)];
77 int update_mode_id;
78 bool activated;
81 #endif /* SETUP_CHOOSE_H */