]> 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 a23b8ef01db4e96b1f528f8e4da3ed8ddf35347d..e36989fa53dbf70b31331e60e42cd262a8d961db 100644 (file)
@@ -443,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,
@@ -469,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);
@@ -1917,7 +1917,7 @@ wxRect wxWin32Renderer::GetBorderDimensions(wxBorder border) const
 
 bool wxWin32Renderer::AreScrollbarsInsideBorder() const
 {
 
 bool wxWin32Renderer::AreScrollbarsInsideBorder() const
 {
-    return TRUE;
+    return true;
 }
 
 // ----------------------------------------------------------------------------
 }
 
 // ----------------------------------------------------------------------------
@@ -2284,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();
@@ -2365,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,
@@ -3418,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,
@@ -3768,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);
     }
 }
 
     }
 }
 
@@ -4127,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;
             }
@@ -4163,7 +4163,7 @@ bool wxWin32InputHandler::HandleKey(wxInputConsumer * WXUNUSED(control),
                                     const wxKeyEvent& WXUNUSED(event),
                                     bool WXUNUSED(pressed))
 {
                                     const wxKeyEvent& WXUNUSED(event),
                                     bool WXUNUSED(pressed))
 {
-    return FALSE;
+    return false;
 }
 
 bool wxWin32InputHandler::HandleMouse(wxInputConsumer *control,
 }
 
 bool wxWin32InputHandler::HandleMouse(wxInputConsumer *control,
@@ -4179,11 +4179,11 @@ bool wxWin32InputHandler::HandleMouse(wxInputConsumer *control,
         {
             win->SetFocus();
 
         {
             win->SetFocus();
 
-            return TRUE;
+            return true;
         }
     }
 
         }
     }
 
-    return FALSE;
+    return false;
 }
 
 // ----------------------------------------------------------------------------
 }
 
 // ----------------------------------------------------------------------------
@@ -4195,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;
 }
 
@@ -4204,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)
@@ -4222,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);
@@ -4255,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);
@@ -4272,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
             {
@@ -4293,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
@@ -4345,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
             {
@@ -4361,7 +4361,7 @@ bool wxWin32ScrollBarInputHandler::HandleMouseMove(wxInputConsumer *control,
                 HandleThumbMove(scrollbar, m_eventStartDrag);
             }
 
                 HandleThumbMove(scrollbar, m_eventStartDrag);
             }
 
-            return TRUE;
+            return true;
         }
     }
 
         }
     }
 
@@ -4398,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;
 }
 
 // ----------------------------------------------------------------------------
 }
 
 // ----------------------------------------------------------------------------
@@ -4440,7 +4440,7 @@ bool wxWin32TextCtrlInputHandler::HandleKey(wxInputConsumer *control,
         {
             control->PerformAction(action);
 
         {
             control->PerformAction(action);
 
-            return TRUE;
+            return true;
         }
     }
 
         }
     }
 
@@ -4455,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,
@@ -4467,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
@@ -4485,7 +4485,7 @@ bool wxWin32StatusBarInputHandler::IsOnGrip(wxWindow *statbar,
         }
     }
 
         }
     }
 
-    return FALSE;
+    return false;
 }
 
 bool wxWin32StatusBarInputHandler::HandleMouse(wxInputConsumer *consumer,
 }
 
 bool wxWin32StatusBarInputHandler::HandleMouse(wxInputConsumer *consumer,
@@ -4508,7 +4508,7 @@ bool wxWin32StatusBarInputHandler::HandleMouse(wxInputConsumer *consumer,
 
                     statbar->SetCursor(m_cursorOld);
 
 
                     statbar->SetCursor(m_cursorOld);
 
-                    return TRUE;
+                    return true;
                 }
             }
         }
                 }
             }
         }
@@ -4673,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 )
         {
@@ -4683,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;
             }
         }
     }
             }
         }
     }
@@ -4712,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);