1 /////////////////////////////////////////////////////////////////////////////
 
   3 // Purpose:     SWIG interface defining "stock" GDI objects
 
   7 // Created:     13-Sept-2003
 
   9 // Copyright:   (c) 2003 by Total Control Software
 
  10 // Licence:     wxWindows license
 
  11 /////////////////////////////////////////////////////////////////////////////
 
  16 //---------------------------------------------------------------------------
 
  20 // See also wxPy_ReinitStockObjects in helpers.cpp
 
  23 wxFont* const wxNORMAL_FONT;
 
  24 wxFont* const wxSMALL_FONT;
 
  25 wxFont* const wxITALIC_FONT;
 
  26 wxFont* const wxSWISS_FONT;
 
  28 wxPen* const wxRED_PEN;
 
  29 wxPen* const wxCYAN_PEN;
 
  30 wxPen* const wxGREEN_PEN;
 
  31 wxPen* const wxBLACK_PEN;
 
  32 wxPen* const wxWHITE_PEN;
 
  33 wxPen* const wxTRANSPARENT_PEN;
 
  34 wxPen* const wxBLACK_DASHED_PEN;
 
  35 wxPen* const wxGREY_PEN;
 
  36 wxPen* const wxMEDIUM_GREY_PEN;
 
  37 wxPen* const wxLIGHT_GREY_PEN;
 
  39 wxBrush* const wxBLUE_BRUSH;
 
  40 wxBrush* const wxGREEN_BRUSH;
 
  41 wxBrush* const wxWHITE_BRUSH;
 
  42 wxBrush* const wxBLACK_BRUSH;
 
  43 wxBrush* const wxTRANSPARENT_BRUSH;
 
  44 wxBrush* const wxCYAN_BRUSH;
 
  45 wxBrush* const wxRED_BRUSH;
 
  46 wxBrush* const wxGREY_BRUSH;
 
  47 wxBrush* const wxMEDIUM_GREY_BRUSH;
 
  48 wxBrush* const wxLIGHT_GREY_BRUSH;
 
  50 wxColour* const wxBLACK;
 
  51 wxColour* const wxWHITE;
 
  52 wxColour* const wxRED;
 
  53 wxColour* const wxBLUE;
 
  54 wxColour* const wxGREEN;
 
  55 wxColour* const wxCYAN;
 
  56 wxColour* const wxLIGHT_GREY;
 
  58 wxCursor* const wxSTANDARD_CURSOR;
 
  59 wxCursor* const wxHOURGLASS_CURSOR;
 
  60 wxCursor* const wxCROSS_CURSOR;
 
  63 const wxBitmap wxNullBitmap;
 
  64 const wxIcon   wxNullIcon;
 
  65 const wxCursor wxNullCursor;
 
  66 const wxPen    wxNullPen;
 
  67 const wxBrush  wxNullBrush;
 
  68 const wxPalette wxNullPalette;
 
  69 const wxFont   wxNullFont;
 
  70 const wxColour wxNullColour;
 
  75 //---------------------------------------------------------------------------
 
  77 class wxPenList : public wxObject {
 
  80     void AddPen(wxPen* pen);
 
  81     wxPen* FindOrCreatePen(const wxColour& colour, int width, int style);
 
  82     void RemovePen(wxPen* pen);
 
  88 //---------------------------------------------------------------------------
 
  90 class wxBrushList : public wxObject {
 
  93     void AddBrush(wxBrush *brush);
 
  94     wxBrush * FindOrCreateBrush(const wxColour& colour, int style);
 
  95     void RemoveBrush(wxBrush *brush);
 
 100 //---------------------------------------------------------------------------
 
 102 MustHaveApp(wxColourDatabase);
 
 104 class wxColourDatabase : public wxObject {
 
 109     // find colour by name or name for the given colour
 
 110     wxColour Find(const wxString& name) const;
 
 111     wxString FindName(const wxColour& colour) const;
 
 112     %pythoncode { FindColour = Find }
 
 114     // add a new colour to the database
 
 115     void AddColour(const wxString& name, const wxColour& colour);
 
 118         void Append(const wxString& name, int red, int green, int blue) {
 
 119             self->AddColour(name, wxColour(red, green, blue));
 
 124 //---------------------------------------------------------------------------
 
 126 class wxFontList : public wxObject {
 
 129     void AddFont(wxFont* font);
 
 130     wxFont * FindOrCreateFont(int point_size, int family, int style, int weight,
 
 131                               bool underline = false, const wxString& facename = wxPyEmptyString,
 
 132                               wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
 
 133     void RemoveFont(wxFont *font);
 
 138 //---------------------------------------------------------------------------
 
 143 // See also wxPy_ReinitStockObjects in helpers.cpp
 
 146 wxFontList*       const wxTheFontList;
 
 147 wxPenList*        const wxThePenList;
 
 148 wxBrushList*      const wxTheBrushList;
 
 149 wxColourDatabase* const wxTheColourDatabase;
 
 154 //---------------------------------------------------------------------------
 
 156 %pythoncode { NullColor = NullColour }