+
+/**
+ An empty pen.
+*/
+wxPen wxNullPen;
+
+/**
+ Red pen.
+*/
+wxPen* wxRED_PEN;
+
+/**
+ Cyan pen.
+*/
+wxPen* wxCYAN_PEN;
+
+/**
+ Green pen.
+*/
+wxPen* wxGREEN_PEN;
+
+/**
+ Black pen.
+*/
+wxPen* wxBLACK_PEN;
+
+/**
+ White pen.
+*/
+wxPen* wxWHITE_PEN;
+
+/**
+ Transparent pen.
+*/
+wxPen* wxTRANSPARENT_PEN;
+
+/**
+ Black dashed pen.
+*/
+wxPen* wxBLACK_DASHED_PEN;
+
+/**
+ Grey pen.
+*/
+wxPen* wxGREY_PEN;
+
+/**
+ Medium-grey pen.
+*/
+wxPen* wxMEDIUM_GREY_PEN;
+
+/**
+ Light-grey pen.
+*/
+wxPen* wxLIGHT_GREY_PEN;
+
+
+
+/**
+ @class wxPenList
+ @wxheader{gdicmn.h}
+
+ 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 can pay 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'. However, it is best not to rely on this automatic
+ cleanup because it can lead to double deletion in some circumstances.
+
+ There are two mechanisms in recent versions of wxWidgets which make the
+ pen list less useful than it once was. Under Windows, scarce resources
+ are cleaned up internally if they are not being used. Also, a referencing
+ counting mechanism applied to all GDI objects means that some sharing
+ of underlying resources is possible. You don't have to keep track of pointers,
+ working out when it is safe delete a pen, because the referencing counting does
+ it for you. For example, you can set a pen in a device context, and then
+ immediately delete the pen you passed, because the pen is 'copied'.
+
+ So you may find it easier to ignore the pen list, and instead create
+ and copy pens as you see fit. If your Windows resource meter suggests
+ your application is using too many resources, you can resort to using
+ GDI lists to share objects explicitly.
+
+ The only compelling use for the pen list is for wxWidgets to keep
+ track of pens in order to clean them up on exit. It is also kept for
+ backward compatibility with earlier versions of wxWidgets.
+
+ @library{wxcore}
+ @category{gdi}
+
+ @stdobjects
+ ::wxThePenList
+
+ @see wxPen
+*/
+class wxPenList
+{
+public:
+ /**
+ Constructor. The application should not construct its own pen list:
+ use the object pointer ::wxThePenList.
+ */
+ wxPenList();
+
+ /**
+ Finds a pen with the specified attributes and returns it, else creates a
+ new pen, adds it to the pen list, and returns it.
+
+ @param colour
+ Colour object.
+ @param width
+ Width of pen.
+ @param style
+ Pen style. See ::wxPenStyle for a list of styles.
+ */
+ wxPen* FindOrCreatePen(const wxColour& colour,
+ int width = 1,
+ wxPenStyle style = wxPENSTYLE_SOLID);
+};
+
+/**
+ The global list of wxPen objects ready to be re-used (for better performances).
+*/
+wxPenList* wxThePenList;
+