From: Włodzimierz Skiba Date: Tue, 13 Jun 2006 11:30:40 +0000 (+0000) Subject: Include wx/arrstr.h according to precompiled headers of wx/wx.h (with other minor... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/aaa6d89a0d0810b001a9217df913b9b74b883c8d Include wx/arrstr.h according to precompiled headers of wx/wx.h (with other minor cleaning). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39694 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/wx.h b/include/wx/wx.h index 9d71b87520..22cc188d52 100644 --- a/include/wx/wx.h +++ b/include/wx/wx.h @@ -18,6 +18,7 @@ #include "wx/list.h" #include "wx/hash.h" #include "wx/string.h" +#include "wx/arrstr.h" #include "wx/intl.h" #include "wx/log.h" #include "wx/event.h" diff --git a/src/common/config.cpp b/src/common/config.cpp index 2e1430356e..19885d4a39 100644 --- a/src/common/config.cpp +++ b/src/common/config.cpp @@ -31,10 +31,9 @@ #include "wx/log.h" #include "wx/app.h" #include "wx/utils.h" + #include "wx/arrstr.h" #endif //WX_PRECOMP -#include "wx/arrstr.h" - #if wxUSE_CONFIG && ((wxUSE_FILE && wxUSE_TEXTFILE) || wxUSE_CONFIG_NATIVE) #include "wx/file.h" @@ -309,10 +308,10 @@ enum Bracket wxString wxExpandEnvVars(const wxString& str) { wxString strResult; - strResult.Alloc(str.Len()); + strResult.Alloc(str.length()); size_t m; - for ( size_t n = 0; n < str.Len(); n++ ) { + for ( size_t n = 0; n < str.length(); n++ ) { switch ( str[n] ) { #ifdef __WXMSW__ case wxT('%'): @@ -325,7 +324,7 @@ wxString wxExpandEnvVars(const wxString& str) bracket = Bracket_Windows; else #endif //WINDOWS - if ( n == str.Len() - 1 ) { + if ( n == str.length() - 1 ) { bracket = Bracket_None; } else { @@ -347,7 +346,7 @@ wxString wxExpandEnvVars(const wxString& str) m = n + 1; - while ( m < str.Len() && (wxIsalnum(str[m]) || str[m] == wxT('_')) ) + while ( m < str.length() && (wxIsalnum(str[m]) || str[m] == wxT('_')) ) m++; wxString strVarName(str.c_str() + n + 1, m - n - 1); @@ -372,7 +371,7 @@ wxString wxExpandEnvVars(const wxString& str) // check the closing bracket if ( bracket != Bracket_None ) { - if ( m == str.Len() || str[m] != (wxChar)bracket ) { + if ( m == str.length() || str[m] != (wxChar)bracket ) { // under MSW it's common to have '%' characters in the registry // and it's annoying to have warnings about them each time, so // ignroe them silently if they are not used for env vars @@ -398,7 +397,7 @@ wxString wxExpandEnvVars(const wxString& str) case '\\': // backslash can be used to suppress special meaning of % and $ - if ( n != str.Len() - 1 && + if ( n != str.length() - 1 && (str[n + 1] == wxT('%') || str[n + 1] == wxT('$')) ) { strResult += str[++n]; diff --git a/src/common/dircmn.cpp b/src/common/dircmn.cpp index a70624c279..9b385e5a18 100644 --- a/src/common/dircmn.cpp +++ b/src/common/dircmn.cpp @@ -29,9 +29,9 @@ #include "wx/log.h" #include "wx/intl.h" #include "wx/filefn.h" + #include "wx/arrstr.h" #endif //WX_PRECOMP -#include "wx/arrstr.h" #include "wx/dir.h" // ============================================================================ @@ -236,4 +236,3 @@ size_t wxDir::GetAllFiles(const wxString& dirname, return nFiles; } - diff --git a/src/common/sysopt.cpp b/src/common/sysopt.cpp index a5967226a8..cb3c3429bb 100644 --- a/src/common/sysopt.cpp +++ b/src/common/sysopt.cpp @@ -31,10 +31,9 @@ #ifndef WX_PRECOMP #include "wx/list.h" #include "wx/string.h" + #include "wx/arrstr.h" #endif -#include "wx/arrstr.h" - // ---------------------------------------------------------------------------- // private globals // ---------------------------------------------------------------------------- diff --git a/src/common/tokenzr.cpp b/src/common/tokenzr.cpp index f69e8e6a73..5bdae9d7fb 100644 --- a/src/common/tokenzr.cpp +++ b/src/common/tokenzr.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: tokenzr.cpp +// Name: src/common/tokenzr.cpp // Purpose: String tokenizer // Author: Guilhem Lavaux // Modified by: Vadim Zeitlin (almost full rewrite) @@ -25,7 +25,10 @@ #endif #include "wx/tokenzr.h" -#include "wx/arrstr.h" + +#ifndef WX_PRECOMP + #include "wx/arrstr.h" +#endif // Required for wxIs... functions #include diff --git a/src/gtk/choice.cpp b/src/gtk/choice.cpp index 8c0789964d..a7f05f679a 100644 --- a/src/gtk/choice.cpp +++ b/src/gtk/choice.cpp @@ -12,7 +12,10 @@ #if wxUSE_CHOICE #include "wx/choice.h" -#include "wx/arrstr.h" + +#ifndef WX_PRECOMP + #include "wx/arrstr.h" +#endif // FIXME: We use GtkOptionMenu which has been deprecated since GTK+ 2.3.0 in // favour of GtkComboBox. diff --git a/src/gtk/combobox.cpp b/src/gtk/combobox.cpp index f6147a9a79..6549733c33 100644 --- a/src/gtk/combobox.cpp +++ b/src/gtk/combobox.cpp @@ -18,10 +18,9 @@ #include "wx/intl.h" #include "wx/settings.h" #include "wx/textctrl.h" // for wxEVT_COMMAND_TEXT_UPDATED + #include "wx/arrstr.h" #endif -#include "wx/arrstr.h" - // We use GtkCombo which has been deprecated since GTK+ 2.3.0 // in favour of GtkComboBox for (m_peer); +wxMacCheckListControl* wxCheckListBox::GetPeer() const +{ + return dynamic_cast(m_peer); } const short kCheckboxColumnId = 1026; @@ -153,14 +156,14 @@ wxMacDataBrowserCheckListControl::wxMacDataBrowserCheckListControl( wxListBox *p kDataBrowserPropertyIsMutable | kDataBrowserTableViewSelectionColumn | kDataBrowserDefaultPropertyFlags; - + err = AddColumn( &columnDesc, 0 ); verify_noerr( err ); } wxMacDataBrowserCheckListControl::~wxMacDataBrowserCheckListControl() { - + } class wxMacCheckListBoxItem : public wxMacListBoxItem @@ -170,15 +173,15 @@ public : { m_isChecked = false; } - + ~wxMacCheckListBoxItem() { } - + virtual OSStatus GetSetData( wxMacDataItemBrowserControl *owner , DataBrowserPropertyID property, DataBrowserItemDataRef itemData, - bool changeValue ) + bool changeValue ) { OSStatus err = errDataBrowserPropertyNotSupported; @@ -218,7 +221,7 @@ public : wxCommandEvent event( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, checklist->GetId() ); event.SetInt( owner->GetLineFromItem( this ) ); event.SetEventObject( checklist ); - checklist->GetEventHandler()->ProcessEvent( event ); + checklist->GetEventHandler()->ProcessEvent( event ); } break; @@ -233,35 +236,35 @@ public : return err; } - void Check( bool check ) + void Check( bool check ) { m_isChecked = check; } - bool IsChecked() const + bool IsChecked() const { - return m_isChecked; + return m_isChecked; } protected : bool m_isChecked; }; -wxMacListBoxItem* wxMacDataBrowserCheckListControl::CreateItem() +wxMacListBoxItem* wxMacDataBrowserCheckListControl::CreateItem() { return new wxMacCheckListBoxItem(); } -void wxMacDataBrowserCheckListControl::MacCheck( unsigned int n, bool bCheck) +void wxMacDataBrowserCheckListControl::MacCheck( unsigned int n, bool bCheck) { wxMacCheckListBoxItem* item = dynamic_cast( GetItemFromLine( n) ); item->Check( bCheck); UpdateItem(wxMacDataBrowserRootContainer, item , kCheckboxColumnId); } -bool wxMacDataBrowserCheckListControl::MacIsChecked( unsigned int n) const +bool wxMacDataBrowserCheckListControl::MacIsChecked( unsigned int n) const { wxMacCheckListBoxItem * item = dynamic_cast( GetItemFromLine( n ) ); - return item->IsChecked(); + return item->IsChecked(); } diff --git a/src/mac/carbon/listbox.cpp b/src/mac/carbon/listbox.cpp index bbe19045df..54393ffdf3 100644 --- a/src/mac/carbon/listbox.cpp +++ b/src/mac/carbon/listbox.cpp @@ -23,6 +23,7 @@ #include "wx/utils.h" #include "wx/button.h" #include "wx/settings.h" + #include "wx/arrstr.h" #endif #include "wx/toplevel.h" @@ -34,7 +35,6 @@ END_EVENT_TABLE() #include "wx/mac/uma.h" #include "wx/dynarray.h" -#include "wx/arrstr.h" // ============================================================================ // list box control implementation diff --git a/src/mac/carbon/radiobox.cpp b/src/mac/carbon/radiobox.cpp index fb9a2b6efc..102bc58cbc 100644 --- a/src/mac/carbon/radiobox.cpp +++ b/src/mac/carbon/radiobox.cpp @@ -17,9 +17,9 @@ #ifndef WX_PRECOMP #include "wx/radiobut.h" + #include "wx/arrstr.h" #endif -#include "wx/arrstr.h" #include "wx/mac/uma.h" IMPLEMENT_DYNAMIC_CLASS(wxRadioBox, wxControl) diff --git a/src/mac/classic/checklst.cpp b/src/mac/classic/checklst.cpp index 96a18ed143..184928c7df 100644 --- a/src/mac/classic/checklst.cpp +++ b/src/mac/classic/checklst.cpp @@ -18,7 +18,10 @@ #if wxUSE_CHECKLISTBOX #include "wx/checklst.h" -#include "wx/arrstr.h" + +#ifndef WX_PRECOMP + #include "wx/arrstr.h" +#endif #include "wx/mac/uma.h" #include diff --git a/src/mac/classic/radiobox.cpp b/src/mac/classic/radiobox.cpp index 35cba1fcbe..e29ce47f4c 100644 --- a/src/mac/classic/radiobox.cpp +++ b/src/mac/classic/radiobox.cpp @@ -21,9 +21,9 @@ #ifndef WX_PRECOMP #include "wx/radiobut.h" + #include "wx/arrstr.h" #endif -#include "wx/arrstr.h" #include "wx/mac/uma.h" IMPLEMENT_DYNAMIC_CLASS(wxRadioBox, wxControl) diff --git a/src/motif/checklst.cpp b/src/motif/checklst.cpp index a7e8eacd04..ea21e7e192 100644 --- a/src/motif/checklst.cpp +++ b/src/motif/checklst.cpp @@ -19,7 +19,10 @@ #if wxUSE_CHECKLISTBOX #include "wx/checklst.h" -#include "wx/arrstr.h" + +#ifndef WX_PRECOMP + #include "wx/arrstr.h" +#endif // ============================================================================ // implementation diff --git a/src/motif/choice.cpp b/src/motif/choice.cpp index ba418a03e9..11153b562d 100644 --- a/src/motif/choice.cpp +++ b/src/motif/choice.cpp @@ -23,10 +23,9 @@ #ifndef WX_PRECOMP #include "wx/utils.h" + #include "wx/arrstr.h" #endif -#include "wx/arrstr.h" - #ifdef __VMS__ #pragma message disable nosimpint #endif diff --git a/src/motif/combobox.cpp b/src/motif/combobox.cpp index 956dfd7339..de2b16e9b1 100644 --- a/src/motif/combobox.cpp +++ b/src/motif/combobox.cpp @@ -15,7 +15,10 @@ #if wxUSE_COMBOBOX #include "wx/combobox.h" -#include "wx/arrstr.h" + +#ifndef WX_PRECOMP + #include "wx/arrstr.h" +#endif #ifdef __VMS__ #pragma message disable nosimpint diff --git a/src/motif/combobox_native.cpp b/src/motif/combobox_native.cpp index f65ae3d8ea..107df40f0b 100644 --- a/src/motif/combobox_native.cpp +++ b/src/motif/combobox_native.cpp @@ -15,7 +15,10 @@ #if wxUSE_COMBOBOX #include "wx/combobox.h" -#include "wx/arrstr.h" + +#ifndef WX_PRECOMP + #include "wx/arrstr.h" +#endif #ifdef __VMS__ #pragma message disable nosimpint diff --git a/src/motif/listbox.cpp b/src/motif/listbox.cpp index 9845531ed1..d0cd48fdec 100644 --- a/src/motif/listbox.cpp +++ b/src/motif/listbox.cpp @@ -21,6 +21,7 @@ #include "wx/log.h" #include "wx/utils.h" #include "wx/settings.h" + #include "wx/arrstr.h" #endif #ifdef __VMS @@ -28,8 +29,6 @@ #define XtDisplay XTDISPLAY #endif -#include "wx/arrstr.h" - #ifdef __VMS__ #pragma message disable nosimpint #endif diff --git a/src/motif/radiobox.cpp b/src/motif/radiobox.cpp index 09b06715d1..35faf81059 100644 --- a/src/motif/radiobox.cpp +++ b/src/motif/radiobox.cpp @@ -22,10 +22,9 @@ #ifndef WX_PRECOMP #include "wx/utils.h" + #include "wx/arrstr.h" #endif -#include "wx/arrstr.h" - #ifdef __VMS__ #pragma message disable nosimpint #endif diff --git a/src/palmos/volume.cpp b/src/palmos/volume.cpp index 042acfd85b..a73244f012 100644 --- a/src/palmos/volume.cpp +++ b/src/palmos/volume.cpp @@ -32,9 +32,9 @@ #include "wx/icon.h" #endif #include "wx/intl.h" + #include "wx/arrstr.h" #endif // WX_PRECOMP -#include "wx/arrstr.h" #include "wx/hashmap.h" #include