Compartir a través de


CMFCRibbonCategory Class

The CMFCRibbonCategory class implements a ribbon tab that contains a group of ribbon panels.

class CMFCRibbonCategory : public CObject

Members

Protected Constructors

Name

Description

CMFCRibbonCategory::CMFCRibbonCategory

The constructor.

Public Methods

Name

Description

CMFCRibbonCategory::AddHidden

Adds a hidden element to the ribbon category.

CMFCRibbonCategory::AddPanel

Adds a new panel to the ribbon category.

CMFCRibbonCategory::CopyFrom

 

CMFCRibbonCategory::FindByData

 

CMFCRibbonCategory::FindByID

 

CMFCRibbonCategory::FindPanelWithElem

 

CMFCRibbonCategory::GetContextID

Returns the context ID of the ribbon category.

CMFCRibbonCategory::GetData

Returns the user-defined data that is associated with the ribbon category.

CMFCRibbonCategory::GetDroppedDown

 

CMFCRibbonCategory::GetElements

 

CMFCRibbonCategory::GetElementsByID

 

CMFCRibbonCategory::GetFirstVisibleElement

Obtain a first visible element that belong to the ribbon category.

CMFCRibbonCategory::GetFocused

Returns a focused element.

CMFCRibbonCategory::GetHighlighted

Returns a highlighted element.

CMFCRibbonCategory::GetImageCount

 

CMFCRibbonCategory::GetImageSize

 

CMFCRibbonCategory::GetItemIDsList

 

CMFCRibbonCategory::GetLastVisibleElement

Obtain a last visible element that belong to the ribbon category

CMFCRibbonCategory::GetLargeImages

Returns a reference to the list of large images that the ribbon category uses.

CMFCRibbonCategory::GetMaxHeight

 

CMFCRibbonCategory::GetName

 

CMFCRibbonCategory::GetPanel

Returns a pointer to the ribbon panel that is located at the specified index.

CMFCRibbonCategory::GetPanelCount

Returns the number of ribbon panels in the ribbon category.

CMFCRibbonCategory::GetPanelFromPoint

 

CMFCRibbonCategory::GetPanelIndex

Returns the index of the specified ribbon panel.

CMFCRibbonCategory::GetParentButton

 

CMFCRibbonCategory::GetParentMenuBar

 

CMFCRibbonCategory::GetParentRibbonBar

 

CMFCRibbonCategory::GetRect

 

CMFCRibbonCategory::GetSmallImages

Returns a reference to the list of small images that the category uses.

CMFCRibbonCategory::GetTabColor

Returns the current color of the ribbon category tab.

CMFCRibbonCategory::GetTabRect

 

CMFCRibbonCategory::GetTextTopLine

 

CMFCRibbonCategory::GetVisibleElements

Obtain all visible elements that belong to the ribbon category.

CMFCRibbonCategory::HighlightPanel

 

CMFCRibbonCategory::HitTest

 

CMFCRibbonCategory::HitTestEx

 

CMFCRibbonCategory::HitTestScrollButtons

 

CMFCRibbonCategory::IsActive

 

CMFCRibbonCategory::IsVisible

Determines whether the ribbon category is visible.

CMFCRibbonCategory::IsWindows7Look

Indicates whether the parent ribbon has Windows 7-style look (small rectangular application button)

CMFCRibbonCategory::NotifyControlCommand

 

CMFCRibbonCategory::OnCancelMode

 

CMFCRibbonCategory::OnDraw

 

CMFCRibbonCategory::OnDrawImage

 

CMFCRibbonCategory::OnDrawMenuBorder

 

CMFCRibbonCategory::OnKey

Called by the framework when a user presses a keyboard button.

CMFCRibbonCategory::OnLButtonDown

 

CMFCRibbonCategory::OnLButtonUp

 

CMFCRibbonCategory::OnMouseMove

 

CMFCRibbonCategory::OnRTLChanged

 

CMFCRibbonCategory::OnScrollHorz

 

CMFCRibbonCategory::OnUpdateCmdUI

 

CMFCRibbonCategory::RecalcLayout

 

CMFCRibbonCategory::ReposPanels

 

CMFCRibbonCategory::SetCollapseOrder

Defines the collapse order of the ribbon panels that are present in the ribbon category.

CMFCRibbonCategory::SetData

Stores the user defined data in the ribbon category.

CMFCRibbonCategory::SetKeys

Assigns a keytip to the ribbon category.

CMFCRibbonCategory::SetName

 

CMFCRibbonCategory::SetTabColor

Sets the color of the ribbon category.

Remarks

Typically, you create a ribbon category indirectly by calling CMFCRibbonBar::AddCategory, which returns a pointer to the newly created ribbon category. You add panels to the category by calling CMFCRibbonCategory::AddPanel.

The CMFCRibbonTab class draws ribbon categories. It is derived from CMFCRibbonBaseElement Class.

This following example demonstrates how to create a ribbon category and add a panel to it.

// Create a new ribbon category and get a pointer to it

CMFCRibbonCategory* pCategory = m_wndRibbonBar.AddCategory

(_T("&Write"), // Category name

IDB_WRITE, // Category small images (16 x 16)

IDB_WRITE_LARGE); // Category large images (32 x 32)

// Add a panel to the new category

CMFCRibbonPanel* pPanel = pCategory->AddPanel (

_T("Clipboard"), // Panel name

m_PanelIcons.ExtractIcon (0)); // Panel icon

The following diagram shows a figure of the Home category from the RibbonApp sample application.

CMFCRibbonCategory image

Inheritance Hierarchy

CObject

   CMFCRibbonCategory

Requirements

Header: afxribboncategory.h

See Also

Reference

Hierarchy Chart

CObject Class

Other Resources

MFC Classes