]> git.saurik.com Git - wxWidgets.git/blobdiff - interface/wx/dc.h
add note for wxWidgets user with a skeleton for a very minimal console app
[wxWidgets.git] / interface / wx / dc.h
index 0fa93ce917adbbde2c0ac2ff94bf4bbd10f46d4c..cb6031ae97248af9d92769864e0f70902de5168b 100644 (file)
@@ -44,7 +44,8 @@
     @library{wxcore}
     @category{dc,gdi}
 
-    @see @ref overview_dc, wxGraphicsContext
+    @see @ref overview_dc, wxGraphicsContext, wxDCFontChanger, wxDCTextColourChanger,
+         wxDCPenChanger, wxDCBrushChanger, wxDCClipper
 
     @todo Precise definition of default/initial state.
     @todo Pixelwise definition of operations (e.g. last point of a line not
@@ -107,11 +108,11 @@ public:
             setting the @c no-maskblt option to 1.
         @param xsrcMask
             Source x position on the mask. If both xsrcMask and ysrcMask are
-            -1, xsrc and ysrc will be assumed for the mask source position.
+            @c -1, xsrc and ysrc will be assumed for the mask source position.
             Currently only implemented on Windows.
         @param ysrcMask
             Source y position on the mask. If both xsrcMask and ysrcMask are
-            -1, xsrc and ysrc will be assumed for the mask source position.
+            @c -1, xsrc and ysrc will be assumed for the mask source position.
             Currently only implemented on Windows.
 
         @remarks There is partial support for Blit() in wxPostScriptDC, under X.
@@ -120,7 +121,7 @@ public:
     */
     bool Blit(wxCoord xdest, wxCoord ydest, wxCoord width,
               wxCoord height, wxDC* source, wxCoord xsrc, wxCoord ysrc,
-              int logicalFunc = wxCOPY, bool useMask = false,
+              wxRasterOperationMode logicalFunc = wxCOPY, bool useMask = false,
               wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord);
 
     /**
@@ -266,10 +267,10 @@ public:
         character with the given index if it is != -1 and return the bounding
         rectangle if required.
     */
-    virtual void DrawLabel(const wxString& text, const wxBitmap& image,
-                           const wxRect& rect,
-                           int alignment = wxALIGN_LEFT | wxALIGN_TOP,
-                           int indexAccel = -1, wxRect* rectBounding = NULL);
+    void DrawLabel(const wxString& text, const wxBitmap& image,
+                   const wxRect& rect,
+                   int alignment = wxALIGN_LEFT | wxALIGN_TOP,
+                   int indexAccel = -1, wxRect* rectBounding = NULL);
     void DrawLabel(const wxString& text, const wxRect& rect,
                    int alignment = wxALIGN_LEFT | wxALIGN_TOP,
                    int indexAccel = -1);
@@ -325,7 +326,8 @@ public:
         for filling the shape. Using a transparent brush suppresses filling.
     */
     void DrawPolygon(int n, wxPoint points[], wxCoord xoffset = 0,
-                     wxCoord yoffset = 0, int fill_style = wxODDEVEN_RULE);
+                     wxCoord yoffset = 0,
+                     wxPolygonFillMode fill_style = wxODDEVEN_RULE);
     /**
         This method draws a filled polygon using a list of wxPoints, adding the
         optional offset coordinate. The first and last points are automatically
@@ -346,7 +348,7 @@ public:
     */
     void DrawPolygon(const wxPointList* points,
                      wxCoord xoffset = 0, wxCoord yoffset = 0,
-                     int fill_style = wxODDEVEN_RULE);
+                     wxPolygonFillMode fill_style = wxODDEVEN_RULE);
 
     /**
         Draws two or more filled polygons using an array of @a points, adding
@@ -377,7 +379,7 @@ public:
     */
     void DrawPolyPolygon(int n, int count[], wxPoint points[],
                          wxCoord xoffset = 0, wxCoord yoffset = 0,
-                         int fill_style = wxODDEVEN_RULE);
+                         wxPolygonFillMode fill_style = wxODDEVEN_RULE);
 
     /**
         Draws a rectangle with the given top left corner, and with the given
@@ -469,7 +471,7 @@ public:
               exactly. However the function will still return @true.
     */
     bool FloodFill(wxCoord x, wxCoord y, const wxColour& colour,
-                   int style = wxFLOOD_SURFACE);
+                   wxFloodFillStyle style = wxFLOOD_SURFACE);
 
     /**
         Gets the brush used for painting the background.
@@ -542,14 +544,14 @@ public:
 
         @see SetLogicalFunction()
     */
-    int GetLogicalFunction() const;
+    wxRasterOperationMode GetLogicalFunction() const;
 
     /**
         Gets the mapping mode for the device context.
 
         @see SetMapMode()
     */
-    int GetMapMode() const;
+    wxMappingMode GetMapMode() const;
 
     /**
         Gets the dimensions of the string using the currently selected font.
@@ -650,7 +652,7 @@ public:
         @endWxPythonOnly
     */
     void GetSize(wxCoord* width, wxCoord* height) const;
-    const wxSize GetSize() const;
+    wxSize GetSize() const;
     //@}
 
     //@{
@@ -658,7 +660,7 @@ public:
         Returns the horizontal and vertical resolution in millimetres.
     */
     void GetSizeMM(wxCoord* width, wxCoord* height) const;
-    const wxSize GetSizeMM() const;
+    wxSize GetSizeMM() const;
     //@}
 
     /**
@@ -699,7 +701,7 @@ public:
                        wxCoord* descent = NULL,
                        wxCoord* externalLeading = NULL,
                        const wxFont* font = NULL) const;
-    const wxSize  GetTextExtent(const wxString& string) const;
+    wxSize GetTextExtent(const wxString& string) const;
     //@}
 
     /**
@@ -930,7 +932,7 @@ public:
         operation. wxINVERT is commonly used for drawing rubber bands or moving
         outlines, since drawing twice reverts to the original colour.
     */
-    void SetLogicalFunction(int function);
+    void SetLogicalFunction(wxRasterOperationMode function);
 
     /**
         The mapping mode of the device context defines the unit of measurement
@@ -954,7 +956,7 @@ public:
         - wxMM_LOMETRIC: Each logical unit is 1/10 of a mm.
         - wxMM_TEXT: Each logical unit is 1 device pixel.
     */
-    void SetMapMode(int mode);
+    void SetMapMode(wxMappingMode mode);
 
     /**
         If this is a window DC or memory DC, assigns the given palette to the
@@ -1082,7 +1084,7 @@ public:
                      wxCoord dstWidth, wxCoord dstHeight,
                      wxDC* source, wxCoord xsrc, wxCoord ysrc,
                      wxCoord srcWidth, wxCoord srcHeight,
-                     int logicalFunc = wxCOPY,
+                     wxRasterOperationMode logicalFunc = wxCOPY,
                      bool useMask = false,
                      wxCoord xsrcMask = wxDefaultCoord,
                      wxCoord ysrcMask = wxDefaultCoord);
@@ -1116,7 +1118,8 @@ public:
     @library{wxcore}
     @category{gdi}
 
-    @see wxDC::SetClippingRegion()
+    @see wxDC::SetClippingRegion(), wxDCFontChanger, wxDCTextColourChanger, wxDCPenChanger,
+         wxDCBrushChanger
 */
 class wxDCClipper
 {
@@ -1129,7 +1132,7 @@ public:
     */
     wxDCClipper(wxDC& dc, const wxRegion& r);
     wxDCClipper(wxDC& dc, const wxRect& rect);
-    wxDCClipper(wxDC& dc, int x, int y, int w, int h);
+    wxDCClipper(wxDC& dc, wxCoord x, wxCoord y, wxCoord w, wxCoord h);
     //@}
 
     /**
@@ -1148,7 +1151,8 @@ public:
     @library{wxcore}
     @category{gdi}
 
-    @see wxDC::SetBrush()
+    @see wxDC::SetBrush(), wxDCFontChanger, wxDCTextColourChanger, wxDCPenChanger,
+         wxDCClipper
 */
 class wxDCBrushChanger
 {
@@ -1179,7 +1183,8 @@ public:
     @library{wxcore}
     @category{gdi}
 
-    @see wxDC::SetPen()
+    @see wxDC::SetPen(), wxDCFontChanger, wxDCTextColourChanger, wxDCBrushChanger,
+         wxDCClipper
 */
 class wxDCPenChanger
 {
@@ -1212,7 +1217,8 @@ public:
     @library{wxcore}
     @category{gdi}
 
-    @see wxDC::SetTextForeground()
+    @see wxDC::SetTextForeground(), wxDCFontChanger, wxDCPenChanger, wxDCBrushChanger,
+         wxDCClipper
 */
 class wxDCTextColourChanger
 {
@@ -1246,7 +1252,8 @@ public:
     @library{wxcore}
     @category{gdi}
 
-    @see wxDC::SetFont()
+    @see wxDC::SetFont(), wxDCTextColourChanger, wxDCPenChanger, wxDCBrushChanger,
+         wxDCClipper
 */
 class wxDCFontChanger
 {