/** * @file XTPCommandBarsOptions.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(__XTPCOMMANDBARSOPTIONS_H__) # define __XTPCOMMANDBARSOPTIONS_H__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPCommandBars; class CXTPPropExchange; /** * @brief * Options of the command bars. * @see * CXTPCommandBars::GetCommandBarsOptions * * Example: *
pCommandBars->GetCommandBarsOptions()->animationType = xtpAnimateFade;*/ class _XTP_EXT_CLASS CXTPCommandBarsOptions : public CXTPCmdTarget { public: /** * @brief * Constructs an CXTPCommandBarsOptions object. */ CXTPCommandBarsOptions(); public: /** * @brief * Either reads options from or writes options to an archive. * @param ar A CArchive object to serialize to or from. */ void Serialize(CArchive& ar); /** * @brief * Either reads options from or writes options to an archive. * @param pPX A CXTPPropExchange object to serialize to or from. * @param bUserOptionsOnly TRUE to serialize user's options only. */ void DoPropExchange(CXTPPropExchange* pPX, BOOL bUserOptionsOnly = FALSE); /** * @brief * Call this method to enable/disable menu underlines. * @param keyboardCues Determines if menu underlines are enabled. * @details * keyboardCues parameter can be one of the following: * xtpKeyboardCuesShowAlways Show keyboard cues always. * xtpKeyboardCuesShowNever Show keyboard cues always. * xtpKeyboardCuesShowWindowsDefault System defined. */ void ShowKeyboardCues(XTPKeyboardCuesShow keyboardCues); /** * @brief * Call this method to get menu underlines state. * @return * Returns one of the following: * xtpKeyboardCuesShowAlways - Show keyboard cues always. * xtpKeyboardCuesShowNever - Show keyboard cues always. * xtpKeyboardCuesShowWindowsDefault - System defined. */ XTPKeyboardCuesShow GetShowKeyboardCues() const; /** * @brief * Gets DPI bitmap scaling flag. If enabled, all raster icons and bitmaps * used in the control will be stretched automatically if DPI scaling * factor for control's window isn't equal to 100%. The default value is * derived from CXTPDpi::IsDpiBitmapScalingEnabled. Once changed the new value will be used. * @return * The current value of the DPI bitmap scaling flag for the control. */ BOOL IsDpiBitmapScalingEnabled() const; /** * @brief * Sets DPI bitmap scaling flag. If enabled, all raster icons and bitmaps * used in the control will be stretched automatically if DPI scaling * factor for control's window isn't equal to 100%. The default value is * derived from CXTPDpi::IsDpiBitmapScalingEnabled. Once changed the new value will be used. * @param bEnable TRUE to enable bitmaps scaling, FALSE to disable. */ void EnableDpiBitmapScaling(BOOL bEnable = TRUE); /** * @brief * Gets DPI gallery item scaling flag. If enabled, the gallery * items will be scaled automaticaly according to the current DPI * scaling. * @return * The current value of the DPI gallery item scaling. */ BOOL IsDpiGalleryItemScalingEnabled() const; /** * @brief * Sets DPI gallery item scaling flag. If enabled, the gallery * items will be scaled automaticaly according to the current DPI * scaling. * @param bEnable TRUE to enable gallery item scaling, FALSE to disable. */ void EnableDpiGalleryItemScaling(BOOL bEnable = TRUE); /** @cond */ _XTP_DEPRECATED_IN_FAVOR2(EnableDpiGalleryItemScaling, EnableDpiBitmapScaling) void SetDPIScallingOptions(BOOL bScaleGalleryItems, BOOL bScaleToolbarIcons = TRUE); _XTP_DEPRECATED_IN_FAVOR(IsDpiGalleryItemScalingEnabled) BOOL GetGalleryItemsScalling() const; _XTP_DEPRECATED_IN_FAVOR(IsDpiBitmapScalingEnabled) BOOL GetToolbarsIconsScalling() const; /** @endcond */ public: BOOL bAlwaysShowFullMenus; /**< TRUE to show full menus always. */ BOOL bShowFullAfterDelay; /**< TRUE to show full menus after short delay. */ BOOL bToolBarScreenTips; /**< TRUE to show toolbar's tooltips */ BOOL bToolBarAccelTips; /**< TRUE to add accelerators to tooltips. */ BOOL bLargeIcons; /**< TRUE to use large toolbars icons. */ BOOL bSyncFloatingBars; /**< TRUE to hide floating bars when site frame deactivated. */ BOOL bShowExpandButtonAlways; /**< TRUE to show expand buttons always. */ BOOL bDblClickFloat; /**< TRUE to make toolbar floating be double-clicking. */ BOOL bShowTextBelowIcons; /**< TRUE to show captions below icons. */ BOOL bAltDragCustomization; /**< Allows users to change a toolbar button's position by dragging it while holding down ALT. */ BOOL bAutoHideUnusedPopups; // TRUE to hide unused pop-up controls. This is similar to how the // Windows Start menu hides infrequently used pop-ups.*/ BOOL bDirtyState; /**< TRUE if the user has done any type of customization to menus or toolbars. (I.e. Moving a toolbar or adding a new button). After a load or save of the BarStae this is set to FALSE. */ BOOL bShowPopupBarToolTips; /**< TRUE to display ToolTips for controls in pop-up menus. */ BOOL bShowContextMenuAccelerators; /**< TRUE to show accelerators in context menus. */ XTPAnimationType animationType; /**< Animation type. */ BOOL bAutoUpdateShortcuts; /**< TRUE to update shortcuts from accelerator table. */ DWORD keyboardCuesUse; /**< Keyboard cues used. */ BOOL bFlyByStatus; /**< Status bar displays information about the button. */ CSize szIcons; /**< Size of the normal icons. */ CSize szLargeIcons; /**< Size of the large icons. */ CSize szPopupIcons; /**< Size of icons displayed in pop-up menus. */ BOOL bUseAltNumPadKeys; /**< TRUE to allow activate menu with Alt + num pad key. */ BOOL bUseSystemSaveBitsStyle; /**< TRUE to use CS_SAVEBITS class style for pop-ups and shadows. */ BOOL bDisableCommandIfNoHandler; /**< TRUE to disable commands if no handler is presented. */ BOOL bWrapLargePopups; /**< Wrap controls for large pop-ups instead scroll them. */ CMap