FLTK::AssociationType - Base class for the association type
Base class for the association type.
FLTK allows you to attach any kind of user data to a widget. This data is automatically freed when the widget to which it is attached is destroyed. Internally an association table is used to connect the widget pointer with the data pointer that is why all the functions concerned with this feature contain "association" in their name. The advantage of this is that no space is taken on widgets that do not contain the data (or that have the "default value"), and that the destructor code is not linked in if the association is not used.
To be able to associate data and to be able to have a customized way of freeing the data you need to derive from this class and then create an instance of that class. With the pointer to that instance the type of the data is identified.
Sanko Robinson <email@example.com> - http://sankorobinson.com/
Copyright (C) 2008-2010 by Sanko Robinson <firstname.lastname@example.org>
This program is free software; you can redistribute it and/or modify it under the terms of The Artistic License 2.0. See the LICENSE file included with this distribution or notes on the Artistic License 2.0 for clarification.
When separated from the distribution, all original POD documentation is covered by the Creative Commons Attribution-Share Alike 3.0 License. See the clarification of the CCA-SA3.0.