From 76b49cf49ba9ee9f3eeec9730cb4bc4569ab17f1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?W=C5=82odzimierz=20Skiba?= Date: Fri, 5 May 2006 08:10:55 +0000 Subject: [PATCH] Include wx/frame.h according to precompiled headers of wx/wx.h (with other minor cleaning). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39045 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/cocoa/frame.mm | 7 ++-- src/common/framecmn.cpp | 5 +-- src/common/tbarbase.cpp | 9 +++-- src/common/utilscmn.cpp | 7 ++-- src/generic/buttonbar.cpp | 8 ++--- src/generic/statusbr.cpp | 8 ++--- src/gtk/dialog.cpp | 2 +- src/gtk/glcanvas.cpp | 2 +- src/gtk/popupwin.cpp | 2 +- src/gtk/radiobox.cpp | 2 +- src/gtk/taskbar.cpp | 2 +- src/gtk/tbargtk.cpp | 6 ++-- src/gtk/window.cpp | 2 +- src/gtk1/dialog.cpp | 2 +- src/gtk1/glcanvas.cpp | 2 +- src/gtk1/popupwin.cpp | 2 +- src/gtk1/radiobox.cpp | 2 +- src/gtk1/tbargtk.cpp | 6 ++-- src/gtk1/window.cpp | 2 +- src/mac/carbon/app.cpp | 2 +- src/mac/carbon/clipbrd.cpp | 2 +- src/mac/carbon/dialog.cpp | 2 +- src/mac/carbon/fontdlg.cpp | 66 ++++++++++++++++++------------------- src/mac/carbon/menu.cpp | 2 +- src/mac/carbon/window.cpp | 2 +- src/mac/classic/app.cpp | 2 +- src/mac/classic/clipbrd.cpp | 2 +- src/mac/classic/dialog.cpp | 2 +- src/mac/classic/menu.cpp | 2 +- src/mac/classic/window.cpp | 2 +- src/motif/dcscreen.cpp | 3 +- src/motif/menu.cpp | 2 +- src/motif/menuitem.cpp | 2 +- src/motif/toolbar.cpp | 2 +- src/motif/window.cpp | 2 +- src/msw/dragimag.cpp | 2 +- src/msw/frame.cpp | 3 +- src/palmos/dragimag.cpp | 4 +-- src/univ/framuniv.cpp | 7 ++-- src/univ/menu.cpp | 2 +- src/univ/toolbar.cpp | 2 +- src/unix/taskbarx11.cpp | 2 +- src/x11/app.cpp | 2 +- src/x11/dcscreen.cpp | 2 +- src/x11/window.cpp | 2 +- src/xrc/xh_dlg.cpp | 2 +- src/xrc/xh_frame.cpp | 2 +- src/xrc/xh_menu.cpp | 10 ++++-- src/xrc/xh_panel.cpp | 3 +- src/xrc/xh_scwin.cpp | 6 +++- src/xrc/xh_statbar.cpp | 2 +- src/xrc/xh_toolb.cpp | 8 +++-- src/xrc/xmlres.cpp | 2 +- 53 files changed, 127 insertions(+), 111 deletions(-) diff --git a/src/cocoa/frame.mm b/src/cocoa/frame.mm index 90ff51a4ff..fd61328157 100644 --- a/src/cocoa/frame.mm +++ b/src/cocoa/frame.mm @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: cocoa/frame.mm +// Name: src/cocoa/frame.mm // Purpose: wxFrame // Author: David Elliott // Modified by: @@ -10,10 +10,12 @@ ///////////////////////////////////////////////////////////////////////////// #include "wx/wxprec.h" + +#include "wx/frame.h" + #ifndef WX_PRECOMP #include "wx/log.h" #include "wx/app.h" - #include "wx/frame.h" #include "wx/menu.h" #include "wx/toolbar.h" #include "wx/statusbr.h" @@ -287,4 +289,3 @@ wxToolBar* wxFrame::CreateToolBar(long style, void wxFrame::PositionStatusBar() { } - diff --git a/src/common/framecmn.cpp b/src/common/framecmn.cpp index 923fb49e2d..31a955fede 100644 --- a/src/common/framecmn.cpp +++ b/src/common/framecmn.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: common/framecmn.cpp +// Name: src/common/framecmn.cpp // Purpose: common (for all platforms) wxFrame functions // Author: Julian Smart, Vadim Zeitlin // Created: 01/02/97 @@ -23,8 +23,9 @@ #pragma hdrstop #endif +#include "wx/frame.h" + #ifndef WX_PRECOMP - #include "wx/frame.h" #include "wx/menu.h" #include "wx/menuitem.h" #include "wx/dcclient.h" diff --git a/src/common/tbarbase.cpp b/src/common/tbarbase.cpp index 85f121426b..b67f6544a5 100644 --- a/src/common/tbarbase.cpp +++ b/src/common/tbarbase.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: common/tbarbase.cpp +// Name: src/common/tbarbase.cpp // Purpose: wxToolBarBase implementation // Author: Julian Smart // Modified by: VZ at 11.12.99 (wxScrollableToolBar split off) @@ -26,19 +26,18 @@ #if wxUSE_TOOLBAR +#include "wx/toolbar.h" + #ifndef WX_PRECOMP #include "wx/control.h" + #include "wx/frame.h" #endif -#include "wx/frame.h" - #if wxUSE_IMAGE #include "wx/image.h" #include "wx/settings.h" #endif // wxUSE_IMAGE -#include "wx/toolbar.h" - // ---------------------------------------------------------------------------- // wxWidgets macros // ---------------------------------------------------------------------------- diff --git a/src/common/utilscmn.cpp b/src/common/utilscmn.cpp index 05f0ebd938..cf07a0a5c2 100644 --- a/src/common/utilscmn.cpp +++ b/src/common/utilscmn.cpp @@ -72,7 +72,6 @@ #include "wx/colordlg.h" #include "wx/fontdlg.h" #include "wx/notebook.h" - #include "wx/frame.h" #include "wx/statusbr.h" #endif // wxUSE_GUI @@ -819,7 +818,7 @@ bool wxLaunchDefaultBrowser(const wxString& urlOrig, int flags) { ConstStr255Param hint = 0; startSel = 0; - endSel = url.Length(); + endSel = url.length(); err = ICLaunchURL(inst, hint, url.fn_str(), endSel, &startSel, &endSel); if (err != noErr) wxLogDebug(wxT("ICLaunchURL error %d"), (int) err); @@ -1193,7 +1192,7 @@ wxColour wxGetColourFromUser(wxWindow *parent, const wxColour& colInit, const wx wxColour colRet; wxColourDialog dialog(parent, &data); - if (!caption.IsEmpty()) + if (!caption.empty()) dialog.SetTitle(caption); if ( dialog.ShowModal() == wxID_OK ) { @@ -1218,7 +1217,7 @@ wxFont wxGetFontFromUser(wxWindow *parent, const wxFont& fontInit, const wxStrin wxFont fontRet; wxFontDialog dialog(parent, data); - if (!caption.IsEmpty()) + if (!caption.empty()) dialog.SetTitle(caption); if ( dialog.ShowModal() == wxID_OK ) { diff --git a/src/generic/buttonbar.cpp b/src/generic/buttonbar.cpp index b03090fb68..e3c19e3144 100644 --- a/src/generic/buttonbar.cpp +++ b/src/generic/buttonbar.cpp @@ -34,9 +34,9 @@ #include "wx/utils.h" #include "wx/app.h" #include "wx/log.h" + #include "wx/frame.h" #endif -#include "wx/frame.h" #include "wx/image.h" #include "wx/settings.h" #include "wx/dcclient.h" @@ -386,7 +386,7 @@ void wxButtonToolBar::DoLayout() { wxBitmapButton* bmpButton = new wxBitmapButton(this, tool->GetId(), tool->GetNormalBitmap(), wxPoint(tool->m_x, tool->m_y), wxDefaultSize, wxBU_AUTODRAW|wxBORDER_NONE); - if (!tool->GetShortHelp().IsEmpty()) + if (!tool->GetShortHelp().empty()) bmpButton->SetLabel(tool->GetShortHelp()); tool->SetButton(bmpButton); @@ -406,7 +406,7 @@ void wxButtonToolBar::DoLayout() { sz.y += (m_labelHeight + m_labelMargin); - if (!tool->GetShortHelp().IsEmpty()) + if (!tool->GetShortHelp().empty()) { wxClientDC dc(this); dc.SetFont(GetFont()); @@ -515,7 +515,7 @@ void wxButtonToolBar::OnPaint(wxPaintEvent& event) dc.DrawRectangle(backgroundRect); } - if (m_labelHeight > 0 && !tool->GetShortHelp().IsEmpty()) + if (m_labelHeight > 0 && !tool->GetShortHelp().empty()) { int tw, th; dc.GetTextExtent(tool->GetShortHelp(), & tw, & th); diff --git a/src/generic/statusbr.cpp b/src/generic/statusbr.cpp index b08f2f3337..5517573f79 100644 --- a/src/generic/statusbr.cpp +++ b/src/generic/statusbr.cpp @@ -13,15 +13,15 @@ #include "wx/wxprec.h" #ifdef __BORLANDC__ -#pragma hdrstop + #pragma hdrstop #endif #if wxUSE_STATUSBAR #ifndef WX_PRECOMP -#include "wx/frame.h" -#include "wx/settings.h" -#include "wx/dcclient.h" + #include "wx/frame.h" + #include "wx/settings.h" + #include "wx/dcclient.h" #endif #ifdef __WXGTK20__ diff --git a/src/gtk/dialog.cpp b/src/gtk/dialog.cpp index 1464cc2563..81c8bc6249 100644 --- a/src/gtk/dialog.cpp +++ b/src/gtk/dialog.cpp @@ -14,9 +14,9 @@ #ifndef WX_PRECOMP #include "wx/app.h" + #include "wx/frame.h" #endif // WX_PRECOMP -#include "wx/frame.h" #include "wx/cursor.h" #include "wx/evtloop.h" diff --git a/src/gtk/glcanvas.cpp b/src/gtk/glcanvas.cpp index 4ef6d70a22..7d76807bfc 100644 --- a/src/gtk/glcanvas.cpp +++ b/src/gtk/glcanvas.cpp @@ -18,9 +18,9 @@ #ifndef WX_PRECOMP #include "wx/app.h" + #include "wx/frame.h" #endif // WX_PRECOMP -#include "wx/frame.h" #include "wx/colour.h" #include "wx/module.h" diff --git a/src/gtk/popupwin.cpp b/src/gtk/popupwin.cpp index 47a877cd71..843144ebaa 100644 --- a/src/gtk/popupwin.cpp +++ b/src/gtk/popupwin.cpp @@ -16,9 +16,9 @@ #ifndef WX_PRECOMP #include "wx/app.h" + #include "wx/frame.h" #endif // WX_PRECOMP -#include "wx/frame.h" #include "wx/cursor.h" #include diff --git a/src/gtk/radiobox.cpp b/src/gtk/radiobox.cpp index 3d1785b0d3..938ca0d69c 100644 --- a/src/gtk/radiobox.cpp +++ b/src/gtk/radiobox.cpp @@ -16,10 +16,10 @@ #ifndef WX_PRECOMP #include "wx/log.h" + #include "wx/frame.h" #endif #include "wx/dialog.h" -#include "wx/frame.h" #if wxUSE_TOOLTIPS #include "wx/tooltip.h" diff --git a/src/gtk/taskbar.cpp b/src/gtk/taskbar.cpp index 9d9232d7c9..0ef04d1e44 100644 --- a/src/gtk/taskbar.cpp +++ b/src/gtk/taskbar.cpp @@ -16,9 +16,9 @@ #ifndef WX_PRECOMP #include "wx/log.h" + #include "wx/frame.h" #endif -#include "wx/frame.h" #include "wx/menu.h" #include diff --git a/src/gtk/tbargtk.cpp b/src/gtk/tbargtk.cpp index ee9725a088..cbe4087f73 100644 --- a/src/gtk/tbargtk.cpp +++ b/src/gtk/tbargtk.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: tbargtk.cpp +// Name: src/gtk/tbargtk.cpp // Purpose: GTK toolbar // Author: Robert Roebling // Modified: 13.12.99 by VZ to derive from wxToolBarBase @@ -23,7 +23,9 @@ #if wxUSE_TOOLBAR_NATIVE -#include "wx/frame.h" +#ifndef WX_PRECOMP + #include "wx/frame.h" +#endif // FIXME: Use GtkImage instead of GtkPixmap. Use the new toolbar API for when gtk runtime is new enough? // Beware that the new and old toolbar API may not be mixed in usage. diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index eef601151d..d7d79ebf1a 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -21,10 +21,10 @@ #include "wx/log.h" #include "wx/app.h" #include "wx/utils.h" + #include "wx/frame.h" #endif #include "wx/dcclient.h" -#include "wx/frame.h" #include "wx/layout.h" #include "wx/dialog.h" #include "wx/msgdlg.h" diff --git a/src/gtk1/dialog.cpp b/src/gtk1/dialog.cpp index eab01d62fd..a58dcb55db 100644 --- a/src/gtk1/dialog.cpp +++ b/src/gtk1/dialog.cpp @@ -14,9 +14,9 @@ #ifndef WX_PRECOMP #include "wx/app.h" + #include "wx/frame.h" #endif // WX_PRECOMP -#include "wx/frame.h" #include "wx/cursor.h" #include "wx/evtloop.h" diff --git a/src/gtk1/glcanvas.cpp b/src/gtk1/glcanvas.cpp index 5d4bcc5c82..6fa3c8444b 100644 --- a/src/gtk1/glcanvas.cpp +++ b/src/gtk1/glcanvas.cpp @@ -18,9 +18,9 @@ #ifndef WX_PRECOMP #include "wx/app.h" + #include "wx/frame.h" #endif // WX_PRECOMP -#include "wx/frame.h" #include "wx/colour.h" #include "wx/module.h" diff --git a/src/gtk1/popupwin.cpp b/src/gtk1/popupwin.cpp index 464ccd4bde..65d35e5c22 100644 --- a/src/gtk1/popupwin.cpp +++ b/src/gtk1/popupwin.cpp @@ -16,9 +16,9 @@ #ifndef WX_PRECOMP #include "wx/app.h" + #include "wx/frame.h" #endif // WX_PRECOMP -#include "wx/frame.h" #include "wx/cursor.h" #include diff --git a/src/gtk1/radiobox.cpp b/src/gtk1/radiobox.cpp index 83252b6c37..4e355e77a6 100644 --- a/src/gtk1/radiobox.cpp +++ b/src/gtk1/radiobox.cpp @@ -16,10 +16,10 @@ #ifndef WX_PRECOMP #include "wx/log.h" + #include "wx/frame.h" #endif #include "wx/dialog.h" -#include "wx/frame.h" #include "wx/gtk1/private.h" #include diff --git a/src/gtk1/tbargtk.cpp b/src/gtk1/tbargtk.cpp index b81c5c77ec..71392ae7e5 100644 --- a/src/gtk1/tbargtk.cpp +++ b/src/gtk1/tbargtk.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: tbargtk.cpp +// Name: src/gtk1/tbargtk.cpp // Purpose: GTK toolbar // Author: Robert Roebling // Modified: 13.12.99 by VZ to derive from wxToolBarBase @@ -23,7 +23,9 @@ #if wxUSE_TOOLBAR_NATIVE -#include "wx/frame.h" +#ifndef WX_PRECOMP + #include "wx/frame.h" +#endif #include #include "wx/gtk1/private.h" diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index 23578f743b..78f316c9e9 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -21,10 +21,10 @@ #include "wx/log.h" #include "wx/app.h" #include "wx/utils.h" + #include "wx/frame.h" #endif #include "wx/dcclient.h" -#include "wx/frame.h" #include "wx/layout.h" #include "wx/dialog.h" #include "wx/msgdlg.h" diff --git a/src/mac/carbon/app.cpp b/src/mac/carbon/app.cpp index 3487a763de..b133895c49 100644 --- a/src/mac/carbon/app.cpp +++ b/src/mac/carbon/app.cpp @@ -18,9 +18,9 @@ #include "wx/log.h" #include "wx/utils.h" #include "wx/window.h" + #include "wx/frame.h" #endif -#include "wx/frame.h" #include "wx/button.h" #include "wx/gdicmn.h" #include "wx/pen.h" diff --git a/src/mac/carbon/clipbrd.cpp b/src/mac/carbon/clipbrd.cpp index 18e8d90a59..0b9c1a831d 100644 --- a/src/mac/carbon/clipbrd.cpp +++ b/src/mac/carbon/clipbrd.cpp @@ -21,9 +21,9 @@ #include "wx/log.h" #include "wx/app.h" #include "wx/utils.h" + #include "wx/frame.h" #endif -#include "wx/frame.h" #include "wx/bitmap.h" #include "wx/metafile.h" diff --git a/src/mac/carbon/dialog.cpp b/src/mac/carbon/dialog.cpp index 69f568b9a5..dee3c9239f 100644 --- a/src/mac/carbon/dialog.cpp +++ b/src/mac/carbon/dialog.cpp @@ -16,9 +16,9 @@ #ifndef WX_PRECOMP #include "wx/app.h" #include "wx/utils.h" + #include "wx/frame.h" #endif // WX_PRECOMP -#include "wx/frame.h" #include "wx/settings.h" #include "wx/mac/uma.h" diff --git a/src/mac/carbon/fontdlg.cpp b/src/mac/carbon/fontdlg.cpp index 7ce9c55678..90ccac9239 100644 --- a/src/mac/carbon/fontdlg.cpp +++ b/src/mac/carbon/fontdlg.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: fontdlg.cpp +// Name: src/mac/carbon/fontdlg.cpp // Purpose: wxFontDialog class for carbon 10.2+. // Author: Ryan Norton // Modified by: @@ -25,22 +25,22 @@ #endif #ifndef WX_PRECOMP -#include "wx/intl.h" -#include "wx/wxchar.h" -#include "wx/dcclient.h" -#include "wx/frame.h" -#include "wx/textctrl.h" -#include "wx/listbox.h" -#include "wx/checkbox.h" -#include "wx/choice.h" -#include "wx/sizer.h" -#include "wx/stattext.h" -#include "wx/button.h" + #include "wx/intl.h" + #include "wx/wxchar.h" + #include "wx/dcclient.h" + #include "wx/frame.h" + #include "wx/textctrl.h" + #include "wx/listbox.h" + #include "wx/checkbox.h" + #include "wx/choice.h" + #include "wx/sizer.h" + #include "wx/stattext.h" + #include "wx/button.h" #endif #include "wx/fontdlg.h" #include "wx/dcclient.h" - + #if wxMAC_USE_EXPERIMENTAL_FONTDIALOG IMPLEMENT_DYNAMIC_CLASS(wxFontDialog, wxDialog) @@ -48,7 +48,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxFontDialog, wxDialog) #include "wx/mac/private.h" // --------------------------------------------------------------------------- -// wxFontDialog +// wxFontDialog // --------------------------------------------------------------------------- static const EventTypeSpec eventList[] = @@ -62,7 +62,7 @@ pascal OSStatus wxMacCarbonFontPanelHandler(EventHandlerCallRef nextHandler, Eve OSStatus result = eventNotHandledErr ; wxFontDialog *fontdialog = (wxFontDialog*) userData ; wxFontData& fontdata= fontdialog->GetFontData() ; - + wxMacCarbonEvent cEvent( event ); switch(cEvent.GetKind()) { @@ -70,32 +70,32 @@ pascal OSStatus wxMacCarbonFontPanelHandler(EventHandlerCallRef nextHandler, Eve { FMFont fontId = 0 ; if ( cEvent.GetParameter(kEventParamATSUFontID, &fontId) == noErr ) - { + { FMFontStyle fontStyle = cEvent.GetParameter(kEventParamFMFontStyle); FMFontSize fontSize = cEvent.GetParameter(kEventParamFMFontSize); ByteCount actualLength = 0; CFStringRef cfName = NULL; char *c = NULL; - OSStatus err = ATSUFindFontName(fontId , kFontFamilyName, kFontUnicodePlatform, kFontNoScriptCode, + OSStatus err = ATSUFindFontName(fontId , kFontFamilyName, kFontUnicodePlatform, kFontNoScriptCode, kFontNoLanguageCode , 0 , NULL , &actualLength , NULL ); if ( err == noErr) { actualLength += 1 ; char *c = (char*)malloc( actualLength ); - err = ATSUFindFontName(fontId, kFontFamilyName, kFontUnicodePlatform, kFontNoScriptCode, + err = ATSUFindFontName(fontId, kFontFamilyName, kFontUnicodePlatform, kFontNoScriptCode, kFontNoLanguageCode, actualLength, c , NULL, NULL); cfName = CFStringCreateWithCharacters(NULL, (UniChar*) c, (actualLength-1) >> 1); } else { - err = ATSUFindFontName(fontId , kFontFamilyName, kFontNoPlatformCode, kFontNoScriptCode, + err = ATSUFindFontName(fontId , kFontFamilyName, kFontNoPlatformCode, kFontNoScriptCode, kFontNoLanguageCode , 0 , NULL , &actualLength , NULL ); if ( err == noErr ) { actualLength += 1 ; c = (char*)malloc(actualLength); - err = ATSUFindFontName(fontId, kFontFamilyName, kFontNoPlatformCode, kFontNoScriptCode, + err = ATSUFindFontName(fontId, kFontFamilyName, kFontNoPlatformCode, kFontNoScriptCode, kFontNoLanguageCode, actualLength, c , NULL, NULL); c[actualLength-1] = 0; cfName = CFStringCreateWithCString(NULL, c, kCFStringEncodingMacRoman ); @@ -103,7 +103,7 @@ pascal OSStatus wxMacCarbonFontPanelHandler(EventHandlerCallRef nextHandler, Eve } if ( c!=NULL ) free(c); - + if ( cfName!=NULL ) { fontdata.m_chosenFont.SetFaceName(wxMacCFStringHolder(cfName).AsString(wxLocale::GetSystemEncoding())); @@ -153,7 +153,7 @@ pascal OSStatus wxMacCarbonFontPanelHandler(EventHandlerCallRef nextHandler, Eve } break ; } ; - + return result ; } @@ -186,7 +186,7 @@ int wxFontDialog::ShowModal() { font = m_fontData.m_initialFont ; } - + ATSUStyle style = (ATSUStyle)font.MacGetATSUStyle(); err = SetFontInfoForSelection (kFontSelectionATSUIType,1, &style , NULL); // just clicking on ENTER will not send us any font setting event, therefore we have to make sure @@ -197,13 +197,13 @@ int wxFontDialog::ShowModal() err = InstallApplicationEventHandler( GetwxMacCarbonFontPanelHandlerUPP(), GetEventTypeCount(eventList), eventList, this , &handler ); - if ( !FPIsFontPanelVisible() ) + if ( !FPIsFontPanelVisible() ) FPShowHideFontPanel(); - + int retval = RunMixedFontDialog(this); - + ::RemoveEventHandler(handler); - + return retval ; } @@ -326,11 +326,11 @@ void wxFontColourSwatchCtrl::OnMouseEvent(wxMouseEvent& event) parent = parent->GetParent(); wxColourData data; - data.SetChooseFull(TRUE); + data.SetChooseFull(true); data.SetColour(m_colour); wxColourDialog *dialog = new wxColourDialog(parent, &data); // Crashes on wxMac (no m_peer) -#ifndef __WXMAC__ +#ifndef __WXMAC__ dialog->SetTitle(_("Background colour")); #endif if (dialog->ShowModal() == wxID_OK) @@ -426,7 +426,7 @@ bool wxFontDialog::Create(wxWindow* parent, const wxFontData& fontData) */ void wxFontDialog::CreateControls() -{ +{ wxFontDialog* itemDialog1 = this; wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL); @@ -488,12 +488,12 @@ void wxFontDialog::CreateControls() m_underlinedCtrl->SetToolTip(_("Check to make the font underlined.")); itemBoxSizer11->Add(m_underlinedCtrl, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); } - + if (m_fontData.GetEnableEffects()) { wxStaticText* itemStaticText15 = new wxStaticText( itemDialog1, wxID_STATIC, _("Colour:"), wxDefaultPosition, wxDefaultSize, 0 ); itemFlexGridSizer4->Add(itemStaticText15, 0, wxALIGN_RIGHT|wxALIGN_TOP|wxALL|wxADJUST_MINSIZE, 5); - + m_colourCtrl = new wxFontColourSwatchCtrl( itemDialog1, wxID_FONTDIALOG_COLOUR, wxDefaultPosition, wxSize(-1, 30), wxSUNKEN_BORDER|wxTAB_TRAVERSAL ); m_colourCtrl->SetHelpText(_("Click to change the font colour.")); if (ShowToolTips()) @@ -670,7 +670,7 @@ void wxFontDialog::InitializeControls() m_boldCtrl->SetValue(m_dialogFont.GetWeight() == wxBOLD); m_italicCtrl->SetValue(m_dialogFont.GetStyle() == wxITALIC); m_sizeCtrl->SetValue(m_dialogFont.GetPointSize()); - + wxString facename = m_dialogFont.GetFaceName(); if (facename.empty() || m_facenameCtrl->FindString(facename) == wxNOT_FOUND) { diff --git a/src/mac/carbon/menu.cpp b/src/mac/carbon/menu.cpp index fec068407d..e59bb00f77 100644 --- a/src/mac/carbon/menu.cpp +++ b/src/mac/carbon/menu.cpp @@ -25,11 +25,11 @@ #include "wx/app.h" #include "wx/utils.h" #include "wx/window.h" + #include "wx/frame.h" #endif #include "wx/menuitem.h" #include "wx/log.h" -#include "wx/frame.h" #include "wx/mac/uma.h" diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index fedd13db5f..9362c60100 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/window.cpp @@ -18,6 +18,7 @@ #include "wx/app.h" #include "wx/utils.h" #include "wx/panel.h" + #include "wx/frame.h" #endif #include "wx/menu.h" @@ -30,7 +31,6 @@ #include "wx/button.h" #include "wx/settings.h" #include "wx/msgdlg.h" -#include "wx/frame.h" #include "wx/tooltip.h" #include "wx/statusbr.h" #include "wx/menuitem.h" diff --git a/src/mac/classic/app.cpp b/src/mac/classic/app.cpp index f7359bc924..fec775419d 100644 --- a/src/mac/classic/app.cpp +++ b/src/mac/classic/app.cpp @@ -22,9 +22,9 @@ #include "wx/log.h" #include "wx/utils.h" #include "wx/window.h" + #include "wx/frame.h" #endif -#include "wx/frame.h" #include "wx/button.h" #include "wx/gdicmn.h" #include "wx/pen.h" diff --git a/src/mac/classic/clipbrd.cpp b/src/mac/classic/clipbrd.cpp index 294e8d2631..09bb87c8c1 100644 --- a/src/mac/classic/clipbrd.cpp +++ b/src/mac/classic/clipbrd.cpp @@ -18,9 +18,9 @@ #include "wx/log.h" #include "wx/app.h" #include "wx/utils.h" + #include "wx/frame.h" #endif -#include "wx/frame.h" #include "wx/bitmap.h" #include "wx/metafile.h" diff --git a/src/mac/classic/dialog.cpp b/src/mac/classic/dialog.cpp index 75a92a14f0..669c65e713 100644 --- a/src/mac/classic/dialog.cpp +++ b/src/mac/classic/dialog.cpp @@ -16,9 +16,9 @@ #ifndef WX_PRECOMP #include "wx/app.h" #include "wx/utils.h" + #include "wx/frame.h" #endif // WX_PRECOMP -#include "wx/frame.h" #include "wx/settings.h" #include "wx/mac/uma.h" diff --git a/src/mac/classic/menu.cpp b/src/mac/classic/menu.cpp index 12cba13bf2..70287633ae 100644 --- a/src/mac/classic/menu.cpp +++ b/src/mac/classic/menu.cpp @@ -25,10 +25,10 @@ #include "wx/app.h" #include "wx/utils.h" #include "wx/window.h" + #include "wx/frame.h" #endif #include "wx/menuitem.h" -#include "wx/frame.h" #include "wx/mac/uma.h" diff --git a/src/mac/classic/window.cpp b/src/mac/classic/window.cpp index 9e75de3d41..2eefcc4804 100644 --- a/src/mac/classic/window.cpp +++ b/src/mac/classic/window.cpp @@ -18,6 +18,7 @@ #include "wx/app.h" #include "wx/utils.h" #include "wx/panel.h" + #include "wx/frame.h" #endif #include "wx/menu.h" @@ -31,7 +32,6 @@ #include "wx/button.h" #include "wx/settings.h" #include "wx/msgdlg.h" -#include "wx/frame.h" #include "wx/notebook.h" #include "wx/tabctrl.h" #include "wx/tooltip.h" diff --git a/src/motif/dcscreen.cpp b/src/motif/dcscreen.cpp index 10b0fb0acc..9186c5352f 100644 --- a/src/motif/dcscreen.cpp +++ b/src/motif/dcscreen.cpp @@ -17,10 +17,9 @@ #ifndef WX_PRECOMP #include "wx/utils.h" #include "wx/window.h" + #include "wx/frame.h" #endif -#include "wx/frame.h" - #ifdef __VMS__ #pragma message disable nosimpint #endif diff --git a/src/motif/menu.cpp b/src/motif/menu.cpp index 7ea74148a6..52a8343fff 100644 --- a/src/motif/menu.cpp +++ b/src/motif/menu.cpp @@ -26,10 +26,10 @@ #include "wx/log.h" #include "wx/app.h" #include "wx/utils.h" + #include "wx/frame.h" #endif #include "wx/menuitem.h" -#include "wx/frame.h" #include "wx/settings.h" #ifdef __VMS__ diff --git a/src/motif/menuitem.cpp b/src/motif/menuitem.cpp index a8a899d140..f07b0a4b2b 100644 --- a/src/motif/menuitem.cpp +++ b/src/motif/menuitem.cpp @@ -24,10 +24,10 @@ #ifndef WX_PRECOMP #include "wx/utils.h" + #include "wx/frame.h" #endif #include "wx/menu.h" -#include "wx/frame.h" #ifdef __VMS__ #pragma message disable nosimpint diff --git a/src/motif/toolbar.cpp b/src/motif/toolbar.cpp index 774358df50..dc724b395e 100644 --- a/src/motif/toolbar.cpp +++ b/src/motif/toolbar.cpp @@ -28,11 +28,11 @@ #ifndef WX_PRECOMP #include "wx/app.h" + #include "wx/frame.h" #endif #include "wx/settings.h" #include "wx/timer.h" -#include "wx/frame.h" #ifdef __VMS__ #pragma message disable nosimpint diff --git a/src/motif/window.cpp b/src/motif/window.cpp index e97cc2732b..b4dcadb3f0 100644 --- a/src/motif/window.cpp +++ b/src/motif/window.cpp @@ -31,6 +31,7 @@ #include "wx/log.h" #include "wx/app.h" #include "wx/utils.h" + #include "wx/frame.h" #endif #include "wx/menu.h" @@ -39,7 +40,6 @@ #include "wx/layout.h" #include "wx/button.h" #include "wx/settings.h" -#include "wx/frame.h" #include "wx/scrolwin.h" #include "wx/module.h" #include "wx/menuitem.h" diff --git a/src/msw/dragimag.cpp b/src/msw/dragimag.cpp index 01e42a155d..75d271d05c 100644 --- a/src/msw/dragimag.cpp +++ b/src/msw/dragimag.cpp @@ -35,10 +35,10 @@ #include "wx/settings.h" #include "wx/intl.h" #include "wx/log.h" + #include "wx/frame.h" #endif #include "wx/msw/private.h" -#include "wx/frame.h" #include "wx/image.h" #include "wx/msw/dragimag.h" diff --git a/src/msw/frame.cpp b/src/msw/frame.cpp index 1d7e46da63..41518eac18 100644 --- a/src/msw/frame.cpp +++ b/src/msw/frame.cpp @@ -24,8 +24,9 @@ #pragma hdrstop #endif +#include "wx/frame.h" + #ifndef WX_PRECOMP - #include "wx/frame.h" #include "wx/app.h" #include "wx/menu.h" #include "wx/utils.h" diff --git a/src/palmos/dragimag.cpp b/src/palmos/dragimag.cpp index 67688416f8..b96507dd23 100644 --- a/src/palmos/dragimag.cpp +++ b/src/palmos/dragimag.cpp @@ -21,7 +21,7 @@ #include "wx/wxprec.h" #ifdef __BORLANDC__ -#pragma hdrstop + #pragma hdrstop #endif #if wxUSE_DRAGIMAGE @@ -35,9 +35,9 @@ #include "wx/settings.h" #include "wx/intl.h" #include "wx/log.h" + #include "wx/frame.h" #endif -#include "wx/frame.h" #include "wx/image.h" #include "wx/palmos/dragimag.h" diff --git a/src/univ/framuniv.cpp b/src/univ/framuniv.cpp index c0e343411e..2ce9b25aa4 100644 --- a/src/univ/framuniv.cpp +++ b/src/univ/framuniv.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Name: univ/frame.cpp +// Name: src/univ/frame.cpp // Purpose: wxFrame class for wxUniversal // Author: Vadim Zeitlin // Modified by: @@ -24,9 +24,10 @@ #pragma hdrstop #endif - #include "wx/menu.h" +#include "wx/frame.h" + #ifndef WX_PRECOMP - #include "wx/frame.h" + #include "wx/menu.h" #include "wx/statusbr.h" #include "wx/settings.h" #include "wx/toolbar.h" diff --git a/src/univ/menu.cpp b/src/univ/menu.cpp index c77350cc1e..80023293d8 100644 --- a/src/univ/menu.cpp +++ b/src/univ/menu.cpp @@ -32,12 +32,12 @@ #include "wx/settings.h" #include "wx/accel.h" #include "wx/log.h" + #include "wx/frame.h" #endif // WX_PRECOMP #include "wx/popupwin.h" #include "wx/evtloop.h" #include "wx/dcclient.h" -#include "wx/frame.h" #include "wx/univ/renderer.h" diff --git a/src/univ/toolbar.cpp b/src/univ/toolbar.cpp index a284182dd5..59891ba4ae 100644 --- a/src/univ/toolbar.cpp +++ b/src/univ/toolbar.cpp @@ -33,11 +33,11 @@ #include "wx/utils.h" #include "wx/app.h" #include "wx/log.h" + #include "wx/frame.h" #endif #include "wx/univ/renderer.h" -#include "wx/frame.h" #include "wx/image.h" // ---------------------------------------------------------------------------- diff --git a/src/unix/taskbarx11.cpp b/src/unix/taskbarx11.cpp index b6ec00f160..43bf60080a 100644 --- a/src/unix/taskbarx11.cpp +++ b/src/unix/taskbarx11.cpp @@ -25,9 +25,9 @@ #ifndef WX_PRECOMP #include "wx/log.h" + #include "wx/frame.h" #endif -#include "wx/frame.h" #include "wx/bitmap.h" #include "wx/statbmp.h" #include "wx/sizer.h" diff --git a/src/x11/app.cpp b/src/x11/app.cpp index e6ac52fd44..9bb8539733 100644 --- a/src/x11/app.cpp +++ b/src/x11/app.cpp @@ -19,9 +19,9 @@ #include "wx/intl.h" #include "wx/log.h" #include "wx/utils.h" + #include "wx/frame.h" #endif -#include "wx/frame.h" #include "wx/gdicmn.h" #include "wx/icon.h" #include "wx/dialog.h" diff --git a/src/x11/dcscreen.cpp b/src/x11/dcscreen.cpp index 8fb5786a5a..8bcb5f410b 100644 --- a/src/x11/dcscreen.cpp +++ b/src/x11/dcscreen.cpp @@ -18,9 +18,9 @@ #include "wx/app.h" #include "wx/utils.h" #include "wx/window.h" + #include "wx/frame.h" #endif -#include "wx/frame.h" #include "wx/fontutil.h" #include "wx/x11/private.h" diff --git a/src/x11/window.cpp b/src/x11/window.cpp index 064f6ee64c..4042d79c7a 100644 --- a/src/x11/window.cpp +++ b/src/x11/window.cpp @@ -32,6 +32,7 @@ #include "wx/app.h" #include "wx/utils.h" #include "wx/panel.h" + #include "wx/frame.h" #endif #include "wx/menu.h" @@ -43,7 +44,6 @@ #include "wx/button.h" #include "wx/settings.h" #include "wx/msgdlg.h" -#include "wx/frame.h" #include "wx/scrolwin.h" #include "wx/scrolbar.h" #include "wx/module.h" diff --git a/src/xrc/xh_dlg.cpp b/src/xrc/xh_dlg.cpp index 95a930b86c..704ac90abf 100644 --- a/src/xrc/xh_dlg.cpp +++ b/src/xrc/xh_dlg.cpp @@ -22,10 +22,10 @@ #ifndef WX_PRECOMP #include "wx/intl.h" #include "wx/log.h" + #include "wx/frame.h" #endif #include "wx/dialog.h" -#include "wx/frame.h" IMPLEMENT_DYNAMIC_CLASS(wxDialogXmlHandler, wxXmlResourceHandler) diff --git a/src/xrc/xh_frame.cpp b/src/xrc/xh_frame.cpp index 5e6e91995c..a10f0d24cf 100644 --- a/src/xrc/xh_frame.cpp +++ b/src/xrc/xh_frame.cpp @@ -22,9 +22,9 @@ #ifndef WX_PRECOMP #include "wx/intl.h" #include "wx/log.h" + #include "wx/frame.h" #endif -#include "wx/frame.h" #include "wx/dialog.h" // to get wxDEFAULT_DIALOG_STYLE IMPLEMENT_DYNAMIC_CLASS(wxFrameXmlHandler, wxXmlResourceHandler) diff --git a/src/xrc/xh_menu.cpp b/src/xrc/xh_menu.cpp index 5b13b5be3c..47e5494d7c 100644 --- a/src/xrc/xh_menu.cpp +++ b/src/xrc/xh_menu.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: xh_menu.cpp +// Name: src/xrc/xh_menu.cpp // Purpose: XRC resource for menus and menubars // Author: Vaclav Slavik // Created: 2000/03/05 @@ -18,8 +18,12 @@ #if wxUSE_XRC #include "wx/xrc/xh_menu.h" + +#ifndef WX_PRECOMP + #include "wx/frame.h" +#endif + #include "wx/menu.h" -#include "wx/frame.h" IMPLEMENT_DYNAMIC_CLASS(wxMenuXmlHandler, wxXmlResourceHandler) @@ -75,7 +79,7 @@ wxObject *wxMenuXmlHandler::DoCreateResource() wxString label = GetText(wxT("label")); wxString accel = GetText(wxT("accel"), false); wxString fullLabel = label; - if (!accel.IsEmpty()) + if (!accel.empty()) fullLabel << wxT("\t") << accel; wxItemKind kind = wxITEM_NORMAL; diff --git a/src/xrc/xh_panel.cpp b/src/xrc/xh_panel.cpp index 1fceadd851..04a21ddfbd 100644 --- a/src/xrc/xh_panel.cpp +++ b/src/xrc/xh_panel.cpp @@ -21,10 +21,9 @@ #ifndef WX_PRECOMP #include "wx/panel.h" + #include "wx/frame.h" #endif -#include "wx/frame.h" - IMPLEMENT_DYNAMIC_CLASS(wxPanelXmlHandler, wxXmlResourceHandler) wxPanelXmlHandler::wxPanelXmlHandler() : wxXmlResourceHandler() diff --git a/src/xrc/xh_scwin.cpp b/src/xrc/xh_scwin.cpp index 59988f7844..f205a72b7b 100644 --- a/src/xrc/xh_scwin.cpp +++ b/src/xrc/xh_scwin.cpp @@ -18,8 +18,12 @@ #if wxUSE_XRC #include "wx/xrc/xh_scwin.h" + +#ifndef WX_PRECOMP + #include "wx/frame.h" +#endif + #include "wx/scrolwin.h" -#include "wx/frame.h" IMPLEMENT_DYNAMIC_CLASS(wxScrolledWindowXmlHandler, wxXmlResourceHandler) diff --git a/src/xrc/xh_statbar.cpp b/src/xrc/xh_statbar.cpp index a678ea9495..e634adc991 100644 --- a/src/xrc/xh_statbar.cpp +++ b/src/xrc/xh_statbar.cpp @@ -22,9 +22,9 @@ #ifndef WX_PRECOMP #include "wx/string.h" #include "wx/log.h" + #include "wx/frame.h" #endif -#include "wx/frame.h" #include "wx/statusbr.h" IMPLEMENT_DYNAMIC_CLASS(wxStatusBarXmlHandler, wxXmlResourceHandler) diff --git a/src/xrc/xh_toolb.cpp b/src/xrc/xh_toolb.cpp index 62dd770716..7c1f0fa055 100644 --- a/src/xrc/xh_toolb.cpp +++ b/src/xrc/xh_toolb.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: xh_toolb.cpp +// Name: src/xrc/xh_toolb.cpp // Purpose: XRC resource for wxBoxSizer // Author: Vaclav Slavik // Created: 2000/08/11 @@ -18,8 +18,12 @@ #if wxUSE_XRC && wxUSE_TOOLBAR #include "wx/xrc/xh_toolb.h" + +#ifndef WX_PRECOMP + #include "wx/frame.h" +#endif + #include "wx/toolbar.h" -#include "wx/frame.h" IMPLEMENT_DYNAMIC_CLASS(wxToolBarXmlHandler, wxXmlResourceHandler) diff --git a/src/xrc/xmlres.cpp b/src/xrc/xmlres.cpp index 3fedc64468..e8d66785f7 100644 --- a/src/xrc/xmlres.cpp +++ b/src/xrc/xmlres.cpp @@ -23,6 +23,7 @@ #include "wx/intl.h" #include "wx/log.h" #include "wx/panel.h" + #include "wx/frame.h" #endif #ifndef __WXWINCE__ @@ -30,7 +31,6 @@ #endif #include "wx/dialog.h" -#include "wx/frame.h" #include "wx/wfstream.h" #include "wx/filesys.h" #include "wx/filename.h" -- 2.45.2