BCGControlBar Pro for MFC
CBCGPSwitchImpl

Detailed Description

The CBCGPSwitchImpl class implements functionality of the switch control. The switch is an interactive gauge which implements "On/Off" functionality (similar to Win32 check box control). The Switch control has the following features:

  • Horizontal or vertical orientations.
  • Various shapes such as rectangular or circular.
  • Text label for each control state.
  • Custom images.
+ Inheritance diagram for CBCGPSwitchImpl:

Public Types

enum  BCGP_SWITCH_STYLE
 
- Public Types inherited from CBCGPGaugeImpl
enum  BCGP_SUB_GAUGE_POS
 
- Public Types inherited from CBCGPAnimationManager
enum  BCGPAnimationType
 

Public Member Functions

 CBCGPSwitchImplConstructor.
 
 EnableOnOffLabelsSpecifies whether text labels are enabled
 
 GetAnimationTimeReturns a thumb transition effect time (in milliseconds).
 
 GetColorsGets the switch colors.
 
 GetLabelGets a text label of specified state.
 
 GetLabelTextFormatGets text label format.
 
 GetStyleGets the switch style.
 
 IsDrawTextLabelsTells whether the text labels are enabled.
 
 IsFocusRectTells whether the switch has a focus rectangle.
 
 IsOnTells whether the switch has an "On" (checked) state.
 
 IsVisualManagerThemeTells whether gauge was created with a visual manager theme.
 
 SetAnimationTimeSpecifies a thumb transition effect time (in milliseconds).
 
 SetColorsSets the switch colors.
 
 SetFocusRectSpecifies whether the focus rectangle should be drawn.
 
 SetLabelSets a custom text label for specific switch state.
 
 SetLabelTextFormatSets text label format.
 
 SetOnModifies the switch's state.
 
 SetStyleSets a style.
 
 SetVisualManagerThemeSets the visual manager theme.
 
- Public Member Functions inherited from CBCGPStaticGaugeImpl
 CBCGPStaticGaugeImplConstructor.
 
 StartFlashingBegins flash animation.
 
 StopFlashingStops animation.
 
- Public Member Functions inherited from CBCGPGaugeImpl
 AddColoredRangeAdds a new colored range to a gauge.
 
 AddColoredRangeAdds a new colored range to a gauge.
 
 AddLevelBarAdds a new level bar to a gauge.
 
 AddLevelBarAdds a new level bar to a gauge.
 
 GetColoredRangeReturns a colored range for a scale.
 
 GetFrameSizeGets a gauge frame size (in pixels)
 
 GetLevelBarReturns a level bar for a scale.
 
 GetLevelBarsCountGets level bars count.
 
 GetScaleReturns a scale for a gauge.
 
 RemoveAllColoredRangesRemoves all colored ranges.
 
 RemoveAllLevelBarsRemoves all level bars.
 
 RemoveAllScalesRemoves scales.
 
 RemoveLevelBarRemoves the level bar.
 
 RemoveScaleRemoves a scale.
 
 SetFrameSizeSets a gauge frame size (in pixels).
 
 SetScaleOffsetFromFrameSets the scale offset from the gauge frame.
 
 SetTickMarkStyleSpecifies the gauge tick mark style.
 
 SetValueSets value for the specified scale.
 
- Public Member Functions inherited from CBCGPBaseVisualObject
 CBCGPBaseVisualObjectConstructor.
 
 CBCGPBaseVisualObjectCopy constructor.
 
 CopyToClipboardCopies visual object to the Clipboard.
 
 EnableImageCacheEnables or disables visual object image cache.
 
 ExportToBitmapExports the visual object to bitmap.
 
 ExportToFileExports the visual object to a file (BMP or PNG).
 
 ExportToImageExports the visual object to an image.
 
 GetDataGets an internal data object.
 
 GetDataAnimationTypeGets data animation type.
 
 GetDataCountReturns a number of data objects.
 
 GetEditFlagsGets editing flags.
 
 GetIDGets the object identifier.
 
 GetNameGets the object name.
 
 GetParentContainerGets the parent visual container.
 
 GetRectGets the object bounding rectangle.
 
 GetSelectedThemeObtain a currently selected visual theme.
 
 GetUserDataGets user-defined data associated with this object.
 
 GetValueGets the object value.
 
 IsAutoDestroyTells whether this object will be destroyed automatically.
 
 IsEditModeTells whether this object has the edit mode.
 
 IsEnabledTells whether the visual object is enabled.
 
 IsImageCacheTells whether image cache is enabled for this object.
 
 IsSelectedTells whether this object is selected in the parent container.
 
 IsVisibleTells whether the visual object is visible.
 
 RedrawRedraws this object.
 
 RedrawRectRedraws a specified rectangle.
 
 SetAutoDestroySpecifies whether the object should be destroyed automatically.
 
 SetDataAnimationTypeSets data animation type.
 
 SetDirtyInvalidates and redraws a visual object.
 
 SetEditFlagsSets editing flags.
 
 SetIDSets the object identifier.
 
 SetNameSets an object name.
 
 SetRectSets a new bounding rectangle.
 
 SetSelectedSelects or unselects the object in the parent container.
 
 SetUserDataSets user-defined data associated with this object.
 
 SetVisibleShows or hides the visual object.
 
- Public Member Functions inherited from CBCGPAnimationManager
 CBCGPAnimationManagerDefault constructor.
 
 GetAnimatedValueGets current animated value.
 
 GetAnimationDurationGets animation duration.
 
 GetLastAnimationErrorGets the animation error returned by recent call to Windows Animation API.
 
 IsAnimatedChecks if animation is running.
 
 StartAnimationStarts an animation.
 
 StartFlashAnimationStarts "flash" animation.
 
 StopAnimationStops an animation.
 

Additional Inherited Members

- Static Public Member Functions inherited from CBCGPAnimationManager
 IsAnimationSupportedByOSChecks if animation is supported by OS.
 
- Protected Member Functions inherited from CBCGPAnimationManager
 OnAnimationIdleCalled by the framework in an animation idle time.