]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/shaped/shaped.cpp
Build fix for motif.
[wxWidgets.git] / samples / shaped / shaped.cpp
index ceebc8c6f02e5af7126f0da963f44bddebd1d632..ea00e88566dac5ae52f8a5efb03fb80599ed0165 100644 (file)
 // headers
 // ----------------------------------------------------------------------------
 
 // headers
 // ----------------------------------------------------------------------------
 
-#if defined(__GNUG__) && !defined(__APPLE__)
-    #pragma implementation "shaped.cpp"
-    #pragma interface "shaped.cpp"
-#endif
-
 // For compilers that support precompilation, includes "wx/wx.h".
 #include "wx/wxprec.h"
 
 // For compilers that support precompilation, includes "wx/wx.h".
 #include "wx/wxprec.h"
 
@@ -134,13 +129,13 @@ bool MyApp::OnInit()
 
     // Create the main application window
     ShapedFrame *frame = new ShapedFrame();
 
     // Create the main application window
     ShapedFrame *frame = new ShapedFrame();
-    frame->Show(TRUE);
+    frame->Show(true);
     SetTopWindow(frame);
 
     // success: wxApp::OnRun() will be called which will enter the main message
     SetTopWindow(frame);
 
     // success: wxApp::OnRun() will be called which will enter the main message
-    // loop and the application will run. If we returned FALSE here, the
+    // loop and the application will run. If we returned false here, the
     // application would exit immediately.
     // application would exit immediately.
-    return TRUE;
+    return true;
 }
 
 // ----------------------------------------------------------------------------
 }
 
 // ----------------------------------------------------------------------------
@@ -149,7 +144,7 @@ bool MyApp::OnInit()
 
 // frame constructor
 ShapedFrame::ShapedFrame()
 
 // frame constructor
 ShapedFrame::ShapedFrame()
-       : wxFrame((wxFrame *)NULL, -1, wxEmptyString,
+       : wxFrame((wxFrame *)NULL, wxID_ANY, wxEmptyString,
                   wxDefaultPosition, wxSize(100, 100), //wxDefaultSize,
                   0
                   | wxFRAME_SHAPED
                   wxDefaultPosition, wxSize(100, 100), //wxDefaultSize,
                   0
                   | wxFRAME_SHAPED
@@ -158,15 +153,11 @@ ShapedFrame::ShapedFrame()
                   | wxSTAY_ON_TOP
             )
 {
                   | wxSTAY_ON_TOP
             )
 {
-    m_hasShape = FALSE;
+    m_hasShape = false;
     m_bmp = wxBitmap(_T("star.png"), wxBITMAP_TYPE_PNG);
     SetSize(wxSize(m_bmp.GetWidth(), m_bmp.GetHeight()));
     m_bmp = wxBitmap(_T("star.png"), wxBITMAP_TYPE_PNG);
     SetSize(wxSize(m_bmp.GetWidth(), m_bmp.GetHeight()));
-#ifndef __WXMAC__
-    // On wxMac the tooltip gets clipped by the window shape, YUCK!!
-#if wxUSE_TOOLTOP
     SetToolTip(wxT("Right-click to exit"));
     SetToolTip(wxT("Right-click to exit"));
-#endif
-#endif
+
 #ifndef __WXGTK__
     // On wxGTK we can't do this yet because the window hasn't been created
     // yet so we wait until the EVT_WINDOW_CREATE event happens.  On wxMSW and
 #ifndef __WXGTK__
     // On wxGTK we can't do this yet because the window hasn't been created
     // yet so we wait until the EVT_WINDOW_CREATE event happens.  On wxMSW and
@@ -188,7 +179,7 @@ void ShapedFrame::OnDoubleClick(wxMouseEvent& WXUNUSED(evt))
     {
         wxRegion region;
         SetShape(region);
     {
         wxRegion region;
         SetShape(region);
-        m_hasShape = FALSE;
+        m_hasShape = false;
     }
     else
         SetWindowShape();
     }
     else
         SetWindowShape();
@@ -233,7 +224,7 @@ void ShapedFrame::OnExit(wxMouseEvent& WXUNUSED(evt))
 void ShapedFrame::OnPaint(wxPaintEvent& WXUNUSED(evt))
 {
     wxPaintDC dc(this);
 void ShapedFrame::OnPaint(wxPaintEvent& WXUNUSED(evt))
 {
     wxPaintDC dc(this);
-    dc.DrawBitmap(m_bmp, 0, 0, TRUE);
+    dc.DrawBitmap(m_bmp, 0, 0, true);
 }
 
 void ShapedFrame::OnWindowCreate(wxWindowCreateEvent& WXUNUSED(evt))
 }
 
 void ShapedFrame::OnWindowCreate(wxWindowCreateEvent& WXUNUSED(evt))