wx/wxprec.h already includes wx/defs.h (with other minor cleaning).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38791 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2006-04-18 09:56:17 +00:00
parent 18f3decb46
commit 7520f3da33
70 changed files with 284 additions and 392 deletions
-1
View File
@@ -14,7 +14,6 @@
#pragma hdrstop
#endif
#include "wx/defs.h"
#include "wx/cursor.h"
/* Current cursor, in order to hang on to
+8 -11
View File
@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: mgl/dir.cpp
// Name: src/mgl/dir.cpp
// Purpose: wxDir implementation for MGL
// Author: Vaclav Slavik, Vadim Zeitlin
// Modified by:
@@ -10,14 +10,6 @@
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// ============================================================================
// declarations
// ============================================================================
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
@@ -25,7 +17,13 @@
#pragma hdrstop
#endif
#include "wx/defs.h"
// ============================================================================
// declarations
// ============================================================================
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
#ifndef __UNIX__
@@ -272,4 +270,3 @@ bool wxDir::GetNext(wxString *filename) const
}
#endif // !__UNIX__
+20 -21
View File
@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: src/unix/fontenum.cpp
// Name: src/mgl/fontenum.cpp
// Purpose: wxFontEnumerator class for MGL
// Author: Vaclav Slavik
// RCS-ID: $Id$
@@ -7,6 +7,13 @@
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
// ============================================================================
// declarations
// ============================================================================
@@ -15,14 +22,6 @@
// headers
// ----------------------------------------------------------------------------
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#include "wx/defs.h"
#include "wx/dynarray.h"
#include "wx/string.h"
#include "wx/utils.h"
@@ -45,7 +44,7 @@
bool wxFontEnumerator::EnumerateFacenames(wxFontEncoding encoding,
bool fixedWidthOnly)
{
bool found = FALSE;
bool found = false;
wxMGLFontFamilyList *list = wxTheFontsManager->GetFamilyList();
wxMGLFontFamilyList::Node *node;
wxMGLFontFamily *f = NULL;
@@ -53,7 +52,7 @@ bool wxFontEnumerator::EnumerateFacenames(wxFontEncoding encoding,
if ( encoding != wxFONTENCODING_SYSTEM )
wxGetNativeFontEncoding(encoding, &info);
for (node = list->GetFirst(); node; node = node->GetNext())
{
f = node->GetData();
@@ -61,9 +60,9 @@ bool wxFontEnumerator::EnumerateFacenames(wxFontEncoding encoding,
if ( (!fixedWidthOnly || f->GetInfo()->isFixed) &&
(encoding == wxFONTENCODING_SYSTEM || wxTestFontEncoding(info)) )
{
found = TRUE;
found = true;
if ( !OnFacename(f->GetName()) )
return TRUE;
return true;
}
}
@@ -72,7 +71,7 @@ bool wxFontEnumerator::EnumerateFacenames(wxFontEncoding encoding,
bool wxFontEnumerator::EnumerateEncodings(const wxString& family)
{
static wxFontEncoding encodings[] =
static wxFontEncoding encodings[] =
{
wxFONTENCODING_ISO8859_1,
wxFONTENCODING_ISO8859_2,
@@ -98,11 +97,11 @@ bool wxFontEnumerator::EnumerateEncodings(const wxString& family)
wxFONTENCODING_CP1256,
wxFONTENCODING_CP1257,
wxFONTENCODING_KOI8,
wxFONTENCODING_SYSTEM
};
static const char *encodingNames[] =
static const char *encodingNames[] =
{
"iso88590-1",
"iso88590-2",
@@ -128,18 +127,18 @@ bool wxFontEnumerator::EnumerateEncodings(const wxString& family)
"koi-8",
NULL
};
wxNativeEncodingInfo info;
info.facename = family;
for (size_t i = 0; encodings[i] != wxFONTENCODING_SYSTEM; i++)
{
if ( !wxGetNativeFontEncoding(encodings[i], &info) ||
!wxTestFontEncoding(info) )
!wxTestFontEncoding(info) )
continue;
if ( !OnFontEncoding(family, encodingNames[i]) )
break;
}
return TRUE;
return true;
}
+7 -8
View File
@@ -7,6 +7,13 @@
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
// ============================================================================
// declarations
// ============================================================================
@@ -15,15 +22,7 @@
// headers
// ----------------------------------------------------------------------------
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include "wx/defs.h"
#include "wx/toplevel.h"
#include "wx/app.h"
#endif // WX_PRECOMP
+2 -5
View File
@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: bmpbuttn.cpp
// Name: src/motif/bmpbuttn.cpp
// Purpose: wxBitmapButton
// Author: Julian Smart
// Modified by:
@@ -16,8 +16,6 @@
#define XtScreen XTSCREEN
#endif
#include "wx/defs.h"
#include "wx/bmpbuttn.h"
#ifdef __VMS__
@@ -77,7 +75,7 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id,
xmPushButtonWidgetClass, parentWidget,
#endif
// See comment for wxButton::SetDefault
// XmNdefaultButtonShadowThickness, 1,
// XmNdefaultButtonShadowThickness, 1,
XmNrecomputeSize, False,
NULL);
@@ -265,4 +263,3 @@ wxSize wxBitmapButton::DoGetBestSize() const
return ret;
}
+1 -2
View File
@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: bitmap.cpp
// Name: src/motif/bmpmotif.cpp
// Purpose: wxBitmap
// Author: Julian Smart, originally in bitmap.cpp
// Modified by:
@@ -17,7 +17,6 @@
#define XtDisplay XTDISPLAY
#endif
#include "wx/defs.h"
#include "wx/motif/bmpmotif.h"
#ifdef __VMS__
+3 -5
View File
@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: button.cpp
// Name: src/motif/button.cpp
// Purpose: wxButton
// Author: Julian Smart
// Modified by:
@@ -16,8 +16,6 @@
#define XtDisplay XTDISPLAY
#endif
#include "wx/defs.h"
#include "wx/button.h"
#ifdef __VMS__
@@ -51,7 +49,7 @@ bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& lbl,
wxString label(lbl);
if (label.empty() && wxIsStockID(id))
label = wxGetStockLabel(id);
if( !CreateControl( parent, id, pos, size, style, validator, name ) )
return false;
@@ -76,7 +74,7 @@ bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& lbl,
XmNlabelString, text(),
XmNrecomputeSize, False,
// See comment for wxButton::SetDefault
// XmNdefaultButtonShadowThickness, 1,
// XmNdefaultButtonShadowThickness, 1,
NULL);
XtAddCallback ((Widget) m_mainWidget,
+4 -6
View File
@@ -1,12 +1,12 @@
/////////////////////////////////////////////////////////////////////////////
// Name: checkbox.cpp
// Name: src/motif/checkbox.cpp
// Purpose: wxCheckBox
// Author: Julian Smart
// Modified by:
// Created: 04/01/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx.h".
@@ -16,8 +16,6 @@
#define XtDisplay XTDISPLAY
#endif
#include "wx/defs.h"
#include "wx/checkbox.h"
#include "wx/tglbtn.h"
#include "wx/utils.h"
@@ -63,7 +61,7 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
wxString label1(wxStripMenuCodes(label));
wxXmString text( label1 );
Widget parentWidget = (Widget) parent->GetClientWidget();
m_mainWidget = (WXWidget) XtVaCreateManagedWidget ("toggle",
@@ -77,7 +75,7 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
XmNtoggleMode, Is3State() ? XmTOGGLE_INDETERMINATE : XmTOGGLE_BOOLEAN,
#endif
NULL);
XtAddCallback( (Widget)m_mainWidget,
XmNvalueChangedCallback, (XtCallbackProc)wxCheckBoxCallback,
(XtPointer)this );
-2
View File
@@ -18,8 +18,6 @@
#if wxUSE_CHECKLISTBOX
#include "wx/defs.h"
#include "wx/checklst.h"
#include "wx/arrstr.h"
-2
View File
@@ -21,8 +21,6 @@
#define XtDisplay XTDISPLAY
#endif
#include "wx/defs.h"
#if wxUSE_CLIPBOARD
#include "wx/app.h"
+1 -3
View File
@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: control.cpp
// Name: src/motif/control.cpp
// Purpose: wxControl class
// Author: Julian Smart
// Modified by:
@@ -12,8 +12,6 @@
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#include "wx/defs.h"
#include "wx/control.h"
#include "wx/panel.h"
#include "wx/utils.h"
+2 -4
View File
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////////
// Name: dataobj.cpp
// Name: src/motif/dataobj.cpp
// Purpose: wxDataObject class
// Author: Julian Smart
// Id: $Id$
@@ -10,8 +10,6 @@
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#include "wx/defs.h"
#if wxUSE_CLIPBOARD
#include "wx/dataobj.h"
@@ -106,7 +104,7 @@ wxString wxDataFormat::GetId() const
{
char *t = XGetAtomName ((Display*) wxGetDisplay(), m_format);
wxString ret( t ); // this will convert from ascii to Unicode
if (t)
if (t)
XFree( t );
return ret;
}
+2 -4
View File
@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: dc.cpp
// Name: src/motif/dc.cpp
// Purpose: wxDC class
// Author: Julian Smart
// Modified by:
@@ -14,9 +14,8 @@
#include "wx/dc.h"
#include "wx/dcmemory.h"
#include "wx/defs.h"
IMPLEMENT_ABSTRACT_CLASS(wxDC, wxObject)
IMPLEMENT_ABSTRACT_CLASS(wxDC, wxObject)
//-----------------------------------------------------------------------------
// wxDC
@@ -212,4 +211,3 @@ void wxDC::ComputeScaleAndOrigin()
m_scaleX = m_logicalScaleX * m_userScaleX;
m_scaleY = m_logicalScaleY * m_userScaleY;
}
+1 -2
View File
@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: filedlg.cpp
// Name: src/motif/filedlg.cpp
// Purpose: wxFileDialog
// Author: Julian Smart
// Modified by:
@@ -18,7 +18,6 @@
#define XtWindow XTWINDOW
#endif
#include "wx/defs.h"
#include "wx/utils.h"
#include "wx/filedlg.h"
#include "wx/intl.h"
+6 -8
View File
@@ -20,8 +20,6 @@
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#include "wx/defs.h"
#ifdef __VMS
#pragma message disable nosimpint
#include "wx/vms_x_fix.h"
@@ -434,7 +432,7 @@ int wxFont::GetPointSize() const
wxString wxFont::GetFaceName() const
{
wxCHECK_MSG( Ok(), wxT(""), wxT("invalid font") );
wxCHECK_MSG( Ok(), wxEmptyString, wxT("invalid font") );
return M_FONTDATA->m_faceName ;
}
@@ -478,7 +476,7 @@ const wxNativeFontInfo *wxFont::GetNativeFontInfo() const
{
wxCHECK_MSG( Ok(), (wxNativeFontInfo *)NULL, wxT("invalid font") );
if(M_FONTDATA->m_nativeFontInfo.GetXFontName().IsEmpty())
if(M_FONTDATA->m_nativeFontInfo.GetXFontName().empty())
GetInternalFont();
return &(M_FONTDATA->m_nativeFontInfo);
@@ -536,7 +534,7 @@ wxXFont* wxFont::GetInternalFont(double scale, WXDisplay* display) const
#endif
f->m_display = ( display ? display : wxGetDisplay() );
f->m_scale = intScale;
#if wxMOTIF_USE_RENDER_TABLE
XmRendition rendition;
XmRenderTable renderTable;
@@ -652,13 +650,13 @@ void wxGetTextExtent(WXDisplay* display, const wxFont& font, double scale,
{
XRectangle ink, logical;
WXFontSet fset = font.GetFontSet(scale, display);
XmbTextExtents( (XFontSet)fset, str.c_str(), str.length(), &ink, &logical);
if( width ) *width = logical.width;
if( height ) *height = logical.height;
if( ascent ) *ascent = -logical.y;
if( descent ) *descent = logical.height + logical.y;
if( ascent ) *ascent = -logical.y;
if( descent ) *descent = logical.height + logical.y;
}
#else // if !wxMOTIF_NEW_FONT_HANDLING
-3
View File
@@ -20,8 +20,6 @@
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#include "wx/defs.h"
#include "wx/menu.h"
#include "wx/menuitem.h"
#include "wx/log.h"
@@ -731,4 +729,3 @@ bool wxMenuBar::SetFont(const wxFont& font)
return true;
}
+3 -6
View File
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////////
// Name: menuitem.cpp
// Name: src/motif/menuitem.cpp
// Purpose: wxMenuItem implementation
// Author: Julian Smart
// Modified by:
@@ -20,8 +20,6 @@
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#include "wx/defs.h"
#include "wx/menu.h"
#include "wx/menuitem.h"
#include "wx/utils.h"
@@ -171,7 +169,7 @@ void wxMenuItem::CreateItem (WXWidget menu, wxMenuBar * menuBar,
(wxStripMenuCodes(m_text),
xmLabelGadgetClass, (Widget) menu, NULL);
}
else if ((!m_text.IsNull() && m_text != "") && (!m_subMenu))
else if (!m_text.empty() && !m_subMenu)
{
wxString strName = wxStripMenuCodes(m_text);
if (IsCheckable())
@@ -258,7 +256,7 @@ void wxMenuItem::DestroyItem(bool full)
; // Nothing
}
else if ((!m_text.IsNull() && (m_text != "")) && !m_subMenu)
else if (!m_text.empty() && !m_subMenu)
{
if (m_buttonWidget)
{
@@ -412,4 +410,3 @@ wxMenuItemDisarmCallback (Widget WXUNUSED(w), XtPointer clientData,
}
}
}
-2
View File
@@ -20,8 +20,6 @@
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#include "wx/defs.h"
#ifdef __VMS
#define XtDisplay XTDISPLAY
#pragma message disable nosimpint
-2
View File
@@ -16,8 +16,6 @@
#define XtDisplay XTDISPLAY
#endif
#include "wx/defs.h"
#include "wx/radiobut.h"
#include "wx/utils.h"
-1
View File
@@ -12,7 +12,6 @@
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#include "wx/defs.h"
#include "wx/scrolbar.h"
#ifdef __VMS__
+1 -3
View File
@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: slider.cpp
// Name: src/motif/slider.cpp
// Purpose: wxSlider
// Author: Julian Smart
// Modified by:
@@ -12,8 +12,6 @@
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#include "wx/defs.h"
#if wxUSE_SLIDER
#include "wx/slider.h"
-2
View File
@@ -12,8 +12,6 @@
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#include "wx/defs.h"
#if wxUSE_SPINBTN
#include "wx/spinbutt.h"
+2 -5
View File
@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: statbmp.cpp
// Name: src/motif/statbmp.cpp
// Purpose: wxStaticBitmap
// Author: Julian Smart
// Modified by:
@@ -12,8 +12,6 @@
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#include "wx/defs.h"
#include "wx/statbmp.h"
#ifdef __VMS__
@@ -131,7 +129,7 @@ void wxStaticBitmap::DoSetBitmap()
XmNlabelType, XmSTRING,
XmNlabelPixmap, XmUNSPECIFIED_PIXMAP,
NULL);
}
}
}
void wxStaticBitmap::SetBitmap(const wxBitmap& bitmap)
@@ -156,4 +154,3 @@ void wxStaticBitmap::ChangeForegroundColour()
m_bitmapCache.SetColoursChanged();
wxWindow::ChangeForegroundColour();
}
+4 -7
View File
@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: statbox.cpp
// Name: src/motif/statbox.cpp
// Purpose: wxStaticBox
// Author: Julian Smart
// Modified by:
@@ -16,8 +16,6 @@
#define XtDisplay XTDISPLAY
#endif
#include "wx/defs.h"
#include "wx/statbox.h"
#include "wx/utils.h"
@@ -101,8 +99,7 @@ bool wxStaticBox::Create(wxWindow *parent, wxWindowID id,
// XmNshadowType, XmSHADOW_IN,
NULL);
bool hasLabel = (!label.IsNull() && !label.IsEmpty()) ;
if (hasLabel)
if (!label.empty())
{
wxString label1(wxStripMenuCodes(label));
wxXmString text(label1);
@@ -115,11 +112,11 @@ bool wxStaticBox::Create(wxWindow *parent, wxWindowID id,
#if wxCHECK_MOTIF_VERSION( 2, 0 )
XmNframeChildType, XmFRAME_TITLE_CHILD,
#else
XmNchildType, XmFRAME_TITLE_CHILD,
XmNchildType, XmFRAME_TITLE_CHILD,
#endif
NULL);
}
AttachWidget (parent, m_mainWidget, NULL, pos.x, pos.y, size.x, size.y);
ChangeBackgroundColour();
+1 -3
View File
@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: stattext.cpp
// Name: src/motif/stattext.cpp
// Purpose: wxStaticText
// Author: Julian Smart
// Modified by:
@@ -16,8 +16,6 @@
#define XtDisplay XTDISPLAY
#endif
#include "wx/defs.h"
#if wxUSE_STATTEXT
#include "wx/stattext.h"
+1 -3
View File
@@ -24,8 +24,6 @@
#define XtParent XTPARENT
#endif
#include "wx/defs.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <ctype.h>
@@ -488,7 +486,7 @@ void wxTextCtrl::ShowPosition(long pos)
int wxTextCtrl::GetLineLength(long lineNo) const
{
wxString str = GetLineText (lineNo);
return (int) str.Length();
return (int) str.length();
}
wxString wxTextCtrl::GetLineText(long lineNo) const
+8 -12
View File
@@ -13,22 +13,18 @@
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include "wx/defs.h"
#endif
#ifndef WX_PRECOMP
#include "wx/string.h"
#if wxUSE_GUI
#include "wx/icon.h"
#endif
#endif //WX_PRECOMP
#if wxUSE_MIMETYPE
#ifndef WX_PRECOMP
#include "wx/string.h"
#if wxUSE_GUI
#include "wx/icon.h"
#endif
#endif //WX_PRECOMP
#include "wx/log.h"
#include "wx/file.h"
#include "wx/intl.h"
-1
View File
@@ -26,7 +26,6 @@
#ifndef WX_PRECOMP
#include <stdio.h>
#include "wx/defs.h"
#include "wx/colour.h"
#include "wx/gdicmn.h"
#include "wx/utils.h"
-1
View File
@@ -27,7 +27,6 @@
#if wxUSE_FONTDLG
#ifndef WX_PRECOMP
#include "wx/defs.h"
#include "wx/utils.h"
#include "wx/dialog.h"
#endif
+3 -4
View File
@@ -24,12 +24,11 @@
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include "wx/defs.h"
#endif
#if wxUSE_GAUGE
#ifndef WX_PRECOMP
#endif
#include "wx/gauge.h"
#include "wx/msw/private.h"
+1 -2
View File
@@ -17,11 +17,10 @@
#endif
#ifndef WX_PRECOMP
#include "wx/defs.h"
#include "wx/log.h"
#endif
#include "wx/filefn.h"
#include "wx/log.h"
#if wxUSE_HELP && wxUSE_MS_HTML_HELP \
&& wxUSE_WXHTML_HELP && !defined(__WXUNIVERSAL__)
+10 -11
View File
@@ -13,15 +13,14 @@
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include "wx/defs.h"
#pragma hdrstop
#endif
#if wxUSE_HELP
#ifndef WX_PRECOMP
#endif
#include "wx/filefn.h"
#include "wx/msw/helpwin.h"
@@ -53,14 +52,14 @@ bool wxWinHelpController::Initialize(const wxString& filename)
bool wxWinHelpController::LoadFile(const wxString& file)
{
if (!file.IsEmpty())
if (!file.empty())
m_helpFile = file;
return true;
}
bool wxWinHelpController::DisplayContents(void)
{
if (m_helpFile.IsEmpty()) return false;
if (m_helpFile.empty()) return false;
wxString str = GetValidFilename(m_helpFile);
@@ -70,7 +69,7 @@ bool wxWinHelpController::DisplayContents(void)
bool wxWinHelpController::DisplaySection(int section)
{
// Use context number
if (m_helpFile.IsEmpty()) return false;
if (m_helpFile.empty()) return false;
wxString str = GetValidFilename(m_helpFile);
@@ -79,7 +78,7 @@ bool wxWinHelpController::DisplaySection(int section)
bool wxWinHelpController::DisplayContextPopup(int contextId)
{
if (m_helpFile.IsEmpty()) return false;
if (m_helpFile.empty()) return false;
wxString str = GetValidFilename(m_helpFile);
@@ -95,7 +94,7 @@ bool wxWinHelpController::DisplayBlock(long block)
bool wxWinHelpController::KeywordSearch(const wxString& k,
wxHelpSearchMode WXUNUSED(mode))
{
if (m_helpFile.IsEmpty()) return false;
if (m_helpFile.empty()) return false;
wxString str = GetValidFilename(m_helpFile);
@@ -115,7 +114,7 @@ wxString wxWinHelpController::GetValidFilename(const wxString& file) const
wxSplitPath(file, & path, & name, & ext);
wxString fullName;
if (path.IsEmpty())
if (path.empty())
fullName = name + wxT(".hlp");
else if (path.Last() == wxT('\\'))
fullName = path + name + wxT(".hlp");
+1 -2
View File
@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: msw/icon.cpp
// Name: src/msw/icon.cpp
// Purpose: wxIcon class
// Author: Julian Smart
// Modified by: 20.11.99 (VZ): don't derive from wxBitmap any more
@@ -151,4 +151,3 @@ bool wxIcon::LoadFile(const wxString& filename,
return handler->Load(this, filename, type, desiredWidth, desiredHeight);
}
+1 -3
View File
@@ -13,12 +13,11 @@
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include "wx/app.h"
#include "wx/defs.h"
#include "wx/utils.h"
#include "wx/dialog.h"
#include "wx/msgdlg.h"
@@ -126,4 +125,3 @@ int wxMessageDialog::ShowModal()
}
return ans;
}
+4 -5
View File
@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: msw/mslu.cpp
// Name: src/msw/mslu.cpp
// Purpose: Fixes for bugs in MSLU
// Author: Vaclav Slavik
// Modified by:
@@ -13,12 +13,11 @@
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#include <dir.h>
#pragma hdrstop
#include <dir.h>
#endif
#ifndef WX_PRECOMP
#include "wx/defs.h"
#include "wx/utils.h"
#endif
@@ -223,7 +222,7 @@ WXDLLIMPEXP_BASE int wxMSLU__wstat(const wxChar *name, struct _stat *buffer)
}
#ifdef __BORLANDC__
//here _stati64 is defined as stati64, see msw/mslu.h line 62
//here _stati64 is defined as stati64, see msw/mslu.h line 62
#undef _stati64
WXDLLIMPEXP_BASE int wxMSLU__wstati64(const wxChar *name, struct _stati64 *buffer)
{
+4 -6
View File
@@ -13,11 +13,9 @@
#include "wx/wxprec.h"
#if defined(__BORLANDC__)
#pragma hdrstop
#pragma hdrstop
#endif
#include "wx/defs.h"
// Watcom C++ gives a linker error if this is compiled in.
// With Borland C++, all samples crash if this is compiled in.
#if wxUSE_OLE && !(defined(__BORLANDC__) && (__BORLANDC__ < 0x520)) && !defined(__CYGWIN10__)
@@ -595,11 +593,11 @@ WXDLLEXPORT bool wxConvertVariantToOle(const wxVariant& variant, VARIANTARG& ole
{
wxDateTime date( variant.GetDateTime() );
oleVariant.vt = VT_DATE;
long dosDateTime = date.GetAsDOS();
short dosDate = short((dosDateTime & 0xFFFF0000) >> 16);
short dosTime = short(dosDateTime & 0xFFFF);
DosDateTimeToVariantTime(dosDate, dosTime, & oleVariant.date);
}
#endif
@@ -682,7 +680,7 @@ WXDLLEXPORT bool wxConvertOleToVariant(const VARIANTARG& oleVariant, wxVariant&
unsigned short dosDate = 0;
unsigned short dosTime = 0;
VariantTimeToDosDateTime(oleVariant.date, & dosDate, & dosTime);
long dosDateTime = (dosDate << 16) || dosTime;
wxDateTime date;
date.SetFromDOS(dosDateTime);
+4 -6
View File
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////////
// Name: msw/popupwin.cpp
// Name: src/msw/popupwin.cpp
// Purpose: implements wxPopupWindow for MSW
// Author: Vadim Zeitlin
// Modified by:
@@ -24,12 +24,11 @@
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include "wx/defs.h"
#endif //WX_PRECOMP
#if wxUSE_POPUPWIN
#ifndef WX_PRECOMP
#endif //WX_PRECOMP
#include "wx/popupwin.h"
#include "wx/msw/private.h" // for GetDesktopWindow()
@@ -112,4 +111,3 @@ bool wxPopupWindow::Show(bool show)
}
#endif // #if wxUSE_POPUPWIN
+1 -3
View File
@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: printwin.cpp
// Name: src/msw/printwin.cpp
// Purpose: wxWindowsPrinter framework
// Author: Julian Smart
// Modified by:
@@ -24,8 +24,6 @@
#pragma hdrstop
#endif
#include "wx/defs.h"
// Don't use the Windows printer if we're in wxUniv mode and using
// the PostScript architecture
#if wxUSE_PRINTING_ARCHITECTURE && (!defined(__WXUNIVERSAL__) || !wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW)
+5 -6
View File
@@ -14,15 +14,14 @@
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include "wx/defs.h"
#include "wx/window.h"
#include "wx/frame.h"
#include "wx/utils.h"
#include "wx/menu.h"
#include "wx/window.h"
#include "wx/frame.h"
#include "wx/utils.h"
#include "wx/menu.h"
#endif
#include "wx/msw/private.h"
+5 -5
View File
@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: filefn.cpp
// Name: src/msw/wince/filefn.cpp
// Purpose: File- and directory-related functions
// Author: Julian Smart
// Modified by:
@@ -19,13 +19,13 @@
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#include "wx/defs.h"
#include "wx/file.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#include "wx/file.h"
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
@@ -123,12 +123,12 @@ int wxEof(int fd)
DWORD off0 = SetFilePointer((HANDLE) fd, 0, &high0, FILE_CURRENT);
if (off0 == 0xFFFFFFFF && GetLastError() != NO_ERROR)
return -1;
LONG high1 = 0;
DWORD off1 = SetFilePointer((HANDLE) fd, 0, &high0, FILE_END);
if (off1 == 0xFFFFFFFF && GetLastError() != NO_ERROR)
return -1;
if (off0 == off1 && high0 == high1)
return 1;
else
+3 -4
View File
@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: combobox.cpp
// Name: src/os2/combobox.cpp
// Purpose: wxComboBox class
// Author: David Webster
// Modified by:
@@ -12,13 +12,12 @@
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#if wxUSE_COMBOBOX
#ifndef WX_PRECOMP
#include "wx/defs.h"
#include "wx/settings.h"
#endif
#if wxUSE_COMBOBOX
#include "wx/combobox.h"
#include "wx/clipbrd.h"
#include "wx/os2/private.h"
+2 -3
View File
@@ -20,14 +20,13 @@
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#if wxUSE_DATAOBJ
#ifndef WX_PRECOMP
#include "wx/defs.h"
#include "wx/intl.h"
#include "wx/log.h"
#endif
#if wxUSE_DATAOBJ
#include "wx/dataobj.h"
#include "wx/mstream.h"
#include "wx/image.h"
+5 -7
View File
@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: dirdlg.cpp
// Name: src/os2/dirdlg.cpp
// Purpose: wxDirDialog
// Author: David Webster
// Modified by:
@@ -13,11 +13,10 @@
#include "wx/wxprec.h"
#ifndef WX_PRECOMP
#include <stdio.h>
#include "wx/defs.h"
#include "wx/utils.h"
#include "wx/dialog.h"
#include "wx/dirdlg.h"
#include <stdio.h>
#include "wx/utils.h"
#include "wx/dialog.h"
#include "wx/dirdlg.h"
#endif
#include "wx/os2/private.h"
@@ -46,4 +45,3 @@ int wxDirDialog::ShowModal()
// TODO
return wxID_CANCEL;
}
+5 -7
View File
@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: fontdlg.cpp
// Name: src/os2/fontdlg.cpp
// Purpose: wxFontDialog class. NOTE: you can use the generic class
// if you wish, instead of implementing this.
// Author: David Webster
@@ -14,11 +14,10 @@
#include "wx/wxprec.h"
#ifndef WX_PRECOMP
#include <stdio.h>
#include "wx/defs.h"
#include "wx/utils.h"
#include "wx/dialog.h"
#include "wx/math.h"
#include <stdio.h>
#include "wx/utils.h"
#include "wx/dialog.h"
#include "wx/math.h"
#endif
#include "wx/fontdlg.h"
@@ -98,4 +97,3 @@ int wxFontDialog::ShowModal()
}
return wxID_CANCEL;
} // end of wxFontDialg::ShowModal
-1
View File
@@ -13,7 +13,6 @@
#include "wx/wxprec.h"
#ifndef WX_PRECOMP
#include "wx/defs.h"
#include "wx/object.h"
#include "wx/dynarray.h"
#include "wx/list.h"
+10 -15
View File
@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: gauge.cpp
// Name: src/os2/gauge.cpp
// Purpose: wxGauge class
// Author: David Webster
// Modified by:
@@ -12,9 +12,8 @@
#include "wx/wxprec.h"
#ifndef WX_PRECOMP
#include "wx/defs.h"
#include "wx/utils.h"
#include "wx/scrolwin.h"
#include "wx/utils.h"
#include "wx/scrolwin.h"
#endif
#include "wx/os2/private.h"
@@ -241,12 +240,10 @@ int wxGauge::GetValue() const
return m_nGaugePos;
} // end of wxGauge::GetValue
bool wxGauge::SetBackgroundColour(
const wxColour& rColour
)
bool wxGauge::SetBackgroundColour( const wxColour& rColour )
{
if (!wxControl::SetBackgroundColour(rColour))
return FALSE;
return false;
LONG lColor = (LONG)rColour.GetPixel();
@@ -255,7 +252,7 @@ bool wxGauge::SetBackgroundColour(
,sizeof(LONG)
,(PVOID)&lColor
);
return TRUE;
return true;
} // end of wxGauge::SetBackgroundColour
void wxGauge::SetBezelFace(
@@ -264,14 +261,12 @@ void wxGauge::SetBezelFace(
{
} // end of wxGauge::SetBezelFace
bool wxGauge::SetForegroundColour(
const wxColour& rColour
)
bool wxGauge::SetForegroundColour( const wxColour& rColour )
{
if (!wxControl::SetForegroundColour(rColour))
return FALSE;
return false;
LONG lColor = (LONG)rColour.GetPixel();
LONG lColor = (LONG)rColour.GetPixel();
::WinSetPresParam( GetHwnd()
,PP_FOREGROUNDCOLOR
@@ -279,7 +274,7 @@ bool wxGauge::SetForegroundColour(
,(PVOID)&lColor
);
return TRUE;
return true;
} // end of wxGauge::SetForegroundColour
void wxGauge::SetRange(
-2
View File
@@ -9,8 +9,6 @@
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#include "wx/defs.h"
#if wxUSE_SOCKETS
#include <stdlib.h>
+3 -2
View File
@@ -12,13 +12,13 @@
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#if wxUSE_HELP
#ifndef WX_PRECOMP
#include "wx/defs.h"
#endif
#include "wx/os2/helpwin.h"
#if wxUSE_HELP
#include <time.h>
#include "wx/os2/private.h"
@@ -150,4 +150,5 @@ bool wxWinHelpController::Quit()
void wxWinHelpController::OnQuit()
{
}
#endif // wxUSE_HELP
+1 -2
View File
@@ -13,11 +13,10 @@
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include "wx/defs.h"
#include "wx/list.h"
#include "wx/utils.h"
#include "wx/app.h"
-2
View File
@@ -14,8 +14,6 @@
//
#include "wx/wxprec.h"
#include "wx/defs.h"
#if wxUSE_JOYSTICK
#include "wx/string.h"

Some files were not shown because too many files have changed in this diff Show More