//---------------------------------------------------------------------------
-class wxBitmap {
+// class wxGDIImage {
+// public:
+// long GetHandle();
+// void SetHandle(long handle);
+// bool Ok();
+// int GetWidth();
+// int GetHeight();
+// int GetDepth();
+// void SetWidth(int w);
+// void SetHeight(int h);
+// void SetDepth(int d);
+// void SetSize(const wxSize& size);
+// };
+
+//---------------------------------------------------------------------------
+
+class wxBitmap
+//: public wxGDIImage
+{
public:
wxBitmap(const wxString& name, long type);
~wxBitmap();
-#ifdef __WXMSW__
- void Create(int width, int height, int depth = -1);
-#endif
- int GetDepth();
- int GetHeight();
wxPalette* GetPalette();
wxMask* GetMask();
- int GetWidth();
bool LoadFile(const wxString& name, long flags);
- bool Ok();
bool SaveFile(const wxString& name, int type, wxPalette* palette = NULL);
- void SetDepth(int depth);
- void SetHeight(int height);
void SetMask(wxMask* mask);
#ifdef __WXMSW__
void SetPalette(wxPalette& palette);
#endif
- void SetWidth(int width);
+
+ // wxGDIImage methods
+#ifdef __WXMSW__
+ long GetHandle();
+ void SetHandle(long handle);
+#endif
+ bool Ok();
+ int GetWidth();
+ int GetHeight();
+ int GetDepth();
+ void SetWidth(int w);
+ void SetHeight(int h);
+ void SetDepth(int d);
+#ifdef __WXMSW__
+ void SetSize(const wxSize& size);
+#endif
};
+
%new wxBitmap* wxEmptyBitmap(int width, int height, int depth=-1);
-wxBitmap* wxNoRefBitmap(char* name, long flags);
#ifdef __WXMSW__
%new wxBitmap* wxBitmapFromData(char* data, long type,
return new wxBitmap(width, height, depth);
}
- // This one won't own the reference, so Python
- // won't call the dtor, this is good for
- // toolbars and such where the parent will
- // manage the bitmap.
- wxBitmap* wxNoRefBitmap(char* name, long flags) {
- return new wxBitmap(name, flags);
- }
-
#ifdef __WXMSW__
wxBitmap* wxBitmapFromData(char* data, long type,
int width, int height, int depth = 1) {
class wxMask {
public:
wxMask(const wxBitmap& bitmap);
- ~wxMask();
+ //~wxMask();
};
%new wxMask* wxMaskColour(const wxBitmap& bitmap, const wxColour& colour);
//---------------------------------------------------------------------------
-class wxIcon : public wxBitmap {
+class wxIcon
+//: public wxGDIImage
+{
public:
wxIcon(const wxString& name, long flags,
int desiredWidth = -1, int desiredHeight = -1);
~wxIcon();
- int GetDepth();
- int GetHeight();
- int GetWidth();
bool LoadFile(const wxString& name, long flags);
+
+ // wxGDIImage methods
+#ifdef __WXMSW__
+ long GetHandle();
+ void SetHandle(long handle);
+#endif
bool Ok();
- void SetDepth(int depth);
- void SetHeight(int height);
- void SetWidth(int width);
+ int GetWidth();
+ int GetHeight();
+ int GetDepth();
+ void SetWidth(int w);
+ void SetHeight(int h);
+ void SetDepth(int d);
+#ifdef __WXMSW__
+ void SetSize(const wxSize& size);
+#endif
};
//---------------------------------------------------------------------------
-class wxCursor : public wxBitmap {
+class wxCursor
+//: public wxGDIImage
+{
public:
#ifdef __WXMSW__
wxCursor(const wxString& cursorName, long flags, int hotSpotX=0, int hotSpotY=0);
#endif
~wxCursor();
+
+ // wxGDIImage methods
+#ifdef __WXMSW__
+ long GetHandle();
+ void SetHandle(long handle);
+#endif
bool Ok();
+#ifdef __WXMSW__
+ int GetWidth();
+ int GetHeight();
+ int GetDepth();
+ void SetWidth(int w);
+ void SetHeight(int h);
+ void SetDepth(int d);
+ void SetSize(const wxSize& size);
+#endif
};
%name(wxStockCursor) %new wxCursor* wxPyStockCursor(int id);
return rv;
}
}
+ %pragma(python) addtoclass = "asTuple = Get"
+ %pragma(python) addtoclass = "def __str__(self): return str(self.asTuple())"
+ %pragma(python) addtoclass = "def __repr__(self): return str(self.asTuple())"
+
};
%new wxColour* wxNamedColour(const wxString& colorName);
//----------------------------------------------------------------------
+#ifdef __WXMSW__
typedef unsigned long wxDash;
+#else
+typedef char wxDash;
+#endif
+
class wxPen {
public:
void SetStyle(int style);
void SetWidth(int width);
-#ifdef __WXMSW__
// **** This one needs to return a list of ints (wxDash)
int GetDashes(wxDash **dashes);
- wxBitmap* GetStipple();
void SetDashes(int LCOUNT, wxDash* LIST);
+
+#ifdef __WXMSW__
+ wxBitmap* GetStipple();
void SetStipple(wxBitmap& stipple);
#endif
};
int fill_style=wxODDEVEN_RULE);
void DrawPoint(long x, long y);
void DrawRectangle(long x, long y, long width, long height);
+ void DrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle);
void DrawRoundedRectangle(long x, long y, long width, long height, long radius=20);
void DrawSpline(int LCOUNT, wxPoint* LIST);
void DrawText(const wxString& text, long x, long y);
class wxImageList {
public:
- wxImageList(int width, int height, const bool mask=TRUE, int initialCount=1);
+ wxImageList(int width, int height, int mask=TRUE, int initialCount=1);
~wxImageList();
#ifdef __WXMSW__