]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/richedit/wxlwindow.cpp
check default library directories in WX_PATH_FIND_LIBRARIES; do *not* add default...
[wxWidgets.git] / samples / richedit / wxlwindow.cpp
index f191fec414e869a34d383c45fc26c8c60f445590..a109f532f19214edea6163d453cfdf6c9ce6cf75 100644 (file)
@@ -146,14 +146,16 @@ static bool IsDirectionKey(long keyCode);
 // ----------------------------------------------------------------------------
 
 wxLayoutWindow::wxLayoutWindow(wxWindow *parent)
 // ----------------------------------------------------------------------------
 
 wxLayoutWindow::wxLayoutWindow(wxWindow *parent)
-              : wxScrolledWindow(parent, -1,
+              : wxScrolledWindow(parent, wxID_ANY,
                                  wxDefaultPosition, wxDefaultSize,
                                  wxHSCROLL | wxVSCROLL |
                                  wxBORDER |
                                  wxWANTS_CHARS),
                 m_llist(NULL)
 {
                                  wxDefaultPosition, wxDefaultSize,
                                  wxHSCROLL | wxVSCROLL |
                                  wxBORDER |
                                  wxWANTS_CHARS),
                 m_llist(NULL)
 {
+#if wxUSE_STATUSBAR
     SetStatusBar(NULL); // don't use statusbar
     SetStatusBar(NULL); // don't use statusbar
+#endif // wxUSE_STATUSBAR
     m_Editable = false;
     m_doSendEvents = false;
     m_ViewStartX = 0; m_ViewStartY = 0;
     m_Editable = false;
     m_doSendEvents = false;
     m_ViewStartX = 0; m_ViewStartY = 0;
@@ -310,7 +312,9 @@ wxLayoutWindow::OnMouse(int eventId, wxMouseEvent& event)
         // this variables is used to only erase the message in the status
         // bar if we had put it there previously - otherwise empting status
         // bar might be undesirable
         // this variables is used to only erase the message in the status
         // bar if we had put it there previously - otherwise empting status
         // bar might be undesirable
+#if wxUSE_STATUSBAR
         static bool s_hasPutMessageInStatusBar = false;
         static bool s_hasPutMessageInStatusBar = false;
+#endif // wxUSE_STATUSBAR
 
         // found is only true if we are really over an object, not just
         // behind it
 
         // found is only true if we are really over an object, not just
         // behind it
@@ -319,27 +323,30 @@ wxLayoutWindow::OnMouse(int eventId, wxMouseEvent& event)
             if(!m_HandCursor)
                 SetCursor(wxCURSOR_HAND);
             m_HandCursor = true;
             if(!m_HandCursor)
                 SetCursor(wxCURSOR_HAND);
             m_HandCursor = true;
+#if wxUSE_STATUSBAR
             if(m_StatusBar && m_StatusFieldLabel != -1)
             {
                 const wxString &label = u->GetLabel();
                 if(label.Length())
                 {
             if(m_StatusBar && m_StatusFieldLabel != -1)
             {
                 const wxString &label = u->GetLabel();
                 if(label.Length())
                 {
-                    m_StatusBar->SetStatusText(label,
-                        m_StatusFieldLabel);
+                    m_StatusBar->SetStatusText(label,m_StatusFieldLabel);
                     s_hasPutMessageInStatusBar = true;
                 }
             }
                     s_hasPutMessageInStatusBar = true;
                 }
             }
+#endif // wxUSE_STATUSBAR
         }
         else
         {
             if(m_HandCursor)
                 SetCursor(wxCURSOR_IBEAM);
             m_HandCursor = false;
         }
         else
         {
             if(m_HandCursor)
                 SetCursor(wxCURSOR_IBEAM);
             m_HandCursor = false;
+#if wxUSE_STATUSBAR
             if( m_StatusBar && m_StatusFieldLabel != -1 &&
                 s_hasPutMessageInStatusBar )
             {
                 m_StatusBar->SetStatusText(wxEmptyString, m_StatusFieldLabel);
             }
             if( m_StatusBar && m_StatusFieldLabel != -1 &&
                 s_hasPutMessageInStatusBar )
             {
                 m_StatusBar->SetStatusText(wxEmptyString, m_StatusFieldLabel);
             }
+#endif // wxUSE_STATUSBAR
         }
     }
 
         }
     }
 
@@ -1062,6 +1069,7 @@ wxLayoutWindow::InternalPaint(const wxRect *updateRect)
 
     ResetDirty();
 
 
     ResetDirty();
 
+#if wxUSE_STATUSBAR
     if ( m_StatusBar && m_StatusFieldCursor != -1 )
     {
         static wxPoint s_oldCursorPos(-1, -1);
     if ( m_StatusBar && m_StatusFieldCursor != -1 )
     {
         static wxPoint s_oldCursorPos(-1, -1);
@@ -1078,6 +1086,7 @@ wxLayoutWindow::InternalPaint(const wxRect *updateRect)
             m_StatusBar->SetStatusText(label, m_StatusFieldCursor);
         }
     }
             m_StatusBar->SetStatusText(label, m_StatusFieldCursor);
         }
     }
+#endif // wxUSE_STATUSBAR
 
     WXLO_TIMER_PRINT(LayoutTimer);
     WXLO_TIMER_PRINT(BlitTimer);
 
     WXLO_TIMER_PRINT(LayoutTimer);
     WXLO_TIMER_PRINT(BlitTimer);