Hide the copy context menu item if not selected
[TortoiseGit.git] / ext / ResizableLib / ResizableGrip.h
blob919bb11315e41f24642f677864d84624b1c7f37b
1 /////////////////////////////////////////////////////////////////////////////
2 //
3 // This file is part of ResizableLib
4 // http://sourceforge.net/projects/resizablelib
5 //
6 // Copyright (C) 2000-2004 by Paolo Messina
7 // http://www.geocities.com/ppescher - mailto:ppescher@hotmail.com
8 //
9 // The contents of this file are subject to the Artistic License (the "License").
10 // You may not use this file except in compliance with the License.
11 // You may obtain a copy of the License at:
12 // http://www.opensource.org/licenses/artistic-license.html
14 // If you find this code useful, credits would be nice!
16 /////////////////////////////////////////////////////////////////////////////
18 /*!
19 * @file
20 * @brief Interface for the CResizableGrip class.
23 #if !defined(AFX_RESIZABLEGRIP_H__INCLUDED_)
24 #define AFX_RESIZABLEGRIP_H__INCLUDED_
26 #if _MSC_VER > 1000
27 #pragma once
28 #endif // _MSC_VER > 1000
30 /*! @addtogroup CoreComponents
31 * @{
34 //! @brief brief_description
35 /*!
36 * long_description
38 class CResizableGrip
40 private:
41 class CSizeGrip : public CScrollBar
43 public:
44 CSizeGrip()
46 m_bTransparent = FALSE;
47 m_bTriangular = FALSE;
50 void SetTriangularShape(BOOL bEnable);
51 void SetTransparency(BOOL bActivate);
53 BOOL IsRTL(); // right-to-left layout support
55 virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
57 SIZE m_size; // holds grip size
59 protected:
60 virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
62 BOOL m_bTriangular; // triangular shape active
63 BOOL m_bTransparent; // transparency active
65 // memory DCs and bitmaps for transparent grip
66 CDC m_dcGrip, m_dcMask;
67 CBitmap m_bmGrip, m_bmMask;
69 protected:
70 CSizeGrip m_wndGrip; // grip control
71 int m_nShowCount; // support for hiding the grip
73 protected:
74 // create a size grip, with options
75 BOOL CreateSizeGrip(BOOL bVisible = TRUE,
76 BOOL bTriangular = TRUE, BOOL bTransparent = FALSE);
78 BOOL IsSizeGripVisible(); // TRUE if grip is set to be visible
79 void SetSizeGripVisibility(BOOL bVisible); // set default visibility
80 void UpdateSizeGrip(); // update the grip's visibility and position
81 void ShowSizeGrip(DWORD* pStatus, DWORD dwMask = 1); // temp show the size grip
82 void HideSizeGrip(DWORD* pStatus, DWORD dwMask = 1); // temp hide the size grip
83 BOOL SetSizeGripBkMode(int nBkMode); // like CDC::SetBkMode
84 void SetSizeGripShape(BOOL bTriangular);
86 virtual CWnd* GetResizableWnd() const = 0;
88 public:
89 CResizableGrip();
90 virtual ~CResizableGrip();
93 // @}
94 #endif // !defined(AFX_RESIZABLEGRIP_H__INCLUDED_)