XTPTabPaintManager.h
上传用户:szled88
上传日期:2015-04-09
资源大小:43957k
文件大小:171k
- //-----------------------------------------------------------------------
- // Summary:
- // This method called to get bounding rectangle of item that was drawn
- // Parameters:
- // pItem - Item to test
- // Returns: Bounding rectangle of drawing item
- // See Also: CXTPTabManagerItem::GetRect
- //-----------------------------------------------------------------------
- virtual CRect GetButtonDrawRect(const CXTPTabManagerItem* pItem);
- };
- //-------------------------------------------------------------------------
- // Summary:
- // CAppearanceSetPropertyPageSelected is a CAppearanceSetPropertyPage derived
- // class that represents the "Office 2000 Selected" tab appearance.
- // Remarks:
- // To use the Office 2000 Selected appearance, SetAppearance is used to apply
- // the xtpTabAppearancePropertyPageSelected XTPTabAppearanceStyle.
- //
- // CAppearanceSetPropertyPageSelected supports the following XTPTabColorStyle:
- // * <b>xtpTabColorDefault</b> Default color style.
- // * <b>xtpTabColorOffice2003</b> Office 2003 color style.
- // * <b>xtpTabColorWinXP</b> Windows XP color style.
- //
- // See Also: XTPTabColorStyle, XTPTabAppearanceStyle, SetAppearance, GetAppearance, GetAppearanceSet,
- // SetColor, GetColor, GetColorSet, SetColorSet, SetAppearanceSet
- //-------------------------------------------------------------------------
- class _XTP_EXT_CLASS CAppearanceSetPropertyPageSelected : public CAppearanceSetPropertyPage
- {
- public:
- //-----------------------------------------------------------------------
- // Summary:
- // This method is called to draw a single tab button in the tab
- // client header area.
- // Parameters:
- // pDC - Pointer to a valid device context.
- // pItem - Tab button to draw.
- // Remarks:
- // This method will draw a single tab button. This method only
- // draws the button, no text or icon is added.
- //
- // DrawSingleButton calls CXTPTabPaintManager::DrawSingleButtonIconAndText
- // after the button is drawn. This is called to draw the button's
- // icon and text.
- //
- // If the tab button is selected or highlighted then
- // CXTPTabPaintManager::CAppearanceSetPropertyPageSelected::DrawSingleButton
- // is called instead of CXTPTabPaintManager::DrawSingleButtonIconAndText.
- //
- // See Also:: CXTPTabPaintManager::DrawTabControlEx, CXTPTabPaintManager::DrawSingleButtonIconAndText
- //-----------------------------------------------------------------------
- virtual void DrawSingleButton(CDC* pDC, CXTPTabManagerItem* pItem);
- };
- //-------------------------------------------------------------------------
- // Summary:
- // CAppearanceSetPropertyPage2003 is a CAppearanceSet derived
- // class that represents the Office 2003 tab appearance.
- // Remarks:
- // To use the Office 2003 appearance, SetAppearance is used to apply
- // the xtpTabAppearancePropertyPage2003 XTPTabAppearanceStyle.
- //
- // CAppearanceSetPropertyPage2003 supports the following XTPTabColorStyle:
- // * <b>xtpTabColorDefault</b> Default color style.
- // * <b>xtpTabColorOffice2003</b> Office 2003 color style.
- // * <b>xtpTabColorWhidbey</b> Visual Studio 2005 "Whidbey" color style.
- //
- // By default m_bDoubleHighlightedBorder is FALSE. If TRUE then a double
- // border is drawn on mouse over when hot tracking is enabled.
- //
- // See Also: XTPTabColorStyle, XTPTabAppearanceStyle, SetAppearance, GetAppearance, GetAppearanceSet,
- // SetColor, GetColor, GetColorSet, SetColorSet, SetAppearanceSet
- //-------------------------------------------------------------------------
- class _XTP_EXT_CLASS CAppearanceSetPropertyPage2003 : public CAppearanceSet
- {
- public:
- //-------------------------------------------------------------------------
- // Summary:
- // Constructs a CAppearanceSetPropertyPage2003 object.
- //-------------------------------------------------------------------------
- CAppearanceSetPropertyPage2003()
- {
- m_rcHeaderMargin.SetRect(2, 3, 6, 0);
- m_bDoubleHighlightedBorder = FALSE;
- }
- //-----------------------------------------------------------------------
- // Summary:
- // This method is called to get the top, left, right, and bottom
- // tab header margins.
- // Returns:
- // CRect struct containing the left, top, right, and bottom margins
- // of the tab header. This is the margin (space) placed around the
- // tab buttons inside the tab header.
- // Remarks:
- // The CRect structure will contain the margins of the tab header.
- // CXTPTabPaintManager::CAppearanceSet::m_rcHeaderMargin contains
- // these margins.
- //
- // See Also: CXTPTabPaintManager::CAppearanceSet::m_rcHeaderMargin, CXTPTabPaintManager::GetHeaderRect
- //-----------------------------------------------------------------------
- virtual CRect GetHeaderMargin()
- {
- return CRect(m_rcHeaderMargin.left + m_nButtonHeight, m_rcHeaderMargin.top, m_rcHeaderMargin.right, m_rcHeaderMargin.bottom);
- }
- //-------------------------------------------------------------------------
- // Summary:
- // This member is called to refresh the appearance metrics.
- // Remarks:
- // This member is used to refresh the appearance metrics such
- // as font, button height, margin size, etc. Override this
- // member to change the appearance metrics.
- // See Also: CXTPTabPaintManager::SetFontIndirect, GetHeaderMargin,
- // CXTPTabPaintManager::CAppearanceSet::GetHeaderMargin::GetClientMargin,
- // CXTPTabPaintManager::CAppearanceSet::GetHeaderMargin::GetButtonLength,
- // CXTPTabPaintManager::CAppearanceSet::GetHeaderMargin::GetButtonHeight
- //-------------------------------------------------------------------------
- virtual void RefreshMetrics();
- //-----------------------------------------------------------------------
- // Summary:
- // This method is called to draw a single tab button in the tab
- // client header area.
- // Parameters:
- // pDC - Pointer to a valid device context.
- // pItem - Tab button to draw.
- // Remarks:
- // This method will draw a single tab button. This method only
- // draws the button, no text or icon is added.
- //
- // DrawSingleButton calls CXTPTabPaintManager::DrawSingleButtonIconAndText
- // after the button is drawn. This is called to draw the button's
- // icon and text.
- //
- // If m_bDoubleHighlightedBorder = TRUE, then a double border
- // is drawn on mouse over when hot tracking is enabled.
- //
- // See Also:: CXTPTabPaintManager::DrawTabControlEx, CXTPTabPaintManager::DrawSingleButtonIconAndText, m_bDoubleHighlightedBorder
- //-----------------------------------------------------------------------
- virtual void DrawSingleButton(CDC* pDC, CXTPTabManagerItem* pItem);
- //-----------------------------------------------------------------------
- // Summary:
- // This member fills in the tab header and tab client area. It
- // will then draw tab client frame.
- // Parameters:
- // pTabManager - Pointer to tab manager to fill.
- // pDC - Pointer to a valid device context.
- // rcControl - Bounding rectangle of the tab manager control.
- // See CXTPTabManager::GetControlRect.
- // Returns:
- // Tab header bounding rectangle. This value is returned from GetHeaderRect.
- // Remarks:
- // If CXTPTabPaintManager::m_bFillBackground is TRUE, then the tab client
- // space is filled using CXTPTabPaintManager::CColorSet::m_clrControlFace color.
- // CXTPTabPaintManager::m_bFillBackground is only FALSE when drawing
- // DockingPanePanel AutoHide tabs because there is no client area to draw.
- // See Also: CXTPTabPaintManager::CAppearanceSet::GetHeaderRect, CXTPTabPaintManager::m_bFillBackground, XTPTabClientFrame, CXTPTabPaintManager::m_clientFrame
- //-----------------------------------------------------------------------
- virtual CRect FillTabControl(CXTPTabManager* pTabManager, CDC* pDC, CRect rcControl);
- //-----------------------------------------------------------------------
- // Summary:
- // Call this member to retrieve all the supported XTPTabColorStyle
- // for this appearance.
- // Returns:
- // xtpTabColorDefault | xtpTabColorOffice2003 | xtpTabColorWhidbey
- // See Also: GetDefaultColorSet
- //-----------------------------------------------------------------------
- virtual int GetSupportedColorSets() { return xtpTabColorDefault | xtpTabColorOffice2003 | xtpTabColorWhidbey | xtpTabColorVisualStudio2008; }
- //-----------------------------------------------------------------------
- // Summary:
- // Call this member to get the default XTPTabColorStyle for this appearance.
- // Returns:
- // xtpTabColorOffice2003
- // See Also: GetSupportedColorSets
- //-----------------------------------------------------------------------
- virtual XTPTabColorStyle GetDefaultColorSet() { return xtpTabColorOffice2003; }
- //-----------------------------------------------------------------------
- // Summary:
- // This method called to get bounding rectangle of item that was drawn
- // Parameters:
- // pItem - Item to test
- // Returns: Bounding rectangle of drawing item
- // See Also: CXTPTabManagerItem::GetRect
- //-----------------------------------------------------------------------
- virtual CRect GetButtonDrawRect(const CXTPTabManagerItem* pItem);
- public:
- BOOL m_bDoubleHighlightedBorder; // TRUE to draw a double border on mouse over when hot tracking is enabled.
- };
- //-------------------------------------------------------------------------
- // Summary:
- // CAppearanceSetPropertyPage2007 is a CAppearanceSet derived
- // class that represents the Office 2007 tab appearance.
- // Remarks:
- // To use the Office 2007 appearance, SetAppearance is used to apply
- // the xtpTabAppearancePropertyPage2007 XTPTabAppearanceStyle.
- //
- // See Also: XTPTabColorStyle, XTPTabAppearanceStyle, SetAppearance, GetAppearance, GetAppearanceSet,
- // SetColor, GetColor, GetColorSet, SetColorSet, SetAppearanceSet
- //-------------------------------------------------------------------------
- class _XTP_EXT_CLASS CAppearanceSetPropertyPage2007 : public CAppearanceSet
- {
- public:
- //-------------------------------------------------------------------------
- // Summary:
- // Constructs a CAppearanceSetPropertyPage2003 object.
- //-------------------------------------------------------------------------
- CAppearanceSetPropertyPage2007()
- {
- m_rcHeaderMargin.SetRect(4, 1, 0, 0);
- }
- protected:
- //-------------------------------------------------------------------------
- // Summary:
- // This member is called to refresh the appearance metrics.
- // Remarks:
- // This member is used to refresh the appearance metrics such
- // as font, button height, margin size, etc. Override this
- // member to change the appearance metrics.
- // See Also: CXTPTabPaintManager::SetFontIndirect, GetHeaderMargin,
- // CXTPTabPaintManager::CAppearanceSet::GetHeaderMargin::GetClientMargin,
- // CXTPTabPaintManager::CAppearanceSet::GetHeaderMargin::GetButtonLength,
- // CXTPTabPaintManager::CAppearanceSet::GetHeaderMargin::GetButtonHeight
- //-------------------------------------------------------------------------
- virtual void RefreshMetrics();
- //-----------------------------------------------------------------------
- // Summary:
- // This method is called to draw a single tab button in the tab
- // client header area.
- // Parameters:
- // pDC - Pointer to a valid device context.
- // pItem - Tab button to draw.
- // Remarks:
- // This method will draw a single tab button. This method only
- // draws the button, no text or icon is added.
- //
- // DrawSingleButton calls CXTPTabPaintManager::DrawSingleButtonIconAndText
- // after the button is drawn. This is called to draw the button's
- // icon and text.
- //
- // If m_bDoubleHighlightedBorder = TRUE, then a double border
- // is drawn on mouse over when hot tracking is enabled.
- //
- // See Also:: CXTPTabPaintManager::DrawTabControlEx, CXTPTabPaintManager::DrawSingleButtonIconAndText, m_bDoubleHighlightedBorder
- //-----------------------------------------------------------------------
- virtual void DrawSingleButton(CDC* pDC, CXTPTabManagerItem* pItem);
- //-----------------------------------------------------------------------
- // Summary:
- // This member fills in the tab header and tab client area. It
- // will then draw tab client frame.
- // Parameters:
- // pTabManager - Pointer to tab manager to fill.
- // pDC - Pointer to a valid device context.
- // rcControl - Bounding rectangle of the tab manager control.
- // See CXTPTabManager::GetControlRect.
- // Returns:
- // Tab header bounding rectangle. This value is returned from GetHeaderRect.
- // Remarks:
- // If CXTPTabPaintManager::m_bFillBackground is TRUE, then the tab client
- // space is filled using CXTPTabPaintManager::CColorSet::m_clrControlFace color.
- // CXTPTabPaintManager::m_bFillBackground is only FALSE when drawing
- // DockingPanePanel AutoHide tabs because there is no client area to draw.
- // See Also: CXTPTabPaintManager::CAppearanceSet::GetHeaderRect, CXTPTabPaintManager::m_bFillBackground, XTPTabClientFrame, CXTPTabPaintManager::m_clientFrame
- //-----------------------------------------------------------------------
- virtual CRect FillTabControl(CXTPTabManager* pTabManager, CDC* pDC, CRect rcControl);
- //-----------------------------------------------------------------------
- // Summary:
- // Call this member to retrieve all the supported XTPTabColorStyle
- // for this appearance.
- // Returns:
- // xtpTabColorDefault | xtpTabColorOffice2003 | xtpTabColorWhidbey
- // See Also: GetDefaultColorSet
- //-----------------------------------------------------------------------
- virtual int GetSupportedColorSets() { return xtpTabColorOffice2007; }
- //-----------------------------------------------------------------------
- // Summary:
- // Call this member to get the default XTPTabColorStyle for this appearance.
- // Returns:
- // xtpTabColorOffice2003
- // See Also: GetSupportedColorSets
- //-----------------------------------------------------------------------
- virtual XTPTabColorStyle GetDefaultColorSet() { return xtpTabColorOffice2007; }
- protected:
- typedef void (AFX_CDECL* LPFNDRAWROTATEDBITS)(int cx, int cy, UINT* pSrcBits, UINT* pDestBits);
- protected:
- void DrawRotatedButton(CDC* pDC, CRect rcItem, CXTPTabManagerItem* pItem, BOOL bSwap, LPFNDRAWROTATEDBITS pfnRotatedProcBack, LPFNDRAWROTATEDBITS pfnRotatedProc);
- virtual void DrawButtonBackground(CDC* pDC, CXTPTabManagerItem* pItem, CRect rc);
- };
- //-------------------------------------------------------------------------
- // Summary:
- // CAppearanceSetPropertyPageAccess2007 is a CAppearanceSet derived
- // class that represents the Office 2007 tab appearance.
- // Remarks:
- // To use the Office 2007 appearance, SetAppearance is used to apply
- // the xtpTabAppearancePropertyPage2007 XTPTabAppearanceStyle.
- //
- // See Also: XTPTabColorStyle, XTPTabAppearanceStyle, SetAppearance, GetAppearance, GetAppearanceSet,
- // SetColor, GetColor, GetColorSet, SetColorSet, SetAppearanceSet
- //-------------------------------------------------------------------------
- class _XTP_EXT_CLASS CAppearanceSetPropertyPageAccess2007 : public CAppearanceSetPropertyPage2007
- {
- public:
- //-------------------------------------------------------------------------
- // Summary:
- // Constructs a CAppearanceSetPropertyPageAccess2007 object.
- //-------------------------------------------------------------------------
- CAppearanceSetPropertyPageAccess2007()
- {
- m_rcHeaderMargin.SetRect(4, 1, 0, 0);
- }
- protected:
- //-------------------------------------------------------------------------
- // Summary:
- // This member is called to refresh the appearance metrics.
- // Remarks:
- // This member is used to refresh the appearance metrics such
- // as font, button height, margin size, etc. Override this
- // member to change the appearance metrics.
- // See Also: CXTPTabPaintManager::SetFontIndirect, GetHeaderMargin,
- // CXTPTabPaintManager::CAppearanceSet::GetHeaderMargin::GetClientMargin,
- // CXTPTabPaintManager::CAppearanceSet::GetHeaderMargin::GetButtonLength,
- // CXTPTabPaintManager::CAppearanceSet::GetHeaderMargin::GetButtonHeight
- //-------------------------------------------------------------------------
- virtual void RefreshMetrics();
- //-----------------------------------------------------------------------
- // Summary:
- // This method is called to draw a single tab button in the tab
- // client header area.
- // Parameters:
- // pDC - Pointer to a valid device context.
- // pItem - Tab button to draw.
- // Remarks:
- // This method will draw a single tab button. This method only
- // draws the button, no text or icon is added.
- //
- // DrawSingleButton calls CXTPTabPaintManager::DrawSingleButtonIconAndText
- // after the button is drawn. This is called to draw the button's
- // icon and text.
- //
- // If m_bDoubleHighlightedBorder = TRUE, then a double border
- // is drawn on mouse over when hot tracking is enabled.
- //
- // See Also:: CXTPTabPaintManager::DrawTabControlEx, CXTPTabPaintManager::DrawSingleButtonIconAndText, m_bDoubleHighlightedBorder
- //-----------------------------------------------------------------------
- virtual void DrawSingleButton(CDC* pDC, CXTPTabManagerItem* pItem);
- //-----------------------------------------------------------------------
- // Summary:
- // This member fills in the tab header and tab client area. It
- // will then draw tab client frame.
- // Parameters:
- // pTabManager - Pointer to tab manager to fill.
- // pDC - Pointer to a valid device context.
- // rcControl - Bounding rectangle of the tab manager control.
- // See CXTPTabManager::GetControlRect.
- // Returns:
- // Tab header bounding rectangle. This value is returned from GetHeaderRect.
- // Remarks:
- // If CXTPTabPaintManager::m_bFillBackground is TRUE, then the tab client
- // space is filled using CXTPTabPaintManager::CColorSet::m_clrControlFace color.
- // CXTPTabPaintManager::m_bFillBackground is only FALSE when drawing
- // DockingPanePanel AutoHide tabs because there is no client area to draw.
- // See Also: CXTPTabPaintManager::CAppearanceSet::GetHeaderRect, CXTPTabPaintManager::m_bFillBackground, XTPTabClientFrame, CXTPTabPaintManager::m_clientFrame
- //-----------------------------------------------------------------------
- virtual CRect FillTabControl(CXTPTabManager* pTabManager, CDC* pDC, CRect rcControl);
- //-----------------------------------------------------------------------
- // Summary:
- // Call this member to retrieve all the supported XTPTabColorStyle
- // for this appearance.
- // Returns:
- // xtpTabColorDefault | xtpTabColorOffice2003 | xtpTabColorWhidbey
- // See Also: GetDefaultColorSet
- //-----------------------------------------------------------------------
- virtual int GetSupportedColorSets() { return xtpTabColorAccess2007; }
- //-----------------------------------------------------------------------
- // Summary:
- // Call this member to get the default XTPTabColorStyle for this appearance.
- // Returns:
- // xtpTabColorOffice2003
- // See Also: GetSupportedColorSets
- //-----------------------------------------------------------------------
- virtual XTPTabColorStyle GetDefaultColorSet() { return xtpTabColorAccess2007; }
- CRect GetButtonDrawRect(const CXTPTabManagerItem* pItem);
- private:
- void DrawButtonBackground(CDC* pDC, CXTPTabManagerItem* pItem, CRect rc);
- };
- //-------------------------------------------------------------------------
- // Summary:
- // CAppearanceSetStateButtons is a CAppearanceSet derived
- // class that represents the "State Button" tab appearance.
- // Remarks:
- // To use the "State Button" appearance, SetAppearance is used to apply
- // the xtpTabAppearanceStateButtons XTPTabAppearanceStyle.
- //
- // CAppearanceSetStateButtons supports the following XTPTabColorStyle:
- // * <b>xtpTabColorDefault</b> Default color style.
- // * <b>xtpTabColorVisualStudio</b> Visual Studio color style.
- // * <b>xtpTabColorOffice2003</b> Office 2003 color style.
- // * <b>xtpTabColorWinXP</b> Windows XP color style.
- // * <b>xtpTabColorWhidbey</b> Visual Studio 2005 "Whidbey" color style.
- //
- // See Also: XTPTabColorStyle, XTPTabAppearanceStyle, SetAppearance, GetAppearance, GetAppearanceSet,
- // SetColor, GetColor, GetColorSet, SetColorSet, SetAppearanceSet
- //-------------------------------------------------------------------------
- class _XTP_EXT_CLASS CAppearanceSetStateButtons : public CAppearanceSet
- {
- public:
- //-------------------------------------------------------------------------
- // Summary:
- // Constructs a CAppearanceSetStateButtons object.
- //-------------------------------------------------------------------------
- CAppearanceSetStateButtons()
- {
- m_rcHeaderMargin.SetRect(2, 2, 4, 2);
- m_nRowMargin = 0;
- }
- //-----------------------------------------------------------------------
- // Summary:
- // This method is called to draw a single tab button in the tab
- // client header area.
- // Parameters:
- // pDC - Pointer to a valid device context.
- // pItem - Tab button to draw.
- // Remarks:
- // This method will draw a single tab button. This method only
- // draws the button, no text or icon is added.
- //
- // DrawSingleButton calls CXTPTabPaintManager::DrawSingleButtonIconAndText
- // after the button is drawn. This is called to draw the button's
- // icon and text.
- // See Also:: CXTPTabPaintManager::DrawTabControlEx, CXTPTabPaintManager::DrawSingleButtonIconAndText
- //-----------------------------------------------------------------------
- virtual void DrawSingleButton(CDC* pDC, CXTPTabManagerItem* pItem);
- //-----------------------------------------------------------------------
- // Summary:
- // This member fills in the tab header and tab client area. It
- // will then draw tab client frame.
- // Parameters:
- // pTabManager - Pointer to tab manager to fill.
- // pDC - Pointer to a valid device context.
- // rcControl - Bounding rectangle of the tab manager control.
- // See CXTPTabManager::GetControlRect.
- // Returns:
- // Tab header bounding rectangle. This value is returned from GetHeaderRect.
- // Remarks:
- // If CXTPTabPaintManager::m_bFillBackground is TRUE, then the tab client
- // space is filled using CXTPTabPaintManager::CColorSet::m_clrControlFace color.
- // CXTPTabPaintManager::m_bFillBackground is only FALSE when drawing
- // DockingPanePanel AutoHide tabs because there is no client area to draw.
- // See Also: CXTPTabPaintManager::CAppearanceSet::GetHeaderRect, CXTPTabPaintManager::m_bFillBackground, XTPTabClientFrame, CXTPTabPaintManager::m_clientFrame
- //-----------------------------------------------------------------------
- virtual CRect FillTabControl(CXTPTabManager* pTabManager, CDC* pDC, CRect rcControl);
- //-----------------------------------------------------------------------
- // Summary:
- // Call this member to get the default XTPTabColorStyle for this appearance.
- // Returns:
- // xtpTabColorVisualStudio
- // See Also: GetSupportedColorSets
- //-----------------------------------------------------------------------
- virtual XTPTabColorStyle GetDefaultColorSet() { return xtpTabColorVisualStudio; }
- };
- //-------------------------------------------------------------------------
- // Summary:
- // CAppearanceSetVisualStudio is a CAppearanceSet derived
- // class that represents the Visual Studio tab appearance.
- // Remarks:
- // To use the Visual Studio appearance, SetAppearance is used to apply
- // the xtpTabAppearanceVisualStudio XTPTabAppearanceStyle.
- //
- // CAppearanceSetVisualStudio supports the following XTPTabColorStyle:
- // * <b>xtpTabColorDefault</b> Default color style.
- // * <b>xtpTabColorVisualStudio</b> Visual Studio color style.
- // * <b>xtpTabColorOffice2003</b> Office 2003 color style.
- // * <b>xtpTabColorWinXP</b> Windows XP color style.
- // * <b>xtpTabColorWhidbey</b> Visual Studio 2005 "Whidbey" color style.
- //
- // See Also: XTPTabColorStyle, XTPTabAppearanceStyle, SetAppearance, GetAppearance, GetAppearanceSet,
- // SetColor, GetColor, GetColorSet, SetColorSet, SetAppearanceSet
- //-------------------------------------------------------------------------
- class _XTP_EXT_CLASS CAppearanceSetVisualStudio : public CAppearanceSet
- {
- public:
- //-------------------------------------------------------------------------
- // Summary:
- // Constructs a CAppearanceSetVisualStudio object.
- //-------------------------------------------------------------------------
- CAppearanceSetVisualStudio()
- {
- m_rcHeaderMargin.SetRect(4, 2, 4, 0);
- }
- //-----------------------------------------------------------------------
- // Summary:
- // This method is called to draw a single tab button in the tab
- // client header area.
- // Parameters:
- // pDC - Pointer to a valid device context.
- // pItem - Tab button to draw.
- // Remarks:
- // This method will draw a single tab button. This method only
- // draws the button, no text or icon is added.
- //
- // DrawSingleButton calls CXTPTabPaintManager::DrawSingleButtonIconAndText
- // after the button is drawn. This is called to draw the button's
- // icon and text.
- // See Also:: CXTPTabPaintManager::DrawTabControlEx, CXTPTabPaintManager::DrawSingleButtonIconAndText
- //-----------------------------------------------------------------------
- virtual void DrawSingleButton(CDC* pDC, CXTPTabManagerItem* pItem);
- //-----------------------------------------------------------------------
- // Summary:
- // This member fills in the tab header and tab client area. It
- // will then draw tab client frame.
- // Parameters:
- // pTabManager - Pointer to tab manager to fill.
- // pDC - Pointer to a valid device context.
- // rcControl - Bounding rectangle of the tab manager control.
- // See CXTPTabManager::GetControlRect.
- // Returns:
- // Tab header bounding rectangle. This value is returned from GetHeaderRect.
- // Remarks:
- // If CXTPTabPaintManager::m_bFillBackground is TRUE, then the tab client
- // space is filled using CXTPTabPaintManager::CColorSet::m_clrControlFace color.
- // CXTPTabPaintManager::m_bFillBackground is only FALSE when drawing
- // DockingPanePanel AutoHide tabs because there is no client area to draw.
- // See Also: CXTPTabPaintManager::CAppearanceSet::GetHeaderRect, CXTPTabPaintManager::m_bFillBackground, XTPTabClientFrame, CXTPTabPaintManager::m_clientFrame
- //-----------------------------------------------------------------------
- virtual CRect FillTabControl(CXTPTabManager* pTabManager, CDC* pDC, CRect rcControl);
- //-----------------------------------------------------------------------
- // Summary:
- // Call this member to retrieve all the supported XTPTabColorStyle
- // for this appearance.
- // Returns:
- // xtpTabColorDefault |xtpTabColorVisualStudio | xtpTabColorOffice2003
- // See Also: GetDefaultColorSet
- //-----------------------------------------------------------------------
- virtual int GetSupportedColorSets() { return xtpTabColorDefault | xtpTabColorVisualStudio | xtpTabColorOffice2003; }
- //-----------------------------------------------------------------------
- // Summary:
- // Call this member to get the default XTPTabColorStyle for this appearance.
- // Returns:
- // xtpTabColorVisualStudio
- // See Also: GetSupportedColorSets
- //-----------------------------------------------------------------------
- virtual XTPTabColorStyle GetDefaultColorSet() { return xtpTabColorVisualStudio; }
- };
- //-------------------------------------------------------------------------
- // Summary:
- // CAppearanceSetVisualStudio2005 is a CAppearanceSetPropertyPage2003 derived
- // class that represents the Visual Studio 2005 tab appearance.
- // Remarks:
- // To use the Visual Studio appearance, SetAppearance is used to apply
- // the xtpTabAppearanceVisualStudio2005 XTPTabAppearanceStyle.
- //
- // See Also: XTPTabColorStyle, XTPTabAppearanceStyle, SetAppearance, GetAppearance, GetAppearanceSet,
- // SetColor, GetColor, GetColorSet, SetColorSet, SetAppearanceSet
- //-------------------------------------------------------------------------
- class _XTP_EXT_CLASS CAppearanceSetVisualStudio2005 : public CAppearanceSetPropertyPage2003
- {
- public:
- //-------------------------------------------------------------------------
- // Summary:
- // Constructs a CAppearanceSetVisualStudio2005 object.
- //-------------------------------------------------------------------------
- CAppearanceSetVisualStudio2005()
- {
- m_bButtonsReverseZOrder = TRUE;
- }
- //-----------------------------------------------------------------------
- // Summary:
- // This method is called to draw a single tab button in the tab
- // client header area.
- // Parameters:
- // pDC - Pointer to a valid device context.
- // pItem - Tab button to draw.
- // Remarks:
- // This method will draw a single tab button. This method only
- // draws the button, no text or icon is added.
- //
- // DrawSingleButton calls CXTPTabPaintManager::DrawSingleButtonIconAndText
- // after the button is drawn. This is called to draw the button's
- // icon and text.
- // See Also:: CXTPTabPaintManager::DrawTabControlEx, CXTPTabPaintManager::DrawSingleButtonIconAndText
- //-----------------------------------------------------------------------
- virtual void DrawSingleButton(CDC* pDC, CXTPTabManagerItem* pItem);
- //-----------------------------------------------------------------------
- // Summary:
- // This method is called to get the top, left, right, and bottom
- // tab header margins.
- // Returns:
- // CRect struct containing the left, top, right, and bottom margins
- // of the tab header. This is the margin (space) placed around the
- // tab buttons inside the tab header.
- // Remarks:
- // The CRect structure will contain the margins of the tab header.
- // CXTPTabPaintManager::CAppearanceSet::m_rcHeaderMargin contains
- // these margins.
- //
- // See Also: CXTPTabPaintManager::CAppearanceSet::m_rcHeaderMargin, CXTPTabPaintManager::GetHeaderRect
- //-----------------------------------------------------------------------
- virtual CRect GetHeaderMargin()
- {
- return CRect(m_rcHeaderMargin.left + m_nButtonHeight / 2, m_rcHeaderMargin.top, m_rcHeaderMargin.right, m_rcHeaderMargin.bottom);
- }
- //-----------------------------------------------------------------------
- // Summary:
- // This method called to get bounding rectangle of item that was drawn
- // Parameters:
- // pItem - Item to test
- // Returns: Bounding rectangle of drawing item
- // See Also: CXTPTabManagerItem::GetRect
- //-----------------------------------------------------------------------
- virtual CRect GetButtonDrawRect(const CXTPTabManagerItem* pItem);
- };
- //-------------------------------------------------------------------------
- // Summary:
- // CAppearanceSetFlat is a CAppearanceSet derived
- // class that represents the "Flat" tab appearance.
- // Remarks:
- // To use the Flat appearance, SetAppearance is used to apply
- // the xtpTabAppearanceFlat XTPTabAppearanceStyle.
- //
- // CAppearanceSetFlat supports the following XTPTabColorStyle:
- // * <b>xtpTabColorDefault</b> Default color style.
- // * <b>xtpTabColorVisualStudio</b> Visual Studio color style.
- // * <b>xtpTabColorOffice2003</b> Office 2003 color style.
- //
- // See Also: XTPTabColorStyle, XTPTabAppearanceStyle, SetAppearance, GetAppearance, GetAppearanceSet,
- // SetColor, GetColor, GetColorSet, SetColorSet, SetAppearanceSet
- //-------------------------------------------------------------------------
- class _XTP_EXT_CLASS CAppearanceSetFlat : public CAppearanceSet
- {
- public:
- //-------------------------------------------------------------------------
- // Summary:
- // Constructs a CAppearanceSetFlat object.
- //-------------------------------------------------------------------------
- CAppearanceSetFlat()
- {
- m_rcHeaderMargin.SetRect(2, 2, 4, 0);
- }
- //-----------------------------------------------------------------------
- // Summary:
- // This method is called to draw a single tab button in the tab
- // client header area.
- // Parameters:
- // pDC - Pointer to a valid device context.
- // pItem - Tab button to draw.
- // Remarks:
- // This method will draw a single tab button. This method only
- // draws the button, no text or icon is added.
- //
- // DrawSingleButton calls CXTPTabPaintManager::DrawSingleButtonIconAndText
- // after the button is drawn. This is called to draw the button's
- // icon and text.
- // See Also:: CXTPTabPaintManager::DrawTabControlEx, CXTPTabPaintManager::DrawSingleButtonIconAndText
- //-----------------------------------------------------------------------
- virtual void DrawSingleButton(CDC* pDC, CXTPTabManagerItem* pItem);
- //-----------------------------------------------------------------------
- // Summary:
- // This member fills in the tab header and tab client area. It
- // will then draw tab client frame.
- // Parameters:
- // pTabManager - Pointer to tab manager to fill.
- // pDC - Pointer to a valid device context.
- // rcControl - Bounding rectangle of the tab manager control.
- // See CXTPTabManager::GetControlRect.
- // Returns:
- // Tab header bounding rectangle. This value is returned from GetHeaderRect.
- // Remarks:
- // If CXTPTabPaintManager::m_bFillBackground is TRUE, then the tab client
- // space is filled using CXTPTabPaintManager::CColorSet::m_clrControlFace color.
- // CXTPTabPaintManager::m_bFillBackground is only FALSE when drawing
- // DockingPanePanel AutoHide tabs because there is no client area to draw.
- // See Also: CXTPTabPaintManager::CAppearanceSet::GetHeaderRect, CXTPTabPaintManager::m_bFillBackground, XTPTabClientFrame, CXTPTabPaintManager::m_clientFrame
- //-----------------------------------------------------------------------
- virtual CRect FillTabControl(CXTPTabManager* pTabManager, CDC* pDC, CRect rcControl);
- //-----------------------------------------------------------------------
- // Summary:
- // Call this member to retrieve all the supported XTPTabColorStyle
- // for this appearance.
- // Returns:
- // xtpTabColorDefault |xtpTabColorVisualStudio | xtpTabColorOffice2003
- // See Also: GetDefaultColorSet
- //-----------------------------------------------------------------------
- virtual int GetSupportedColorSets() { return xtpTabColorDefault |xtpTabColorVisualStudio | xtpTabColorOffice2003; }
- //-----------------------------------------------------------------------
- // Summary:
- // Call this member to get the default XTPTabColorStyle for this appearance.
- // Returns:
- // xtpTabColorVisualStudio
- // See Also: GetSupportedColorSets
- //-----------------------------------------------------------------------
- virtual XTPTabColorStyle GetDefaultColorSet() { return xtpTabColorVisualStudio; }
- };
- //-------------------------------------------------------------------------
- // Summary:
- // CAppearanceSetPropertyPageFlat is a CAppearanceSetFlat derived
- // class that represents the Office 2000 Flat tab appearance.
- // Remarks:
- // To use the Office 2000 Flat appearance, SetAppearance is used to apply
- // the xtpTabAppearancePropertyPageFlat XTPTabAppearanceStyle.
- //
- // CAppearanceSetPropertyPageSelected supports the following XTPTabColorStyle:
- // * <b>xtpTabColorDefault</b> Default color style.
- // * <b>xtpTabColorVisualStudio</b> Visual Studio color style.
- // * <b>xtpTabColorOffice2003</b> Office 2003 color style.
- //
- // See Also: XTPTabColorStyle, XTPTabAppearanceStyle, SetAppearance, GetAppearance, GetAppearanceSet,
- // SetColor, GetColor, GetColorSet, SetColorSet, SetAppearanceSet
- //-------------------------------------------------------------------------
- class _XTP_EXT_CLASS CAppearanceSetPropertyPageFlat : public CAppearanceSetFlat
- {
- public:
- //-------------------------------------------------------------------------
- // Summary:
- // Constructs a CAppearanceSetPropertyPageFlat object.
- // Remarks:
- // By default, m_bBlurPoints is TRUE. This will smooth the edges
- // of the tabs.
- //-------------------------------------------------------------------------
- CAppearanceSetPropertyPageFlat()
- {
- m_bBlurPoints = TRUE;
- m_bVisualStudio2005Style = FALSE;
- }
- //-----------------------------------------------------------------------
- // Summary:
- // This method is called to draw a single tab button in the tab
- // client header area.
- // Parameters:
- // pDC - Pointer to a valid device context.
- // pItem - Tab button to draw.
- // Remarks:
- // This method will draw a single tab button. This method only
- // draws the button, no text or icon is added.
- //
- // DrawSingleButton calls CXTPTabPaintManager::DrawSingleButtonIconAndText
- // after the button is drawn. This is called to draw the button's
- // icon and text.
- //
- // If m_bBlurPoints is TRUE, then the corners of the tabs will be
- // smoothed.
- //
- // See Also:: CXTPTabPaintManager::DrawTabControlEx, CXTPTabPaintManager::DrawSingleButtonIconAndText, m_bBlurPoints
- //-----------------------------------------------------------------------
- virtual void DrawSingleButton(CDC* pDC, CXTPTabManagerItem* pItem);
- //-----------------------------------------------------------------------
- // Summary:
- // Call this member to get the default XTPTabColorStyle for this appearance.
- // Returns:
- // xtpTabColorDefault
- // See Also: GetSupportedColorSets
- //-----------------------------------------------------------------------
- virtual XTPTabColorStyle GetDefaultColorSet() { return xtpTabColorDefault; }
- public:
- BOOL m_bBlurPoints; // TRUE to smooth corners of flat tabs.
- BOOL m_bVisualStudio2005Style; // TRUE to draw with Visual Studio 2005 style
- };
- //-------------------------------------------------------------------------
- // Summary:
- // CAppearanceSetExcel is a CAppearanceSetFlat derived
- // class that represents the Excel tab appearance.
- // Remarks:
- // To use the Excel appearance, SetAppearance is used to apply
- // the xtpTabAppearanceExcel XTPTabAppearanceStyle.
- //
- // CAppearanceSetExcel supports the following XTPTabColorStyle:
- // * <b>xtpTabColorDefault</b> Default color style.
- // * <b>xtpTabColorVisualStudio</b> Visual Studio color style.
- // * <b>xtpTabColorOffice2003</b> Office 2003 color style.
- //
- // See Also: XTPTabColorStyle, XTPTabAppearanceStyle, SetAppearance, GetAppearance, GetAppearanceSet,
- // SetColor, GetColor, GetColorSet, SetColorSet, SetAppearanceSet
- //-------------------------------------------------------------------------
- class _XTP_EXT_CLASS CAppearanceSetExcel : public CAppearanceSetFlat
- {
- public:
- //-------------------------------------------------------------------------
- // Summary:
- // Constructs a CAppearanceSetExcel object.
- //-------------------------------------------------------------------------
- CAppearanceSetExcel()
- {
- m_rcHeaderMargin.SetRect(2, 3, 2, 0);
- }
- //-----------------------------------------------------------------------
- // Summary:
- // This method is called to get the top, left, right, and bottom
- // tab header margins.
- // Returns:
- // CRect struct containing the left, top, right, and bottom margins
- // of the tab header. This is the margin (space) placed around the
- // tab buttons inside the tab header.
- // Remarks:
- // The CRect structure will contain the margins of the tab header.
- // CXTPTabPaintManager::CAppearanceSet::m_rcHeaderMargin contains
- // these margins.
- //
- // See Also: CXTPTabPaintManager::CAppearanceSet::m_rcHeaderMargin, CXTPTabPaintManager::GetHeaderRect
- //-----------------------------------------------------------------------
- virtual CRect GetHeaderMargin()
- {
- return CRect(m_rcHeaderMargin.left + m_nButtonHeight / 2, m_rcHeaderMargin.top, m_rcHeaderMargin.right + m_nButtonHeight / 2, m_rcHeaderMargin.bottom);
- }
- //-----------------------------------------------------------------------
- // Summary:
- // This method is called to draw a single tab button in the tab
- // client header area.
- // Parameters:
- // pDC - Pointer to a valid device context.
- // pItem - Tab button to draw.
- // Remarks:
- // This method will draw a single tab button. This method only
- // draws the button, no text or icon is added.
- //
- // DrawSingleButton calls CXTPTabPaintManager::DrawSingleButtonIconAndText
- // after the button is drawn. This is called to draw the button's
- // icon and text.
- // See Also:: CXTPTabPaintManager::DrawTabControlEx, CXTPTabPaintManager::DrawSingleButtonIconAndText
- //-----------------------------------------------------------------------
- virtual void DrawSingleButton(CDC* pDC, CXTPTabManagerItem* pItem);
- //-----------------------------------------------------------------------
- // Summary:
- // This method called to get bounding rectangle of item that was drawn
- // Parameters:
- // pItem - Item to test
- // Returns: Bounding rectangle of drawing item
- // See Also: CXTPTabManagerItem::GetRect
- //-----------------------------------------------------------------------
- virtual CRect GetButtonDrawRect(const CXTPTabManagerItem* pItem);
- };
- //-------------------------------------------------------------------------
- // Summary:
- // CAppearanceSetVisio is a CAppearanceSet derived
- // class that represents the Visio tab appearance.
- // Remarks:
- // To use the Visio appearance, SetAppearance is used to apply
- // the xtpTabAppearanceVisio XTPTabAppearanceStyle.
- //
- // CAppearanceSetVisio supports the following XTPTabColorStyle:
- // * <b>xtpTabColorDefault</b> Default color style.
- // * <b>xtpTabColorOffice2003</b> Office 2003 color style.
- //
- // See Also: XTPTabColorStyle, XTPTabAppearanceStyle, SetAppearance, GetAppearance, GetAppearanceSet,
- // SetColor, GetColor, GetColorSet, SetColorSet, SetAppearanceSet
- //-------------------------------------------------------------------------
- class _XTP_EXT_CLASS CAppearanceSetVisio : public CAppearanceSet
- {
- public:
- //-----------------------------------------------------------------------
- // Summary:
- // This member is called to adjust the tab client rectangle. It will
- // return the new tab client rectangle with margins included.
- // Parameters:
- // pTabManager - Pointer to the tab manager to adjust the tab client rectangle.
- // rcClient - [out] CRect to store tab client rectangle.
- // Remarks:
- // CXTPTabPaintManager::AdjustClientRect and CXTPTabPaintManager::RepositionTabControl
- // are called when the window is resized. When CXTPTabPaintManager::DrawTabControl
- // is called the changes will be used when drawing the tab control.
- //
- // This member will adjust the tab client rectangle based on the
- // currently set XTPTabClientFrame.
- //
- // Then CXTPTabPaintManager::AdjustClientRect calls this member
- // if there is one or more tab in the tab manager.
- // See Also:
- // CXTPTabPaintManager::AdjustClientRect
- //-----------------------------------------------------------------------
- void AdjustClientRect(CXTPTabManager* pTabManager, CRect& rcClient);
- //-----------------------------------------------------------------------
- // Summary:
- // This method is called to move the tab buttons of the tab control to their
- // correct positions.
- // Parameters:
- // pTabManager - Pointer to the tab manager the tab button are on.
- // pDC - Pointer to a valid device context.
- // rcClient - Bounding rectangle of the tab client area.
- // Remarks:
- // CXTPTabPaintManager::RepositionTabControl and CXTPTabPaintManager::AdjustClientRect
- // are called when the window is resized. When DrawTabControl is called
- // the changes will be used when drawing the tab control.
- //
- // This member is called in CXTPTabPaintManager::RepositionTabControl.
- // This member calls CXTPTabPaintManager::RepositionTabControlEx.
- //-----------------------------------------------------------------------
- void RepositionTabControl(CXTPTabManager* pTabManager, CDC* pDC, CRect rcClient);
- //-----------------------------------------------------------------------
- // Summary:
- // Call this member to get the bounding rectangle to the tab
- // header area.
- // Parameters:
- // rcControl - Bounding rectangle of the tab header.
- // See CXTPTabManager::GetControlRect.
- // pTabManager - Pointer to a CXTPTabManager.
- // Returns:
- // Bounding rectangle of tab header area.
- // See Also: GetClientRect, CXTPTabManager::GetControlRect, CXTPTabManager::CAppearanceSet::GetHeaderMargin, CXTPTabManager::CAppearanceSet::GetClientMargin
- //-----------------------------------------------------------------------
- CRect GetHeaderRect(CRect rcControl, CXTPTabManager* pTabManager);
- //-----------------------------------------------------------------------
- // Summary:
- // Call this member to get the bounding rectangle to the tab
- // client area.
- // Parameters:
- // rcControl - Bounding rectangle of the tab control.
- // pTabManager - Pointer to a CXTPTabManager.
- // Returns:
- // Bounding rectangle of tab client area.
- // See Also: GetClientRect, CXTPTabManager::GetControlRect
- //-----------------------------------------------------------------------
- CRect GetClientRect(CRect rcControl, CXTPTabManager* pTabManager);
- //-----------------------------------------------------------------------
- // Summary:
- // This method is called to draw a single tab button in the tab
- // client header area.
- // Parameters:
- // pDC - Pointer to a valid device context.
- // pItem - Tab button to draw.
- // Remarks:
- // This method will draw a single tab button. This method only
- // draws the button, no text or icon is added.
- //
- // DrawSingleButton calls CXTPTabPaintManager::DrawSingleButtonIconAndText
- // after the button is drawn. This is called to draw the button's
- // icon and text.
- // See Also:: CXTPTabPaintManager::DrawTabControlEx, CXTPTabPaintManager::DrawSingleButtonIconAndText
- //-----------------------------------------------------------------------
- void DrawSingleButton(CDC* pDC, CXTPTabManagerItem* pItem);
- //-----------------------------------------------------------------------
- // Summary:
- // This member is called to draw the tab control.
- // Parameters:
- // pTabManager - Pointer to the tab manager to draw.
- // pDC - Pointer to a valid device context.
- // rcControl - Bounding rectangle of the client area.
- // Remarks:
- // This member is called in various Draw and Paint functions.
- //
- // This member will be called by CXTPTabPaintManager::DrawTabControl
- // when the tab control needs to be drawn.
- //-----------------------------------------------------------------------
- void DrawTabControl(CXTPTabManager* pTabManager, CDC* pDC, CRect rcControl);
- //-----------------------------------------------------------------------
- // Summary:
- // Call this member to retrieve all the supported XTPTabColorStyle
- // for this appearance.
- // Returns:
- // xtpTabColorDefault | xtpTabColorOffice2003
- // See Also: GetDefaultColorSet
- //-----------------------------------------------------------------------
- int GetSupportedColorSets() { return xtpTabColorDefault | xtpTabColorOffice2003; }
- };
- public:
- //-------------------------------------------------------------------------
- // Summary:
- // Constructs a CXTPTabPaintManager object.
- //-------------------------------------------------------------------------
- CXTPTabPaintManager();
- //-------------------------------------------------------------------------
- // Summary:
- // Destroys a CXTPTabPaintManager object, handles cleanup and deallocation.
- //-------------------------------------------------------------------------
- virtual ~CXTPTabPaintManager();
- public:
- //-----------------------------------------------------------------------
- // Summary:
- // Call this member to apply one of the "built-in" color sets to
- // the tabs.
- // Parameters:
- // tabColor - XTPTabColorStyle to apply to the tabs.
- // Returns:
- // Pointer to the CXTPTabPaintManager::CColorSet object applied.
- // See Also: XTPTabColorStyle, SetColorSet, GetColor, GetColorSet, XTPTabAppearanceStyle,
- // SetAppearanceSet, SetAppearance, GetAppearance, GetAppearanceSet
- //-----------------------------------------------------------------------
- CColorSet* SetColor(XTPTabColorStyle tabColor);
- //-----------------------------------------------------------------------
- // Summary:
- // Call this member to apply a custom color set to the tabs.
- // Parameters:
- // pColorSet - Pointer to custom CXTPTabPaintManager::CColorSet
- // appearance set.
- // Returns:
- // Pointer to the newly set custom color set.
- // See Also:
- // XTPTabColorStyle, SetColor, GetColor, GetColorSet, XTPTabAppearanceStyle,
- // SetAppearanceSet, SetAppearance, GetAppearance, GetAppearanceSet
- //-----------------------------------------------------------------------
- CColorSet* SetColorSet(CColorSet* pColorSet);
- //-----------------------------------------------------------------------
- // Summary:
- // Call this member to apply one of the "built-in" appearances to
- // the tabs.
- // Parameters:
- // tabAppearance - XTPTabAppearanceStyle to apply to the tabs.
- // Returns:
- // Pointer to the CXTPTabPaintManager::CAppearanceSet object applied.
- // Remarks:
- // Use SetAppearance to apply a "Built-In" theme such as
- // xtpTabAppearanceExcel. To apply a custom them, use the
- // SetAppearanceSet member.
- // See Also: XTPTabAppearanceStyle, SetAppearanceSet, GetAppearance, GetAppearanceSet,
- // SetColor, GetColor, GetColorSet, SetColorSet
- //-----------------------------------------------------------------------
- CAppearanceSet* SetAppearance(XTPTabAppearanceStyle tabAppearance);
- //-----------------------------------------------------------------------
- // Summary:
- // Call this member to apply a custom appearance set.
- // Parameters:
- // pAppearanceSet - Pointer to custom CXTPTabPaintManager::CAppearanceSet
- // appearance set.
- // Remarks:
- // An appearance set specifies how the tabs will look. This
- // is the actual physical structure of the tab buttons. For example,
- // tab buttons with an Excel appearance style will have a
- // half hexagon shape. SetColorSet is used to set custom
- // colors.
- //
- // See the GUI_Eclipse sample for an example of how to create
- // a custom appearance set and apply it to the tabs.
- // Returns:
- // Pointer to newly set custom appearance set.
- // See Also: XTPTabAppearanceStyle, SetAppearance, GetAppearance, GetAppearanceSet,
- // SetColor, GetColor, GetColorSet, SetColorSet
- //-----------------------------------------------------------------------
- CAppearanceSet* SetAppearanceSet(CAppearanceSet* pAppearanceSet);
- //-----------------------------------------------------------------------
- // Summary:
- // Call this member to get the currently set custom appearance set.
- // Returns:
- // Pointer to the currently used custom appearance set.
- // Remarks:
- // An appearance set specifies how the tabs will look. This
- // is the actual physical structure of the tab buttons. For example,
- // tab buttons with an Excel appearance style will have a
- // half hexagon shape. SetColorSet is used to set
- // custom colors.
- //
- // See the GUI_Eclipse sample for an example of how to create
- // a custom appearance set and apply it to the tabs.
- // See Also: GetAppearanceSet, SetAppearanceSet, SetAppearance
- //-----------------------------------------------------------------------
- CAppearanceSet* GetAppearanceSet() const;
- //-----------------------------------------------------------------------
- // Summary:
- // Call this member to get the currently used custom color set.
- // Returns:
- // Currently used custom color set.
- // See Also: XTPTabColorStyle, GetColor, SetColorSet, SetColor
- //-----------------------------------------------------------------------
- CColorSet* GetColorSet() const;
- //-----------------------------------------------------------------------
- // Summary:
- // Call this member to determine the currently set appearance style.
- // Returns:
- // The currently set XTPTabAppearanceStyle.
- // Remarks:
- // The appearance is the physical structure of the tab buttons.
- // See Also: XTPTabAppearanceStyle, GetAppearanceSet, SetAppearanceSet, SetAppearance
- //-----------------------------------------------------------------------
- XTPTabAppearanceStyle GetAppearance() const;
- //-----------------------------------------------------------------------
- // Summary:
- // Call this member to get the currently used tab color style.
- // Returns:
- // Currently used color style.
- // Remarks:
- // Color styles are used to colorize the tabs. For example,
- // applying the xtpTabColorWinXP color style will give the
- // tabs Windows XP colorization.
- // See Also: XTPTabColorStyle, SetColor, GetColorSet, SetColorSet
- //-----------------------------------------------------------------------
- XTPTabColorStyle GetColor() const;
- //-----------------------------------------------------------------------
- // Summary:
- // Call this member to determine is luna colors are disabled.
- // Returns:
- // TRUE if luna colors are disabled, FALSE is luna colors are
- // enabled.
- // See Also: DisableLunaColors
- //-----------------------------------------------------------------------
- BOOL IsLunaColorsDisabled() const;
- //-----------------------------------------------------------------------
- // Summary:
- // Call this member to enable/disable luna colors.
- // Parameters:
- // bDisableLunaColors - TRUE to disable luna colors, FALSE to
- // enable luna colors.
- // Remarks:
- // Luna colors are the Windows XP colors (Silver, Blue, Olive).
- // CXTPDrawHelpers::GetCurrentSystemTheme can be called to get
- // the currently used system theme.
- // See Also: IsLunaColorsDisabled, XTPCurrentSystemTheme,
- // CXTPDrawHelpers::GetCurrentSystemTheme
- //-----------------------------------------------------------------------
- void DisableLunaColors(BOOL bDisableLunaColors);
- //-----------------------------------------------------------------------
- // Summary:
- // Retrieves the COLORREF value for the specified OneNote color.
- // Parameters:
- // tabColor - XTPTabOneNoteColor flag indicating which OneNote color
- // to retrieve. See remarks section for available flags.
- // Remarks:
- // The tab manager calls this member function to retrieve the RGB
- // color for the value specified by <i>tabColor</i>. <i>tabColor</i>
- // can be one of the following values:
- // * <b>xtpTabColorBlue</b> Blue tab color used when OneNote
- // colors enabled.
- // * <b>xtpTabColorYellow</b> Yellow tab color used when OneNote
- // colors enabled.
- // * <b>xtpTabColorGreen</b> Green tab color used when OneNote
- // colors enabled.
- // * <b>xtpTabColorRed</b> Red tab color used when OneNote
- // colors enabled.
- // * <b>xtpTabColorPurple</b> Purple tab color used when OneNote
- // colors enabled.
- // * <b>xtpTabColorCyan</b> Cyan tab color used when OneNote
- // colors enabled.
- // * <b>xtpTabColorOrange</b> Orange tab color used when OneNote
- // colors enabled.
- // * <b>xtpTabColorMagenta</b> Magenta tab color used when OneNote
- // colors enabled.
- // Example:
- // See WM_XTP_GETTABCOLOR for an example.
- // See Also:
- // XTPTabOneNoteColor
- //-----------------------------------------------------------------------
- static COLORREF AFX_CDECL GetOneNoteColor(XTPTabOneNoteColor tabColor);
- //-----------------------------------------------------------------------
- // Summary:
- // Call this member to enabledisable OneNote colorization for
- // the tabs.
- // Parameters:
- // bOneNoteColors - TRUE to enable OneNote colors, FALSE to
- // disable OneNote colors.
- // Remarks:
- // OneNote colors are similar to the tab colorization of tabs in
- // Microsoft OneNote.
- //-----------------------------------------------------------------------
- void SetOneNoteColors(BOOL bOneNoteColors);
- //-----------------------------------------------------------------------
- // Summary:
- // Call this member to set the tab position.
- // Parameters:
- // tabPosition - New XTPTabPosition to apply to tab manager.
- // Remarks:
- // The position refers to where the tab buttons are located. The
- // tab buttons can be positioned on the top, bottom, left, or right
- // side of the tab client area.
- // See Also: GetPosition
- //-----------------------------------------------------------------------
- void SetPosition(XTPTabPosition tabPosition);
- //-----------------------------------------------------------------------
- // Summary:
- // Call this member to set the tab layout style.
- // Parameters:
- // tabLayout - New XTPTabLayoutStyle to apply to the tabs.
- // Remarks:
- // The layout refers to how the tab buttons are sized within the
- // tab client header. The tab buttons can be in a compressed,
- // fixed, auto size, or size to fit layout.
- // See Also: GetLayout
- //-----------------------------------------------------------------------
- void SetLayout(XTPTabLayoutStyle tabLayout);
- //-----------------------------------------------------------------------
- // Summary:
- // Call this member to set the position of the tab buttons.
- // Returns:
- // XTPTabPosition of tab buttons.
- // Remarks:
- // The position refers to where the tab buttons are located. The
- // tab buttons can be positioned on the top, bottom, left, or right
- // side of the tab client area.
- // See Also: SetPosition
- //-----------------------------------------------------------------------
- XTPTabPosition GetPosition() const;
- //-----------------------------------------------------------------------
- // Summary:
- // Call this member to get the currently set tab layout.
- // Returns:
- // Currently used XTPTabLayoutStyle.
- // Remarks:
- // The layout refers to how the tab buttons are sized within the
- // tab client header. The tab buttons can be in a compressed,
- // fixed, auto size, or size to fit layout.
- // See Also: SetLayout
- //-----------------------------------------------------------------------
- XTPTabLayoutStyle GetLayout() const;
- //-----------------------------------------------------------------------
- // Summary:
- // Call this member to set the font for the tabs.
- // Parameters:
- // pLogFont - New LOGFONT to use for text in the tab buttons.
- // bUseStandardFont - When calling SetFontIndirect, always
- // use FALSE, this will indicate that pLogFont
- // should be used as the new tab font.
- //
- // TRUE is used when SetFontIndirect
- // is called internally when the system font
- // is changed.
- //
- // Remarks:
- // When bUseStandardFont is TRUE, the standard system "icon" font
- // will be used. The standard "icon" font is Tahoma 8pt.
- //-----------------------------------------------------------------------
- void SetFontIndirect(LOGFONT* pLogFont, BOOL bUseStandardFont = FALSE);
- public:
- //-----------------------------------------------------------------------
- // Summary:
- // This member is called to draw the tab control.
- // Parameters:
- // pTabManager - Pointer to the tab manager to draw.
- // pDC - Pointer to a valid device context.
- // rcControl - Bounding rectangle of the client area.
- // Remarks:
- // This member is called in various Draw and Paint functions.
- //
- // This member will call CXTPTabPaintManager::CAppearanceSet::DrawTabControl
- // for the currently set appearance. CXTPTabPaintManager::CAppearanceSet::DrawTabControl
- // will then call CXTPTabPaintManager::DrawTabControlEx.
- //-----------------------------------------------------------------------
- virtual void DrawTabControl(CXTPTabManager* pTabManager, CDC* pDC, CRect rcControl);
- //-----------------------------------------------------------------------
- // Summary:
- // This member is called to adjust the client rectangle. It will
- // return the new client rectangle with margins included.
- // Parameters:
- // pTabManager - Pointer to the tab manager to adjust the client rectangle.
- // rcClient - [out] CRect to store client rectangle.
- // Remarks:
- // AdjustClientRect and RepositionTabControl are called when the window
- // is resized. When DrawTabControl is called the changes will be
- // used when drawing the tab control.
- //
- // This member will adjust the client rectangle of the entire tab
- // manager if IsDrawStaticFrame is TRUE to make room to draw the static
- // frame.
- //
- // Then CXTPTabPaintManager::CAppearanceSet::AdjustClientRect is called
- // if there is one or more tabs in the tab manager.
- // See Also:
- // CXTPTabPaintManager::CAppearanceSet::AdjustClientRect
- //-----------------------------------------------------------------------
- virtual void AdjustClientRect(CXTPTabManager* pTabManager, CRect& rcClient);
- //-----------------------------------------------------------------------
- // Summary:
- // This method is called to move the tab buttons of the tab control to their
- // correct positions.
- // Parameters:
- // pTabManager - Pointer to the tab manager the tab button are on.
- // pDC - Pointer to a valid device context.
- // rcControl - Client rectangle of control.
- // Remarks:
- // RepositionTabControl and AdjustClientRect are called when the window
- // is resized. When DrawTabControl is called the changes will be
- // used when drawing the tab control.
- //
- // CXTPTabPaintManager::CAppearanceSet::RepositionTabControl is then
- // called for the currently set appearance.
- //-----------------------------------------------------------------------
- virtual void RepositionTabControl(CXTPTabManager* pTabManager, CDC* pDC, CRect rcControl);
- //-----------------------------------------------------------------------
- // Summary:
- // This member is called to reposition the tab navigation buttons.
- // Parameters:
- // pTabManager - Pointer to the tab manager the navigation button are on.
- // rcClient - Client rectangle of control.
- // Returns:
- // Tab header rectangle including header margins.
- // Remarks:
- // This member is called in CXTPTabPaintManager::RepositionTabControlEx
- // to reposition the tab navigation buttons.
- //-----------------------------------------------------------------------
- CRect RepositionNavigateButtons(CXTPTabManager* pTabManager, CRect rcClient);
- //-----------------------------------------------------------------------
- // Summary:
- // This member is called to fill the tab navigation buttons.
- // Parameters:
- // pDC - Pointer to a valid device context.
- // pButton - Tab navigation button to fill.
- // rc - Bounding rectangle of the tab navigation button.
- // Remarks:
- // This member calls m_pColorSet->FillNavigateButton.
- //
- // The XTPTabColorStyle CColorSet classes override this to perform
- // actions such as painting the highlighting, pressed, and normal
- // versions of the tab navigation buttons.
- //
- // See Also: CXTPTabPaintManager::CColorSet::FillNavigateButton, CXTPTabManager::GetNavigateButton, CXTPTabManagerNavigateButton
- //-----------------------------------------------------------------------
- void FillNavigateButton(CDC* pDC, CXTPTabManagerNavigateButton* pButton, CRect& rc);
- //-----------------------------------------------------------------------
- // Summary:
- // This member is called to draw tab navigation buttons.
- // Parameters:
- // pDC - Pointer to a valid device context.
- // pButton - Tab navigation button to fill.
- // rc - Bounding rectangle of the tab navigation button.
- // See Also: CXTPTabPaintManager::CColorSet::FillNavigateButton, CXTPTabManager::GetNavigateButton, CXTPTabManagerNavigateButton
- //-----------------------------------------------------------------------
- virtual void DrawNavigateButton(CDC* pDC, CXTPTabManagerNavigateButton* pButton, CRect& rc);
- //-----------------------------------------------------------------------
- // Summary:
- // This method is called to draw the tab button's text and icon.
- // Parameters:
- // pDC - Pointer to a valid device context.
- // pItem - Tab button to draw text and icon on.
- // rcItem - Bounding rectangle of the tab.
- // bDraw - TRUE to draw the text and icon, FALSE to calculate
- // the button width (no drawing is done).
- // Returns:
- // Returns 0 if bDraw is TRUE and drawing is successful.
- //
- // Returns the button width including the left and right button margin
- // if bDraw is FALSE.
- //
- // Remarks:
- // This method only draws the text and icon on a tab button.
- //
- // CXTPTabPaintManager::CAppearanceSet::DrawSingleButton calls
- // CXTPTabPaintManager::DrawSingleButtonIconAndText
- // after the button is drawn. This is called to draw the button's
- // icon and text.
- //
- // See Also: CXTPTabPaintManager::DrawTabControlEx, CXTPTabPaintManager::CAppearanceSet::DrawSingleButton
- //-----------------------------------------------------------------------
- virtual int DrawSingleButtonIconAndText(CDC* pDC, CXTPTabManagerItem* pItem, CRect rcItem, BOOL bDraw);
- //-----------------------------------------------------------------------
- // Summary:
- // Call this member to ensure that a tab is visible.
- // Parameters:
- // pTabManager - Pointer to the tab manager the tab in on.
- // pItem - CXTPTabManagerItem tab to make visible.
- // See Also: CXTPTabManager::SetHeaderOffset, CXTPTabManager::GetHeaderOffset
- //-----------------------------------------------------------------------
- void EnsureVisible(CXTPTabManager* pTabManager, CXTPTabManagerItem* pItem);
- //-------------------------------------------------------------------------
- // Summary:
- // This member is called to refresh the visual metrics of the
- // tab main manager.
- // Remarks:
- // This member checks if m_bUseStandardFont is TRUE, if it is,
- // then it updates the font with the standard system "icon" font
- // which is Tahoma 8pt.
- // This member also calls the RefreshMetrics member for the
- // currently used CColorSet and CAppearanceSet.
- //-------------------------------------------------------------------------
- virtual void RefreshMetrics();
- //-----------------------------------------------------------------------
- // Summary:
- // This member adds a control to the list of controls that receive
- // notification when a property of paint manager has changed.
- // Parameters:
- // pObserver - List of controls that receive
- // notification when a property of paint manager has changed.
- // Remarks:
- // This member is not used in the MFC version. This is only used
- // in the ActiveX version and does nothing in MFC.
- //-----------------------------------------------------------------------
- void AddObserver(CXTPTabManagerAtom* pObserver);
- //-----------------------------------------------------------------------
- // Summary:
- // Call this member function to enable or disable tooltips show
- // Parameters:
- // behaviour - Tooltips behaviour will be set. See remarks section for available flags.
- // Remarks:
- // <i>behaviour<i> parameter can be one of the following:
- // * <b>xtpTabToolTipNever</b> Show tooltips for tabs always
- // * <b>xtpTabToolTipAlways</b> Doesn't show tooltips for tabs
- // * <b>xtpTabToolTipShrinkedOnly</b> Show tooltips only if tab was shrinked (see xtpTabLayoutSizeToFit layout)
- //-----------------------------------------------------------------------
- void EnableToolTips(XTPTabToolTipBehaviour behaviour = xtpTabToolTipAlways);
- public:
- //-----------------------------------------------------------------------
- // Summary:
- // Call this member to get the CFont used for displaying tab
- // caption text.
- // Parameters:
- // bVertical - TRUE if the XTPTabPosition is vertical, FALSE if
- // the XTPTabPosition is horizontal.
- // Returns:
- // CFont used to display caption text in the tab buttons.
- // See Also: GetBoldFont
- //-----------------------------------------------------------------------
- CFont* GetFont(BOOL bVertical = FALSE);
- //-----------------------------------------------------------------------
- // Summary:
- // Call this method to get the CFont used for displaying tab
- // caption text when bold.
- // Parameters:
- // bVertical - TRUE if the XTPTabPosition is vertical, FALSE if
- // the XTPTabPosition is horizontal.
- // Returns:
- // CFont used to display bold caption text in the tab buttons.
- // Remarks:
- // Bold font is used to display caption text when a tab is
- // selected and m_bBoldSelected = TRUE.
- //
- // If m_bBoldNormal = TRUE, then the tabs will use this font
- // even when not selected.
- // See Also: m_bBoldNormal, m_bBoldSelected, GetFont
- //-----------------------------------------------------------------------
- CFont* GetBoldFont(BOOL bVertical = FALSE);
- protected:
- //-----------------------------------------------------------------------
- // Summary:
- // This member is called to change the tab button size when the
- // XTPTabLayoutStyle is xtpTabLayoutSizeToFit.
- // Parameters:
- // pTabManager - Pointer to tab manager.
- // nWidth - Total width that all tab buttons must fit in.
- // Remarks:
- // When calculating nWidth, the left and right rcHeaderMargin and
- // tab navigation button widths should be subtracted from the
- // TabClient width.
- // See Also: XTPTabLayoutStyle, SetLayout, GetLayout
- //-----------------------------------------------------------------------
- void SizeToFit(CXTPTabManager* pTabManager, int nWidth);
- //-----------------------------------------------------------------------
- // Summary:
- // This member is called to draw the tab control.
- // Parameters:
- // pTabManager - Pointer to the tab manager to draw.
- // pDC - Pointer to a valid device context.
- // rcControl - Bounding rectangle of the client area.
- // Remarks:
- // DrawTabControl calls CXTPTabPaintManager::CAppearanceSet::DrawTabControl
- // which will then call DrawTabControlEx if it has not been overridden.
- // See Also:
- // CXTPTabPaintManager::CAppearanceSet::DrawTabControl
- //-----------------------------------------------------------------------
- void DrawTabControlEx(CXTPTabManager* pTabManager, CDC* pDC, CRect rcControl);
- //-----------------------------------------------------------------------
- // Summary:
- // This method is called to move the tab buttons of the tab control to their
- // correct positions.
- // Parameters:
- // pTabManager - Pointer to the tab manager the tab button are on.
- // pDC - Pointer to a valid device context.
- // rcClient - Client rectangle of control
- // Remarks:
- // RepositionTabControl calls CXTPTabPaintManager::CAppearanceSet::RepositionTabControl
- // which will then call RepositionTabControlEx if it has not been overridden.
- //
- // RepositionTabControl and AdjustClientRect are called when the window
- // is resized. When DrawTabControl is called the changes will be
- // used when drawing the tab control.
- // See Also:
- // CXTPTabPaintManager::CAppearanceSet::RepositionTabControl
- //-----------------------------------------------------------------------
- void RepositionTabControlEx(CXTPTabManager* pTabManager, CDC* pDC, CRect rcClient);
- //-----------------------------------------------------------------------
- // Summary:
- // This method is called to move the tab buttons of the multi row tab control to their
- // correct positions.
- // Parameters:
- // pTabManager - Pointer to the tab manager the tab button are on.
- // pDC - Pointer to a valid device context.
- // rcClient - Client rectangle of control
- //-----------------------------------------------------------------------
- void RepositionTabControlMultiRow(CXTPTabManager* pTabManager, CDC* pDC, CRect rcClient);
- //-------------------------------------------------------------------------
- // Summary:
- // This member is called when a property of the tab paint manager
- // has changed.
- // Remarks:
- // This member is called when the value of a property is changed.
- // For example, when hot tracking in enabled/disabled.
- //-------------------------------------------------------------------------
- virtual void OnPropertyChanged();
- protected:
- //-----------------------------------------------------------------------
- // Summary:
- // This member is called to get the total button length including
- // the left and right button margin.
- // Parameters:
- // nValue - Width of tab button.
- // nMin - Minimum width of tab button.
- // nMax - Maximum width of tab button.
- // Returns:
- // Tab button length including the left and right button margin.
- // See Also: CXTPTabManager::GetItemMetrics
- //-----------------------------------------------------------------------
- int _GetButtonLength(int nValue, int nMin, int nMax);
- //-----------------------------------------------------------------------
- // Summary:
- // This member is called to place an ellipse "..." in the middle
- // of a string.
- // Parameters:
- // pDC - Pointer to a valid device context.
- // strItem - String item to place an ellipse in.
- // rcItem - Bounding rectangle of tab button. This is the rectangle
- // (in logical coordinates) in which the text is to be formatted.
- // uFormat - See nFormat parameter of CDC::DrawText.
- //-----------------------------------------------------------------------
- void DrawTextPathEllipsis(CDC* pDC, const CString& strItem, CRect rcItem, UINT uFormat);
- protected:
- //{{AFX_CODEJOCK_PRIVATE
- int GetPrefixTextExtent(CDC* pDC, const CString& str, UINT uFormat);
- void StripMnemonics(CString& strClear);
- void DrawRowItems(CXTPTabManager* pTabManager, CDC* pDC, const CRect& rcClient, int nItemRow);
- void CreateMultiRowIndexer(CXTPTabManager* pTabManager, CDC* pDC, int nWidth);
- virtual void DrawFocusRect(CDC* pDC, CXTPTabManagerItem* pItem, CRect rcItem);
- BOOL _CreateMultiRowIndexerBestFit(CXTPTabManager* pTabManager, int nWidth, int nRow, int nTotalLength);
- static int _cdecl _SizeToFitCompare(const void *arg1, const void *arg2);
- //}}AFX_CODEJOCK_PRIVATE
- public:
- BOOL m_bHotTracking; // If TRUE, tab hot tracking will be enabled.
- BOOL m_bShowIcons; // If TRUE, tab icons will be drawn is icons were added
- BOOL m_bBoldSelected; // If TRUE, the text of selected tabs will be displayed in bold font
- BOOL m_bBoldNormal; // If TRUE, bold font will be used for all tab both selected and non-selected.
- BOOL m_bDisableLunaColors; // If FALSE, Tabs will not use LunaColors, is the current theme uses LunaColors
- BOOL m_bOneNoteColors; // If TRUE, tabs will use OneNote colorization
- XTPTabClientFrame m_clientFrame; // Frame style of tab client area.
- BOOL m_bStaticFrame; // If TRUE, a static frame will be drawn around the entire tab area
- CRect m_rcClientMargin; // Margin around tab client area.
- CRect m_rcControlMargin; // Margin around entire tab control (tab client header and tab client area).
- CRect m_rcButtonMargin; // Margin around the text in tab button.
- CRect m_rcButtonTextPadding; // Margin around the text in tab button.
- BOOL m_bInvertGradient; // If TRUE, the colors passed into CXTPTabPaintManager::CColorSet::GradientFill will be swapped before the rectangle is filled with the gradient.
- BOOL m_bFillBackground; // If TRUE, then the tab client space is filled using CXTPTabPaintManager.CColorSet.m_clrControlFace color. This is only FALSE when drawing DockingPanePanel AutoHide tabs because there is no client area to draw.
- CSize m_szIcon; // Size of icon displayed in tab button.
- BOOL m_bDrawTextPathEllipsis; // If TRUE, when the size of a tab button is too small to display the caption the middle of the caption will be replaced with an ellipse "...", If FALSE, the the end of the caption will be replaced with the ellipse.
- BOOL m_bDrawTextEndEllipsis; // If TRUE, when the size of a tab button is too small to display the caption the end of the caption will be replaced with an ellipse "...", If FALSE, the the end of the caption will be replaced with the ellipse.
- BOOL m_bDrawTextNoPrefix; // If FALSE, then an ampersand '&' in the tab button caption will be ignored and a double ampersand '&&' will display a single ampersand '&'. If TRUE, the the caption will be displayed unmodified.
- UINT m_nDrawTextFormat; // Text format for tabs (default - DT_LEFT | DT_VCENTER)
- BOOL m_bDrawTextHidePrefix; // If FALSE, then an ampersand '&' in the tab button caption will be ignored and a double ampersand '&&' will display a single ampersand '&'. If TRUE, the the caption will be hidden.
- BOOL m_bMultiRowFixedSelection; // FALSE to move row with selected item close to client pane.
- BOOL m_bMultiRowJustified; // Stretch each row of tabs to fill the entire width of the control.
- BOOL m_bDrawFocusRect; // TRUE to draw focus rect for focused item.
- BOOL m_bSelectOnDragOver; // TRUE to activate tab when user drag files/text under it.
- int m_nButtonExtraLength; // Additional padding of tabs
- BOOL m_bSelectOnButtonDown; // if TRUE, when tab selected on mouse button down.
- BOOL m_bClearTypeTextQuality; // TRUE to enable ClearType text for the font.
- BOOL m_bRotateImageOnVerticalDraw; // TRUE to rotate image when tab located left or right
- BOOL m_bClipHeader; // TRUE to select clip rectangle before draw tabs
- CSize m_szNavigateButton;
- BOOL m_bShowTabs; // TRUE to show tabs
- int m_nMinTabWidth; // Minimum tabs width
- int m_nMaxTabWidth; // Maximum tabs width
- int m_nFixedTabWidth; // Tabs width for fixed layout
- XTPTabToolTipBehaviour m_toolBehaviour; // Tootips behaviour
- protected:
- CAppearanceSet* m_pAppearanceSet; // Currently set CAppearanceSet.
- CColorSet* m_pColorSet; // Currently used CColorSet.
- CArray<CXTPTabManagerAtom*, CXTPTabManagerAtom*> m_arrObservers; // List of controls that receive notification when a property of paint manager has changed.
- XTPTabAppearanceStyle m_tabAppearance; // Currently set appearance style.
- XTPTabColorStyle m_tabColor; // Currently used color style.
- XTPTabPosition m_tabPosition; // Currently set tab button position. The position refers to where the tab buttons are located. The tab buttons can be positioned on the top, bottom, left, or right side of the tab client area.
- XTPTabLayoutStyle m_tabLayout; // Currently set tab button layout. The layout refers to how the tab buttons are sized within the tab client header.
- CFont m_fntNormal; // Font used to display text in tab buttons.
- CFont m_fntBold; // Font used to display bold text in the tab buttons. I.e. When a tab is selected and m_bBoldSelected = TRUE.
- CFont m_fntVerticalNormal; // Font used to display tab button caption when the tab position is vertical.
- CFont m_fntVerticalBold; // Font used to display bold text in the tab buttons when the tab position is vertical. I.e. When a tab is selected and m_bBoldSelected = TRUE.
- BOOL m_bUseStandardFont; // TRUE to use standard system "icon" font which is Tahoma 8pt.
- private:
- int m_nItemColor;
- friend class CAppearanceSet;
- friend class CColorSet;
- friend class CXTPTabManager;
- };
- AFX_INLINE void CXTPTabPaintManager::CColorSet::SelectClipRgn(CDC* /*pDC*/, CRect /*rcClient*/, CXTPTabManager* /*pTabManager*/) {
- }
- //////////////////////////////////////////////////////////////////////////
- AFX_INLINE CRect CXTPTabPaintManager::CAppearanceSet::GetHeaderMargin() {
- return m_rcHeaderMargin;
- }
- AFX_INLINE CRect CXTPTabPaintManager::CAppearanceSet::FillTabControl(CXTPTabManager* /*pTabManager*/, CDC* /*pDC*/, CRect /*rcControl*/) {
- return 0;
- }
- AFX_INLINE void CXTPTabPaintManager::CAppearanceSet::DrawSingleButton(CDC* /*pDC*/, CXTPTabManagerItem* /*pItem*/) {
- }
- AFX_INLINE void CXTPTabPaintManager::CAppearanceSet::DrawTabControl(CXTPTabManager* pTabManager, CDC* pDC, CRect rcControl) {
- m_pPaintManager->DrawTabControlEx(pTabManager, pDC, rcControl);
- }
- AFX_INLINE void CXTPTabPaintManager::CAppearanceSet::RepositionTabControl(CXTPTabManager* pTabManager, CDC* pDC, CRect rcClient) {
- m_pPaintManager->RepositionTabControlEx(pTabManager, pDC, rcClient);
- }
- //////////////////////////////////////////////////////////////////////////
- AFX_INLINE CFont* CXTPTabPaintManager::GetFont(BOOL bVertical) {
- return bVertical ? &m_fntVerticalNormal : &m_fntNormal;
- }
- AFX_INLINE CFont* CXTPTabPaintManager::GetBoldFont(BOOL bVertical) {
- return bVertical ? &m_fntVerticalBold : &m_fntBold;
- }
- AFX_INLINE CXTPTabPaintManager::CAppearanceSet* CXTPTabPaintManager::GetAppearanceSet() const {
- return m_pAppearanceSet;
- }
- AFX_INLINE CXTPTabPaintManager::CColorSet* CXTPTabPaintManager::GetColorSet() const {
- return m_pColorSet;
- }
- AFX_INLINE void CXTPTabPaintManager::EnableToolTips(XTPTabToolTipBehaviour behaviour) {
- m_toolBehaviour = behaviour;
- }
- #endif // !defined(__XTPTABPAINTMANAGER_H__)