]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/renderer.h
expat define MACOS_CLASSIC added
[wxWidgets.git] / include / wx / renderer.h
index 449927ead8b31f9c3c5340ed5d0e4c1d64477e72..76e7a80090af809bc803aa874535b57b3c5131f6 100644 (file)
 #ifndef _WX_RENDERER_H_
 #define _WX_RENDERER_H_
 
+class WXDLLEXPORT wxDC;
+class WXDLLEXPORT wxWindow;
+
+#include "wx/gdicmn.h" // for wxPoint
+
 // ----------------------------------------------------------------------------
 // constants
 // ----------------------------------------------------------------------------
@@ -57,6 +62,8 @@ enum
 class WXDLLEXPORT wxRendererNative
 {
 public:
+    virtual ~wxRendererNative() { } // stop GCC warning
+
     // drawing functions
     // -----------------
 
@@ -72,6 +79,26 @@ public:
                                     const wxRect& rect,
                                     int flags = 0) = 0;
 
+    // draw the border for sash window: this border must be such that the sash
+    // drawn by DrawSash() blends into it well
+    virtual void DrawSplitterBorder(wxWindow *win,
+                                    wxDC& dc,
+                                    const wxRect& rect) = 0;
+
+    // draw a (vertical) sash
+    virtual void DrawSplitterSash(wxWindow *win,
+                                  wxDC& dc,
+                                  const wxSize& size,
+                                  wxCoord position) = 0;
+
+
+    // geometry functions
+    // ------------------
+
+    // get the splitter parameters: the x field of the returned point is the
+    // sash width and the y field is the border width
+    virtual wxPoint GetSplitterSashAndBorder(const wxWindow *win) = 0;
+
 
     // pseudo constructors
     // -------------------
@@ -102,14 +129,32 @@ public:
                                   const wxRect& rect,
                                   int flags = 0)
         { m_rendererNative.DrawHeaderButton(win, dc, rect, flags); }
+
     virtual void DrawTreeItemButton(wxWindow *win,
                                     wxDC& dc,
                                     const wxRect& rect,
                                     int flags = 0)
         { m_rendererNative.DrawTreeItemButton(win, dc, rect, flags); }
 
+    virtual void DrawSplitterBorder(wxWindow *win,
+                                    wxDC& dc,
+                                    const wxRect& rect)
+        { m_rendererNative.DrawSplitterBorder(win, dc, rect); }
+
+    virtual void DrawSplitterSash(wxWindow *win,
+                                  wxDC& dc,
+                                  const wxSize& size,
+                                  wxCoord position)
+        { m_rendererNative.DrawSplitterSash(win, dc, size, position); }
+
+
+    virtual wxPoint GetSplitterSashAndBorder(const wxWindow *win)
+        { return m_rendererNative.GetSplitterSashAndBorder(win); }
+
 protected:
     wxRendererNative& m_rendererNative;
+
+    DECLARE_NO_COPY_CLASS(wxDelegateRendererNative)
 };
 
 #endif // _WX_RENDERER_H_