Remove trailing whitespace from several files
No real changes. See https://github.com/wxWidgets/wxWidgets/pull/787
This commit is contained in:
committed by
Vadim Zeitlin
parent
8d02384792
commit
496da2e550
@@ -317,7 +317,7 @@ public:
|
|||||||
return Ops::GetValue(buf);
|
return Ops::GetValue(buf);
|
||||||
}
|
}
|
||||||
#if wxUSE_EXTENDED_RTTI
|
#if wxUSE_EXTENDED_RTTI
|
||||||
virtual const wxTypeInfo* GetTypeInfo() const
|
virtual const wxTypeInfo* GetTypeInfo() const
|
||||||
{
|
{
|
||||||
return wxGetTypeInfo((T*)NULL);
|
return wxGetTypeInfo((T*)NULL);
|
||||||
}
|
}
|
||||||
@@ -377,7 +377,7 @@ public: \
|
|||||||
const UseDataType* sptr = \
|
const UseDataType* sptr = \
|
||||||
reinterpret_cast<const UseDataType*>(voidPtr); \
|
reinterpret_cast<const UseDataType*>(voidPtr); \
|
||||||
return static_cast<T>(*sptr); \
|
return static_cast<T>(*sptr); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#if wxUSE_EXTENDED_RTTI
|
#if wxUSE_EXTENDED_RTTI
|
||||||
#define WX_ANY_DEFINE_SUB_TYPE(T, CLSTYPE) \
|
#define WX_ANY_DEFINE_SUB_TYPE(T, CLSTYPE) \
|
||||||
|
@@ -94,7 +94,7 @@ public:
|
|||||||
virtual wxRect GetPaperRect() const wxOVERRIDE;
|
virtual wxRect GetPaperRect() const wxOVERRIDE;
|
||||||
|
|
||||||
virtual void* GetHandle() const wxOVERRIDE { return NULL; }
|
virtual void* GetHandle() const wxOVERRIDE { return NULL; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool DoFloodFill(wxCoord x1, wxCoord y1, const wxColour &col,
|
bool DoFloodFill(wxCoord x1, wxCoord y1, const wxColour &col,
|
||||||
wxFloodFillStyle style = wxFLOOD_SURFACE) wxOVERRIDE;
|
wxFloodFillStyle style = wxFLOOD_SURFACE) wxOVERRIDE;
|
||||||
|
@@ -304,7 +304,7 @@ public:
|
|||||||
|
|
||||||
const wxSize& GetSize() const { return m_size; }
|
const wxSize& GetSize() const { return m_size; }
|
||||||
void SetSize(const wxSize& sz) { m_size = sz; }
|
void SetSize(const wxSize& sz) { m_size = sz; }
|
||||||
|
|
||||||
bool IsOk() const { return m_smallImageList != NULL; }
|
bool IsOk() const { return m_smallImageList != NULL; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@@ -65,7 +65,7 @@ class WXDLLEXPORT wxNotebookPageInfo : public wxObject
|
|||||||
public:
|
public:
|
||||||
wxNotebookPageInfo() { m_page = NULL; m_imageId = -1; m_selected = false; }
|
wxNotebookPageInfo() { m_page = NULL; m_imageId = -1; m_selected = false; }
|
||||||
virtual ~wxNotebookPageInfo() { }
|
virtual ~wxNotebookPageInfo() { }
|
||||||
|
|
||||||
bool Create(wxNotebookPage *page,
|
bool Create(wxNotebookPage *page,
|
||||||
const wxString& text,
|
const wxString& text,
|
||||||
bool selected,
|
bool selected,
|
||||||
@@ -77,18 +77,18 @@ public:
|
|||||||
m_imageId = imageId;
|
m_imageId = imageId;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxNotebookPage* GetPage() const { return m_page; }
|
wxNotebookPage* GetPage() const { return m_page; }
|
||||||
wxString GetText() const { return m_text; }
|
wxString GetText() const { return m_text; }
|
||||||
bool GetSelected() const { return m_selected; }
|
bool GetSelected() const { return m_selected; }
|
||||||
int GetImageId() const { return m_imageId; }
|
int GetImageId() const { return m_imageId; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
wxNotebookPage *m_page;
|
wxNotebookPage *m_page;
|
||||||
wxString m_text;
|
wxString m_text;
|
||||||
bool m_selected;
|
bool m_selected;
|
||||||
int m_imageId;
|
int m_imageId;
|
||||||
|
|
||||||
wxDECLARE_DYNAMIC_CLASS(wxNotebookPageInfo);
|
wxDECLARE_DYNAMIC_CLASS(wxNotebookPageInfo);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -139,16 +139,16 @@ public:
|
|||||||
// new is wxNOT_FOUND)
|
// new is wxNOT_FOUND)
|
||||||
void SendPageChangedEvent(int nPageOld, int nPageNew = wxNOT_FOUND);
|
void SendPageChangedEvent(int nPageOld, int nPageNew = wxNOT_FOUND);
|
||||||
|
|
||||||
#if wxUSE_EXTENDED_RTTI
|
#if wxUSE_EXTENDED_RTTI
|
||||||
// XTI accessors
|
// XTI accessors
|
||||||
virtual void AddPageInfo( wxNotebookPageInfo* info );
|
virtual void AddPageInfo( wxNotebookPageInfo* info );
|
||||||
virtual const wxNotebookPageInfoList& GetPageInfos() const;
|
virtual const wxNotebookPageInfoList& GetPageInfos() const;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
#if wxUSE_EXTENDED_RTTI
|
#if wxUSE_EXTENDED_RTTI
|
||||||
wxNotebookPageInfoList m_pageInfos;
|
wxNotebookPageInfoList m_pageInfos;
|
||||||
#endif
|
#endif
|
||||||
wxDECLARE_NO_COPY_CLASS(wxNotebookBase);
|
wxDECLARE_NO_COPY_CLASS(wxNotebookBase);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -57,7 +57,7 @@ public:
|
|||||||
long style = 0,
|
long style = 0,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxCheckBoxNameStr);
|
const wxString& name = wxCheckBoxNameStr);
|
||||||
|
|
||||||
bool Create(wxWindow *parent,
|
bool Create(wxWindow *parent,
|
||||||
wxWindowID id,
|
wxWindowID id,
|
||||||
const wxString& label,
|
const wxString& label,
|
||||||
|
@@ -5542,7 +5542,7 @@ public:
|
|||||||
int GetAnnotationsLinesAdded() const { return m_annotationLinesAdded; }
|
int GetAnnotationsLinesAdded() const { return m_annotationLinesAdded; }
|
||||||
int GetUpdated() const { return m_updated; }
|
int GetUpdated() const { return m_updated; }
|
||||||
int GetListCompletionMethod() const { return m_listCompletionMethod; }
|
int GetListCompletionMethod() const { return m_listCompletionMethod; }
|
||||||
|
|
||||||
#ifdef STC_USE_DND
|
#ifdef STC_USE_DND
|
||||||
// Kept for backwards compatibility, use GetString().
|
// Kept for backwards compatibility, use GetString().
|
||||||
wxString GetDragText() { return GetString(); }
|
wxString GetDragText() { return GetString(); }
|
||||||
@@ -5583,8 +5583,8 @@ private:
|
|||||||
int m_x;
|
int m_x;
|
||||||
int m_y;
|
int m_y;
|
||||||
|
|
||||||
int m_token; // wxEVT_STC__MODIFIED with SC_MOD_CONTAINER
|
int m_token; // wxEVT_STC__MODIFIED with SC_MOD_CONTAINER
|
||||||
int m_annotationLinesAdded; // wxEVT_STC_MODIFIED with SC_MOD_CHANGEANNOTATION
|
int m_annotationLinesAdded; // wxEVT_STC_MODIFIED with SC_MOD_CHANGEANNOTATION
|
||||||
int m_updated; // wxEVT_STC_UPDATEUI
|
int m_updated; // wxEVT_STC_UPDATEUI
|
||||||
int m_listCompletionMethod;
|
int m_listCompletionMethod;
|
||||||
|
|
||||||
|
@@ -593,7 +593,7 @@ public:
|
|||||||
wxEmptyString, wxEmptyString);
|
wxEmptyString, wxEmptyString);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// implementation only from now on
|
// implementation only from now on
|
||||||
// -------------------------------
|
// -------------------------------
|
||||||
|
|
||||||
|
@@ -407,7 +407,7 @@ protected:
|
|||||||
wxObject* GetInstance() const { return m_instance; }
|
wxObject* GetInstance() const { return m_instance; }
|
||||||
wxWindow* GetParentAsWindow() const { return m_parentAsWindow; }
|
wxWindow* GetParentAsWindow() const { return m_parentAsWindow; }
|
||||||
|
|
||||||
|
|
||||||
wxArrayString m_styleNames;
|
wxArrayString m_styleNames;
|
||||||
wxArrayInt m_styleValues;
|
wxArrayInt m_styleValues;
|
||||||
|
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
parameter - this may be changed by giving non-default flags to it, i.e. use
|
parameter - this may be changed by giving non-default flags to it, i.e. use
|
||||||
@c wxCMD_LINE_OPTION_MANDATORY to require that the option is given and
|
@c wxCMD_LINE_OPTION_MANDATORY to require that the option is given and
|
||||||
@c wxCMD_LINE_PARAM_OPTIONAL to make a parameter optional.
|
@c wxCMD_LINE_PARAM_OPTIONAL to make a parameter optional.
|
||||||
|
|
||||||
Also, @c wxCMD_LINE_PARAM_MULTIPLE may be specified if the programs accepts a
|
Also, @c wxCMD_LINE_PARAM_MULTIPLE may be specified if the programs accepts a
|
||||||
variable number of parameters - but it only can be given for the last
|
variable number of parameters - but it only can be given for the last
|
||||||
parameter in the command line description. If you use this flag, you will
|
parameter in the command line description. If you use this flag, you will
|
||||||
@@ -67,17 +67,17 @@ enum wxCmdLineEntryType
|
|||||||
{
|
{
|
||||||
/// A boolean argument of the program; e.g. @c -v to enable verbose mode.
|
/// A boolean argument of the program; e.g. @c -v to enable verbose mode.
|
||||||
wxCMD_LINE_SWITCH,
|
wxCMD_LINE_SWITCH,
|
||||||
|
|
||||||
/// An argument with an associated value; e.g. @c "-o filename" to specify
|
/// An argument with an associated value; e.g. @c "-o filename" to specify
|
||||||
/// an optional output filename.
|
/// an optional output filename.
|
||||||
wxCMD_LINE_OPTION,
|
wxCMD_LINE_OPTION,
|
||||||
|
|
||||||
/// A parameter: a required program argument.
|
/// A parameter: a required program argument.
|
||||||
wxCMD_LINE_PARAM,
|
wxCMD_LINE_PARAM,
|
||||||
|
|
||||||
/// Additional usage text. See wxCmdLineParser::AddUsageText.
|
/// Additional usage text. See wxCmdLineParser::AddUsageText.
|
||||||
wxCMD_LINE_USAGE_TEXT,
|
wxCMD_LINE_USAGE_TEXT,
|
||||||
|
|
||||||
wxCMD_LINE_NONE ///< Use this to terminate the list.
|
wxCMD_LINE_NONE ///< Use this to terminate the list.
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -126,7 +126,7 @@ struct wxCmdLineEntryDesc
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
The usual, short, name of the switch or the option.
|
The usual, short, name of the switch or the option.
|
||||||
|
|
||||||
It may contain only letters, digits and the underscores.
|
It may contain only letters, digits and the underscores.
|
||||||
This field is unused if <tt>kind == wxCMD_LINE_PARAM</tt>.
|
This field is unused if <tt>kind == wxCMD_LINE_PARAM</tt>.
|
||||||
*/
|
*/
|
||||||
@@ -135,7 +135,7 @@ struct wxCmdLineEntryDesc
|
|||||||
/**
|
/**
|
||||||
The long name for this program argument (may be empty if the option
|
The long name for this program argument (may be empty if the option
|
||||||
has no long name).
|
has no long name).
|
||||||
|
|
||||||
It may contain only letters, digits and the underscores.
|
It may contain only letters, digits and the underscores.
|
||||||
This field is unused if <tt>kind == wxCMD_LINE_PARAM</tt>.
|
This field is unused if <tt>kind == wxCMD_LINE_PARAM</tt>.
|
||||||
*/
|
*/
|
||||||
@@ -152,7 +152,7 @@ struct wxCmdLineEntryDesc
|
|||||||
See ::wxCmdLineParamType for more info.
|
See ::wxCmdLineParamType for more info.
|
||||||
*/
|
*/
|
||||||
wxCmdLineParamType type;
|
wxCmdLineParamType type;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
A combination of one or more ::wxCmdLineEntryFlags enum values.
|
A combination of one or more ::wxCmdLineEntryFlags enum values.
|
||||||
*/
|
*/
|
||||||
@@ -348,12 +348,12 @@ public:
|
|||||||
|
|
||||||
In the documentation below the following terminology is used:
|
In the documentation below the following terminology is used:
|
||||||
|
|
||||||
- @b switch: a boolean option which can be given or not, but which doesn't have
|
- @b switch: a boolean option which can be given or not, but which doesn't have
|
||||||
any value. We use the word @e switch to distinguish
|
any value. We use the word @e switch to distinguish
|
||||||
such boolean options from more generic options like those
|
such boolean options from more generic options like those
|
||||||
described below. For example, @c "-v" might be a switch
|
described below. For example, @c "-v" might be a switch
|
||||||
meaning "enable verbose mode".
|
meaning "enable verbose mode".
|
||||||
- @b option: a switch with a value associated to it.
|
- @b option: a switch with a value associated to it.
|
||||||
For example, @c "-o filename" might be an
|
For example, @c "-o filename" might be an
|
||||||
option for specifying the name of the output file.
|
option for specifying the name of the output file.
|
||||||
- @b parameter: a required program argument.
|
- @b parameter: a required program argument.
|
||||||
|
@@ -93,7 +93,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
void InsertHandler(wxXmlResourceHandler *handler);
|
void InsertHandler(wxXmlResourceHandler *handler);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Attaches an unknown control to the given panel/window/dialog.
|
Attaches an unknown control to the given panel/window/dialog.
|
||||||
Unknown controls are used in conjunction with \<object class="unknown"\>.
|
Unknown controls are used in conjunction with \<object class="unknown"\>.
|
||||||
@@ -115,7 +115,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
static void AddSubclassFactory(wxXmlSubclassFactory *factory);
|
static void AddSubclassFactory(wxXmlSubclassFactory *factory);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Compares the XRC version to the argument.
|
Compares the XRC version to the argument.
|
||||||
|
|
||||||
@@ -785,7 +785,7 @@ protected:
|
|||||||
/**
|
/**
|
||||||
After CreateResource has been called this will return the current
|
After CreateResource has been called this will return the current
|
||||||
wxXmlResource object.
|
wxXmlResource object.
|
||||||
|
|
||||||
@since 2.9.5
|
@since 2.9.5
|
||||||
*/
|
*/
|
||||||
wxXmlResource* GetResource() const;
|
wxXmlResource* GetResource() const;
|
||||||
@@ -829,6 +829,6 @@ protected:
|
|||||||
|
|
||||||
@since 2.9.5
|
@since 2.9.5
|
||||||
*/
|
*/
|
||||||
wxWindow* GetParentAsWindow() const;
|
wxWindow* GetParentAsWindow() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -337,7 +337,7 @@ wxString wxAcceleratorEntry::AsPossiblyLocalizedString(bool localized) const
|
|||||||
if ( flags & wxACCEL_RAW_CTRL )
|
if ( flags & wxACCEL_RAW_CTRL )
|
||||||
text += PossiblyLocalize(wxTRANSLATE("RawCtrl+"), localized);
|
text += PossiblyLocalize(wxTRANSLATE("RawCtrl+"), localized);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const int code = GetKeyCode();
|
const int code = GetKeyCode();
|
||||||
|
|
||||||
if ( code >= WXK_F1 && code <= WXK_F12 )
|
if ( code >= WXK_F1 && code <= WXK_F12 )
|
||||||
|
@@ -302,7 +302,7 @@ int wxAppConsoleBase::OnRun()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void wxAppConsoleBase::OnLaunched()
|
void wxAppConsoleBase::OnLaunched()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxAppConsoleBase::OnExit()
|
int wxAppConsoleBase::OnExit()
|
||||||
@@ -376,7 +376,7 @@ int wxAppConsoleBase::MainLoop()
|
|||||||
|
|
||||||
if (wxTheApp)
|
if (wxTheApp)
|
||||||
wxTheApp->OnLaunched();
|
wxTheApp->OnLaunched();
|
||||||
|
|
||||||
return m_mainLoop ? m_mainLoop->Run() : -1;
|
return m_mainLoop ? m_mainLoop->Run() : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
// keep cairo.h from defining dllimport as we're defining the symbols inside
|
// keep cairo.h from defining dllimport as we're defining the symbols inside
|
||||||
// the wx dll in order to load them dynamically.
|
// the wx dll in order to load them dynamically.
|
||||||
#define cairo_public
|
#define cairo_public
|
||||||
|
|
||||||
#include <cairo.h>
|
#include <cairo.h>
|
||||||
#include "wx/dynlib.h"
|
#include "wx/dynlib.h"
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
#define wxCAIRO_METHOD_TYPE(name) \
|
#define wxCAIRO_METHOD_TYPE(name) \
|
||||||
wxCairo##name##_t
|
wxCairo##name##_t
|
||||||
|
|
||||||
#define wxCAIRO_STATIC_METHOD_DEFINE(rettype, name, args, argnames, defret) \
|
#define wxCAIRO_STATIC_METHOD_DEFINE(rettype, name, args, argnames, defret) \
|
||||||
static wxCAIRO_METHOD_TYPE(name) name;
|
static wxCAIRO_METHOD_TYPE(name) name;
|
||||||
|
|
||||||
@@ -192,7 +192,7 @@
|
|||||||
m( HDC, cairo_win32_surface_get_dc, \
|
m( HDC, cairo_win32_surface_get_dc, \
|
||||||
(cairo_surface_t *surface), (surface), NULL )
|
(cairo_surface_t *surface), (surface), NULL )
|
||||||
#else
|
#else
|
||||||
#define wxCAIRO_PLATFORM_METHODS(m)
|
#define wxCAIRO_PLATFORM_METHODS(m)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define wxFOR_ALL_CAIRO_METHODS(m) \
|
#define wxFOR_ALL_CAIRO_METHODS(m) \
|
||||||
@@ -252,7 +252,7 @@
|
|||||||
|
|
||||||
#define wxCAIRO_DECLARE_VOIDTYPE(name, args, argnames) \
|
#define wxCAIRO_DECLARE_VOIDTYPE(name, args, argnames) \
|
||||||
wxCAIRO_DECLARE_TYPE(void, name, args, argnames, NULL)
|
wxCAIRO_DECLARE_TYPE(void, name, args, argnames, NULL)
|
||||||
|
|
||||||
wxFOR_ALL_CAIRO_VOIDMETHODS(wxCAIRO_DECLARE_VOIDTYPE)
|
wxFOR_ALL_CAIRO_VOIDMETHODS(wxCAIRO_DECLARE_VOIDTYPE)
|
||||||
wxFOR_ALL_CAIRO_METHODS(wxCAIRO_DECLARE_TYPE)
|
wxFOR_ALL_CAIRO_METHODS(wxCAIRO_DECLARE_TYPE)
|
||||||
|
|
||||||
@@ -334,7 +334,7 @@ wxCairo::wxCairo()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define wxDO_LOAD_FUNC(name, nameStr) \
|
#define wxDO_LOAD_FUNC(name, nameStr) \
|
||||||
name = (wxCAIRO_METHOD_TYPE(name))m_libCairo.RawGetSymbol(nameStr); \
|
name = (wxCAIRO_METHOD_TYPE(name))m_libCairo.RawGetSymbol(nameStr); \
|
||||||
if ( !name ) \
|
if ( !name ) \
|
||||||
|
@@ -850,11 +850,11 @@ int wxCmdLineParser::Parse(bool showUsage)
|
|||||||
{
|
{
|
||||||
maybeOption = false;
|
maybeOption = false;
|
||||||
n++;
|
n++;
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// empty argument or just '-' is not an option but a parameter
|
// empty argument or just '-' is not an option but a parameter
|
||||||
if ( maybeOption && arg.length() > 1 &&
|
if ( maybeOption && arg.length() > 1 &&
|
||||||
// FIXME-UTF8: use wc_str() after removing ANSI build
|
// FIXME-UTF8: use wc_str() after removing ANSI build
|
||||||
|
@@ -2078,7 +2078,7 @@ void wxComboCtrlBase::OnFocusEvent( wxFocusEvent& event )
|
|||||||
{
|
{
|
||||||
// On Mac, setting focus here led to infinite recursion so
|
// On Mac, setting focus here led to infinite recursion so
|
||||||
// m_resetFocus is used as a guard
|
// m_resetFocus is used as a guard
|
||||||
|
|
||||||
if ( event.GetEventType() == wxEVT_SET_FOCUS )
|
if ( event.GetEventType() == wxEVT_SET_FOCUS )
|
||||||
{
|
{
|
||||||
if ( !m_resetFocus && GetTextCtrl() && !GetTextCtrl()->HasFocus() )
|
if ( !m_resetFocus && GetTextCtrl() && !GetTextCtrl()->HasFocus() )
|
||||||
@@ -2088,7 +2088,7 @@ void wxComboCtrlBase::OnFocusEvent( wxFocusEvent& event )
|
|||||||
m_resetFocus = false;
|
m_resetFocus = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Refresh();
|
Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -275,7 +275,7 @@ struct EllipsizeCalculator
|
|||||||
{
|
{
|
||||||
EllipsizeCalculator(const wxString& s, const wxDC& dc,
|
EllipsizeCalculator(const wxString& s, const wxDC& dc,
|
||||||
int maxFinalWidthPx, int replacementWidthPx)
|
int maxFinalWidthPx, int replacementWidthPx)
|
||||||
:
|
:
|
||||||
m_initialCharToRemove(0),
|
m_initialCharToRemove(0),
|
||||||
m_nCharsToRemove(0),
|
m_nCharsToRemove(0),
|
||||||
m_outputNeedsUpdate(true),
|
m_outputNeedsUpdate(true),
|
||||||
@@ -522,7 +522,7 @@ wxString wxControlBase::Ellipsize(const wxString& label, const wxDC& dc,
|
|||||||
{
|
{
|
||||||
if (mode == wxELLIPSIZE_NONE)
|
if (mode == wxELLIPSIZE_NONE)
|
||||||
return label;
|
return label;
|
||||||
|
|
||||||
wxString ret;
|
wxString ret;
|
||||||
|
|
||||||
// these cannot be cached between different Ellipsize() calls as they can
|
// these cannot be cached between different Ellipsize() calls as they can
|
||||||
|
@@ -806,7 +806,7 @@ wxString wxMacFSRefToPath( const FSRef *fsRef , CFStringRef additionalPathCompon
|
|||||||
fullURLRef = CFURLCreateFromFSRef(NULL, fsRef);
|
fullURLRef = CFURLCreateFromFSRef(NULL, fsRef);
|
||||||
if ( fullURLRef == NULL)
|
if ( fullURLRef == NULL)
|
||||||
return wxEmptyString;
|
return wxEmptyString;
|
||||||
|
|
||||||
if ( additionalPathComponent )
|
if ( additionalPathComponent )
|
||||||
{
|
{
|
||||||
CFURLRef parentURLRef = fullURLRef ;
|
CFURLRef parentURLRef = fullURLRef ;
|
||||||
|
@@ -634,7 +634,7 @@ void RemoveTrailingSeparatorsFromPath(wxString& strPath)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // __WINDOWS_
|
#endif // __WINDOWS_
|
||||||
|
|
||||||
bool
|
bool
|
||||||
wxFileSystemObjectExists(const wxString& path, int flags)
|
wxFileSystemObjectExists(const wxString& path, int flags)
|
||||||
|
@@ -125,7 +125,7 @@ wxCONSTRUCTOR_5( wxListCtrl, wxWindow*, Parent, wxWindowID, Id, \
|
|||||||
wxPoint, Position, wxSize, Size, long, WindowStyle )
|
wxPoint, Position, wxSize, Size, long, WindowStyle )
|
||||||
|
|
||||||
/*
|
/*
|
||||||
TODO : Expose more information of a list's layout etc. via appropriate objects
|
TODO : Expose more information of a list's layout etc. via appropriate objects
|
||||||
(see NotebookPageInfo)
|
(see NotebookPageInfo)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@@ -137,13 +137,13 @@ wxEND_EVENT_TABLE()
|
|||||||
|
|
||||||
#if wxUSE_EXTENDED_RTTI
|
#if wxUSE_EXTENDED_RTTI
|
||||||
|
|
||||||
// windows that are created from a parent window during its Create method,
|
// windows that are created from a parent window during its Create method,
|
||||||
// eg. spin controls in a calendar controls must never been streamed out
|
// eg. spin controls in a calendar controls must never been streamed out
|
||||||
// separately otherwise chaos occurs. Right now easiest is to test for negative ids,
|
// separately otherwise chaos occurs. Right now easiest is to test for negative ids,
|
||||||
// as windows with negative ids never can be recreated anyway
|
// as windows with negative ids never can be recreated anyway
|
||||||
|
|
||||||
|
|
||||||
bool wxWindowStreamingCallback( const wxObject *object, wxObjectWriter *,
|
bool wxWindowStreamingCallback( const wxObject *object, wxObjectWriter *,
|
||||||
wxObjectWriterCallback *, const wxStringToAnyHashMap & )
|
wxObjectWriterCallback *, const wxStringToAnyHashMap & )
|
||||||
{
|
{
|
||||||
const wxWindow * win = wx_dynamic_cast(const wxWindow*, object);
|
const wxWindow * win = wx_dynamic_cast(const wxWindow*, object);
|
||||||
@@ -159,7 +159,7 @@ wxIMPLEMENT_DYNAMIC_CLASS_XTI_CALLBACK(wxWindow, wxWindowBase, "wx/window.h", \
|
|||||||
|
|
||||||
wxCOLLECTION_TYPE_INFO( wxWindow*, wxWindowList );
|
wxCOLLECTION_TYPE_INFO( wxWindow*, wxWindowList );
|
||||||
|
|
||||||
template<> void wxCollectionToVariantArray( wxWindowList const &theList,
|
template<> void wxCollectionToVariantArray( wxWindowList const &theList,
|
||||||
wxAnyList &value)
|
wxAnyList &value)
|
||||||
{
|
{
|
||||||
wxListCollectionToAnyList<wxWindowList::compatibility_iterator>( theList, value );
|
wxListCollectionToAnyList<wxWindowList::compatibility_iterator>( theList, value );
|
||||||
|
@@ -426,7 +426,7 @@ bool wxGenericDirCtrl::Create(wxWindow *parent,
|
|||||||
// instead of scaling.
|
// instead of scaling.
|
||||||
// if (!wxTheFileIconsTable->IsOk())
|
// if (!wxTheFileIconsTable->IsOk())
|
||||||
// wxTheFileIconsTable->SetSize(scaledSize);
|
// wxTheFileIconsTable->SetSize(scaledSize);
|
||||||
|
|
||||||
// Meanwhile, in your application initialisation, where you have better knowledge of what
|
// Meanwhile, in your application initialisation, where you have better knowledge of what
|
||||||
// icons are available and whether to scale, you can do this:
|
// icons are available and whether to scale, you can do this:
|
||||||
//
|
//
|
||||||
@@ -1608,7 +1608,7 @@ int wxFileIconsTable::GetIconID(const wxString& extension, const wxString& mime)
|
|||||||
{
|
{
|
||||||
// Double, using normal quality scaling.
|
// Double, using normal quality scaling.
|
||||||
img.Rescale(2*img.GetWidth(), 2*img.GetHeight());
|
img.Rescale(2*img.GetWidth(), 2*img.GetHeight());
|
||||||
|
|
||||||
// Then scale to the desired size. This gives the best quality,
|
// Then scale to the desired size. This gives the best quality,
|
||||||
// and better than CreateAntialiasedBitmap.
|
// and better than CreateAntialiasedBitmap.
|
||||||
if ((img.GetWidth() != size) || (img.GetHeight() != size))
|
if ((img.GetWidth() != size) || (img.GetHeight() != size))
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
// keep cairo.h from defining dllimport as we're defining the symbols inside
|
// keep cairo.h from defining dllimport as we're defining the symbols inside
|
||||||
// the wx dll in order to load them dynamically.
|
// the wx dll in order to load them dynamically.
|
||||||
#define cairo_public
|
#define cairo_public
|
||||||
|
|
||||||
#include <cairo.h>
|
#include <cairo.h>
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
@@ -440,7 +440,7 @@ public:
|
|||||||
{
|
{
|
||||||
if ( !m_enableOffset )
|
if ( !m_enableOffset )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
int penwidth = 0 ;
|
int penwidth = 0 ;
|
||||||
if ( !m_pen.IsNull() )
|
if ( !m_pen.IsNull() )
|
||||||
{
|
{
|
||||||
@@ -478,7 +478,7 @@ public:
|
|||||||
virtual void FillPath( const wxGraphicsPath& p , wxPolygonFillMode fillStyle = wxWINDING_RULE ) wxOVERRIDE;
|
virtual void FillPath( const wxGraphicsPath& p , wxPolygonFillMode fillStyle = wxWINDING_RULE ) wxOVERRIDE;
|
||||||
virtual void ClearRectangle( wxDouble x, wxDouble y, wxDouble w, wxDouble h ) wxOVERRIDE;
|
virtual void ClearRectangle( wxDouble x, wxDouble y, wxDouble w, wxDouble h ) wxOVERRIDE;
|
||||||
virtual void DrawRectangle( wxDouble x, wxDouble y, wxDouble w, wxDouble h) wxOVERRIDE;
|
virtual void DrawRectangle( wxDouble x, wxDouble y, wxDouble w, wxDouble h) wxOVERRIDE;
|
||||||
|
|
||||||
virtual void Translate( wxDouble dx , wxDouble dy ) wxOVERRIDE;
|
virtual void Translate( wxDouble dx , wxDouble dy ) wxOVERRIDE;
|
||||||
virtual void Scale( wxDouble xScale , wxDouble yScale ) wxOVERRIDE;
|
virtual void Scale( wxDouble xScale , wxDouble yScale ) wxOVERRIDE;
|
||||||
virtual void Rotate( wxDouble angle ) wxOVERRIDE;
|
virtual void Rotate( wxDouble angle ) wxOVERRIDE;
|
||||||
@@ -1544,7 +1544,7 @@ wxCairoBitmapData::wxCairoBitmapData( wxGraphicsRenderer* renderer, const wxBitm
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__WXMSW__) || defined(__WXGTK3__) || defined(__WXOSX__)
|
#if defined(__WXMSW__) || defined(__WXGTK3__) || defined(__WXOSX__)
|
||||||
// if there is a mask, set the alpha bytes in the target buffer to
|
// if there is a mask, set the alpha bytes in the target buffer to
|
||||||
// fully transparent or fully opaque
|
// fully transparent or fully opaque
|
||||||
#if defined(__WXMSW__)
|
#if defined(__WXMSW__)
|
||||||
if (bmp.GetMask() != NULL && !bmp.HasAlpha())
|
if (bmp.GetMask() != NULL && !bmp.HasAlpha())
|
||||||
@@ -1782,7 +1782,7 @@ wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, const wxPrinterDC&
|
|||||||
: wxGraphicsContext(renderer)
|
: wxGraphicsContext(renderer)
|
||||||
{
|
{
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
// wxMSW contexts always use MM_ANISOTROPIC, which messes up
|
// wxMSW contexts always use MM_ANISOTROPIC, which messes up
|
||||||
// text rendering when printing using Cairo. Switch it to MM_TEXT
|
// text rendering when printing using Cairo. Switch it to MM_TEXT
|
||||||
// map mode to avoid this problem.
|
// map mode to avoid this problem.
|
||||||
HDC hdc = (HDC)dc.GetHDC();
|
HDC hdc = (HDC)dc.GetHDC();
|
||||||
@@ -2045,7 +2045,7 @@ wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, const wxMemoryDC&
|
|||||||
if ( adjustTransformFromDC )
|
if ( adjustTransformFromDC )
|
||||||
ApplyTransformFromDC(dc);
|
ApplyTransformFromDC(dc);
|
||||||
#endif // __WXMSW__
|
#endif // __WXMSW__
|
||||||
|
|
||||||
#ifdef __WXGTK3__
|
#ifdef __WXGTK3__
|
||||||
cairo_t* cr = static_cast<cairo_t*>(dc.GetImpl()->GetCairoContext());
|
cairo_t* cr = static_cast<cairo_t*>(dc.GetImpl()->GetCairoContext());
|
||||||
Init(cr ? cairo_reference(cr) : NULL);
|
Init(cr ? cairo_reference(cr) : NULL);
|
||||||
|
@@ -151,7 +151,7 @@ wxDEFINE_EVENT( wxEVT_GRID_TABBING, wxGridEvent );
|
|||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
|
|
||||||
// ensure that first is less or equal to second, swapping the values if
|
// ensure that first is less or equal to second, swapping the values if
|
||||||
// necessary
|
// necessary
|
||||||
void EnsureFirstLessThanSecond(int& first, int& second)
|
void EnsureFirstLessThanSecond(int& first, int& second)
|
||||||
@@ -159,7 +159,7 @@ namespace
|
|||||||
if ( first > second )
|
if ( first > second )
|
||||||
wxSwap(first, second);
|
wxSwap(first, second);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // anonymous namespace
|
} // anonymous namespace
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
@@ -3941,7 +3941,7 @@ wxGrid::DoGridCellDrag(wxMouseEvent& event,
|
|||||||
bool isFirstDrag)
|
bool isFirstDrag)
|
||||||
{
|
{
|
||||||
bool performDefault = true ;
|
bool performDefault = true ;
|
||||||
|
|
||||||
if ( coords == wxGridNoCellCoords )
|
if ( coords == wxGridNoCellCoords )
|
||||||
return performDefault; // we're outside any valid cell
|
return performDefault; // we're outside any valid cell
|
||||||
|
|
||||||
@@ -3973,7 +3973,7 @@ wxGrid::DoGridCellDrag(wxMouseEvent& event,
|
|||||||
// if event is handled by user code, no further processing
|
// if event is handled by user code, no further processing
|
||||||
if ( SendEvent(wxEVT_GRID_CELL_BEGIN_DRAG, coords, event) != 0 )
|
if ( SendEvent(wxEVT_GRID_CELL_BEGIN_DRAG, coords, event) != 0 )
|
||||||
performDefault = false;
|
performDefault = false;
|
||||||
|
|
||||||
return performDefault;
|
return performDefault;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3985,7 +3985,7 @@ wxGrid::DoGridCellDrag(wxMouseEvent& event,
|
|||||||
// we don't handle the other key modifiers
|
// we don't handle the other key modifiers
|
||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
return performDefault;
|
return performDefault;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4700,7 +4700,7 @@ wxGrid::SendEvent(wxEventType type,
|
|||||||
// explicitly allow the event for it to take place
|
// explicitly allow the event for it to take place
|
||||||
gridEvt.Veto();
|
gridEvt.Veto();
|
||||||
}
|
}
|
||||||
|
|
||||||
claimed = GetEventHandler()->ProcessEvent(gridEvt);
|
claimed = GetEventHandler()->ProcessEvent(gridEvt);
|
||||||
vetoed = !gridEvt.IsAllowed();
|
vetoed = !gridEvt.IsAllowed();
|
||||||
}
|
}
|
||||||
|
@@ -5219,11 +5219,11 @@ void wxDataViewCtrl::HitTest(const wxPoint& point,
|
|||||||
GtkTreeViewDropPosition pos = GTK_TREE_VIEW_DROP_INTO_OR_AFTER;
|
GtkTreeViewDropPosition pos = GTK_TREE_VIEW_DROP_INTO_OR_AFTER;
|
||||||
gint cell_x = 0;
|
gint cell_x = 0;
|
||||||
gint cell_y = 0;
|
gint cell_y = 0;
|
||||||
|
|
||||||
// cannot directly call GtkGetTreeView(), HitTest is const and so is this pointer
|
// cannot directly call GtkGetTreeView(), HitTest is const and so is this pointer
|
||||||
wxDataViewCtrl* self = const_cast<wxDataViewCtrl *>(this); // ugly workaround, self is NOT const
|
wxDataViewCtrl* self = const_cast<wxDataViewCtrl *>(this); // ugly workaround, self is NOT const
|
||||||
GtkTreeView* treeView = GTK_TREE_VIEW(self->GtkGetTreeView());
|
GtkTreeView* treeView = GTK_TREE_VIEW(self->GtkGetTreeView());
|
||||||
|
|
||||||
// is there possibly a better suited function to get the column?
|
// is there possibly a better suited function to get the column?
|
||||||
gtk_tree_view_get_path_at_pos( // and this is the wrong call but it delivers the column
|
gtk_tree_view_get_path_at_pos( // and this is the wrong call but it delivers the column
|
||||||
treeView,
|
treeView,
|
||||||
@@ -5232,13 +5232,13 @@ void wxDataViewCtrl::HitTest(const wxPoint& point,
|
|||||||
&GtkColumn, // here we get the GtkColumn
|
&GtkColumn, // here we get the GtkColumn
|
||||||
&cell_x,
|
&cell_x,
|
||||||
&cell_y );
|
&cell_y );
|
||||||
|
|
||||||
if ( GtkColumn != NULL )
|
if ( GtkColumn != NULL )
|
||||||
{
|
{
|
||||||
// we got GTK column
|
// we got GTK column
|
||||||
// the right call now which takes the header into account
|
// the right call now which takes the header into account
|
||||||
gtk_tree_view_get_dest_row_at_pos( treeView, (int) point.x, (int) point.y, path.ByRef(), &pos);
|
gtk_tree_view_get_dest_row_at_pos( treeView, (int) point.x, (int) point.y, path.ByRef(), &pos);
|
||||||
|
|
||||||
if (path)
|
if (path)
|
||||||
item = wxDataViewItem(GTKPathToItem(path));
|
item = wxDataViewItem(GTKPathToItem(path));
|
||||||
// else we got a GTK column but the position is not over an item, e.g. below last item
|
// else we got a GTK column but the position is not over an item, e.g. below last item
|
||||||
|
@@ -463,7 +463,7 @@ int wxRichTextFloatCollector::HitTestFloat(const wxRichTextFloatRectMapArray& ar
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
textPosition = array[i]->anchor->GetRange().GetStart();
|
textPosition = array[i]->anchor->GetRange().GetStart();
|
||||||
* obj = array[i]->anchor;
|
* obj = array[i]->anchor;
|
||||||
* contextObj = array[i]->anchor->GetParentContainer();
|
* contextObj = array[i]->anchor->GetParentContainer();
|
||||||
@@ -1679,31 +1679,31 @@ bool wxRichTextCompositeObject::Defragment(wxRichTextDrawingContext& context, co
|
|||||||
if (child->CanSplit(context))
|
if (child->CanSplit(context))
|
||||||
{
|
{
|
||||||
childAfterSplit = child->Split(context);
|
childAfterSplit = child->Split(context);
|
||||||
node = m_children.Find(childAfterSplit);
|
node = m_children.Find(childAfterSplit);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (node->GetNext())
|
if (node->GetNext())
|
||||||
{
|
{
|
||||||
wxRichTextObject* nextChild = node->GetNext()->GetData();
|
wxRichTextObject* nextChild = node->GetNext()->GetData();
|
||||||
|
|
||||||
// First split child and nextChild so we have smaller fragments to merge.
|
// First split child and nextChild so we have smaller fragments to merge.
|
||||||
// Then Merge only has to test per-object virtual attributes
|
// Then Merge only has to test per-object virtual attributes
|
||||||
// because for an object with all the same sub-object attributes,
|
// because for an object with all the same sub-object attributes,
|
||||||
// then any general virtual attributes should be merged with sub-objects by
|
// then any general virtual attributes should be merged with sub-objects by
|
||||||
// the implementation.
|
// the implementation.
|
||||||
|
|
||||||
wxRichTextObject* nextChildAfterSplit = nextChild;
|
wxRichTextObject* nextChildAfterSplit = nextChild;
|
||||||
|
|
||||||
if (nextChildAfterSplit->CanSplit(context))
|
if (nextChildAfterSplit->CanSplit(context))
|
||||||
nextChildAfterSplit = nextChild->Split(context);
|
nextChildAfterSplit = nextChild->Split(context);
|
||||||
|
|
||||||
bool splitNextChild = nextChild != nextChildAfterSplit;
|
bool splitNextChild = nextChild != nextChildAfterSplit;
|
||||||
|
|
||||||
// See if we can merge this new fragment with (perhaps the first part of) the next object.
|
// See if we can merge this new fragment with (perhaps the first part of) the next object.
|
||||||
// Note that we use nextChild because if we had split nextChild, the first object always
|
// Note that we use nextChild because if we had split nextChild, the first object always
|
||||||
// remains (and further parts are appended). However we must use childAfterSplit since
|
// remains (and further parts are appended). However we must use childAfterSplit since
|
||||||
// it's the last part of a possibly split child.
|
// it's the last part of a possibly split child.
|
||||||
|
|
||||||
if (childAfterSplit->CanMerge(nextChild, context) && childAfterSplit->Merge(nextChild, context))
|
if (childAfterSplit->CanMerge(nextChild, context) && childAfterSplit->Merge(nextChild, context))
|
||||||
{
|
{
|
||||||
nextChild->Dereference();
|
nextChild->Dereference();
|
||||||
@@ -2107,7 +2107,7 @@ bool wxRichTextParagraphLayoutBox::Draw(wxDC& dc, wxRichTextDrawingContext& cont
|
|||||||
|
|
||||||
if (wxRichTextBuffer::GetFloatingLayoutMode())
|
if (wxRichTextBuffer::GetFloatingLayoutMode())
|
||||||
DrawFloats(dc, context, range, selection, rect, descent, style);
|
DrawFloats(dc, context, range, selection, rect, descent, style);
|
||||||
|
|
||||||
wxRichTextObjectList::compatibility_iterator node = m_children.GetFirst();
|
wxRichTextObjectList::compatibility_iterator node = m_children.GetFirst();
|
||||||
while (node)
|
while (node)
|
||||||
{
|
{
|
||||||
@@ -2324,7 +2324,7 @@ bool wxRichTextParagraphLayoutBox::Layout(wxDC& dc, wxRichTextDrawingContext& co
|
|||||||
|
|
||||||
child->LayoutToBestSize(dc, context, GetBuffer(),
|
child->LayoutToBestSize(dc, context, GetBuffer(),
|
||||||
attr, child->GetAttributes(), availableSpace, rect, style&~wxRICHTEXT_LAYOUT_SPECIFIED_RECT);
|
attr, child->GetAttributes(), availableSpace, rect, style&~wxRICHTEXT_LAYOUT_SPECIFIED_RECT);
|
||||||
|
|
||||||
availableSpace.y += child->GetCachedSize().y;
|
availableSpace.y += child->GetCachedSize().y;
|
||||||
maxWidth = wxMax(maxWidth, child->GetCachedSize().x);
|
maxWidth = wxMax(maxWidth, child->GetCachedSize().x);
|
||||||
maxMinWidth = wxMax(maxMinWidth, child->GetMinSize().x);
|
maxMinWidth = wxMax(maxMinWidth, child->GetMinSize().x);
|
||||||
@@ -5431,7 +5431,7 @@ bool wxRichTextParagraph::Layout(wxDC& dc, wxRichTextDrawingContext& context, co
|
|||||||
int startOffset = (lineCount == 0 ? startPositionFirstLine : startPositionSubsequentLines);
|
int startOffset = (lineCount == 0 ? startPositionFirstLine : startPositionSubsequentLines);
|
||||||
availableRect = wxRect(rect.x + startOffset, rect.y + currentPosition.y,
|
availableRect = wxRect(rect.x + startOffset, rect.y + currentPosition.y,
|
||||||
rect.width - startOffset - rightIndent, rect.height);
|
rect.width - startOffset - rightIndent, rect.height);
|
||||||
|
|
||||||
// Take into account floating objects for the last line
|
// Take into account floating objects for the last line
|
||||||
if (wxRichTextBuffer::GetFloatingLayoutMode() && collector)
|
if (wxRichTextBuffer::GetFloatingLayoutMode() && collector)
|
||||||
{
|
{
|
||||||
@@ -5460,7 +5460,7 @@ bool wxRichTextParagraph::Layout(wxDC& dc, wxRichTextDrawingContext& context, co
|
|||||||
wxCheckSetFont(dc, font);
|
wxCheckSetFont(dc, font);
|
||||||
lineHeight = dc.GetCharHeight();
|
lineHeight = dc.GetCharHeight();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (maxDescent == 0)
|
if (maxDescent == 0)
|
||||||
{
|
{
|
||||||
int w, h;
|
int w, h;
|
||||||
@@ -7446,13 +7446,13 @@ bool wxRichTextPlainText::CanMerge(wxRichTextObject* object, wxRichTextDrawingCo
|
|||||||
wxRichTextPlainText* otherObj = wxDynamicCast(object, wxRichTextPlainText);
|
wxRichTextPlainText* otherObj = wxDynamicCast(object, wxRichTextPlainText);
|
||||||
if (!otherObj || m_text.empty())
|
if (!otherObj || m_text.empty())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!wxTextAttrEq(GetAttributes(), object->GetAttributes()) || !(m_properties == object->GetProperties()))
|
if (!wxTextAttrEq(GetAttributes(), object->GetAttributes()) || !(m_properties == object->GetProperties()))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Check if differing virtual attributes makes it impossible to merge
|
// Check if differing virtual attributes makes it impossible to merge
|
||||||
// these strings.
|
// these strings.
|
||||||
|
|
||||||
bool hasVirtualAttr1 = context.HasVirtualAttributes((wxRichTextObject*) this);
|
bool hasVirtualAttr1 = context.HasVirtualAttributes((wxRichTextObject*) this);
|
||||||
bool hasVirtualAttr2 = context.HasVirtualAttributes((wxRichTextObject*) object);
|
bool hasVirtualAttr2 = context.HasVirtualAttributes((wxRichTextObject*) object);
|
||||||
if (!hasVirtualAttr1 && !hasVirtualAttr2)
|
if (!hasVirtualAttr1 && !hasVirtualAttr2)
|
||||||
@@ -7504,18 +7504,18 @@ wxRichTextObject* wxRichTextPlainText::Split(wxRichTextDrawingContext& context)
|
|||||||
{
|
{
|
||||||
const wxRichTextAttr emptyAttr;
|
const wxRichTextAttr emptyAttr;
|
||||||
wxRichTextObjectList::compatibility_iterator next = node->GetNext();
|
wxRichTextObjectList::compatibility_iterator next = node->GetNext();
|
||||||
|
|
||||||
wxArrayInt positions;
|
wxArrayInt positions;
|
||||||
wxRichTextAttrArray attributes;
|
wxRichTextAttrArray attributes;
|
||||||
if (context.GetVirtualSubobjectAttributes(this, positions, attributes) && positions.GetCount() > 0)
|
if (context.GetVirtualSubobjectAttributes(this, positions, attributes) && positions.GetCount() > 0)
|
||||||
{
|
{
|
||||||
wxASSERT(positions.GetCount() == attributes.GetCount());
|
wxASSERT(positions.GetCount() == attributes.GetCount());
|
||||||
|
|
||||||
// We will gather up runs of text with the same virtual attributes
|
// We will gather up runs of text with the same virtual attributes
|
||||||
|
|
||||||
int len = m_text.Length();
|
int len = m_text.Length();
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
// runStart and runEnd represent the accumulated run with a consistent attribute
|
// runStart and runEnd represent the accumulated run with a consistent attribute
|
||||||
// that hasn't yet been appended
|
// that hasn't yet been appended
|
||||||
int runStart = -1;
|
int runStart = -1;
|
||||||
@@ -7523,7 +7523,7 @@ wxRichTextObject* wxRichTextPlainText::Split(wxRichTextDrawingContext& context)
|
|||||||
wxRichTextAttr currentAttr;
|
wxRichTextAttr currentAttr;
|
||||||
wxString text = m_text;
|
wxString text = m_text;
|
||||||
wxRichTextPlainText* lastPlainText = this;
|
wxRichTextPlainText* lastPlainText = this;
|
||||||
|
|
||||||
for (i = 0; i < (int) positions.GetCount(); i++)
|
for (i = 0; i < (int) positions.GetCount(); i++)
|
||||||
{
|
{
|
||||||
int pos = positions[i];
|
int pos = positions[i];
|
||||||
@@ -7531,7 +7531,7 @@ wxRichTextObject* wxRichTextPlainText::Split(wxRichTextDrawingContext& context)
|
|||||||
if (pos >= 0 && pos < len)
|
if (pos >= 0 && pos < len)
|
||||||
{
|
{
|
||||||
const wxRichTextAttr& attr = attributes[i];
|
const wxRichTextAttr& attr = attributes[i];
|
||||||
|
|
||||||
if (pos == 0)
|
if (pos == 0)
|
||||||
{
|
{
|
||||||
runStart = 0;
|
runStart = 0;
|
||||||
@@ -7578,7 +7578,7 @@ wxRichTextObject* wxRichTextPlainText::Split(wxRichTextDrawingContext& context)
|
|||||||
else
|
else
|
||||||
parent->GetChildren().Append(obj);
|
parent->GetChildren().Append(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
runStart = runEnd+1;
|
runStart = runEnd+1;
|
||||||
runEnd = pos-1;
|
runEnd = pos-1;
|
||||||
|
|
||||||
@@ -7586,7 +7586,7 @@ wxRichTextObject* wxRichTextPlainText::Split(wxRichTextDrawingContext& context)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wxASSERT(runEnd == pos-1);
|
wxASSERT(runEnd == pos-1);
|
||||||
|
|
||||||
// Now we only have to deal with the previous run
|
// Now we only have to deal with the previous run
|
||||||
@@ -7629,7 +7629,7 @@ wxRichTextObject* wxRichTextPlainText::Split(wxRichTextDrawingContext& context)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// We may still have a run to add, and possibly a no-attribute text fragment after that.
|
// We may still have a run to add, and possibly a no-attribute text fragment after that.
|
||||||
// If the whole string was already a single attribute (the run covers the whole string), don't split.
|
// If the whole string was already a single attribute (the run covers the whole string), don't split.
|
||||||
if ((runStart != -1) && !(runStart == 0 && runEnd == (len-1)))
|
if ((runStart != -1) && !(runStart == 0 && runEnd == (len-1)))
|
||||||
@@ -7654,14 +7654,14 @@ wxRichTextObject* wxRichTextPlainText::Split(wxRichTextDrawingContext& context)
|
|||||||
obj->SetAttributes(GetAttributes());
|
obj->SetAttributes(GetAttributes());
|
||||||
obj->SetProperties(GetProperties());
|
obj->SetProperties(GetProperties());
|
||||||
obj->SetParent(parent);
|
obj->SetParent(parent);
|
||||||
|
|
||||||
obj->SetText(text.Mid(runStart, runEnd - runStart + 1));
|
obj->SetText(text.Mid(runStart, runEnd - runStart + 1));
|
||||||
if (next)
|
if (next)
|
||||||
parent->GetChildren().Insert(next, obj);
|
parent->GetChildren().Insert(next, obj);
|
||||||
else
|
else
|
||||||
parent->GetChildren().Append(obj);
|
parent->GetChildren().Append(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
runStart = runEnd+1;
|
runStart = runEnd+1;
|
||||||
runEnd = (len-1);
|
runEnd = (len-1);
|
||||||
}
|
}
|
||||||
@@ -7675,17 +7675,17 @@ wxRichTextObject* wxRichTextPlainText::Split(wxRichTextDrawingContext& context)
|
|||||||
obj->SetAttributes(GetAttributes());
|
obj->SetAttributes(GetAttributes());
|
||||||
obj->SetProperties(GetProperties());
|
obj->SetProperties(GetProperties());
|
||||||
obj->SetParent(parent);
|
obj->SetParent(parent);
|
||||||
|
|
||||||
obj->SetText(text.Mid(runStart, runEnd - runStart + 1));
|
obj->SetText(text.Mid(runStart, runEnd - runStart + 1));
|
||||||
if (next)
|
if (next)
|
||||||
parent->GetChildren().Insert(next, obj);
|
parent->GetChildren().Insert(next, obj);
|
||||||
else
|
else
|
||||||
parent->GetChildren().Append(obj);
|
parent->GetChildren().Append(obj);
|
||||||
|
|
||||||
lastPlainText = obj;
|
lastPlainText = obj;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return lastPlainText;
|
return lastPlainText;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8892,7 +8892,7 @@ bool wxRichTextBuffer::PasteFromClipboard(long position)
|
|||||||
if (richTextBuffer->GetStyleSheet())
|
if (richTextBuffer->GetStyleSheet())
|
||||||
{
|
{
|
||||||
delete richTextBuffer->GetStyleSheet();
|
delete richTextBuffer->GetStyleSheet();
|
||||||
richTextBuffer->SetStyleSheet(NULL);
|
richTextBuffer->SetStyleSheet(NULL);
|
||||||
}
|
}
|
||||||
delete richTextBuffer;
|
delete richTextBuffer;
|
||||||
}
|
}
|
||||||
@@ -9934,7 +9934,7 @@ bool wxRichTextCell::EditProperties(wxWindow* parent, wxRichTextBuffer* buffer)
|
|||||||
wxRichTextSelection sel;
|
wxRichTextSelection sel;
|
||||||
if (buffer && buffer->GetRichTextCtrl())
|
if (buffer && buffer->GetRichTextCtrl())
|
||||||
sel = buffer->GetRichTextCtrl()->GetSelection();
|
sel = buffer->GetRichTextCtrl()->GetSelection();
|
||||||
|
|
||||||
if (table && buffer && buffer->GetRichTextCtrl() && sel.IsValid() &&
|
if (table && buffer && buffer->GetRichTextCtrl() && sel.IsValid() &&
|
||||||
sel.GetContainer() == GetParent())
|
sel.GetContainer() == GetParent())
|
||||||
{
|
{
|
||||||
@@ -10112,7 +10112,7 @@ int GetRowspanDisplacement(const wxRichTextTable* table, int row, int col, int p
|
|||||||
// will have been hidden and have width 0. As a result they are ignored by the layout algorithm,
|
// will have been hidden and have width 0. As a result they are ignored by the layout algorithm,
|
||||||
// and all cells to their right are effectively shifted left. As a result there's no hole for
|
// and all cells to their right are effectively shifted left. As a result there's no hole for
|
||||||
// the spanning cell to fill.
|
// the spanning cell to fill.
|
||||||
// So search back along the current row for hidden cells. However there's also the annoying issue of a
|
// So search back along the current row for hidden cells. However there's also the annoying issue of a
|
||||||
// rowspanning cell that also has colspam. So we can't rely on the rowspanning cell being directly above
|
// rowspanning cell that also has colspam. So we can't rely on the rowspanning cell being directly above
|
||||||
// the first hidden one we come to. We also can't rely on a cell being hidden only by one type of span;
|
// the first hidden one we come to. We also can't rely on a cell being hidden only by one type of span;
|
||||||
// there's nothing to stop a cell being hidden by colspan, and then again hidden from above by rowspan.
|
// there's nothing to stop a cell being hidden by colspan, and then again hidden from above by rowspan.
|
||||||
@@ -10133,7 +10133,7 @@ int GetRowspanDisplacement(const wxRichTextTable* table, int row, int col, int p
|
|||||||
if (rowSpan > 1 && rowSpan > (row-prevrow))
|
if (rowSpan > 1 && rowSpan > (row-prevrow))
|
||||||
{
|
{
|
||||||
// There is a rowspanning cell above above the hidden one, so we need
|
// There is a rowspanning cell above above the hidden one, so we need
|
||||||
// to right-shift the index cell by this column's width. Furthermore,
|
// to right-shift the index cell by this column's width. Furthermore,
|
||||||
// if the cell also colspans, we need to shift by all affected columns
|
// if the cell also colspans, we need to shift by all affected columns
|
||||||
for (int colSpan = 0; colSpan < cell->GetColSpan(); ++colSpan)
|
for (int colSpan = 0; colSpan < cell->GetColSpan(); ++colSpan)
|
||||||
deltaX += (colWidths[prevcol+colSpan] + paddingX);
|
deltaX += (colWidths[prevcol+colSpan] + paddingX);
|
||||||
@@ -10152,7 +10152,7 @@ void ExpandCellsWithRowspan(const wxRichTextTable* table, int paddingY, int& bot
|
|||||||
{
|
{
|
||||||
// This is called when the table's cell layout is otherwise complete.
|
// This is called when the table's cell layout is otherwise complete.
|
||||||
// For any cell with rowspan > 1, expand downwards into the row(s) below.
|
// For any cell with rowspan > 1, expand downwards into the row(s) below.
|
||||||
|
|
||||||
// Start by finding the current 'y' of the top of each row, plus the bottom of the available area for cells.
|
// Start by finding the current 'y' of the top of each row, plus the bottom of the available area for cells.
|
||||||
// Deduce this from the top of a visible cell in the row below. (If none are visible, the row will be invisible anyway and can be ignored.)
|
// Deduce this from the top of a visible cell in the row below. (If none are visible, the row will be invisible anyway and can be ignored.)
|
||||||
const int rowCount = table->GetRowCount();
|
const int rowCount = table->GetRowCount();
|
||||||
@@ -10173,7 +10173,7 @@ void ExpandCellsWithRowspan(const wxRichTextTable* table, int paddingY, int& bot
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
rowTops[rowCount] = bottomY + paddingY; // The table bottom, which was passed to us
|
rowTops[rowCount] = bottomY + paddingY; // The table bottom, which was passed to us
|
||||||
|
|
||||||
bool needsRelay = false;
|
bool needsRelay = false;
|
||||||
|
|
||||||
for (row = 0; row < rowCount-1; ++row) // -1 as the bottom row can't rowspan
|
for (row = 0; row < rowCount-1; ++row) // -1 as the bottom row can't rowspan
|
||||||
@@ -10189,7 +10189,7 @@ void ExpandCellsWithRowspan(const wxRichTextTable* table, int paddingY, int& bot
|
|||||||
span = wxMin(span, rowCount-row); // Don't try to span below the table!
|
span = wxMin(span, rowCount-row); // Don't try to span below the table!
|
||||||
if (span < 2)
|
if (span < 2)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
int availableHeight = rowTops[row+span] - rowTops[row] - paddingY;
|
int availableHeight = rowTops[row+span] - rowTops[row] - paddingY;
|
||||||
wxSize newSize = wxSize(cell->GetCachedSize().GetWidth(), availableHeight);
|
wxSize newSize = wxSize(cell->GetCachedSize().GetWidth(), availableHeight);
|
||||||
wxRect availableCellSpace = wxRect(cell->GetPosition(), newSize);
|
wxRect availableCellSpace = wxRect(cell->GetPosition(), newSize);
|
||||||
@@ -10207,19 +10207,19 @@ void ExpandCellsWithRowspan(const wxRichTextTable* table, int paddingY, int& bot
|
|||||||
// 3) The cell with the rowspan shouldn't be touched in 2); its height will be set to the whole span later.
|
// 3) The cell with the rowspan shouldn't be touched in 2); its height will be set to the whole span later.
|
||||||
int deltaY = overhang / span;
|
int deltaY = overhang / span;
|
||||||
int spare = overhang % span;
|
int spare = overhang % span;
|
||||||
|
|
||||||
// Each row in the span needs to by deepened by its share of the overhang (give the first row any spare).
|
// Each row in the span needs to by deepened by its share of the overhang (give the first row any spare).
|
||||||
// This is achieved by increasing the value stored in the following row's rowTops
|
// This is achieved by increasing the value stored in the following row's rowTops
|
||||||
for (int spannedRows = 0; spannedRows < span; ++spannedRows)
|
for (int spannedRows = 0; spannedRows < span; ++spannedRows)
|
||||||
{
|
{
|
||||||
rowTops[row+spannedRows+1] += ((deltaY * (spannedRows+1)) + (spannedRows == 0 ? spare:0));
|
rowTops[row+spannedRows+1] += ((deltaY * (spannedRows+1)) + (spannedRows == 0 ? spare:0));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Any rows below the span need shifting down
|
// Any rows below the span need shifting down
|
||||||
for (int rowsBelow = row + span+1; rowsBelow <= rowCount; ++rowsBelow)
|
for (int rowsBelow = row + span+1; rowsBelow <= rowCount; ++rowsBelow)
|
||||||
{
|
{
|
||||||
rowTops[rowsBelow] += overhang;
|
rowTops[rowsBelow] += overhang;
|
||||||
}
|
}
|
||||||
|
|
||||||
needsRelay = true;
|
needsRelay = true;
|
||||||
}
|
}
|
||||||
@@ -10227,7 +10227,7 @@ void ExpandCellsWithRowspan(const wxRichTextTable* table, int paddingY, int& bot
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!needsRelay)
|
if (!needsRelay)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -10249,7 +10249,7 @@ void ExpandCellsWithRowspan(const wxRichTextTable* table, int paddingY, int& bot
|
|||||||
cell->Layout(dc, context, availableCellSpace, availableSpace, style|wxRICHTEXT_FIXED_WIDTH|wxRICHTEXT_FIXED_HEIGHT);
|
cell->Layout(dc, context, availableCellSpace, availableSpace, style|wxRICHTEXT_FIXED_WIDTH|wxRICHTEXT_FIXED_HEIGHT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bottomY = rowTops[rowCount] - paddingY;
|
bottomY = rowTops[rowCount] - paddingY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -10460,7 +10460,7 @@ bool wxRichTextTable::Layout(wxDC& dc, wxRichTextDrawingContext& context, const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cell width percentages are for the overall cell width, so ignore margins and
|
// Cell width percentages are for the overall cell width, so ignore margins and
|
||||||
// only take into account table margins and inter-cell padding.
|
// only take into account table margins and inter-cell padding.
|
||||||
int availableWidthForPercentageCellWidths = internalTableWidth - ((visibleCellCount-1) * paddingX);
|
int availableWidthForPercentageCellWidths = internalTableWidth - ((visibleCellCount-1) * paddingX);
|
||||||
wxTextAttrDimensionConverter cellConverter(dc, scale, wxSize(availableWidthForPercentageCellWidths, 0));
|
wxTextAttrDimensionConverter cellConverter(dc, scale, wxSize(availableWidthForPercentageCellWidths, 0));
|
||||||
@@ -10558,7 +10558,7 @@ bool wxRichTextTable::Layout(wxDC& dc, wxRichTextDrawingContext& context, const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cell width percentages are for the overall cell width, so ignore margins and
|
// Cell width percentages are for the overall cell width, so ignore margins and
|
||||||
// only take into account table margins and inter-cell padding.
|
// only take into account table margins and inter-cell padding.
|
||||||
int availableWidthForPercentageCellWidths = internalTableWidth - ((visibleCellCount-1) * paddingX);
|
int availableWidthForPercentageCellWidths = internalTableWidth - ((visibleCellCount-1) * paddingX);
|
||||||
wxTextAttrDimensionConverter cellConverter(dc, scale, wxSize(availableWidthForPercentageCellWidths, 0));
|
wxTextAttrDimensionConverter cellConverter(dc, scale, wxSize(availableWidthForPercentageCellWidths, 0));
|
||||||
@@ -10585,7 +10585,7 @@ bool wxRichTextTable::Layout(wxDC& dc, wxRichTextDrawingContext& context, const
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
cellWidth = cell->GetMinSize().x;
|
cellWidth = cell->GetMinSize().x;
|
||||||
|
|
||||||
if (cell->GetMaxSize().x > cellWidth)
|
if (cell->GetMaxSize().x > cellWidth)
|
||||||
cellWidth = cell->GetMaxSize().x;
|
cellWidth = cell->GetMaxSize().x;
|
||||||
}
|
}
|
||||||
@@ -10900,7 +10900,7 @@ bool wxRichTextTable::Layout(wxDC& dc, wxRichTextDrawingContext& context, const
|
|||||||
if (j < (m_rowCount-1))
|
if (j < (m_rowCount-1))
|
||||||
y += paddingY;
|
y += paddingY;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Finally we need to expand any cell with rowspan > 1. We couldn't earlier; lower rows' heights weren't known
|
// Finally we need to expand any cell with rowspan > 1. We couldn't earlier; lower rows' heights weren't known
|
||||||
ExpandCellsWithRowspan(this, paddingY, y, dc, context, availableSpace, style);
|
ExpandCellsWithRowspan(this, paddingY, y, dc, context, availableSpace, style);
|
||||||
|
|
||||||
@@ -11351,7 +11351,7 @@ bool wxRichTextTable::DeleteColumns(int startCol, int noCols)
|
|||||||
for (i = 0; i < m_rowCount; i++)
|
for (i = 0; i < m_rowCount; i++)
|
||||||
{
|
{
|
||||||
wxRichTextObjectPtrArray& colArray = m_cells[deleteRows ? 0 : i];
|
wxRichTextObjectPtrArray& colArray = m_cells[deleteRows ? 0 : i];
|
||||||
for (j = 0; j < noCols; j++)
|
for (j = 0; j < noCols; j++)
|
||||||
{
|
{
|
||||||
wxRichTextObject* cell = colArray[startCol];
|
wxRichTextObject* cell = colArray[startCol];
|
||||||
RemoveChild(cell, true);
|
RemoveChild(cell, true);
|
||||||
@@ -11385,7 +11385,7 @@ bool wxRichTextTable::AddRows(int startRow, int noRows, const wxRichTextAttr& at
|
|||||||
wxRichTextBuffer* buffer = GetBuffer();
|
wxRichTextBuffer* buffer = GetBuffer();
|
||||||
wxRichTextAction* action = NULL;
|
wxRichTextAction* action = NULL;
|
||||||
wxRichTextTable* clone = NULL;
|
wxRichTextTable* clone = NULL;
|
||||||
|
|
||||||
if (!buffer->GetRichTextCtrl()->SuppressingUndo())
|
if (!buffer->GetRichTextCtrl()->SuppressingUndo())
|
||||||
{
|
{
|
||||||
// Create a clone containing the current state of the table. It will be used to Undo the action
|
// Create a clone containing the current state of the table. It will be used to Undo the action
|
||||||
@@ -11817,7 +11817,7 @@ void wxRichTextAction::CalculateRefreshOptimizations(wxArrayInt& optimizationLin
|
|||||||
if (node)
|
if (node)
|
||||||
node = node->GetNext();
|
node = node->GetNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wxRichTextBuffer::GetFloatingLayoutMode() && container->GetFloatingObjectCount() > 0)
|
if (wxRichTextBuffer::GetFloatingLayoutMode() && container->GetFloatingObjectCount() > 0)
|
||||||
{
|
{
|
||||||
// We will use a simple criterion - if any of the paragraphs following the
|
// We will use a simple criterion - if any of the paragraphs following the
|
||||||
@@ -12051,7 +12051,7 @@ bool wxRichTextAction::Do()
|
|||||||
// before deciding to Undo() or Redo(). So play safe and set focus to the buffer.
|
// before deciding to Undo() or Redo(). So play safe and set focus to the buffer.
|
||||||
if (m_ctrl)
|
if (m_ctrl)
|
||||||
m_ctrl->SetFocusObject(m_buffer, false);
|
m_ctrl->SetFocusObject(m_buffer, false);
|
||||||
|
|
||||||
// InvalidateHierarchy goes up the hierarchy as well as down, otherwise with a nested object,
|
// InvalidateHierarchy goes up the hierarchy as well as down, otherwise with a nested object,
|
||||||
// Layout() would stop prematurely at the top level.
|
// Layout() would stop prematurely at the top level.
|
||||||
// Invalidate the whole buffer if there were floating objects
|
// Invalidate the whole buffer if there were floating objects
|
||||||
@@ -12706,7 +12706,7 @@ bool wxRichTextImage::LoadAndScaleImageCache(wxImage& image, const wxSize& sz, w
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
img = image.Scale(width*scaleFactor, height*scaleFactor, wxIMAGE_QUALITY_HIGH);
|
img = image.Scale(width*scaleFactor, height*scaleFactor, wxIMAGE_QUALITY_HIGH);
|
||||||
|
|
||||||
// On Mac, this will create a bitmap that is twice as big as the required dimensions,
|
// On Mac, this will create a bitmap that is twice as big as the required dimensions,
|
||||||
// with a scale factor that indicates that the extra detail should be used on HiDPI displays.
|
// with a scale factor that indicates that the extra detail should be used on HiDPI displays.
|
||||||
m_imageCache = wxBitmap(img, wxBITMAP_SCREEN_DEPTH, scaleFactor);
|
m_imageCache = wxBitmap(img, wxBITMAP_SCREEN_DEPTH, scaleFactor);
|
||||||
@@ -15754,7 +15754,7 @@ bool wxTextAttrShadow::RemoveStyle(const wxTextAttrShadow& attr)
|
|||||||
GetOpacity().Reset();
|
GetOpacity().Reset();
|
||||||
if (attr.HasColour() && HasColour())
|
if (attr.HasColour() && HasColour())
|
||||||
RemoveFlag(wxTEXT_BOX_ATTR_BORDER_COLOUR);
|
RemoveFlag(wxTEXT_BOX_ATTR_BORDER_COLOUR);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -319,7 +319,7 @@ void wxRichTextIndentsSpacingPage::CreateControls()
|
|||||||
outlineLevelCtrlStrings.Add("8");
|
outlineLevelCtrlStrings.Add("8");
|
||||||
outlineLevelCtrlStrings.Add("9");
|
outlineLevelCtrlStrings.Add("9");
|
||||||
outlineLevelCtrlStrings.Add("10");
|
outlineLevelCtrlStrings.Add("10");
|
||||||
|
|
||||||
m_outlineLevelCtrl->Freeze();
|
m_outlineLevelCtrl->Freeze();
|
||||||
m_outlineLevelCtrl->Append(outlineLevelCtrlStrings);
|
m_outlineLevelCtrl->Append(outlineLevelCtrlStrings);
|
||||||
m_outlineLevelCtrl->Thaw();
|
m_outlineLevelCtrl->Thaw();
|
||||||
|
@@ -782,7 +782,7 @@ sptr_t ScintillaWX::DefWndProc(unsigned int /*iMessage*/, uptr_t /*wParam*/, spt
|
|||||||
sptr_t ScintillaWX::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
|
sptr_t ScintillaWX::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
|
||||||
switch (iMessage) {
|
switch (iMessage) {
|
||||||
#if 0 // TODO: check this
|
#if 0 // TODO: check this
|
||||||
|
|
||||||
case SCI_CALLTIPSHOW: {
|
case SCI_CALLTIPSHOW: {
|
||||||
// NOTE: This is copied here from scintilla/src/ScintillaBase.cxx
|
// NOTE: This is copied here from scintilla/src/ScintillaBase.cxx
|
||||||
// because of the little tweak that needs done below for wxGTK.
|
// because of the little tweak that needs done below for wxGTK.
|
||||||
@@ -896,7 +896,7 @@ void ScintillaWX::DoPaint(wxDC* dc, wxRect rect) {
|
|||||||
// highlight positions. So trigger a new paint event that will
|
// highlight positions. So trigger a new paint event that will
|
||||||
// repaint the whole window.
|
// repaint the whole window.
|
||||||
stc->Refresh(false);
|
stc->Refresh(false);
|
||||||
|
|
||||||
#if defined(__WXOSX__)
|
#if defined(__WXOSX__)
|
||||||
// On Mac we also need to finish the current paint to make sure that
|
// On Mac we also need to finish the current paint to make sure that
|
||||||
// everything is on the screen that needs to be there between now and
|
// everything is on the screen that needs to be there between now and
|
||||||
|
@@ -675,7 +675,7 @@ void wxStyledTextCtrl::MarkerDefineBitmap(int markerNumber, const wxBitmap& bmp)
|
|||||||
buff[len] = 0;
|
buff[len] = 0;
|
||||||
SendMsg(SCI_MARKERDEFINEPIXMAP, markerNumber, (sptr_t)buff);
|
SendMsg(SCI_MARKERDEFINEPIXMAP, markerNumber, (sptr_t)buff);
|
||||||
delete [] buff;
|
delete [] buff;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add a set of markers to a line.
|
// Add a set of markers to a line.
|
||||||
@@ -1478,7 +1478,7 @@ void wxStyledTextCtrl::RegisterImage(int type, const wxBitmap& bmp) {
|
|||||||
buff[len] = 0;
|
buff[len] = 0;
|
||||||
SendMsg(SCI_REGISTERIMAGE, type, (sptr_t)buff);
|
SendMsg(SCI_REGISTERIMAGE, type, (sptr_t)buff);
|
||||||
delete [] buff;
|
delete [] buff;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clear all the registered images.
|
// Clear all the registered images.
|
||||||
@@ -4491,7 +4491,7 @@ int wxStyledTextCtrl::GetTechnology() const
|
|||||||
|
|
||||||
// Create an ILoader*.
|
// Create an ILoader*.
|
||||||
void* wxStyledTextCtrl::CreateLoader(int bytes) const {
|
void* wxStyledTextCtrl::CreateLoader(int bytes) const {
|
||||||
return (void*)(sptr_t)SendMsg(SCI_CREATELOADER, bytes);
|
return (void*)(sptr_t)SendMsg(SCI_CREATELOADER, bytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Move caret to before first visible character on display line.
|
// Move caret to before first visible character on display line.
|
||||||
@@ -4665,7 +4665,7 @@ wxString wxStyledTextCtrl::GetLexerLanguage() const {
|
|||||||
|
|
||||||
// For private communication between an application and a known lexer.
|
// For private communication between an application and a known lexer.
|
||||||
void* wxStyledTextCtrl::PrivateLexerCall(int operation, void* pointer) {
|
void* wxStyledTextCtrl::PrivateLexerCall(int operation, void* pointer) {
|
||||||
return (void*)(sptr_t)SendMsg(SCI_PRIVATELEXERCALL, operation, (sptr_t)pointer);
|
return (void*)(sptr_t)SendMsg(SCI_PRIVATELEXERCALL, operation, (sptr_t)pointer);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Retrieve a '\\n' separated list of properties understood by the current lexer.
|
// Retrieve a '\\n' separated list of properties understood by the current lexer.
|
||||||
|
@@ -659,7 +659,7 @@ public:
|
|||||||
int GetAnnotationsLinesAdded() const { return m_annotationLinesAdded; }
|
int GetAnnotationsLinesAdded() const { return m_annotationLinesAdded; }
|
||||||
int GetUpdated() const { return m_updated; }
|
int GetUpdated() const { return m_updated; }
|
||||||
int GetListCompletionMethod() const { return m_listCompletionMethod; }
|
int GetListCompletionMethod() const { return m_listCompletionMethod; }
|
||||||
|
|
||||||
#ifdef STC_USE_DND
|
#ifdef STC_USE_DND
|
||||||
// Kept for backwards compatibility, use GetString().
|
// Kept for backwards compatibility, use GetString().
|
||||||
wxString GetDragText() { return GetString(); }
|
wxString GetDragText() { return GetString(); }
|
||||||
@@ -700,8 +700,8 @@ private:
|
|||||||
int m_x;
|
int m_x;
|
||||||
int m_y;
|
int m_y;
|
||||||
|
|
||||||
int m_token; // wxEVT_STC__MODIFIED with SC_MOD_CONTAINER
|
int m_token; // wxEVT_STC__MODIFIED with SC_MOD_CONTAINER
|
||||||
int m_annotationLinesAdded; // wxEVT_STC_MODIFIED with SC_MOD_CHANGEANNOTATION
|
int m_annotationLinesAdded; // wxEVT_STC_MODIFIED with SC_MOD_CHANGEANNOTATION
|
||||||
int m_updated; // wxEVT_STC_UPDATEUI
|
int m_updated; // wxEVT_STC_UPDATEUI
|
||||||
int m_listCompletionMethod;
|
int m_listCompletionMethod;
|
||||||
|
|
||||||
|
@@ -89,7 +89,7 @@ void wxToggleButtonXmlHandler::DoCreateToggleButton(wxObject *control)
|
|||||||
GetDirection("bitmapposition"));
|
GetDirection("bitmapposition"));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
button->SetValue(GetBool( wxT("checked")));
|
button->SetValue(GetBool( wxT("checked")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user