Cleanup: Dropped unused code
[TortoiseGit.git] / ext / ResizableLib / ResizableSheet.h
blob08a07c10b32c7e27e5a9eb056f360b4ef0e47adf
1 #if !defined(AFX_RESIZABLESHEET_H__INCLUDED_)
2 #define AFX_RESIZABLESHEET_H__INCLUDED_
4 #if _MSC_VER > 1000
5 #pragma once
6 #endif // _MSC_VER > 1000
8 /////////////////////////////////////////////////////////////////////////////
9 //
10 // This file is part of ResizableLib
11 // http://sourceforge.net/projects/resizablelib
13 // Copyright (C) 2000-2004 by Paolo Messina
14 // http://www.geocities.com/ppescher - mailto:ppescher@hotmail.com
16 // The contents of this file are subject to the Artistic License (the "License").
17 // You may not use this file except in compliance with the License.
18 // You may obtain a copy of the License at:
19 // http://www.opensource.org/licenses/artistic-license.html
21 // If you find this code useful, credits would be nice!
23 /////////////////////////////////////////////////////////////////////////////
25 #include "ResizableLayout.h"
26 #include "ResizableGrip.h"
27 #include "ResizableMinMax.h"
28 #include "ResizableSheetState.h"
30 /////////////////////////////////////////////////////////////////////////////
31 // ResizableSheet.h : header file
34 class CResizableSheet : public CPropertySheet, public CResizableLayout,
35 public CResizableGrip, public CResizableMinMax,
36 public CResizableSheetState
38 DECLARE_DYNAMIC(CResizableSheet)
40 // Construction
41 public:
42 CResizableSheet();
43 CResizableSheet(UINT nIDCaption, CWnd *pParentWnd = NULL, UINT iSelectPage = 0);
44 CResizableSheet(LPCTSTR pszCaption, CWnd *pParentWnd = NULL, UINT iSelectPage = 0);
46 // Attributes
47 private:
48 // support for temporarily hiding the grip
49 DWORD m_dwGripTempState;
51 // flags
52 BOOL m_bEnableSaveRestore;
53 BOOL m_bRectOnly;
54 BOOL m_bSavePage;
56 // layout vars
57 UINT_PTR m_nCallbackID;
58 CSize m_sizePageTL, m_sizePageBR;
59 BOOL m_bLayoutDone;
61 // internal status
62 CString m_sSection; // section name (identifies a parent window)
64 // Operations
65 public:
67 // Overrides
68 // ClassWizard generated virtual function overrides
69 //{{AFX_VIRTUAL(CResizableSheet)
70 public:
71 virtual BOOL OnInitDialog();
72 protected:
73 virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
74 //}}AFX_VIRTUAL
75 protected:
77 // Implementation
78 public:
79 virtual ~CResizableSheet();
81 // used internally
82 private:
83 void PrivateConstruct();
85 BOOL IsWizard() const;
87 // callable from derived classes
88 protected:
89 void PresetLayout();
90 void RefreshLayout();
92 // section to use in app's profile
93 void EnableSaveRestore(LPCTSTR pszSection, BOOL bRectOnly = FALSE,
94 BOOL bWithPage = FALSE);
95 int GetMinWidth(); // minimum width to display all buttons
98 virtual CWnd* GetResizableWnd() const
100 // make the layout know its parent window
101 return CWnd::FromHandle(m_hWnd);
104 // Generated message map functions
105 protected:
106 virtual BOOL CalcSizeExtra(HWND hWndChild, CSize sizeChild, CSize& sizeExtra);
107 virtual BOOL ArrangeLayoutCallback(LAYOUTINFO& layout) const;
108 //{{AFX_MSG(CResizableSheet)
109 afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI);
110 afx_msg void OnSize(UINT nType, int cx, int cy);
111 afx_msg void OnDestroy();
112 afx_msg BOOL OnEraseBkgnd(CDC* pDC);
113 afx_msg BOOL OnNcCreate(LPCREATESTRUCT lpCreateStruct);
114 //}}AFX_MSG
115 afx_msg BOOL OnPageChanging(NMHDR* pNotifyStruct, LRESULT* pResult);
116 DECLARE_MESSAGE_MAP()
119 /////////////////////////////////////////////////////////////////////////////
121 #endif // AFX_RESIZABLESHEET_H__INCLUDED_