OSDN Git Service

Upgrade graphic tree from qgit2.3
[tortoisegit/TortoiseGitJp.git] / ext / ResizableLib / ResizableMinMax.h
1 /////////////////////////////////////////////////////////////////////////////\r
2 //\r
3 // This file is part of ResizableLib\r
4 // http://sourceforge.net/projects/resizablelib\r
5 //\r
6 // Copyright (C) 2000-2004 by Paolo Messina\r
7 // http://www.geocities.com/ppescher - mailto:ppescher@hotmail.com\r
8 //\r
9 // The contents of this file are subject to the Artistic License (the "License").\r
10 // You may not use this file except in compliance with the License. \r
11 // You may obtain a copy of the License at:\r
12 // http://www.opensource.org/licenses/artistic-license.html\r
13 //\r
14 // If you find this code useful, credits would be nice!\r
15 //\r
16 /////////////////////////////////////////////////////////////////////////////\r
17 \r
18 /*!\r
19  *  @file\r
20  *  @brief Interface for the CResizableMinMax class.\r
21  */\r
22 \r
23 #if !defined(AFX_RESIZABLEMINMAX_H__INCLUDED_)\r
24 #define AFX_RESIZABLEMINMAX_H__INCLUDED_\r
25 \r
26 #if _MSC_VER > 1000\r
27 #pragma once\r
28 #endif // _MSC_VER > 1000\r
29 \r
30 /*! @addtogroup CoreComponents\r
31  *  @{\r
32  */\r
33 \r
34 //! @brief brief_description\r
35 /*!\r
36  *  long_description\r
37  */\r
38 class CResizableMinMax\r
39 {\r
40 // Attributes\r
41 private:\r
42         // flags\r
43         BOOL m_bUseMaxTrack;\r
44         BOOL m_bUseMinTrack;\r
45         BOOL m_bUseMaxRect;\r
46 \r
47         POINT m_ptMinTrackSize;         // min tracking size\r
48         POINT m_ptMaxTrackSize;         // max tracking size\r
49         POINT m_ptMaxPos;                       // maximized position\r
50         POINT m_ptMaxSize;                      // maximized size\r
51 \r
52 public:\r
53         CResizableMinMax();\r
54         virtual ~CResizableMinMax();\r
55 \r
56 protected:\r
57         void MinMaxInfo(LPMINMAXINFO lpMMI);\r
58         void ChainMinMaxInfo(LPMINMAXINFO lpMMI, CWnd* pParentFrame, CWnd* pWnd);\r
59 \r
60         void ChainMinMaxInfo(LPMINMAXINFO lpMMI, HWND hWndChild, CSize sizeExtra);\r
61         \r
62         void ChainMinMaxInfo(LPMINMAXINFO lpMMI, CWnd* pParentWnd, UINT nID, CSize sizeExtra)\r
63         {\r
64                 ChainMinMaxInfo(lpMMI,\r
65                         ::GetDlgItem(pParentWnd->GetSafeHwnd(), nID), sizeExtra);\r
66         }\r
67 \r
68         void ChainMinMaxInfoCB(LPMINMAXINFO lpMMI, HWND hWndChild);\r
69         virtual BOOL CalcSizeExtra(HWND hWndChild, CSize sizeChild, CSize& sizeExtra);\r
70 \r
71         void SetMaximizedRect(const CRect& rc);         // set window rect when maximized\r
72         void ResetMaximizedRect();                                      // reset to default maximized rect\r
73         void SetMinTrackSize(const CSize& size);        // set minimum tracking size\r
74         void ResetMinTrackSize();                                       // reset to default minimum tracking size\r
75         void SetMaxTrackSize(const CSize& size);        // set maximum tracking size\r
76         void ResetMaxTrackSize();                                       // reset to default maximum tracking size\r
77 };\r
78 \r
79 // @}\r
80 #endif // !defined(AFX_RESIZABLEMINMAX_H__INCLUDED_)\r