BCGControlBar Pro for MFC

Detailed Description

The CBCGPPropList object implements the functionality of a list control that displays the hierarchical list of editable properties. Each property can represent various types and contain sub-items. It's possible to enable a resizable description area at the bottom of a property list control to display a description for selected properties.

Property List control supports "commands" - an additional area at the bottom of Property List with "links". The list of commands can be content dependent - just call SetCommands() and ClearCommands() to display the commands or remove them.

Below are two pictures of the property list control working in hierarchical and alphabetic modes:

To use a property list control in the application just construct a CBCGPPropList object and call CBCGPPropList::Create. Then, you can begin adding items using CBCGPPropList::AddProperty. All properties have the same base class CBCGPProp.

The library has several "predefined" property types:

In addition, the Property List control supports context menu, built-in toolbar with predefined buttons and built-in search box.

You need to process BCGM_PROPERTY_MENU_ITEM_SELECTED registered message to handle custom context menu commands.

Inherits CBCGPWnd, and CBCGPCtrlPlaceHolderHelper.

Public Member Functions

 CBCGPPropListConstructs a property list object.
 AddPropertyAdds a new property to a property list control.
 AdjustLayoutAdjusts layout of the list properties.
 AreCommandsVisibleTells whether property list commands are visible, or hidden.
 ClearCommandsClears the list of Property List commands.
 CloseColorPopupCloses the color selection popup control.
 CommitModifiedValuesMakes the current values default.
 CreateCreates a window and attaches it to a property list object.
 DeletePropertyDeletes the specified property from the property list.
 EditItemCalled by the framework when the user begins to edit a property list item (property).
 EnableAutoHideScrollBarScpecifies whether control's scroll bar should be hidden when scroll bar is inactive (mouse cursor is located outside of scrollbar).
 EnableContextMenuEnables or disables context menu.
 EnableDescriptionAreaEnables the description area shown under the list of properties.
 EnableGridLinesSpecifies whether grid lines should be drawn.
 EnableHeaderCtrlEnables or disables the header control at the top of the property list control.
 EnablePropertyEnables or disables a property.
 EnableSearchBoxShows or hides a search box.
 EnableToolBarShows or hides a toolbar displayed at the top of property list.
 EnableVerticalScrollBarEnables or disables the vertical scroll bar.
 EndEditItemCalled by the framework when the user has finished to edit a property.
 EnsureVisibleScrolls a property list to make the specified property visible.
 ExpandAllExpands or collapses all property list nodes.
 ExportToXMLFileExport properties to external XML file.
 FindItemByDataReturns a property according to the used-defined DWORD value associated with the property.
 FindItemByIDFinds a property by ID.
 GetBooleanPropertiesStyleGets a boolean properties style.
 GetButtonsAppearanceReturns property buttons appearance.
 GetCommandTextColorReturns color of command text (text displayed in the "commands" area).
 GetCurSelReturns the currently selected property.
 GetCustomColorsRetrieves custom colors defined for the property list elements.
 GetDescriptionHeightReturns the height of the description area located at the bottom of the property list control.
 GetHeaderHeightReturns the height of the property list control header.
 GetItemButtonColorReturns background color of the item's button.
 GetItemMenuFlagsReturns context menu flags.
 GetListRectReturns the bounding rectangle of the property list.
 GetPropertyReturns a property list control property according to the specified index.
 GetPropertyColumnWidthReturns the current width of the column containing properties (right column).
 GetPropertyCountReturns the number of properties in a property list control.
 GetRowHeightReturns the height of a row in the property list control.
 GetRowPaddingObtain row vertical padding.
 GetScrollBarCtrlReturns a pointer to the scroll bar control.
 GetScrollBarsStyleReturns the current scroll bar style.
 HasCommandsTells whether the Property list displays commands in the "commands" area.
 HasHorizontalGridLinesTells whether grid horizontal lines should be drawn.
 HasVerticalGridLinesTells whether grid vertical lines should be drawn.
 HitTestGiven a point (in the client coordinates) returns a pointer to a property and the property area.
 IsAlphabeticModeTells whether a property list control is in alphabetic mode or not.
 IsAlternateRowColorTells whether alternate row colors are enabled.
 IsButtonsDefaultThemeTells whether the property button is displayed using Windows default theme.
 IsContextMenuEnabledTells whether property list context menu is enabled or not.
 IsDescriptionAreaTells whether the description area is shown or not.
 IsHeaderCtrlTells whether the header control is present or not.
 IsMarkModifiedPropertiesTells how the property list displays modified properties.
 IsPropManagerNotifyChangesOnLoadTells whether CBCGPPropertyManager::OnPropertyChanged() method is called when value loaded from the registry is not default.
 IsScrollBarAutoHideEnabledTells whether control's scroll bars are auto-hidden.
 IsSearchBoxTells whether property search box is displayed or not.
 IsToolBarTells whether property list toolbar is displayed, or not.
 IsVerticalScrollBarEnabledTells whether a vertical scroll bar is enabled.
 IsVSDotNetLookTells whether the property list control is displayed using VS.NET look & feel.
 MarkModifiedPropertiesTells the property list how to display modified properties.
 OnChangeSelectionCalled by the framework when the current selection is being changed.
 OnClickButtonCalled by the framework when a property button has been clicked.
 OnDrawPaletteColorBoxCalled by the framework when the palette color box should be drawn.
 OnDrawPropertyCalled by the framework to display a property.
 OnPropertyChangedCalled by the framework when the value of a property has changed.
 RedrawPropertyRedraw the specified property.
 RemoveAllRemoves all property objects from a property list control.
 ResetOriginalValuesRestores original values.
 SelectPropertyOptionSelect the property option by index.
 SetAlphabeticModeSets or unsets the alphabetic mode.
 SetAlternateRowColorEnables/disables drawing odd/even grid rows using different colors.
 SetBooleanPropertiesStyleSets a boolean properties style.
 SetBoolLabelsSpecifies the textual representation of boolean labels.
 SetButtonsAppearanceSpecifies property buttons appearance.
 SetButtonsDefaultThemeEnables or disables property buttons default (Windows) theme.
 SetCommandsSpecifies the list o commands (links) to display in the "commands" area.
 SetCommandsVisibleShows or hides property list commands.
 SetCommandTextColorSpecifies color of command text (text displayed in the "commands" area).
 SetCurSelSelects a property in a property list control.
 SetCustomColorsAllows to customize the property list appearance by setting custom colors for all property list elements.
 SetCustomMenuItemsAdds custom menu items to context menu.
 SetItemButtonColorSpecifies background color of the item's button.
 SetItemMenuFlagsAllows to show or hide predefined context menu items on the fly.
 SetListDelimiterDefines a character to be used as a delimiter in the list of property values.
 SetRowPaddingSpecifies row vertical padding.
 SetScrollBarsStyleSets scroll bar style
 SetVSDotNetLookEnables or disables VS.NET look & feel.
 UpdateBrushPropertyUpdates a brush property with a new value.
 UpdateColorUpdates the property color value.
 UpdateColorPropertyUpdates a color property with a new value.
 UpdateDateTimePropertyUpdates a date time property with a new value.
 UpdateFontPropertyUpdates font property.
 UpdatePropertyUpdates a property value.
 UpdateTextFormatPropertyUpdates the text format property with a new value.
 ValidateItemDataCalled by the framework to validate a property data.

Protected Member Functions

 ComparePropsCalled by the property list control when it needs to sort properties.
 InitCalled by the framework when a property list control is being initialized.
 OnDrawBorderCalled by the framework to draw a border around a property list control.
 OnDrawDescriptionCalled by the framework to draw the description area and display the description text.
 OnDrawListCalled by the framework to display the list of properties.
 OnSelectComboCalled by the framework as a notification that a property containing a combo box has been selected.