ISliderDrawHandler

The ISliderDrawHandler class draws slider and progress indicator control objects. You can draw the following:

To use this handler, you must create the slider or progress indicator with the handleDrawItem style specified, or you must set this style by using IProgressIndicator::enableDrawItem after the slider or progress indicator is created. See IProgressIndicator Styles for information about the handleDrawItem style and enableDrawItem for information about that function.

Create a handler derived from ISliderDrawHandler and attach it to a slider or progress indicator. You can do this by calling IHandler::handleEventsFor to pass the slider or progress indicator to the slider draw handler. See handleEventsFor for information about that function.

When the slider draw handler receives a slider draw event, it creates an IDrawItemEvent object and routes that object to the appropriate ISliderDrawHandler virtual function. Override these virtual functions to supply your own specialized processing of a slider draw event. See IDrawItemEvent for information about that class.

The return value from the virtual functions specifies whether the slider draw event should be passed on for additional processing, as follows:

Return Value :ddhd.Meaning
true
The slider draw event requires no additional processing. Do not pass it to another handler.
false
The slider draw event requires additional processing. Pass the slider draw event to the next handler for additional processing, as follows:
  • If there is another handler for the slider or progress indicator, pass the slider draw event to the next handler.
  • If this is the last handler for the slider or progress indicator, call the IWindow::dispatch function to dispatch the slider draw event to the slider's or progress indicator's owner window. See dispatch for information about that function.
  • If this is the last handler for the owner window, call the IWindow::defaultProcedure function to process the slider draw event. See defaultProcedure for information about that function.

AIX Considerations

Owner draw progress indicators and sliders are not supported in the AIX environment. This class is not available in that environment.

Windows Considerations

Owner draw progress indicators and sliders are only supported for IProgressIndicator::pmCompatible progress indicators and sliders in the Windows environment.


ISliderDrawHandler - Member Functions and Data by Group

Constructors & Destructor

You can construct and destruct objects of this class.


[view class]
~ISliderDrawHandler
public:
virtual ~ISliderDrawHandler()

Supported Platforms

Windows OS/2 AIX
Yes Yes No


[view class]
ISliderDrawHandler
public:
ISliderDrawHandler()

Used to construct objects of this class. This is the default constructor and accepts no parameters.

Supported Platforms

Windows OS/2 AIX
Yes Yes No


Event Dispatching

Event-dispatching members evaluate an event to determine if it is appropriate for this handler object to process it. If it is, it calls the virtual function used to process the event.


[view class]
dispatchHandlerEvent
protected:
virtual bool dispatchHandlerEvent(IEvent& event)

If a slider draw event is received, the appropriate virtual function is called.

Supported Platforms

Windows OS/2 AIX
Yes Yes No

Windows Considerations

In the Windows environment, only PM compatible progress indicators and sliders support the handleDrawItem style. This function will never be called for native Windows progress indicators and sliders.


Event Processing

Event-processing members must be supplied to process slider drawing events You can override these virtual members in a derived class.


[view class]
drawArm
protected:
virtual bool drawArm(IDrawItemEvent& event)

Draws the slider's arm. The application overrides this function to handle the drawing.

Supported Platforms

Windows OS/2 AIX
Yes Yes No

Windows Considerations

In the Windows environment, only PM compatible progress indicators and sliders support the handleDrawItem style. This function will never be called for native Windows progress indicators and sliders.


[view class]
drawBackground
protected:
virtual bool drawBackground(IDrawItemEvent& event)

Draws the slider's background. The application overrides this function to handle the drawing.

Supported Platforms

Windows OS/2 AIX
Yes Yes No

Windows Considerations

In the Windows environment, only PM compatible progress indicators and sliders support the handleDrawItem style. This function will never be called for native Windows progress indicators and sliders.


[view class]
drawRibbonStrip
protected:
virtual bool drawRibbonStrip(IDrawItemEvent& event)

Draws the slider's ribbon strip. The application overrides this function to handle the drawing.

Supported Platforms

Windows OS/2 AIX
Yes Yes No

Windows Considerations

In the Windows environment, only PM compatible progress indicators and sliders support the handleDrawItem style. This function will never be called for native Windows progress indicators and sliders.


[view class]
drawShaft
protected:
virtual bool drawShaft(IDrawItemEvent& event)

Draws the slider's shaft. The application overrides this function to handle the drawing.

Supported Platforms

Windows OS/2 AIX
Yes Yes No

Windows Considerations

In the Windows environment, only PM compatible progress indicators and sliders support the handleDrawItem style. This function will never be called for native Windows progress indicators and sliders.


ISliderDrawHandler - Inherited Member Functions and Data

Inherited Public Functions

IHandler

Inherited Public Data

Inherited Protected Functions

IHandler

Inherited Protected Data