Subclassing the Object Look-and-Feel Handler
Once the API of the object look-and-feel handler has been defined, you can implement various subclasses corresponding to different look-and-feel styles. For example, here we create the subclass of MyComponentLFHandler dedicated to the Motif look, the MyComponentMLFHandler class:
class MyComponentMLFHandler : public MyComponentLFHandler
{
MyComponentMLFHandler(IlvLookFeelHandler* lfh) :
MyComponentLFHandler(lfh) {}
...
virtual void draw(const MyComponent* object,
IlvPort* dst,
const IlvTransformer* t,
const IlvRegion* clip) const;
virtual IlBoolean handleEvent(MyComponent* object,
IlvEvent& event) const;
...
};
You need now to install your object look-and-feel handlers so that they will be used when the corresponding look and feel is set.
Published date: 05/24/2022
Last modified date: 02/24/2022