1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: SWIG interface file for wxDC, wxBrush, wxPen, etc.
9 // Copyright: (c) 1998 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
18 #include <wx/imaglist.h>
19 #include <wx/fontmap.h>
20 #include <wx/fontenc.h>
21 #include <wx/fontmap.h>
22 #include <wx/fontutil.h>
23 #include <wx/dcbuffer.h>
24 #include <wx/iconbndl.h>
27 //----------------------------------------------------------------------
30 %include my_typemaps.i
32 // Import some definitions of other classes, etc.
38 //---------------------------------------------------------------------------
40 // Put some wx default wxChar* values into wxStrings.
41 static const wxString wxPyEmptyString(wxT(""));
43 //---------------------------------------------------------------------------
45 class wxGDIObject : public wxObject {
51 void SetVisible( bool visible );
57 //---------------------------------------------------------------------------
59 class wxBitmap : public wxGDIObject
62 wxBitmap(const wxString& name, wxBitmapType type=wxBITMAP_TYPE_ANY);
65 wxPalette* GetPalette();
67 bool LoadFile(const wxString& name, wxBitmapType type=wxBITMAP_TYPE_ANY);
68 bool SaveFile(const wxString& name, wxBitmapType type, wxPalette* palette = NULL);
69 void SetMask(wxMask* mask);
71 void SetPalette(wxPalette& palette);
77 void SetHandle(long handle);
84 void SetHeight(int h);
87 void SetSize(const wxSize& size);
90 wxBitmap GetSubBitmap( const wxRect& rect );
91 bool CopyFromIcon(const wxIcon& icon);
93 bool CopyFromCursor(const wxCursor& cursor);
95 void SetQuality(int q);
98 %pragma(python) addtoclass = "
99 def __del__(self,gdic=gdic):
101 if self.thisown == 1 :
102 gdic.delete_wxBitmap(self)
109 // Declarations of some alternate "constructors"
110 %new wxBitmap* wxEmptyBitmap(int width, int height, int depth=-1);
111 %new wxBitmap* wxBitmapFromXPMData(PyObject* listOfStrings);
112 %new wxBitmap* wxBitmapFromIcon(const wxIcon& icon);
113 %new wxBitmap* wxBitmapFromBits(char* bits, int width, int height, int depth = 1 );
116 // %new wxBitmap* wxBitmapFromData(PyObject* data, long type,
117 // int width, int height, int depth = 1);
122 %{ // Implementations of some alternate "constructors"
124 wxBitmap* wxEmptyBitmap(int width, int height, int depth=-1) {
125 return new wxBitmap(width, height, depth);
128 static char** ConvertListOfStrings(PyObject* listOfStrings) {
129 char** cArray = NULL;
132 if (!PyList_Check(listOfStrings)) {
133 PyErr_SetString(PyExc_TypeError, "Expected a list of strings.");
136 count = PyList_Size(listOfStrings);
137 cArray = new char*[count];
139 for(int x=0; x<count; x++) {
140 // TODO: Need some validation and error checking here
141 cArray[x] = PyString_AsString(PyList_GET_ITEM(listOfStrings, x));
147 wxBitmap* wxBitmapFromXPMData(PyObject* listOfStrings) {
148 char** cArray = NULL;
151 cArray = ConvertListOfStrings(listOfStrings);
154 bmp = new wxBitmap(cArray);
160 wxBitmap* wxBitmapFromIcon(const wxIcon& icon) {
161 return new wxBitmap(icon);
165 wxBitmap* wxBitmapFromBits(char* bits, int width, int height, int depth = 1 ) {
166 return new wxBitmap(bits, width, height, depth);
171 // wxBitmap* wxBitmapFromData(PyObject* data, long type,
172 // int width, int height, int depth = 1) {
173 // if (! PyString_Check(data)) {
174 // PyErr_SetString(PyExc_TypeError, "Expected string object");
177 // return new wxBitmap((void*)PyString_AsString(data), type, width, height, depth);
182 //---------------------------------------------------------------------------
184 class wxMask : public wxObject {
186 wxMask(const wxBitmap& bitmap);
189 %addmethods { void Destroy() { delete self; } }
192 %new wxMask* wxMaskColour(const wxBitmap& bitmap, const wxColour& colour);
194 wxMask* wxMaskColour(const wxBitmap& bitmap, const wxColour& colour) {
195 return new wxMask(bitmap, colour);
200 //---------------------------------------------------------------------------
203 class wxIcon : public wxGDIObject
206 wxIcon(const wxString& name, long flags,
207 int desiredWidth = -1, int desiredHeight = -1);
211 bool LoadFile(const wxString& name, long flags);
214 // wxGDIImage methods
217 void SetHandle(long handle);
223 void SetWidth(int w);
224 void SetHeight(int h);
225 void SetDepth(int d);
227 void SetSize(const wxSize& size);
229 void CopyFromBitmap(const wxBitmap& bmp);
231 %pragma(python) addtoclass = "
232 def __del__(self,gdic=gdic):
234 if self.thisown == 1 :
235 gdic.delete_wxIcon(self)
242 // Declarations of some alternate "constructors"
243 %new wxIcon* wxEmptyIcon();
244 %new wxIcon* wxIconFromXPMData(PyObject* listOfStrings);
245 %new wxIcon* wxIconFromBitmap(const wxBitmap& bmp);
247 %{ // Implementations of some alternate "constructors"
248 wxIcon* wxEmptyIcon() {
252 wxIcon* wxIconFromXPMData(PyObject* listOfStrings) {
253 char** cArray = NULL;
256 cArray = ConvertListOfStrings(listOfStrings);
259 icon = new wxIcon(cArray);
264 wxIcon* wxIconFromBitmap(const wxBitmap& bmp) {
265 wxIcon* icon = new wxIcon();
266 icon->CopyFromBitmap(bmp);
271 //---------------------------------------------------------------------------
276 // default constructor
279 // initializes the bundle with the icon(s) found in the file
280 %name(wxIconBundleFromFile) wxIconBundle( const wxString& file, long type );
282 // initializes the bundle with a single icon
283 %name(wxIconBundleFromIcon)wxIconBundle( const wxIcon& icon );
287 // adds the icon to the collection, if the collection already
288 // contains an icon with the same width and height, it is
290 void AddIcon( const wxIcon& icon );
292 // adds all the icons contained in the file to the collection,
293 // if the collection already contains icons with the same
294 // width and height, they are replaced
295 %name(AddIconFromFile)void AddIcon( const wxString& file, long type );
297 // returns the icon with the given size; if no such icon exists,
298 // returns the icon with size wxSYS_ICON_[XY]; if no such icon exists,
299 // returns the first icon in the bundle
300 const wxIcon& GetIcon( const wxSize& size ) const;
303 //---------------------------------------------------------------------------
305 class wxCursor : public wxGDIObject
309 wxCursor(const wxString& cursorName, long flags, int hotSpotX=0, int hotSpotY=0);
313 // wxGDIImage methods
316 void SetHandle(long handle);
323 void SetWidth(int w);
324 void SetHeight(int h);
325 void SetDepth(int d);
326 void SetSize(const wxSize& size);
330 %name(wxStockCursor) %new wxCursor* wxPyStockCursor(int id);
331 %{ // Alternate 'constructor'
332 wxCursor* wxPyStockCursor(int id) {
333 return new wxCursor(id);
337 //----------------------------------------------------------------------
339 class wxColour : public wxObject {
341 wxColour(unsigned char red=0, unsigned char green=0, unsigned char blue=0);
344 unsigned char Green();
345 unsigned char Blue();
347 void Set(unsigned char red, unsigned char green, unsigned char blue);
350 PyObject* rv = PyTuple_New(3);
351 PyTuple_SetItem(rv, 0, PyInt_FromLong(self->Red()));
352 PyTuple_SetItem(rv, 1, PyInt_FromLong(self->Green()));
353 PyTuple_SetItem(rv, 2, PyInt_FromLong(self->Blue()));
357 %pragma(python) addtoclass = "asTuple = Get"
358 %pragma(python) addtoclass = "def __str__(self): return str(self.asTuple())"
359 %pragma(python) addtoclass = "def __repr__(self): return str(self.asTuple())"
363 %new wxColour* wxNamedColour(const wxString& colorName);
365 %{ // Alternate 'constructor'
366 wxColour* wxNamedColour(const wxString& colorName) {
367 return new wxColour(colorName);
373 class wxColourDatabase : public wxObject {
376 wxColour *FindColour(const wxString& colour);
377 wxString FindName(const wxColour& colour) const;
380 void Append(const wxString& name, int red, int green, int blue) {
381 // first see if the name is already there
382 wxString cName = name;
384 wxString cName2 = cName;
385 if ( !cName2.Replace(wxT("GRAY"), wxT("GREY")) )
388 wxNode *node = self->First();
390 const wxChar *key = node->GetKeyString();
391 if ( cName == key || cName2 == key ) {
392 wxColour* c = (wxColour *)node->Data();
393 c->Set(red, green, blue);
399 // otherwise append the new colour
400 self->Append(name.c_str(), new wxColour(red, green, blue));
406 //----------------------------------------------------------------------
408 class wxPen : public wxGDIObject {
410 wxPen(wxColour& colour, int width=1, int style=wxSOLID);
414 wxColour GetColour();
420 void SetCap(int cap_style);
421 void SetColour(wxColour& colour);
422 void SetJoin(int join_style);
423 void SetStyle(int style);
424 void SetWidth(int width);
426 // **** This one needs to return a list of ints (wxDash)
427 //int GetDashes(wxDash **dashes);
428 void SetDashes(int LCOUNT, wxDash* choices);
431 wxBitmap* GetStipple();
432 void SetStipple(wxBitmap& stipple);
439 // The list of ints for the dashes needs to exist for the life of the pen
440 // so we make it part of the class to save it. wxPyPen is aliased to wxPen
444 class wxPyPen : public wxPen {
446 wxPyPen(wxColour& colour, int width=1, int style=wxSOLID)
447 : wxPen(colour, width, style)
454 void SetDashes(int nb_dashes, const wxDash *dash) {
457 m_dash = new wxDash[nb_dashes];
458 for (int i=0; i<nb_dashes; i++) {
461 wxPen::SetDashes(nb_dashes, m_dash);
470 class wxPyPen : public wxPen {
472 wxPyPen(wxColour& colour, int width=1, int style=wxSOLID);
475 void SetDashes(int LCOUNT, wxDash* choices);
481 class wxPenList : public wxObject {
484 void AddPen(wxPen* pen);
485 wxPen* FindOrCreatePen(const wxColour& colour, int width, int style);
486 void RemovePen(wxPen* pen);
493 //----------------------------------------------------------------------
495 class wxBrush : public wxGDIObject {
497 wxBrush(const wxColour& colour, int style=wxSOLID);
500 wxColour GetColour();
501 wxBitmap * GetStipple();
504 void SetColour(wxColour &colour);
505 void SetStipple(wxBitmap& bitmap);
506 void SetStyle(int style);
510 class wxBrushList : public wxObject {
513 void AddBrush(wxBrush *brush);
514 wxBrush * FindOrCreateBrush(const wxColour& colour, int style);
515 void RemoveBrush(wxBrush *brush);
520 //----------------------------------------------------------------------
524 class wxDC : public wxObject {
526 // wxDC(); **** abstract base class, can't instantiate.
531 bool Blit(long xdest, long ydest,
532 long width, long height,
533 wxDC *source, long xsrc, long ysrc,
534 int logicalFunc = wxCOPY, int useMask = FALSE);
535 // bool Blit(const wxPoint& destPt, const wxSize& sz,
536 // wxDC *source, const wxPoint& srcPt,
537 // int logicalFunc = wxCOPY, int useMask = FALSE);
540 void CrossHair(long x, long y);
541 void DestroyClippingRegion();
542 long DeviceToLogicalX(long x);
543 long DeviceToLogicalXRel(long x);
544 long DeviceToLogicalY(long y);
545 long DeviceToLogicalYRel(long y);
546 void DrawArc(long x1, long y1, long x2, long y2, long xc, long yc);
547 void DrawCircle(long x, long y, long radius);
548 void DrawEllipse(long x, long y, long width, long height);
549 void DrawEllipticArc(long x, long y, long width, long height, long start, long end);
550 void DrawIcon(const wxIcon& icon, long x, long y);
552 void DrawLabel(const wxString& text, const wxRect& rect,
553 int alignment = wxALIGN_LEFT | wxALIGN_TOP,
554 int indexAccel = -1);
557 wxRect DrawImageLabel(const wxString& text,
558 const wxBitmap& image,
560 int alignment = wxALIGN_LEFT | wxALIGN_TOP,
561 int indexAccel = -1) {
563 self->DrawLabel(text, image, rect, alignment, indexAccel, &rv);
568 void DrawLine(long x1, long y1, long x2, long y2);
569 void DrawLines(int PCOUNT, wxPoint* points, long xoffset=0, long yoffset=0);
570 void DrawPolygon(int PCOUNT, wxPoint* points, long xoffset=0, long yoffset=0,
571 int fill_style=wxODDEVEN_RULE);
572 void DrawPoint(long x, long y);
573 void DrawRectangle(long x, long y, long width, long height);
574 void DrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle);
575 void DrawRoundedRectangle(long x, long y, long width, long height, long radius=20);
576 void DrawSpline(int PCOUNT, wxPoint* points);
577 void DrawText(const wxString& text, long x, long y);
581 bool FloodFill(long x, long y, const wxColour& colour, int style=wxFLOOD_SURFACE);
582 wxBrush GetBackground();
584 long GetCharHeight();
586 void GetClippingBox(long *OUTPUT, long *OUTPUT,
587 long *OUTPUT, long *OUTPUT);
589 int GetLogicalFunction();
590 void GetLogicalScale(double *OUTPUT, double *OUTPUT);
592 bool GetOptimization();
595 %new wxColour* GetPixel(long x, long y) {
596 wxColour* wc = new wxColour();
597 self->GetPixel(x, y, wc);
601 %name(GetSizeTuple)void GetSize(int* OUTPUT, int* OUTPUT);
604 wxColour GetTextBackground();
605 void GetTextExtent(const wxString& string, long *OUTPUT, long *OUTPUT);
606 %name(GetFullTextExtent)void GetTextExtent(const wxString& string,
607 long *OUTPUT, long *OUTPUT, long *OUTPUT, long* OUTPUT,
608 const wxFont* font = NULL);
609 wxColour GetTextForeground();
610 void GetUserScale(double *OUTPUT, double *OUTPUT);
611 long LogicalToDeviceX(long x);
612 long LogicalToDeviceXRel(long x);
613 long LogicalToDeviceY(long y);
614 long LogicalToDeviceYRel(long y);
620 void SetDeviceOrigin(long x, long y);
621 void SetBackground(const wxBrush& brush);
622 void SetBackgroundMode(int mode);
623 void SetClippingRegion(long x, long y, long width, long height);
624 %name(SetClippingRegionAsRegion) void SetClippingRegion(const wxRegion& region);
625 void SetPalette(const wxPalette& colourMap);
626 void SetBrush(const wxBrush& brush);
627 void SetFont(const wxFont& font);
628 void SetLogicalFunction(int function);
629 void SetLogicalScale(double x, double y);
630 void SetMapMode(int mode);
631 void SetOptimization(bool optimize);
632 void SetPen(const wxPen& pen);
633 void SetTextBackground(const wxColour& colour);
634 void SetTextForeground(const wxColour& colour);
635 void SetUserScale(double x_scale, double y_scale);
636 bool StartDoc(const wxString& message);
641 void DrawBitmap(const wxBitmap& bitmap, long x, long y,
642 int useMask = FALSE);
644 bool CanDrawBitmap();
645 bool CanGetTextExtent();
649 void GetLogicalOrigin(int *OUTPUT, int *OUTPUT);
650 void SetLogicalOrigin(int x, int y);
651 void GetDeviceOrigin(int *OUTPUT, int *OUTPUT);
652 void SetAxisOrientation(bool xLeftRight, bool yBottomUp);
654 void CalcBoundingBox(int x, int y);
655 void ResetBoundingBox();
658 void GetBoundingBox(int* OUTPUT, int* OUTPUT, int* OUTPUT, int* OUTPUT);
659 // See below for implementation
668 // NOTE: These methods are VERY SIMILAR in implentation. It would be
669 // nice to factor out common code and or turn them into a set of
670 // template-like macros.
672 // Draw a point for every set of coordinants in pyPoints, optionally
673 // setting a new pen for each
674 PyObject* _DrawPointList(PyObject* pyPoints, PyObject* pyPens) {
675 bool isFastSeq = PyList_Check(pyPoints) || PyTuple_Check(pyPoints);
676 bool isFastPens = PyList_Check(pyPens) || PyTuple_Check(pyPens);
684 if (!PySequence_Check(pyPoints)) {
687 if (!PySequence_Check(pyPens)) {
690 numObjs = PySequence_Length(pyPoints);
691 numPens = PySequence_Length(pyPens);
693 for (i = 0; i < numObjs; i++) {
697 obj = PySequence_Fast_GET_ITEM(pyPens, i);
700 obj = PySequence_GetItem(pyPens, i);
702 if (SWIG_GetPtrObj(obj, (void **) &pen, "_wxPen_p")) {
713 // Get the point coordinants
715 obj = PySequence_Fast_GET_ITEM(pyPoints, i);
718 obj = PySequence_GetItem(pyPoints, i);
720 if (! _2int_seq_helper(obj, &x1, &y1)) {
726 // Now draw the point
727 self->DrawPoint(x1, y1);
737 PyErr_SetString(PyExc_TypeError, "Expected a sequence of wxPens");
740 PyErr_SetString(PyExc_TypeError, "Expected a sequence of (x,y) sequences.");
745 // Draw a line for every set of coordinants in pyLines, optionally
746 // setting a new pen for each
747 PyObject* _DrawLineList(PyObject* pyLines, PyObject* pyPens) {
748 bool isFastSeq = PyList_Check(pyLines) || PyTuple_Check(pyLines);
749 bool isFastPens = PyList_Check(pyPens) || PyTuple_Check(pyPens);
757 if (!PySequence_Check(pyLines)) {
760 if (!PySequence_Check(pyPens)) {
763 numObjs = PySequence_Length(pyLines);
764 numPens = PySequence_Length(pyPens);
766 for (i = 0; i < numObjs; i++) {
770 obj = PySequence_Fast_GET_ITEM(pyPens, i);
773 obj = PySequence_GetItem(pyPens, i);
775 if (SWIG_GetPtrObj(obj, (void **) &pen, "_wxPen_p")) {
786 // Get the line coordinants
788 obj = PySequence_Fast_GET_ITEM(pyLines, i);
791 obj = PySequence_GetItem(pyLines, i);
793 if (! _4int_seq_helper(obj, &x1, &y1, &x2, &y2)) {
800 self->DrawLine(x1, y1, x2, y2);
810 PyErr_SetString(PyExc_TypeError, "Expected a sequence of wxPens");
813 PyErr_SetString(PyExc_TypeError, "Expected a sequence of (x1,y1, x2,y2) sequences.");
819 %pragma(python) addtoclass = "
820 def DrawPointList(self, points, pens=None):
823 elif isinstance(pens, wxPenPtr):
825 elif len(pens) != len(points):
826 raise ValueError('points and pens must have same length')
827 return self._DrawPointList(points, pens)
829 def DrawLineList(self, lines, pens=None):
832 elif isinstance(pens, wxPenPtr):
834 elif len(pens) != len(lines):
835 raise ValueError('lines and pens must have same length')
836 return self._DrawLineList(lines, pens)
845 static void wxDC_GetBoundingBox(wxDC* dc, int* x1, int* y1, int* x2, int* y2) {
853 //----------------------------------------------------------------------
855 class wxMemoryDC : public wxDC {
859 void SelectObject(const wxBitmap& bitmap);
862 %new wxMemoryDC* wxMemoryDCFromDC(wxDC* oldDC);
863 %{ // Alternate 'constructor'
864 wxMemoryDC* wxMemoryDCFromDC(wxDC* oldDC) {
865 return new wxMemoryDC(oldDC);
870 //---------------------------------------------------------------------------
872 class wxBufferedDC : public wxMemoryDC {
874 // Construct a wxBufferedDC using a user supplied buffer.
875 wxBufferedDC( wxDC *dc, const wxBitmap &buffer );
877 // Construct a wxBufferedDC with an internal buffer of 'area'
878 // (where area is usually something like the size of the window
880 %name(wxBufferedDCInternalBuffer)wxBufferedDC( wxDC *dc, const wxSize &area );
882 // Blits the buffer to the dc, and detaches the dc from
883 // the buffer. Usually called in the dtor or by the dtor
884 // of derived classes if the BufferedDC must blit before
885 // the derived class (which may own the dc it's blitting
890 %pragma(python) addtomethod =
891 "__init__:self._dc = _args[0] # save a ref so the other dc won't be deleted before self"
892 %pragma(python) addtomethod =
893 "wxBufferedDCInternalBuffer:val._dc = _args[0] # save a ref so the other dc won't be deleted before self"
897 class wxBufferedPaintDC : public wxBufferedDC
900 wxBufferedPaintDC( wxWindow *window, const wxBitmap &buffer = wxNullBitmap );
903 //---------------------------------------------------------------------------
905 class wxScreenDC : public wxDC {
909 %name(StartDrawingOnTopWin) bool StartDrawingOnTop(wxWindow* window);
910 bool StartDrawingOnTop(wxRect* rect = NULL);
911 bool EndDrawingOnTop();
914 //---------------------------------------------------------------------------
916 class wxClientDC : public wxDC {
918 wxClientDC(wxWindow* win);
921 //---------------------------------------------------------------------------
923 class wxPaintDC : public wxDC {
925 wxPaintDC(wxWindow* win);
928 //---------------------------------------------------------------------------
930 class wxWindowDC : public wxDC {
932 wxWindowDC(wxWindow* win);
935 //---------------------------------------------------------------------------
941 #include <wx/metafile.h>
944 class wxMetaFile : public wxObject {
946 wxMetaFile(const wxString& filename = wxPyEmptyString);
950 bool SetClipboard(int width = 0, int height = 0);
956 const wxString& GetFileName() const { return m_filename; }
960 // bool wxMakeMetaFilePlaceable(const wxString& filename,
961 // int minX, int minY, int maxX, int maxY, float scale=1.0);
964 class wxMetaFileDC : public wxDC {
966 wxMetaFileDC(const wxString& filename = wxPyEmptyString,
967 int width = 0, int height = 0,
968 const wxString& description = wxPyEmptyString);
974 //---------------------------------------------------------------------------
976 class wxPalette : public wxGDIObject {
978 wxPalette(int LCOUNT, byte* choices, byte* choices, byte* choices);
981 int GetPixel(byte red, byte green, byte blue);
982 bool GetRGB(int pixel, byte* OUTPUT, byte* OUTPUT, byte* OUTPUT);
986 //---------------------------------------------------------------------------
989 wxIMAGELIST_DRAW_NORMAL ,
990 wxIMAGELIST_DRAW_TRANSPARENT,
991 wxIMAGELIST_DRAW_SELECTED,
992 wxIMAGELIST_DRAW_FOCUSED,
998 class wxImageList : public wxObject {
1000 wxImageList(int width, int height, int mask=TRUE, int initialCount=1);
1003 int Add(const wxBitmap& bitmap, const wxBitmap& mask = wxNullBitmap);
1004 %name(AddWithColourMask)int Add(const wxBitmap& bitmap, const wxColour& maskColour);
1005 %name(AddIcon)int Add(const wxIcon& icon);
1007 bool Replace(int index, const wxBitmap& bitmap, const wxBitmap& mask = wxNullBitmap);
1009 // %name(ReplaceIcon)bool Replace(int index, const wxIcon& icon);
1010 // int Add(const wxBitmap& bitmap);
1011 bool Replace(int index, const wxBitmap& bitmap);
1014 bool Draw(int index, wxDC& dc, int x, int x, int flags = wxIMAGELIST_DRAW_NORMAL,
1015 const bool solidBackground = FALSE);
1017 int GetImageCount();
1018 bool Remove(int index);
1020 void GetSize(int index, int& OUTPUT, int& OUTPUT);
1024 //---------------------------------------------------------------------------
1027 enum wxRegionContain {
1028 wxOutRegion, wxPartRegion, wxInRegion
1032 class wxRegion : public wxGDIObject {
1034 wxRegion(long x=0, long y=0, long width=0, long height=0);
1039 bool Offset(wxCoord x, wxCoord y);
1042 wxRegionContain Contains(long x, long y);
1043 %name(ContainsPoint)wxRegionContain Contains(const wxPoint& pt);
1044 %name(ContainsRect)wxRegionContain Contains(const wxRect& rect);
1045 %name(ContainsRectDim)wxRegionContain Contains(long x, long y, long w, long h);
1049 bool Intersect(long x, long y, long width, long height);
1050 %name(IntersectRect)bool Intersect(const wxRect& rect);
1051 %name(IntersectRegion)bool Intersect(const wxRegion& region);
1055 bool Union(long x, long y, long width, long height);
1056 %name(UnionRect)bool Union(const wxRect& rect);
1057 %name(UnionRegion)bool Union(const wxRegion& region);
1059 bool Subtract(long x, long y, long width, long height);
1060 %name(SubtractRect)bool Subtract(const wxRect& rect);
1061 %name(SubtractRegion)bool Subtract(const wxRegion& region);
1063 bool Xor(long x, long y, long width, long height);
1064 %name(XorRect)bool Xor(const wxRect& rect);
1065 %name(XorRegion)bool Xor(const wxRegion& region);
1070 class wxRegionIterator : public wxObject {
1072 wxRegionIterator(const wxRegion& region);
1073 ~wxRegionIterator();
1093 //---------------------------------------------------------------------------
1100 extern wxFont *wxNORMAL_FONT;
1101 extern wxFont *wxSMALL_FONT;
1102 extern wxFont *wxITALIC_FONT;
1103 extern wxFont *wxSWISS_FONT;
1105 extern wxPen *wxRED_PEN;
1106 extern wxPen *wxCYAN_PEN;
1107 extern wxPen *wxGREEN_PEN;
1108 extern wxPen *wxBLACK_PEN;
1109 extern wxPen *wxWHITE_PEN;
1110 extern wxPen *wxTRANSPARENT_PEN;
1111 extern wxPen *wxBLACK_DASHED_PEN;
1112 extern wxPen *wxGREY_PEN;
1113 extern wxPen *wxMEDIUM_GREY_PEN;
1114 extern wxPen *wxLIGHT_GREY_PEN;
1116 extern wxBrush *wxBLUE_BRUSH;
1117 extern wxBrush *wxGREEN_BRUSH;
1118 extern wxBrush *wxWHITE_BRUSH;
1119 extern wxBrush *wxBLACK_BRUSH;
1120 extern wxBrush *wxTRANSPARENT_BRUSH;
1121 extern wxBrush *wxCYAN_BRUSH;
1122 extern wxBrush *wxRED_BRUSH;
1123 extern wxBrush *wxGREY_BRUSH;
1124 extern wxBrush *wxMEDIUM_GREY_BRUSH;
1125 extern wxBrush *wxLIGHT_GREY_BRUSH;
1127 extern wxColour *wxBLACK;
1128 extern wxColour *wxWHITE;
1129 extern wxColour *wxRED;
1130 extern wxColour *wxBLUE;
1131 extern wxColour *wxGREEN;
1132 extern wxColour *wxCYAN;
1133 extern wxColour *wxLIGHT_GREY;
1135 extern wxCursor *wxSTANDARD_CURSOR;
1136 extern wxCursor *wxHOURGLASS_CURSOR;
1137 extern wxCursor *wxCROSS_CURSOR;
1140 extern wxBitmap wxNullBitmap;
1141 extern wxIcon wxNullIcon;
1142 extern wxCursor wxNullCursor;
1143 extern wxPen wxNullPen;
1144 extern wxBrush wxNullBrush;
1145 extern wxPalette wxNullPalette;
1146 extern wxFont wxNullFont;
1147 extern wxColour wxNullColour;
1150 extern wxFontList* wxTheFontList;
1151 extern wxPenList* wxThePenList;
1152 extern wxBrushList* wxTheBrushList;
1153 extern wxColourDatabase* wxTheColourDatabase;
1161 //---------------------------------------------------------------------------
1162 //---------------------------------------------------------------------------