The ICircularSlider class provides a control to represent a circular slider, which allows a user to set, display, or modify a value by rotating the slider arm. The circular slider emulates the actual controls of stereo and video components.
You can use a circular slider to allow users to control the balance, bass, volume, and treble. If they click on one of the tick marks, then the circular slider rotates to the new position. Or they can grab the slider arm with the mouse and rotate it. The circular slider also has plus and minus buttons for moving the slider arm.
Use the ISliderArmHandler class to process the events that are generated as the user is rotating the circular slider or when the user stops rotating the circular slider. This position change event is also generated when the user just clicks on one of the tick marks.
And finally, use the
IFocusHandler class to process any focus changes.
The following figure shows an ICircularSlider with the default, midpoint, and circular arm styles.
The following figure shows an ICircularSlider with the default and proportional ticks styles.
There are restrictions for specifying the color of controls based on the platform and which style of control you use.
You must install the Multimedia Presentation Manager to use ICircularSlider under the OS/2 2.1 operating system.
You can construct and destruct objects of this class.
![]() |
public:
virtual ~ICircularSlider()
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
ICircularSlider( unsigned long Identifier, IWindow* parent, IWindow* owner, const IRectangle& initial = IRectangle ( ), const Style& style = defaultStyle ( ) )
You can construct objects of this class from the following:
We recommend that you do one of the following:
Windows | OS/2 | AIX |
Yes | Yes | No |
The window identifier is limited to the range 0 through 65535. The owner window is primarily used for routing notification events and unprocessed messages. The OS/2 operating system also uses the owner window chain to inherit colors.
public:
ICircularSlider( unsigned long Identifier, IWindow* parentAndOwner )
You can construct objects of this class from the following:
We recommend that you do one of the following:
Windows | OS/2 | AIX |
Yes | Yes | No |
The window identifier is limited to the range 0 through 65535. The owner window is primarily used for routing notification events and unprocessed messages. The OS/2 operating system also uses the owner window chain to inherit colors.
public:
ICircularSlider(const IWindowHandle& handle)
You can construct an object of this class by specifying a window handle.
Windows | OS/2 | AIX |
Yes | Yes | No |
Use these functions to set and query attributes
![]() |
public:
IRange armRange() const
Returns the range of values over which the arm can be moved. This range contains the minimum and maximum value of the circular slider.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
unsigned long radius() const
Returns the radius of the dial in pixels. This value is indirectly set by sizing the control.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
unsigned long rotationIncrement() const
Returns the increment that the arm is rotated. This is the number by which the current value is incremented or decremented when the user selects one of the circular slider increment or decrement buttons.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
ICircularSlider& setArmRange(const IRange& range)
Sets the range of values over which the arm can be rotated. This range contains the minimum and maximum value of the circular slider. The values returned to the circular slider are based on the position of the arm inside of this range. If you set a range of 0 to 100 and the arm is in the middle, then calling value returns 50 as the current value. The circular slider supports a minimum value of -32K and a maximum value of 32K.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
Sets the bitmaps used for decrement buttons of the circular slider. They are on the left-hand side of the slider.
public:
ICircularSlider& setDecrementBitmaps( const IResourceId& leftUp, const IResourceId& leftDown )
Use this function to load the bitmaps from the resource file.
Windows | OS/2 | AIX |
Yes | Yes | No |
public:
ICircularSlider& setDecrementBitmaps( const IBitmapHandle& leftUp, const IBitmapHandle& leftDown )
Use this function if you have bitmap handles.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
Sets the bitmaps used for increment buttons of the circular slider. They are on the right-hand side of the slider.
public:
ICircularSlider& setIncrementBitmaps( const IBitmapHandle& rightUp, const IBitmapHandle& rightDown )
Use this function if you have bitmap handles.
Windows | OS/2 | AIX |
Yes | Yes | No |
public:
ICircularSlider& setIncrementBitmaps( const IResourceId& rightUp, const IResourceId& rightDown )
Use this function to load the bitmaps from the resource file.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
ICircularSlider& setRotationIncrement( unsigned long increment )
Sets the scroll increment. This is the number by which the current value of the circular slider is incremented or decremented when the user selects one of the circular slider increment or decrement buttons.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
ICircularSlider& setTickSpacing(unsigned long tick)
Sets the tick mark increment of the control. This represents the value between the tick marks around the circular slider.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
ICircularSlider& setValue(long value)
Sets the value of the circular slider. This value must be within the current range. The position of the arm is rotated to this value.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
unsigned long tickSpacing() const
Returns the increment used to draw the tick marks. This represents the value between the tick marks around the circular slider.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
long value() const
Returns the current value of the circular slider. This value is based on where the arm is within the current range.
Windows | OS/2 | AIX |
Yes | Yes | No |
These members are called when the circular slider is put into a canvas. The canvas uses the minimum size to calculate how small the circular slider can be when it is displayed.
![]() |
protected:
virtual ISize calcMinimumSize() const
Returns an ISize that indicates the minimum size that the circular slider can be. This is used by the ICanvas hierarchy of classes. The minimum size also uses the current font and circular slider text in its calculations.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
This INotificationId string is used for all notifications that ICircularSlider provides to its observers.
![]() |
public:
static INotificationId const trackId
Notification identifier provided to observers when the circular slider is manipulated with the mouse. ICircularSlider provides the current value in the INotificationEvent::eventData field of the INotificationEvent.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
static INotificationId const valueId
Notification identifier provided to observers when the value of the circular slider control changes. ICircularSlider provides the new value in the INotificationEvent::eventData field of the INotificationEvent.
Windows | OS/2 | AIX |
Yes | Yes | No |
Observer notification members implement the public INotifier protocol for the ICircularSlider class.
![]() |
public:
virtual ICircularSlider& enableNotification( bool enable = true )
Enables the circular slider control to send notifications to any observer objects.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these style members to set and query circular slider styles, the default style for this class, and to convert the style into a form that is recognizable to the underlying GUI. You can use these styles with the styles in the IWindow Styles class.
![]() |
public:
virtual unsigned long convertToGUIStyle( const IBitFlag& style, bool extendedOnly = false ) const
Converts a style object into a value appropriate for the presentation system. The default action is to return the base GUI styles for the platform. Extended styles, those defined by the application and the Open Class Library, are returned if you set extendedOnly to true.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static Style defaultStyle()
Returns the current default style. This is the same as classDefaultStyle unless setDefaultStyle has been called.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
static void setDefaultStyle(const Style& style)
Sets the default style for all subsequent circular sliders.
This member function is not thread safe. In a multithreaded application, it should only be called when a conflict is not possible. A conflict can arise if you set the default style on one thread at the same time that it is being queried on another. In this situation, the query would take place while the style is in an unknown state.
When you create a window class and do not specifically specify window styles in the constructor, the Open Class Library queries the default style. Therefore, the only safe place to call this member function is when no other application threads that create windows are active.
Another way to avoid a conflict in a multithreaded application is to specifically specify window styles on window construction, rather than calling this member function.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
static const Style buttons
Displays increment and decrement buttons.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
static const Style circularArm
Draws a small circle for the arm, rather than a line.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
static const Style classDefaultStyle
Specifies the original default style for this class, which is IWindow::visible.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
static const Style displayValue
Displays the value on the dial.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
static const Style full360
Permits the rotational range to extend 360 degrees. This forces the displayValue style to be off, which keeps the slider arm from corrupting the number value.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
static const Style jumpToPointer
Causes the circular slider to change immediately (jump) to the value indicated by the position of the mouse. If this style is not present, then the circular slider rotates by the rotational increment to the value indicated by the position of the mouse
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
static const Style label
Displays title text below the dial.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
static const Style midpoint
Makes the midpoint tick mark larger. This tick mark is not visible if the noTicks style is set.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
static const Style noTicks
Turns off the tick marks.
Windows | OS/2 | AIX |
Yes | Yes | No |
![]() |
public:
static const Style proportionalTicks
Allows the length of the tick marks to be calculated as a percentage of the radius; otherwise, they are set to a fixed length.
Windows | OS/2 | AIX |
Yes | Yes | No |
virtual ~IControl()
virtual ~INotifier()
virtual INotifier& disableNotification() = 0
virtual INotifier& enableNotification( bool enable = true ) = 0
INotifier()
virtual bool isEnabledForNotification() const = 0
virtual INotifier& notifyObservers( const INotificationEvent& event ) = 0
virtual INotifier& notifyObserversAsync( const INotificationEvent& event )
const IThreadId& threadId() const
virtual ~ITextControl()
static bool clipboardHasTextFormat()
virtual ISize displaySize(const char* text = 0) const
virtual ITextControl& setLayoutDistorted( unsigned long layoutAttributeOn, unsigned long layoutAttributeOff )
virtual ITextControl& setText(const char* text)
virtual ITextControl& setText(const IResourceId& text)
virtual IString text() const
virtual unsigned long textLength() const
virtual ~IWindow()
IAccelTblHandle acceleratorHandle() const
IAcceleratorTable acceleratorTable() const
virtual IColor activeColor() const
IWindow& addOrReplaceAttribute( const IAttributeName& name, const IAttribute& attribute )
IWindow& adoptWindowData( const DataHandle& typeToken, IWindowData* windowData )
virtual IString asDebugInfo() const
virtual IString asString() const
IAttributeName attributeNameAt( const AttributeCursor& cursor ) const
const IAttribute* attributeWithName( const IAttributeName& name, ESearchType search = kWindowOnly ) const
virtual IColor backgroundColor() const
virtual IWindow& capturePointer(bool capture = true)
ISize characterSize() const
IWindowHandle childAt(const ChildCursor& cursor) const
IWindow* childWindowAt(const ChildCursor& cursor) const
virtual IArgList convertToArgList( const IBitFlag& style ) const
static DataHandle dataHandleWithKey( const char* dataKeyName )
virtual IWindowHandle defaultEmphasisButton() const
static SiblingOrder defaultOrdering()
virtual IWindowHandle defaultPushButton() const
static IWindow* desktopWindow()
virtual IWindow& disable()
virtual IColor disabledBackgroundColor() const
virtual IColor disabledForegroundColor() const
virtual IWindow& disableGroup()
IWindow& disableMinimumSizeCaching()
virtual IWindow& disableNotification()
virtual IWindow& disableTabStop()
virtual IWindow& disableUpdate()
bool dispatchRemainingHandlers( IEvent& event, bool callDefProc = true )
virtual IWindow& enable(bool enableWindow = true)
virtual IWindow& enableGroup(bool enable = true)
IWindow& enableMinimumSizeCaching( bool enableCaching = true )
virtual IWindow& enableNotification(bool enable = true)
virtual IWindow& enableTabStop(bool enable = true)
virtual IWindow& enableUpdate(bool enableWindow = true)
static IWindow::ExceptionFn* exceptionFunction()
virtual IFont font() const
virtual IColor foregroundColor() const
virtual IWindowHandle handle() const
virtual bool handleException( IException& dispatcherException, IEvent& exceptionEvent )
virtual IWindowHandle handleForChildCreation() const
static IWindowHandle handleWithParent( unsigned long identifier, const IWindowHandle& parent )
static IWindowHandle handleWithPointerCaptured()
virtual bool hasFocus() const
virtual bool hasPointerCaptured() const
unsigned long helpId() const
virtual IWindow& hide()
virtual IWindow& hideSourceEmphasis()
virtual IColor hiliteBackgroundColor() const
virtual IColor hiliteForegroundColor() const
virtual unsigned long id() const
virtual IColor inactiveColor() const
virtual IRectangle invalidatedRect() const
virtual IRegionHandle invalidatedRegion() const
bool isAutoDeleteObject() const
bool isAutoDestroyWindow() const
bool isEnabled() const
virtual bool isEnabledForNotification() const
virtual bool isFrameWindow() const
virtual bool isGroup() const
bool isHandling(const EventMask& events) const
virtual bool isLayoutDistorted( unsigned long layoutAttribute ) const
bool isMinimumSizeCachingEnabled() const
bool isShowing() const
virtual bool isTabStop() const
bool isUpdateEnabled() const
virtual bool isValid() const
bool isVisible() const
static bool isWindowValid(const IWindow* window)
IDMItemProvider* itemProvider() const
IWindow(const IWindowHandle& handle)
IWindow(unsigned long identifier, IWindow* parent)
virtual IRectangle layoutAdjustment() const
static IPoint mapPoint( const IPoint& point, const IWindowHandle& from, const IWindowHandle& to )
virtual IWindowHandle matchForMnemonic( unsigned short character ) const
IMessageQueueHandle messageQueue() const
ISize minimumSize(bool windowCalculatedSize = false) const
virtual IPointerHandle mousePointer() const
static void movePointerTo(const IPoint& position)
virtual IWindow& moveSizeTo( const IRectangle& newSizeAndPosition )
virtual IWindow& moveTo(const IPoint& newPosition)
virtual IRectangle nativeRect() const
virtual INotifierAddress notifierAddress() const
virtual IWindow& notifyObservers( const INotificationEvent& event )
virtual IWindow& notifyObserversAsync( const INotificationEvent& event )
static IWindow* objectWindow()
virtual IWindow* owner() const
IWindow* parent() const
static ISize parentSize(const IWindowHandle& windowHandle)
virtual ISize parentSize() const
static IPoint pointerPosition()
virtual IPoint position() const
virtual IWindow& positionBehindSibling( const IWindowHandle& siblingWindow )
virtual IWindow& positionBehindSiblings()
virtual IWindow& positionOnSiblings()
virtual const IWindow& postEvent( EventType eventType, const IEventParameter1& parm1 = 0, const IEventParameter2& parm2 = 0 ) const
virtual const IWindow& postEvent(const IEvent& event) const
virtual const IWindow& postEvent( unsigned long eventId, const IEventParameter1& parm1 = 0, const IEventParameter2& parm2 = 0 ) const
virtual IPresSpaceHandle presSpace() const
virtual IRectangle rect() const
virtual IWindow& refresh( const IRectangle& invalidRectangle, bool immediate = false )
virtual IWindow& refresh(RefreshType type = paintAll)
virtual IWindow& releasePointer()
virtual void releasePresSpace( const IPresSpaceHandle& presentationSpaceHandle ) const
IWindow& removeAllAttributes()
IWindow& removeAttribute(const IAttributeName& name)
virtual IWindow& resetActiveColor()
virtual IWindow& resetBackgroundColor()
virtual IWindow& resetDisabledBackgroundColor()
virtual IWindow& resetDisabledForegroundColor()
virtual IWindow& resetFont()
virtual IWindow& resetForegroundColor()
virtual IWindow& resetHiliteBackgroundColor()
virtual IWindow& resetHiliteForegroundColor()
virtual IWindow& resetInactiveColor()
IWindow& resetMinimumSize()
virtual IWindow& resetShadowColor()
virtual IEventResult sendEvent(const IEvent& event) const
virtual IEventResult sendEvent( unsigned long eventId, const IEventParameter1& parm1 = 0, const IEventParameter2& parm2 = 0 ) const
virtual IEventResult sendEvent( EventType eventType, const IEventParameter1& parm1 = 0, const IEventParameter2& parm2 = 0 ) const
IWindow& setAcceleratorHandle( const IAccelTblHandle& handle )
IWindow& setAcceleratorTable( const IAcceleratorTable* acceleratorTable )
virtual IWindow& setActiveColor(const IColor& color)
IWindow& setAutoDeleteObject(bool autoDelete = true)
IWindow& setAutoDestroyWindow(bool autoDestroy = false)
virtual IWindow& setBackgroundColor(const IColor& color)
static void setDefaultOrdering(SiblingOrder order)
virtual IWindow& setDisabledBackgroundColor( const IColor& color )
virtual IWindow& setDisabledForegroundColor( const IColor& color )
static IWindow::ExceptionFn* setExceptionFunction( IWindow::ExceptionFn* exceptionFunction )
virtual IWindow& setFocus()
virtual IWindow& setFont(const IFont& font)
virtual IWindow& setForegroundColor(const IColor& color)
IWindow& setHelpId(unsigned long helpTopicId)
virtual IWindow& setHiliteBackgroundColor( const IColor& color )
virtual IWindow& setHiliteForegroundColor( const IColor& color )
virtual IWindow& setId(unsigned long newIdentifier)
virtual IWindow& setInactiveColor(const IColor& color)
IWindow& setItemProvider(IDMItemProvider* dragProvider)
virtual IWindow& setLayoutDistorted( unsigned long layoutAttributesOn, unsigned long layoutAttributesOff )
IWindow& setMinimumSize(const ISize& size)
virtual IWindow& setMousePointer( const IPointerHandle& mousePointer )
virtual IWindow& setOwner(const IWindow* newOwner)
virtual IWindow& setParent(const IWindow* newParent)
virtual IWindow& setShadowColor(const IColor& color)
virtual IColor shadowColor() const
virtual IWindow& show(bool showWindow = true)
virtual IWindow& showSourceEmphasis(bool show = true)
virtual ISize size() const
virtual IWindow& sizeTo(const ISize& newSize)
IWindow& startHandling(const EventMask& events)
IWindow& stopHandling(const EventMask& events)
virtual IWindow& validateRect( const IRectangle& validatedRectangle )
virtual IWindow& validateRegion( const IRegionHandle& validatedRegion )
virtual IRectangle visibleRectangle() const
IWindowData* windowData(const DataHandle& typeToken) const
static IWindow* windowWithHandle( const IWindowHandle& windowHandle, bool allThreads = true )
static IWindow* windowWithOwner( unsigned long identifier, const IWindow* owner, bool allThreads = true )
static IWindow* windowWithParent( unsigned long identifier, const IWindow* parent, bool allThreads = true )
static INotificationId const activeColorId
static const EventMask allMouseMoves
static INotificationId const attributeAddReplaceId
static INotificationId const attributeRemoveId
static INotificationId const backgroundColorId
static INotificationId const borderColorId
static const Style clipChildren
static const Style clipSiblings
static const Style clipToParent
static INotificationId const commandId
static const Style disabled
static INotificationId const disabledBackgroundColorId
static INotificationId const disabledForegroundColorId
static INotificationId const enableId
static INotificationId const focusId
static INotificationId const fontId
static INotificationId const foregroundColorId
static const Style group
static INotificationId const hiliteBackgroundColorId
static INotificationId const hiliteForegroundColorId
static INotificationId const inactiveColorId
static const Style leftToRight
static const EventMask mouseEntersLeaves
static const Style noStyle
static INotificationId const positionId
static const Style rightToLeft
static const Style saveBits
static INotificationId const shadowColorId
static INotificationId const sizeId
static const EventMask someMouseMoves
static const Style synchPaint
static INotificationId const systemCommandId
static const Style tabStop
static const Style visible
static INotificationId const visibleId
static INotificationId const allChangesId
static INotificationId const deleteId
static INotificationId const textId
IWindow& addHandler(IHandler* newHandler)
virtual IWindow& addObserver( IObserver& observer, const IInterest& interest )
static void addToWindowSet( IWindow* window, const IWindowHandle& windowHandle )
IWindow& bindMessageQueue(bool bindToMessageQueue = true)
IColor color(unsigned long colorArea) const
IColor color( unsigned long colorArea, const IColor& defaultColor ) const
virtual IWindowHandle create( unsigned long id, const char* text, const IBitFlag& style, const char* windowClass, const IWindow* parent, const IWindow* owner, const IRectangle& initRect, const void* ctlData, const void* presParams, IWindow::SiblingOrder ordering = defaultOrdering ( ) )
virtual IWindowHandle create( unsigned long id, const char* text, unsigned long style, IXmCreateFunction createFunction, const IWindowHandle& parent, const IWindowHandle& owner, const IRectangle& initRect, const void* callerArgList, unsigned int callerNumberArguments, IWindow::SiblingOrder ordering = defaultOrdering ( ), unsigned long extendedStyle = 0 )
virtual IWindowHandle create( unsigned long id, const char* text, unsigned long style, const char* windowClass, const IWindowHandle& parent, const IWindowHandle& owner, const IRectangle& initRect, const void* ctlData, const void* presParams, IWindow::SiblingOrder ordering = defaultOrdering ( ), unsigned long extendedStyle = 0 )
virtual IWindowHandle create( unsigned long id, const char* text, const IBitFlag& style, IXmCreateFunction createFunction, const IWindow* parent, const IWindow* owner, const IRectangle& initRect, IWindow::SiblingOrder ordering = defaultOrdering ( ) )
IWindow& defaultProcedure(IEvent& event)
bool deleteIsInProcess() const
bool dispatch(IEvent& event)
virtual unsigned long extendedStyle() const
bool isBoundToMessageQueue() const
virtual bool isDragStarting(IEvent& event)
bool isPrimaryWindow() const
bool isUserWindowWordReserved() const
IWindow()
IWindowNotifyHandler* notificationHandler() const
virtual IWindow& notifyObservers( const INotificationId& notification )
IObserverList& observerList( const IInterest* interest = 0 ) const
virtual bool passEventToOwner(IEvent& event)
virtual IWindow& prepareForUse( const IWindowHandle& windowHandle )
virtual IWindow& removeAllObservers()
static void removeFromWindowSet(IWindow* window)
IWindow& removeHandler(IHandler* oldHandler)
virtual IWindow& removeObserver( IObserver& observer, const IInterest& interest )
virtual IWindow& removeObserver(IObserver& observer)
IWindow& reserveUserWindowWord(bool reserve = true)
virtual IWindow& resetColor(unsigned long colorArea)
ISize savedMinimumSize() const
IWindow& saveMinimumSize(const ISize& size)
virtual IWindow& setBidiSettings( const IBidiSettings& bidiSettings, bool childInherit, bool refresh )
virtual IWindow& setColor( unsigned long colorArea, const IColor& color )
virtual IWindow& setDefaultEmphasisButton( const IWindowHandle& defaultEmphasisButton, bool enable )
virtual IWindow& setDefaultPushButton( const IWindowHandle& defaultPushButton )
virtual IWindow& setExtendedStyle( unsigned long extendedStyle )
IWindow& setNotificationHandler( IWindowNotifyHandler* notifyHandler )
virtual IWindow& setStyle(unsigned long style)
IWindow& setWindowData(long index, unsigned long dataValue)
IWindow& setWindowData( long index, unsigned short dataValue )
IWindow& startHandlingEventsFor( unsigned long identifier, IWindow* parent )
IWindow& startHandlingEventsFor( const IWindowHandle& windowHandle )
virtual unsigned long style() const
IWindow& unbindMessageQueue()
unsigned long windowULong(long index) const
unsigned short windowUShort(long index) const
virtual INotifier& addObserver( IObserver& observer, const IInterest& interest )
virtual INotifier& notifyObservers( const INotificationId& id ) = 0
virtual IObserverList& observerList( const IInterest* anInterest = 0 ) const = 0
virtual INotifier& removeAllObservers() = 0
virtual INotifier& removeObserver( IObserver& observer, const IInterest& interest )
virtual INotifier& removeObserver(IObserver& observer) = 0
IControl()
ITextControl()