No changes, just removed hard tabs and trailing white space.

This commit is huge but there are no non-white-space changes in it.

Some files containing third-party sources (src/msw/wince/time.cpp,
src/x11/pango*.cpp) were left unchanged.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61724 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-08-21 10:41:26 +00:00
parent 545cb3fcf2
commit 03647350fc
436 changed files with 2774 additions and 2769 deletions

View File

@@ -17,8 +17,8 @@
template <class D, class B>
struct wxConvertibleTo_SizeHelper
{
static char Match(B* pb);
static int Match(...);
static char Match(B* pb);
static int Match(...);
};
// Helper to decide if an object of type D is convertible to type B (the test
@@ -26,8 +26,13 @@ struct wxConvertibleTo_SizeHelper
template <class D, class B>
struct wxConvertibleTo
{
enum { value = sizeof(wxConvertibleTo_SizeHelper<D,B>::Match(static_cast<D*>(NULL)))==sizeof(char)
};
enum
{
value =
sizeof(wxConvertibleTo_SizeHelper<D,B>::Match(static_cast<D*>(NULL)))
==
sizeof(char)
};
};
#endif // _WX_META_CONVERTIBLE_H_

View File

@@ -678,21 +678,21 @@
#endif
/* also the 32/64 bit universal builds must be handled accordingly */
#ifdef __DARWIN__
# ifdef __LP64__
# undef SIZEOF_VOID_P
# undef SIZEOF_LONG
# undef SIZEOF_SIZE_T
# define SIZEOF_VOID_P 8
# define SIZEOF_LONG 8
# define SIZEOF_SIZE_T 8
# else
# undef SIZEOF_VOID_P
# undef SIZEOF_LONG
# undef SIZEOF_SIZE_T
# define SIZEOF_VOID_P 4
# define SIZEOF_LONG 4
# define SIZEOF_SIZE_T 4
# endif
# ifdef __LP64__
# undef SIZEOF_VOID_P
# undef SIZEOF_LONG
# undef SIZEOF_SIZE_T
# define SIZEOF_VOID_P 8
# define SIZEOF_LONG 8
# define SIZEOF_SIZE_T 8
# else
# undef SIZEOF_VOID_P
# undef SIZEOF_LONG
# undef SIZEOF_SIZE_T
# define SIZEOF_VOID_P 4
# define SIZEOF_LONG 4
# define SIZEOF_SIZE_T 4
# endif
#endif
/*
check the consistency of the settings in setup.h: note that this must be

View File

@@ -6,6 +6,6 @@
// Created: ??/??/98
// RCS-ID: $Id$
// Copyright: (c) AUTHOR
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////

View File

@@ -706,7 +706,7 @@ bool wxDataViewRendererBase::StartEditing( const wxDataViewItem &item, wxRect la
m_editorCtrl = CreateEditorCtrl( dv_ctrl->GetMainWindow(), labelRect, value );
// there might be no editor control for the given item
// there might be no editor control for the given item
if(!m_editorCtrl)
return false;

View File

@@ -566,13 +566,14 @@ int wxRegExImpl::Replace(wxString *text,
}
else
{
textNew += wxString(
#ifndef WXREGEX_CONVERT_TO_MB
textNew += wxString(textstr + matchStart + start,
textstr
#else
textNew += wxString(textstr.data() + matchStart +
start,
textstr.data()
#endif
*wxConvCurrent, len);
+ matchStart + start,
*wxConvCurrent, len);
mayHaveBackrefs = true;
}
@@ -601,8 +602,7 @@ int wxRegExImpl::Replace(wxString *text,
#ifndef WXREGEX_CONVERT_TO_MB
result.append(*text, matchStart, start);
#else
result.append(wxString(textstr.data() + matchStart, *wxConvCurrent,
start));
result.append(wxString(textstr.data() + matchStart, *wxConvCurrent, start));
#endif
matchStart += start;
result.append(textNew);

View File

@@ -65,9 +65,9 @@ using namespace std ;
#endif
#if defined(__DARWIN__)
#include "wx/osx/core/cfref.h"
#include <CoreFoundation/CFLocale.h>
#include "wx/osx/core/cfstring.h"
#include "wx/osx/core/cfref.h"
#include <CoreFoundation/CFLocale.h>
#include "wx/osx/core/cfstring.h"
#include <xlocale.h>
#endif

View File

@@ -3192,7 +3192,7 @@ wxRect wxDataViewMainWindow::GetItemRect( const wxDataViewItem & item,
{
wxDataViewTreeNode* node = GetTreeNodeByRow(row);
indent = GetOwner()->GetIndent() * node->GetIndentLevel();
indent = indent + m_lineHeight; // use m_lineHeight as the width of the expander
indent = indent + m_lineHeight; // use m_lineHeight as the width of the expander
if(!node->HasChildren())
delete node;

View File

@@ -24,7 +24,7 @@
#include "wx/textctrl.h"
#include "wx/dc.h"
#include "wx/combobox.h"
#include "wx/settings.h"
#include "wx/settings.h"
#include "wx/log.h"
#include "wx/checkbox.h"
#endif // WX_PRECOMP

View File

@@ -462,9 +462,9 @@ static const char * check_xpm[] = {
/* width height ncolors chars_per_pixel */
"16 16 3 1",
/* colors */
" s None c None",
"X c #000000",
". c #808080",
" s None c None",
"X c #000000",
". c #808080",
/* pixels */
" ",
" ",

View File

@@ -1562,8 +1562,8 @@ void wxDataViewRenderer::GtkInitHandlers()
if (!gtk_check_version(2,6,0))
{
g_signal_connect (GTK_CELL_RENDERER(m_renderer), "editing_started",
G_CALLBACK (wxgtk_renderer_editing_started),
this);
G_CALLBACK (wxgtk_renderer_editing_started),
this);
}
}

View File

@@ -203,9 +203,9 @@ void wxBitmapButton::OnSetBitmap()
if (!the_one.IsOk())
{
the_one = GetBitmapLabel();
if (!the_one.IsOk())
return;
the_one = GetBitmapLabel();
if (!the_one.IsOk())
return;
}
GdkBitmap *mask = NULL;

View File

@@ -6,7 +6,7 @@
// Created: 17/09/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////

View File

@@ -37,7 +37,7 @@ wxStaticBitmap::wxStaticBitmap( wxWindow *parent, wxWindowID id, const wxBitmap
// empty bitmap, so that we can create GtkPixmap widget:
static char * bogus_xpm[] = {
"2 2 1 1",
" c None",
" c None",
" ",
" "};

View File

@@ -246,8 +246,8 @@ wxCursor::wxCursor(const char bits[], int width, int height,
Create(bits, width, height, hotSpotX, hotSpotY, maskBits);
}
wxCursor::wxCursor(const wxString& name, wxBitmapType type, int hotSpotX,
int hotSpotY )
wxCursor::wxCursor(const wxString& name, wxBitmapType type,
int hotSpotX, int hotSpotY)
{
// Must be an XBM file
if (type != wxBITMAP_TYPE_XBM) {

View File

@@ -6,7 +6,7 @@
// Created: 17/09/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// We don't put main() in the library any more. GD.

View File

@@ -430,9 +430,9 @@ bool wxGUIEventLoop::YieldFor(long eventsToProcess)
switch (msg.message)
{
#if !defined(__WXWINCE__)
case WM_NCMOUSEMOVE:
case WM_NCMOUSEMOVE:
case WM_NCLBUTTONDOWN:
case WM_NCLBUTTONDOWN:
case WM_NCLBUTTONUP:
case WM_NCLBUTTONDBLCLK:
case WM_NCRBUTTONDOWN:

View File

@@ -298,7 +298,7 @@ public:
virtual void StrokePath( const wxGraphicsPath& p );
virtual void FillPath( const wxGraphicsPath& p , wxPolygonFillMode fillStyle = wxODDEVEN_RULE );
// stroke lines connecting each of the points
// stroke lines connecting each of the points
virtual void StrokeLines( size_t n, const wxPoint2DDouble *points);
// draws a polygon
@@ -1121,19 +1121,19 @@ void wxGDIPlusContext::StrokeLines( size_t n, const wxPoint2DDouble *points)
if (m_composition == wxCOMPOSITION_DEST)
return;
if ( !m_pen.IsNull() )
{
wxGDIPlusOffsetHelper helper( m_context , ShouldOffset() );
Point *cpoints = new Point[n];
for (size_t i = 0; i < n; i++)
{
cpoints[i].X = (int)(points[i].m_x );
cpoints[i].Y = (int)(points[i].m_y );
if ( !m_pen.IsNull() )
{
wxGDIPlusOffsetHelper helper( m_context , ShouldOffset() );
Point *cpoints = new Point[n];
for (size_t i = 0; i < n; i++)
{
cpoints[i].X = (int)(points[i].m_x );
cpoints[i].Y = (int)(points[i].m_y );
} // for (size_t i = 0; i < n; i++)
m_context->DrawLines( ((wxGDIPlusPenData*)m_pen.GetGraphicsData())->GetGDIPlusPen() , cpoints , n ) ;
delete[] cpoints;
}
} // for (size_t i = 0; i < n; i++)
m_context->DrawLines( ((wxGDIPlusPenData*)m_pen.GetGraphicsData())->GetGDIPlusPen() , cpoints , n ) ;
delete[] cpoints;
}
}
void wxGDIPlusContext::DrawLines( size_t n, const wxPoint2DDouble *points, wxPolygonFillMode WXUNUSED(fillStyle) )
@@ -1142,18 +1142,18 @@ void wxGDIPlusContext::DrawLines( size_t n, const wxPoint2DDouble *points, wxPol
return;
wxGDIPlusOffsetHelper helper( m_context , ShouldOffset() );
Point *cpoints = new Point[n];
for (size_t i = 0; i < n; i++)
{
cpoints[i].X = (int)(points[i].m_x );
cpoints[i].Y = (int)(points[i].m_y );
Point *cpoints = new Point[n];
for (size_t i = 0; i < n; i++)
{
cpoints[i].X = (int)(points[i].m_x );
cpoints[i].Y = (int)(points[i].m_y );
} // for (int i = 0; i < n; i++)
if ( !m_brush.IsNull() )
m_context->FillPolygon( ((wxGDIPlusBrushData*)m_brush.GetRefData())->GetGDIPlusBrush() , cpoints , n ) ;
if ( !m_pen.IsNull() )
m_context->DrawLines( ((wxGDIPlusPenData*)m_pen.GetGraphicsData())->GetGDIPlusPen() , cpoints , n ) ;
delete[] cpoints;
} // for (int i = 0; i < n; i++)
if ( !m_brush.IsNull() )
m_context->FillPolygon( ((wxGDIPlusBrushData*)m_brush.GetRefData())->GetGDIPlusBrush() , cpoints , n ) ;
if ( !m_pen.IsNull() )
m_context->DrawLines( ((wxGDIPlusPenData*)m_pen.GetGraphicsData())->GetGDIPlusPen() , cpoints , n ) ;
delete[] cpoints;
}
void wxGDIPlusContext::StrokePath( const wxGraphicsPath& path )

View File

@@ -105,10 +105,10 @@ public:
{
// this tooltip must be shown only if the mouse hovers a specific rect
// of the hwnd parameter!
rect.left = rc.GetLeft();
rect.right = rc.GetRight();
rect.top = rc.GetTop();
rect.bottom = rc.GetBottom();
rect.left = rc.GetLeft();
rect.right = rc.GetRight();
rect.top = rc.GetTop();
rect.bottom = rc.GetBottom();
// note that not setting TTF_IDISHWND from the uFlags member means that the
// ti.uId field should not contain the HWND but rather as MSDN says an

View File

@@ -2160,10 +2160,10 @@ void wxPMDCImpl::DoGetTextExtent(
//
if (!m_hPS)
{
(void)wxMessageBox( wxT("wxWidgets core library")
,"Using uninitialized DC for measuring text!\n"
,wxICON_INFORMATION
);
(void)wxMessageBox( wxT("wxWidgets core library")
,"Using uninitialized DC for measuring text!\n"
,wxICON_INFORMATION
);
}
bRc = ::GpiQueryTextBox( m_hPS

View File

@@ -404,7 +404,7 @@ bool wxGUIEventLoop::YieldFor(long eventsToProcess)
if (wxTheApp)
{
wxTheApp->ProcessPendingEvents();
wxTheApp->HandleSockets();
wxTheApp->HandleSockets();
}
//

View File

@@ -156,7 +156,7 @@ bool wxOwnerDrawn::OnMeasureItem( size_t* pWidth,
// Make sure that this item is at least as
// tall as the user's system settings specify
//
const size_t heightStd = 6; // FIXME: get value from the system
const size_t heightStd = 6; // FIXME: get value from the system
if ( *pHeight < heightStd )
*pHeight = heightStd;
m_nHeight = *pHeight; // remember height for use in OnDrawItem

View File

@@ -84,7 +84,7 @@ bool wxGetHostName( wxChar* zBuf, int nMaxSize )
const wxChar* zDefaultHost = wxT("noname");
if ((zSysname = wxGetenv(wxT("SYSTEM_NAME"))) == NULL &&
(zSysname = wxGetenv(wxT("HOSTNAME"))) == NULL)
(zSysname = wxGetenv(wxT("HOSTNAME"))) == NULL)
{
::PrfQueryProfileString( HINI_PROFILE
,(PSZ)WX_SECTION

View File

@@ -3224,7 +3224,7 @@ bool wxWindowOS2::OS2OnDrawItem( int vId,
,pMeasureStruct->rclItem.yTop - pMeasureStruct->rclItem.yBottom
);
wxPMDCImpl *impl = (wxPMDCImpl*) vDc.GetImpl();
wxPMDCImpl *impl = (wxPMDCImpl*) vDc.GetImpl();
impl->SetHDC( hDC, false );
impl->SetHPS( pMeasureStruct->hps );
//

View File

@@ -835,8 +835,8 @@ bool wxApp::Initialize(int& argc, wxChar **argv)
event_posted_context.perform = macPostedEventCallback;
m_macEventPosted = CFRunLoopSourceCreate(NULL,0,&event_posted_context);
CFRunLoopAddSource(CFRunLoopGetCurrent(), m_macEventPosted, kCFRunLoopCommonModes);
// run loop takes ownership
CFRelease(m_macEventPosted);
// run loop takes ownership
CFRelease(m_macEventPosted);
*/
return true;
}
@@ -944,10 +944,10 @@ void wxApp::CleanUp()
#endif
if (m_macEventPosted)
{
CFRunLoopRemoveSource(CFRunLoopGetCurrent(), m_macEventPosted, kCFRunLoopCommonModes);
m_macEventPosted = NULL;
}
{
CFRunLoopRemoveSource(CFRunLoopGetCurrent(), m_macEventPosted, kCFRunLoopCommonModes);
m_macEventPosted = NULL;
}
DoCleanUp();
@@ -1445,7 +1445,7 @@ void wxApp::MacCreateKeyEvent( wxKeyEvent& event, wxWindow* focus , long keymess
// control interferes with some built-in keys like pgdown, return etc. therefore we remove the controlKey modifier
// and look at the character after
#ifdef __LP64__
// TODO new implementation using TextInputSources
// TODO new implementation using TextInputSources
#else
UInt32 state = 0;
UInt32 keyInfo = KeyTranslate((Ptr)GetScriptManagerVariable(smKCHRCache), ( modifiers & (~(controlKey | shiftKey | optionKey))) | keycode, &state);

View File

@@ -634,7 +634,7 @@ wxBitmapDataObject::wxBitmapDataObject( const wxBitmap& rBitmap )
if (m_bitmap.Ok())
{
SetBitmap( rBitmap );
SetBitmap( rBitmap );
}
}

View File

@@ -353,9 +353,9 @@ wxMacDataBrowserTableViewControl::wxMacDataBrowserTableViewControl(wxWindow* pee
callbacks.u.v1.itemDataCallback = gDataBrowserTableViewItemDataUPP;
callbacks.u.v1.itemCompareCallback = gDataBrowserTableViewItemCompareUPP;
callbacks.u.v1.itemNotificationCallback = gDataBrowserTableViewItemNotificationUPP;
callbacks.u.v1.acceptDragCallback = gDataBrowserTableViewAcceptDragUPP;
callbacks.u.v1.addDragItemCallback = gDataBrowserTableViewAddDragItemUPP;
callbacks.u.v1.receiveDragCallback = gDataBrowserTableViewReceiveDragUPP;
callbacks.u.v1.acceptDragCallback = gDataBrowserTableViewAcceptDragUPP;
callbacks.u.v1.addDragItemCallback = gDataBrowserTableViewAddDragItemUPP;
callbacks.u.v1.receiveDragCallback = gDataBrowserTableViewReceiveDragUPP;
this->SetCallbacks(&callbacks);
// setup callbacks for customized items:

View File

@@ -36,7 +36,7 @@ wxScreenDCImpl::wxScreenDCImpl( wxDC *owner ) :
m_width = (wxCoord)cgbounds.size.width;
m_height = (wxCoord)cgbounds.size.height;
#else
wxDisplaySize( &m_width, &m_height );
wxDisplaySize( &m_width, &m_height );
#endif
#if wxOSX_USE_COCOA_OR_IPHONE
SetGraphicsContext( wxGraphicsContext::Create() );

View File

@@ -132,8 +132,8 @@ int wxDirDialog::ShowModal()
if ( err != noErr && err != userCanceledErr )
m_path = wxEmptyString ;
if ( dialog )
::NavDialogDispose(dialog);
if ( dialog )
::NavDialogDispose(dialog);
return (err == noErr) ? wxID_OK : wxID_CANCEL ;
}

View File

@@ -391,121 +391,121 @@ pascal OSErr wxMacWindowDragTrackingHandler(
break;
GetDragMouse( theDrag, &mouse, 0L );
{
int x = mouse.h ;
int y = mouse.v ;
toplevel->GetNonOwnedPeer()->ScreenToWindow( &x, &y );
localMouse.h = x;
localMouse.v = y;
{
int x = mouse.h ;
int y = mouse.v ;
toplevel->GetNonOwnedPeer()->ScreenToWindow( &x, &y );
localMouse.h = x;
localMouse.v = y;
{
wxWindow *win = NULL;
ControlPartCode controlPart;
ControlRef control = FindControlUnderMouse( localMouse, theWindow, &controlPart );
if ( control )
win = wxFindWindowFromWXWidget( (WXWidget) control );
else
win = toplevel;
{
wxWindow *win = NULL;
ControlPartCode controlPart;
ControlRef control = FindControlUnderMouse( localMouse, theWindow, &controlPart );
if ( control )
win = wxFindWindowFromWXWidget( (WXWidget) control );
else
win = toplevel;
int localx, localy;
localx = localMouse.h;
localy = localMouse.v;
int localx, localy;
localx = localMouse.h;
localy = localMouse.v;
if ( win )
win->MacRootWindowToWindow( &localx, &localy );
if ( win != trackingGlobals->m_currentTargetWindow )
{
if ( trackingGlobals->m_currentTargetWindow )
{
// this window is left
if ( trackingGlobals->m_currentTarget )
{
#ifndef __LP64__
HideDragHilite( theDrag );
#endif
trackingGlobals->m_currentTarget->SetCurrentDragPasteboard( pasteboard );
trackingGlobals->m_currentTarget->OnLeave();
trackingGlobals->m_currentTarget = NULL;
trackingGlobals->m_currentTargetWindow = NULL;
}
}
if ( win )
win->MacRootWindowToWindow( &localx, &localy );
if ( win != trackingGlobals->m_currentTargetWindow )
{
if ( trackingGlobals->m_currentTargetWindow )
{
// this window is left
if ( trackingGlobals->m_currentTarget )
{
#ifndef __LP64__
HideDragHilite( theDrag );
#endif
trackingGlobals->m_currentTarget->SetCurrentDragPasteboard( pasteboard );
trackingGlobals->m_currentTarget->OnLeave();
trackingGlobals->m_currentTarget = NULL;
trackingGlobals->m_currentTargetWindow = NULL;
}
}
if ( win )
{
// this window is entered
trackingGlobals->m_currentTargetWindow = win;
trackingGlobals->m_currentTarget = win->GetDropTarget();
{
if ( trackingGlobals->m_currentTarget )
{
trackingGlobals->m_currentTarget->SetCurrentDragPasteboard( pasteboard );
result = trackingGlobals->m_currentTarget->OnEnter( localx, localy, result );
}
if ( win )
{
// this window is entered
trackingGlobals->m_currentTargetWindow = win;
trackingGlobals->m_currentTarget = win->GetDropTarget();
{
if ( trackingGlobals->m_currentTarget )
{
trackingGlobals->m_currentTarget->SetCurrentDragPasteboard( pasteboard );
result = trackingGlobals->m_currentTarget->OnEnter( localx, localy, result );
}
if ( result != wxDragNone )
{
int x, y;
if ( result != wxDragNone )
{
int x, y;
x = y = 0;
win->MacWindowToRootWindow( &x, &y );
RgnHandle hiliteRgn = NewRgn();
Rect r = { y, x, y + win->GetSize().y, x + win->GetSize().x };
RectRgn( hiliteRgn, &r );
#ifndef __LP64__
ShowDragHilite( theDrag, hiliteRgn, true );
#endif
DisposeRgn( hiliteRgn );
}
}
}
}
else
{
if ( trackingGlobals->m_currentTarget )
{
trackingGlobals->m_currentTarget->SetCurrentDragPasteboard( pasteboard );
result = trackingGlobals->m_currentTarget->OnDragOver( localx, localy, result );
}
}
x = y = 0;
win->MacWindowToRootWindow( &x, &y );
RgnHandle hiliteRgn = NewRgn();
Rect r = { y, x, y + win->GetSize().y, x + win->GetSize().x };
RectRgn( hiliteRgn, &r );
#ifndef __LP64__
ShowDragHilite( theDrag, hiliteRgn, true );
#endif
DisposeRgn( hiliteRgn );
}
}
}
}
else
{
if ( trackingGlobals->m_currentTarget )
{
trackingGlobals->m_currentTarget->SetCurrentDragPasteboard( pasteboard );
result = trackingGlobals->m_currentTarget->OnDragOver( localx, localy, result );
}
}
// set cursor for OnEnter and OnDragOver
if ( trackingGlobals->m_currentSource && !trackingGlobals->m_currentSource->GiveFeedback( result ) )
{
if ( !trackingGlobals->m_currentSource->MacInstallDefaultCursor( result ) )
{
wxStockCursor cursorID = wxCURSOR_NONE;
// set cursor for OnEnter and OnDragOver
if ( trackingGlobals->m_currentSource && !trackingGlobals->m_currentSource->GiveFeedback( result ) )
{
if ( !trackingGlobals->m_currentSource->MacInstallDefaultCursor( result ) )
{
wxStockCursor cursorID = wxCURSOR_NONE;
switch (result)
{
case wxDragCopy:
cursorID = wxCURSOR_COPY_ARROW;
break;
switch (result)
{
case wxDragCopy:
cursorID = wxCURSOR_COPY_ARROW;
break;
case wxDragMove:
cursorID = wxCURSOR_ARROW;
break;
case wxDragMove:
cursorID = wxCURSOR_ARROW;
break;
case wxDragNone:
cursorID = wxCURSOR_NO_ENTRY;
break;
case wxDragNone:
cursorID = wxCURSOR_NO_ENTRY;
break;
case wxDragError:
case wxDragLink:
case wxDragCancel:
default:
// put these here to make gcc happy
;
}
case wxDragError:
case wxDragLink:
case wxDragCancel:
default:
// put these here to make gcc happy
;
}
if (cursorID != wxCURSOR_NONE)
{
wxCursor cursor( cursorID );
cursor.MacInstall();
}
}
}
}
}
if (cursorID != wxCURSOR_NONE)
{
wxCursor cursor( cursorID );
cursor.MacInstall();
}
}
}
}
}
break;
case kDragTrackingLeaveWindow:

View File

@@ -140,7 +140,7 @@ bool wxDrawerWindow::SetPreferredEdge(wxDirection edge)
{
const OSStatus status = ::SetDrawerPreferredEdge((WindowRef)GetWXWindow(),
DirectionToWindowEdge(edge));
return (noErr == status);
return (noErr == status);
}

View File

@@ -1516,11 +1516,11 @@ void wxWidgetCocoaImpl::SetControlSize( wxWindowVariant variant )
if ( [m_osxView respondsToSelector:@selector(setControlSize:)] )
[m_osxView setControlSize:size];
else if ([m_osxView respondsToSelector:@selector(cell)])
{
id cell = [(id)m_osxView cell];
if ([cell respondsToSelector:@selector(setControlSize:)])
[cell setControlSize:size];
}
{
id cell = [(id)m_osxView cell];
if ([cell respondsToSelector:@selector(setControlSize:)])
[cell setControlSize:size];
}
}
void wxWidgetCocoaImpl::SetFont(wxFont const& font, wxColour const&, long, bool)

View File

@@ -78,8 +78,8 @@ void wxMemoryDCImpl::DoSelect( const wxBitmap& bitmap )
if ( m_selected.GetDepth() != 1 )
m_selected.UseAlpha() ;
m_selected.BeginRawAccess() ;
m_width = bitmap.GetWidth();
m_height = bitmap.GetHeight();
m_width = bitmap.GetWidth();
m_height = bitmap.GetHeight();
CGColorSpaceRef genericColorSpace = wxMacGetGenericRGBColorSpace();
CGContextRef bmCtx = (CGContextRef) m_selected.GetHBITMAP();
@@ -87,7 +87,7 @@ void wxMemoryDCImpl::DoSelect( const wxBitmap& bitmap )
{
CGContextSetFillColorSpace( bmCtx, genericColorSpace );
CGContextSetStrokeColorSpace( bmCtx, genericColorSpace );
SetGraphicsContext( wxGraphicsContext::CreateFromNative( bmCtx ) );
SetGraphicsContext( wxGraphicsContext::CreateFromNative( bmCtx ) );
}
m_ok = (m_graphicContext != NULL) ;
}

View File

@@ -655,7 +655,7 @@ class wxHIDModule : public wxModule
{
for(size_t i = 0; i < sm_keyboards.GetCount(); ++i)
delete (wxHIDKeyboard*) sm_keyboards[i];
sm_keyboards.Clear();
sm_keyboards.Clear();
}
};

View File

@@ -24,7 +24,7 @@
#include "wx/tglbtn.h"
#include "wx/osx/private.h"
#include "wx/bmpbuttn.h" // for wxDEFAULT_BUTTON_MARGIN
#include "wx/bmpbuttn.h" // for wxDEFAULT_BUTTON_MARGIN
// ----------------------------------------------------------------------------
// macros

View File

@@ -1258,19 +1258,19 @@ bool wxSystemColourProperty::OnEvent( wxPropertyGrid* propgrid,
}
else if ( event.GetEventType() == wxEVT_COMMAND_COMBOBOX_SELECTED )
{
// Must override index detection since at this point GetIndex()
// will return old value.
wxOwnerDrawnComboBox* cb =
static_cast<wxOwnerDrawnComboBox*>(propgrid->GetEditorControl());
// Must override index detection since at this point GetIndex()
// will return old value.
wxOwnerDrawnComboBox* cb =
static_cast<wxOwnerDrawnComboBox*>(propgrid->GetEditorControl());
if ( cb )
{
int index = cb->GetSelection();
if ( cb )
{
int index = cb->GetSelection();
if ( index == GetCustomColourIndex() &&
!(m_flags & wxPG_PROP_HIDE_CUSTOM_COLOUR) )
askColour = true;
}
if ( index == GetCustomColourIndex() &&
!(m_flags & wxPG_PROP_HIDE_CUSTOM_COLOUR) )
askColour = true;
}
}
if ( askColour && !propgrid->WasValueChangedInEvent() )

View File

@@ -726,10 +726,10 @@ void wxPropertyGridManager::SetColumnCount( int colCount, int page )
size_t wxPropertyGridManager::GetPageCount() const
{
if ( !(m_iFlags & wxPG_MAN_FL_PAGE_INSERTED) )
return 0;
if ( !(m_iFlags & wxPG_MAN_FL_PAGE_INSERTED) )
return 0;
return m_arrPages.size();
return m_arrPages.size();
}
// -----------------------------------------------------------------------

View File

@@ -2578,14 +2578,14 @@ int wxPropertyCategory::GetTextExtent( const wxWindow* wnd, const wxFont& font )
if ( m_textExtent > 0 )
return m_textExtent;
int x = 0, y = 0;
((wxWindow*)wnd)->GetTextExtent( m_label, &x, &y, 0, 0, &font );
((wxWindow*)wnd)->GetTextExtent( m_label, &x, &y, 0, 0, &font );
return x;
}
void wxPropertyCategory::CalculateTextExtent( wxWindow* wnd, const wxFont& font )
{
int x = 0, y = 0;
wnd->GetTextExtent( m_label, &x, &y, 0, 0, &font );
wnd->GetTextExtent( m_label, &x, &y, 0, 0, &font );
m_textExtent = x;
}

View File

@@ -1771,7 +1771,7 @@ void wxPropertyGridPageState::DoDelete( wxPGProperty* item, bool doDelete )
wxASSERT( item->GetParentState() == this );
wxPropertyGrid* pg = GetGrid();
wxPropertyGrid* pg = GetGrid();
if ( DoIsPropertySelected(item) )
{
@@ -1857,9 +1857,9 @@ void wxPropertyGridPageState::DoDelete( wxPGProperty* item, bool doDelete )
(parent->IsCategory() || parent->IsRoot()) )
m_dictName.erase(item->GetBaseName());
// We need to clear parent grid's m_propHover, if it matches item
if ( pg && pg->m_propHover == item )
pg->m_propHover = NULL;
// We need to clear parent grid's m_propHover, if it matches item
if ( pg && pg->m_propHover == item )
pg->m_propHover = NULL;
// We can actually delete it now
if ( doDelete )

View File

@@ -171,8 +171,8 @@ wxString wxIntProperty::ValueToString( wxVariant& value,
}
else if ( value.GetType() == wxPG_VARIANT_TYPE_LONGLONG )
{
wxLongLong ll = value.GetLongLong();
return ll.ToString();
wxLongLong ll = value.GetLongLong();
return ll.ToString();
}
return wxEmptyString;

View File

@@ -4800,7 +4800,7 @@ bool wxRichTextPlainText::DrawTabbedString(wxDC& dc, const wxTextAttr& attr, con
dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT);
}
wxCoord x_orig = x;
wxCoord x_orig = x;
while (hasTabs)
{
// the string has a tab

View File

@@ -256,7 +256,7 @@ void wxRichTextHTMLHandler::BeginParagraphFormatting(const wxTextAttr& WXUNUSED(
str << wxString::Format(wxT("<p align=\"%s\""), align.c_str());
if (thisStyle.HasParagraphSpacingAfter() && thisStyle.GetParagraphSpacingAfter() == 0)
str << wxT(" style=\"line-height: 0px\"");
str << wxT(" style=\"line-height: 0px\"");
str << wxT(">");

View File

@@ -619,7 +619,7 @@ wxString wxRichTextStyleListBox::CreateHTML(wxRichTextStyleDefinition* def) cons
int size = 3;
#endif
// Guess a standard font size
// Guess a standard font size
int stdFontSize = 0;
// First see if we have a default/normal style to base the size on
@@ -628,22 +628,22 @@ wxString wxRichTextStyleListBox::CreateHTML(wxRichTextStyleDefinition* def) cons
size_t i;
for (i = 0; i < m_styleNames.GetCount(); i++)
{
wxString name = m_styleNames[i].Lower();
if (name.Find(wxT("normal")) != wxNOT_FOUND || name.Find(normalTranslated) != wxNOT_FOUND ||
name.Find(wxT("default")) != wxNOT_FOUND || name.Find(defaultTranslated) != wxNOT_FOUND)
{
wxRichTextStyleDefinition* d = GetStyleSheet()->FindStyle(m_styleNames[i]);
if (d)
{
wxRichTextAttr attr2(d->GetStyleMergedWithBase(GetStyleSheet()));
if (attr2.HasFontSize())
{
stdFontSize = attr2.GetFontSize();
break;
}
}
}
}
wxString name = m_styleNames[i].Lower();
if (name.Find(wxT("normal")) != wxNOT_FOUND || name.Find(normalTranslated) != wxNOT_FOUND ||
name.Find(wxT("default")) != wxNOT_FOUND || name.Find(defaultTranslated) != wxNOT_FOUND)
{
wxRichTextStyleDefinition* d = GetStyleSheet()->FindStyle(m_styleNames[i]);
if (d)
{
wxRichTextAttr attr2(d->GetStyleMergedWithBase(GetStyleSheet()));
if (attr2.HasFontSize())
{
stdFontSize = attr2.GetFontSize();
break;
}
}
}
}
if (stdFontSize == 0)
{
@@ -670,13 +670,13 @@ wxString wxRichTextStyleListBox::CreateHTML(wxRichTextStyleDefinition* def) cons
{
if (sizes[i] > mostCommonSize)
mostCommonSize = i;
}
}
if (mostCommonSize > 0)
stdFontSize = mostCommonSize;
}
if (stdFontSize == 0)
stdFontSize = 12;
stdFontSize = 12;
int thisFontSize = ((attr.GetFlags() & wxTEXT_ATTR_FONT_SIZE) != 0) ? attr.GetFontSize() : stdFontSize;

View File

@@ -388,15 +388,15 @@ wxDialUpManagerImpl::CheckStatusInternal(void)
// This can be used under Win 9x, too!
struct hostent *hp;
struct sockaddr_in serv_addr;
int sockfd;
int sockfd;
m_IsOnline = 0; // assume false
if((hp = gethostbyname(m_BeaconHost)) == NULL)
return; // no DNS no net
serv_addr.sin_family = hp->h_addrtype;
serv_addr.sin_family = hp->h_addrtype;
memcpy(&serv_addr.sin_addr,hp->h_addr, hp->h_length);
serv_addr.sin_port = htons(m_BeaconPort);
serv_addr.sin_port = htons(m_BeaconPort);
if( ( sockfd = socket(hp->h_addrtype, SOCK_STREAM, 0)) < 0)
{
// sys_error("cannot create socket for gw");

View File

@@ -326,7 +326,7 @@ void wxFontRefData::InitFromNative()
}
switch ( wxToupper( m_nativeFontInfo.
GetXFontComponent(wxXLFD_SLANT)[0u]).GetValue() )
GetXFontComponent(wxXLFD_SLANT)[0u]).GetValue() )
{
case wxT('I'): // italique
m_style = wxFONTSTYLE_ITALIC;

View File

@@ -6,7 +6,7 @@
// Created: 17/09/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h"