/** * @file XTPRibbonGroup.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(__XTPRIBBONGROUP_H__) # define __XTPRIBBONGROUP_H__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPRibbonGroups; class CXTPRibbonBar; class CXTPRibbonTab; class CXTPControl; class CXTPControlPopup; /** * @brief * Defines ribbon group reduction levels. */ enum XTPRibbonGroupReductionLevels { xtpRibbonGroupReductionDisabled = 1, /**< Do not reduce. */ xtpRibbonGroupFullCaptionDontHide = 2, /**< Do not hide captions and do not allow hiding at all when reduced. */ xtpRibbonGroupReduceCaptionDontHide = 3, /**< Hide captions, but do not allow hiding at all when reduced. */ xtpRibbonGroupFullReduction = 4, /**< Hide captions and allow hiding when reduced. */ }; /** * @brief * Represents a single group that is added to a CXTPRibbonTab. * @details * Each CXTPRibbonTab can contain one or more CXTPRibbonGroup objects * that are used to hold CXTPControl objects. The caption of * a CXTPRibbonGroup is a title bar that visually "groups" the CXTPControl * objects that have been added to the RibbonGroup Items Collection * (CXTPRibbonGroup::GetAt). * * Groups are added to the CXTPRibbonTab Groups Collection using the * CXTPRibbonGroups::AddGroup and CXTPRibbonGroups::InsertAt methods. Items * are added to a group using the CXTPRibbonGroup::Add method. * @see * CXTPRibbonGroup::GetAt */ class _XTP_EXT_CLASS CXTPRibbonGroup : public CXTPCmdTarget { /** @cond */ DECLARE_SERIAL(CXTPRibbonGroup) /** @endcond */ public: /** * @brief * Constructs a CXTPRibbonGroup object. */ CXTPRibbonGroup(); /** * @brief * Destroys a CXTPRibbonGroup object, handles cleanup and deallocation. */ virtual ~CXTPRibbonGroup(); public: /** * @brief * Sets the text to display in the group title bar. * @param lpszCaption Text to display in the group title bar. * @details * The caption is the text string that is displayed in the group's * title bar. The caption of the group is initially set when it is * added or inserted. * @see * GetCaption, CXTPRibbonGroups::AddGroup, CXTPRibbonGroups::InsertAt */ void SetCaption(LPCTSTR lpszCaption); /** * @brief * Gets the text displayed in the group title bar. * @details * The caption is the text string that is displayed in the group's * title bar. The caption of the group is initially set when it is * added or inserted. * @return * The text displayed in the group title bar. * @see * SetCaption, CXTPRibbonGroups::AddGroup, CXTPRibbonGroups::InsertAt */ CString GetCaption() const; /** * @brief * Call this member to get the parent command bar. * @return * A pointer to the parent command bar object. */ CXTPCommandBar* GetParent() const; /** * @brief * Sets the bounding rectangle for the group. * @param rc CRect object containing the bounding rectangle for the group. * @details * The rectangle is the size of the entire group, including the * group caption and group pop-up if present. * @see * GetRect */ virtual void SetRect(CRect rc); /** * @brief * Gets the bounding rectangle of the group. * @details * The rectangle is the size of the entire group, including the * group caption and group pop-up if present. * @return * A CRect containing the bounding rectangle of the group. * @see * SetRect */ CRect GetRect() const; /** * @brief * Gets the bounding rectangle of the group caption. * @details * The rectangle is the size of the group caption. * @return * A CRect containing the bounding rectangle of the group caption. * @see * SetRect */ CRect GetCaptionRect() const; /** * @brief * Gets the CXTPRibbonBar object that the CXTPRibbonGroup belongs to. * @return * A pointer to the CXTPRibbonBar object that the CXTPRibbonGroup belongs to. * This is the ribbon bar that the group is displayed in. * @see * CXTPRibbonBar */ CXTPRibbonBar* GetRibbonBar() const; /** * @brief * Gets the CXTPRibbonTab object that the CXTPRibbonGroup belongs to. * @return * A pointer to the CXTPRibbonTab object that the CXTPRibbonGroup belongs to. * This is the tab that the group is displayed in. * @see * CXTPRibbonTab */ CXTPRibbonTab* GetParentTab() const; /** * @brief * Gets whether the group is currently highlighted. * @details * A group becomes highlighted when the mouse cursor is positioned * over the group or any items in the group. * @return * TRUE if the group is currently highlighted, otherwise FALSE. * @see * CXTPRibbonBar::GetHighlightedGroup */ BOOL IsHighlighted() const; /** * @brief * Retrieves the index of a specified CXTPControl object in the CXTPRibbonGroup. * @param pControl Control whose index must be retrieved. * @details * This member function is used to get the zero-based index of items * in the group. If the item is not found, it returns a value of -1. * @return * The index of the specified control if successful, otherwise -1. */ int IndexOf(CXTPControl* pControl) const; public: /** * @brief * Gets the total number of CXTPControl objects that have been added * to the CXTPRibbonGroup. * @return * The total number of CXTPControl objects that have been added * to the CXTPRibbonGroup. * @details * A CXTPRibbonGroup is used to hold one or more CXTPControl objects. * The total number of items can be found by using GetCount. * @see * CXTPRibbonGroup */ int GetCount() const; /** * @brief * Adds a CXTPControl to the ribbon group. * @param controlType Type of control to add to the ribbon group. * @param nId Identifier of the CXTPControl to be added. * @param lpszParameter The caption of the CXTPControl to be added. * @param nBefore Index of an existing control that the new control * will be inserted before. * @param bTemporary Boolean value indicating whether the control is * temporary. Temporary controls will not be saved to the * system registry when the application is closed, and * they will not be restored when the application is opened. * @details * The Add method allows CXTPControl objects to be added to the ribbon group. * @return * A pointer to the CXTPControl object that was added to the ribbon group. * @see * CXTPControl, GetAt, GetCount, RemoveAt, RemoveAll */ CXTPControl* Add(XTPControlType controlType, int nId, LPCTSTR lpszParameter = NULL, int nBefore = -1, BOOL bTemporary = FALSE); /** * @brief * Adds a CXTPControl to the ribbon group. * @param nId Identifier of the CXTPControl to be added. * @param lpszParameter The caption of the CXTPControl to be added. * @param nBefore Index of an existing control that the new control * will be inserted before. * @param bTemporary Boolean value indicating whether the control is * temporary. Temporary controls will not be saved to the * system registry when the application is closed, and * they will not be restored when the application is opened. * @param pControl Pointer to a CXTPControl to add to the ribbon group. * @details * The Add method allows CXTPControl objects to be added to the ribbon group. * @return * A pointer to the CXTPControl object that was added to the ribbon group. * @see * CXTPControl, GetAt, GetCount, RemoveAt, RemoveAll */ CXTPControl* Add(CXTPControl* pControl, int nId, LPCTSTR lpszParameter = NULL, int nBefore = -1, BOOL bTemporary = FALSE); /** * @brief * Adds a CXTPControl to the ribbon group. * @param bRecursive TRUE to find the control in the nested command bars. * @param nBefore Index of an existing control that the new control * will be inserted before. * @param pControl Pointer to a CXTPControl to add to the ribbon group. * @details * The Add method allows CXTPControl objects to be added to the ribbon group. * @return * A pointer to the CXTPControl object that was added to the ribbon group. * @see * CXTPControl, GetAt, GetCount, RemoveAt, RemoveAll */ CXTPControl* AddClone(CXTPControl* pControl, int nBefore, BOOL bRecursive = FALSE); /** * @brief * Adds a CXTPControl to the ribbon group. * @param pControl Control to add. * @param nBefore Index of an existing control that the new control * will be inserted before. * @return * A pointer to the CXTPControl object that was added to the ribbon group. * @see * Add */ CXTPControl* InsertAt(CXTPControl* pControl, int nBefore = -1); /** * @brief * Gets the CXTPControl object that has been added to the CXTPRibbonGroup * at the specified index. * @param nIndex Index of the item to retrieve within the group's * collection of controls. * @details * GetAt retrieves the CXTPControl from the m_arrControls items collection * that contains all of the CXTPControl objects that have been added * to the CXTPRibbonGroup. * @return * A pointer to the CXTPControl object at the specified index. * @see * m_arrControls, Add, RemoveAt, RemoveAll */ CXTPControl* GetAt(int nIndex) const; /** * @brief * Removes the item at a specified index from the group's * collection of items. * @param nIndex Index of the item to remove from the group's * collection of items. * @details * Removes an item by its index from the group's collection of items. * @see * m_arrControls, Add, GetAt, RemoveAll */ void RemoveAt(int nIndex); /** * @brief * Removes a specified item from the group's collection of items. * @param pControl Item to remove from the group's collection of items. * @see * RemoveAt, Add, GetAt, RemoveAll */ void Remove(CXTPControl* pControl); /** * @brief * Removes all items from the group. * @see * m_arrControls, Add, GetAt, RemoveAt */ void RemoveAll(); /** * @brief * Determines if the CXTPRibbonGroup is currently displayed as a * group button. * @details * A single group button will be displayed if there is not enough * room to display the items in the group. A group pop-up is * displayed when the button is clicked. The pop-up contains all * the items in the group. When a group button is clicked, a * CXTPControlPopup is displayed that contains the items of the group. * * The m_nIconId specifies the ID of the image to use for the group * button that is displayed when there is not enough room to display * the items in the group. No image will be displayed for the group * button if m_nIconId is not set with SetIconId. * * @return * TRUE if the group is displayed as a single group button, * FALSE if the group is displayed normally. * @see * SetIconId, GetIconId, GetControlGroupPopup */ BOOL IsReduced() const; /** * @brief * Call this member to set the group icon's identifier. This is the ID of * the image to use for the group button that is displayed when there * is not enough room to display the items in the group. * @param nId Group icon identifier to be set. * @details * The m_nIconId specifies the ID of the image to use for the group button * that is displayed when there is not enough room to display the items * in the group. When a group button is clicked, a CXTPControlPopup * is displayed that contains the items of the group. No image * will be displayed for the group button if m_nIconId is not set. * @see * IsReduced, GetIconId, GetControlGroupPopup */ void SetIconId(int nId); /** * @brief * Call this member to get the group icon's identifier. This is the ID of * the image to use for the group button that is displayed when there * is not enough room to display the items in the group. * @details * The m_nIconId specifies the ID of the image to use for the group button * that is displayed when there is not enough room to display the items * in the group. When a group button is clicked, a CXTPControlPopup * is displayed that contains the items of the group. No image * will be displayed for the group button if m_nIconId is not set. * @return * The group icon's identifier. * @see * IsReduced, SetIconId, GetControlGroupPopup */ int GetIconId() const; /** * @brief * Specifies whether to display an option button in the group's caption. * @param bShowOptionButton TRUE to show an option button in the group's caption, * FALSE to hide the option button if one was visible. * @details * The option button is typically used to launch a dialog associated * with the group. The Group ID (GetID) is used to identify which * groups' option button was clicked. * @see * m_bShowOptionButton, GetID, CXTPRibbonPaintManager::DrawControlGroupOption */ void ShowOptionButton(BOOL bShowOptionButton = TRUE); /** * @brief * Determines if the option button is visible. * @return * TRUE if the option button is visible. * @see * ShowOptionButton */ BOOL IsOptionButtonVisible() const; /** * @brief * Determines if the group is visible. * @return * TRUE if the group is visible. * @see * SetVisible */ BOOL IsVisible() const; /** * @brief * Call this method to show/hide the group. * @param bVisible TRUE to show the group, FALSE to hide. * @see * IsVisible */ void SetVisible(BOOL bVisible); /** * @brief * Retrieves the group's own index within the parent group collection. * @return * The group's own index within the parent group collection. */ int GetIndex() const; /** * @brief * Copies a parameter from one group to another. * @param pGroup Group with the parameter to be copied. */ virtual void Copy(CXTPRibbonGroup* pGroup); /** * @brief * Call this member to change the type of the control. * @param pControl Pointer to a CXTPControl object. * @param type New control type; one of the values defined by * the XTPControlType enumeration. * @return * A pointer to a CXTPControl object. */ CXTPControl* SetControlType(CXTPControl* pControl, XTPControlType type); /** * @brief * Call this member to find the specified control. * @param nId Control's identifier. * @return * A pointer to the CXTPControl object if successful, otherwise NULL. */ CXTPControl* FindControl(int nId) const; /** * @brief * Call this member to find the specified control. * @param type Type of the control to find. * @param nId Control's identifier. * @param bVisible TRUE if the control is visible. * @param bRecursive TRUE to find the control in the nested command bars. * @return * A pointer to the CXTPControl object if successful, otherwise NULL. */ CXTPControl* FindControl(XTPControlType type, int nId, BOOL bVisible, BOOL bRecursive) const; /** * @brief * Gets the group's ID. * @details * The ID is used to identify the group. * @return * The group's ID. * @see * GetControlGroupPopup, GetControlGroupOption */ int GetID() const; /** * @brief * Sets the group's ID. * @param nId New ID to be set. * @see * GetID */ void SetID(int nId); /** * @brief * Determines if controls grouping is used. * @details * This is for controls grouping within a ribbon group. * When you set begin group to TRUE, it starts a new group of controls. * SetControlsGrouping will group controls like in MS Word within the * ribbon group. If you pass FALSE, it groups them like in a regular * toolbar (divider line). * @return * TRUE if controls grouping is used, otherwise FALSE. * @see * SetControlsGrouping */ BOOL IsControlsGrouping() const; /** * @brief * Specifies if controls grouping should be used. * @param bControlsGrouping TRUE to use controls grouping. * @details * This is for controls grouping within a ribbon group. * When you set begin group to TRUE, it starts a new group of controls. * SetControlsGrouping will group controls like in MS Word within the * ribbon group. If you pass FALSE, it groups them like in a regular * toolbar (divider line). * @see * IsControlsGrouping */ void SetControlsGrouping(BOOL bControlsGrouping = TRUE); /** * @brief * Specifies if controls should be automatically centered in the group. * @param bControlsCentering TRUE to automatically center controls in the group. */ void SetControlsCentering(BOOL bControlsCentering = TRUE); /** * @brief * Determines if controls are automatically centered in the group. * @return * TRUE if controls are automatically centered in the group, otherwise FALSE. */ BOOL IsControlsCentering() const; /** * @brief * Draws the group and all of the controls in the group. * @param pDC Pointer to the device context in which to draw the group. * @param rcClipBox The rectangular area of the window that is invalid. */ virtual void Draw(CDC* pDC, CRect rcClipBox); /** * @brief * Reads/writes this object from/to an archive. * @param pPX Pointer to a CXTPPropExchange object to serialize to/from. */ virtual void DoPropExchange(CXTPPropExchange* pPX); /** * @brief * Sets the ribbon group reduction level. * @param nAllowReduceLevel Ribbon group reduction level to be set; * must be one of the values defined by the * XTPRibbonGroupReductionLevels enumeration. * @see * XTPRibbonGroupReductionLevels */ void AllowReduce(int nAllowReduceLevel = 0); /** * @brief * Gets the ribbon group reduction level. * @return * The ribbon group reduction level; one of the values defined by the * XTPRibbonGroupReductionLevels enumeration. * @see * XTPRibbonGroupReductionLevels */ int GetAllowReduceLevel() const; /** * @brief * Call this method to specify whether the group will automatically * align caption/edit parts. * @param bArrangeEditCaption TRUE to automatically align caption/edit parts. */ void SetArrangeEditCaption(BOOL bArrangeEditCaption); public: /** * @brief * Retrieves the CXTPControl that represents the group's OptionButton * (used to set tooltip and status bar text). * @details * GetControlGroupOption is only used to set the tooltip text and * description text for the OptionButton. No other properties/methods * of the CXTPControl are used. * @return * A pointer to the CXTPControl that represents the group's OptionButton. * @see * CXTPRibbonPaintManager::DrawControlGroupOption */ CXTPControl* GetControlGroupOption() const; /** * @brief * Retrieves the CXTPControlPopup used to display controls that * are not currently visible in the group. * @details * A single group button will be displayed if there is not enough * room to display the items in the group. A group pop-up is displayed * when the button is clicked. The pop-up contains all the items * in the group. When a group button is clicked, a CXTPControlPopup * is displayed that contains the items of the group. * @return * A pointer to the CXTPControlPopup used to display controls that * are not currently visible in the group. * @see * IsReduced, CXTPRibbonPaintManager::DrawControlGroupPopup */ CXTPControlPopup* GetControlGroupPopup() const; /** * @brief * Loads the toolbar specified by nIDResource. * @param nIDResource Resource ID of the toolbar to be loaded. * @param bLoadIcons TRUE to load icons from application resources. * @return * Nonzero if successful, otherwise 0. */ BOOL LoadToolBar(UINT nIDResource, BOOL bLoadIcons = TRUE); /** * @brief * Sets the controls from the button array. * @param pButtons Pointer to an array of command IDs. It cannot be NULL. * @param nCount Number of elements in the array pointed to by pButtons. * @return * Nonzero if successful, otherwise 0. * @see * LoadToolBar */ BOOL SetButtons(UINT* pButtons, int nCount); CXTPRibbonGroups* GetGroups() const; protected: /** * @brief * Called automatically to reposition all controls in the group. * (e.g. when the position/size of the ribbon bar changes). * @param pDC Pointer to the device context in which to draw the group. */ virtual void RepositionControls(CDC* pDC); /** * @brief * This method is called when the group is added. * @see * OnGroupRemoved */ virtual void OnGroupAdded(); /** * @brief * This method is called when the group is removed. * @see * OnGroupAdded */ virtual void OnGroupRemoved(); /** * @brief * Calculates the minimum width of the ribbon group. * @param pDC Pointer to the device context used to draw the ribbon group. * @return * The minimum width of the ribbon group. * @see * Draw */ virtual int GetMinimumWidth(CDC* pDC); protected: /** * @brief * This method is called before the size of the ribbon group is calculated. * @param pDC Pointer to the device context used to draw the ribbon group. * @see * OnAfterCalcSize */ virtual void OnBeforeCalcSize(CDC* pDC); /** * @brief * This method is called after the size of the ribbon group is calculated. * @see * OnBeforeCalcSize */ virtual void OnAfterCalcSize(); /** * @brief * This method is called to retrieve the width of the ribbon group. * @param pDC Pointer to the device context used to draw the ribbon group. * @return * The width of the ribbon group. * @see * OnBeforeCalcSize, OnAfterCalcSize, GetMinimumWidth */ virtual int OnCalcDynamicSize(CDC* pDC); /** * @brief * This method is called to reduce the size of the ribbon group. * @param nLevel Reduce level; must be one of the values defined * by the XTPRibbonGroupReductionLevels enumeration. * @param nWidthAvail Total pixels to reduce the size of the ribbon group by. * @return * TRUE if the size of the ribbon group was reduced. * @see * XTPRibbonGroupReductionLevels */ virtual BOOL OnReduceSize(int nLevel, int nWidthAvail); /** * @brief * This method is called to extend the size of the ribbon group. * @param nWidthAvail Total pixels to extend the size of the ribbon group by. * @return * TRUE if the size of the ribbon group was extended. */ virtual BOOL OnExtendSize(int nWidthAvail); /** @cond */ protected: virtual void OnAdjustBorders(int nWidth, CRect rcBorders); void CenterColumn(int nFirstItem, int nLastItem, int nGroupHeight); BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo); private: int _CalcSpecialDynamicSize(CDC* pDC); int _WrapSpecialDynamicSize(int nWidth, BOOL bIncludeTail); int _GetSizeSpecialDynamicSize(); BOOL _FindBestWrapSpecialDynamicSize(); void ArrangeEditCaption(); /** @endcond */ protected: # ifdef _XTP_COMMANDBARS_ACTIVEX /** @cond */ afx_msg long OleGetItemCount(); afx_msg int OleGetIndex(); afx_msg LPDISPATCH OleGetItem(int nIndex); afx_msg LPDISPATCH OleAdd(long controlType, int nId, LPCTSTR strCaption, const VARIANT& varBefore, const VARIANT& varTemporary); afx_msg LPDISPATCH OleGetControlGroupPopup(); afx_msg LPDISPATCH OleGetControlGroupOption(); afx_msg LPDISPATCH OleGetRibbonBar(); afx_msg LPDISPATCH OleGetGroups(); DECLARE_PROPERTY(Visible, BOOL); afx_msg void OleAddControl(LPDISPATCH Control, const VARIANT& varBefore); DECLARE_DISPATCH_MAP() DECLARE_OLETYPELIB_EX(CXTPRibbonGroup); DECLARE_INTERFACE_MAP() DECLARE_ENUM_VARIANT(CXTPRibbonGroup); void OleGetRect(long* pLeft, long* pTop, long* pRight, long* pBottom); /** @endcond */ # endif protected: BOOL m_bControlsCentering; /**< TRUE to center controls inside groups. */ BOOL m_bControlsGrouping; /**< TRUE to group controls. */ CString m_strCaption; /**< Caption of the group. */ int m_nIndex; /**< Index of the group. */ CXTPRibbonGroups* m_pGroups; /**< Parent groups collection. */ CRect m_rcGroup; /**< Bounding rectangle of the group. */ CArray m_arrControls; /**< Collection of group's controls. */ CXTPCommandBar* m_pParent; /**< Parent ribbon bar. */ CXTPRibbonBar* m_pRibbonBar; /**< Parent ribbon bar. */ int m_nId; /**< Identifier of the group. */ int m_nIconId; /**< Icon index of the group. */ CXTPControl* m_pControlGroupOption; /**< Group option control. */ CXTPControlPopup* m_pControlGroupPopup; /**< Group popup control. */ BOOL m_bReduced; /**< TRUE if group was reduced. */ BOOL m_bShowOptionButton; /**< TRUE to show option button. */ BOOL m_bVisible; /**< TRUE if group is visible. */ int m_nAllowReduce; /**< Ribbon group reduction level. */ int m_nRowCount; /**< Total rows number of items. */ BOOL m_bAutoArrangeEditCaption; /**< Specifies whether the group will automatically align caption/edit parts. */ private: struct LAYOUTINFO; struct CONTROLINFO; LAYOUTINFO* m_pLayoutInfo; private: friend class CXTPRibbonGroups; friend class CXTPRibbonBar; friend class CControlGroupPopup; friend class CXTPRibbonGroupPopupToolBar; friend class CXTPRibbonGroupControlPopup; }; /** @cond */ class _XTP_EXT_CLASS CXTPRibbonGroupOption : public CXTPControlButton { DECLARE_XTP_CONTROL(CXTPRibbonGroupOption) public: CXTPRibbonGroupOption(); void Draw(CDC* pDC); }; class _XTP_EXT_CLASS CXTPRibbonGroupControlPopup : public CXTPControlPopup { DECLARE_XTP_CONTROL(CXTPRibbonGroupControlPopup) public: CXTPRibbonGroupControlPopup(CXTPRibbonGroup* pGroup = 0); virtual CSize GetSize(CDC* pDC); void Draw(CDC* pDC); BOOL IsTransparent() const; CXTPRibbonBar* GetRibbonBar() const; virtual void Copy(CXTPControl* pControl, BOOL bRecursive = FALSE); virtual void GenerateCommandBarList(DWORD& /*nID*/, CXTPCommandBarList* /*pCommandBarList*/, XTP_COMMANDBARS_PROPEXCHANGE_PARAM* /*pParam*/); virtual void OnLButtonUp(CPoint /*point*/); virtual BOOL IsVisible(DWORD dwSkipFlags = 0) const; virtual BOOL OnSetPopup(BOOL bPopup); protected: CXTPRibbonGroup* m_pPopupGroup; }; /** @endcond */ AFX_INLINE CString CXTPRibbonGroup::GetCaption() const { return m_strCaption; } AFX_INLINE CXTPCommandBar* CXTPRibbonGroup::GetParent() const { return m_pParent; } AFX_INLINE CRect CXTPRibbonGroup::GetRect() const { return m_rcGroup; } AFX_INLINE CXTPRibbonBar* CXTPRibbonGroup::GetRibbonBar() const { return (CXTPRibbonBar*)m_pRibbonBar; } AFX_INLINE int CXTPRibbonGroup::GetCount() const { return (int)m_arrControls.GetSize(); } AFX_INLINE CXTPControl* CXTPRibbonGroup::GetAt(int nIndex) const { return nIndex >= 0 && nIndex < GetCount() ? m_arrControls.GetAt(nIndex) : NULL; } AFX_INLINE int CXTPRibbonGroup::GetID() const { return m_nId; } AFX_INLINE CXTPControl* CXTPRibbonGroup::GetControlGroupOption() const { return m_pControlGroupOption; } AFX_INLINE CXTPControlPopup* CXTPRibbonGroup::GetControlGroupPopup() const { return m_pControlGroupPopup; } AFX_INLINE BOOL CXTPRibbonGroup::IsReduced() const { return m_bReduced; } AFX_INLINE void CXTPRibbonGroup::SetIconId(int nId) { m_nIconId = nId; } AFX_INLINE int CXTPRibbonGroup::GetIconId() const { return m_nIconId <= 0 ? m_nId : m_nIconId; } AFX_INLINE void CXTPRibbonGroup::ShowOptionButton(BOOL bShowOptionButton) { m_bShowOptionButton = bShowOptionButton; } AFX_INLINE int CXTPRibbonGroup::GetIndex() const { return m_nIndex; } AFX_INLINE BOOL CXTPRibbonGroup::IsControlsGrouping() const { return m_bControlsGrouping; } AFX_INLINE void CXTPRibbonGroup::SetControlsGrouping(BOOL bControlsGrouping) { m_bControlsGrouping = bControlsGrouping; } AFX_INLINE void CXTPRibbonGroup::SetControlsCentering(BOOL bControlsCentering) { m_bControlsCentering = bControlsCentering; } AFX_INLINE BOOL CXTPRibbonGroup::IsControlsCentering() const { return m_bControlsCentering; } AFX_INLINE void CXTPRibbonGroup::AllowReduce(int nAllowReduce) { m_nAllowReduce = nAllowReduce; } AFX_INLINE int CXTPRibbonGroup::GetAllowReduceLevel() const { return m_nAllowReduce; } AFX_INLINE void CXTPRibbonGroup::SetArrangeEditCaption(BOOL bArrangeEditCaption) { m_bAutoArrangeEditCaption = bArrangeEditCaption; } AFX_INLINE CXTPRibbonGroups* CXTPRibbonGroup::GetGroups() const { return m_pGroups; } # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" /** @cond */ #endif // !defined(__XTPRIBBONGROUP_H__) /** @endcond */