Subclassing the Component Object Look-and-Feel Handler
To change the look and feel of a component, you must first identify its object look-and-feel handler base class. Usually, the component class and its object look-and-feel handler are declared in the same header file, and the name of the object look-and-feel handler class is the concatenation of the component class name with the string “LFHandler”. For example, both the IlvButton and IlvButtonLFHandler classes are located in the <ilviews/gadgets/button.h> header file.
Once you have found the object look-and-feel handler base class, you must look closely at its API to find which of the virtual member functions need to be overridden.
The following example is a subclass of the IlvButtonLFHandler where the drawBackground member function has been redefined:
class MyButtonLFHandler : public IlvButtonLFHandler { ... virtual void drawBackground(const IlvButton* button, IlvPort* dst, const IlvTransformer* t, const IlvRegion* clip) const; ... }; |