]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/themes/gtk.cpp
fixed results of strange cvs code merge
[wxWidgets.git] / src / univ / themes / gtk.cpp
index feebb01f7da5901bc7dcab72f1ecca588c2643d2..776d9cd4e70b184d53f9d9d98f5b002cb8a504ee 100644 (file)
 #include "wx/univ/inphand.h"
 #include "wx/univ/colschem.h"
 #include "wx/univ/theme.h"
+#include "wx/toplevel.h"
 
 // ----------------------------------------------------------------------------
 // constants (to be removed, for testing only)
 // ----------------------------------------------------------------------------
 
-static const size_t BORDER_THICKNESS = 1;
+static const wxCoord BORDER_THICKNESS = 1;
 
 // ----------------------------------------------------------------------------
 // wxGTKRenderer: draw the GUI elements in GTK style
@@ -205,6 +206,39 @@ public:
                                    wxCoord y,
                                    const wxMenuGeometryInfo& geomInfo);
 #endif
+
+    virtual void DrawFrameTitleBar(wxDC& dc,
+                                   const wxRect& rect,
+                                   const wxString& title,
+                                   const wxIcon& icon,
+                                   int flags,
+                                   int specialButton = 0,
+                                   int specialButtonFlag = 0);
+    virtual void DrawFrameBorder(wxDC& dc,
+                                 const wxRect& rect,
+                                 int flags);
+    virtual void DrawFrameBackground(wxDC& dc,
+                                     const wxRect& rect,
+                                     int flags);
+    virtual void DrawFrameTitle(wxDC& dc,
+                                const wxRect& rect,
+                                const wxString& title,
+                                int flags);
+    virtual void DrawFrameIcon(wxDC& dc,
+                               const wxRect& rect,
+                               const wxIcon& icon,
+                               int flags);
+    virtual void DrawFrameButton(wxDC& dc,
+                                 wxCoord x, wxCoord y,
+                                 int button,
+                                 int flags = 0);
+
+    // titlebars
+    virtual wxRect GetFrameClientArea(const wxRect& rect, int flags) const;
+    virtual wxSize GetFrameTotalSize(const wxSize& clientSize, int flags) const;
+    virtual wxSize GetFrameIconSize() const;
+    virtual int HitTestFrame(const wxRect& rect, const wxPoint& pt, int flags) const;
+
     virtual void GetComboBitmaps(wxBitmap *bmpNormal,
                                  wxBitmap *bmpFocus,
                                  wxBitmap *bmpPressed,
@@ -618,6 +652,8 @@ wxInputHandler *wxGTKTheme::GetInputHandler(const wxString& control)
         else if ( control == wxINP_HANDLER_NOTEBOOK )
             handler = new wxStdNotebookInputHandler(GetDefaultInputHandler());
 #endif // wxUSE_NOTEBOOK
+        else if ( control == wxINP_HANDLER_TOPLEVEL )
+            handler = new wxStdFrameInputHandler(GetDefaultInputHandler());
         else
             handler = GetDefaultInputHandler();
 
@@ -2339,6 +2375,75 @@ void wxGTKRenderer::AdjustSize(wxSize *size, const wxWindow *window)
     }
 }
 
+// ----------------------------------------------------------------------------
+// top level windows
+// ----------------------------------------------------------------------------
+
+void wxGTKRenderer::DrawFrameTitleBar(wxDC& dc,
+                                      const wxRect& rect,
+                                      const wxString& title,
+                                      const wxIcon& icon,
+                                      int flags,
+                                      int specialButton,
+                                      int specialButtonFlag)
+{
+}
+
+void wxGTKRenderer::DrawFrameBorder(wxDC& dc,
+                                    const wxRect& rect,
+                                    int flags)
+{
+}
+
+void wxGTKRenderer::DrawFrameBackground(wxDC& dc,
+                                        const wxRect& rect,
+                                        int flags)
+{
+}
+
+void wxGTKRenderer::DrawFrameTitle(wxDC& dc,
+                                   const wxRect& rect,
+                                   const wxString& title,
+                                   int flags)
+{
+}
+
+void wxGTKRenderer::DrawFrameIcon(wxDC& dc,
+                                  const wxRect& rect,
+                                  const wxIcon& icon,
+                                  int flags)
+{
+}
+
+void wxGTKRenderer::DrawFrameButton(wxDC& dc,
+                                    wxCoord x, wxCoord y,
+                                    int button,
+                                    int flags)
+{
+}
+
+wxRect wxGTKRenderer::GetFrameClientArea(const wxRect& rect, int flags) const
+{
+    return rect;
+}
+
+wxSize wxGTKRenderer::GetFrameTotalSize(const wxSize& clientSize, int flags) const
+{
+    return clientSize;
+}
+
+wxSize wxGTKRenderer::GetFrameIconSize() const
+{
+    return wxSize(-1, -1);
+}
+
+int wxGTKRenderer::HitTestFrame(const wxRect& rect, const wxPoint& pt, int flags) const
+{
+    return wxHT_TOPLEVEL_CLIENT_AREA;
+}
+
+
+
 // ============================================================================
 // wxInputHandler
 // ============================================================================