Fix -Woverloaded-virtual warnings about Window::Create()
[cygwin-setup.git] / propsheet.h
blobc1ddae59a0d08bb90176e8f3268e26cafcc2fee2
1 /*
2 * Copyright (c) 2001, 2002, 2003 Gary R. Van Sickle.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * A copy of the GNU General Public License can be found at
10 * http://www.gnu.org/
12 * Written by Gary R. Van Sickle <g.r.vansickle@worldnet.att.net>
16 #ifndef SETUP_PROPSHEET_H
17 #define SETUP_PROPSHEET_H
19 // This is the header for the PropSheet class. This class encapsulates
20 // a Windows property sheet / wizard and interfaces with the PropertyPage class.
21 // It's named PropSheet instead of PropertySheet because the latter conflicts with
22 // the Windows function of the same name.
25 #include <vector>
27 #include "win32.h"
28 #include <prsht.h>
30 #include "window.h"
32 class PropertyPage;
34 class PropSheet : public Window
36 typedef std::vector< PropertyPage* > PageContainer;
37 PageContainer PropertyPages;
39 HPROPSHEETPAGE *PageHandles;
40 HPROPSHEETPAGE *CreatePages ();
42 public:
43 PropSheet ();
44 virtual ~ PropSheet ();
46 // Should be private and friended to PropertyPage
47 void SetHWNDFromPage (HWND h);
48 void AdjustPageSize (HWND page);
50 bool Create (const Window * Parent = NULL,
51 DWORD Style = WS_OVERLAPPEDWINDOW | WS_VISIBLE | WS_CLIPCHILDREN);
53 void AddPage (PropertyPage * p);
55 bool SetActivePage (int i);
56 bool SetActivePageByID (int resource_id);
57 void SetButtons (DWORD flags);
58 void PressButton (int button);
61 #endif /* SETUP_PROPSHEET_H */