From e6e839336c9f9a869d40b3c7ed212e6f6641d04f Mon Sep 17 00:00:00 2001 From: =?utf8?q?W=C5=82odzimierz=20Skiba?= Date: Mon, 29 May 2006 21:26:35 +0000 Subject: [PATCH] Include wx/checklst.h according to precompiled headers of wx/wx.h (with other minor cleaning). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39463 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/cocoa/checklst.mm | 3 ++- src/common/valgen.cpp | 4 +--- src/gtk/listbox.cpp | 10 +++++----- src/gtk1/listbox.cpp | 8 ++++---- src/msw/checklst.cpp | 5 +++-- src/msw/wince/checklst.cpp | 6 +++--- src/palmos/checklst.cpp | 9 +++++---- src/univ/checklst.cpp | 4 ++-- src/xrc/xh_chckl.cpp | 3 +-- 9 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/cocoa/checklst.mm b/src/cocoa/checklst.mm index 80dbda3c3d..5865461756 100644 --- a/src/cocoa/checklst.mm +++ b/src/cocoa/checklst.mm @@ -13,10 +13,11 @@ #if wxUSE_CHECKLISTBOX +#include "wx/checklst.h" + #ifndef WX_PRECOMP #include "wx/log.h" #include "wx/app.h" - #include "wx/checklst.h" #endif //WX_PRECOMP IMPLEMENT_DYNAMIC_CLASS(wxCheckListBox, wxListBox) diff --git a/src/common/valgen.cpp b/src/common/valgen.cpp index 3d77628f4a..4b05f6d4f2 100644 --- a/src/common/valgen.cpp +++ b/src/common/valgen.cpp @@ -34,6 +34,7 @@ #include "wx/button.h" #include "wx/listbox.h" #include "wx/slider.h" + #include "wx/checklst.h" #endif #include "wx/spinctrl.h" @@ -41,9 +42,6 @@ #if wxUSE_SPINBTN #include "wx/spinbutt.h" #endif -#if wxUSE_CHECKLISTBOX - #include "wx/checklst.h" -#endif #if wxUSE_TOGGLEBTN #include "wx/tglbtn.h" #endif diff --git a/src/gtk/listbox.cpp b/src/gtk/listbox.cpp index e20ebc219e..f0fba8492d 100644 --- a/src/gtk/listbox.cpp +++ b/src/gtk/listbox.cpp @@ -21,10 +21,10 @@ #include "wx/log.h" #include "wx/utils.h" #include "wx/settings.h" + #include "wx/checklst.h" #endif #include "wx/arrstr.h" -#include "wx/checklst.h" #include "wx/gtk/private.h" #include "wx/gtk/treeentry_gtk.h" @@ -880,8 +880,8 @@ int wxListBox::FindString( const wxString &item, bool bCase ) const int wxListBox::GetSelection() const { - wxCHECK_MSG( m_treeview != NULL, -1, wxT("invalid listbox")); - wxCHECK_MSG( HasFlag(wxLB_SINGLE), -1, + wxCHECK_MSG( m_treeview != NULL, wxNOT_FOUND, wxT("invalid listbox")); + wxCHECK_MSG( HasFlag(wxLB_SINGLE), wxNOT_FOUND, wxT("must be single selection listbox")); GtkTreeIter iter; @@ -889,7 +889,7 @@ int wxListBox::GetSelection() const // only works on single-sel if (!gtk_tree_selection_get_selected(selection, NULL, &iter)) - return -1; + return wxNOT_FOUND; GtkTreePath* path = gtk_tree_model_get_path(GTK_TREE_MODEL(m_liststore), &iter); @@ -903,7 +903,7 @@ int wxListBox::GetSelection() const int wxListBox::GetSelections( wxArrayInt& aSelections ) const { - wxCHECK_MSG( m_treeview != NULL, -1, wxT("invalid listbox") ); + wxCHECK_MSG( m_treeview != NULL, wxNOT_FOUND, wxT("invalid listbox") ); aSelections.Empty(); diff --git a/src/gtk1/listbox.cpp b/src/gtk1/listbox.cpp index 38eee5c8d3..f9503fa3c4 100644 --- a/src/gtk1/listbox.cpp +++ b/src/gtk1/listbox.cpp @@ -19,10 +19,10 @@ #include "wx/intl.h" #include "wx/utils.h" #include "wx/settings.h" + #include "wx/checklst.h" #endif #include "wx/arrstr.h" -#include "wx/checklst.h" #include "wx/gtk1/private.h" #if wxUSE_TOOLTIPS @@ -976,7 +976,7 @@ int wxListBox::FindString( const wxString &item, bool bCase ) const int wxListBox::GetSelection() const { - wxCHECK_MSG( m_list != NULL, -1, wxT("invalid listbox") ); + wxCHECK_MSG( m_list != NULL, wxNOT_FOUND, wxT("invalid listbox") ); GList *child = m_list->children; int count = 0; @@ -986,12 +986,12 @@ int wxListBox::GetSelection() const count++; child = child->next; } - return -1; + return wxNOT_FOUND; } int wxListBox::GetSelections( wxArrayInt& aSelections ) const { - wxCHECK_MSG( m_list != NULL, -1, wxT("invalid listbox") ); + wxCHECK_MSG( m_list != NULL, wxNOT_FOUND, wxT("invalid listbox") ); // get the number of selected items first GList *child = m_list->children; diff --git a/src/msw/checklst.cpp b/src/msw/checklst.cpp index 91c20b20b0..0a9a715488 100644 --- a/src/msw/checklst.cpp +++ b/src/msw/checklst.cpp @@ -21,11 +21,13 @@ #include "wx/wxprec.h" #ifdef __BORLANDC__ -#pragma hdrstop + #pragma hdrstop #endif #if wxUSE_CHECKLISTBOX && wxUSE_OWNER_DRAWN +#include "wx/checklst.h" + #ifndef WX_PRECOMP #include "wx/object.h" #include "wx/colour.h" @@ -41,7 +43,6 @@ #endif #include "wx/ownerdrw.h" -#include "wx/checklst.h" #include "wx/msw/wrapwin.h" #include diff --git a/src/msw/wince/checklst.cpp b/src/msw/wince/checklst.cpp index b0044c8443..d2ce744d1f 100644 --- a/src/msw/wince/checklst.cpp +++ b/src/msw/wince/checklst.cpp @@ -21,16 +21,16 @@ #include "wx/wxprec.h" #ifdef __BORLANDC__ -#pragma hdrstop + #pragma hdrstop #endif #if wxUSE_CHECKLISTBOX +#include "wx/checklst.h" + #ifndef WX_PRECOMP #endif -#include "wx/checklst.h" - // include "properly" #include "wx/msw/wrapcctl.h" diff --git a/src/palmos/checklst.cpp b/src/palmos/checklst.cpp index fe75aeae4d..358a423dc6 100644 --- a/src/palmos/checklst.cpp +++ b/src/palmos/checklst.cpp @@ -21,10 +21,12 @@ #include "wx/wxprec.h" #ifdef __BORLANDC__ -#pragma hdrstop + #pragma hdrstop #endif -#if wxUSE_OWNER_DRAWN +#if wxUSE_CHECKLISTBOX && wxUSE_OWNER_DRAWN + +#include "wx/checklst.h" #ifndef WX_PRECOMP #include "wx/object.h" @@ -41,7 +43,6 @@ #endif #include "wx/ownerdrw.h" -#include "wx/checklst.h" #include "wx/palmos/wrapwin.h" @@ -283,4 +284,4 @@ int wxCheckListBox::DoHitTestItem(wxCoord x, wxCoord y) const return wxNOT_FOUND; } -#endif +#endif // wxUSE_CHECKLISTBOX && wxUSE_OWNER_DRAWN diff --git a/src/univ/checklst.cpp b/src/univ/checklst.cpp index a69725f510..5633b9d24c 100644 --- a/src/univ/checklst.cpp +++ b/src/univ/checklst.cpp @@ -25,11 +25,11 @@ #if wxUSE_CHECKLISTBOX +#include "wx/checklst.h" + #ifndef WX_PRECOMP #include "wx/log.h" - #include "wx/dcclient.h" - #include "wx/checklst.h" #include "wx/validate.h" #endif diff --git a/src/xrc/xh_chckl.cpp b/src/xrc/xh_chckl.cpp index 067f3cf7c0..d3a8257cd3 100644 --- a/src/xrc/xh_chckl.cpp +++ b/src/xrc/xh_chckl.cpp @@ -22,10 +22,9 @@ #ifndef WX_PRECOMP #include "wx/intl.h" #include "wx/log.h" + #include "wx/checklst.h" #endif -#include "wx/checklst.h" - IMPLEMENT_DYNAMIC_CLASS(wxCheckListBoxXmlHandler, wxXmlResourceHandler) wxCheckListBoxXmlHandler::wxCheckListBoxXmlHandler() -- 2.47.2