]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/themes/win32.cpp
removed src/gtk/eggtrayicon.h
[wxWidgets.git] / src / univ / themes / win32.cpp
index 9dfdf2fc88099271299e89a8ce26123afefe918f..e36989fa53dbf70b31331e60e42cd262a8d961db 100644 (file)
@@ -5,7 +5,7 @@
 // Created:     06.08.00
 // RCS-ID:      $Id$
 // Copyright:   (c) 2000 SciTech Software, Inc. (www.scitechsoft.com)
 // Created:     06.08.00
 // RCS-ID:      $Id$
 // Copyright:   (c) 2000 SciTech Software, Inc. (www.scitechsoft.com)
-// Licence:     wxWindows license
+// Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
 
 // ===========================================================================
 ///////////////////////////////////////////////////////////////////////////////
 
 // ===========================================================================
@@ -38,7 +38,9 @@
     #include "wx/scrolbar.h"
     #include "wx/slider.h"
     #include "wx/textctrl.h"
     #include "wx/scrolbar.h"
     #include "wx/slider.h"
     #include "wx/textctrl.h"
+    #include "wx/listbox.h"
     #include "wx/toolbar.h"
     #include "wx/toolbar.h"
+    #include "wx/statusbr.h"
 
     #ifdef __WXMSW__
         // for COLOR_* constants
 
     #ifdef __WXMSW__
         // for COLOR_* constants
@@ -239,7 +241,8 @@ public:
                                    const wxString& label,
                                    const wxBitmap& bitmap,
                                    const wxRect& rect,
                                    const wxString& label,
                                    const wxBitmap& bitmap,
                                    const wxRect& rect,
-                                   int flags);
+                                   int flags = 0,
+                                   long style = 0);
     virtual void DrawTextLine(wxDC& dc,
                               const wxString& text,
                               const wxRect& rect,
     virtual void DrawTextLine(wxDC& dc,
                               const wxString& text,
                               const wxRect& rect,
@@ -297,7 +300,7 @@ public:
     virtual void DrawStatusField(wxDC& dc,
                                  const wxRect& rect,
                                  const wxString& label,
     virtual void DrawStatusField(wxDC& dc,
                                  const wxRect& rect,
                                  const wxString& label,
-                                 int flags = 0);
+                                 int flags = 0, int style = 0);
 
     // titlebars
     virtual void DrawFrameTitleBar(wxDC& dc,
 
     // titlebars
     virtual void DrawFrameTitleBar(wxDC& dc,
@@ -440,7 +443,7 @@ protected:
     void DrawSunkenBorder(wxDC& dc, wxRect *rect);
 
     // draw the border used for scrollbar arrows
     void DrawSunkenBorder(wxDC& dc, wxRect *rect);
 
     // draw the border used for scrollbar arrows
-    void DrawArrowBorder(wxDC& dc, wxRect *rect, bool isPressed = FALSE);
+    void DrawArrowBorder(wxDC& dc, wxRect *rect, bool isPressed = false);
 
     // public DrawArrow()s helper
     void DrawArrow(wxDC& dc, const wxRect& rect,
 
     // public DrawArrow()s helper
     void DrawArrow(wxDC& dc, const wxRect& rect,
@@ -466,7 +469,7 @@ protected:
     void DrawLine(wxDC& dc,
                   wxCoord x1, wxCoord y1,
                   wxCoord x2, wxCoord y2,
     void DrawLine(wxDC& dc,
                   wxCoord x1, wxCoord y1,
                   wxCoord x2, wxCoord y2,
-                  bool transpose = FALSE)
+                  bool transpose = false)
     {
         if ( transpose )
             dc.DrawLine(y1, x1, y2, x2);
     {
         if ( transpose )
             dc.DrawLine(y1, x1, y2, x2);
@@ -548,7 +551,8 @@ public:
 protected:
     virtual bool IsAllowedButton(int button) { return button == 1; }
 
 protected:
     virtual bool IsAllowedButton(int button) { return button == 1; }
 
-    virtual void Highlight(wxScrollBar *scrollbar, bool doIt)
+    virtual void Highlight(wxScrollBar * WXUNUSED(scrollbar),
+                           bool WXUNUSED(doIt))
     {
         // we don't highlight anything
     }
     {
         // we don't highlight anything
     }
@@ -656,7 +660,7 @@ protected:
 // wxWin32Theme
 // ----------------------------------------------------------------------------
 
 // wxWin32Theme
 // ----------------------------------------------------------------------------
 
-WX_DEFINE_ARRAY(wxInputHandler *, wxArrayHandlers);
+WX_DEFINE_ARRAY_PTR(wxInputHandler *, wxArrayHandlers);
 
 class wxWin32Theme : public wxTheme
 {
 
 class wxWin32Theme : public wxTheme
 {
@@ -1328,21 +1332,32 @@ wxColour wxWin32ColourScheme::GetBackground(wxWindow *win) const
         col = win->GetBackgroundColour();
     }
 
         col = win->GetBackgroundColour();
     }
 
-    if ( win->IsContainerWindow() )
+    if ( !win->ShouldInheritColours() )
     {
         wxTextCtrl *text = wxDynamicCast(win, wxTextCtrl);
     {
         wxTextCtrl *text = wxDynamicCast(win, wxTextCtrl);
-        if ( text )
+#if wxUSE_LISTBOX
+        wxListBox* listBox = wxDynamicCast(win, wxListBox);
+#endif        
+        if ( text
+#if wxUSE_LISTBOX
+         || listBox
+#endif         
+          )
         {
         {
-            if ( !text->IsEnabled() ) // not IsEditable()
+            if ( !win->IsEnabled() ) // not IsEditable()
                 col = Get(CONTROL);
                 col = Get(CONTROL);
-            //else: execute code below
-        }
-
-        if ( !col.Ok() )
-        {
-            // doesn't depend on the state
-            col = Get(WINDOW);
+            else
+            {
+                if ( !col.Ok() )
+                {
+                    // doesn't depend on the state
+                    col = Get(WINDOW);
+                }
+            }
         }
         }
+        
+        if (!col.Ok())
+            col = Get(CONTROL); // Most controls should be this colour, not WINDOW
     }
     else
     {
     }
     else
     {
@@ -1902,7 +1917,7 @@ wxRect wxWin32Renderer::GetBorderDimensions(wxBorder border) const
 
 bool wxWin32Renderer::AreScrollbarsInsideBorder() const
 {
 
 bool wxWin32Renderer::AreScrollbarsInsideBorder() const
 {
-    return TRUE;
+    return true;
 }
 
 // ----------------------------------------------------------------------------
 }
 
 // ----------------------------------------------------------------------------
@@ -2269,7 +2284,7 @@ void wxWin32Renderer::DrawCheckItem(wxDC& dc,
     }
 
     dc.DrawBitmap(bmp, rect.x, rect.y + (rect.height - bmp.GetHeight()) / 2 - 1,
     }
 
     dc.DrawBitmap(bmp, rect.x, rect.y + (rect.height - bmp.GetHeight()) / 2 - 1,
-                  TRUE /* use mask */);
+                  true /* use mask */);
 
     wxRect rectLabel = rect;
     int bmpWidth = bmp.GetWidth();
 
     wxRect rectLabel = rect;
     int bmpWidth = bmp.GetWidth();
@@ -2350,7 +2365,7 @@ void wxWin32Renderer::DrawCheckOrRadioButton(wxDC& dc,
         rectLabel.SetRight(rect.GetRight());
     }
 
         rectLabel.SetRight(rect.GetRight());
     }
 
-    dc.DrawBitmap(bitmap, xBmp, yBmp, TRUE /* use mask */);
+    dc.DrawBitmap(bitmap, xBmp, yBmp, true /* use mask */);
 
     DoDrawLabel(
                 dc, label, rectLabel,
 
     DoDrawLabel(
                 dc, label, rectLabel,
@@ -2407,9 +2422,10 @@ void wxWin32Renderer::DrawToolBarButton(wxDC& dc,
                                         const wxString& label,
                                         const wxBitmap& bitmap,
                                         const wxRect& rectOrig,
                                         const wxString& label,
                                         const wxBitmap& bitmap,
                                         const wxRect& rectOrig,
-                                        int flags)
+                                        int flags,
+                                        long style)
 {
 {
-    if ( !label.empty() || bitmap.Ok() )
+    if (style == wxTOOL_STYLE_BUTTON)
     {
         wxRect rect = rectOrig;
         rect.Deflate(BORDER_THICKNESS);
     {
         wxRect rect = rectOrig;
         rect.Deflate(BORDER_THICKNESS);
@@ -2425,7 +2441,7 @@ void wxWin32Renderer::DrawToolBarButton(wxDC& dc,
 
         dc.DrawLabel(label, bitmap, rect, wxALIGN_CENTRE);
     }
 
         dc.DrawLabel(label, bitmap, rect, wxALIGN_CENTRE);
     }
-    else // a separator
+    else if (style == wxTOOL_STYLE_SEPARATOR)
     {
         // leave a small gap aroudn the line, also account for the toolbar
         // border itself
     {
         // leave a small gap aroudn the line, also account for the toolbar
         // border itself
@@ -2433,6 +2449,7 @@ void wxWin32Renderer::DrawToolBarButton(wxDC& dc,
                          rectOrig.y + 2*BORDER_THICKNESS,
                          rectOrig.GetBottom() - BORDER_THICKNESS);
     }
                          rectOrig.y + 2*BORDER_THICKNESS,
                          rectOrig.GetBottom() - BORDER_THICKNESS);
     }
+    // don't draw wxTOOL_STYLE_CONTROL
 }
 
 // ----------------------------------------------------------------------------
 }
 
 // ----------------------------------------------------------------------------
@@ -2450,7 +2467,9 @@ void wxWin32Renderer::DrawTextLine(wxDC& dc,
     StandardDrawTextLine(dc, text, rect, selStart, selEnd, flags);
 }
 
     StandardDrawTextLine(dc, text, rect, selStart, selEnd, flags);
 }
 
-void wxWin32Renderer::DrawLineWrapMark(wxDC& dc, const wxRect& rect)
+void
+wxWin32Renderer::DrawLineWrapMark(wxDC& WXUNUSED(dc),
+                                  const wxRect& WXUNUSED(rect))
 {
     // we don't draw them
 }
 {
     // we don't draw them
 }
@@ -2581,9 +2600,10 @@ void wxWin32Renderer::DrawTab(wxDC& dc,
 // slider
 // ----------------------------------------------------------------------------
 
 // slider
 // ----------------------------------------------------------------------------
 
-wxSize wxWin32Renderer::GetSliderThumbSize(const wxRect& rect,
-                                           int lenThumb,
-                                           wxOrientation orient) const
+wxSize
+wxWin32Renderer::GetSliderThumbSize(const wxRect& WXUNUSED(rect),
+                                    int lenThumb,
+                                    wxOrientation orient) const
 {
     wxSize size;
     wxCoord width  = wxMax (lenThumb, SLIDER_THUMB_LENGTH) / 2;
 {
     wxSize size;
     wxCoord width  = wxMax (lenThumb, SLIDER_THUMB_LENGTH) / 2;
@@ -2854,7 +2874,7 @@ void wxWin32Renderer::DrawSliderTicks(wxDC& dc,
                                       int start,
                                       int end,
                                       int step,
                                       int start,
                                       int end,
                                       int step,
-                                      int flags,
+                                      int WXUNUSED(flags),
                                       long style)
 {
     /*    show ticks geometry
                                       long style)
 {
     /*    show ticks geometry
@@ -3119,7 +3139,7 @@ wxMenuGeometryInfo *wxWin32Renderer::GetMenuGeometry(wxWindow *win,
             widthAccelMax = 0,
             widthBmpMax = MENU_LEFT_MARGIN;
 
             widthAccelMax = 0,
             widthBmpMax = MENU_LEFT_MARGIN;
 
-    for ( wxMenuItemList::Node *node = menu.GetMenuItems().GetFirst();
+    for ( wxMenuItemList::compatibility_iterator node = menu.GetMenuItems().GetFirst();
           node;
           node = node->GetNext() )
     {
           node;
           node = node->GetNext() )
     {
@@ -3205,7 +3225,7 @@ wxSize wxWin32Renderer::GetStatusBarBorders(wxCoord *borderBetweenFields) const
 void wxWin32Renderer::DrawStatusField(wxDC& dc,
                                       const wxRect& rect,
                                       const wxString& label,
 void wxWin32Renderer::DrawStatusField(wxDC& dc,
                                       const wxRect& rect,
                                       const wxString& label,
-                                      int flags)
+                                      int flags, int style /*=0*/)
 {
     wxRect rectIn;
 
 {
     wxRect rectIn;
 
@@ -3221,9 +3241,15 @@ void wxWin32Renderer::DrawStatusField(wxDC& dc,
                 y2 = rect.GetBottom();
 
         // draw the upper left part of the rect normally
                 y2 = rect.GetBottom();
 
         // draw the upper left part of the rect normally
-        dc.SetPen(m_penDarkGrey);
-        dc.DrawLine(rect.GetLeft(), rect.GetTop(), rect.GetLeft(), y2);
-        dc.DrawLine(rect.GetLeft() + 1, rect.GetTop(), x2, rect.GetTop());
+        if (style != wxSB_FLAT)
+        {
+            if (style == wxSB_RAISED)
+                dc.SetPen(m_penHighlight);
+            else
+                dc.SetPen(m_penDarkGrey);
+            dc.DrawLine(rect.GetLeft(), rect.GetTop(), rect.GetLeft(), y2);
+            dc.DrawLine(rect.GetLeft() + 1, rect.GetTop(), x2, rect.GetTop());
+        }
 
         // draw the grey stripes of the grip
         size_t n;
 
         // draw the grey stripes of the grip
         size_t n;
@@ -3243,9 +3269,16 @@ void wxWin32Renderer::DrawStatusField(wxDC& dc,
         }
 
         // draw the remaining rect boundaries
         }
 
         // draw the remaining rect boundaries
-        ofs -= WIDTH_STATUSBAR_GRIP_BAND;
-        dc.DrawLine(x2, rect.GetTop(), x2, y2 - ofs + 1);
-        dc.DrawLine(rect.GetLeft(), y2, x2 - ofs + 1, y2);
+        if (style != wxSB_FLAT)
+        {
+            if (style == wxSB_RAISED)
+                dc.SetPen(m_penDarkGrey);
+            else
+                dc.SetPen(m_penHighlight);
+            ofs -= WIDTH_STATUSBAR_GRIP_BAND;
+            dc.DrawLine(x2, rect.GetTop(), x2, y2 - ofs + 1);
+            dc.DrawLine(rect.GetLeft(), y2, x2 - ofs + 1, y2);
+        }
 
         rectIn = rect;
         rectIn.Deflate(1);
 
         rectIn = rect;
         rectIn.Deflate(1);
@@ -3254,7 +3287,10 @@ void wxWin32Renderer::DrawStatusField(wxDC& dc,
     }
     else // normal pane
     {
     }
     else // normal pane
     {
-        DrawBorder(dc, wxBORDER_STATIC, rect, flags, &rectIn);
+        if (style == wxSB_RAISED)
+            DrawBorder(dc, wxBORDER_RAISED, rect, flags, &rectIn);
+        else if (style != wxSB_FLAT)
+            DrawBorder(dc, wxBORDER_STATIC, rect, flags, &rectIn);
     }
 
     rectIn.Deflate(STATBAR_BORDER_X, STATBAR_BORDER_Y);
     }
 
     rectIn.Deflate(STATBAR_BORDER_X, STATBAR_BORDER_Y);
@@ -3268,7 +3304,7 @@ void wxWin32Renderer::DrawStatusField(wxDC& dc,
 // ----------------------------------------------------------------------------
 
 void wxWin32Renderer::GetComboBitmaps(wxBitmap *bmpNormal,
 // ----------------------------------------------------------------------------
 
 void wxWin32Renderer::GetComboBitmaps(wxBitmap *bmpNormal,
-                                      wxBitmap *bmpFocus,
+                                      wxBitmap * WXUNUSED(bmpFocus),
                                       wxBitmap *bmpPressed,
                                       wxBitmap *bmpDisabled)
 {
                                       wxBitmap *bmpPressed,
                                       wxBitmap *bmpDisabled)
 {
@@ -3309,7 +3345,7 @@ void wxWin32Renderer::GetComboBitmaps(wxBitmap *bmpNormal,
 void wxWin32Renderer::DoDrawBackground(wxDC& dc,
                                        const wxColour& col,
                                        const wxRect& rect,
 void wxWin32Renderer::DoDrawBackground(wxDC& dc,
                                        const wxColour& col,
                                        const wxRect& rect,
-                                       wxWindow *window )
+                                       wxWindow * WXUNUSED(window))
 {
     wxBrush brush(col, wxSOLID);
     dc.SetBrush(brush);
 {
     wxBrush brush(col, wxSOLID);
     dc.SetBrush(brush);
@@ -3320,8 +3356,8 @@ void wxWin32Renderer::DoDrawBackground(wxDC& dc,
 void wxWin32Renderer::DrawBackground(wxDC& dc,
                                      const wxColour& col,
                                      const wxRect& rect,
 void wxWin32Renderer::DrawBackground(wxDC& dc,
                                      const wxColour& col,
                                      const wxRect& rect,
-                                     int flags,
-                                     wxWindow *window )
+                                     int WXUNUSED(flags),
+                                     wxWindow *window)
 {
     // just fill it with the given or default bg colour
     wxColour colBg = col.Ok() ? col : wxSCHEME_COLOUR(m_scheme, CONTROL);
 {
     // just fill it with the given or default bg colour
     wxColour colBg = col.Ok() ? col : wxSCHEME_COLOUR(m_scheme, CONTROL);
@@ -3382,7 +3418,7 @@ void wxWin32Renderer::DrawArrow(wxDC& dc,
         x--;
 
     // draw it
         x--;
 
     // draw it
-    dc.DrawBitmap(bmp, x, y, TRUE /* use mask */);
+    dc.DrawBitmap(bmp, x, y, true /* use mask */);
 }
 
 void wxWin32Renderer::DrawArrowButton(wxDC& dc,
 }
 
 void wxWin32Renderer::DrawArrowButton(wxDC& dc,
@@ -3397,9 +3433,9 @@ void wxWin32Renderer::DrawArrowButton(wxDC& dc,
 }
 
 void wxWin32Renderer::DrawScrollbarThumb(wxDC& dc,
 }
 
 void wxWin32Renderer::DrawScrollbarThumb(wxDC& dc,
-                                         wxOrientation orient,
+                                         wxOrientation WXUNUSED(orient),
                                          const wxRect& rect,
                                          const wxRect& rect,
-                                         int flags)
+                                         int WXUNUSED(flags))
 {
     // we don't use the flags, the thumb never changes appearance
     wxRect rectThumb = rect;
 {
     // we don't use the flags, the thumb never changes appearance
     wxRect rectThumb = rect;
@@ -3408,7 +3444,7 @@ void wxWin32Renderer::DrawScrollbarThumb(wxDC& dc,
 }
 
 void wxWin32Renderer::DrawScrollbarShaft(wxDC& dc,
 }
 
 void wxWin32Renderer::DrawScrollbarShaft(wxDC& dc,
-                                         wxOrientation orient,
+                                         wxOrientation WXUNUSED(orient),
                                          const wxRect& rectBar,
                                          int flags)
 {
                                          const wxRect& rectBar,
                                          int flags)
 {
@@ -3591,7 +3627,6 @@ void wxWin32Renderer::DrawFrameTitleBar(wxDC& dc,
             DrawFrameButton(dc, x, y, wxTOPLEVEL_BUTTON_HELP,
                             (specialButton == wxTOPLEVEL_BUTTON_HELP) ?
                             specialButtonFlags : 0);
             DrawFrameButton(dc, x, y, wxTOPLEVEL_BUTTON_HELP,
                             (specialButton == wxTOPLEVEL_BUTTON_HELP) ?
                             specialButtonFlags : 0);
-            x -= FRAME_BUTTON_WIDTH;
         }
     }
 }
         }
     }
 }
@@ -3733,14 +3768,14 @@ void wxWin32Renderer::DrawFrameButton(wxDC& dc,
         DrawShadedRect(dc, &r, m_penBlack, m_penHighlight);
         DrawShadedRect(dc, &r, m_penDarkGrey, m_penLightGrey);
         DrawBackground(dc, wxSCHEME_COLOUR(m_scheme, CONTROL), r);
         DrawShadedRect(dc, &r, m_penBlack, m_penHighlight);
         DrawShadedRect(dc, &r, m_penDarkGrey, m_penLightGrey);
         DrawBackground(dc, wxSCHEME_COLOUR(m_scheme, CONTROL), r);
-        dc.DrawBitmap(m_bmpFrameButtons[idx], r.x+1, r.y+1, TRUE);
+        dc.DrawBitmap(m_bmpFrameButtons[idx], r.x+1, r.y+1, true);
     }
     else
     {
         DrawShadedRect(dc, &r, m_penHighlight, m_penBlack);
         DrawShadedRect(dc, &r, m_penLightGrey, m_penDarkGrey);
         DrawBackground(dc, wxSCHEME_COLOUR(m_scheme, CONTROL), r);
     }
     else
     {
         DrawShadedRect(dc, &r, m_penHighlight, m_penBlack);
         DrawShadedRect(dc, &r, m_penLightGrey, m_penDarkGrey);
         DrawBackground(dc, wxSCHEME_COLOUR(m_scheme, CONTROL), r);
-        dc.DrawBitmap(m_bmpFrameButtons[idx], r.x, r.y, TRUE);
+        dc.DrawBitmap(m_bmpFrameButtons[idx], r.x, r.y, true);
     }
 }
 
     }
 }
 
@@ -4017,8 +4052,9 @@ static inline int GetTextBorderWidth()
     return 1;
 }
 
     return 1;
 }
 
-wxRect wxWin32Renderer::GetTextTotalArea(const wxTextCtrl *text,
-                                         const wxRect& rect) const
+wxRect
+wxWin32Renderer::GetTextTotalArea(const wxTextCtrl * WXUNUSED(text),
+                                  const wxRect& rect) const
 {
     wxRect rectTotal = rect;
 
 {
     wxRect rectTotal = rect;
 
@@ -4031,9 +4067,10 @@ wxRect wxWin32Renderer::GetTextTotalArea(const wxTextCtrl *text,
     return rectTotal;
 }
 
     return rectTotal;
 }
 
-wxRect wxWin32Renderer::GetTextClientArea(const wxTextCtrl *text,
-                                          const wxRect& rect,
-                                          wxCoord *extraSpaceBeyond) const
+wxRect
+wxWin32Renderer::GetTextClientArea(const wxTextCtrl * WXUNUSED(text),
+                                   const wxRect& rect,
+                                   wxCoord *extraSpaceBeyond) const
 {
     wxRect rectText = rect;
 
 {
     wxRect rectText = rect;
 
@@ -4090,9 +4127,9 @@ void wxWin32Renderer::AdjustSize(wxSize *size, const wxWindow *window)
         // less than the standard one, but not when display not PDAs.
         if (wxSystemSettings::GetScreenType() > wxSYS_SCREEN_PDA)
         {
         // less than the standard one, but not when display not PDAs.
         if (wxSystemSettings::GetScreenType() > wxSYS_SCREEN_PDA)
         {
-        if ( !(window->GetWindowStyle() & wxBU_EXACTFIT) )
+            if ( !(window->GetWindowStyle() & wxBU_EXACTFIT) )
             {
             {
-                       wxSize szDef = wxButton::GetDefaultSize();
+                wxSize szDef = wxButton::GetDefaultSize();
                 if ( size->x < szDef.x )
                     size->x = szDef.x;
             }
                 if ( size->x < szDef.x )
                     size->x = szDef.x;
             }
@@ -4122,11 +4159,11 @@ wxWin32InputHandler::wxWin32InputHandler(wxWin32Renderer *renderer)
     m_renderer = renderer;
 }
 
     m_renderer = renderer;
 }
 
-bool wxWin32InputHandler::HandleKey(wxInputConsumer *control,
-                                    const wxKeyEvent& event,
-                                    bool pressed)
+bool wxWin32InputHandler::HandleKey(wxInputConsumer * WXUNUSED(control),
+                                    const wxKeyEvent& WXUNUSED(event),
+                                    bool WXUNUSED(pressed))
 {
 {
-    return FALSE;
+    return false;
 }
 
 bool wxWin32InputHandler::HandleMouse(wxInputConsumer *control,
 }
 
 bool wxWin32InputHandler::HandleMouse(wxInputConsumer *control,
@@ -4142,11 +4179,11 @@ bool wxWin32InputHandler::HandleMouse(wxInputConsumer *control,
         {
             win->SetFocus();
 
         {
             win->SetFocus();
 
-            return TRUE;
+            return true;
         }
     }
 
         }
     }
 
-    return FALSE;
+    return false;
 }
 
 // ----------------------------------------------------------------------------
 }
 
 // ----------------------------------------------------------------------------
@@ -4158,7 +4195,7 @@ wxWin32ScrollBarInputHandler(wxWin32Renderer *renderer,
                              wxInputHandler *handler)
         : wxStdScrollBarInputHandler(renderer, handler)
 {
                              wxInputHandler *handler)
         : wxStdScrollBarInputHandler(renderer, handler)
 {
-    m_scrollPaused = FALSE;
+    m_scrollPaused = false;
     m_interval = 0;
 }
 
     m_interval = 0;
 }
 
@@ -4167,7 +4204,7 @@ bool wxWin32ScrollBarInputHandler::OnScrollTimer(wxScrollBar *scrollbar,
 {
     // stop if went beyond the position of the original click (this can only
     // happen when we scroll by pages)
 {
     // stop if went beyond the position of the original click (this can only
     // happen when we scroll by pages)
-    bool stop = FALSE;
+    bool stop = false;
     if ( action == wxACTION_SCROLL_PAGE_DOWN )
     {
         stop = m_renderer->HitTestScrollbar(scrollbar, m_ptStartScrolling)
     if ( action == wxACTION_SCROLL_PAGE_DOWN )
     {
         stop = m_renderer->HitTestScrollbar(scrollbar, m_ptStartScrolling)
@@ -4185,7 +4222,7 @@ bool wxWin32ScrollBarInputHandler::OnScrollTimer(wxScrollBar *scrollbar,
 
         scrollbar->Refresh();
 
 
         scrollbar->Refresh();
 
-        return FALSE;
+        return false;
     }
 
     return wxStdScrollBarInputHandler::OnScrollTimer(scrollbar, action);
     }
 
     return wxStdScrollBarInputHandler::OnScrollTimer(scrollbar, action);
@@ -4218,12 +4255,12 @@ bool wxWin32ScrollBarInputHandler::HandleMouseMove(wxInputConsumer *control,
     // mouse move events normally - only do it while mouse is captured (i.e.
     // when we're dragging the thumb or pressing on something)
     if ( !m_winCapture )
     // mouse move events normally - only do it while mouse is captured (i.e.
     // when we're dragging the thumb or pressing on something)
     if ( !m_winCapture )
-        return FALSE;
+        return false;
 
     if ( event.Entering() )
     {
         // we're not interested in this at all
 
     if ( event.Entering() )
     {
         // we're not interested in this at all
-        return FALSE;
+        return false;
     }
 
     wxScrollBar *scrollbar = wxStaticCast(control->GetInputWindow(), wxScrollBar);
     }
 
     wxScrollBar *scrollbar = wxStaticCast(control->GetInputWindow(), wxScrollBar);
@@ -4235,20 +4272,20 @@ bool wxWin32ScrollBarInputHandler::HandleMouseMove(wxInputConsumer *control,
         if ( event.Leaving() )
         {
             // it surely didn't
         if ( event.Leaving() )
         {
             // it surely didn't
-            return FALSE;
+            return false;
         }
 
         ht = m_renderer->HitTestScrollbar(scrollbar, event.GetPosition());
         if ( ht == m_htLast )
         {
             // yes it did, resume scrolling
         }
 
         ht = m_renderer->HitTestScrollbar(scrollbar, event.GetPosition());
         if ( ht == m_htLast )
         {
             // yes it did, resume scrolling
-            m_scrollPaused = FALSE;
+            m_scrollPaused = false;
             if ( m_timerScroll )
             {
                 // we were scrolling by line/page, restart timer
                 m_timerScroll->Start(m_interval);
 
             if ( m_timerScroll )
             {
                 // we were scrolling by line/page, restart timer
                 m_timerScroll->Start(m_interval);
 
-                Press(scrollbar, TRUE);
+                Press(scrollbar, true);
             }
             else // we were dragging the thumb
             {
             }
             else // we were dragging the thumb
             {
@@ -4256,7 +4293,7 @@ bool wxWin32ScrollBarInputHandler::HandleMouseMove(wxInputConsumer *control,
                 HandleThumbMove(scrollbar, m_eventLastDrag);
             }
 
                 HandleThumbMove(scrollbar, m_eventLastDrag);
             }
 
-            return TRUE;
+            return true;
         }
     }
     else // normal case, scrolling hasn't been paused
         }
     }
     else // normal case, scrolling hasn't been paused
@@ -4308,10 +4345,10 @@ bool wxWin32ScrollBarInputHandler::HandleMouseMove(wxInputConsumer *control,
                 // pause scrolling
                 m_interval = m_timerScroll->GetInterval();
                 m_timerScroll->Stop();
                 // pause scrolling
                 m_interval = m_timerScroll->GetInterval();
                 m_timerScroll->Stop();
-                m_scrollPaused = TRUE;
+                m_scrollPaused = true;
 
                 // unpress the arrow
 
                 // unpress the arrow
-                Press(scrollbar, FALSE);
+                Press(scrollbar, false);
             }
             else // we were dragging the thumb
             {
             }
             else // we were dragging the thumb
             {
@@ -4324,7 +4361,7 @@ bool wxWin32ScrollBarInputHandler::HandleMouseMove(wxInputConsumer *control,
                 HandleThumbMove(scrollbar, m_eventStartDrag);
             }
 
                 HandleThumbMove(scrollbar, m_eventStartDrag);
             }
 
-            return TRUE;
+            return true;
         }
     }
 
         }
     }
 
@@ -4361,15 +4398,15 @@ bool wxWin32CheckboxInputHandler::HandleKey(wxInputConsumer *control,
                 break;
         }
 
                 break;
         }
 
-        if ( !!action )
+        if ( !action.IsEmpty() )
         {
             control->PerformAction(action);
 
         {
             control->PerformAction(action);
 
-            return TRUE;
+            return true;
         }
     }
 
         }
     }
 
-    return FALSE;
+    return false;
 }
 
 // ----------------------------------------------------------------------------
 }
 
 // ----------------------------------------------------------------------------
@@ -4403,7 +4440,7 @@ bool wxWin32TextCtrlInputHandler::HandleKey(wxInputConsumer *control,
         {
             control->PerformAction(action);
 
         {
             control->PerformAction(action);
 
-            return TRUE;
+            return true;
         }
     }
 
         }
     }
 
@@ -4418,7 +4455,7 @@ wxWin32StatusBarInputHandler::
 wxWin32StatusBarInputHandler(wxInputHandler *handler)
     : wxStdInputHandler(handler)
 {
 wxWin32StatusBarInputHandler(wxInputHandler *handler)
     : wxStdInputHandler(handler)
 {
-    m_isOnGrip = FALSE;
+    m_isOnGrip = false;
 }
 
 bool wxWin32StatusBarInputHandler::IsOnGrip(wxWindow *statbar,
 }
 
 bool wxWin32StatusBarInputHandler::IsOnGrip(wxWindow *statbar,
@@ -4430,7 +4467,7 @@ bool wxWin32StatusBarInputHandler::IsOnGrip(wxWindow *statbar,
         wxTopLevelWindow *
             parentTLW = wxDynamicCast(statbar->GetParent(), wxTopLevelWindow);
 
         wxTopLevelWindow *
             parentTLW = wxDynamicCast(statbar->GetParent(), wxTopLevelWindow);
 
-        wxCHECK_MSG( parentTLW, FALSE,
+        wxCHECK_MSG( parentTLW, false,
                      _T("the status bar should be a child of a TLW") );
 
         // a maximized window can't be resized anyhow
                      _T("the status bar should be a child of a TLW") );
 
         // a maximized window can't be resized anyhow
@@ -4448,7 +4485,7 @@ bool wxWin32StatusBarInputHandler::IsOnGrip(wxWindow *statbar,
         }
     }
 
         }
     }
 
-    return FALSE;
+    return false;
 }
 
 bool wxWin32StatusBarInputHandler::HandleMouse(wxInputConsumer *consumer,
 }
 
 bool wxWin32StatusBarInputHandler::HandleMouse(wxInputConsumer *consumer,
@@ -4471,7 +4508,7 @@ bool wxWin32StatusBarInputHandler::HandleMouse(wxInputConsumer *consumer,
 
                     statbar->SetCursor(m_cursorOld);
 
 
                     statbar->SetCursor(m_cursorOld);
 
-                    return TRUE;
+                    return true;
                 }
             }
         }
                 }
             }
         }
@@ -4523,7 +4560,9 @@ private:
    
     wxWin32FrameInputHandler *m_inputHnd;
     wxTopLevelWindow         *m_wnd;
    
     wxWin32FrameInputHandler *m_inputHnd;
     wxTopLevelWindow         *m_wnd;
+#if wxUSE_ACCEL
     wxAcceleratorTable        m_oldAccelTable;
     wxAcceleratorTable        m_oldAccelTable;
+#endif
 };
 
 wxWin32SystemMenuEvtHandler::wxWin32SystemMenuEvtHandler(
 };
 
 wxWin32SystemMenuEvtHandler::wxWin32SystemMenuEvtHandler(
@@ -4540,6 +4579,7 @@ void wxWin32SystemMenuEvtHandler::Attach(wxInputConsumer *consumer)
     m_wnd = wxStaticCast(consumer->GetInputWindow(), wxTopLevelWindow);
     m_wnd->PushEventHandler(this);
     
     m_wnd = wxStaticCast(consumer->GetInputWindow(), wxTopLevelWindow);
     m_wnd->PushEventHandler(this);
     
+#if wxUSE_ACCEL
     // VS: This code relies on using generic implementation of 
     //     wxAcceleratorTable in wxUniv!
     wxAcceleratorTable table = *m_wnd->GetAcceleratorTable();
     // VS: This code relies on using generic implementation of 
     //     wxAcceleratorTable in wxUniv!
     wxAcceleratorTable table = *m_wnd->GetAcceleratorTable();
@@ -4547,13 +4587,16 @@ void wxWin32SystemMenuEvtHandler::Attach(wxInputConsumer *consumer)
     table.Add(wxAcceleratorEntry(wxACCEL_ALT, WXK_SPACE, wxID_SYSTEM_MENU));
     table.Add(wxAcceleratorEntry(wxACCEL_ALT, WXK_F4, wxID_CLOSE_FRAME));
     m_wnd->SetAcceleratorTable(table);
     table.Add(wxAcceleratorEntry(wxACCEL_ALT, WXK_SPACE, wxID_SYSTEM_MENU));
     table.Add(wxAcceleratorEntry(wxACCEL_ALT, WXK_F4, wxID_CLOSE_FRAME));
     m_wnd->SetAcceleratorTable(table);
+#endif
 }
 
 void wxWin32SystemMenuEvtHandler::Detach()
 {
     if ( m_wnd )
     {
 }
 
 void wxWin32SystemMenuEvtHandler::Detach()
 {
     if ( m_wnd )
     {
+#if wxUSE_ACCEL
         m_wnd->SetAcceleratorTable(m_oldAccelTable);
         m_wnd->SetAcceleratorTable(m_oldAccelTable);
+#endif
         m_wnd->RemoveEventHandler(this); 
         m_wnd = NULL;
     }
         m_wnd->RemoveEventHandler(this); 
         m_wnd = NULL;
     }
@@ -4575,10 +4618,16 @@ void wxWin32SystemMenuEvtHandler::OnSystemMenu(wxCommandEvent &WXUNUSED(event))
     pt.x = -pt.x + border;
     pt.y = -pt.y + border + FRAME_TITLEBAR_HEIGHT;
 
     pt.x = -pt.x + border;
     pt.y = -pt.y + border + FRAME_TITLEBAR_HEIGHT;
 
+#if wxUSE_ACCEL
     wxAcceleratorTable table = *m_wnd->GetAcceleratorTable();
     m_wnd->SetAcceleratorTable(wxNullAcceleratorTable);
     wxAcceleratorTable table = *m_wnd->GetAcceleratorTable();
     m_wnd->SetAcceleratorTable(wxNullAcceleratorTable);
+#endif
+
     m_inputHnd->PopupSystemMenu(m_wnd, pt);
     m_inputHnd->PopupSystemMenu(m_wnd, pt);
+
+#if wxUSE_ACCEL
     m_wnd->SetAcceleratorTable(table);
     m_wnd->SetAcceleratorTable(table);
+#endif
 }
 
 void wxWin32SystemMenuEvtHandler::OnCloseFrame(wxCommandEvent &WXUNUSED(event))
 }
 
 void wxWin32SystemMenuEvtHandler::OnCloseFrame(wxCommandEvent &WXUNUSED(event))
@@ -4624,7 +4673,7 @@ bool wxWin32FrameInputHandler::HandleMouse(wxInputConsumer *consumer,
             tlw->PerformAction(wxACTION_TOPLEVEL_BUTTON_CLICK,
                                tlw->IsMaximized() ? wxTOPLEVEL_BUTTON_RESTORE
                                                   : wxTOPLEVEL_BUTTON_MAXIMIZE);
             tlw->PerformAction(wxACTION_TOPLEVEL_BUTTON_CLICK,
                                tlw->IsMaximized() ? wxTOPLEVEL_BUTTON_RESTORE
                                                   : wxTOPLEVEL_BUTTON_MAXIMIZE);
-            return TRUE;
+            return true;
         }
         else if ( tlw->GetWindowStyle() & wxSYSTEM_MENU )
         {
         }
         else if ( tlw->GetWindowStyle() & wxSYSTEM_MENU )
         {
@@ -4634,7 +4683,7 @@ bool wxWin32FrameInputHandler::HandleMouse(wxInputConsumer *consumer,
                        hit == wxHT_TOPLEVEL_ICON)) )
             {
                 PopupSystemMenu(tlw, event.GetPosition());
                        hit == wxHT_TOPLEVEL_ICON)) )
             {
                 PopupSystemMenu(tlw, event.GetPosition());
-                return TRUE;
+                return true;
             }
         }
     }
             }
         }
     }
@@ -4663,13 +4712,13 @@ void wxWin32FrameInputHandler::PopupSystemMenu(wxTopLevelWindow *window,
     {
         if ( window->IsMaximized() )
         {
     {
         if ( window->IsMaximized() )
         {
-            menu->Enable(wxID_MAXIMIZE_FRAME, FALSE);
-            menu->Enable(wxID_MOVE_FRAME, FALSE);
+            menu->Enable(wxID_MAXIMIZE_FRAME, false);
+            menu->Enable(wxID_MOVE_FRAME, false);
             if ( window->GetWindowStyle() & wxRESIZE_BORDER )
             if ( window->GetWindowStyle() & wxRESIZE_BORDER )
-                menu->Enable(wxID_RESIZE_FRAME, FALSE);
+                menu->Enable(wxID_RESIZE_FRAME, false);
         }
         else
         }
         else
-            menu->Enable(wxID_RESTORE_FRAME, FALSE);
+            menu->Enable(wxID_RESTORE_FRAME, false);
     }
 
     window->PopupMenu(menu, pos);
     }
 
     window->PopupMenu(menu, pos);