Update Tortoise.pot
[TortoiseGit.git] / ext / ResizableLib / ResizableGrip.h
blobffc46f236062c62ebf8653d267e1cd307a09e2c8
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()
48 void SetTriangularShape(BOOL bEnable);
49 void SetTransparency(BOOL bActivate);
51 BOOL IsRTL(); // right-to-left layout support
53 LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam) override;
55 SIZE m_size{}; // holds grip size
57 protected:
58 BOOL PreCreateWindow(CREATESTRUCT& cs) override;
60 BOOL m_bTriangular = FALSE; // triangular shape active
61 BOOL m_bTransparent = FALSE; // transparency active
63 // memory DCs and bitmaps for transparent grip
64 CDC m_dcGrip, m_dcMask;
65 CBitmap m_bmGrip, m_bmMask;
67 protected:
68 CSizeGrip m_wndGrip; // grip control
69 int m_nShowCount = 0; // support for hiding the grip
71 protected:
72 // create a size grip, with options
73 BOOL CreateSizeGrip(BOOL bVisible = TRUE,
74 BOOL bTriangular = TRUE, BOOL bTransparent = FALSE);
76 BOOL IsSizeGripVisible(); // TRUE if grip is set to be visible
77 void SetSizeGripVisibility(BOOL bVisible); // set default visibility
78 void UpdateSizeGrip(); // update the grip's visibility and position
79 void ShowSizeGrip(DWORD* pStatus, DWORD dwMask = 1); // temp show the size grip
80 void HideSizeGrip(DWORD* pStatus, DWORD dwMask = 1); // temp hide the size grip
81 BOOL SetSizeGripBkMode(int nBkMode); // like CDC::SetBkMode
82 void SetSizeGripShape(BOOL bTriangular);
84 virtual CWnd* GetResizableWnd() const = 0;
86 public:
87 CResizableGrip();
88 virtual ~CResizableGrip();
91 // @}
92 #endif // !defined(AFX_RESIZABLEGRIP_H__INCLUDED_)