From 8e609c82594a57104ff5e0d4044b2e2697a4b576 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?W=C5=82odzimierz=20Skiba?= Date: Thu, 4 May 2006 18:10:27 +0000 Subject: [PATCH] Include wx/panel.h according to precompiled headers of wx/wx.h (with other minor cleaning). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39034 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/panelg.cpp | 3 +-- src/generic/scrlwing.cpp | 2 +- src/gtk/notebook.cpp | 4 ++-- src/gtk/textctrl.cpp | 2 +- src/gtk1/notebook.cpp | 4 ++-- src/gtk1/textctrl.cpp | 2 +- src/mac/carbon/button.cpp | 21 ++++++++++++--------- src/mac/carbon/control.cpp | 2 +- src/mac/carbon/window.cpp | 2 +- src/mac/classic/button.cpp | 8 ++++++-- src/mac/classic/control.cpp | 2 +- src/mac/classic/window.cpp | 2 +- src/motif/control.cpp | 3 +-- src/x11/textctrl.cpp | 2 +- src/x11/window.cpp | 2 +- src/xrc/xh_panel.cpp | 6 +++++- src/xrc/xh_sizer.cpp | 2 +- src/xrc/xh_unkwn.cpp | 2 +- src/xrc/xmlres.cpp | 2 +- 19 files changed, 41 insertions(+), 32 deletions(-) diff --git a/src/generic/panelg.cpp b/src/generic/panelg.cpp index 99314edecf..454f5dc1d8 100644 --- a/src/generic/panelg.cpp +++ b/src/generic/panelg.cpp @@ -30,10 +30,10 @@ #include "wx/colour.h" #include "wx/settings.h" #include "wx/log.h" + #include "wx/panel.h" #endif #include "wx/containr.h" -#include "wx/panel.h" // ---------------------------------------------------------------------------- // wxWin macros @@ -179,4 +179,3 @@ void wxPanel::OnSize(wxSizeEvent& event) event.Skip(); } - diff --git a/src/generic/scrlwing.cpp b/src/generic/scrlwing.cpp index 69c534470d..442efe3f83 100644 --- a/src/generic/scrlwing.cpp +++ b/src/generic/scrlwing.cpp @@ -33,11 +33,11 @@ #ifndef WX_PRECOMP #include "wx/utils.h" + #include "wx/panel.h" #endif #include "wx/dcclient.h" -#include "wx/panel.h" #if wxUSE_TIMER #include "wx/timer.h" #endif diff --git a/src/gtk/notebook.cpp b/src/gtk/notebook.cpp index 38938182da..34dd2bf59d 100644 --- a/src/gtk/notebook.cpp +++ b/src/gtk/notebook.cpp @@ -18,9 +18,9 @@ #include "wx/intl.h" #include "wx/log.h" #include "wx/utils.h" + #include "wx/panel.h" #endif -#include "wx/panel.h" #include "wx/imaglist.h" #include "wx/bitmap.h" #include "wx/fontutil.h" @@ -694,7 +694,7 @@ bool wxNotebook::InsertPage( size_t position, /* set the label text */ nb_page->m_text = text; - if (nb_page->m_text.empty()) nb_page->m_text = wxT(""); + if (nb_page->m_text.empty()) nb_page->m_text = wxEmptyString; nb_page->m_label = GTK_LABEL( gtk_label_new(wxGTK_CONV(nb_page->m_text)) ); gtk_box_pack_end( GTK_BOX(nb_page->m_box), GTK_WIDGET(nb_page->m_label), FALSE, FALSE, m_padding ); diff --git a/src/gtk/textctrl.cpp b/src/gtk/textctrl.cpp index 73b66c7677..2b60a1a8f6 100644 --- a/src/gtk/textctrl.cpp +++ b/src/gtk/textctrl.cpp @@ -16,11 +16,11 @@ #include "wx/intl.h" #include "wx/log.h" #include "wx/utils.h" + #include "wx/panel.h" #endif #include "wx/math.h" #include "wx/settings.h" -#include "wx/panel.h" #include "wx/strconv.h" #include "wx/fontutil.h" // for wxNativeFontInfo (GetNativeFontInfo()) diff --git a/src/gtk1/notebook.cpp b/src/gtk1/notebook.cpp index 2d8998bbe1..a1e152cbe3 100644 --- a/src/gtk1/notebook.cpp +++ b/src/gtk1/notebook.cpp @@ -18,9 +18,9 @@ #include "wx/intl.h" #include "wx/log.h" #include "wx/utils.h" + #include "wx/panel.h" #endif -#include "wx/panel.h" #include "wx/imaglist.h" #include "wx/bitmap.h" #include "wx/fontutil.h" @@ -692,7 +692,7 @@ bool wxNotebook::InsertPage( size_t position, /* set the label text */ nb_page->m_text = text; - if (nb_page->m_text.empty()) nb_page->m_text = wxT(""); + if (nb_page->m_text.empty()) nb_page->m_text = wxEmptyString; nb_page->m_label = GTK_LABEL( gtk_label_new(wxGTK_CONV(nb_page->m_text)) ); gtk_box_pack_end( GTK_BOX(nb_page->m_box), GTK_WIDGET(nb_page->m_label), FALSE, FALSE, m_padding ); diff --git a/src/gtk1/textctrl.cpp b/src/gtk1/textctrl.cpp index 59dc8c0690..69f4970990 100644 --- a/src/gtk1/textctrl.cpp +++ b/src/gtk1/textctrl.cpp @@ -16,11 +16,11 @@ #include "wx/intl.h" #include "wx/log.h" #include "wx/utils.h" + #include "wx/panel.h" #endif #include "wx/math.h" #include "wx/settings.h" -#include "wx/panel.h" #include "wx/strconv.h" #include "wx/fontutil.h" // for wxNativeFontInfo (GetNativeFontInfo()) diff --git a/src/mac/carbon/button.cpp b/src/mac/carbon/button.cpp index e69b3e3e6c..c5a3f521bd 100644 --- a/src/mac/carbon/button.cpp +++ b/src/mac/carbon/button.cpp @@ -1,18 +1,22 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: button.cpp +// Name: src/mac/carbon/button.cpp // Purpose: wxButton // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 // RCS-ID: $Id$ // Copyright: (c) Stefan Csomor -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #include "wx/wxprec.h" #include "wx/button.h" -#include "wx/panel.h" + +#ifndef WX_PRECOMP + #include "wx/panel.h" +#endif + #include "wx/stockitem.h" #include "wx/mac/uma.h" @@ -143,11 +147,11 @@ wxSize wxButton::DoGetBestSize() const Rect bestsize = { 0 , 0 , 0 , 0 } ; m_peer->GetBestRect( &bestsize ) ; - + int wBtn; if ( EmptyRect( &bestsize ) ) { - wBtn = m_label.Length() * charspace + 12 ; + wBtn = m_label.length() * charspace + 12 ; } else { @@ -155,7 +159,7 @@ wxSize wxButton::DoGetBestSize() const sz.y = bestsize.bottom - bestsize.top ; } - if ((wBtn > sz.x) || ( GetWindowStyle() & wxBU_EXACTFIT)) + if ((wBtn > sz.x) || ( GetWindowStyle() & wxBU_EXACTFIT)) sz.x = wBtn; return sz ; @@ -163,7 +167,7 @@ wxSize wxButton::DoGetBestSize() const wxSize wxButton::GetDefaultSize() { - int wBtn = 70 ; + int wBtn = 70 ; int hBtn = 20 ; return wxSize(wBtn, hBtn); @@ -175,7 +179,7 @@ void wxButton::Command (wxCommandEvent & event) ProcessCommand(event); } -wxInt32 wxButton::MacControlHit(WXEVENTHANDLERREF WXUNUSED(handler) , WXEVENTREF WXUNUSED(event) ) +wxInt32 wxButton::MacControlHit(WXEVENTHANDLERREF WXUNUSED(handler) , WXEVENTREF WXUNUSED(event) ) { wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, m_windowId); event.SetEventObject(this); @@ -183,4 +187,3 @@ wxInt32 wxButton::MacControlHit(WXEVENTHANDLERREF WXUNUSED(handler) , WXEVENTREF return noErr; } - diff --git a/src/mac/carbon/control.cpp b/src/mac/carbon/control.cpp index d059e9d917..8fe91d84df 100644 --- a/src/mac/carbon/control.cpp +++ b/src/mac/carbon/control.cpp @@ -15,9 +15,9 @@ #ifndef WX_PRECOMP #include "wx/app.h" + #include "wx/panel.h" #endif // WX_PRECOMP -#include "wx/panel.h" #include "wx/dc.h" #include "wx/dcclient.h" #include "wx/notebook.h" diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index 6093f5494e..fedd13db5f 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/window.cpp @@ -17,12 +17,12 @@ #include "wx/log.h" #include "wx/app.h" #include "wx/utils.h" + #include "wx/panel.h" #endif #include "wx/menu.h" #include "wx/dc.h" #include "wx/dcclient.h" -#include "wx/panel.h" #include "wx/layout.h" #include "wx/dialog.h" #include "wx/scrolbar.h" diff --git a/src/mac/classic/button.cpp b/src/mac/classic/button.cpp index 12864683c9..a12aa3a9b9 100644 --- a/src/mac/classic/button.cpp +++ b/src/mac/classic/button.cpp @@ -16,7 +16,11 @@ #endif #include "wx/button.h" -#include "wx/panel.h" + +#ifndef WX_PRECOMP + #include "wx/panel.h" +#endif + #include "wx/stockitem.h" IMPLEMENT_DYNAMIC_CLASS(wxButton, wxControl) @@ -90,7 +94,7 @@ wxSize wxButton::DoGetBestSize() const { wxSize sz = GetDefaultSize() ; - int wBtn = m_label.Length() * 8 + 12 + 2 * kMacOSXHorizontalBorder ; + int wBtn = m_label.length() * 8 + 12 + 2 * kMacOSXHorizontalBorder ; if (wBtn > sz.x) sz.x = wBtn; diff --git a/src/mac/classic/control.cpp b/src/mac/classic/control.cpp index 8f7ee77cfb..5d178b452f 100644 --- a/src/mac/classic/control.cpp +++ b/src/mac/classic/control.cpp @@ -19,9 +19,9 @@ #ifndef WX_PRECOMP #include "wx/app.h" + #include "wx/panel.h" #endif // WX_PRECOMP -#include "wx/panel.h" #include "wx/dc.h" #include "wx/dcclient.h" #include "wx/notebook.h" diff --git a/src/mac/classic/window.cpp b/src/mac/classic/window.cpp index c18d278e5b..9e75de3d41 100644 --- a/src/mac/classic/window.cpp +++ b/src/mac/classic/window.cpp @@ -17,12 +17,12 @@ #include "wx/log.h" #include "wx/app.h" #include "wx/utils.h" + #include "wx/panel.h" #endif #include "wx/menu.h" #include "wx/dc.h" #include "wx/dcclient.h" -#include "wx/panel.h" #include "wx/layout.h" #include "wx/dialog.h" #include "wx/listbox.h" diff --git a/src/motif/control.cpp b/src/motif/control.cpp index 2c00c7cdf3..13b8146af7 100644 --- a/src/motif/control.cpp +++ b/src/motif/control.cpp @@ -16,10 +16,9 @@ #ifndef WX_PRECOMP #include "wx/utils.h" + #include "wx/panel.h" #endif -#include "wx/panel.h" - #ifdef __VMS__ #pragma message disable nosimpint #endif diff --git a/src/x11/textctrl.cpp b/src/x11/textctrl.cpp index 75a799c5b1..a7e36d0404 100644 --- a/src/x11/textctrl.cpp +++ b/src/x11/textctrl.cpp @@ -16,10 +16,10 @@ #include "wx/intl.h" #include "wx/log.h" #include "wx/utils.h" + #include "wx/panel.h" #endif #include "wx/settings.h" -#include "wx/panel.h" #include "wx/clipbrd.h" #include "wx/tokenzr.h" #include "wx/dcclient.h" diff --git a/src/x11/window.cpp b/src/x11/window.cpp index bbc7c1d7b2..064f6ee64c 100644 --- a/src/x11/window.cpp +++ b/src/x11/window.cpp @@ -31,12 +31,12 @@ #include "wx/log.h" #include "wx/app.h" #include "wx/utils.h" + #include "wx/panel.h" #endif #include "wx/menu.h" #include "wx/dc.h" #include "wx/dcclient.h" -#include "wx/panel.h" #include "wx/layout.h" #include "wx/dialog.h" #include "wx/listbox.h" diff --git a/src/xrc/xh_panel.cpp b/src/xrc/xh_panel.cpp index 6247d0600c..1fceadd851 100644 --- a/src/xrc/xh_panel.cpp +++ b/src/xrc/xh_panel.cpp @@ -18,7 +18,11 @@ #if wxUSE_XRC #include "wx/xrc/xh_panel.h" -#include "wx/panel.h" + +#ifndef WX_PRECOMP + #include "wx/panel.h" +#endif + #include "wx/frame.h" IMPLEMENT_DYNAMIC_CLASS(wxPanelXmlHandler, wxXmlResourceHandler) diff --git a/src/xrc/xh_sizer.cpp b/src/xrc/xh_sizer.cpp index 8d6d219261..ca8f089f91 100644 --- a/src/xrc/xh_sizer.cpp +++ b/src/xrc/xh_sizer.cpp @@ -21,13 +21,13 @@ #ifndef WX_PRECOMP #include "wx/log.h" + #include "wx/panel.h" #endif #include "wx/sizer.h" #include "wx/gbsizer.h" #include "wx/statbox.h" #include "wx/notebook.h" -#include "wx/panel.h" #include "wx/tokenzr.h" diff --git a/src/xrc/xh_unkwn.cpp b/src/xrc/xh_unkwn.cpp index 144e3a4c00..953aa35f12 100644 --- a/src/xrc/xh_unkwn.cpp +++ b/src/xrc/xh_unkwn.cpp @@ -22,10 +22,10 @@ #ifndef WX_PRECOMP #include "wx/log.h" #include "wx/window.h" + #include "wx/panel.h" #endif #include "wx/sizer.h" -#include "wx/panel.h" class wxUnknownControlContainer : public wxPanel diff --git a/src/xrc/xmlres.cpp b/src/xrc/xmlres.cpp index ea902a5407..3fedc64468 100644 --- a/src/xrc/xmlres.cpp +++ b/src/xrc/xmlres.cpp @@ -22,6 +22,7 @@ #ifndef WX_PRECOMP #include "wx/intl.h" #include "wx/log.h" + #include "wx/panel.h" #endif #ifndef __WXWINCE__ @@ -29,7 +30,6 @@ #endif #include "wx/dialog.h" -#include "wx/panel.h" #include "wx/frame.h" #include "wx/wfstream.h" #include "wx/filesys.h"