wxFONTENCODING_CP866, // and another one
// and for Windows
wxFONTENCODING_CP874, // WinThai
+ wxFONTENCODING_CP932, // Japanese (shift-JIS)
+ wxFONTENCODING_CP936, // Chiniese simplified (GB)
+ wxFONTENCODING_CP949, // Korean (Hangul charset)
+ wxFONTENCODING_CP950, // Chinese (traditional - Big5)
wxFONTENCODING_CP1250, // WinLatin2
wxFONTENCODING_CP1251, // WinCyrillic
wxFONTENCODING_CP1252, // WinLatin1
bool underline = FALSE, const char* facename = NULL,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
void RemoveFont(wxFont *font);
+
+ int GetCount();
};
+
+// The list of ints for the dashes needs to exist for the life of the pen
+// so we make it part of the class to save it. wxPyPen is aliased to wxPen
+// in _extras.py
+
%{
class wxPyPen : public wxPen {
public:
{ m_dash = NULL; }
~wxPyPen() {
if (m_dash)
- delete m_dash;
+ delete [] m_dash;
}
void SetDashes(int nb_dashes, const wxDash *dash) {
+ if (m_dash)
+ delete [] m_dash;
m_dash = new wxDash[nb_dashes];
- for (int i=0; i<nb_dashes; i++)
+ for (int i=0; i<nb_dashes; i++) {
m_dash[i] = dash[i];
+ }
wxPen::SetDashes(nb_dashes, m_dash);
}
%}
-
class wxPyPen : public wxPen {
public:
wxPyPen(wxColour& colour, int width=1, int style=wxSOLID);
+
class wxPenList : public wxObject {
public:
void AddPen(wxPen* pen);
wxPen* FindOrCreatePen(const wxColour& colour, int width, int style);
void RemovePen(wxPen* pen);
+
+ int GetCount();
};
void AddBrush(wxBrush *brush);
wxBrush * FindOrCreateBrush(const wxColour& colour, int style);
void RemoveBrush(wxBrush *brush);
+
+ int GetCount();
};
//----------------------------------------------------------------------