OSDN Git Service

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