]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/themes/gtk.cpp
use type safe list instead of wxList for m_columns
[wxWidgets.git] / src / univ / themes / gtk.cpp
index 68e3117dbcab2c173dfa71e7ba578334cabde8b8..9ef37e16d189e9827fe885bcc48fc8f670298b2b 100644 (file)
@@ -186,6 +186,7 @@ public:
         // we don't have the ticks in GTK version
     }
 
+#if wxUSE_MENUS
     virtual void DrawMenuBarItem(wxDC& dc,
                                  const wxRect& rect,
                                  const wxString& label,
@@ -202,7 +203,7 @@ public:
     virtual void DrawMenuSeparator(wxDC& dc,
                                    wxCoord y,
                                    const wxMenuGeometryInfo& geomInfo);
-
+#endif
     virtual void GetComboBitmaps(wxBitmap *bmpNormal,
                                  wxBitmap *bmpPressed,
                                  wxBitmap *bmpDisabled);
@@ -248,11 +249,12 @@ public:
     virtual wxSize GetSliderThumbSize(const wxRect& rect,
                                       wxOrientation orient) const;
     virtual wxSize GetProgressBarStep() const { return wxSize(16, 32); }
+#if wxUSE_MENUS
 
     virtual wxSize GetMenuBarItemSize(const wxSize& sizeText) const;
     virtual wxMenuGeometryInfo *GetMenuGeometry(wxWindow *win,
                                                 const wxMenu& menu) const;
-
+#endif
     // helpers for "wxBitmap wxColourScheme::Get()"
     void DrawCheckBitmap(wxDC& dc, const wxRect& rect);
     void DrawUncheckBitmap(wxDC& dc, const wxRect& rect, bool isPressed);
@@ -1454,11 +1456,13 @@ void wxGTKRenderer::DrawRadioButton(wxDC& dc,
 // text control
 // ----------------------------------------------------------------------------
 
+static const int TEXT_BORDER = 2;
+
 wxRect wxGTKRenderer::GetTextTotalArea(const wxTextCtrl *text,
                                        const wxRect& rect)
 {
     wxRect rectTotal = rect;
-    rectTotal.Inflate(2);
+    rectTotal.Inflate(TEXT_BORDER);
     return rectTotal;
 }
 
@@ -1467,7 +1471,7 @@ wxRect wxGTKRenderer::GetTextClientArea(const wxTextCtrl *text,
                                         wxCoord *extraSpaceBeyond)
 {
     wxRect rectText = rect;
-    rectText.Inflate(-2);
+    rectText.Inflate(-TEXT_BORDER);
 
     if ( text->WrapLines() )
     {
@@ -1743,6 +1747,7 @@ void wxGTKRenderer::DrawSliderThumb(wxDC& dc,
     DrawShadedRect(dc, &rect, m_penDarkGrey, m_penHighlight);
 }
 
+#if wxUSE_MENUS
 // ----------------------------------------------------------------------------
 // menu and menubar
 // ----------------------------------------------------------------------------
@@ -1787,7 +1792,7 @@ wxMenuGeometryInfo *wxGTKRenderer::GetMenuGeometry(wxWindow *win,
 
     return NULL;
 }
-
+#endif
 // ----------------------------------------------------------------------------
 // combobox
 // ----------------------------------------------------------------------------