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:
@@ -17,8 +17,8 @@
|
|||||||
template <class D, class B>
|
template <class D, class B>
|
||||||
struct wxConvertibleTo_SizeHelper
|
struct wxConvertibleTo_SizeHelper
|
||||||
{
|
{
|
||||||
static char Match(B* pb);
|
static char Match(B* pb);
|
||||||
static int Match(...);
|
static int Match(...);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Helper to decide if an object of type D is convertible to type B (the test
|
// 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>
|
template <class D, class B>
|
||||||
struct wxConvertibleTo
|
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_
|
#endif // _WX_META_CONVERTIBLE_H_
|
||||||
|
@@ -678,21 +678,21 @@
|
|||||||
#endif
|
#endif
|
||||||
/* also the 32/64 bit universal builds must be handled accordingly */
|
/* also the 32/64 bit universal builds must be handled accordingly */
|
||||||
#ifdef __DARWIN__
|
#ifdef __DARWIN__
|
||||||
# ifdef __LP64__
|
# ifdef __LP64__
|
||||||
# undef SIZEOF_VOID_P
|
# undef SIZEOF_VOID_P
|
||||||
# undef SIZEOF_LONG
|
# undef SIZEOF_LONG
|
||||||
# undef SIZEOF_SIZE_T
|
# undef SIZEOF_SIZE_T
|
||||||
# define SIZEOF_VOID_P 8
|
# define SIZEOF_VOID_P 8
|
||||||
# define SIZEOF_LONG 8
|
# define SIZEOF_LONG 8
|
||||||
# define SIZEOF_SIZE_T 8
|
# define SIZEOF_SIZE_T 8
|
||||||
# else
|
# else
|
||||||
# undef SIZEOF_VOID_P
|
# undef SIZEOF_VOID_P
|
||||||
# undef SIZEOF_LONG
|
# undef SIZEOF_LONG
|
||||||
# undef SIZEOF_SIZE_T
|
# undef SIZEOF_SIZE_T
|
||||||
# define SIZEOF_VOID_P 4
|
# define SIZEOF_VOID_P 4
|
||||||
# define SIZEOF_LONG 4
|
# define SIZEOF_LONG 4
|
||||||
# define SIZEOF_SIZE_T 4
|
# define SIZEOF_SIZE_T 4
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
/*
|
/*
|
||||||
check the consistency of the settings in setup.h: note that this must be
|
check the consistency of the settings in setup.h: note that this must be
|
||||||
|
@@ -6,6 +6,6 @@
|
|||||||
// Created: ??/??/98
|
// Created: ??/??/98
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) AUTHOR
|
// Copyright: (c) AUTHOR
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@@ -706,7 +706,7 @@ bool wxDataViewRendererBase::StartEditing( const wxDataViewItem &item, wxRect la
|
|||||||
|
|
||||||
m_editorCtrl = CreateEditorCtrl( dv_ctrl->GetMainWindow(), labelRect, value );
|
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)
|
if(!m_editorCtrl)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@@ -566,13 +566,14 @@ int wxRegExImpl::Replace(wxString *text,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
textNew += wxString(
|
||||||
#ifndef WXREGEX_CONVERT_TO_MB
|
#ifndef WXREGEX_CONVERT_TO_MB
|
||||||
textNew += wxString(textstr + matchStart + start,
|
textstr
|
||||||
#else
|
#else
|
||||||
textNew += wxString(textstr.data() + matchStart +
|
textstr.data()
|
||||||
start,
|
|
||||||
#endif
|
#endif
|
||||||
*wxConvCurrent, len);
|
+ matchStart + start,
|
||||||
|
*wxConvCurrent, len);
|
||||||
|
|
||||||
mayHaveBackrefs = true;
|
mayHaveBackrefs = true;
|
||||||
}
|
}
|
||||||
@@ -601,8 +602,7 @@ int wxRegExImpl::Replace(wxString *text,
|
|||||||
#ifndef WXREGEX_CONVERT_TO_MB
|
#ifndef WXREGEX_CONVERT_TO_MB
|
||||||
result.append(*text, matchStart, start);
|
result.append(*text, matchStart, start);
|
||||||
#else
|
#else
|
||||||
result.append(wxString(textstr.data() + matchStart, *wxConvCurrent,
|
result.append(wxString(textstr.data() + matchStart, *wxConvCurrent, start));
|
||||||
start));
|
|
||||||
#endif
|
#endif
|
||||||
matchStart += start;
|
matchStart += start;
|
||||||
result.append(textNew);
|
result.append(textNew);
|
||||||
|
@@ -65,9 +65,9 @@ using namespace std ;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__DARWIN__)
|
#if defined(__DARWIN__)
|
||||||
#include "wx/osx/core/cfref.h"
|
#include "wx/osx/core/cfref.h"
|
||||||
#include <CoreFoundation/CFLocale.h>
|
#include <CoreFoundation/CFLocale.h>
|
||||||
#include "wx/osx/core/cfstring.h"
|
#include "wx/osx/core/cfstring.h"
|
||||||
#include <xlocale.h>
|
#include <xlocale.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -3192,7 +3192,7 @@ wxRect wxDataViewMainWindow::GetItemRect( const wxDataViewItem & item,
|
|||||||
{
|
{
|
||||||
wxDataViewTreeNode* node = GetTreeNodeByRow(row);
|
wxDataViewTreeNode* node = GetTreeNodeByRow(row);
|
||||||
indent = GetOwner()->GetIndent() * node->GetIndentLevel();
|
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())
|
if(!node->HasChildren())
|
||||||
delete node;
|
delete node;
|
||||||
|
@@ -24,7 +24,7 @@
|
|||||||
#include "wx/textctrl.h"
|
#include "wx/textctrl.h"
|
||||||
#include "wx/dc.h"
|
#include "wx/dc.h"
|
||||||
#include "wx/combobox.h"
|
#include "wx/combobox.h"
|
||||||
#include "wx/settings.h"
|
#include "wx/settings.h"
|
||||||
#include "wx/log.h"
|
#include "wx/log.h"
|
||||||
#include "wx/checkbox.h"
|
#include "wx/checkbox.h"
|
||||||
#endif // WX_PRECOMP
|
#endif // WX_PRECOMP
|
||||||
|
@@ -462,9 +462,9 @@ static const char * check_xpm[] = {
|
|||||||
/* width height ncolors chars_per_pixel */
|
/* width height ncolors chars_per_pixel */
|
||||||
"16 16 3 1",
|
"16 16 3 1",
|
||||||
/* colors */
|
/* colors */
|
||||||
" s None c None",
|
" s None c None",
|
||||||
"X c #000000",
|
"X c #000000",
|
||||||
". c #808080",
|
". c #808080",
|
||||||
/* pixels */
|
/* pixels */
|
||||||
" ",
|
" ",
|
||||||
" ",
|
" ",
|
||||||
|
@@ -1562,8 +1562,8 @@ void wxDataViewRenderer::GtkInitHandlers()
|
|||||||
if (!gtk_check_version(2,6,0))
|
if (!gtk_check_version(2,6,0))
|
||||||
{
|
{
|
||||||
g_signal_connect (GTK_CELL_RENDERER(m_renderer), "editing_started",
|
g_signal_connect (GTK_CELL_RENDERER(m_renderer), "editing_started",
|
||||||
G_CALLBACK (wxgtk_renderer_editing_started),
|
G_CALLBACK (wxgtk_renderer_editing_started),
|
||||||
this);
|
this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -203,9 +203,9 @@ void wxBitmapButton::OnSetBitmap()
|
|||||||
|
|
||||||
if (!the_one.IsOk())
|
if (!the_one.IsOk())
|
||||||
{
|
{
|
||||||
the_one = GetBitmapLabel();
|
the_one = GetBitmapLabel();
|
||||||
if (!the_one.IsOk())
|
if (!the_one.IsOk())
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
GdkBitmap *mask = NULL;
|
GdkBitmap *mask = NULL;
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
// Created: 17/09/98
|
// Created: 17/09/98
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Julian Smart
|
// Copyright: (c) Julian Smart
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
@@ -37,7 +37,7 @@ wxStaticBitmap::wxStaticBitmap( wxWindow *parent, wxWindowID id, const wxBitmap
|
|||||||
// empty bitmap, so that we can create GtkPixmap widget:
|
// empty bitmap, so that we can create GtkPixmap widget:
|
||||||
static char * bogus_xpm[] = {
|
static char * bogus_xpm[] = {
|
||||||
"2 2 1 1",
|
"2 2 1 1",
|
||||||
" c None",
|
" c None",
|
||||||
" ",
|
" ",
|
||||||
" "};
|
" "};
|
||||||
|
|
||||||
|
@@ -246,8 +246,8 @@ wxCursor::wxCursor(const char bits[], int width, int height,
|
|||||||
Create(bits, width, height, hotSpotX, hotSpotY, maskBits);
|
Create(bits, width, height, hotSpotX, hotSpotY, maskBits);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxCursor::wxCursor(const wxString& name, wxBitmapType type, int hotSpotX,
|
wxCursor::wxCursor(const wxString& name, wxBitmapType type,
|
||||||
int hotSpotY )
|
int hotSpotX, int hotSpotY)
|
||||||
{
|
{
|
||||||
// Must be an XBM file
|
// Must be an XBM file
|
||||||
if (type != wxBITMAP_TYPE_XBM) {
|
if (type != wxBITMAP_TYPE_XBM) {
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
// Created: 17/09/98
|
// Created: 17/09/98
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Julian Smart
|
// Copyright: (c) Julian Smart
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
// We don't put main() in the library any more. GD.
|
// We don't put main() in the library any more. GD.
|
||||||
|
@@ -430,9 +430,9 @@ bool wxGUIEventLoop::YieldFor(long eventsToProcess)
|
|||||||
switch (msg.message)
|
switch (msg.message)
|
||||||
{
|
{
|
||||||
#if !defined(__WXWINCE__)
|
#if !defined(__WXWINCE__)
|
||||||
case WM_NCMOUSEMOVE:
|
case WM_NCMOUSEMOVE:
|
||||||
|
|
||||||
case WM_NCLBUTTONDOWN:
|
case WM_NCLBUTTONDOWN:
|
||||||
case WM_NCLBUTTONUP:
|
case WM_NCLBUTTONUP:
|
||||||
case WM_NCLBUTTONDBLCLK:
|
case WM_NCLBUTTONDBLCLK:
|
||||||
case WM_NCRBUTTONDOWN:
|
case WM_NCRBUTTONDOWN:
|
||||||
|
@@ -298,7 +298,7 @@ public:
|
|||||||
virtual void StrokePath( const wxGraphicsPath& p );
|
virtual void StrokePath( const wxGraphicsPath& p );
|
||||||
virtual void FillPath( const wxGraphicsPath& p , wxPolygonFillMode fillStyle = wxODDEVEN_RULE );
|
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);
|
virtual void StrokeLines( size_t n, const wxPoint2DDouble *points);
|
||||||
|
|
||||||
// draws a polygon
|
// draws a polygon
|
||||||
@@ -1121,19 +1121,19 @@ void wxGDIPlusContext::StrokeLines( size_t n, const wxPoint2DDouble *points)
|
|||||||
if (m_composition == wxCOMPOSITION_DEST)
|
if (m_composition == wxCOMPOSITION_DEST)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ( !m_pen.IsNull() )
|
if ( !m_pen.IsNull() )
|
||||||
{
|
{
|
||||||
wxGDIPlusOffsetHelper helper( m_context , ShouldOffset() );
|
wxGDIPlusOffsetHelper helper( m_context , ShouldOffset() );
|
||||||
Point *cpoints = new Point[n];
|
Point *cpoints = new Point[n];
|
||||||
for (size_t i = 0; i < n; i++)
|
for (size_t i = 0; i < n; i++)
|
||||||
{
|
{
|
||||||
cpoints[i].X = (int)(points[i].m_x );
|
cpoints[i].X = (int)(points[i].m_x );
|
||||||
cpoints[i].Y = (int)(points[i].m_y );
|
cpoints[i].Y = (int)(points[i].m_y );
|
||||||
|
|
||||||
} // for (size_t i = 0; i < n; i++)
|
} // for (size_t i = 0; i < n; i++)
|
||||||
m_context->DrawLines( ((wxGDIPlusPenData*)m_pen.GetGraphicsData())->GetGDIPlusPen() , cpoints , n ) ;
|
m_context->DrawLines( ((wxGDIPlusPenData*)m_pen.GetGraphicsData())->GetGDIPlusPen() , cpoints , n ) ;
|
||||||
delete[] cpoints;
|
delete[] cpoints;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGDIPlusContext::DrawLines( size_t n, const wxPoint2DDouble *points, wxPolygonFillMode WXUNUSED(fillStyle) )
|
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;
|
return;
|
||||||
|
|
||||||
wxGDIPlusOffsetHelper helper( m_context , ShouldOffset() );
|
wxGDIPlusOffsetHelper helper( m_context , ShouldOffset() );
|
||||||
Point *cpoints = new Point[n];
|
Point *cpoints = new Point[n];
|
||||||
for (size_t i = 0; i < n; i++)
|
for (size_t i = 0; i < n; i++)
|
||||||
{
|
{
|
||||||
cpoints[i].X = (int)(points[i].m_x );
|
cpoints[i].X = (int)(points[i].m_x );
|
||||||
cpoints[i].Y = (int)(points[i].m_y );
|
cpoints[i].Y = (int)(points[i].m_y );
|
||||||
|
|
||||||
} // for (int i = 0; i < n; i++)
|
} // for (int i = 0; i < n; i++)
|
||||||
if ( !m_brush.IsNull() )
|
if ( !m_brush.IsNull() )
|
||||||
m_context->FillPolygon( ((wxGDIPlusBrushData*)m_brush.GetRefData())->GetGDIPlusBrush() , cpoints , n ) ;
|
m_context->FillPolygon( ((wxGDIPlusBrushData*)m_brush.GetRefData())->GetGDIPlusBrush() , cpoints , n ) ;
|
||||||
if ( !m_pen.IsNull() )
|
if ( !m_pen.IsNull() )
|
||||||
m_context->DrawLines( ((wxGDIPlusPenData*)m_pen.GetGraphicsData())->GetGDIPlusPen() , cpoints , n ) ;
|
m_context->DrawLines( ((wxGDIPlusPenData*)m_pen.GetGraphicsData())->GetGDIPlusPen() , cpoints , n ) ;
|
||||||
delete[] cpoints;
|
delete[] cpoints;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGDIPlusContext::StrokePath( const wxGraphicsPath& path )
|
void wxGDIPlusContext::StrokePath( const wxGraphicsPath& path )
|
||||||
|
@@ -105,10 +105,10 @@ public:
|
|||||||
{
|
{
|
||||||
// this tooltip must be shown only if the mouse hovers a specific rect
|
// this tooltip must be shown only if the mouse hovers a specific rect
|
||||||
// of the hwnd parameter!
|
// of the hwnd parameter!
|
||||||
rect.left = rc.GetLeft();
|
rect.left = rc.GetLeft();
|
||||||
rect.right = rc.GetRight();
|
rect.right = rc.GetRight();
|
||||||
rect.top = rc.GetTop();
|
rect.top = rc.GetTop();
|
||||||
rect.bottom = rc.GetBottom();
|
rect.bottom = rc.GetBottom();
|
||||||
|
|
||||||
// note that not setting TTF_IDISHWND from the uFlags member means that the
|
// 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
|
// ti.uId field should not contain the HWND but rather as MSDN says an
|
||||||
|
@@ -2160,10 +2160,10 @@ void wxPMDCImpl::DoGetTextExtent(
|
|||||||
//
|
//
|
||||||
if (!m_hPS)
|
if (!m_hPS)
|
||||||
{
|
{
|
||||||
(void)wxMessageBox( wxT("wxWidgets core library")
|
(void)wxMessageBox( wxT("wxWidgets core library")
|
||||||
,"Using uninitialized DC for measuring text!\n"
|
,"Using uninitialized DC for measuring text!\n"
|
||||||
,wxICON_INFORMATION
|
,wxICON_INFORMATION
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
bRc = ::GpiQueryTextBox( m_hPS
|
bRc = ::GpiQueryTextBox( m_hPS
|
||||||
|
@@ -404,7 +404,7 @@ bool wxGUIEventLoop::YieldFor(long eventsToProcess)
|
|||||||
if (wxTheApp)
|
if (wxTheApp)
|
||||||
{
|
{
|
||||||
wxTheApp->ProcessPendingEvents();
|
wxTheApp->ProcessPendingEvents();
|
||||||
wxTheApp->HandleSockets();
|
wxTheApp->HandleSockets();
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@@ -156,7 +156,7 @@ bool wxOwnerDrawn::OnMeasureItem( size_t* pWidth,
|
|||||||
// Make sure that this item is at least as
|
// Make sure that this item is at least as
|
||||||
// tall as the user's system settings specify
|
// 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 )
|
if ( *pHeight < heightStd )
|
||||||
*pHeight = heightStd;
|
*pHeight = heightStd;
|
||||||
m_nHeight = *pHeight; // remember height for use in OnDrawItem
|
m_nHeight = *pHeight; // remember height for use in OnDrawItem
|
||||||
|
@@ -84,7 +84,7 @@ bool wxGetHostName( wxChar* zBuf, int nMaxSize )
|
|||||||
const wxChar* zDefaultHost = wxT("noname");
|
const wxChar* zDefaultHost = wxT("noname");
|
||||||
|
|
||||||
if ((zSysname = wxGetenv(wxT("SYSTEM_NAME"))) == NULL &&
|
if ((zSysname = wxGetenv(wxT("SYSTEM_NAME"))) == NULL &&
|
||||||
(zSysname = wxGetenv(wxT("HOSTNAME"))) == NULL)
|
(zSysname = wxGetenv(wxT("HOSTNAME"))) == NULL)
|
||||||
{
|
{
|
||||||
::PrfQueryProfileString( HINI_PROFILE
|
::PrfQueryProfileString( HINI_PROFILE
|
||||||
,(PSZ)WX_SECTION
|
,(PSZ)WX_SECTION
|
||||||
|
@@ -3224,7 +3224,7 @@ bool wxWindowOS2::OS2OnDrawItem( int vId,
|
|||||||
,pMeasureStruct->rclItem.yTop - pMeasureStruct->rclItem.yBottom
|
,pMeasureStruct->rclItem.yTop - pMeasureStruct->rclItem.yBottom
|
||||||
);
|
);
|
||||||
|
|
||||||
wxPMDCImpl *impl = (wxPMDCImpl*) vDc.GetImpl();
|
wxPMDCImpl *impl = (wxPMDCImpl*) vDc.GetImpl();
|
||||||
impl->SetHDC( hDC, false );
|
impl->SetHDC( hDC, false );
|
||||||
impl->SetHPS( pMeasureStruct->hps );
|
impl->SetHPS( pMeasureStruct->hps );
|
||||||
//
|
//
|
||||||
|
@@ -835,8 +835,8 @@ bool wxApp::Initialize(int& argc, wxChar **argv)
|
|||||||
event_posted_context.perform = macPostedEventCallback;
|
event_posted_context.perform = macPostedEventCallback;
|
||||||
m_macEventPosted = CFRunLoopSourceCreate(NULL,0,&event_posted_context);
|
m_macEventPosted = CFRunLoopSourceCreate(NULL,0,&event_posted_context);
|
||||||
CFRunLoopAddSource(CFRunLoopGetCurrent(), m_macEventPosted, kCFRunLoopCommonModes);
|
CFRunLoopAddSource(CFRunLoopGetCurrent(), m_macEventPosted, kCFRunLoopCommonModes);
|
||||||
// run loop takes ownership
|
// run loop takes ownership
|
||||||
CFRelease(m_macEventPosted);
|
CFRelease(m_macEventPosted);
|
||||||
*/
|
*/
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -944,10 +944,10 @@ void wxApp::CleanUp()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (m_macEventPosted)
|
if (m_macEventPosted)
|
||||||
{
|
{
|
||||||
CFRunLoopRemoveSource(CFRunLoopGetCurrent(), m_macEventPosted, kCFRunLoopCommonModes);
|
CFRunLoopRemoveSource(CFRunLoopGetCurrent(), m_macEventPosted, kCFRunLoopCommonModes);
|
||||||
m_macEventPosted = NULL;
|
m_macEventPosted = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
DoCleanUp();
|
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
|
// control interferes with some built-in keys like pgdown, return etc. therefore we remove the controlKey modifier
|
||||||
// and look at the character after
|
// and look at the character after
|
||||||
#ifdef __LP64__
|
#ifdef __LP64__
|
||||||
// TODO new implementation using TextInputSources
|
// TODO new implementation using TextInputSources
|
||||||
#else
|
#else
|
||||||
UInt32 state = 0;
|
UInt32 state = 0;
|
||||||
UInt32 keyInfo = KeyTranslate((Ptr)GetScriptManagerVariable(smKCHRCache), ( modifiers & (~(controlKey | shiftKey | optionKey))) | keycode, &state);
|
UInt32 keyInfo = KeyTranslate((Ptr)GetScriptManagerVariable(smKCHRCache), ( modifiers & (~(controlKey | shiftKey | optionKey))) | keycode, &state);
|
||||||
|
@@ -634,7 +634,7 @@ wxBitmapDataObject::wxBitmapDataObject( const wxBitmap& rBitmap )
|
|||||||
|
|
||||||
if (m_bitmap.Ok())
|
if (m_bitmap.Ok())
|
||||||
{
|
{
|
||||||
SetBitmap( rBitmap );
|
SetBitmap( rBitmap );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -353,9 +353,9 @@ wxMacDataBrowserTableViewControl::wxMacDataBrowserTableViewControl(wxWindow* pee
|
|||||||
callbacks.u.v1.itemDataCallback = gDataBrowserTableViewItemDataUPP;
|
callbacks.u.v1.itemDataCallback = gDataBrowserTableViewItemDataUPP;
|
||||||
callbacks.u.v1.itemCompareCallback = gDataBrowserTableViewItemCompareUPP;
|
callbacks.u.v1.itemCompareCallback = gDataBrowserTableViewItemCompareUPP;
|
||||||
callbacks.u.v1.itemNotificationCallback = gDataBrowserTableViewItemNotificationUPP;
|
callbacks.u.v1.itemNotificationCallback = gDataBrowserTableViewItemNotificationUPP;
|
||||||
callbacks.u.v1.acceptDragCallback = gDataBrowserTableViewAcceptDragUPP;
|
callbacks.u.v1.acceptDragCallback = gDataBrowserTableViewAcceptDragUPP;
|
||||||
callbacks.u.v1.addDragItemCallback = gDataBrowserTableViewAddDragItemUPP;
|
callbacks.u.v1.addDragItemCallback = gDataBrowserTableViewAddDragItemUPP;
|
||||||
callbacks.u.v1.receiveDragCallback = gDataBrowserTableViewReceiveDragUPP;
|
callbacks.u.v1.receiveDragCallback = gDataBrowserTableViewReceiveDragUPP;
|
||||||
this->SetCallbacks(&callbacks);
|
this->SetCallbacks(&callbacks);
|
||||||
|
|
||||||
// setup callbacks for customized items:
|
// setup callbacks for customized items:
|
||||||
|
@@ -36,7 +36,7 @@ wxScreenDCImpl::wxScreenDCImpl( wxDC *owner ) :
|
|||||||
m_width = (wxCoord)cgbounds.size.width;
|
m_width = (wxCoord)cgbounds.size.width;
|
||||||
m_height = (wxCoord)cgbounds.size.height;
|
m_height = (wxCoord)cgbounds.size.height;
|
||||||
#else
|
#else
|
||||||
wxDisplaySize( &m_width, &m_height );
|
wxDisplaySize( &m_width, &m_height );
|
||||||
#endif
|
#endif
|
||||||
#if wxOSX_USE_COCOA_OR_IPHONE
|
#if wxOSX_USE_COCOA_OR_IPHONE
|
||||||
SetGraphicsContext( wxGraphicsContext::Create() );
|
SetGraphicsContext( wxGraphicsContext::Create() );
|
||||||
|
@@ -132,8 +132,8 @@ int wxDirDialog::ShowModal()
|
|||||||
if ( err != noErr && err != userCanceledErr )
|
if ( err != noErr && err != userCanceledErr )
|
||||||
m_path = wxEmptyString ;
|
m_path = wxEmptyString ;
|
||||||
|
|
||||||
if ( dialog )
|
if ( dialog )
|
||||||
::NavDialogDispose(dialog);
|
::NavDialogDispose(dialog);
|
||||||
|
|
||||||
return (err == noErr) ? wxID_OK : wxID_CANCEL ;
|
return (err == noErr) ? wxID_OK : wxID_CANCEL ;
|
||||||
}
|
}
|
||||||
|
@@ -391,121 +391,121 @@ pascal OSErr wxMacWindowDragTrackingHandler(
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
GetDragMouse( theDrag, &mouse, 0L );
|
GetDragMouse( theDrag, &mouse, 0L );
|
||||||
{
|
{
|
||||||
int x = mouse.h ;
|
int x = mouse.h ;
|
||||||
int y = mouse.v ;
|
int y = mouse.v ;
|
||||||
toplevel->GetNonOwnedPeer()->ScreenToWindow( &x, &y );
|
toplevel->GetNonOwnedPeer()->ScreenToWindow( &x, &y );
|
||||||
localMouse.h = x;
|
localMouse.h = x;
|
||||||
localMouse.v = y;
|
localMouse.v = y;
|
||||||
|
|
||||||
{
|
{
|
||||||
wxWindow *win = NULL;
|
wxWindow *win = NULL;
|
||||||
ControlPartCode controlPart;
|
ControlPartCode controlPart;
|
||||||
ControlRef control = FindControlUnderMouse( localMouse, theWindow, &controlPart );
|
ControlRef control = FindControlUnderMouse( localMouse, theWindow, &controlPart );
|
||||||
if ( control )
|
if ( control )
|
||||||
win = wxFindWindowFromWXWidget( (WXWidget) control );
|
win = wxFindWindowFromWXWidget( (WXWidget) control );
|
||||||
else
|
else
|
||||||
win = toplevel;
|
win = toplevel;
|
||||||
|
|
||||||
int localx, localy;
|
int localx, localy;
|
||||||
localx = localMouse.h;
|
localx = localMouse.h;
|
||||||
localy = localMouse.v;
|
localy = localMouse.v;
|
||||||
|
|
||||||
if ( win )
|
if ( win )
|
||||||
win->MacRootWindowToWindow( &localx, &localy );
|
win->MacRootWindowToWindow( &localx, &localy );
|
||||||
if ( win != trackingGlobals->m_currentTargetWindow )
|
if ( win != trackingGlobals->m_currentTargetWindow )
|
||||||
{
|
{
|
||||||
if ( trackingGlobals->m_currentTargetWindow )
|
if ( trackingGlobals->m_currentTargetWindow )
|
||||||
{
|
{
|
||||||
// this window is left
|
// this window is left
|
||||||
if ( trackingGlobals->m_currentTarget )
|
if ( trackingGlobals->m_currentTarget )
|
||||||
{
|
{
|
||||||
#ifndef __LP64__
|
#ifndef __LP64__
|
||||||
HideDragHilite( theDrag );
|
HideDragHilite( theDrag );
|
||||||
#endif
|
#endif
|
||||||
trackingGlobals->m_currentTarget->SetCurrentDragPasteboard( pasteboard );
|
trackingGlobals->m_currentTarget->SetCurrentDragPasteboard( pasteboard );
|
||||||
trackingGlobals->m_currentTarget->OnLeave();
|
trackingGlobals->m_currentTarget->OnLeave();
|
||||||
trackingGlobals->m_currentTarget = NULL;
|
trackingGlobals->m_currentTarget = NULL;
|
||||||
trackingGlobals->m_currentTargetWindow = NULL;
|
trackingGlobals->m_currentTargetWindow = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( win )
|
if ( win )
|
||||||
{
|
{
|
||||||
// this window is entered
|
// this window is entered
|
||||||
trackingGlobals->m_currentTargetWindow = win;
|
trackingGlobals->m_currentTargetWindow = win;
|
||||||
trackingGlobals->m_currentTarget = win->GetDropTarget();
|
trackingGlobals->m_currentTarget = win->GetDropTarget();
|
||||||
{
|
{
|
||||||
if ( trackingGlobals->m_currentTarget )
|
if ( trackingGlobals->m_currentTarget )
|
||||||
{
|
{
|
||||||
trackingGlobals->m_currentTarget->SetCurrentDragPasteboard( pasteboard );
|
trackingGlobals->m_currentTarget->SetCurrentDragPasteboard( pasteboard );
|
||||||
result = trackingGlobals->m_currentTarget->OnEnter( localx, localy, result );
|
result = trackingGlobals->m_currentTarget->OnEnter( localx, localy, result );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( result != wxDragNone )
|
if ( result != wxDragNone )
|
||||||
{
|
{
|
||||||
int x, y;
|
int x, y;
|
||||||
|
|
||||||
x = y = 0;
|
x = y = 0;
|
||||||
win->MacWindowToRootWindow( &x, &y );
|
win->MacWindowToRootWindow( &x, &y );
|
||||||
RgnHandle hiliteRgn = NewRgn();
|
RgnHandle hiliteRgn = NewRgn();
|
||||||
Rect r = { y, x, y + win->GetSize().y, x + win->GetSize().x };
|
Rect r = { y, x, y + win->GetSize().y, x + win->GetSize().x };
|
||||||
RectRgn( hiliteRgn, &r );
|
RectRgn( hiliteRgn, &r );
|
||||||
#ifndef __LP64__
|
#ifndef __LP64__
|
||||||
ShowDragHilite( theDrag, hiliteRgn, true );
|
ShowDragHilite( theDrag, hiliteRgn, true );
|
||||||
#endif
|
#endif
|
||||||
DisposeRgn( hiliteRgn );
|
DisposeRgn( hiliteRgn );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( trackingGlobals->m_currentTarget )
|
if ( trackingGlobals->m_currentTarget )
|
||||||
{
|
{
|
||||||
trackingGlobals->m_currentTarget->SetCurrentDragPasteboard( pasteboard );
|
trackingGlobals->m_currentTarget->SetCurrentDragPasteboard( pasteboard );
|
||||||
result = trackingGlobals->m_currentTarget->OnDragOver( localx, localy, result );
|
result = trackingGlobals->m_currentTarget->OnDragOver( localx, localy, result );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// set cursor for OnEnter and OnDragOver
|
// set cursor for OnEnter and OnDragOver
|
||||||
if ( trackingGlobals->m_currentSource && !trackingGlobals->m_currentSource->GiveFeedback( result ) )
|
if ( trackingGlobals->m_currentSource && !trackingGlobals->m_currentSource->GiveFeedback( result ) )
|
||||||
{
|
{
|
||||||
if ( !trackingGlobals->m_currentSource->MacInstallDefaultCursor( result ) )
|
if ( !trackingGlobals->m_currentSource->MacInstallDefaultCursor( result ) )
|
||||||
{
|
{
|
||||||
wxStockCursor cursorID = wxCURSOR_NONE;
|
wxStockCursor cursorID = wxCURSOR_NONE;
|
||||||
|
|
||||||
switch (result)
|
switch (result)
|
||||||
{
|
{
|
||||||
case wxDragCopy:
|
case wxDragCopy:
|
||||||
cursorID = wxCURSOR_COPY_ARROW;
|
cursorID = wxCURSOR_COPY_ARROW;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case wxDragMove:
|
case wxDragMove:
|
||||||
cursorID = wxCURSOR_ARROW;
|
cursorID = wxCURSOR_ARROW;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case wxDragNone:
|
case wxDragNone:
|
||||||
cursorID = wxCURSOR_NO_ENTRY;
|
cursorID = wxCURSOR_NO_ENTRY;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case wxDragError:
|
case wxDragError:
|
||||||
case wxDragLink:
|
case wxDragLink:
|
||||||
case wxDragCancel:
|
case wxDragCancel:
|
||||||
default:
|
default:
|
||||||
// put these here to make gcc happy
|
// put these here to make gcc happy
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cursorID != wxCURSOR_NONE)
|
if (cursorID != wxCURSOR_NONE)
|
||||||
{
|
{
|
||||||
wxCursor cursor( cursorID );
|
wxCursor cursor( cursorID );
|
||||||
cursor.MacInstall();
|
cursor.MacInstall();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kDragTrackingLeaveWindow:
|
case kDragTrackingLeaveWindow:
|
||||||
|
@@ -140,7 +140,7 @@ bool wxDrawerWindow::SetPreferredEdge(wxDirection edge)
|
|||||||
{
|
{
|
||||||
const OSStatus status = ::SetDrawerPreferredEdge((WindowRef)GetWXWindow(),
|
const OSStatus status = ::SetDrawerPreferredEdge((WindowRef)GetWXWindow(),
|
||||||
DirectionToWindowEdge(edge));
|
DirectionToWindowEdge(edge));
|
||||||
return (noErr == status);
|
return (noErr == status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1516,11 +1516,11 @@ void wxWidgetCocoaImpl::SetControlSize( wxWindowVariant variant )
|
|||||||
if ( [m_osxView respondsToSelector:@selector(setControlSize:)] )
|
if ( [m_osxView respondsToSelector:@selector(setControlSize:)] )
|
||||||
[m_osxView setControlSize:size];
|
[m_osxView setControlSize:size];
|
||||||
else if ([m_osxView respondsToSelector:@selector(cell)])
|
else if ([m_osxView respondsToSelector:@selector(cell)])
|
||||||
{
|
{
|
||||||
id cell = [(id)m_osxView cell];
|
id cell = [(id)m_osxView cell];
|
||||||
if ([cell respondsToSelector:@selector(setControlSize:)])
|
if ([cell respondsToSelector:@selector(setControlSize:)])
|
||||||
[cell setControlSize:size];
|
[cell setControlSize:size];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWidgetCocoaImpl::SetFont(wxFont const& font, wxColour const&, long, bool)
|
void wxWidgetCocoaImpl::SetFont(wxFont const& font, wxColour const&, long, bool)
|
||||||
|
@@ -78,8 +78,8 @@ void wxMemoryDCImpl::DoSelect( const wxBitmap& bitmap )
|
|||||||
if ( m_selected.GetDepth() != 1 )
|
if ( m_selected.GetDepth() != 1 )
|
||||||
m_selected.UseAlpha() ;
|
m_selected.UseAlpha() ;
|
||||||
m_selected.BeginRawAccess() ;
|
m_selected.BeginRawAccess() ;
|
||||||
m_width = bitmap.GetWidth();
|
m_width = bitmap.GetWidth();
|
||||||
m_height = bitmap.GetHeight();
|
m_height = bitmap.GetHeight();
|
||||||
CGColorSpaceRef genericColorSpace = wxMacGetGenericRGBColorSpace();
|
CGColorSpaceRef genericColorSpace = wxMacGetGenericRGBColorSpace();
|
||||||
CGContextRef bmCtx = (CGContextRef) m_selected.GetHBITMAP();
|
CGContextRef bmCtx = (CGContextRef) m_selected.GetHBITMAP();
|
||||||
|
|
||||||
@@ -87,7 +87,7 @@ void wxMemoryDCImpl::DoSelect( const wxBitmap& bitmap )
|
|||||||
{
|
{
|
||||||
CGContextSetFillColorSpace( bmCtx, genericColorSpace );
|
CGContextSetFillColorSpace( bmCtx, genericColorSpace );
|
||||||
CGContextSetStrokeColorSpace( bmCtx, genericColorSpace );
|
CGContextSetStrokeColorSpace( bmCtx, genericColorSpace );
|
||||||
SetGraphicsContext( wxGraphicsContext::CreateFromNative( bmCtx ) );
|
SetGraphicsContext( wxGraphicsContext::CreateFromNative( bmCtx ) );
|
||||||
}
|
}
|
||||||
m_ok = (m_graphicContext != NULL) ;
|
m_ok = (m_graphicContext != NULL) ;
|
||||||
}
|
}
|
||||||
|
@@ -655,7 +655,7 @@ class wxHIDModule : public wxModule
|
|||||||
{
|
{
|
||||||
for(size_t i = 0; i < sm_keyboards.GetCount(); ++i)
|
for(size_t i = 0; i < sm_keyboards.GetCount(); ++i)
|
||||||
delete (wxHIDKeyboard*) sm_keyboards[i];
|
delete (wxHIDKeyboard*) sm_keyboards[i];
|
||||||
sm_keyboards.Clear();
|
sm_keyboards.Clear();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
#include "wx/tglbtn.h"
|
#include "wx/tglbtn.h"
|
||||||
#include "wx/osx/private.h"
|
#include "wx/osx/private.h"
|
||||||
#include "wx/bmpbuttn.h" // for wxDEFAULT_BUTTON_MARGIN
|
#include "wx/bmpbuttn.h" // for wxDEFAULT_BUTTON_MARGIN
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// macros
|
// macros
|
||||||
|
@@ -1258,19 +1258,19 @@ bool wxSystemColourProperty::OnEvent( wxPropertyGrid* propgrid,
|
|||||||
}
|
}
|
||||||
else if ( event.GetEventType() == wxEVT_COMMAND_COMBOBOX_SELECTED )
|
else if ( event.GetEventType() == wxEVT_COMMAND_COMBOBOX_SELECTED )
|
||||||
{
|
{
|
||||||
// Must override index detection since at this point GetIndex()
|
// Must override index detection since at this point GetIndex()
|
||||||
// will return old value.
|
// will return old value.
|
||||||
wxOwnerDrawnComboBox* cb =
|
wxOwnerDrawnComboBox* cb =
|
||||||
static_cast<wxOwnerDrawnComboBox*>(propgrid->GetEditorControl());
|
static_cast<wxOwnerDrawnComboBox*>(propgrid->GetEditorControl());
|
||||||
|
|
||||||
if ( cb )
|
if ( cb )
|
||||||
{
|
{
|
||||||
int index = cb->GetSelection();
|
int index = cb->GetSelection();
|
||||||
|
|
||||||
if ( index == GetCustomColourIndex() &&
|
if ( index == GetCustomColourIndex() &&
|
||||||
!(m_flags & wxPG_PROP_HIDE_CUSTOM_COLOUR) )
|
!(m_flags & wxPG_PROP_HIDE_CUSTOM_COLOUR) )
|
||||||
askColour = true;
|
askColour = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( askColour && !propgrid->WasValueChangedInEvent() )
|
if ( askColour && !propgrid->WasValueChangedInEvent() )
|
||||||
|
@@ -726,10 +726,10 @@ void wxPropertyGridManager::SetColumnCount( int colCount, int page )
|
|||||||
|
|
||||||
size_t wxPropertyGridManager::GetPageCount() const
|
size_t wxPropertyGridManager::GetPageCount() const
|
||||||
{
|
{
|
||||||
if ( !(m_iFlags & wxPG_MAN_FL_PAGE_INSERTED) )
|
if ( !(m_iFlags & wxPG_MAN_FL_PAGE_INSERTED) )
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return m_arrPages.size();
|
return m_arrPages.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
@@ -2578,14 +2578,14 @@ int wxPropertyCategory::GetTextExtent( const wxWindow* wnd, const wxFont& font )
|
|||||||
if ( m_textExtent > 0 )
|
if ( m_textExtent > 0 )
|
||||||
return m_textExtent;
|
return m_textExtent;
|
||||||
int x = 0, y = 0;
|
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;
|
return x;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxPropertyCategory::CalculateTextExtent( wxWindow* wnd, const wxFont& font )
|
void wxPropertyCategory::CalculateTextExtent( wxWindow* wnd, const wxFont& font )
|
||||||
{
|
{
|
||||||
int x = 0, y = 0;
|
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;
|
m_textExtent = x;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1771,7 +1771,7 @@ void wxPropertyGridPageState::DoDelete( wxPGProperty* item, bool doDelete )
|
|||||||
|
|
||||||
wxASSERT( item->GetParentState() == this );
|
wxASSERT( item->GetParentState() == this );
|
||||||
|
|
||||||
wxPropertyGrid* pg = GetGrid();
|
wxPropertyGrid* pg = GetGrid();
|
||||||
|
|
||||||
if ( DoIsPropertySelected(item) )
|
if ( DoIsPropertySelected(item) )
|
||||||
{
|
{
|
||||||
@@ -1857,9 +1857,9 @@ void wxPropertyGridPageState::DoDelete( wxPGProperty* item, bool doDelete )
|
|||||||
(parent->IsCategory() || parent->IsRoot()) )
|
(parent->IsCategory() || parent->IsRoot()) )
|
||||||
m_dictName.erase(item->GetBaseName());
|
m_dictName.erase(item->GetBaseName());
|
||||||
|
|
||||||
// We need to clear parent grid's m_propHover, if it matches item
|
// We need to clear parent grid's m_propHover, if it matches item
|
||||||
if ( pg && pg->m_propHover == item )
|
if ( pg && pg->m_propHover == item )
|
||||||
pg->m_propHover = NULL;
|
pg->m_propHover = NULL;
|
||||||
|
|
||||||
// We can actually delete it now
|
// We can actually delete it now
|
||||||
if ( doDelete )
|
if ( doDelete )
|
||||||
|
@@ -171,8 +171,8 @@ wxString wxIntProperty::ValueToString( wxVariant& value,
|
|||||||
}
|
}
|
||||||
else if ( value.GetType() == wxPG_VARIANT_TYPE_LONGLONG )
|
else if ( value.GetType() == wxPG_VARIANT_TYPE_LONGLONG )
|
||||||
{
|
{
|
||||||
wxLongLong ll = value.GetLongLong();
|
wxLongLong ll = value.GetLongLong();
|
||||||
return ll.ToString();
|
return ll.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
return wxEmptyString;
|
return wxEmptyString;
|
||||||
|
@@ -4800,7 +4800,7 @@ bool wxRichTextPlainText::DrawTabbedString(wxDC& dc, const wxTextAttr& attr, con
|
|||||||
dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT);
|
dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxCoord x_orig = x;
|
wxCoord x_orig = x;
|
||||||
while (hasTabs)
|
while (hasTabs)
|
||||||
{
|
{
|
||||||
// the string has a tab
|
// the string has a tab
|
||||||
|
@@ -256,7 +256,7 @@ void wxRichTextHTMLHandler::BeginParagraphFormatting(const wxTextAttr& WXUNUSED(
|
|||||||
str << wxString::Format(wxT("<p align=\"%s\""), align.c_str());
|
str << wxString::Format(wxT("<p align=\"%s\""), align.c_str());
|
||||||
|
|
||||||
if (thisStyle.HasParagraphSpacingAfter() && thisStyle.GetParagraphSpacingAfter() == 0)
|
if (thisStyle.HasParagraphSpacingAfter() && thisStyle.GetParagraphSpacingAfter() == 0)
|
||||||
str << wxT(" style=\"line-height: 0px\"");
|
str << wxT(" style=\"line-height: 0px\"");
|
||||||
|
|
||||||
str << wxT(">");
|
str << wxT(">");
|
||||||
|
|
||||||
|
@@ -619,7 +619,7 @@ wxString wxRichTextStyleListBox::CreateHTML(wxRichTextStyleDefinition* def) cons
|
|||||||
int size = 3;
|
int size = 3;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Guess a standard font size
|
// Guess a standard font size
|
||||||
int stdFontSize = 0;
|
int stdFontSize = 0;
|
||||||
|
|
||||||
// First see if we have a default/normal style to base the size on
|
// 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;
|
size_t i;
|
||||||
for (i = 0; i < m_styleNames.GetCount(); i++)
|
for (i = 0; i < m_styleNames.GetCount(); i++)
|
||||||
{
|
{
|
||||||
wxString name = m_styleNames[i].Lower();
|
wxString name = m_styleNames[i].Lower();
|
||||||
if (name.Find(wxT("normal")) != wxNOT_FOUND || name.Find(normalTranslated) != wxNOT_FOUND ||
|
if (name.Find(wxT("normal")) != wxNOT_FOUND || name.Find(normalTranslated) != wxNOT_FOUND ||
|
||||||
name.Find(wxT("default")) != wxNOT_FOUND || name.Find(defaultTranslated) != wxNOT_FOUND)
|
name.Find(wxT("default")) != wxNOT_FOUND || name.Find(defaultTranslated) != wxNOT_FOUND)
|
||||||
{
|
{
|
||||||
wxRichTextStyleDefinition* d = GetStyleSheet()->FindStyle(m_styleNames[i]);
|
wxRichTextStyleDefinition* d = GetStyleSheet()->FindStyle(m_styleNames[i]);
|
||||||
if (d)
|
if (d)
|
||||||
{
|
{
|
||||||
wxRichTextAttr attr2(d->GetStyleMergedWithBase(GetStyleSheet()));
|
wxRichTextAttr attr2(d->GetStyleMergedWithBase(GetStyleSheet()));
|
||||||
if (attr2.HasFontSize())
|
if (attr2.HasFontSize())
|
||||||
{
|
{
|
||||||
stdFontSize = attr2.GetFontSize();
|
stdFontSize = attr2.GetFontSize();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stdFontSize == 0)
|
if (stdFontSize == 0)
|
||||||
{
|
{
|
||||||
@@ -670,13 +670,13 @@ wxString wxRichTextStyleListBox::CreateHTML(wxRichTextStyleDefinition* def) cons
|
|||||||
{
|
{
|
||||||
if (sizes[i] > mostCommonSize)
|
if (sizes[i] > mostCommonSize)
|
||||||
mostCommonSize = i;
|
mostCommonSize = i;
|
||||||
}
|
}
|
||||||
if (mostCommonSize > 0)
|
if (mostCommonSize > 0)
|
||||||
stdFontSize = mostCommonSize;
|
stdFontSize = mostCommonSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stdFontSize == 0)
|
if (stdFontSize == 0)
|
||||||
stdFontSize = 12;
|
stdFontSize = 12;
|
||||||
|
|
||||||
int thisFontSize = ((attr.GetFlags() & wxTEXT_ATTR_FONT_SIZE) != 0) ? attr.GetFontSize() : stdFontSize;
|
int thisFontSize = ((attr.GetFlags() & wxTEXT_ATTR_FONT_SIZE) != 0) ? attr.GetFontSize() : stdFontSize;
|
||||||
|
|
||||||
|
@@ -388,15 +388,15 @@ wxDialUpManagerImpl::CheckStatusInternal(void)
|
|||||||
// This can be used under Win 9x, too!
|
// This can be used under Win 9x, too!
|
||||||
struct hostent *hp;
|
struct hostent *hp;
|
||||||
struct sockaddr_in serv_addr;
|
struct sockaddr_in serv_addr;
|
||||||
int sockfd;
|
int sockfd;
|
||||||
|
|
||||||
m_IsOnline = 0; // assume false
|
m_IsOnline = 0; // assume false
|
||||||
if((hp = gethostbyname(m_BeaconHost)) == NULL)
|
if((hp = gethostbyname(m_BeaconHost)) == NULL)
|
||||||
return; // no DNS no net
|
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);
|
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)
|
if( ( sockfd = socket(hp->h_addrtype, SOCK_STREAM, 0)) < 0)
|
||||||
{
|
{
|
||||||
// sys_error("cannot create socket for gw");
|
// sys_error("cannot create socket for gw");
|
||||||
|
@@ -326,7 +326,7 @@ void wxFontRefData::InitFromNative()
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch ( wxToupper( m_nativeFontInfo.
|
switch ( wxToupper( m_nativeFontInfo.
|
||||||
GetXFontComponent(wxXLFD_SLANT)[0u]).GetValue() )
|
GetXFontComponent(wxXLFD_SLANT)[0u]).GetValue() )
|
||||||
{
|
{
|
||||||
case wxT('I'): // italique
|
case wxT('I'): // italique
|
||||||
m_style = wxFONTSTYLE_ITALIC;
|
m_style = wxFONTSTYLE_ITALIC;
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
// Created: 17/09/98
|
// Created: 17/09/98
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Julian Smart
|
// Copyright: (c) Julian Smart
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
Reference in New Issue
Block a user