#include <wx/fontenc.h>
#include <wx/fontmap.h>
#include <wx/fontutil.h>
+#include <wx/dcbuffer.h>
%}
//----------------------------------------------------------------------
%import misc.i
+//---------------------------------------------------------------------------
+%{
+ // Put some wx default wxChar* values into wxStrings.
+ static const wxString wxPyEmptyString(wxT(""));
+%}
//---------------------------------------------------------------------------
class wxGDIObject : public wxObject {
// Declarations of some alternate "constructors"
%new wxIcon* wxEmptyIcon();
%new wxIcon* wxIconFromXPMData(PyObject* listOfStrings);
+%new wxIcon* wxIconFromBitmap(const wxBitmap& bmp);
%{ // Implementations of some alternate "constructors"
wxIcon* wxEmptyIcon() {
delete [] cArray;
return icon;
}
+
+ wxIcon* wxIconFromBitmap(const wxBitmap& bmp) {
+ wxIcon* icon = new wxIcon();
+ icon->CopyFromBitmap(bmp);
+ return icon;
+ }
%}
//---------------------------------------------------------------------------
// that can be used it wxFont ctor otherwise return FALSE
//bool GetAltForEncoding(wxFontEncoding encoding,
// wxFontEncoding *alt_encoding,
- // const wxString& facename = wxEmptyString,
+ // const wxString& facename = wxPyEmptyString,
// bool interactive = TRUE);
// returns None.
%addmethods {
PyObject* GetAltForEncoding(wxFontEncoding encoding,
- const wxString& facename = wxEmptyString,
+ const wxString& facename = wxPyEmptyString,
bool interactive = TRUE) {
wxFontEncoding alt_enc;
if (self->GetAltForEncoding(encoding, &alt_enc, facename, interactive))
// checks whether given encoding is available in given face or not.
// If no facename is given,
bool IsEncodingAvailable(wxFontEncoding encoding,
- const wxString& facename = wxEmptyString);
+ const wxString& facename = wxPyEmptyString);
// returns the encoding for the given charset (in the form of RFC 2046) or
// wxFONTENCODING_SYSTEM if couldn't decode it
void SetConfigPath(const wxString& prefix);
// return default config path
- static const wxChar *GetDefaultConfigPath();
+ static wxString GetDefaultConfigPath();
};
class wxFont : public wxGDIObject {
public:
wxFont( int pointSize, int family, int style, int weight,
- int underline=FALSE, char* faceName = "",
+ int underline=FALSE, const wxString& faceName = wxPyEmptyString,
wxFontEncoding encoding=wxFONTENCODING_DEFAULT);
%name(wxFontFromNativeInfo)wxFont(const wxNativeFontInfo& info);
void AddFont(wxFont* font);
wxFont * FindOrCreateFont(int point_size, int family, int style, int weight,
- bool underline = FALSE, const char* facename = NULL,
+ bool underline = FALSE, const wxString& facename = wxPyEmptyString,
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
void RemoveFont(wxFont *font);
wxString cName = name;
cName.MakeUpper();
wxString cName2 = cName;
- if ( !cName2.Replace("GRAY", "GREY") )
+ if ( !cName2.Replace(wxT("GRAY"), wxT("GREY")) )
cName2.clear();
wxNode *node = self->First();
%}
+//---------------------------------------------------------------------------
+
+class wxBufferedDC : public wxMemoryDC {
+public:
+ // Construct a wxBufferedDC using a user supplied buffer.
+ wxBufferedDC( wxDC *dc, const wxBitmap &buffer );
+
+ // Construct a wxBufferedDC with an internal buffer of 'area'
+ // (where area is usually something like the size of the window
+ // being buffered)
+ %name(wxBufferedDCInternalBuffer)wxBufferedDC( wxDC *dc, const wxSize &area );
+};
+
+
+class wxBufferedPaintDC : public wxBufferedDC
+{
+public:
+ wxBufferedPaintDC( wxWindow *window, const wxBitmap &buffer = wxNullBitmap );
+};
+
//---------------------------------------------------------------------------
class wxScreenDC : public wxDC {
class wxMetaFile : public wxObject {
public:
- wxMetaFile(const wxString& filename = wxEmptyString);
+ wxMetaFile(const wxString& filename = wxPyEmptyString);
~wxMetaFile();
bool Ok();
class wxMetaFileDC : public wxDC {
public:
- wxMetaFileDC(const wxString& filename = wxEmptyString,
+ wxMetaFileDC(const wxString& filename = wxPyEmptyString,
int width = 0, int height = 0,
- const wxString& description = wxEmptyString);
+ const wxString& description = wxPyEmptyString);
wxMetaFile* Close();
};