OSDN Git Service

updated igit.exe (fixes for dir status etc)
[tortoisegit/TortoiseGitJp.git] / ext / ResizableLib / ResizableGrip.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 CResizableGrip class.\r
21  */\r
22 \r
23 #if !defined(AFX_RESIZABLEGRIP_H__INCLUDED_)\r
24 #define AFX_RESIZABLEGRIP_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 CResizableGrip  \r
39 {\r
40 private:\r
41         class CSizeGrip : public CScrollBar\r
42         {\r
43         public:\r
44                 CSizeGrip()\r
45                 {\r
46                         m_bTransparent = FALSE;\r
47                         m_bTriangular = FALSE;\r
48                 }\r
49 \r
50                 void SetTriangularShape(BOOL bEnable);\r
51                 void SetTransparency(BOOL bActivate);\r
52 \r
53                 BOOL IsRTL();                   // right-to-left layout support\r
54 \r
55                 virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);\r
56 \r
57                 SIZE m_size;                    // holds grip size\r
58 \r
59         protected:\r
60                 virtual BOOL PreCreateWindow(CREATESTRUCT& cs);\r
61 \r
62                 BOOL m_bTriangular;             // triangular shape active\r
63                 BOOL m_bTransparent;    // transparency active\r
64 \r
65                 // memory DCs and bitmaps for transparent grip\r
66                 CDC m_dcGrip, m_dcMask;\r
67                 CBitmap m_bmGrip, m_bmMask;\r
68         };\r
69 \r
70         CSizeGrip m_wndGrip;            // grip control\r
71         int m_nShowCount;                       // support for hiding the grip\r
72 \r
73 protected:\r
74         // create a size grip, with options\r
75         BOOL CreateSizeGrip(BOOL bVisible = TRUE,\r
76                 BOOL bTriangular = TRUE, BOOL bTransparent = FALSE);\r
77 \r
78         BOOL IsSizeGripVisible();       // TRUE if grip is set to be visible\r
79         void SetSizeGripVisibility(BOOL bVisible);      // set default visibility\r
80         void UpdateSizeGrip();          // update the grip's visibility and position\r
81         void ShowSizeGrip(DWORD* pStatus, DWORD dwMask = 1);    // temp show the size grip\r
82         void HideSizeGrip(DWORD* pStatus, DWORD dwMask = 1);    // temp hide the size grip\r
83         BOOL SetSizeGripBkMode(int nBkMode);            // like CDC::SetBkMode\r
84         void SetSizeGripShape(BOOL bTriangular);\r
85 \r
86         virtual CWnd* GetResizableWnd() const = 0;\r
87 \r
88 public:\r
89         CResizableGrip();\r
90         virtual ~CResizableGrip();\r
91 };\r
92 \r
93 // @}\r
94 #endif // !defined(AFX_RESIZABLEGRIP_H__INCLUDED_)\r