A pen list is a list containing all pens which have been created. There is only one instance of this class: wxThePenList. Use this object to search for a previously created pen of the desired type and create it if not already found. In some windowing systems, the pen may be a scarce resource, so it is best to reuse old resources if possible. When an application finishes, all pens will be deleted and their resources freed, eliminating the possibility of 'memory leaks'.
wxPenList::wxPenList
wxPenList::AddPen
wxPenList::FindOrCreatePen
wxPenList::RemovePen
void wxPenList(void)
Constructor. The application should not construct its own pen list: use the object pointer wxThePenList.
void AddPen(wxPen *pen)
Used by wxWindows to add a pen to the list, called in the pen constructor.
wxPen * FindOrCreatePen(wxColour *colour, int width, int style)
wxPen * FindOrCreatePen(char *colour_name, int width, int style)
Finds a pen of the given specification, or creates one and adds it to the list.
void RemovePen(wxPen *pen)
Used by wxWindows to remove a pen from the list.