git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62789 
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
25 files changed:
 #include "wx/log.h"
 #include "wx/stream.h"
 
 #include "wx/log.h"
 #include "wx/stream.h"
 
-class WXDLLIMPEXP_FWD_BASE wxInputStream;
 class WXDLLIMPEXP_FWD_CORE wxImage;
 
 /*
 class WXDLLIMPEXP_FWD_CORE wxImage;
 
 /*
 
 #if wxUSE_BITMAPCOMBOBOX
 
 #include "wx/bitmap.h"
 #if wxUSE_BITMAPCOMBOBOX
 
 #include "wx/bitmap.h"
+class WXDLLIMPEXP_FWD_CORE wxWindow;
 class WXDLLIMPEXP_FWD_CORE wxItemContainer;
 
 // Define wxBITMAPCOMBOBOX_OWNERDRAWN_BASED for platforms which
 class WXDLLIMPEXP_FWD_CORE wxItemContainer;
 
 // Define wxBITMAPCOMBOBOX_OWNERDRAWN_BASED for platforms which
 
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifndef __BUSYINFO_H__
-#define __BUSYINFO_H__
+#ifndef _WX_BUSYINFO_H_
+#define _WX_BUSYINFO_H_
 
 #include "wx/defs.h"
 
 #if wxUSE_BUSYINFO
 
 
 #include "wx/defs.h"
 
 #if wxUSE_BUSYINFO
 
+#include "wx/object.h"
+
 class WXDLLIMPEXP_FWD_CORE wxFrame;
 class WXDLLIMPEXP_FWD_CORE wxWindow;
 
 class WXDLLIMPEXP_FWD_CORE wxFrame;
 class WXDLLIMPEXP_FWD_CORE wxWindow;
 
     wxDECLARE_NO_COPY_CLASS(wxBusyInfo);
 };
 
     wxDECLARE_NO_COPY_CLASS(wxBusyInfo);
 };
 
-
-#endif // __BUSYINFO_H__
+#endif // _WX_BUSYINFO_H_
 
 // Purpose:
 // Author:      Robert Roebling
 // Created:     01/02/97
 // Purpose:
 // Author:      Robert Roebling
 // Created:     01/02/97
 // Copyright:   (c) 1998 Robert Roebling and Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 // Copyright:   (c) 1998 Robert Roebling and Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifndef __IMAGELISTH_G__
-#define __IMAGELISTH_G__
+#ifndef _WX_IMAGLISTG_H_
+#define _WX_IMAGLISTG_H_
 
 class WXDLLIMPEXP_FWD_CORE wxDC;
 class WXDLLIMPEXP_FWD_CORE wxBitmap;
 
 class WXDLLIMPEXP_FWD_CORE wxDC;
 class WXDLLIMPEXP_FWD_CORE wxBitmap;
+class WXDLLIMPEXP_FWD_CORE wxIcon;
 class WXDLLIMPEXP_FWD_CORE wxColour;
 
 
 class WXDLLIMPEXP_FWD_CORE wxColour;
 
 
 };
 #endif // !wxHAS_NATIVE_IMAGELIST
 
 };
 #endif // !wxHAS_NATIVE_IMAGELIST
 
-#endif  // __IMAGELISTH_G__
-
+#endif  // _WX_IMAGLISTG_H_
 
 // Purpose:     generic wxInfoBar class declaration
 // Author:      Vadim Zeitlin
 // Created:     2009-07-28
 // Purpose:     generic wxInfoBar class declaration
 // Author:      Vadim Zeitlin
 // Created:     2009-07-28
-// RCS-ID:      $Id: wxhead.h,v 1.11 2009-06-29 10:23:04 zeitlin Exp $
 // Copyright:   (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
 // Copyright:   (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
 
 // Purpose:     native implementation of wxInfoBar for GTK+ 2.18 and later
 // Author:      Vadim Zeitlin
 // Created:     2009-09-26
 // Purpose:     native implementation of wxInfoBar for GTK+ 2.18 and later
 // Author:      Vadim Zeitlin
 // Created:     2009-09-26
-// RCS-ID:      $Id: wxhead.h,v 1.11 2009-06-29 10:23:04 zeitlin Exp $
 // Copyright:   (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
 // Copyright:   (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
 
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifndef __GTKSTATICBOXH__
-#define __GTKSTATICBOXH__
+#ifndef _WX_GTKSTATICBOX_H_
+#define _WX_GTKSTATICBOX_H_
 
 //-----------------------------------------------------------------------------
 // wxStaticBox
 
 //-----------------------------------------------------------------------------
 // wxStaticBox
-    virtual bool IsTransparentForMouse() const { return TRUE; }
+    virtual bool IsTransparentForMouse() const { return true; }
 
     virtual void GetBordersForSizer(int *borderTop, int *borderOther) const;
 
 
     virtual void GetBordersForSizer(int *borderTop, int *borderOther) const;
 
 
     void DoApplyWidgetStyle(GtkRcStyle *style);
 
 
     void DoApplyWidgetStyle(GtkRcStyle *style);
 
     DECLARE_DYNAMIC_CLASS(wxStaticBox)
 };
 
     DECLARE_DYNAMIC_CLASS(wxStaticBox)
 };
 
-#endif // __GTKSTATICBOXH__
+#endif // _WX_GTKSTATICBOX_H_
 
 #ifndef _WX_MAC_CARBON_EVTLOOP_H_
 #define _WX_MAC_CARBON_EVTLOOP_H_
 
 #ifndef _WX_MAC_CARBON_EVTLOOP_H_
 #define _WX_MAC_CARBON_EVTLOOP_H_
 
 typedef OpaqueEventRef *EventRef;
 
 class WXDLLIMPEXP_CORE wxGUIEventLoop : public wxCFEventLoop
 typedef OpaqueEventRef *EventRef;
 
 class WXDLLIMPEXP_CORE wxGUIEventLoop : public wxCFEventLoop
 
     #include "wx/osx/cocoa/private.h"
 #endif
 
     #include "wx/osx/cocoa/private.h"
 #endif
 
-#endif
\ No newline at end of file
 
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////
 
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////
 
-#ifndef _TASKBAR_H_
-#define _TASKBAR_H_
-
-class WXDLLIMPEXP_FWD_CORE wxIcon;
-class WXDLLIMPEXP_FWD_CORE wxFrame;
-class WXDLLIMPEXP_FWD_CORE wxWindow;
+#ifndef _WX_UNIX_TASKBAR_H_
+#define _WX_UNIX_TASKBAR_H_
 
 class WXDLLIMPEXP_FWD_ADV wxTaskBarIconArea;
 
 
 class WXDLLIMPEXP_FWD_ADV wxTaskBarIconArea;
 
     DECLARE_DYNAMIC_CLASS(wxTaskBarIcon)
 };
 
     DECLARE_DYNAMIC_CLASS(wxTaskBarIcon)
 };
 
+#endif // _WX_UNIX_TASKBAR_H_
 
+#include "wx/taskbar.h"
+
 #ifndef WX_PRECOMP
     #include "wx/app.h"
     #include "wx/list.h"
 #ifndef WX_PRECOMP
     #include "wx/app.h"
     #include "wx/list.h"
 // DLL options compatibility check:
 WX_CHECK_BUILD_OPTIONS("wxAdvanced")
 
 // DLL options compatibility check:
 WX_CHECK_BUILD_OPTIONS("wxAdvanced")
 
-#include "wx/taskbar.h"
-
 wxDEFINE_EVENT( wxEVT_TASKBAR_MOVE, wxTaskBarIconEvent );
 wxDEFINE_EVENT( wxEVT_TASKBAR_LEFT_DOWN, wxTaskBarIconEvent );
 wxDEFINE_EVENT( wxEVT_TASKBAR_LEFT_UP, wxTaskBarIconEvent );
 wxDEFINE_EVENT( wxEVT_TASKBAR_MOVE, wxTaskBarIconEvent );
 wxDEFINE_EVENT( wxEVT_TASKBAR_LEFT_DOWN, wxTaskBarIconEvent );
 wxDEFINE_EVENT( wxEVT_TASKBAR_LEFT_UP, wxTaskBarIconEvent );
 
 // Purpose:     generic wxInfoBar implementation
 // Author:      Vadim Zeitlin
 // Created:     2009-07-28
 // Purpose:     generic wxInfoBar implementation
 // Author:      Vadim Zeitlin
 // Created:     2009-07-28
-// RCS-ID:      $Id: wxhead.cpp,v 1.10 2009-06-29 10:23:04 zeitlin Exp $
 // Copyright:   (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
 // Copyright:   (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
+#include "wx/infobar.h"
+
 #ifndef WX_PRECOMP
     #include "wx/bmpbuttn.h"
     #include "wx/button.h"
 #ifndef WX_PRECOMP
     #include "wx/bmpbuttn.h"
     #include "wx/button.h"
     #include "wx/settings.h"
     #include "wx/statbmp.h"
     #include "wx/stattext.h"
     #include "wx/settings.h"
     #include "wx/statbmp.h"
     #include "wx/stattext.h"
-#include "wx/infobar.h"
-
 #include "wx/artprov.h"
 #include "wx/renderer.h"
 #include "wx/scopeguard.h"
 #include "wx/artprov.h"
 #include "wx/renderer.h"
 #include "wx/scopeguard.h"
 
 BEGIN_EVENT_TABLE(wxInfoBarGeneric, wxInfoBarBase)
     EVT_BUTTON(wxID_ANY, wxInfoBarGeneric::OnButton)
 
 BEGIN_EVENT_TABLE(wxInfoBarGeneric, wxInfoBarBase)
     EVT_BUTTON(wxID_ANY, wxInfoBarGeneric::OnButton)
 
     return GTK_WIDGET( GetEntry() );
 }
 
     return GTK_WIDGET( GetEntry() );
 }
 
-GdkWindow *wxComboBox::GTKGetWindow(wxArrayGdkWindows& windows) const
+GdkWindow* wxComboBox::GTKGetWindow(wxArrayGdkWindows& /* windows */) const
-    wxUnusedVar(windows);
-
     return GetEntry()->text_area;
 }
 
     return GetEntry()->text_area;
 }
 
 
-#include <gdk/gdk.h>
-#include <glib.h>
-
 #include "wx/apptrait.h"
 #include "wx/private/fdiomanager.h"
 
 #include "wx/apptrait.h"
 #include "wx/private/fdiomanager.h"
 
 extern "C" {
 static
 void wxSocket_GDK_Input(gpointer data,
 extern "C" {
 static
 void wxSocket_GDK_Input(gpointer data,
 
     {
         // make this window a container of other wxWindows by instancing a wxPizza
         // and packing it into the GtkFrame:
     {
         // make this window a container of other wxWindows by instancing a wxPizza
         // and packing it into the GtkFrame:
-        m_wxwindow = wxPizza::New( 0 );
+        m_wxwindow = wxPizza::New();
         gtk_widget_show( m_wxwindow );
         gtk_container_add( GTK_CONTAINER (m_widget), m_wxwindow );
     }
         gtk_widget_show( m_wxwindow );
         gtk_container_add( GTK_CONTAINER (m_widget), m_wxwindow );
     }
 
 #if 0
     case wxFONTENCODING_UTF7 :
         enc = CreateTextEncoding(kCFStringEncodingUnicodeDefault,0,kUnicodeUTF7Format) ;
 #if 0
     case wxFONTENCODING_UTF7 :
         enc = CreateTextEncoding(kCFStringEncodingUnicodeDefault,0,kUnicodeUTF7Format) ;
     case wxFONTENCODING_UTF8 :
         enc = kCFStringEncodingUTF8;
         break ;
     case wxFONTENCODING_UTF8 :
         enc = kCFStringEncodingUTF8;
         break ;
         return wxEmptyString ;
 
     Size cflen = CFStringGetLength( ref )  ;
         return wxEmptyString ;
 
     Size cflen = CFStringGetLength( ref )  ;
-    CFStringEncoding cfencoding = 0;
+    CFStringEncoding cfencoding;
     wxString result;
 #if wxUSE_UNICODE
   #if wxUSE_UNICODE_WCHAR
     wxString result;
 #if wxUSE_UNICODE
   #if wxUSE_UNICODE_WCHAR
     CFIndex cStrLen ;
     CFStringGetBytes( ref , CFRangeMake(0, cflen) , cfencoding ,
         '?' , false , NULL , 0 , &cStrLen ) ;
     CFIndex cStrLen ;
     CFStringGetBytes( ref , CFRangeMake(0, cflen) , cfencoding ,
         '?' , false , NULL , 0 , &cStrLen ) ;
-    buf = new char[ cStrLen ] ;
+    char* buf = new char[cStrLen];
     CFStringGetBytes( ref , CFRangeMake(0, cflen) , cfencoding,
         '?' , false , (unsigned char*) buf , cStrLen , &cStrLen) ;
 
     CFStringGetBytes( ref , CFRangeMake(0, cflen) , cfencoding,
         '?' , false , (unsigned char*) buf , cStrLen , &cStrLen) ;
 
 
 {
 #if wxOSX_USE_COCOA
     return new wxOSXCocoaPrintData();
 {
 #if wxOSX_USE_COCOA
     return new wxOSXCocoaPrintData();
-#endif
-#if wxOSX_USE_CARBON
     return new wxOSXCarbonPrintData();
     return new wxOSXCarbonPrintData();
     return (ret == wxID_OK);
 #endif
 
     return (ret == wxID_OK);
 #endif
 
 
 } gs_OSXManagerSetter;
 
 // see the relative linker macro in socket.cpp
 } gs_OSXManagerSetter;
 
 // see the relative linker macro in socket.cpp
-wxFORCE_LINK_THIS_MODULE( osxsocket );
+wxFORCE_LINK_THIS_MODULE(osxsocket)
 
     // Loop through command line arguments to the bundle,
     // turn them into CFURLs and then put them in cfaFiles
     // For use to launch services call
     // Loop through command line arguments to the bundle,
     // turn them into CFURLs and then put them in cfaFiles
     // For use to launch services call
-        for( ; *argv != NULL ; ++argv)
-        {
+    for( ; *argv != NULL ; ++argv)
+    {
         // Check for '<' as this will ring true for
         // CFURLCreateWithString but is generally not considered
         // typical on mac but is usually passed here from wxExecute
         // Check for '<' as this will ring true for
         // CFURLCreateWithString but is generally not considered
         // typical on mac but is usually passed here from wxExecute
 
         // Add the valid CFURL to the argument array and then
         // release it as the CFArray adds a ref count to it
 
         // Add the valid CFURL to the argument array and then
         // release it as the CFArray adds a ref count to it
-            CFArrayAppendValue(
-                cfaFiles,
-                cfurlCurrentFile
-                            );
-            CFRelease(cfurlCurrentFile); // array has retained it
-        }
+        CFArrayAppendValue(
+            cfaFiles,
+            cfurlCurrentFile
+                        );
+        CFRelease(cfurlCurrentFile); // array has retained it
+    }
 
     // Create a LSLaunchURLSpec for use with LSOpenFromURLSpec
     // Note that there are several flag options (launchFlags) such
 
     // Create a LSLaunchURLSpec for use with LSOpenFromURLSpec
     // Note that there are several flag options (launchFlags) such
 
 wxSize wxListBox::DoGetBestSize() const
 {
     int lbWidth = 100;  // some defaults
 wxSize wxListBox::DoGetBestSize() const
 {
     int lbWidth = 100;  // some defaults
 
         m_privateContextMenu->Append(wxID_SELECTALL, _("Select &All"));
     }
 
         m_privateContextMenu->Append(wxID_SELECTALL, _("Select &All"));
     }
 
-    if (m_privateContextMenu != NULL)
-        PopupMenu(m_privateContextMenu);
+    PopupMenu(m_privateContextMenu);
 
 int wxTextWidgetImpl::GetNumberOfLines() const
 {
 
 int wxTextWidgetImpl::GetNumberOfLines() const
 {
     wxString content = GetStringValue() ;
     wxString content = GetStringValue() ;
 
     for (size_t i = 0; i < content.length() ; i++)
     {
 
     for (size_t i = 0; i < content.length() ; i++)
     {
 
             r.width =
             r.height = 16 ;
 
             r.width =
             r.height = 16 ;
 
-            else if ( IsKindOf( CLASSINFO( wxScrollBar ) ) )
+            if ( IsKindOf( CLASSINFO( wxScrollBar ) ) )
-            else if ( IsKindOf( CLASSINFO( wxSpinButton ) ) )
+            if ( IsKindOf( CLASSINFO( wxSpinButton ) ) )
             {
                 // return wxWindowBase::DoGetBestSize() ;
             }
             {
                 // return wxWindowBase::DoGetBestSize() ;
             }
 
 
 #include "wx/arrimpl.cpp"
 
 
 #include "wx/arrimpl.cpp"
 
-WX_DEFINE_USER_EXPORTED_OBJARRAY(wxRibbonPageTabInfoArray);
+WX_DEFINE_USER_EXPORTED_OBJARRAY(wxRibbonPageTabInfoArray)
 
 wxDEFINE_EVENT(wxEVT_COMMAND_RIBBONBAR_PAGE_CHANGED, wxRibbonBarEvent);
 wxDEFINE_EVENT(wxEVT_COMMAND_RIBBONBAR_PAGE_CHANGING, wxRibbonBarEvent);
 
 wxDEFINE_EVENT(wxEVT_COMMAND_RIBBONBAR_PAGE_CHANGED, wxRibbonBarEvent);
 wxDEFINE_EVENT(wxEVT_COMMAND_RIBBONBAR_PAGE_CHANGING, wxRibbonBarEvent);
     if(m_tab_scroll_buttons_shown)
     {
 #define SET_FLAG(variable, flag) \
     if(m_tab_scroll_buttons_shown)
     {
 #define SET_FLAG(variable, flag) \
-    { if(((variable) & (flag)) != (flag)) variable |= (flag), refresh_tabs = true; }
+    { if(((variable) & (flag)) != (flag)) { variable |= (flag); refresh_tabs = true; }}
 #define UNSET_FLAG(variable, flag) \
 #define UNSET_FLAG(variable, flag) \
-    { if((variable) & (flag)) variable &= ~(flag), refresh_tabs = true; }
+    { if((variable) & (flag)) { variable &= ~(flag); refresh_tabs = true; }}
 
         if(m_tab_scroll_left_button_rect.Contains(x, y))
             SET_FLAG(m_tab_scroll_left_button_state, wxRIBBON_SCROLL_BTN_HOVERED)
 
         if(m_tab_scroll_left_button_rect.Contains(x, y))
             SET_FLAG(m_tab_scroll_left_button_state, wxRIBBON_SCROLL_BTN_HOVERED)
 
 
 WX_DECLARE_OBJARRAY(wxRibbonButtonBarButtonInstance, wxArrayRibbonButtonBarButtonInstance);
 #include "wx/arrimpl.cpp"
 
 WX_DECLARE_OBJARRAY(wxRibbonButtonBarButtonInstance, wxArrayRibbonButtonBarButtonInstance);
 #include "wx/arrimpl.cpp"
-WX_DEFINE_OBJARRAY(wxArrayRibbonButtonBarButtonInstance);
+WX_DEFINE_OBJARRAY(wxArrayRibbonButtonBarButtonInstance)
 
 class wxRibbonButtonBarLayout
 {
 
 class wxRibbonButtonBarLayout
 {
     m_lock_active_state = false;
 
     SetBackgroundStyle(wxBG_STYLE_CUSTOM);
     m_lock_active_state = false;
 
     SetBackgroundStyle(wxBG_STYLE_CUSTOM);
 
 wxSize wxRibbonButtonBar::GetMinSize() const
 {
 
 wxSize wxRibbonButtonBar::GetMinSize() const
 {
         layout->overall_size.GetHeight() > original->overall_size.GetHeight())
     {
         delete layout;
         layout->overall_size.GetHeight() > original->overall_size.GetHeight())
     {
         delete layout;
-        wxASSERT_MSG(false, wxT("Layout collapse resulted in increased size"));
+        wxFAIL_MSG("Layout collapse resulted in increased size");
 
        wxDialUpManager methods.
    */
    virtual bool IsOk() const
        wxDialUpManager methods.
    */
    virtual bool IsOk() const
 
    /** The simplest way to initiate a dial up: this function dials the given
        ISP (exact meaning of the parameter depends on the platform), returns
 
    /** The simplest way to initiate a dial up: this function dials the given
        ISP (exact meaning of the parameter depends on the platform), returns
    // so, in general, the user should be allowed to override it. This function
    // allows to forcefully set the online status - whatever our internal
    // algorithm may think about it.
    // so, in general, the user should be allowed to override it. This function
    // allows to forcefully set the online status - whatever our internal
    // algorithm may think about it.
-   virtual void SetOnlineStatus(bool isOnline = TRUE)
+   virtual void SetOnlineStatus(bool isOnline = true)
       { m_IsOnline = isOnline; }
 
    // set misc wxDialUpManager options
       { m_IsOnline = isOnline; }
 
    // set misc wxDialUpManager options
    AutoCheckTimer(wxDialUpManagerImpl *dupman)
       {
          m_dupman = dupman;
    AutoCheckTimer(wxDialUpManagerImpl *dupman)
       {
          m_dupman = dupman;
       }
 
    virtual bool Start( int millisecs = -1 )
       }
 
    virtual bool Start( int millisecs = -1 )
-      { m_started = TRUE; return wxTimer::Start(millisecs, FALSE); }
+      { m_started = true; return wxTimer::Start(millisecs, false); }
 
    virtual void Notify()
       { wxLogTrace("Checking dial up network status."); m_dupman->CheckStatus(); }
 
    virtual void Notify()
       { wxLogTrace("Checking dial up network status."); m_dupman->CheckStatus(); }
                           const wxString & WXUNUSED(password))
 {
    if(m_IsOnline == 1)
                           const wxString & WXUNUSED(password))
 {
    if(m_IsOnline == 1)
    m_IsOnline = -1;
    m_ISPname = isp;
    wxString cmd;
    m_IsOnline = -1;
    m_ISPname = isp;
    wxString cmd;
 wxDialUpManagerImpl::HangUp(void)
 {
    if(m_IsOnline == 0)
 wxDialUpManagerImpl::HangUp(void)
 {
    if(m_IsOnline == 0)
    m_IsOnline = -1;
    wxString cmd;
    if(m_HangUpCommand.Find("%s"))
    m_IsOnline = -1;
    wxString cmd;
    if(m_HangUpCommand.Find("%s"))