OSDN Git Service

Upgrade graphic tree from qgit2.3
[tortoisegit/TortoiseGitJp.git] / ext / ResizableLib / ResizableSheetEx.h
1 #if !defined(AFX_RESIZABLESHEETEX_H__INCLUDED_)\r
2 #define AFX_RESIZABLESHEETEX_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 // ResizableSheetEx.h : header file\r
32 //\r
33 \r
34 class CResizableSheetEx : public CPropertySheetEx, public CResizableLayout,\r
35                                                 public CResizableGrip, public CResizableMinMax,\r
36                                                 public CResizableSheetState\r
37 {\r
38         DECLARE_DYNAMIC(CResizableSheetEx)\r
39 \r
40 // Construction\r
41 public:\r
42         CResizableSheetEx();\r
43         CResizableSheetEx(UINT nIDCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0,\r
44                 HBITMAP hbmWatermark = NULL, HPALETTE hpalWatermark = NULL, HBITMAP hbmHeader = NULL);\r
45         CResizableSheetEx(LPCTSTR pszCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0,\r
46                 HBITMAP hbmWatermark = NULL, HPALETTE hpalWatermark = NULL, HBITMAP hbmHeader = NULL);\r
47 \r
48 // Attributes\r
49 private:\r
50         // support for temporarily hiding the grip\r
51         DWORD m_dwGripTempState;\r
52 \r
53         // flags\r
54         BOOL m_bEnableSaveRestore;\r
55         BOOL m_bRectOnly;\r
56         BOOL m_bSavePage;\r
57 \r
58         // layout vars\r
59         UINT_PTR m_nCallbackID;\r
60         CSize m_sizePageTL, m_sizePageBR;\r
61         BOOL m_bLayoutDone;\r
62 \r
63         // internal status\r
64         CString m_sSection;                     // section name (identifies a parent window)\r
65 \r
66 // Operations\r
67 public:\r
68         enum\r
69         {\r
70                 PSH_IE4WIZARD97 = 0x00002000,\r
71                 PSH_IE5WIZARD97 = 0x01000000,\r
72         };\r
73 \r
74 // Overrides\r
75         // ClassWizard generated virtual function overrides\r
76         //{{AFX_VIRTUAL(CResizableSheetEx)\r
77         public:\r
78         virtual BOOL OnInitDialog();\r
79         protected:\r
80         virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);\r
81         //}}AFX_VIRTUAL\r
82 \r
83 // Implementation\r
84 public:\r
85         virtual ~CResizableSheetEx();\r
86 \r
87 // used internally\r
88 private:\r
89         void PrivateConstruct();\r
90 \r
91         BOOL IsWizard() const;\r
92         BOOL IsWizard97() const;\r
93 \r
94 // callable from derived classes\r
95 protected:\r
96         void RefreshLayout();\r
97         void PresetLayout();\r
98 \r
99         // section to use in app's profile\r
100         void EnableSaveRestore(LPCTSTR pszSection, BOOL bRectOnly = FALSE,\r
101                 BOOL bWithPage = FALSE);\r
102         int GetMinWidth();      // minimum width to display all buttons\r
103 \r
104 \r
105         virtual CWnd* GetResizableWnd() const\r
106         {\r
107                 // make the layout know its parent window\r
108                 return CWnd::FromHandle(m_hWnd);\r
109         };\r
110 \r
111 // Generated message map functions\r
112 protected:\r
113         void GetHeaderRect(LPRECT lpRect);\r
114         virtual BOOL CalcSizeExtra(HWND hWndChild, CSize sizeChild, CSize& sizeExtra);\r
115         virtual BOOL ArrangeLayoutCallback(LAYOUTINFO& layout) const;\r
116         //{{AFX_MSG(CResizableSheetEx)\r
117         afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI);\r
118         afx_msg void OnSize(UINT nType, int cx, int cy);\r
119         afx_msg void OnDestroy();\r
120         afx_msg BOOL OnEraseBkgnd(CDC* pDC);\r
121         afx_msg BOOL OnNcCreate(LPCREATESTRUCT lpCreateStruct);\r
122         //}}AFX_MSG\r
123         afx_msg BOOL OnPageChanging(NMHDR* pNotifyStruct, LRESULT* pResult);\r
124         afx_msg LRESULT OnResizeSupport(WPARAM wParam, LPARAM lParam);\r
125         DECLARE_MESSAGE_MAP()\r
126 };\r
127 \r
128 /////////////////////////////////////////////////////////////////////////////\r
129 \r
130 #endif  // AFX_RESIZABLESHEETEX_H__INCLUDED_\r