/** * @file XTPDockState.h * * @copyright * (c) 1998-2025 Codejock Software, All Rights Reserved. * * This source file is the property of Codejock Software and must not be * redistributed by any means without the explicit written permission of * Codejock Software. * * The use of this source code is governed by the terms and conditions specified * in the Toolkit Pro license agreement. Codejock Software grants you, as a * single software developer, the limited right to use this software on one * computer only. * * Contact Information: * support@codejock.com * http://www.codejock.com * */ /** @cond */ #if !defined(__XTPDOCKSTATE_H__) # define __XTPDOCKSTATE_H__ /** @endcond */ # if _MSC_VER >= 1000 # pragma once # endif // _MSC_VER >= 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" /** * @brief * CXTPDockState is a standalone class. * It is used internally by CXTPToolBar. */ class _XTP_EXT_CLASS CXTPDockState { friend class CXTPCommandBars; private: /** * @brief * TOOLBARINFO definition. */ typedef CXTPToolBar::CToolBarInfo TOOLBARINFO; public: /** * @brief * Maps the point from the stored coordinates to the device. * @param pt Specifies the point to be tested. */ void ScalePoint(CPoint& pt); /** * @brief * Maps the point from the stored coordinates to the device. * @param rect A reference to a CRect object. */ void ScaleRectPos(CRect& rect); /** * @brief * Call this function to retrieve the version number of the stored bar state. * @return Retrieves version number of stored bar state */ DWORD GetVersion() const; public: /** * @brief * Constructs a CXTPDockState object. */ CXTPDockState(); /** * @brief * Destroys a CXTPDockState object, handles cleanup and deallocation. */ ~CXTPDockState(); public: /** * @brief * Saves state information to the registry or .INI file. * @param lpszProfileName Pointer to a NULL-terminated string that specifies the * name of a section in the initialization file or a key in * the Windows registry where state information is stored. */ void SaveState(LPCTSTR lpszProfileName); /** * @brief * Retrieves state information from the registry or .INI file. * @param lpszProfileName Pointer to a NULL-terminated string that specifies the * name of a section in the initialization file or a key in * the Windows registry where state information is stored. */ void LoadState(LPCTSTR lpszProfileName); /** * @brief * Either reads this object from or writes this object to an archive. * @param pPX A CXTPPropExchange object to serialize to or from. * @see * CXTPCommandBars::DoPropExchange */ void DoPropExchange(CXTPPropExchange* pPX); private: void SaveDockBarState(LPCTSTR lpszProfileName); CSize GetScreenSize(); void SetScreenSize(CSize& size); void Clear(); private: DWORD m_dwVersion; CArray m_arrBarInfo; BOOL m_bScaling; CSize m_sizeDevice; CSize m_sizeLogical; }; AFX_INLINE DWORD CXTPDockState::GetVersion() const { return m_dwVersion; } /** @cond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif //#if !defined(__XTPDOCKSTATE_H__) /** @endcond */