diff --git a/bin/wxrc-3.3 b/bin/wxrc-3.3 index 4eb37d4..167c255 100755 Binary files a/bin/wxrc-3.3 and b/bin/wxrc-3.3 differ diff --git a/include/lua.h b/include/lua.h index fd16cf8..f050dac 100644 --- a/include/lua.h +++ b/include/lua.h @@ -18,14 +18,14 @@ #define LUA_VERSION_MAJOR "5" #define LUA_VERSION_MINOR "4" -#define LUA_VERSION_RELEASE "6" +#define LUA_VERSION_RELEASE "7" #define LUA_VERSION_NUM 504 -#define LUA_VERSION_RELEASE_NUM (LUA_VERSION_NUM * 100 + 6) +#define LUA_VERSION_RELEASE_NUM (LUA_VERSION_NUM * 100 + 7) #define LUA_VERSION "Lua " LUA_VERSION_MAJOR "." LUA_VERSION_MINOR #define LUA_RELEASE LUA_VERSION "." LUA_VERSION_RELEASE -#define LUA_COPYRIGHT LUA_RELEASE " Copyright (C) 1994-2023 Lua.org, PUC-Rio" +#define LUA_COPYRIGHT LUA_RELEASE " Copyright (C) 1994-2024 Lua.org, PUC-Rio" #define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo, W. Celes" @@ -497,7 +497,7 @@ struct lua_Debug { /****************************************************************************** -* Copyright (C) 1994-2023 Lua.org, PUC-Rio. +* Copyright (C) 1994-2024 Lua.org, PUC-Rio. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the diff --git a/include/luaconf.h b/include/luaconf.h index 137103e..33bb580 100644 --- a/include/luaconf.h +++ b/include/luaconf.h @@ -257,6 +257,15 @@ #endif + +/* +** LUA_IGMARK is a mark to ignore all after it when building the +** module name (e.g., used to build the luaopen_ function name). +** Typically, the suffix after the mark is the module version, +** as in "mod-v1.2.so". +*/ +#define LUA_IGMARK "-" + /* }================================================================== */ diff --git a/include/wx-3.3/wx/app.h b/include/wx-3.3/wx/app.h index b7d068d..2b25665 100644 --- a/include/wx-3.3/wx/app.h +++ b/include/wx-3.3/wx/app.h @@ -135,6 +135,18 @@ class WXDLLIMPEXP_BASE wxAppConsoleBase : public wxEvtHandler, // Called from wxExit() function, should terminate the application a.s.a.p. virtual void Exit(); + // Allows to set a custom process exit code if a fatal error happens. + // This code is 255 by default, but can be changed if necessary, notably + // set to -1 (which still maps to 255 under most systems, but to 127 when + // using MSVC) if compatibility with the previous wx versions is important. + static void SetFatalErrorExitCode(int code) { ms_fatalErrorExitCode = code; } + static int GetFatalErrorExitCode() { return ms_fatalErrorExitCode; } + + // Allows to set a custom process exit code if OnInit() returns false. + // By default, this exit code is 255, as for the fatal errors. + virtual void SetErrorExitCode(int code) { m_exitCode = code; } + int GetErrorExitCode() const { return m_exitCode; } + // application info: name, description, vendor // ------------------------------------------- @@ -423,8 +435,7 @@ class WXDLLIMPEXP_BASE wxAppConsoleBase : public wxEvtHandler, // version does the normal processing (i.e. shows the usual assert failure // dialog box) // - // the arguments are the location of the failed assert (func may be empty - // if the compiler doesn't support C99 __FUNCTION__), the text of the + // the arguments are the location of the failed assert, the text of the // assert itself and the user-specified message virtual void OnAssertFailure(const wxChar *file, int line, @@ -539,6 +550,14 @@ class WXDLLIMPEXP_BASE wxAppConsoleBase : public wxEvtHandler, // set it bool m_fullyConstructed = false; + // Exit code to use if a fatal error occurs when the application object + // doesn't exist yet or is already destroyed. + static int ms_fatalErrorExitCode; + + // Exit code to use if OnInit() returns false. + int m_exitCode = ms_fatalErrorExitCode; + + friend class WXDLLIMPEXP_FWD_BASE wxEvtHandler; // the application object is a singleton anyhow, there is no sense in @@ -674,6 +693,26 @@ class WXDLLIMPEXP_CORE wxAppBase : public wxAppConsole // Change the theme used by the application, return true on success. virtual bool SetNativeTheme(const wxString& WXUNUSED(theme)) { return false; } + // Request using system appearance (which is automatic for most platforms + // but not MSW) or explicitly request dark or light appearance for this + // application. + enum class Appearance + { + System, + Light, + Dark + }; + + enum class AppearanceResult + { + Failure, + Ok, + CannotChange + }; + + virtual AppearanceResult SetAppearance(Appearance WXUNUSED(appearance)) + { return AppearanceResult::Failure; } + // command line parsing (GUI-specific) // ------------------------------------------------------------------------ diff --git a/include/wx-3.3/wx/aui/auibar.h b/include/wx-3.3/wx/aui/auibar.h index f3453dd..9b25ede 100644 --- a/include/wx-3.3/wx/aui/auibar.h +++ b/include/wx-3.3/wx/aui/auibar.h @@ -16,10 +16,12 @@ #include "wx/bmpbndl.h" #include "wx/control.h" +#include "wx/custombgwin.h" #include "wx/sizer.h" #include "wx/pen.h" class WXDLLIMPEXP_FWD_CORE wxClientDC; +class WXDLLIMPEXP_FWD_CORE wxReadOnlyDC; class WXDLLIMPEXP_FWD_AUI wxAuiPaneInfo; enum wxAuiToolBarStyle @@ -326,12 +328,12 @@ class WXDLLIMPEXP_AUI wxAuiToolBarArt int state) = 0; virtual wxSize GetLabelSize( - wxDC& dc, + wxReadOnlyDC& dc, wxWindow* wnd, const wxAuiToolBarItem& item) = 0; virtual wxSize GetToolSize( - wxDC& dc, + wxReadOnlyDC& dc, wxWindow* wnd, const wxAuiToolBarItem& item) = 0; @@ -417,12 +419,12 @@ class WXDLLIMPEXP_AUI wxAuiGenericToolBarArt : public wxAuiToolBarArt int state) override; virtual wxSize GetLabelSize( - wxDC& dc, + wxReadOnlyDC& dc, wxWindow* wnd, const wxAuiToolBarItem& item) override; virtual wxSize GetToolSize( - wxDC& dc, + wxReadOnlyDC& dc, wxWindow* wnd, const wxAuiToolBarItem& item) override; @@ -460,7 +462,7 @@ class WXDLLIMPEXP_AUI wxAuiGenericToolBarArt : public wxAuiToolBarArt -class WXDLLIMPEXP_AUI wxAuiToolBar : public wxControl +class WXDLLIMPEXP_AUI wxAuiToolBar : public wxCustomBackgroundWindow { public: wxAuiToolBar() { Init(); } @@ -627,6 +629,12 @@ class WXDLLIMPEXP_AUI wxAuiToolBar : public wxControl protected: void Init(); + // Override to return the minimum acceptable size because under wxMSW this + // function returns DEFAULT_ITEM_HEIGHT (see wxControl::DoGetBestSize()) + // which is not suitable as height/width for a horizontal/vertical toolbar + // if icon sizes are much smaller than DEFAULT_ITEM_HEIGHT. + virtual wxSize DoGetBestSize() const override; + virtual void OnCustomRender(wxDC& WXUNUSED(dc), const wxAuiToolBarItem& WXUNUSED(item), const wxRect& WXUNUSED(rect)) { } @@ -650,7 +658,6 @@ class WXDLLIMPEXP_AUI wxAuiToolBar : public wxControl void OnIdle(wxIdleEvent& evt); void OnDPIChanged(wxDPIChangedEvent& evt); void OnPaint(wxPaintEvent& evt); - void OnEraseBackground(wxEraseEvent& evt); void OnLeftDown(wxMouseEvent& evt); void OnLeftUp(wxMouseEvent& evt); void OnRightDown(wxMouseEvent& evt); @@ -694,11 +701,7 @@ class WXDLLIMPEXP_AUI wxAuiToolBar : public wxControl bool m_overflowVisible; // This function is only kept for compatibility, don't use in the new code. - bool RealizeHelper(wxClientDC& dc, bool horizontal) - { - RealizeHelper(dc, horizontal ? wxHORIZONTAL : wxVERTICAL); - return true; - } + bool RealizeHelper(wxClientDC& dc, bool horizontal); static bool IsPaneValid(long style, const wxAuiPaneInfo& pane); bool IsPaneValid(long style) const; @@ -711,7 +714,11 @@ class WXDLLIMPEXP_AUI wxAuiToolBar : public wxControl // Common part of OnLeaveWindow() and OnCaptureLost(). void DoResetMouseState(); - wxSize RealizeHelper(wxClientDC& dc, wxOrientation orientation); + wxSize RealizeHelper(wxReadOnlyDC& dc, wxOrientation orientation); + + void UpdateBackgroundBitmap(const wxSize& size); + + wxBitmap m_backgroundBitmap; wxDECLARE_EVENT_TABLE(); wxDECLARE_CLASS(wxAuiToolBar); diff --git a/include/wx-3.3/wx/aui/auibook.h b/include/wx-3.3/wx/aui/auibook.h index d46c9fe..a8e3473 100644 --- a/include/wx-3.3/wx/aui/auibook.h +++ b/include/wx-3.3/wx/aui/auibook.h @@ -171,7 +171,7 @@ class WXDLLIMPEXP_AUI wxAuiTabContainer void SetTabOffset(size_t offset); // Is the tab visible? - bool IsTabVisible(int tabPage, int tabOffset, wxDC* dc, wxWindow* wnd); + bool IsTabVisible(int tabPage, int tabOffset, wxReadOnlyDC* dc, wxWindow* wnd); // Make the tab visible if it wasn't already void MakeTabVisible(int tabPage, wxWindow* win); diff --git a/include/wx-3.3/wx/aui/tabart.h b/include/wx-3.3/wx/aui/tabart.h index 1594ad4..6927ef6 100644 --- a/include/wx-3.3/wx/aui/tabart.h +++ b/include/wx-3.3/wx/aui/tabart.h @@ -32,6 +32,7 @@ class wxAuiNotebookPage; class wxAuiNotebookPageArray; class wxWindow; class wxDC; +class wxReadOnlyDC; // tab art class @@ -85,7 +86,7 @@ class WXDLLIMPEXP_AUI wxAuiTabArt wxRect* outRect) = 0; virtual wxSize GetTabSize( - wxDC& dc, + wxReadOnlyDC& dc, wxWindow* wnd, const wxString& caption, const wxBitmapBundle& bitmap, @@ -174,7 +175,7 @@ class WXDLLIMPEXP_AUI wxAuiGenericTabArt : public wxAuiTabArt wxWindow* wnd) override; wxSize GetTabSize( - wxDC& dc, + wxReadOnlyDC& dc, wxWindow* wnd, const wxString& caption, const wxBitmapBundle& bitmap, @@ -277,7 +278,7 @@ class WXDLLIMPEXP_AUI wxAuiSimpleTabArt : public wxAuiTabArt wxWindow* wnd) override; wxSize GetTabSize( - wxDC& dc, + wxReadOnlyDC& dc, wxWindow* wnd, const wxString& caption, const wxBitmapBundle& bitmap, diff --git a/include/wx-3.3/wx/buffer.h b/include/wx-3.3/wx/buffer.h index 053e39a..3e1dd6e 100644 --- a/include/wx-3.3/wx/buffer.h +++ b/include/wx-3.3/wx/buffer.h @@ -211,7 +211,17 @@ class wxScopedCharTypeBuffer DecRef(); } + // For some reasong clang-tidy gives a warning about using freed memory + // here even when this is not at all the case, seemingly because it doesn't + // follow reference counting logic, i.e. it assumes that it's possible to + // delete the data even when it's still referenced. + // + // Suppress the warning as it's extremely annoying to get it for every use + // of wxCharBuffer. + // + // NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDelete) CharType *data() { return m_data->Get(); } + // NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDelete) const CharType *data() const { return m_data->Get(); } operator const CharType *() const { return data(); } CharType operator[](size_t n) const { return data()[n]; } diff --git a/include/wx-3.3/wx/checkbox.h b/include/wx-3.3/wx/checkbox.h index dd89245..5438300 100644 --- a/include/wx-3.3/wx/checkbox.h +++ b/include/wx-3.3/wx/checkbox.h @@ -103,13 +103,27 @@ class WXDLLIMPEXP_CORE wxCheckBoxBase : public wxControl // background colour of the checkbox itself under the other platforms. virtual void SetTransparentPartColour(const wxColour& WXUNUSED(col)) { } + // do the window-specific processing before processing the update event + // (mainly for deciding whether wxUpdateUIEvent::Is3State() is set) + virtual void DoPrepareUpdateWindowUI(wxUpdateUIEvent& event) const override + { event.Allow3rdState(Is3State()); } + // wxCheckBox-specific processing after processing the update event virtual void DoUpdateWindowUI(wxUpdateUIEvent& event) override { wxControl::DoUpdateWindowUI(event); if ( event.GetSetChecked() ) - SetValue(event.GetChecked()); + { + if ( Is3State() ) + { + Set3StateValue(event.Get3StateValue()); + } + else + { + SetValue(event.GetChecked()); + } + } } protected: diff --git a/include/wx-3.3/wx/control.h b/include/wx-3.3/wx/control.h index 1466098..b3ac4c3 100644 --- a/include/wx-3.3/wx/control.h +++ b/include/wx-3.3/wx/control.h @@ -139,7 +139,7 @@ class WXDLLIMPEXP_CORE wxControlBase : public wxWindow // ------------------------------ // replaces parts of the given (multiline) string with an ellipsis if needed - static wxString Ellipsize(const wxString& label, const wxDC& dc, + static wxString Ellipsize(const wxString& label, const wxReadOnlyDC& dc, wxEllipsizeMode mode, int maxWidth, int flags = wxELLIPSIZE_FLAGS_DEFAULT); diff --git a/include/wx-3.3/wx/cpp.h b/include/wx-3.3/wx/cpp.h index 3347c1c..cd0b83c 100644 --- a/include/wx-3.3/wx/cpp.h +++ b/include/wx-3.3/wx/cpp.h @@ -114,6 +114,20 @@ #define __WXFUNCTION__ __func__ #endif /* __WXFUNCTION__ already defined */ +/* + Expands to the current function's full signature, if available. + + Falls back to the function name (i.e., __func__) if not available. + */ +#ifndef __WXFUNCTION_SIG__ + #if defined(__VISUALC__) + #define __WXFUNCTION_SIG__ __FUNCSIG__ + #elif defined(__GNUG__) + #define __WXFUNCTION_SIG__ __PRETTY_FUNCTION__ + #else + #define __WXFUNCTION_SIG__ __func__ + #endif +#endif /* __WXFUNCTION_SIG__ already defined */ /* wxCALL_FOR_EACH(what, ...) calls the macro from its first argument, what(pos, x), diff --git a/include/wx-3.3/wx/datetime.h b/include/wx-3.3/wx/datetime.h index 4f9d5cf..445c3db 100644 --- a/include/wx-3.3/wx/datetime.h +++ b/include/wx-3.3/wx/datetime.h @@ -1728,9 +1728,11 @@ class WXDLLIMPEXP_BASE wxDateTimeChristianHolidays : public wxDateTimeUSCatholic inline bool wxDateTime::IsInStdRange() const { - // currently we don't know what is the real type of time_t so prefer to err - // on the safe side and limit it to 32 bit values which is safe everywhere - return m_time >= 0l && (m_time / TIME_T_FACTOR) < wxINT32_MAX; + // if sizeof(time_t) is greater than 32 bits, we assume it + // is safe to return values exceeding wxINT32_MAX + + return m_time >= 0l && + ( (sizeof(time_t) > 4 ) || ( (m_time / TIME_T_FACTOR) < wxINT32_MAX) ); } /* static */ @@ -1837,7 +1839,7 @@ inline time_t wxDateTime::GetTicks() const return (time_t)-1; } - return (time_t)((m_time / (long)TIME_T_FACTOR).ToLong()) + WX_TIME_BASE_OFFSET; + return (time_t)((m_time / TIME_T_FACTOR).GetValue()) + WX_TIME_BASE_OFFSET; } inline bool wxDateTime::SetToLastWeekDay(WeekDay weekday, diff --git a/include/wx-3.3/wx/dc.h b/include/wx-3.3/wx/dc.h index b89c381..0f4afa0 100644 --- a/include/wx-3.3/wx/dc.h +++ b/include/wx-3.3/wx/dc.h @@ -697,25 +697,15 @@ class WXDLLIMPEXP_CORE wxDCImpl: public wxObject }; -class WXDLLIMPEXP_CORE wxDC : public wxObject +// This base class provides only functions that don't modify device contents. +class WXDLLIMPEXP_CORE wxReadOnlyDC : public wxObject { public: - // copy attributes (font, colours and writing direction) from another DC - void CopyAttributes(const wxDC& dc); - - virtual ~wxDC() { delete m_pimpl; } - - wxDCImpl *GetImpl() - { return m_pimpl; } - const wxDCImpl *GetImpl() const - { return m_pimpl; } + virtual ~wxReadOnlyDC() { delete m_pimpl; } wxWindow *GetWindow() const { return m_pimpl->GetWindow(); } - void *GetHandle() const - { return m_pimpl->GetHandle(); } - bool IsOk() const { return m_pimpl && m_pimpl->IsOk(); } @@ -784,83 +774,13 @@ class WXDLLIMPEXP_CORE wxDC : public wxObject wxLayoutDirection GetLayoutDirection() const { return m_pimpl->GetLayoutDirection(); } - // page and document - - bool StartDoc(const wxString& message) - { return m_pimpl->StartDoc(message); } - void EndDoc() - { m_pimpl->EndDoc(); } - - void StartPage() - { m_pimpl->StartPage(); } - void EndPage() - { m_pimpl->EndPage(); } - - // bounding box - - void CalcBoundingBox(wxCoord x, wxCoord y) - { m_pimpl->CalcBoundingBox(x,y); } - void ResetBoundingBox() - { m_pimpl->ResetBoundingBox(); } - - wxCoord MinX() const - { return m_pimpl->MinX(); } - wxCoord MaxX() const - { return m_pimpl->MaxX(); } - wxCoord MinY() const - { return m_pimpl->MinY(); } - wxCoord MaxY() const - { return m_pimpl->MaxY(); } - - // setters and getters + // font void SetFont(const wxFont& font) { m_pimpl->SetFont( font ); } const wxFont& GetFont() const { return m_pimpl->GetFont(); } - void SetPen(const wxPen& pen) - { m_pimpl->SetPen( pen ); } - const wxPen& GetPen() const - { return m_pimpl->GetPen(); } - - void SetBrush(const wxBrush& brush) - { m_pimpl->SetBrush( brush ); } - const wxBrush& GetBrush() const - { return m_pimpl->GetBrush(); } - - void SetBackground(const wxBrush& brush) - { m_pimpl->SetBackground( brush ); } - const wxBrush& GetBackground() const - { return m_pimpl->GetBackground(); } - - void SetBackgroundMode(int mode) - { m_pimpl->SetBackgroundMode( mode ); } - int GetBackgroundMode() const - { return m_pimpl->GetBackgroundMode(); } - - void SetTextForeground(const wxColour& colour) - { m_pimpl->SetTextForeground(colour); } - const wxColour& GetTextForeground() const - { return m_pimpl->GetTextForeground(); } - - void SetTextBackground(const wxColour& colour) - { m_pimpl->SetTextBackground(colour); } - const wxColour& GetTextBackground() const - { return m_pimpl->GetTextBackground(); } - -#if wxUSE_PALETTE - void SetPalette(const wxPalette& palette) - { m_pimpl->SetPalette(palette); } -#endif // wxUSE_PALETTE - - // logical functions - - void SetLogicalFunction(wxRasterOperationMode function) - { m_pimpl->SetLogicalFunction(function); } - wxRasterOperationMode GetLogicalFunction() const - { return m_pimpl->GetLogicalFunction(); } - // text measurement wxCoord GetCharHeight() const @@ -908,55 +828,6 @@ class WXDLLIMPEXP_CORE wxDC : public wxObject bool GetPartialTextExtents(const wxString& text, wxArrayInt& widths) const { return m_pimpl->DoGetPartialTextExtents(text, widths); } - // clearing - - void Clear() - { m_pimpl->Clear(); } - - // clipping - - void SetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height) - { m_pimpl->DoSetClippingRegion(x, y, width, height); } - void SetClippingRegion(const wxPoint& pt, const wxSize& sz) - { m_pimpl->DoSetClippingRegion(pt.x, pt.y, sz.x, sz.y); } - void SetClippingRegion(const wxRect& rect) - { m_pimpl->DoSetClippingRegion(rect.x, rect.y, rect.width, rect.height); } - - // unlike the functions above, the coordinates of the region used in this - // one are in device coordinates, not the logical ones - void SetDeviceClippingRegion(const wxRegion& region) - { m_pimpl->DoSetDeviceClippingRegion(region); } - - // this function is deprecated because its name is confusing: you may - // expect it to work with logical coordinates but, in fact, it does exactly - // the same thing as SetDeviceClippingRegion() - // - // please review the code using it and either replace it with calls to - // SetDeviceClippingRegion() or correct it if it was [wrongly] passing - // logical coordinates to this function - wxDEPRECATED_INLINE(void SetClippingRegion(const wxRegion& region), - SetDeviceClippingRegion(region); ) - - void DestroyClippingRegion() - { m_pimpl->DestroyClippingRegion(); } - - bool GetClippingBox(wxCoord *x, wxCoord *y, wxCoord *w, wxCoord *h) const - { - wxRect r; - const bool clipping = m_pimpl->DoGetClippingRect(r); - if ( x ) - *x = r.x; - if ( y ) - *y = r.y; - if ( w ) - *w = r.width; - if ( h ) - *h = r.height; - return clipping; - } - bool GetClippingBox(wxRect& rect) const - { return m_pimpl->DoGetClippingRect(rect); } - // coordinates conversions and transforms wxCoord DeviceToLogicalX(wxCoord x) const @@ -1042,6 +913,151 @@ class WXDLLIMPEXP_CORE wxDC : public wxObject void SetDeviceLocalOrigin( wxCoord x, wxCoord y ) { m_pimpl->SetDeviceLocalOrigin( x, y ); } +protected: + explicit wxReadOnlyDC(wxDCImpl *pimpl) + : m_pimpl(pimpl) + { + } + + wxDCImpl * const m_pimpl; +}; + +// Full device context class, providing functions for drawing on the device in +// addition to the base class functions only querying it. +class WXDLLIMPEXP_CORE wxDC : public wxReadOnlyDC +{ +public: + // copy attributes (font, colours and writing direction) from another DC + void CopyAttributes(const wxDC& dc); + + wxDCImpl *GetImpl() + { return m_pimpl; } + const wxDCImpl *GetImpl() const + { return m_pimpl; } + + void *GetHandle() const + { return m_pimpl->GetHandle(); } + + // page and document + + bool StartDoc(const wxString& message) + { return m_pimpl->StartDoc(message); } + void EndDoc() + { m_pimpl->EndDoc(); } + + void StartPage() + { m_pimpl->StartPage(); } + void EndPage() + { m_pimpl->EndPage(); } + + // bounding box + + void CalcBoundingBox(wxCoord x, wxCoord y) + { m_pimpl->CalcBoundingBox(x,y); } + void ResetBoundingBox() + { m_pimpl->ResetBoundingBox(); } + + wxCoord MinX() const + { return m_pimpl->MinX(); } + wxCoord MaxX() const + { return m_pimpl->MaxX(); } + wxCoord MinY() const + { return m_pimpl->MinY(); } + wxCoord MaxY() const + { return m_pimpl->MaxY(); } + + // setters and getters + + void SetPen(const wxPen& pen) + { m_pimpl->SetPen( pen ); } + const wxPen& GetPen() const + { return m_pimpl->GetPen(); } + + void SetBrush(const wxBrush& brush) + { m_pimpl->SetBrush( brush ); } + const wxBrush& GetBrush() const + { return m_pimpl->GetBrush(); } + + void SetBackground(const wxBrush& brush) + { m_pimpl->SetBackground( brush ); } + const wxBrush& GetBackground() const + { return m_pimpl->GetBackground(); } + + void SetBackgroundMode(int mode) + { m_pimpl->SetBackgroundMode( mode ); } + int GetBackgroundMode() const + { return m_pimpl->GetBackgroundMode(); } + + void SetTextForeground(const wxColour& colour) + { m_pimpl->SetTextForeground(colour); } + const wxColour& GetTextForeground() const + { return m_pimpl->GetTextForeground(); } + + void SetTextBackground(const wxColour& colour) + { m_pimpl->SetTextBackground(colour); } + const wxColour& GetTextBackground() const + { return m_pimpl->GetTextBackground(); } + +#if wxUSE_PALETTE + void SetPalette(const wxPalette& palette) + { m_pimpl->SetPalette(palette); } +#endif // wxUSE_PALETTE + + // logical functions + + void SetLogicalFunction(wxRasterOperationMode function) + { m_pimpl->SetLogicalFunction(function); } + wxRasterOperationMode GetLogicalFunction() const + { return m_pimpl->GetLogicalFunction(); } + + // clearing + + void Clear() + { m_pimpl->Clear(); } + + // clipping + + void SetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height) + { m_pimpl->DoSetClippingRegion(x, y, width, height); } + void SetClippingRegion(const wxPoint& pt, const wxSize& sz) + { m_pimpl->DoSetClippingRegion(pt.x, pt.y, sz.x, sz.y); } + void SetClippingRegion(const wxRect& rect) + { m_pimpl->DoSetClippingRegion(rect.x, rect.y, rect.width, rect.height); } + + // unlike the functions above, the coordinates of the region used in this + // one are in device coordinates, not the logical ones + void SetDeviceClippingRegion(const wxRegion& region) + { m_pimpl->DoSetDeviceClippingRegion(region); } + + // this function is deprecated because its name is confusing: you may + // expect it to work with logical coordinates but, in fact, it does exactly + // the same thing as SetDeviceClippingRegion() + // + // please review the code using it and either replace it with calls to + // SetDeviceClippingRegion() or correct it if it was [wrongly] passing + // logical coordinates to this function + wxDEPRECATED_INLINE(void SetClippingRegion(const wxRegion& region), + SetDeviceClippingRegion(region); ) + + void DestroyClippingRegion() + { m_pimpl->DestroyClippingRegion(); } + + bool GetClippingBox(wxCoord *x, wxCoord *y, wxCoord *w, wxCoord *h) const + { + wxRect r; + const bool clipping = m_pimpl->DoGetClippingRect(r); + if ( x ) + *x = r.x; + if ( y ) + *y = r.y; + if ( w ) + *w = r.width; + if ( h ) + *h = r.height; + return clipping; + } + bool GetClippingBox(wxRect& rect) const + { return m_pimpl->DoGetClippingRect(rect); } // ----------------------------------------------- // the actual drawing API @@ -1314,9 +1330,7 @@ class WXDLLIMPEXP_CORE wxDC : public wxObject protected: // ctor takes ownership of the pointer - wxDC(wxDCImpl *pimpl) : m_pimpl(pimpl) { } - - wxDCImpl * const m_pimpl; + explicit wxDC(wxDCImpl *pimpl) : wxReadOnlyDC(pimpl) { } void SetWindow(wxWindow* w) { return m_pimpl->SetWindow(w); } diff --git a/include/wx-3.3/wx/dcclient.h b/include/wx-3.3/wx/dcclient.h index ced769c..1f6e9db 100644 --- a/include/wx-3.3/wx/dcclient.h +++ b/include/wx-3.3/wx/dcclient.h @@ -61,4 +61,180 @@ class WXDLLIMPEXP_CORE wxPaintDC : public wxClientDC wxDECLARE_ABSTRACT_CLASS(wxPaintDC); }; +//----------------------------------------------------------------------------- +// wxInfoDC +//----------------------------------------------------------------------------- + +// A very limited wxDC-like class which can be only used to query the device +// context, but not to draw anything on it: it doesn't inherit from wxDC but +// can be implicitly converted to wxReadOnlyDC and makes all of its functions +// available. +class WXDLLIMPEXP_CORE wxInfoDC +{ +public: + explicit wxInfoDC(wxWindow* win) : m_dcClient(win) { } + + // Implicit conversions to wxReadOnlyDC allow passing objects of this class + // to the functions taking this type. + operator wxReadOnlyDC&() { return m_dcClient; } + operator const wxReadOnlyDC&() const { return m_dcClient; } + + wxReadOnlyDC* operator&() { return &m_dcClient; } + const wxReadOnlyDC* operator&() const { return &m_dcClient; } + + // wxReadOnlyDC re-exposed here. + wxWindow* GetWindow() const { return m_dcClient.GetWindow(); } + bool IsOk() const { return m_dcClient.IsOk(); } + + bool CanDrawBitmap() const { return m_dcClient.CanDrawBitmap(); } + bool CanGetTextExtent() const { return m_dcClient.CanGetTextExtent(); } + + void GetSize(int *width, int *height) const { m_dcClient.GetSize(width, height); } + wxSize GetSize() const { return m_dcClient.GetSize(); } + void GetSizeMM(int* width, int* height) const { m_dcClient.GetSizeMM(width, height); } + wxSize GetSizeMM() const { return m_dcClient.GetSizeMM(); } + + int GetDepth() const { return m_dcClient.GetDepth(); } + wxSize GetPPI() const { return m_dcClient.GetPPI(); } + + int GetResolution() const { return m_dcClient.GetResolution(); } + double GetContentScaleFactor() const { return m_dcClient.GetContentScaleFactor(); } + + wxSize FromDIP(const wxSize& sz) const { return m_dcClient.FromDIP(sz); } + wxPoint FromDIP(const wxPoint& pt) const { return m_dcClient.FromDIP(pt); } + int FromDIP(int d) const { return m_dcClient.FromDIP(d); } + + wxSize ToDIP(const wxSize & sz) const { return m_dcClient.ToDIP(sz); } + wxPoint ToDIP(const wxPoint & pt) const { return m_dcClient.ToDIP(pt); } + int ToDIP(int d) const { return m_dcClient.ToDIP(d); } + + void SetLayoutDirection(wxLayoutDirection dir) + { m_dcClient.SetLayoutDirection( dir ); } + wxLayoutDirection GetLayoutDirection() const + { return m_dcClient.GetLayoutDirection(); } + + void SetFont(const wxFont& font) { m_dcClient.SetFont(font); } + const wxFont& GetFont() const { return m_dcClient.GetFont(); } + + wxCoord GetCharHeight() const { return m_dcClient.GetCharHeight(); } + wxCoord GetCharWidth() const { return m_dcClient.GetCharWidth(); } + + wxFontMetrics GetFontMetrics() const { return m_dcClient.GetFontMetrics(); } + void GetTextExtent(const wxString& string, + wxCoord *x, wxCoord *y, + wxCoord *descent = nullptr, + wxCoord *externalLeading = nullptr, + const wxFont *theFont = nullptr) const + { return m_dcClient.GetTextExtent(string, x, y, descent, externalLeading, theFont); } + + wxSize GetTextExtent(const wxString& string) const + { + return m_dcClient.GetTextExtent(string); + } + + void GetMultiLineTextExtent(const wxString& string, + wxCoord *width, + wxCoord *height, + wxCoord *heightLine = nullptr, + const wxFont *font = nullptr) const + { return m_dcClient.GetMultiLineTextExtent(string, width, height, heightLine, font); } + + wxSize GetMultiLineTextExtent(const wxString& string) const + { + return m_dcClient.GetMultiLineTextExtent(string); + } + + bool GetPartialTextExtents(const wxString& text, wxArrayInt& widths) const + { return m_dcClient.GetPartialTextExtents(text, widths); } + + wxCoord DeviceToLogicalX(wxCoord x) const + { return m_dcClient.DeviceToLogicalX(x); } + wxCoord DeviceToLogicalY(wxCoord y) const + { return m_dcClient.DeviceToLogicalY(y); } + wxCoord DeviceToLogicalXRel(wxCoord x) const + { return m_dcClient.DeviceToLogicalXRel(x); } + wxCoord DeviceToLogicalYRel(wxCoord y) const + { return m_dcClient.DeviceToLogicalYRel(y); } + wxPoint DeviceToLogical(const wxPoint& pt) const + { return m_dcClient.DeviceToLogical(pt.x, pt.y); } + wxPoint DeviceToLogical(wxCoord x, wxCoord y) const + { return m_dcClient.DeviceToLogical(x, y); } + wxSize DeviceToLogicalRel(const wxSize& dim) const + { return m_dcClient.DeviceToLogicalRel(dim.x, dim.y); } + wxSize DeviceToLogicalRel(int x, int y) const + { return m_dcClient.DeviceToLogicalRel(x, y); } + wxCoord LogicalToDeviceX(wxCoord x) const + { return m_dcClient.LogicalToDeviceX(x); } + wxCoord LogicalToDeviceY(wxCoord y) const + { return m_dcClient.LogicalToDeviceY(y); } + wxCoord LogicalToDeviceXRel(wxCoord x) const + { return m_dcClient.LogicalToDeviceXRel(x); } + wxCoord LogicalToDeviceYRel(wxCoord y) const + { return m_dcClient.LogicalToDeviceYRel(y); } + wxPoint LogicalToDevice(const wxPoint& pt) const + { return m_dcClient.LogicalToDevice(pt.x, pt.y); } + wxPoint LogicalToDevice(wxCoord x, wxCoord y) const + { return m_dcClient.LogicalToDevice(x, y); } + wxSize LogicalToDeviceRel(const wxSize& dim) const + { return m_dcClient.LogicalToDeviceRel(dim.x, dim.y); } + wxSize LogicalToDeviceRel(int x, int y) const + { return m_dcClient.LogicalToDeviceRel(x, y); } + + void SetMapMode(wxMappingMode mode) + { m_dcClient.SetMapMode(mode); } + wxMappingMode GetMapMode() const + { return m_dcClient.GetMapMode(); } + + void SetUserScale(double x, double y) + { m_dcClient.SetUserScale(x,y); } + void GetUserScale(double *x, double *y) const + { m_dcClient.GetUserScale( x, y ); } + + void SetLogicalScale(double x, double y) + { m_dcClient.SetLogicalScale( x, y ); } + void GetLogicalScale(double *x, double *y) const + { m_dcClient.GetLogicalScale( x, y ); } + + void SetLogicalOrigin(wxCoord x, wxCoord y) + { m_dcClient.SetLogicalOrigin(x,y); } + void GetLogicalOrigin(wxCoord *x, wxCoord *y) const + { m_dcClient.GetLogicalOrigin(x, y); } + wxPoint GetLogicalOrigin() const + { return m_dcClient.GetLogicalOrigin(); } + + void SetDeviceOrigin(wxCoord x, wxCoord y) + { m_dcClient.SetDeviceOrigin( x, y); } + void GetDeviceOrigin(wxCoord *x, wxCoord *y) const + { m_dcClient.GetDeviceOrigin(x, y); } + wxPoint GetDeviceOrigin() const + { return m_dcClient.GetDeviceOrigin(); } + + void SetAxisOrientation(bool xLeftRight, bool yBottomUp) + { m_dcClient.SetAxisOrientation(xLeftRight, yBottomUp); } + +#if wxUSE_DC_TRANSFORM_MATRIX + bool CanUseTransformMatrix() const + { return m_dcClient.CanUseTransformMatrix(); } + + bool SetTransformMatrix(const wxAffineMatrix2D &matrix) + { return m_dcClient.SetTransformMatrix(matrix); } + + wxAffineMatrix2D GetTransformMatrix() const + { return m_dcClient.GetTransformMatrix(); } + + void ResetTransformMatrix() + { m_dcClient.ResetTransformMatrix(); } +#endif // wxUSE_DC_TRANSFORM_MATRIX + + // mostly internal + void SetDeviceLocalOrigin( wxCoord x, wxCoord y ) + { m_dcClient.SetDeviceLocalOrigin( x, y ); } +private: + wxClientDC m_dcClient; +}; + +// Define this to indicate that wxInfoDC is available to allow application code +// to fall back to using wxClientDC if it isn't. +#define wxHAS_INFO_DC + #endif // _WX_DCCLIENT_H_BASE_ diff --git a/include/wx-3.3/wx/defs.h b/include/wx-3.3/wx/defs.h index 5359e12..0a625f9 100644 --- a/include/wx-3.3/wx/defs.h +++ b/include/wx-3.3/wx/defs.h @@ -1452,8 +1452,6 @@ wxALLOW_COMBINING_ENUMS(wxSizerFlagBits, wxStretch) /* wxALWAYS_SHOW_SB: instead of hiding the scrollbar when it is not needed, */ /* disable it - but still show (see also wxLB_ALWAYS_SB style) */ -/* */ -/* NB: as this style is only supported by wxUniversal and wxMSW so far */ #define wxALWAYS_SHOW_SB 0x00800000 /* Clip children when painting, which reduces flicker in e.g. frames and */ @@ -3042,11 +3040,25 @@ typedef const void* WXWidget; /* macros to define a class without copy ctor nor assignment operator */ /* --------------------------------------------------------------------------- */ +/* Obsolete macros kept only for compatibility, just use the corresponding + C++11 keywords directly in the class definition when writing new code. */ #define wxMEMBER_DELETE = delete + +/* Also note that these macro do _not_ require a semicolon after them for + compatibility with wxWidgets 3.2. */ #define wxDECLARE_DEFAULT_COPY_CTOR(classname) \ public: \ classname(const classname&) = default; +#define wxDECLARE_DEFAULT_COPY(classname) \ + wxDECLARE_DEFAULT_COPY_CTOR(classname) \ + classname& operator=(const classname&) = default; + +#define wxDECLARE_DEFAULT_COPY_AND_DEF(classname) \ + classname() = default; \ + wxDECLARE_DEFAULT_COPY(classname); + +/* These macros do require a semicolon after them. */ #define wxDECLARE_NO_COPY_CLASS(classname) \ private: \ classname(const classname&) wxMEMBER_DELETE; \ diff --git a/include/wx-3.3/wx/event.h b/include/wx-3.3/wx/event.h index 24db9be..a7670bd 100644 --- a/include/wx-3.3/wx/event.h +++ b/include/wx-3.3/wx/event.h @@ -45,6 +45,7 @@ class WXDLLIMPEXP_FWD_BASE wxEventFilter; #if wxUSE_GUI class WXDLLIMPEXP_FWD_CORE wxDC; class WXDLLIMPEXP_FWD_CORE wxMenu; + class WXDLLIMPEXP_FWD_CORE wxReadOnlyDC; class WXDLLIMPEXP_FWD_CORE wxWindow; class WXDLLIMPEXP_FWD_CORE wxWindowBase; #endif // wxUSE_GUI @@ -287,9 +288,6 @@ class wxObjectEventFunctor : public wxEventFunctor wxEvtHandler *m_handler; wxEventFunction m_method; - // Provide a dummy default ctor for type info purposes - wxObjectEventFunctor() : m_handler(nullptr), m_method(nullptr) { } - WX_DECLARE_TYPEINFO_INLINE(wxObjectEventFunctor) }; @@ -460,9 +458,6 @@ class wxEventFunctorMethod EventHandler *m_handler; void (Class::*m_method)(EventArg&); - // Provide a dummy default ctor for type info purposes - wxEventFunctorMethod() = default; - typedef wxEventFunctorMethod thisClass; WX_DECLARE_TYPEINFO_INLINE(thisClass) @@ -516,9 +511,6 @@ class wxEventFunctorFunction : public wxEventFunctor private: void (*m_handler)(EventArg&); - // Provide a dummy default ctor for type info purposes - wxEventFunctorFunction() = default; - typedef wxEventFunctorFunction thisClass; WX_DECLARE_TYPEINFO_INLINE(thisClass) }; @@ -568,9 +560,6 @@ class wxEventFunctorFunctor : public wxEventFunctor // Use the address of the original functor for comparison in IsMatching: const void *m_handlerAddr; - // Provide a dummy default ctor for type info purposes - wxEventFunctorFunctor() = default; - typedef wxEventFunctorFunctor thisClass; WX_DECLARE_TYPEINFO_INLINE(thisClass) }; @@ -1857,7 +1846,7 @@ class WXDLLIMPEXP_CORE wxMouseEvent : public wxEvent, int GetClickCount() const { return m_clickCount; } // Find the logical position of the event given the DC - wxPoint GetLogicalPosition(const wxDC& dc) const; + wxPoint GetLogicalPosition(const wxReadOnlyDC& dc) const; // Get wheel rotation, positive or negative indicates direction of // rotation. Current devices all send an event when rotation is equal to @@ -2937,7 +2926,7 @@ class WXDLLIMPEXP_CORE wxUpdateUIEvent : public wxCommandEvent wxUpdateUIEvent(wxWindowID commandId = 0) : wxCommandEvent(wxEVT_UPDATE_UI, commandId) { - m_checked = + m_3checked = wxCHK_UNCHECKED; m_enabled = m_shown = m_setEnabled = @@ -2945,10 +2934,11 @@ class WXDLLIMPEXP_CORE wxUpdateUIEvent : public wxCommandEvent m_setText = m_setChecked = false; m_isCheckable = true; + m_is3State = false; } wxUpdateUIEvent(const wxUpdateUIEvent& event) : wxCommandEvent(event), - m_checked(event.m_checked), + m_3checked(event.m_3checked), m_enabled(event.m_enabled), m_shown(event.m_shown), m_setEnabled(event.m_setEnabled), @@ -2956,10 +2946,12 @@ class WXDLLIMPEXP_CORE wxUpdateUIEvent : public wxCommandEvent m_setText(event.m_setText), m_setChecked(event.m_setChecked), m_isCheckable(event.m_isCheckable), + m_is3State(event.m_is3State), m_text(event.m_text) { } - bool GetChecked() const { return m_checked; } + bool GetChecked() const { return Get3StateValue() != wxCHK_UNCHECKED; } + wxCheckBoxState Get3StateValue() const { return m_3checked; } bool GetEnabled() const { return m_enabled; } bool GetShown() const { return m_shown; } wxString GetText() const { return m_text; } @@ -2968,14 +2960,18 @@ class WXDLLIMPEXP_CORE wxUpdateUIEvent : public wxCommandEvent bool GetSetEnabled() const { return m_setEnabled; } bool GetSetShown() const { return m_setShown; } - void Check(bool check) { m_checked = check; m_setChecked = true; } + void Check(bool check) { Set3StateValue(check ? wxCHK_CHECKED : wxCHK_UNCHECKED); } + void Set3StateValue(wxCheckBoxState check); void Enable(bool enable) { m_enabled = enable; m_setEnabled = true; } void Show(bool show) { m_shown = show; m_setShown = true; } void SetText(const wxString& text) { m_text = text; m_setText = true; } // A flag saying if the item can be checked. True by default. bool IsCheckable() const { return m_isCheckable; } - void DisallowCheck() { m_isCheckable = false; } + void DisallowCheck(); + // A flag saying if the item can be wxCHK_UNDETERMINED. False by default. + bool Is3State() const { return m_is3State; } + void Allow3rdState(bool b = true); // Sets the interval between updates in milliseconds. // Set to -1 to disable updates, or to 0 to update as frequently as possible. @@ -3002,7 +2998,7 @@ class WXDLLIMPEXP_CORE wxUpdateUIEvent : public wxCommandEvent virtual wxEvent *Clone() const override { return new wxUpdateUIEvent(*this); } protected: - bool m_checked; + wxCheckBoxState m_3checked; bool m_enabled; bool m_shown; bool m_setEnabled; @@ -3010,6 +3006,7 @@ class WXDLLIMPEXP_CORE wxUpdateUIEvent : public wxCommandEvent bool m_setText; bool m_setChecked; bool m_isCheckable; + bool m_is3State; wxString m_text; #if wxUSE_LONGLONG static wxLongLong sm_lastUpdate; diff --git a/include/wx-3.3/wx/features.h b/include/wx-3.3/wx/features.h index fa7a9cf..344d1a3 100644 --- a/include/wx-3.3/wx/features.h +++ b/include/wx-3.3/wx/features.h @@ -112,7 +112,7 @@ physical pixels and a window must be 200px wide to have the same apparent size in high DPI as in normal DPI. */ -#if defined(__WXGTK3__) || defined(__WXMAC__) +#if defined(__WXGTK3__) || defined(__WXMAC__) || defined(__WXQT__) #define wxHAS_DPI_INDEPENDENT_PIXELS // This is an older synonym kept only for compatibility diff --git a/include/wx-3.3/wx/filepicker.h b/include/wx-3.3/wx/filepicker.h index f4b68ab..b91a327 100644 --- a/include/wx-3.3/wx/filepicker.h +++ b/include/wx-3.3/wx/filepicker.h @@ -86,20 +86,20 @@ class WXDLLIMPEXP_CORE wxFileDirPickerWidgetBase virtual ~wxFileDirPickerWidgetBase() = default; // Path here is the name of the selected file or directory. - wxString GetPath() const { return m_path; } + virtual wxString GetPath() const { return m_path; } virtual void SetPath(const wxString &str) { m_path=str; } // Set the directory to open the file browse dialog at initially. - virtual void SetInitialDirectory(const wxString& dir) = 0; + virtual void SetInitialDirectory(const wxString& dir) { m_initialDir = dir; } // returns the picker widget cast to wxControl virtual wxControl *AsControl() = 0; protected: - virtual void UpdateDialogPath(wxDialog *) = 0; - virtual void UpdatePathFromDialog(wxDialog *) = 0; - wxString m_path; + + // Initial directory set by SetInitialDirectory() call or empty. + wxString m_initialDir; }; // Styles which must be supported by all controls implementing wxFileDirPickerWidgetBase @@ -113,6 +113,8 @@ class WXDLLIMPEXP_CORE wxFileDirPickerWidgetBase #define wxFLP_CHANGE_DIR 0x4000 #define wxFLP_SMALL wxPB_SMALL +#define wxFILEBTN_DEFAULT_STYLE (wxFLP_OPEN) + // NOTE: wxMULTIPLE is not supported ! @@ -120,6 +122,9 @@ class WXDLLIMPEXP_CORE wxFileDirPickerWidgetBase #define wxDIRP_CHANGE_DIR 0x0010 #define wxDIRP_SMALL wxPB_SMALL +#define wxDIRBTN_DEFAULT_STYLE 0 + + // map platform-dependent controls which implement the wxFileDirPickerWidgetBase // under the name "wxFilePickerWidget" and "wxDirPickerWidget". diff --git a/include/wx-3.3/wx/gdicmn.h b/include/wx-3.3/wx/gdicmn.h index 8cc8f5f..363cdd5 100644 --- a/include/wx-3.3/wx/gdicmn.h +++ b/include/wx-3.3/wx/gdicmn.h @@ -986,10 +986,7 @@ wxDEPRECATED_MSG("Use wxList directly or just a standard container") wxResourceCache : public wxList { public: - wxResourceCache() = default; -#if !wxUSE_STD_CONTAINERS - wxResourceCache(unsigned int keyType) : wxList(keyType) { } -#endif + using wxList::wxList; virtual ~wxResourceCache() { wxList::compatibility_iterator node = GetFirst (); diff --git a/include/wx-3.3/wx/generic/creddlgg.h b/include/wx-3.3/wx/generic/creddlgg.h index 9f99cb8..6332af8 100644 --- a/include/wx-3.3/wx/generic/creddlgg.h +++ b/include/wx-3.3/wx/generic/creddlgg.h @@ -17,6 +17,8 @@ #include "wx/dialog.h" #include "wx/webrequest.h" +class WXDLLIMPEXP_FWD_CORE wxTextCtrl; + class WXDLLIMPEXP_CORE wxGenericCredentialEntryDialog : public wxDialog { public: @@ -30,9 +32,8 @@ class WXDLLIMPEXP_CORE wxGenericCredentialEntryDialog : public wxDialog const wxString& title, const wxWebCredentials& cred = wxWebCredentials()); - void SetUser(const wxString& user) { m_userTextCtrl->SetValue(user); } - void SetPassword(const wxString& password) - { m_passwordTextCtrl->SetValue(password); } + void SetUser(const wxString& user); + void SetPassword(const wxString& password); wxWebCredentials GetCredentials() const; diff --git a/include/wx-3.3/wx/generic/filepickerg.h b/include/wx-3.3/wx/generic/filepickerg.h index 40554c1..8a7ff89 100644 --- a/include/wx-3.3/wx/generic/filepickerg.h +++ b/include/wx-3.3/wx/generic/filepickerg.h @@ -27,7 +27,7 @@ class WXDLLIMPEXP_CORE wxGenericFileDirButton : public wxButton, public wxFileDirPickerWidgetBase { public: - wxGenericFileDirButton() { Init(); } + wxGenericFileDirButton() = default; wxGenericFileDirButton(wxWindow *parent, wxWindowID id, const wxString& label = wxASCII_STR(wxFilePickerWidgetLabel), @@ -40,7 +40,6 @@ class WXDLLIMPEXP_CORE wxGenericFileDirButton : public wxButton, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxASCII_STR(wxFilePickerWidgetNameStr)) { - Init(); Create(parent, id, label, path, message, wildcard, pos, size, style, validator, name); } @@ -56,8 +55,6 @@ class WXDLLIMPEXP_CORE wxGenericFileDirButton : public wxButton, virtual wxEventType GetEventType() const = 0; - virtual void SetInitialDirectory(const wxString& dir) override; - public: bool Create(wxWindow *parent, wxWindowID id, @@ -75,19 +72,17 @@ class WXDLLIMPEXP_CORE wxGenericFileDirButton : public wxButton, void OnButtonClick(wxCommandEvent &); protected: + // Return the path from the button-specific dialog (this is the same dialog + // that is returned by CreateDialog()). + virtual wxString GetPathFromDialog(wxDialog *p) const = 0; + + wxString m_message, m_wildcard; // we just store the style passed to the ctor here instead of passing it to // wxButton as some of our bits can conflict with wxButton styles and it // just doesn't make sense to use picker styles for wxButton anyhow - long m_pickerStyle; - - // Initial directory set by SetInitialDirectory() call or empty. - wxString m_initialDir; - -private: - // common part of all ctors - void Init() { m_pickerStyle = -1; } + long m_pickerStyle = -1; }; @@ -95,8 +90,6 @@ class WXDLLIMPEXP_CORE wxGenericFileDirButton : public wxButton, // wxGenericFileButton: a button which brings up a wxFileDialog //----------------------------------------------------------------------------- -#define wxFILEBTN_DEFAULT_STYLE (wxFLP_OPEN) - class WXDLLIMPEXP_CORE wxGenericFileButton : public wxGenericFileDirButton { public: @@ -119,40 +112,42 @@ class WXDLLIMPEXP_CORE wxGenericFileButton : public wxGenericFileDirButton public: // overridable - virtual long GetDialogStyle() const + static long GetDialogStyle(long pickerStyle) { - // the derived class must initialize it if it doesn't use the - // non-default wxGenericFileDirButton ctor - wxASSERT_MSG( m_pickerStyle != -1, - "forgot to initialize m_pickerStyle?" ); - - long filedlgstyle = 0; - if ( m_pickerStyle & wxFLP_OPEN ) + if ( pickerStyle & wxFLP_OPEN ) filedlgstyle |= wxFD_OPEN; - if ( m_pickerStyle & wxFLP_SAVE ) + if ( pickerStyle & wxFLP_SAVE ) filedlgstyle |= wxFD_SAVE; - if ( m_pickerStyle & wxFLP_OVERWRITE_PROMPT ) + if ( pickerStyle & wxFLP_OVERWRITE_PROMPT ) filedlgstyle |= wxFD_OVERWRITE_PROMPT; - if ( m_pickerStyle & wxFLP_FILE_MUST_EXIST ) + if ( pickerStyle & wxFLP_FILE_MUST_EXIST ) filedlgstyle |= wxFD_FILE_MUST_EXIST; - if ( m_pickerStyle & wxFLP_CHANGE_DIR ) + if ( pickerStyle & wxFLP_CHANGE_DIR ) filedlgstyle |= wxFD_CHANGE_DIR; return filedlgstyle; } + long GetDialogStyle() const + { + // the derived class must initialize it if it doesn't use the + // non-default wxGenericFileDirButton ctor + wxASSERT_MSG( m_pickerStyle != -1, + "forgot to initialize m_pickerStyle?" ); + + return GetDialogStyle(m_pickerStyle); + } + virtual wxDialog *CreateDialog() override; wxEventType GetEventType() const override { return wxEVT_FILEPICKER_CHANGED; } protected: - void UpdateDialogPath(wxDialog *p) override - { wxStaticCast(p, wxFileDialog)->SetPath(m_path); } - void UpdatePathFromDialog(wxDialog *p) override - { m_path = wxStaticCast(p, wxFileDialog)->GetPath(); } + wxString GetPathFromDialog(wxDialog *p) const override + { return wxStaticCast(p, wxFileDialog)->GetPath(); } private: wxDECLARE_DYNAMIC_CLASS(wxGenericFileButton); @@ -163,8 +158,6 @@ class WXDLLIMPEXP_CORE wxGenericFileButton : public wxGenericFileDirButton // wxGenericDirButton: a button which brings up a wxDirDialog //----------------------------------------------------------------------------- -#define wxDIRBTN_DEFAULT_STYLE 0 - class WXDLLIMPEXP_CORE wxGenericDirButton : public wxGenericFileDirButton { public: @@ -186,28 +179,31 @@ class WXDLLIMPEXP_CORE wxGenericDirButton : public wxGenericFileDirButton public: // overridable - virtual long GetDialogStyle() const + static long GetDialogStyle(long pickerStyle) { long dirdlgstyle = wxDD_DEFAULT_STYLE; - if ( m_pickerStyle & wxDIRP_DIR_MUST_EXIST ) + if ( pickerStyle & wxDIRP_DIR_MUST_EXIST ) dirdlgstyle |= wxDD_DIR_MUST_EXIST; - if ( m_pickerStyle & wxDIRP_CHANGE_DIR ) + if ( pickerStyle & wxDIRP_CHANGE_DIR ) dirdlgstyle |= wxDD_CHANGE_DIR; return dirdlgstyle; } + long GetDialogStyle() const + { + return GetDialogStyle(m_pickerStyle); + } + virtual wxDialog *CreateDialog() override; wxEventType GetEventType() const override { return wxEVT_DIRPICKER_CHANGED; } protected: - void UpdateDialogPath(wxDialog *p) override - { wxStaticCast(p, wxDirDialog)->SetPath(m_path); } - void UpdatePathFromDialog(wxDialog *p) override - { m_path = wxStaticCast(p, wxDirDialog)->GetPath(); } + wxString GetPathFromDialog(wxDialog *p) const override + { return wxStaticCast(p, wxDirDialog)->GetPath(); } private: wxDECLARE_DYNAMIC_CLASS(wxGenericDirButton); diff --git a/include/wx-3.3/wx/generic/grid.h b/include/wx-3.3/wx/generic/grid.h index aeb6363..7b98aa8 100644 --- a/include/wx-3.3/wx/generic/grid.h +++ b/include/wx-3.3/wx/generic/grid.h @@ -18,6 +18,7 @@ #include "wx/scrolwin.h" #include +#include #include #include @@ -120,6 +121,11 @@ class wxGridRowOperations; class wxGridColumnOperations; class wxGridDirectionOperations; +#if wxUSE_ACCESSIBILITY +class WXDLLIMPEXP_FWD_CORE wxGridAccessible; +class WXDLLIMPEXP_FWD_CORE wxGridCellAccessible; +#endif // wxUSE_ACCESSIBILITY + // ---------------------------------------------------------------------------- // macros @@ -194,46 +200,48 @@ class WXDLLIMPEXP_CORE wxGridCellRenderer : public wxGridCellWorker int row, int col, bool isSelected) = 0; - // get the preferred size of the cell for its contents - virtual wxSize GetBestSize(wxGrid& grid, - wxGridCellAttr& attr, - wxDC& dc, - int row, int col) = 0; + // get the preferred size of the cell for its contents: this function must + // be overridden by all derived classes, it's not pure virtual only due to + // backwards-compatibility concerns. + virtual wxSize GetPreferredSize(wxGrid& grid, + wxGridCellAttr& attr, + wxReadOnlyDC& dc, + int row, int col); // Get the preferred height for a given width. Override this method if the // renderer computes height as function of its width, as is the case of the // standard wxGridCellAutoWrapStringRenderer, for example. // and vice versa - virtual int GetBestHeight(wxGrid& grid, - wxGridCellAttr& attr, - wxDC& dc, - int row, int col, - int WXUNUSED(width)) + virtual int GetPreferredHeight(wxGrid& grid, + wxGridCellAttr& attr, + wxReadOnlyDC& dc, + int row, int col, + int WXUNUSED(width)) { - return GetBestSize(grid, attr, dc, row, col).GetHeight(); + return GetPreferredSize(grid, attr, dc, row, col).GetHeight(); } // Get the preferred width for a given height, this is the symmetric - // version of GetBestHeight(). - virtual int GetBestWidth(wxGrid& grid, - wxGridCellAttr& attr, - wxDC& dc, - int row, int col, - int WXUNUSED(height)) + // version of GetPreferredHeight(). + virtual int GetPreferredWidth(wxGrid& grid, + wxGridCellAttr& attr, + wxReadOnlyDC& dc, + int row, int col, + int WXUNUSED(height)) { - return GetBestSize(grid, attr, dc, row, col).GetWidth(); + return GetPreferredSize(grid, attr, dc, row, col).GetWidth(); } - // Unlike GetBestSize(), this functions is optional: it is used when + // Unlike GetPreferredSize(), this functions is optional: it is used when // auto-sizing columns to determine the best width without iterating over // all cells in this column, if possible. // // If it isn't, return wxDefaultSize as the base class version does by // default. - virtual wxSize GetMaxBestSize(wxGrid& WXUNUSED(grid), - wxGridCellAttr& WXUNUSED(attr), - wxDC& WXUNUSED(dc)) + virtual wxSize GetMaxSize(wxGrid& WXUNUSED(grid), + wxGridCellAttr& WXUNUSED(attr), + wxReadOnlyDC& WXUNUSED(dc)) { return wxDefaultSize; } @@ -241,6 +249,28 @@ class WXDLLIMPEXP_CORE wxGridCellRenderer : public wxGridCellWorker // create a new object which is the copy of this one virtual wxGridCellRenderer *Clone() const = 0; + + // These functions still exist for compatibility and are the ones actually + // called by wxGrid, but new code should implement the new functions using + // "Preferred" in their names instead, to which these ones forward. + virtual wxSize GetBestSize(wxGrid& grid, + wxGridCellAttr& attr, + wxDC& dc, + int row, int col); + virtual int GetBestHeight(wxGrid& grid, + wxGridCellAttr& attr, + wxDC& dc, + int row, int col, + int width); + virtual int GetBestWidth(wxGrid& grid, + wxGridCellAttr& attr, + wxDC& dc, + int row, int col, + int height); + virtual wxSize GetMaxBestSize(wxGrid& grid, + wxGridCellAttr& attr, + wxDC& dc); + protected: // set the text colours before drawing void SetTextColoursAndFont(const wxGrid& grid, @@ -608,6 +638,19 @@ class WXDLLIMPEXP_CORE wxGridHeaderLabelsRenderer int horizAlign, int vertAlign, int textOrientation) const; + + // argument 'flags' for DrawHighlighted + enum DrawFlags + { + Draw_Pressed = 1 + }; + + // Draw highlighted row/col label. + virtual void DrawHighlighted(const wxGrid& grid, + wxDC& dc, + wxRect& rect, + int rowOrCol, + int flags = 0) const; }; // Currently the row/column/corner renders don't need any methods other than @@ -638,6 +681,12 @@ class WXDLLIMPEXP_CORE wxGridRowHeaderRendererDefault virtual void DrawBorder(const wxGrid& grid, wxDC& dc, wxRect& rect) const override; + + virtual void DrawHighlighted(const wxGrid& grid, + wxDC& dc, + wxRect& rect, + int row, + int flags = 0) const override; }; // Column header cells renderers @@ -648,6 +697,12 @@ class WXDLLIMPEXP_CORE wxGridColumnHeaderRendererDefault virtual void DrawBorder(const wxGrid& grid, wxDC& dc, wxRect& rect) const override; + + virtual void DrawHighlighted(const wxGrid& grid, + wxDC& dc, + wxRect& rect, + int col, + int flags = 0) const override; }; // Header corner renderer @@ -968,19 +1023,24 @@ class WXDLLIMPEXP_CORE wxGridCellCoords void SetCol( int n ) { m_col = n; } void Set( int row, int col ) { m_row = row; m_col = col; } + bool IsFullySpecified() const + { + return (m_row != -1 && m_col != -1); + } + bool operator==( const wxGridCellCoords& other ) const { - return (m_row == other.m_row && m_col == other.m_col); + return (m_row == other.m_row && m_col == other.m_col); } bool operator!=( const wxGridCellCoords& other ) const { - return (m_row != other.m_row || m_col != other.m_col); + return (m_row != other.m_row || m_col != other.m_col); } bool operator!() const { - return (m_row == -1 && m_col == -1 ); + return (m_row == -1 && m_col == -1); } private: @@ -1630,8 +1690,9 @@ class WXDLLIMPEXP_CORE wxGrid : public wxScrolledCanvas void DrawAllGridWindowLines( wxDC& dc, const wxRegion & reg , wxGridWindow *gridWindow); void DrawCell( wxDC& dc, const wxGridCellCoords& ); void DrawHighlight(wxDC& dc, const wxGridCellCoordsVector& cells); - void DrawFrozenBorder( wxDC& dc, wxGridWindow *gridWindow ); + void DrawFrozenBorder( wxDC& dc, wxGridWindow *gridWindow, const wxRect& renderExtent = {} ); void DrawLabelFrozenBorder( wxDC& dc, wxWindow *window, bool isRow ); + void DrawOverlaySelection( wxDC& dc, wxGridWindow *gridWindow, const wxRect& renderExtent = {} ); void ScrollWindow( int dx, int dy, const wxRect *rect ) override; @@ -1682,7 +1743,7 @@ class WXDLLIMPEXP_CORE wxGrid : public wxScrolledCanvas // void StringToLines( const wxString& value, wxArrayString& lines ) const; - void GetTextBoxSize( const wxDC& dc, + void GetTextBoxSize( const wxReadOnlyDC& dc, const wxArrayString& lines, long *width, long *height ) const; @@ -1694,6 +1755,16 @@ class WXDLLIMPEXP_CORE wxGrid : public wxScrolledCanvas void RefreshBlock(int topRow, int leftCol, int bottomRow, int rightCol); + // This function simply calls RefreshRect() to refresh the cell at coordinates + // _coords_ and its corresponding row and column labels for highlighting. + void RefreshBlock(const wxGridCellCoords& coords); + + // Refresh the entire grid if _rect_ is null. If not null, then: + // - the intersection of the cells area with the rectangle _rect_ will be refreshed. + // - the projection of the rectangle _rect_ on the row label window will be refreshed. + // - the projection of the rectangle _rect_ on the col label window will be refreshed. + void RefreshRect(wxRect* rect); + // Refresh one or more areas (a combination of wxGridArea enums) entirely. void RefreshArea(int areas); @@ -1845,8 +1916,10 @@ class WXDLLIMPEXP_CORE wxGrid : public wxScrolledCanvas // int GetDefaultRowLabelSize() const { return FromDIP(WXGRID_DEFAULT_ROW_LABEL_WIDTH); } int GetRowLabelSize() const { return m_rowLabelWidth; } + int GetRowLabelMinimalSize() const { return m_colLabelMinHeight; } int GetDefaultColLabelSize() const { return FromDIP(WXGRID_DEFAULT_COL_LABEL_HEIGHT); } int GetColLabelSize() const { return m_colLabelHeight; } + int GetColLabelMinimalSize() const { return m_rowLabelMinWidth; } wxColour GetLabelBackgroundColour() const { return m_labelBackgroundColour; } wxColour GetLabelTextColour() const { return m_labelTextColour; } wxFont GetLabelFont() const { return m_labelFont; } @@ -1874,6 +1947,8 @@ class WXDLLIMPEXP_CORE wxGrid : public wxScrolledCanvas void SetRowLabelSize( int width ); void SetColLabelSize( int height ); + void SetRowLabelMinimalSize( int width ); + void SetColLabelMinimalSize( int height ); void HideRowLabels() { SetRowLabelSize( 0 ); } void HideColLabels() { SetColLabelSize( 0 ); } void SetLabelBackgroundColour( const wxColour& ); @@ -1941,6 +2016,19 @@ class WXDLLIMPEXP_CORE wxGrid : public wxScrolledCanvas bool CanDragColSize(int col) const { return m_canDragColSize && DoCanResizeLine(col, m_setFixedCols); } + // functions globally enabling row/column label interactive resizing + // (disabled by default) + void EnableDragRowLabelSize(bool enable = true); + void DisableDragRowLabelSize() { EnableDragRowLabelSize(false); } + + void EnableDragColLabelSize(bool enable = true); + void DisableDragColLabelSize() { EnableDragColLabelSize(false); } + + bool CanDragRowLabelSize() const + { return m_canDragRowLabelSize; } + bool CanDragColLabelSize() const + { return m_canDragColLabelSize; } + // interactive row reordering (disabled by default) bool EnableDragRowMove( bool enable = true ); void DisableDragRowMove() { EnableDragRowMove( false ); } @@ -2228,7 +2316,9 @@ class WXDLLIMPEXP_CORE wxGrid : public wxScrolledCanvas wxGridCellEditor *GetDefaultEditor() const; wxGridCellEditor* GetCellEditor(int row, int col) const; - + // Determine (in constant time) whether the row/col should be highlighted or not. + bool IsRowLabelHighlighted(int row) const; + bool IsColLabelHighlighted(int col) const; // ------ cell value accessors // @@ -2257,6 +2347,12 @@ class WXDLLIMPEXP_CORE wxGrid : public wxScrolledCanvas // make the cell editable/readonly void SetReadOnly(int row, int col, bool isReadOnly = true); + // Return @true if overlay selection can be used (wxUSE_GRAPHICS_CONTEXT=1) + // and DisableOverlaySelection() hadn't been called. + bool UsesOverlaySelection() const; + + void DisableOverlaySelection(); + // ------ select blocks of cells // void SelectRow( int row, bool addToSelected = false ); @@ -2304,6 +2400,9 @@ class WXDLLIMPEXP_CORE wxGrid : public wxScrolledCanvas wxArrayInt GetSelectedRows() const; wxArrayInt GetSelectedCols() const; + // Return the selected blocks (only the visible ones) as a vector of rects. + void GetSelectedRectangles(std::vector& rectangles, const wxRect& renderExtent) const; + // This function returns the rectangle that encloses the block of cells // limited by TopLeft and BottomRight cell in device coords and clipped // to the client size of the grid window. @@ -2312,6 +2411,14 @@ class WXDLLIMPEXP_CORE wxGrid : public wxScrolledCanvas const wxGridCellCoords & bottomRight, const wxGridWindow *gridWindow = nullptr) const; + // Similar to BlockToDeviceRect() above but mainly for grid selection use. + // i.e. GetSelectedRectangles() uses this function as a helper. + void BlockToDeviceRect(const wxGridCellCoords& topLeft, + const wxGridCellCoords& bottomRight, + wxGridWindow* gridWin, + std::vector& rectangles, + const wxRect& renderExtent) const; + // Access or update the selection fore/back colours wxColour GetSelectionBackground() const { return m_selectionBackground; } @@ -2376,6 +2483,7 @@ class WXDLLIMPEXP_CORE wxGrid : public wxScrolledCanvas // ------- drag and drop #if wxUSE_DRAG_AND_DROP virtual void SetDropTarget(wxDropTarget *dropTarget) override; + virtual wxDropTarget* GetDropTarget() const override; #endif // wxUSE_DRAG_AND_DROP @@ -2404,6 +2512,9 @@ class WXDLLIMPEXP_CORE wxGrid : public wxScrolledCanvas // unset any existing sorting column void UnsetSortingColumn() { SetSortingColumn(wxNOT_FOUND); } + // Invalidate overlay selection whenever the selection changes or scrolls. + void InvalidateOverlaySelection(); + // override some base class functions virtual void Fit() override; virtual void SetFocus() override; @@ -2411,6 +2522,13 @@ class WXDLLIMPEXP_CORE wxGrid : public wxScrolledCanvas // implementation only void CancelMouseCapture(); +#if wxUSE_ACCESSIBILITY + virtual wxAccessible* CreateAccessible() override; + virtual bool Show(bool show) override; + virtual void SetName(const wxString &name) override; + virtual bool Reparent(wxWindowBase *newParent) override; +#endif // wxUSE_ACCESSIBILITY + protected: virtual wxSize DoGetBestSize() const override; virtual void DoEnable(bool enable) override; @@ -2469,6 +2587,10 @@ class WXDLLIMPEXP_CORE wxGrid : public wxScrolledCanvas wxColour m_selectionBackground; wxColour m_selectionForeground; +#if wxUSE_GRAPHICS_CONTEXT + bool m_usesOverlaySelection = true; +#endif + // NB: *never* access m_row/col arrays directly because they are created // on demand, *always* use accessor functions instead! @@ -2509,6 +2631,8 @@ class WXDLLIMPEXP_CORE wxGrid : public wxScrolledCanvas int m_rowLabelWidth; int m_colLabelHeight; + int m_rowLabelMinWidth; + int m_colLabelMinHeight; // the size of the margin left to the right and bottom of the cell area int m_extraWidth, @@ -2646,6 +2770,8 @@ class WXDLLIMPEXP_CORE wxGrid : public wxScrolledCanvas bool m_canDragColMove; bool m_canHideColumns; bool m_canDragGridSize; + bool m_canDragRowLabelSize; + bool m_canDragColLabelSize; bool m_canDragCell; // Index of the row or column being drag-moved or -1 if there is no move @@ -2662,9 +2788,13 @@ class WXDLLIMPEXP_CORE wxGrid : public wxScrolledCanvas // or -1 if there is no resize operation in progress. int m_dragRowOrCol; - // Original row or column size when resizing; used when the user cancels + // Original row, column or label size when resizing; used when the user cancels int m_dragRowOrColOldSize; + // Row or column labels (depending on m_cursorMode value) currently being + // resized + bool m_dragLabel; + // true if a drag operation is in progress; when this is true, // m_startDragPos is valid, i.e. not wxDefaultPosition bool m_isDragging; @@ -2769,6 +2899,11 @@ class WXDLLIMPEXP_CORE wxGrid : public wxScrolledCanvas friend class wxGridHeaderColumn; friend class wxGridHeaderCtrl; +#if wxUSE_ACCESSIBILITY + friend class wxGridAccessible; + friend class wxGridCellAccessible; +#endif // wxUSE_ACCESSIBILITY + private: // This is called from both Create() and OnDPIChanged() to (re)initialize // the values in pixels, which depend on the current DPI. @@ -2880,10 +3015,14 @@ class WXDLLIMPEXP_CORE wxGrid : public wxScrolledCanvas const wxGridOperations& oper, wxGridWindow* gridWindow); + // helper to get the wxGridOperations that match the cursor mode + std::unique_ptr DoGetOperationsFromCursorMode(void); + // process different clicks on grid cells void DoGridCellLeftDown(wxMouseEvent& event, const wxGridCellCoords& coords, - const wxPoint& pos); + const wxPoint& pos, + wxGridWindow* gridWindow); void DoGridCellLeftDClick(wxMouseEvent& event, const wxGridCellCoords& coords, const wxPoint& pos); @@ -2913,13 +3052,16 @@ class WXDLLIMPEXP_CORE wxGrid : public wxScrolledCanvas void DoStartResizeRowOrCol(int col, int size); void DoStartMoveRowOrCol(int col); + void DoStartResizeLabel(int size); // These functions should only be called when actually resizing/moving, - // i.e. m_dragRowOrCol and m_dragMoveCol, respectively, are valid. - void DoEndDragResizeRow(const wxMouseEvent& event, wxGridWindow *gridWindow); - void DoEndDragResizeCol(const wxMouseEvent& event, wxGridWindow *gridWindow); + // i.e. m_dragRowOrCol, m_dragMoveCol, m_dragLabel, respectively, are valid. + void DoEndDragResizeRowOrCol(const wxMouseEvent& event, wxGridWindow* gridWindow, + const wxGridOperations& oper); void DoEndMoveRow(int pos); void DoEndMoveCol(int pos); + void DoEndDragResizeLabel(const wxMouseEvent& event, wxGridWindow* gridWindow, + const wxGridOperations& oper); // Helper function returning the position (only the horizontal component // really counts) corresponding to the given column drag-resize event. @@ -3147,6 +3289,8 @@ class WXDLLIMPEXP_CORE wxGridEvent : public wxNotifyEvent, int GetRow() const { return m_row; } int GetCol() const { return m_col; } + int GetNewRow() const { return m_col; } + int GetNewCol() const { return m_row; } wxPoint GetPosition() const { return wxPoint( m_x, m_y ); } bool Selecting() const { return m_selecting; } @@ -3343,6 +3487,8 @@ wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_GRID_ROW_SIZE, wxGridSizeEvent wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_GRID_ROW_AUTO_SIZE, wxGridSizeEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_GRID_COL_SIZE, wxGridSizeEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_GRID_COL_AUTO_SIZE, wxGridSizeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_GRID_ROW_LABEL_SIZE, wxGridSizeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_GRID_COL_LABEL_SIZE, wxGridSizeEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_GRID_RANGE_SELECTING, wxGridRangeSelectEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_GRID_RANGE_SELECTED, wxGridRangeSelectEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_GRID_CELL_CHANGING, wxGridEvent ); @@ -3397,6 +3543,8 @@ typedef void (wxEvtHandler::*wxGridEditorCreatedEventFunction)(wxGridEditorCreat #define EVT_GRID_CMD_ROW_SIZE(id, fn) wx__DECLARE_GRIDSIZEEVT(ROW_SIZE, id, fn) #define EVT_GRID_CMD_COL_SIZE(id, fn) wx__DECLARE_GRIDSIZEEVT(COL_SIZE, id, fn) #define EVT_GRID_CMD_COL_AUTO_SIZE(id, fn) wx__DECLARE_GRIDSIZEEVT(COL_AUTO_SIZE, id, fn) +#define EVT_GRID_CMD_ROW_LABEL_SIZE(id, fn) wx__DECLARE_GRIDSIZEEVT(ROW_LABEL_SIZE, id, fn) +#define EVT_GRID_CMD_COL_LABEL_SIZE(id, fn) wx__DECLARE_GRIDSIZEEVT(COL_LABEL_SIZE, id, fn) #define EVT_GRID_CMD_ROW_MOVE(id, fn) wx__DECLARE_GRIDEVT(ROW_MOVE, id, fn) #define EVT_GRID_CMD_COL_MOVE(id, fn) wx__DECLARE_GRIDEVT(COL_MOVE, id, fn) #define EVT_GRID_CMD_COL_SORT(id, fn) wx__DECLARE_GRIDEVT(COL_SORT, id, fn) @@ -3424,6 +3572,8 @@ typedef void (wxEvtHandler::*wxGridEditorCreatedEventFunction)(wxGridEditorCreat #define EVT_GRID_ROW_SIZE(fn) EVT_GRID_CMD_ROW_SIZE(wxID_ANY, fn) #define EVT_GRID_COL_SIZE(fn) EVT_GRID_CMD_COL_SIZE(wxID_ANY, fn) #define EVT_GRID_COL_AUTO_SIZE(fn) EVT_GRID_CMD_COL_AUTO_SIZE(wxID_ANY, fn) +#define EVT_GRID_ROW_LABEL_SIZE(fn) EVT_GRID_CMD_ROW_LABEL_SIZE(wxID_ANY, fn) +#define EVT_GRID_COL_LABEL_SIZE(fn) EVT_GRID_CMD_COL_LABEL_SIZE(wxID_ANY, fn) #define EVT_GRID_ROW_MOVE(fn) EVT_GRID_CMD_ROW_MOVE(wxID_ANY, fn) #define EVT_GRID_COL_MOVE(fn) EVT_GRID_CMD_COL_MOVE(wxID_ANY, fn) #define EVT_GRID_COL_SORT(fn) EVT_GRID_CMD_COL_SORT(wxID_ANY, fn) diff --git a/include/wx-3.3/wx/generic/gridctrl.h b/include/wx-3.3/wx/generic/gridctrl.h index 989149f..06a56f4 100644 --- a/include/wx-3.3/wx/generic/gridctrl.h +++ b/include/wx-3.3/wx/generic/gridctrl.h @@ -52,7 +52,7 @@ class WXDLLIMPEXP_ADV wxGridCellStringRenderer : public wxGridCellRenderer protected: // calc the string extent for given string/font wxSize DoGetBestSize(const wxGridCellAttr& attr, - wxDC& dc, + wxReadOnlyDC& dc, const wxString& text); }; @@ -381,7 +381,7 @@ class WXDLLIMPEXP_ADV wxGridCellAutoWrapStringRenderer : public wxGridCellString private: wxArrayString GetTextLines( wxGrid& grid, - wxDC& dc, + wxReadOnlyDC& dc, const wxGridCellAttr& attr, const wxRect& rect, int row, int col); @@ -391,7 +391,7 @@ class WXDLLIMPEXP_ADV wxGridCellAutoWrapStringRenderer : public wxGridCellString // Break a single logical line of text into several physical lines, all of // which are added to the lines array. The lines are broken at maxWidth and // the dc is used for measuring text extent only. - void BreakLine(wxDC& dc, + void BreakLine(wxReadOnlyDC& dc, const wxString& logicalLine, wxCoord maxWidth, wxArrayString& lines); @@ -401,7 +401,7 @@ class WXDLLIMPEXP_ADV wxGridCellAutoWrapStringRenderer : public wxGridCellString // is returned in line output parameter. // // Returns the width of the last line. - wxCoord BreakWord(wxDC& dc, + wxCoord BreakWord(wxReadOnlyDC& dc, const wxString& word, wxCoord maxWidth, wxArrayString& lines, diff --git a/include/wx-3.3/wx/generic/gridsel.h b/include/wx-3.3/wx/generic/gridsel.h index f89b1d9..65d51d7 100644 --- a/include/wx-3.3/wx/generic/gridsel.h +++ b/include/wx-3.3/wx/generic/gridsel.h @@ -18,6 +18,13 @@ #include "wx/vector.h" +#include + +// Forward declaration +namespace wxGridPrivate { class SelectionShape; } + +using wxSelectionShape = wxGridPrivate::SelectionShape; + wxDEPRECATED_MSG("use wxGridBlockCoordsVector instead") typedef wxVector wxVectorGridBlockCoords; @@ -114,6 +121,11 @@ class WXDLLIMPEXP_CORE wxGridSelection void EndSelecting(); void CancelSelecting(); + // Return the SelectionShape object. Call ComputeSelectionShape() if necessary. + const wxSelectionShape& GetSelectionShape(const wxRect& renderExtent); + + void InvalidateSelectionShape(); + private: void SelectBlockNoEvent(const wxGridBlockCoords& block) { @@ -139,6 +151,9 @@ class WXDLLIMPEXP_CORE wxGridSelection void MergeOrAddBlock(wxGridBlockCoordsVector& blocks, const wxGridBlockCoords& block); + // Called each time the selection changed or scrolled to recompute m_selectionShape. + void ComputeSelectionShape(const wxRect& renderExtent = {}); + // All currently selected blocks. We expect there to be a relatively small // amount of them, even for very large grids, as each block must be // selected by the user, so we store them unsorted. @@ -151,6 +166,17 @@ class WXDLLIMPEXP_CORE wxGridSelection wxGrid *m_grid; wxGrid::wxGridSelectionModes m_selectionMode; + // Used by wxGrid::DrawOverlaySelection() to draw a: + // + // - Simple rectangle (using wxDC::DrawRectangle() if it is empty and the bounding box is valid. + // - Simple polygon (using wxDC::DrawPolygon()) if it represents a simple polygon. + // - Poly-polygon (using wxDC::DrawPolyPolygon()) if it consists of multiple polygons. + // + std::unique_ptr m_selectionShape; + + // See ComputeSelectionShape() definition for explanation. + bool m_updateHighlightedLabels = false; + wxDECLARE_NO_COPY_CLASS(wxGridSelection); }; diff --git a/include/wx-3.3/wx/generic/textdlgg.h b/include/wx-3.3/wx/generic/textdlgg.h index 042bb7c..344af7a 100644 --- a/include/wx-3.3/wx/generic/textdlgg.h +++ b/include/wx-3.3/wx/generic/textdlgg.h @@ -46,9 +46,10 @@ class WXDLLIMPEXP_CORE wxTextEntryDialog : public wxDialog const wxString& caption = wxASCII_STR(wxGetTextFromUserPromptStr), const wxString& value = wxEmptyString, long style = wxTextEntryDialogStyle, - const wxPoint& pos = wxDefaultPosition) + const wxPoint& pos = wxDefaultPosition, + const wxSize sz = wxDefaultSize) { - Create(parent, message, caption, value, style, pos); + Create(parent, message, caption, value, style, pos, sz); } bool Create(wxWindow *parent, @@ -56,7 +57,8 @@ class WXDLLIMPEXP_CORE wxTextEntryDialog : public wxDialog const wxString& caption = wxASCII_STR(wxGetTextFromUserPromptStr), const wxString& value = wxEmptyString, long style = wxTextEntryDialogStyle, - const wxPoint& pos = wxDefaultPosition); + const wxPoint& pos = wxDefaultPosition, + const wxSize sz = wxDefaultSize); void SetValue(const wxString& val); wxString GetValue() const { return m_value; } diff --git a/include/wx-3.3/wx/generic/treectlg.h b/include/wx-3.3/wx/generic/treectlg.h index 8475561..7bfd825 100644 --- a/include/wx-3.3/wx/generic/treectlg.h +++ b/include/wx-3.3/wx/generic/treectlg.h @@ -329,7 +329,7 @@ class WXDLLIMPEXP_CORE wxGenericTreeCtrl : public wxTreeCtrlBase, void PaintLevel( wxGenericTreeItem *item, wxDC& dc, int level, int &y ); void PaintItem( wxGenericTreeItem *item, wxDC& dc); - void CalculateLevel( wxGenericTreeItem *item, wxDC &dc, int level, int &y ); + void CalculateLevel( wxGenericTreeItem *item, wxReadOnlyDC &dc, int level, int &y ); void CalculatePositions(); void RefreshSubtree( wxGenericTreeItem *item ); diff --git a/include/wx-3.3/wx/geometry.h b/include/wx-3.3/wx/geometry.h index 58ec552..fa0b991 100644 --- a/include/wx-3.3/wx/geometry.h +++ b/include/wx-3.3/wx/geometry.h @@ -35,7 +35,7 @@ enum wxOutCode class WXDLLIMPEXP_CORE wxPoint2DInt { public : - inline wxPoint2DInt(); + wxPoint2DInt() = default; inline wxPoint2DInt( wxInt32 x , wxInt32 y ); inline wxPoint2DInt( const wxPoint &pt ); // default copy ctor and copy-assign operator are OK @@ -61,10 +61,8 @@ public : inline wxPoint2DInt& operator+=(const wxPoint2DInt& pt); inline wxPoint2DInt& operator-=(const wxPoint2DInt& pt); - inline wxPoint2DInt& operator*=(const wxPoint2DInt& pt); inline wxPoint2DInt& operator*=(wxDouble n); inline wxPoint2DInt& operator*=(wxInt32 n); - inline wxPoint2DInt& operator/=(const wxPoint2DInt& pt); inline wxPoint2DInt& operator/=(wxDouble n); inline wxPoint2DInt& operator/=(wxInt32 n); inline operator wxPoint() const; @@ -82,11 +80,6 @@ public : } - friend wxPoint2DInt operator*(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2) - { - return wxPoint2DInt( pt1.m_x * pt2.m_x , pt1.m_y * pt2.m_y ); - } - friend wxPoint2DInt operator*(wxInt32 n , const wxPoint2DInt& pt) { return wxPoint2DInt( pt.m_x * n , pt.m_y * n ); @@ -109,11 +102,6 @@ public : static_cast(pt.m_y * n) ); } - friend wxPoint2DInt operator/(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2) - { - return wxPoint2DInt( pt1.m_x / pt2.m_x , pt1.m_y / pt2.m_y ); - } - friend wxPoint2DInt operator/(const wxPoint2DInt& pt , wxInt32 n) { return wxPoint2DInt( pt.m_x / n , pt.m_y / n ); @@ -130,15 +118,39 @@ public : void ReadFrom( wxDataInputStream &stream ); #endif // wxUSE_STREAMS - wxInt32 m_x; - wxInt32 m_y; -}; +#if WXWIN_COMPATIBILITY_3_2 + wxDEPRECATED_MSG("Multiplying points doesn't make sense") + wxPoint2DInt& operator*=(const wxPoint2DInt& pt) + { + m_x *= pt.m_x; + m_y *= pt.m_y; + return *this; + } -inline wxPoint2DInt::wxPoint2DInt() -{ - m_x = 0; - m_y = 0; -} + wxDEPRECATED_MSG("Multiplying points doesn't make sense") + friend wxPoint2DInt operator*(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2) + { + return wxPoint2DInt( pt1.m_x * pt2.m_x , pt1.m_y * pt2.m_y ); + } + + wxDEPRECATED_MSG("Dividing points doesn't make sense") + inline wxPoint2DInt& operator/=(const wxPoint2DInt& pt) + { + m_x /= pt.m_x; + m_y /= pt.m_y; + return *this; + } + + wxDEPRECATED_MSG("Dividing points doesn't make sense") + friend wxPoint2DInt operator/(const wxPoint2DInt& pt1 , const wxPoint2DInt& pt2) + { + return wxPoint2DInt( pt1.m_x / pt2.m_x , pt1.m_y / pt2.m_y ); + } +#endif // WXWIN_COMPATIBILITY_3_2 + + wxInt32 m_x = 0; + wxInt32 m_y = 0; +}; inline wxPoint2DInt::wxPoint2DInt( wxInt32 x , wxInt32 y ) { @@ -167,8 +179,7 @@ inline void wxPoint2DInt::GetRounded( wxInt32 *x , wxInt32 *y ) const inline wxDouble wxPoint2DInt::GetVectorLength() const { - // cast needed MIPSpro compiler under SGI - return sqrt( (wxDouble)(m_x)*(m_x) + (wxDouble)(m_y)*(m_y) ); + return sqrt( static_cast(m_x*m_x + m_y*m_y) ); } inline void wxPoint2DInt::SetVectorLength( wxDouble length ) @@ -216,29 +227,43 @@ inline wxPoint2DInt wxPoint2DInt::operator-() const inline wxPoint2DInt& wxPoint2DInt::operator+=(const wxPoint2DInt& pt) { - m_x = m_x + pt.m_x; - m_y = m_y + pt.m_y; + m_x += pt.m_x; + m_y += pt.m_y; return *this; } inline wxPoint2DInt& wxPoint2DInt::operator-=(const wxPoint2DInt& pt) { - m_x = m_x - pt.m_x; - m_y = m_y - pt.m_y; + m_x -= pt.m_x; + m_y -= pt.m_y; + return *this; +} + +inline wxPoint2DInt& wxPoint2DInt::operator*=(wxDouble n) +{ + m_x = wxRound(m_x * n); + m_y = wxRound(m_y * n); + return *this; +} + +inline wxPoint2DInt& wxPoint2DInt::operator*=(wxInt32 n) +{ + m_x *= n; + m_y *= n; return *this; } -inline wxPoint2DInt& wxPoint2DInt::operator*=(const wxPoint2DInt& pt) +inline wxPoint2DInt& wxPoint2DInt::operator/=(wxDouble n) { - m_x = m_x * pt.m_x; - m_y = m_y * pt.m_y; + m_x = wxRound(m_x / n); + m_y = wxRound(m_y / n); return *this; } -inline wxPoint2DInt& wxPoint2DInt::operator/=(const wxPoint2DInt& pt) +inline wxPoint2DInt& wxPoint2DInt::operator/=(wxInt32 n) { - m_x = m_x / pt.m_x; - m_y = m_y / pt.m_y; + m_x /= n; + m_y /= n; return *this; } @@ -257,7 +282,7 @@ inline bool wxPoint2DInt::operator!=(const wxPoint2DInt& pt) const class WXDLLIMPEXP_CORE wxPoint2DDouble { public : - inline wxPoint2DDouble(); + wxPoint2DDouble() = default; inline wxPoint2DDouble( wxDouble x , wxDouble y ); wxPoint2DDouble( const wxPoint2DInt &pt ) { m_x = (wxDouble) pt.m_x ; m_y = (wxDouble) pt.m_y ; } @@ -286,10 +311,8 @@ public : inline wxPoint2DDouble& operator+=(const wxPoint2DDouble& pt); inline wxPoint2DDouble& operator-=(const wxPoint2DDouble& pt); - inline wxPoint2DDouble& operator*=(const wxPoint2DDouble& pt); inline wxPoint2DDouble& operator*=(wxDouble n); inline wxPoint2DDouble& operator*=(wxInt32 n); - inline wxPoint2DDouble& operator/=(const wxPoint2DDouble& pt); inline wxPoint2DDouble& operator/=(wxDouble n); inline wxPoint2DDouble& operator/=(wxInt32 n); @@ -307,11 +330,6 @@ public : } - friend wxPoint2DDouble operator*(const wxPoint2DDouble& pt1 , const wxPoint2DDouble& pt2) - { - return wxPoint2DDouble( pt1.m_x * pt2.m_x , pt1.m_y * pt2.m_y ); - } - friend wxPoint2DDouble operator*(wxDouble n , const wxPoint2DDouble& pt) { return wxPoint2DDouble( pt.m_x * n , pt.m_y * n ); @@ -332,11 +350,6 @@ public : return wxPoint2DDouble( pt.m_x * n , pt.m_y * n ); } - friend wxPoint2DDouble operator/(const wxPoint2DDouble& pt1 , const wxPoint2DDouble& pt2) - { - return wxPoint2DDouble( pt1.m_x / pt2.m_x , pt1.m_y / pt2.m_y ); - } - friend wxPoint2DDouble operator/(const wxPoint2DDouble& pt , wxDouble n) { return wxPoint2DDouble( pt.m_x / n , pt.m_y / n ); @@ -347,15 +360,39 @@ public : return wxPoint2DDouble( pt.m_x / n , pt.m_y / n ); } - wxDouble m_x; - wxDouble m_y; -}; +#if WXWIN_COMPATIBILITY_3_2 + wxDEPRECATED_MSG("Multiplying points doesn't make sense") + inline wxPoint2DDouble& operator*=(const wxPoint2DDouble& pt) + { + m_x *= pt.m_x; + m_y *= pt.m_y; + return *this; + } -inline wxPoint2DDouble::wxPoint2DDouble() -{ - m_x = 0.0; - m_y = 0.0; -} + wxDEPRECATED_MSG("Multiplying points doesn't make sense") + friend wxPoint2DDouble operator*(const wxPoint2DDouble& pt1 , const wxPoint2DDouble& pt2) + { + return wxPoint2DDouble( pt1.m_x * pt2.m_x , pt1.m_y * pt2.m_y ); + } + + wxDEPRECATED_MSG("Dividing points doesn't make sense") + inline wxPoint2DDouble& operator/=(const wxPoint2DDouble& pt) + { + m_x /= pt.m_x; + m_y /= pt.m_y; + return *this; + } + + wxDEPRECATED_MSG("Dividing points doesn't make sense") + friend wxPoint2DDouble operator/(const wxPoint2DDouble& pt1 , const wxPoint2DDouble& pt2) + { + return wxPoint2DDouble( pt1.m_x / pt2.m_x , pt1.m_y / pt2.m_y ); + } +#endif // WXWIN_COMPATIBILITY_3_2 + + wxDouble m_x = 0.0; + wxDouble m_y = 0.0; +}; inline wxPoint2DDouble::wxPoint2DDouble( wxDouble x , wxDouble y ) { @@ -371,8 +408,8 @@ inline void wxPoint2DDouble::GetFloor( wxInt32 *x , wxInt32 *y ) const inline void wxPoint2DDouble::GetRounded( wxInt32 *x , wxInt32 *y ) const { - *x = (wxInt32) floor( m_x + 0.5 ); - *y = (wxInt32) floor( m_y + 0.5); + *x = wxRound( m_x ); + *y = wxRound( m_y ); } inline wxDouble wxPoint2DDouble::GetVectorLength() const @@ -419,29 +456,43 @@ inline wxPoint2DDouble wxPoint2DDouble::operator-() const inline wxPoint2DDouble& wxPoint2DDouble::operator+=(const wxPoint2DDouble& pt) { - m_x = m_x + pt.m_x; - m_y = m_y + pt.m_y; + m_x += pt.m_x; + m_y += pt.m_y; return *this; } inline wxPoint2DDouble& wxPoint2DDouble::operator-=(const wxPoint2DDouble& pt) { - m_x = m_x - pt.m_x; - m_y = m_y - pt.m_y; + m_x -= pt.m_x; + m_y -= pt.m_y; + return *this; +} + +inline wxPoint2DDouble& wxPoint2DDouble::operator*=(wxDouble n) +{ + m_x *= n; + m_y *= n; + return *this; +} + +inline wxPoint2DDouble& wxPoint2DDouble::operator*=(wxInt32 n) +{ + m_x *= n; + m_y *= n; return *this; } -inline wxPoint2DDouble& wxPoint2DDouble::operator*=(const wxPoint2DDouble& pt) +inline wxPoint2DDouble& wxPoint2DDouble::operator/=(wxDouble n) { - m_x = m_x * pt.m_x; - m_y = m_y * pt.m_y; + m_x /= n; + m_y /= n; return *this; } -inline wxPoint2DDouble& wxPoint2DDouble::operator/=(const wxPoint2DDouble& pt) +inline wxPoint2DDouble& wxPoint2DDouble::operator/=(wxInt32 n) { - m_x = m_x / pt.m_x; - m_y = m_y / pt.m_y; + m_x /= n; + m_y /= n; return *this; } @@ -462,8 +513,7 @@ inline bool wxPoint2DDouble::operator!=(const wxPoint2DDouble& pt) const class WXDLLIMPEXP_CORE wxRect2DDouble { public: - wxRect2DDouble() - { m_x = m_y = m_width = m_height = 0; } + wxRect2DDouble() = default; wxRect2DDouble(wxDouble x, wxDouble y, wxDouble w, wxDouble h) { m_x = x; m_y = y; m_width = w; m_height = h; } /* @@ -578,10 +628,10 @@ class WXDLLIMPEXP_CORE wxRect2DDouble inline bool operator != (const wxRect2DDouble& rect) const { return !(*this == rect); } - wxDouble m_x; - wxDouble m_y; - wxDouble m_width; - wxDouble m_height; + wxDouble m_x = 0.0; + wxDouble m_y = 0.0; + wxDouble m_width = 0.0; + wxDouble m_height = 0.0; }; @@ -592,7 +642,7 @@ class WXDLLIMPEXP_CORE wxRect2DDouble class WXDLLIMPEXP_CORE wxRect2DInt { public: - wxRect2DInt() { m_x = m_y = m_width = m_height = 0; } + wxRect2DInt() = default; wxRect2DInt( const wxRect& r ) { m_x = r.x ; m_y = r.y ; m_width = r.width ; m_height = r.height ; } wxRect2DInt(wxInt32 x, wxInt32 y, wxInt32 w, wxInt32 h) { m_x = x; m_y = y; m_width = w; m_height = h; } wxRect2DInt(const wxPoint2DInt& topLeft, const wxPoint2DInt& bottomRight); @@ -683,10 +733,10 @@ class WXDLLIMPEXP_CORE wxRect2DInt void ReadFrom( wxDataInputStream &stream ); #endif // wxUSE_STREAMS - wxInt32 m_x; - wxInt32 m_y; - wxInt32 m_width; - wxInt32 m_height; + wxInt32 m_x = 0; + wxInt32 m_y = 0; + wxInt32 m_width = 0; + wxInt32 m_height = 0; }; inline wxRect2DInt::wxRect2DInt( const wxPoint2DInt &a , const wxPoint2DInt &b) diff --git a/include/wx-3.3/wx/hashmap.h b/include/wx-3.3/wx/hashmap.h index 4b54091..d32466d 100644 --- a/include/wx-3.3/wx/hashmap.h +++ b/include/wx-3.3/wx/hashmap.h @@ -25,8 +25,14 @@ #include +// Use inheritance instead of simple typedef to allow existing forward +// declarations of the hash map classes in the applications using wx to work. #define _WX_DECLARE_HASH_MAP( KEY_T, VALUE_T, HASH_T, KEY_EQ_T, CLASSNAME, CLASSEXP ) \ - typedef std::unordered_map< KEY_T, VALUE_T, HASH_T, KEY_EQ_T > CLASSNAME + class CLASSNAME : public std::unordered_map< KEY_T, VALUE_T, HASH_T, KEY_EQ_T > \ + { \ + public: \ + using std::unordered_map< KEY_T, VALUE_T, HASH_T, KEY_EQ_T >::unordered_map; \ + } #else // wxNEEDS_WX_HASH_MAP diff --git a/include/wx-3.3/wx/image.h b/include/wx-3.3/wx/image.h index 8e34f65..0c4c885 100644 --- a/include/wx-3.3/wx/image.h +++ b/include/wx-3.3/wx/image.h @@ -62,16 +62,19 @@ enum wxImageResolution enum wxImageResizeQuality { // different image resizing algorithms used by Scale() and Rescale() - wxIMAGE_QUALITY_NEAREST = 0, + wxIMAGE_QUALITY_NEAREST = 5, wxIMAGE_QUALITY_BILINEAR = 1, wxIMAGE_QUALITY_BICUBIC = 2, wxIMAGE_QUALITY_BOX_AVERAGE = 3, - // default quality is low (but fast) - wxIMAGE_QUALITY_NORMAL = wxIMAGE_QUALITY_NEAREST, + // default quality, suitable for most icons + wxIMAGE_QUALITY_NORMAL = 0, - // highest (but best) quality - wxIMAGE_QUALITY_HIGH = 4 + // "high" quality is not always better, but can be for photos + wxIMAGE_QUALITY_HIGH = 4, + + // fastest algorithm, possibly at the expense of quality + wxIMAGE_QUALITY_FAST = 6 }; // Constants for wxImage::Paste() for specifying alpha blending option. diff --git a/include/wx-3.3/wx/list.h b/include/wx-3.3/wx/list.h index 86f9d72..ed9daff 100644 --- a/include/wx-3.3/wx/list.h +++ b/include/wx-3.3/wx/list.h @@ -50,8 +50,6 @@ typedef wxObjectListNode wxNode; #if wxUSE_STD_CONTAINERS -#define wxLIST_COMPATIBILITY - #define WX_DECLARE_LIST_WITH_DECL(elT, liT, decl) \ WX_DECLARE_LIST_3(elT, elT, liT, dummy, decl) @@ -77,6 +75,179 @@ class wxList_SortFunction wxSortCompareFunction m_f; }; +template +class wxListImpl : public std::list +{ +private: + bool m_destroy = false; + + using liT = wxListImpl; + +public: + using iterator = typename std::list::iterator; + + class compatibility_iterator + { + private: + using liT = wxListImpl; + using iterator = typename std::list::iterator; + + friend liT; + + iterator m_iter; + liT * m_list; + + public: + compatibility_iterator() + : m_iter(wxListHelper::EmptyList.end()), m_list( nullptr ) {} + compatibility_iterator( liT* li, iterator i ) + : m_iter( i ), m_list( li ) {} + compatibility_iterator( const liT* li, iterator i ) + : m_iter( i ), m_list( const_cast< liT* >( li ) ) {} + + compatibility_iterator* operator->() { return this; } + const compatibility_iterator* operator->() const { return this; } + + bool operator==(const compatibility_iterator& i) const + { + wxASSERT_MSG( m_list && i.m_list, + wxT("comparing invalid iterators is illegal") ); + return (m_list == i.m_list) && (m_iter == i.m_iter); + } + bool operator!=(const compatibility_iterator& i) const + { return !( operator==( i ) ); } + operator bool() const + { return m_list ? m_iter != m_list->end() : false; } + bool operator !() const + { return !( operator bool() ); } + + elT GetData() const + { return *m_iter; } + void SetData( elT e ) + { *m_iter = e; } + + compatibility_iterator GetNext() const + { + iterator i = m_iter; + return compatibility_iterator( m_list, ++i ); + } + compatibility_iterator GetPrevious() const + { + if ( m_iter == m_list->begin() ) + return compatibility_iterator(); + + iterator i = m_iter; + return compatibility_iterator( m_list, --i ); + } + int IndexOf() const + { + return *this ? (int)std::distance( m_list->begin(), m_iter ) + : wxNOT_FOUND; + } + }; +public: + wxListImpl() = default; + + compatibility_iterator Find( baseT e ) const + { + liT* _this = const_cast< liT* >( this ); + return compatibility_iterator( _this, + std::find( _this->begin(), _this->end(), e )); + } + + bool IsEmpty() const + { return this->empty(); } + size_t GetCount() const + { return this->size(); } + int Number() const + { return static_cast< int >( GetCount() ); } + + compatibility_iterator Item( size_t idx ) const + { + iterator i = const_cast< liT* >(this)->begin(); + std::advance( i, idx ); + return compatibility_iterator( this, i ); + } + elT operator[](size_t idx) const + { + return Item(idx).GetData(); + } + + compatibility_iterator GetFirst() const + { + return compatibility_iterator( this, + const_cast< liT* >(this)->begin() ); + } + compatibility_iterator GetLast() const + { + iterator i = const_cast< liT* >(this)->end(); + return compatibility_iterator( this, !this->empty() ? --i : i ); + } + bool Member( baseT e ) const + { return Find( e ); } + compatibility_iterator Nth( int n ) const + { return Item( n ); } + int IndexOf( baseT e ) const + { return Find( e ).IndexOf(); } + + compatibility_iterator Append( elT e ) + { + this->push_back( e ); + return GetLast(); + } + compatibility_iterator Insert( elT e ) + { + this->push_front( e ); + return compatibility_iterator( this, this->begin() ); + } + compatibility_iterator Insert(const compatibility_iterator & i, elT e) + { + return compatibility_iterator( this, this->insert( i.m_iter, e ) ); + } + compatibility_iterator Insert( size_t idx, elT e ) + { + return compatibility_iterator( this, + this->insert( Item( idx ).m_iter, e ) ); + } + + void DeleteContents( bool destroy ) + { m_destroy = destroy; } + bool GetDeleteContents() const + { return m_destroy; } + void Erase( const compatibility_iterator& i ) + { + if ( m_destroy ) + wxListHelper::DeleteFunction( i->GetData() ); + this->erase( i.m_iter ); + } + bool DeleteNode( const compatibility_iterator& i ) + { + if( i ) + { + Erase( i ); + return true; + } + return false; + } + bool DeleteObject( baseT e ) + { + return DeleteNode( Find( e ) ); + } + void Clear() + { + if ( m_destroy ) + std::for_each( this->begin(), this->end(), + wxListHelper::DeleteFunction ); + this->clear(); + } + void Sort( wxSortCompareFunction compfunc ) + { this->sort( wxList_SortFunction(compfunc ) ); } + ~wxListImpl() { Clear(); } + + /* It needs access to our EmptyList */ + friend class compatibility_iterator; +}; + /* Note 1: the outer helper class _WX_LIST_HELPER_##liT below is a workaround for mingw 3.2.3 compiler bug that prevents a static function of liT class @@ -117,172 +288,9 @@ class wxList_SortFunction static void DeleteFunction( _WX_LIST_ITEM_TYPE_##liT X ); \ }; \ \ - class liT : public std::list \ + class liT : public wxListImpl \ { \ - private: \ - typedef std::list BaseListType; \ - \ - bool m_destroy; \ - \ - public: \ - class compatibility_iterator \ - { \ - private: \ - friend class liT; \ - \ - iterator m_iter; \ - liT * m_list; \ - \ - public: \ - compatibility_iterator() \ - : m_iter(_WX_LIST_HELPER_##liT::EmptyList.end()), m_list( nullptr ) {} \ - compatibility_iterator( liT* li, iterator i ) \ - : m_iter( i ), m_list( li ) {} \ - compatibility_iterator( const liT* li, iterator i ) \ - : m_iter( i ), m_list( const_cast< liT* >( li ) ) {} \ - \ - compatibility_iterator* operator->() { return this; } \ - const compatibility_iterator* operator->() const { return this; } \ - \ - bool operator==(const compatibility_iterator& i) const \ - { \ - wxASSERT_MSG( m_list && i.m_list, \ - wxT("comparing invalid iterators is illegal") ); \ - return (m_list == i.m_list) && (m_iter == i.m_iter); \ - } \ - bool operator!=(const compatibility_iterator& i) const \ - { return !( operator==( i ) ); } \ - operator bool() const \ - { return m_list ? m_iter != m_list->end() : false; } \ - bool operator !() const \ - { return !( operator bool() ); } \ - \ - elT GetData() const \ - { return *m_iter; } \ - void SetData( elT e ) \ - { *m_iter = e; } \ - \ - compatibility_iterator GetNext() const \ - { \ - iterator i = m_iter; \ - return compatibility_iterator( m_list, ++i ); \ - } \ - compatibility_iterator GetPrevious() const \ - { \ - if ( m_iter == m_list->begin() ) \ - return compatibility_iterator(); \ - \ - iterator i = m_iter; \ - return compatibility_iterator( m_list, --i ); \ - } \ - int IndexOf() const \ - { \ - return *this ? (int)std::distance( m_list->begin(), m_iter ) \ - : wxNOT_FOUND; \ - } \ - }; \ - public: \ - liT() : m_destroy( false ) {} \ - \ - compatibility_iterator Find( const baseT e ) const \ - { \ - liT* _this = const_cast< liT* >( this ); \ - return compatibility_iterator( _this, \ - std::find( _this->begin(), _this->end(), (const elT)e ));\ - } \ - \ - bool IsEmpty() const \ - { return empty(); } \ - size_t GetCount() const \ - { return size(); } \ - int Number() const \ - { return static_cast< int >( GetCount() ); } \ - \ - compatibility_iterator Item( size_t idx ) const \ - { \ - iterator i = const_cast< liT* >(this)->begin(); \ - std::advance( i, idx ); \ - return compatibility_iterator( this, i ); \ - } \ - elT operator[](size_t idx) const \ - { \ - return Item(idx).GetData(); \ - } \ - \ - compatibility_iterator GetFirst() const \ - { \ - return compatibility_iterator( this, \ - const_cast< liT* >(this)->begin() ); \ - } \ - compatibility_iterator GetLast() const \ - { \ - iterator i = const_cast< liT* >(this)->end(); \ - return compatibility_iterator( this, !empty() ? --i : i ); \ - } \ - bool Member( baseT e ) const \ - { return Find( e ); } \ - compatibility_iterator Nth( int n ) const \ - { return Item( n ); } \ - int IndexOf( baseT e ) const \ - { return Find( e ).IndexOf(); } \ - \ - compatibility_iterator Append( elT e ) \ - { \ - push_back( e ); \ - return GetLast(); \ - } \ - compatibility_iterator Insert( elT e ) \ - { \ - push_front( e ); \ - return compatibility_iterator( this, begin() ); \ - } \ - compatibility_iterator Insert(const compatibility_iterator & i, elT e)\ - { \ - return compatibility_iterator( this, insert( i.m_iter, e ) ); \ - } \ - compatibility_iterator Insert( size_t idx, elT e ) \ - { \ - return compatibility_iterator( this, \ - insert( Item( idx ).m_iter, e ) ); \ - } \ - \ - void DeleteContents( bool destroy ) \ - { m_destroy = destroy; } \ - bool GetDeleteContents() const \ - { return m_destroy; } \ - void Erase( const compatibility_iterator& i ) \ - { \ - if ( m_destroy ) \ - _WX_LIST_HELPER_##liT::DeleteFunction( i->GetData() ); \ - erase( i.m_iter ); \ - } \ - bool DeleteNode( const compatibility_iterator& i ) \ - { \ - if( i ) \ - { \ - Erase( i ); \ - return true; \ - } \ - return false; \ - } \ - bool DeleteObject( baseT e ) \ - { \ - return DeleteNode( Find( e ) ); \ - } \ - void Clear() \ - { \ - if ( m_destroy ) \ - std::for_each( begin(), end(), \ - _WX_LIST_HELPER_##liT::DeleteFunction ); \ - clear(); \ - } \ - /* Workaround for broken VC6 std::list::sort() see above */ \ - void Sort( wxSortCompareFunction compfunc ) \ - { sort( wxList_SortFunction(compfunc ) ); } \ - ~liT() { Clear(); } \ - \ - /* It needs access to our EmptyList */ \ - friend class compatibility_iterator; \ + using wxListImpl::wxListImpl; \ } #define WX_DECLARE_LIST(elementtype, listname) \ @@ -309,10 +317,6 @@ class wxList_SortFunction #else // if !wxUSE_STD_CONTAINERS - -// undef it to get rid of old, deprecated functions -#define wxLIST_COMPATIBILITY - // ----------------------------------------------------------------------------- // key stuff: a list may be optionally keyed on integer or string key // ----------------------------------------------------------------------------- @@ -399,12 +403,10 @@ friend class wxListBase; void SetKeyString(const wxString& s) { m_key.string = new wxString(s); } void SetKeyInteger(long i) { m_key.integer = i; } -#ifdef wxLIST_COMPATIBILITY // compatibility methods, use Get* instead. wxDEPRECATED( wxNode *Next() const ); wxDEPRECATED( wxNode *Previous() const ); wxDEPRECATED( wxObject *Data() const ); -#endif // wxLIST_COMPATIBILITY protected: // all these are going to be "overloaded" in the derived classes @@ -478,7 +480,6 @@ friend class wxHashTableBase; // should be able to call untyped Find() void SetKeyType(wxKeyType keyType) { wxASSERT( m_count==0 ); m_keyType = keyType; } -#ifdef wxLIST_COMPATIBILITY // compatibility methods from old wxList wxDEPRECATED( int Number() const ); // use GetCount instead. wxDEPRECATED( wxNode *First() const ); // use GetFirst @@ -488,7 +489,6 @@ friend class wxHashTableBase; // should be able to call untyped Find() // kludge for typesafe list migration in core classes. wxDEPRECATED( operator wxList&() ); wxDEPRECATED( operator const wxList&() const ); -#endif // wxLIST_COMPATIBILITY protected: @@ -1125,8 +1125,6 @@ friend class wxHashTableBase; // should be able to call untyped Find() // commonly used list classes // ---------------------------------------------------------------------------- -#if defined(wxLIST_COMPATIBILITY) - // inline compatibility functions #if !wxUSE_STD_CONTAINERS @@ -1150,9 +1148,6 @@ inline wxNode *wxListBase::Nth(size_t n) const { return (wxNode *)Item(n); } #endif -// define this to make a lot of noise about use of the old wxList classes. -//#define wxWARN_COMPAT_LIST_USE - // ---------------------------------------------------------------------------- // wxList compatibility class: in fact, it's a list of wxObjects // ---------------------------------------------------------------------------- @@ -1163,11 +1158,9 @@ WX_DECLARE_LIST_2(wxObject, wxObjectList, wxObjectListNode, class WXDLLIMPEXP_BASE wxList : public wxObjectList { public: -#if defined(wxWARN_COMPAT_LIST_USE) && !wxUSE_STD_CONTAINERS wxList() = default; +#if !wxUSE_STD_CONTAINERS wxDEPRECATED( wxList(int key_type) ); -#elif !wxUSE_STD_CONTAINERS - wxList(int key_type = wxKEY_NONE); #endif // this destructor is required for Darwin @@ -1213,13 +1206,9 @@ class WXDLLIMPEXP_BASE wxStringList : public wxStringListBase public: // ctors and such // default -#ifdef wxWARN_COMPAT_LIST_USE wxStringList(); + // deprecated ctor from a list of strings wxDEPRECATED( wxStringList(const wxChar *first ...) ); -#else - wxStringList(); - wxStringList(const wxChar *first ...); -#endif // copying the string list: the strings are copied, too (extremely // inefficient!) @@ -1278,31 +1267,26 @@ class WXDLLIMPEXP_BASE wxStringList : public wxStringListBase #endif // wxUSE_STD_CONTAINERS -#endif // wxLIST_COMPATIBILITY - // delete all list elements -// -// NB: the class declaration of the list elements must be visible from the -// place where you use this macro, otherwise the proper destructor may not -// be called (a decent compiler should give a warning about it, but don't -// count on it)! -#define WX_CLEAR_LIST(type, list) \ - { \ - type::iterator it, en; \ - for( it = (list).begin(), en = (list).end(); it != en; ++it ) \ - delete *it; \ - (list).clear(); \ - } +template +inline void wxClearList(T& list) +{ + for ( auto& elem: list ) + delete elem; + + list.clear(); +} + +// Deprecated macro, use wxClearList() instead. +#define WX_CLEAR_LIST(type, list) wxClearList(list) // append all element of one list to another one -#define WX_APPEND_LIST(list, other) \ - { \ - wxList::compatibility_iterator node = other->GetFirst(); \ - while ( node ) \ - { \ - (list)->push_back(node->GetData()); \ - node = node->GetNext(); \ - } \ - } +// +// This used to be a macro, hence the all uppercase name. +inline void WX_APPEND_LIST(wxList& list, const wxList& other) +{ + for ( auto& elem: other ) + list.Append(elem); +} #endif // _WX_LISTH__ diff --git a/include/wx-3.3/wx/log.h b/include/wx-3.3/wx/log.h index fa54e92..caeadf4 100644 --- a/include/wx-3.3/wx/log.h +++ b/include/wx-3.3/wx/log.h @@ -194,8 +194,7 @@ class wxLogRecordInfo const char *filename; int line; - // the name of the function where the log record was generated (may be null - // if the compiler doesn't support __FUNCTION__) + // the name of the function where the log record was generated const char *func; // the name of the component which generated this message, may be null if diff --git a/include/wx-3.3/wx/osx/app.h b/include/wx-3.3/wx/osx/app.h index e5b915f..162730d 100644 --- a/include/wx-3.3/wx/osx/app.h +++ b/include/wx-3.3/wx/osx/app.h @@ -42,6 +42,8 @@ class WXDLLIMPEXP_CORE wxApp: public wxAppBase virtual void SetPrintMode(int mode) override { m_printMode = mode; } virtual int GetPrintMode() const { return m_printMode; } + virtual AppearanceResult SetAppearance(Appearance appearance) override; + // calling OnInit with an auto-release pool ready ... virtual bool CallOnInit() override; #if wxUSE_GUI diff --git a/include/wx-3.3/wx/osx/bitmap.h b/include/wx-3.3/wx/osx/bitmap.h index b512727..bdf8f9f 100644 --- a/include/wx-3.3/wx/osx/bitmap.h +++ b/include/wx-3.3/wx/osx/bitmap.h @@ -128,11 +128,11 @@ class WXDLLIMPEXP_CORE wxBitmap: public wxBitmapBase // get the given part of bitmap wxBitmap GetSubBitmap( const wxRect& rect ) const override; - virtual bool Create(int width, int height, int depth = wxBITMAP_SCREEN_DEPTH) override; - virtual bool Create(const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH) override + bool Create(int width, int height, int depth = wxBITMAP_SCREEN_DEPTH) final; + bool Create(const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH) final { return Create(sz.GetWidth(), sz.GetHeight(), depth); } - virtual bool Create(const void* data, wxBitmapType type, int width, int height, int depth = 1); + bool Create(const void* data, wxBitmapType type, int width, int height, int depth = 1); bool Create( CGImageRef image, double scale = 1.0 ); bool Create( WXImage image ); bool Create( CGContextRef bitmapcontext); @@ -140,7 +140,6 @@ class WXDLLIMPEXP_CORE wxBitmap: public wxBitmapBase // Create a bitmap compatible with the given DC, inheriting its magnification factor bool Create(int width, int height, const wxDC& dc); - // virtual bool Create( WXHICON icon) ; virtual bool LoadFile(const wxString& name, wxBitmapType type = wxBITMAP_DEFAULT_TYPE) override; virtual bool SaveFile(const wxString& name, wxBitmapType type, const wxPalette *cmap = nullptr) const override; diff --git a/include/wx-3.3/wx/osx/cocoa/private.h b/include/wx-3.3/wx/osx/cocoa/private.h index 22b9b0d..ba39155 100644 --- a/include/wx-3.3/wx/osx/cocoa/private.h +++ b/include/wx-3.3/wx/osx/cocoa/private.h @@ -18,6 +18,8 @@ #import #endif +#include + // // shared between Cocoa and Carbon // @@ -172,7 +174,10 @@ public : virtual void DoNotifyFocusEvent(bool receivedFocus, wxWidgetImpl* otherWindow); virtual void SetupKeyEvent(wxKeyEvent &wxevent, NSEvent * nsEvent, NSString* charString = nullptr); - virtual void SetupMouseEvent(wxMouseEvent &wxevent, NSEvent * nsEvent); + + using MouseEvents = std::vector; + virtual MouseEvents TranslateMouseEvent(NSEvent * nsEvent); + void SetupCoordinates(wxCoord &x, wxCoord &y, NSEvent *nsEvent); virtual bool SetupCursor(NSEvent* event); diff --git a/include/wx-3.3/wx/osx/core/private.h b/include/wx-3.3/wx/osx/core/private.h index f4c4784..3d868ab 100644 --- a/include/wx-3.3/wx/osx/core/private.h +++ b/include/wx-3.3/wx/osx/core/private.h @@ -709,6 +709,8 @@ public : virtual wxString GetStringValue() const = 0 ; virtual void SetStringValue( const wxString &val ) = 0 ; + virtual wxString GetRTFValue() const = 0; + virtual void SetRTFValue( const wxString& val ) = 0; virtual void SetSelection( long from, long to ) = 0 ; virtual void GetSelection( long* from, long* to ) const = 0 ; virtual void WriteText( const wxString& str ) = 0 ; @@ -716,6 +718,8 @@ public : virtual bool CanClipMaxLength() const { return false; } virtual void SetMaxLength(unsigned long WXUNUSED(len)) {} + virtual bool IsRTFSupported() { return false; } + virtual bool CanForceUpper() { return false; } virtual void ForceUpper() {} diff --git a/include/wx-3.3/wx/osx/dataview.h b/include/wx-3.3/wx/osx/dataview.h index e4f542c..f7b6ed7 100644 --- a/include/wx-3.3/wx/osx/dataview.h +++ b/include/wx-3.3/wx/osx/dataview.h @@ -291,6 +291,8 @@ class WXDLLIMPEXP_ADV wxDataViewCtrl: public wxDataViewCtrlBase virtual wxDataViewItem DoGetCurrentItem() const override; virtual void DoSetCurrentItem(const wxDataViewItem& item) override; + void OnContextMenu(wxContextMenuEvent& event); + // // variables // diff --git a/include/wx-3.3/wx/osx/textctrl.h b/include/wx-3.3/wx/osx/textctrl.h index cd5acb9..acfce79 100644 --- a/include/wx-3.3/wx/osx/textctrl.h +++ b/include/wx-3.3/wx/osx/textctrl.h @@ -109,6 +109,10 @@ class WXDLLIMPEXP_CORE wxTextCtrl: public wxTextCtrlBase virtual void SetWindowStyleFlag(long style) override; + virtual wxString GetRTFValue() const override; + virtual void SetRTFValue(const wxString& val) override; + virtual bool IsRTFSupported() override { return IsMultiLine(); } + // callbacks void OnDropFiles(wxDropFilesEvent& event); void OnChar(wxKeyEvent& event); // Process 'enter' if required diff --git a/include/wx-3.3/wx/osx/webview_webkit.h b/include/wx-3.3/wx/osx/webview_webkit.h index 7699f67..9ff3021 100644 --- a/include/wx-3.3/wx/osx/webview_webkit.h +++ b/include/wx-3.3/wx/osx/webview_webkit.h @@ -136,7 +136,7 @@ class WXDLLIMPEXP_WEBVIEW wxWebViewFactoryWebKit : public wxWebViewFactory else return nullptr; } - virtual wxVersionInfo GetVersionInfo() override; + virtual wxVersionInfo GetVersionInfo(wxVersionContext context) override; virtual wxWebViewConfiguration CreateConfiguration() override; }; diff --git a/include/wx-3.3/wx/overlay.h b/include/wx-3.3/wx/overlay.h index 4885900..1f2f6e5 100644 --- a/include/wx-3.3/wx/overlay.h +++ b/include/wx-3.3/wx/overlay.h @@ -12,14 +12,13 @@ #include "wx/defs.h" +#include "wx/dcclient.h" + // ---------------------------------------------------------------------------- // creates an overlay over an existing window, allowing for manipulations like -// rubberbanding etc. This API is not stable yet, not to be used outside wx -// internal code +// rubberbanding etc. // ---------------------------------------------------------------------------- -class WXDLLIMPEXP_FWD_CORE wxDC; - class WXDLLIMPEXP_CORE wxOverlay { public: @@ -88,4 +87,31 @@ class WXDLLIMPEXP_CORE wxDCOverlay wxDECLARE_NO_COPY_CLASS(wxDCOverlay); }; +// Convenient class combining wxClientDC with wxDCOverlay. +class wxOverlayDC : public wxClientDC +{ +public: + wxOverlayDC(wxOverlay& overlay, wxWindow* win) + : wxClientDC(win), + m_dcOverlay(overlay, this) + { + } + + wxOverlayDC(wxOverlay& overlay, wxWindow* win, const wxRect& rect) + : wxClientDC(win), + m_dcOverlay(overlay, this, rect.x, rect.y, rect.width, rect.height) + { + } + + void Clear() + { + m_dcOverlay.Clear(); + } + +private: + wxDCOverlay m_dcOverlay; + + wxDECLARE_NO_COPY_CLASS(wxOverlayDC); +}; + #endif // _WX_OVERLAY_H_ diff --git a/include/wx-3.3/wx/propgrid/propgrid.h b/include/wx-3.3/wx/propgrid/propgrid.h index 5080c05..8bf5153 100644 --- a/include/wx-3.3/wx/propgrid/propgrid.h +++ b/include/wx-3.3/wx/propgrid/propgrid.h @@ -1445,9 +1445,6 @@ class WXDLLIMPEXP_PROPGRID wxPropertyGrid : public wxScrolled, wxBitmap *m_doubleBuffer; - // Local time ms when control was created. - wxMilliClock_t m_timeCreated; - // wxPGProperty::OnEvent can change value by setting this. wxVariant m_changeInEventValue; diff --git a/include/wx-3.3/wx/renderer.h b/include/wx-3.3/wx/renderer.h index c0cb682..3dbc59b 100644 --- a/include/wx-3.3/wx/renderer.h +++ b/include/wx-3.3/wx/renderer.h @@ -24,6 +24,7 @@ #define _WX_RENDERER_H_ class WXDLLIMPEXP_FWD_CORE wxDC; +class WXDLLIMPEXP_FWD_CORE wxReadOnlyDC; class WXDLLIMPEXP_FWD_CORE wxWindow; #include "wx/gdicmn.h" // for wxPoint, wxSize @@ -291,7 +292,7 @@ class WXDLLIMPEXP_CORE wxRendererNative int flags = 0) = 0; // Returns the default size of a collapse button - virtual wxSize GetCollapseButtonSize(wxWindow *win, wxDC& dc) = 0; + virtual wxSize GetCollapseButtonSize(wxWindow *win, wxReadOnlyDC& dc) = 0; // draw rectangle indicating that an item in e.g. a list control // has been selected or focused @@ -524,7 +525,7 @@ class WXDLLIMPEXP_CORE wxDelegateRendererNative : public wxRendererNative int flags = 0) override { m_rendererNative.DrawCollapseButton(win, dc, rect, flags); } - virtual wxSize GetCollapseButtonSize(wxWindow *win, wxDC& dc) override + virtual wxSize GetCollapseButtonSize(wxWindow *win, wxReadOnlyDC& dc) override { return m_rendererNative.GetCollapseButtonSize(win, dc); } virtual void DrawItemSelectionRect(wxWindow *win, diff --git a/include/wx-3.3/wx/ribbon/art.h b/include/wx-3.3/wx/ribbon/art.h index b9720c3..0a261b3 100644 --- a/include/wx-3.3/wx/ribbon/art.h +++ b/include/wx-3.3/wx/ribbon/art.h @@ -22,6 +22,7 @@ #include "wx/ribbon/bar.h" class WXDLLIMPEXP_FWD_CORE wxDC; +class WXDLLIMPEXP_FWD_CORE wxReadOnlyDC; class WXDLLIMPEXP_FWD_CORE wxWindow; enum wxRibbonArtSetting @@ -322,7 +323,7 @@ class WXDLLIMPEXP_RIBBON wxRibbonArtProvider const wxRect& rect) = 0; virtual void GetBarTabWidth( - wxDC& dc, + wxReadOnlyDC& dc, wxWindow* wnd, const wxString& label, const wxBitmap& bitmap, @@ -332,39 +333,39 @@ class WXDLLIMPEXP_RIBBON wxRibbonArtProvider int* minimum) = 0; virtual int GetTabCtrlHeight( - wxDC& dc, + wxReadOnlyDC& dc, wxWindow* wnd, const wxRibbonPageTabInfoArray& pages) = 0; virtual wxSize GetScrollButtonMinimumSize( - wxDC& dc, + wxReadOnlyDC& dc, wxWindow* wnd, long style) = 0; virtual wxSize GetPanelSize( - wxDC& dc, + wxReadOnlyDC& dc, const wxRibbonPanel* wnd, wxSize client_size, wxPoint* client_offset) = 0; virtual wxSize GetPanelClientSize( - wxDC& dc, + wxReadOnlyDC& dc, const wxRibbonPanel* wnd, wxSize size, wxPoint* client_offset) = 0; virtual wxRect GetPanelExtButtonArea( - wxDC& dc, + wxReadOnlyDC& dc, const wxRibbonPanel* wnd, wxRect rect) = 0; virtual wxSize GetGallerySize( - wxDC& dc, + wxReadOnlyDC& dc, const wxRibbonGallery* wnd, wxSize client_size) = 0; virtual wxSize GetGalleryClientSize( - wxDC& dc, + wxReadOnlyDC& dc, const wxRibbonGallery* wnd, wxSize size, wxPoint* client_offset, @@ -373,13 +374,13 @@ class WXDLLIMPEXP_RIBBON wxRibbonArtProvider wxRect* extension_button) = 0; virtual wxRect GetPageBackgroundRedrawArea( - wxDC& dc, + wxReadOnlyDC& dc, const wxRibbonPage* wnd, wxSize page_old_size, wxSize page_new_size) = 0; virtual bool GetButtonBarButtonSize( - wxDC& dc, + wxReadOnlyDC& dc, wxWindow* wnd, wxRibbonButtonKind kind, wxRibbonButtonBarButtonState size, @@ -392,18 +393,18 @@ class WXDLLIMPEXP_RIBBON wxRibbonArtProvider wxRect* dropdown_region) = 0; virtual wxCoord GetButtonBarButtonTextWidth( - wxDC& dc, const wxString& label, + wxReadOnlyDC& dc, const wxString& label, wxRibbonButtonKind kind, wxRibbonButtonBarButtonState size) = 0; virtual wxSize GetMinimisedPanelMinimumSize( - wxDC& dc, + wxReadOnlyDC& dc, const wxRibbonPanel* wnd, wxSize* desired_bitmap_size, wxDirection* expanded_panel_direction) = 0; virtual wxSize GetToolSize( - wxDC& dc, + wxReadOnlyDC& dc, wxWindow* wnd, wxSize bitmap_size, wxRibbonButtonKind kind, @@ -440,7 +441,7 @@ class WXDLLIMPEXP_RIBBON wxRibbonMSWArtProvider : public wxRibbonArtProvider const wxColour& tertiary) override; int GetTabCtrlHeight( - wxDC& dc, + wxReadOnlyDC& dc, wxWindow* wnd, const wxRibbonPageTabInfoArray& pages) override; @@ -536,7 +537,7 @@ class WXDLLIMPEXP_RIBBON wxRibbonMSWArtProvider : public wxRibbonArtProvider const wxRect& rect) override; void GetBarTabWidth( - wxDC& dc, + wxReadOnlyDC& dc, wxWindow* wnd, const wxString& label, const wxBitmap& bitmap, @@ -546,34 +547,34 @@ class WXDLLIMPEXP_RIBBON wxRibbonMSWArtProvider : public wxRibbonArtProvider int* minimum) override; wxSize GetScrollButtonMinimumSize( - wxDC& dc, + wxReadOnlyDC& dc, wxWindow* wnd, long style) override; wxSize GetPanelSize( - wxDC& dc, + wxReadOnlyDC& dc, const wxRibbonPanel* wnd, wxSize client_size, wxPoint* client_offset) override; wxSize GetPanelClientSize( - wxDC& dc, + wxReadOnlyDC& dc, const wxRibbonPanel* wnd, wxSize size, wxPoint* client_offset) override; wxRect GetPanelExtButtonArea( - wxDC& dc, + wxReadOnlyDC& dc, const wxRibbonPanel* wnd, wxRect rect) override; wxSize GetGallerySize( - wxDC& dc, + wxReadOnlyDC& dc, const wxRibbonGallery* wnd, wxSize client_size) override; wxSize GetGalleryClientSize( - wxDC& dc, + wxReadOnlyDC& dc, const wxRibbonGallery* wnd, wxSize size, wxPoint* client_offset, @@ -582,13 +583,13 @@ class WXDLLIMPEXP_RIBBON wxRibbonMSWArtProvider : public wxRibbonArtProvider wxRect* extension_button) override; wxRect GetPageBackgroundRedrawArea( - wxDC& dc, + wxReadOnlyDC& dc, const wxRibbonPage* wnd, wxSize page_old_size, wxSize page_new_size) override; bool GetButtonBarButtonSize( - wxDC& dc, + wxReadOnlyDC& dc, wxWindow* wnd, wxRibbonButtonKind kind, wxRibbonButtonBarButtonState size, @@ -601,18 +602,18 @@ class WXDLLIMPEXP_RIBBON wxRibbonMSWArtProvider : public wxRibbonArtProvider wxRect* dropdown_region) override; wxCoord GetButtonBarButtonTextWidth( - wxDC& dc, const wxString& label, + wxReadOnlyDC& dc, const wxString& label, wxRibbonButtonKind kind, wxRibbonButtonBarButtonState size) override; wxSize GetMinimisedPanelMinimumSize( - wxDC& dc, + wxReadOnlyDC& dc, const wxRibbonPanel* wnd, wxSize* desired_bitmap_size, wxDirection* expanded_panel_direction) override; wxSize GetToolSize( - wxDC& dc, + wxReadOnlyDC& dc, wxWindow* wnd, wxSize bitmap_size, wxRibbonButtonKind kind, @@ -805,7 +806,7 @@ class WXDLLIMPEXP_RIBBON wxRibbonAUIArtProvider : public wxRibbonMSWArtProvider void SetFont(int id, const wxFont& font) override; wxSize GetScrollButtonMinimumSize( - wxDC& dc, + wxReadOnlyDC& dc, wxWindow* wnd, long style) override; @@ -816,19 +817,19 @@ class WXDLLIMPEXP_RIBBON wxRibbonAUIArtProvider : public wxRibbonMSWArtProvider long style) override; wxSize GetPanelSize( - wxDC& dc, + wxReadOnlyDC& dc, const wxRibbonPanel* wnd, wxSize client_size, wxPoint* client_offset) override; wxSize GetPanelClientSize( - wxDC& dc, + wxReadOnlyDC& dc, const wxRibbonPanel* wnd, wxSize size, wxPoint* client_offset) override; wxRect GetPanelExtButtonArea( - wxDC& dc, + wxReadOnlyDC& dc, const wxRibbonPanel* wnd, wxRect rect) override; @@ -838,12 +839,12 @@ class WXDLLIMPEXP_RIBBON wxRibbonAUIArtProvider : public wxRibbonMSWArtProvider const wxRect& rect) override; int GetTabCtrlHeight( - wxDC& dc, + wxReadOnlyDC& dc, wxWindow* wnd, const wxRibbonPageTabInfoArray& pages) override; void GetBarTabWidth( - wxDC& dc, + wxReadOnlyDC& dc, wxWindow* wnd, const wxString& label, const wxBitmap& bitmap, diff --git a/include/wx-3.3/wx/ribbon/buttonbar.h b/include/wx-3.3/wx/ribbon/buttonbar.h index dc1c75e..d91a0d6 100644 --- a/include/wx-3.3/wx/ribbon/buttonbar.h +++ b/include/wx-3.3/wx/ribbon/buttonbar.h @@ -192,7 +192,7 @@ class WXDLLIMPEXP_RIBBON wxRibbonButtonBar : public wxRibbonControl size_t first_btn, size_t* last_button, wxRibbonButtonBarButtonState target_size); void FetchButtonSizeInfo(wxRibbonButtonBarButtonBase* button, - wxRibbonButtonBarButtonState size, wxDC& dc); + wxRibbonButtonBarButtonState size, wxReadOnlyDC& dc); virtual void UpdateWindowUI(long flags) override; wxArrayRibbonButtonBarLayout m_layouts; diff --git a/include/wx-3.3/wx/richtext/richtextbuffer.h b/include/wx-3.3/wx/richtext/richtextbuffer.h index b710eab..d0fe8f2 100644 --- a/include/wx-3.3/wx/richtext/richtextbuffer.h +++ b/include/wx-3.3/wx/richtext/richtextbuffer.h @@ -691,7 +691,7 @@ class WXDLLIMPEXP_RICHTEXT wxTextAttrDimensionConverter /** Constructor. */ - wxTextAttrDimensionConverter(wxDC& dc, double scale = 1.0, const wxSize& parentSize = wxDefaultSize); + wxTextAttrDimensionConverter(wxReadOnlyDC& dc, double scale = 1.0, const wxSize& parentSize = wxDefaultSize); /** Constructor. */ @@ -2546,7 +2546,7 @@ class WXDLLIMPEXP_RICHTEXT wxRichTextObject: public wxObject and @a parentRect is the container that is used to determine a relative size or position (for example if a text box must be 50% of the parent text box). */ - virtual bool Layout(wxDC& dc, wxRichTextDrawingContext& context, const wxRect& rect, const wxRect& parentRect, int style) = 0; + virtual bool Layout(wxReadOnlyDC& dc, wxRichTextDrawingContext& context, const wxRect& rect, const wxRect& parentRect, int style) = 0; /** Hit-testing: returns a flag indicating hit test details, plus @@ -2565,12 +2565,12 @@ class WXDLLIMPEXP_RICHTEXT wxRichTextObject: public wxObject @return One of the ::wxRichTextHitTestFlags values. */ - virtual int HitTest(wxDC& dc, wxRichTextDrawingContext& context, const wxPoint& pt, long& textPosition, wxRichTextObject** obj, wxRichTextObject** contextObj, int flags = 0); + virtual int HitTest(wxReadOnlyDC& dc, wxRichTextDrawingContext& context, const wxPoint& pt, long& textPosition, wxRichTextObject** obj, wxRichTextObject** contextObj, int flags = 0); /** Finds the absolute position and row height for the given character position. */ - virtual bool FindPosition(wxDC& WXUNUSED(dc), wxRichTextDrawingContext& WXUNUSED(context), long WXUNUSED(index), wxPoint& WXUNUSED(pt), int* WXUNUSED(height), bool WXUNUSED(forceLineStart)) { return false; } + virtual bool FindPosition(wxReadOnlyDC& WXUNUSED(dc), wxRichTextDrawingContext& WXUNUSED(context), long WXUNUSED(index), wxPoint& WXUNUSED(pt), int* WXUNUSED(height), bool WXUNUSED(forceLineStart)) { return false; } /** Returns the best size, i.e. the ideal starting size for this object irrespective @@ -2584,7 +2584,7 @@ class WXDLLIMPEXP_RICHTEXT wxRichTextObject: public wxObject is invalid for this object. */ - virtual bool GetRangeSize(const wxRichTextRange& range, wxSize& size, int& descent, wxDC& dc, wxRichTextDrawingContext& context, int flags, const wxPoint& position = wxPoint(0,0), const wxSize& parentSize = wxDefaultSize, wxArrayInt* partialExtents = nullptr) const = 0; + virtual bool GetRangeSize(const wxRichTextRange& range, wxSize& size, int& descent, wxReadOnlyDC& dc, wxRichTextDrawingContext& context, int flags, const wxPoint& position = wxPoint(0,0), const wxSize& parentSize = wxDefaultSize, wxArrayInt* partialExtents = nullptr) const = 0; /** Do a split from @a pos, returning an object containing the second part, and setting @@ -2898,7 +2898,7 @@ class WXDLLIMPEXP_RICHTEXT wxRichTextObject: public wxObject Calculates the available content space in the given rectangle, given the margins, border and padding specified in the object's attributes. */ - virtual wxRect GetAvailableContentArea(wxDC& dc, wxRichTextDrawingContext& context, const wxRect& outerRect) const; + virtual wxRect GetAvailableContentArea(wxReadOnlyDC& dc, wxRichTextDrawingContext& context, const wxRect& outerRect) const; /** Lays out the object first with a given amount of space, and then if no width was specified in attr, @@ -2908,7 +2908,7 @@ class WXDLLIMPEXP_RICHTEXT wxRichTextObject: public wxObject in a previous layout pass to @a availableParentSpace, but should have a width of 50% of @a availableContainerSpace. (If these two rects were the same, a 2nd pass could see the object getting too small.) */ - virtual bool LayoutToBestSize(wxDC& dc, wxRichTextDrawingContext& context, wxRichTextBuffer* buffer, + virtual bool LayoutToBestSize(wxReadOnlyDC& dc, wxRichTextDrawingContext& context, wxRichTextBuffer* buffer, const wxRichTextAttr& parentAttr, const wxRichTextAttr& attr, const wxRect& availableParentSpace, const wxRect& availableContainerSpace, int style); @@ -3021,7 +3021,7 @@ class WXDLLIMPEXP_RICHTEXT wxRichTextObject: public wxObject /** Converts units in tenths of a millimetre to device units. */ - int ConvertTenthsMMToPixels(wxDC& dc, int units) const; + int ConvertTenthsMMToPixels(wxReadOnlyDC& dc, int units) const; /** Converts units in tenths of a millimetre to device units. @@ -3031,7 +3031,7 @@ class WXDLLIMPEXP_RICHTEXT wxRichTextObject: public wxObject /** Convert units in pixels to tenths of a millimetre. */ - int ConvertPixelsToTenthsMM(wxDC& dc, int pixels) const; + int ConvertPixelsToTenthsMM(wxReadOnlyDC& dc, int pixels) const; /** Convert units in pixels to tenths of a millimetre. @@ -3055,12 +3055,12 @@ class WXDLLIMPEXP_RICHTEXT wxRichTextObject: public wxObject Note that the outline doesn't affect the position of the rectangle, it's drawn in whatever space is available. */ - static bool GetBoxRects(wxDC& dc, wxRichTextBuffer* buffer, const wxRichTextAttr& attr, wxRect& marginRect, wxRect& borderRect, wxRect& contentRect, wxRect& paddingRect, wxRect& outlineRect); + static bool GetBoxRects(wxReadOnlyDC& dc, wxRichTextBuffer* buffer, const wxRichTextAttr& attr, wxRect& marginRect, wxRect& borderRect, wxRect& contentRect, wxRect& paddingRect, wxRect& outlineRect); /** Returns the total margin for the object in pixels, taking into account margin, padding and border size. */ - static bool GetTotalMargin(wxDC& dc, wxRichTextBuffer* buffer, const wxRichTextAttr& attr, int& leftMargin, int& rightMargin, + static bool GetTotalMargin(wxReadOnlyDC& dc, wxRichTextBuffer* buffer, const wxRichTextAttr& attr, int& leftMargin, int& rightMargin, int& topMargin, int& bottomMargin); /** @@ -3069,7 +3069,7 @@ class WXDLLIMPEXP_RICHTEXT wxRichTextObject: public wxObject availableContainerSpace might be a parent that the cell has to compute its width relative to. E.g. a cell that's 50% of its parent. */ - static wxRect AdjustAvailableSpace(wxDC& dc, wxRichTextBuffer* buffer, const wxRichTextAttr& parentAttr, const wxRichTextAttr& childAttr, + static wxRect AdjustAvailableSpace(wxReadOnlyDC& dc, wxRichTextBuffer* buffer, const wxRichTextAttr& parentAttr, const wxRichTextAttr& childAttr, const wxRect& availableParentSpace, const wxRect& availableContainerSpace); protected: @@ -3119,9 +3119,9 @@ class WXDLLIMPEXP_RICHTEXT wxRichTextCompositeObject: public wxRichTextObject // Overridables - virtual int HitTest(wxDC& dc, wxRichTextDrawingContext& context, const wxPoint& pt, long& textPosition, wxRichTextObject** obj, wxRichTextObject** contextObj, int flags = 0) override; + virtual int HitTest(wxReadOnlyDC& dc, wxRichTextDrawingContext& context, const wxPoint& pt, long& textPosition, wxRichTextObject** obj, wxRichTextObject** contextObj, int flags = 0) override; - virtual bool FindPosition(wxDC& dc, wxRichTextDrawingContext& context, long index, wxPoint& pt, int* height, bool forceLineStart) override; + virtual bool FindPosition(wxReadOnlyDC& dc, wxRichTextDrawingContext& context, long index, wxPoint& pt, int* height, bool forceLineStart) override; virtual void CalculateRange(long start, long& end) override; @@ -3129,7 +3129,7 @@ class WXDLLIMPEXP_RICHTEXT wxRichTextCompositeObject: public wxRichTextObject virtual wxString GetTextForRange(const wxRichTextRange& range) const override; - virtual bool GetRangeSize(const wxRichTextRange& range, wxSize& size, int& descent, wxDC& dc, wxRichTextDrawingContext& context, int flags, const wxPoint& position = wxPoint(0,0), const wxSize& parentSize = wxDefaultSize, wxArrayInt* partialExtents = nullptr) const override; + virtual bool GetRangeSize(const wxRichTextRange& range, wxSize& size, int& descent, wxReadOnlyDC& dc, wxRichTextDrawingContext& context, int flags, const wxPoint& position = wxPoint(0,0), const wxSize& parentSize = wxDefaultSize, wxArrayInt* partialExtents = nullptr) const override; virtual void Dump(wxTextOutputStream& stream) override; @@ -3240,13 +3240,13 @@ class WXDLLIMPEXP_RICHTEXT wxRichTextParagraphLayoutBox: public wxRichTextCompos // Overridables - virtual int HitTest(wxDC& dc, wxRichTextDrawingContext& context, const wxPoint& pt, long& textPosition, wxRichTextObject** obj, wxRichTextObject** contextObj, int flags = 0) override; + virtual int HitTest(wxReadOnlyDC& dc, wxRichTextDrawingContext& context, const wxPoint& pt, long& textPosition, wxRichTextObject** obj, wxRichTextObject** contextObj, int flags = 0) override; virtual bool Draw(wxDC& dc, wxRichTextDrawingContext& context, const wxRichTextRange& range, const wxRichTextSelection& selection, const wxRect& rect, int descent, int style) override; - virtual bool Layout(wxDC& dc, wxRichTextDrawingContext& context, const wxRect& rect, const wxRect& parentRect, int style) override; + virtual bool Layout(wxReadOnlyDC& dc, wxRichTextDrawingContext& context, const wxRect& rect, const wxRect& parentRect, int style) override; - virtual bool GetRangeSize(const wxRichTextRange& range, wxSize& size, int& descent, wxDC& dc, wxRichTextDrawingContext& context, int flags, const wxPoint& position = wxPoint(0,0), const wxSize& parentSize = wxDefaultSize, wxArrayInt* partialExtents = nullptr) const override; + virtual bool GetRangeSize(const wxRichTextRange& range, wxSize& size, int& descent, wxReadOnlyDC& dc, wxRichTextDrawingContext& context, int flags, const wxPoint& position = wxPoint(0,0), const wxSize& parentSize = wxDefaultSize, wxArrayInt* partialExtents = nullptr) const override; virtual bool DeleteRange(const wxRichTextRange& range) override; @@ -3937,9 +3937,9 @@ class WXDLLIMPEXP_RICHTEXT wxRichTextField: public wxRichTextParagraphLayoutBox virtual bool Draw(wxDC& dc, wxRichTextDrawingContext& context, const wxRichTextRange& range, const wxRichTextSelection& selection, const wxRect& rect, int descent, int style) override; - virtual bool Layout(wxDC& dc, wxRichTextDrawingContext& context, const wxRect& rect, const wxRect& parentRect, int style) override; + virtual bool Layout(wxReadOnlyDC& dc, wxRichTextDrawingContext& context, const wxRect& rect, const wxRect& parentRect, int style) override; - virtual bool GetRangeSize(const wxRichTextRange& range, wxSize& size, int& descent, wxDC& dc, wxRichTextDrawingContext& context, int flags, const wxPoint& position = wxPoint(0,0), const wxSize& parentSize = wxDefaultSize, wxArrayInt* partialExtents = nullptr) const override; + virtual bool GetRangeSize(const wxRichTextRange& range, wxSize& size, int& descent, wxReadOnlyDC& dc, wxRichTextDrawingContext& context, int flags, const wxPoint& position = wxPoint(0,0), const wxSize& parentSize = wxDefaultSize, wxArrayInt* partialExtents = nullptr) const override; virtual wxString GetXMLNodeName() const override { return wxT("field"); } @@ -4031,13 +4031,13 @@ class WXDLLIMPEXP_RICHTEXT wxRichTextFieldType: public wxObject and @a parentRect is the container that is used to determine a relative size or position (for example if a text box must be 50% of the parent text box). */ - virtual bool Layout(wxRichTextField* obj, wxDC& dc, wxRichTextDrawingContext& context, const wxRect& rect, const wxRect& parentRect, int style) = 0; + virtual bool Layout(wxRichTextField* obj, wxReadOnlyDC& dc, wxRichTextDrawingContext& context, const wxRect& rect, const wxRect& parentRect, int style) = 0; /** Returns the object size for the given range. Returns @false if the range is invalid for this object. */ - virtual bool GetRangeSize(wxRichTextField* obj, const wxRichTextRange& range, wxSize& size, int& descent, wxDC& dc, wxRichTextDrawingContext& context, int flags, const wxPoint& position = wxPoint(0,0), const wxSize& parentSize = wxDefaultSize, wxArrayInt* partialExtents = nullptr) const = 0; + virtual bool GetRangeSize(wxRichTextField* obj, const wxRichTextRange& range, wxSize& size, int& descent, wxReadOnlyDC& dc, wxRichTextDrawingContext& context, int flags, const wxPoint& position = wxPoint(0,0), const wxSize& parentSize = wxDefaultSize, wxArrayInt* partialExtents = nullptr) const = 0; /** Returns @true if we can edit the object's properties via a GUI. @@ -4199,18 +4199,18 @@ class WXDLLIMPEXP_RICHTEXT wxRichTextFieldTypeStandard: public wxRichTextFieldTy and @a parentRect is the container that is used to determine a relative size or position (for example if a text box must be 50% of the parent text box). */ - virtual bool Layout(wxRichTextField* obj, wxDC& dc, wxRichTextDrawingContext& context, const wxRect& rect, const wxRect& parentRect, int style) override; + virtual bool Layout(wxRichTextField* obj, wxReadOnlyDC& dc, wxRichTextDrawingContext& context, const wxRect& rect, const wxRect& parentRect, int style) override; /** Returns the object size for the given range. Returns @false if the range is invalid for this object. */ - virtual bool GetRangeSize(wxRichTextField* obj, const wxRichTextRange& range, wxSize& size, int& descent, wxDC& dc, wxRichTextDrawingContext& context, int flags, const wxPoint& position = wxPoint(0,0), const wxSize& parentSize = wxDefaultSize, wxArrayInt* partialExtents = nullptr) const override; + virtual bool GetRangeSize(wxRichTextField* obj, const wxRichTextRange& range, wxSize& size, int& descent, wxReadOnlyDC& dc, wxRichTextDrawingContext& context, int flags, const wxPoint& position = wxPoint(0,0), const wxSize& parentSize = wxDefaultSize, wxArrayInt* partialExtents = nullptr) const override; /** Get the size of the field, given the label, font size, and so on. */ - wxSize GetSize(wxRichTextField* obj, wxDC& dc, wxRichTextDrawingContext& context, int style) const; + wxSize GetSize(wxRichTextField* obj, wxReadOnlyDC& dc, wxRichTextDrawingContext& context, int style) const; /** Returns @true if the display type is wxRICHTEXT_FIELD_STYLE_COMPOSITE, @false otherwise. @@ -4512,13 +4512,13 @@ class WXDLLIMPEXP_RICHTEXT wxRichTextParagraph: public wxRichTextCompositeObject virtual bool Draw(wxDC& dc, wxRichTextDrawingContext& context, const wxRichTextRange& range, const wxRichTextSelection& selection, const wxRect& rect, int descent, int style) override; - virtual bool Layout(wxDC& dc, wxRichTextDrawingContext& context, const wxRect& rect, const wxRect& parentRect, int style) override; + virtual bool Layout(wxReadOnlyDC& dc, wxRichTextDrawingContext& context, const wxRect& rect, const wxRect& parentRect, int style) override; - virtual bool GetRangeSize(const wxRichTextRange& range, wxSize& size, int& descent, wxDC& dc, wxRichTextDrawingContext& context, int flags, const wxPoint& position = wxPoint(0,0), const wxSize& parentSize = wxDefaultSize, wxArrayInt* partialExtents = nullptr) const override; + virtual bool GetRangeSize(const wxRichTextRange& range, wxSize& size, int& descent, wxReadOnlyDC& dc, wxRichTextDrawingContext& context, int flags, const wxPoint& position = wxPoint(0,0), const wxSize& parentSize = wxDefaultSize, wxArrayInt* partialExtents = nullptr) const override; - virtual bool FindPosition(wxDC& dc, wxRichTextDrawingContext& context, long index, wxPoint& pt, int* height, bool forceLineStart) override; + virtual bool FindPosition(wxReadOnlyDC& dc, wxRichTextDrawingContext& context, long index, wxPoint& pt, int* height, bool forceLineStart) override; - virtual int HitTest(wxDC& dc, wxRichTextDrawingContext& context, const wxPoint& pt, long& textPosition, wxRichTextObject** obj, wxRichTextObject** contextObj, int flags = 0) override; + virtual int HitTest(wxReadOnlyDC& dc, wxRichTextDrawingContext& context, const wxPoint& pt, long& textPosition, wxRichTextObject** obj, wxRichTextObject** contextObj, int flags = 0) override; virtual void CalculateRange(long start, long& end) override; @@ -4550,7 +4550,7 @@ class WXDLLIMPEXP_RICHTEXT wxRichTextParagraph: public wxRichTextCompositeObject /** Applies paragraph styles such as centering to the wrapped lines. */ - virtual void ApplyParagraphStyle(wxRichTextLine* line, const wxRichTextAttr& attr, const wxRect& rect, wxDC& dc); + virtual void ApplyParagraphStyle(wxRichTextLine* line, const wxRichTextAttr& attr, const wxRect& rect, wxReadOnlyDC& dc); /** Inserts text at the given position. @@ -4583,7 +4583,7 @@ class WXDLLIMPEXP_RICHTEXT wxRichTextParagraph: public wxRichTextCompositeObject Finds a suitable wrap position. @a wrapPosition is the last position in the line to the left of the split. */ - bool FindWrapPosition(const wxRichTextRange& range, wxDC& dc, wxRichTextDrawingContext& context, int availableSpace, long& wrapPosition, wxArrayInt* partialExtents); + bool FindWrapPosition(const wxRichTextRange& range, wxReadOnlyDC& dc, wxRichTextDrawingContext& context, int availableSpace, long& wrapPosition, wxArrayInt* partialExtents); /** Finds the object at the given position. @@ -4639,7 +4639,7 @@ class WXDLLIMPEXP_RICHTEXT wxRichTextParagraph: public wxRichTextCompositeObject /** Lays out the floating objects. */ - void LayoutFloat(wxDC& dc, wxRichTextDrawingContext& context, const wxRect& rect, const wxRect& parentRect, int style, wxRichTextFloatCollector* floatCollector); + void LayoutFloat(wxReadOnlyDC& dc, wxRichTextDrawingContext& context, const wxRect& rect, const wxRect& parentRect, int style, wxRichTextFloatCollector* floatCollector); /** Whether the paragraph is impacted by floating objects from above. @@ -4696,11 +4696,11 @@ class WXDLLIMPEXP_RICHTEXT wxRichTextPlainText: public wxRichTextObject virtual bool Draw(wxDC& dc, wxRichTextDrawingContext& context, const wxRichTextRange& range, const wxRichTextSelection& selection, const wxRect& rect, int descent, int style) override; - virtual bool Layout(wxDC& dc, wxRichTextDrawingContext& context, const wxRect& rect, const wxRect& parentRect, int style) override; + virtual bool Layout(wxReadOnlyDC& dc, wxRichTextDrawingContext& context, const wxRect& rect, const wxRect& parentRect, int style) override; virtual bool AdjustAttributes(wxRichTextAttr& attr, wxRichTextDrawingContext& context) override; - virtual bool GetRangeSize(const wxRichTextRange& range, wxSize& size, int& descent, wxDC& dc, wxRichTextDrawingContext& context, int flags, const wxPoint& position = wxPoint(0,0), const wxSize& parentSize = wxDefaultSize, wxArrayInt* partialExtents = nullptr) const override; + virtual bool GetRangeSize(const wxRichTextRange& range, wxSize& size, int& descent, wxReadOnlyDC& dc, wxRichTextDrawingContext& context, int flags, const wxPoint& position = wxPoint(0,0), const wxSize& parentSize = wxDefaultSize, wxArrayInt* partialExtents = nullptr) const override; virtual wxString GetTextForRange(const wxRichTextRange& range) const override; @@ -4990,9 +4990,9 @@ class WXDLLIMPEXP_RICHTEXT wxRichTextImage: public wxRichTextObject virtual bool Draw(wxDC& dc, wxRichTextDrawingContext& context, const wxRichTextRange& range, const wxRichTextSelection& selection, const wxRect& rect, int descent, int style) override; - virtual bool Layout(wxDC& dc, wxRichTextDrawingContext& context, const wxRect& rect, const wxRect& parentRect, int style) override; + virtual bool Layout(wxReadOnlyDC& dc, wxRichTextDrawingContext& context, const wxRect& rect, const wxRect& parentRect, int style) override; - virtual bool GetRangeSize(const wxRichTextRange& range, wxSize& size, int& descent, wxDC& dc, wxRichTextDrawingContext& context, int flags, const wxPoint& position = wxPoint(0,0), const wxSize& parentSize = wxDefaultSize, wxArrayInt* partialExtents = nullptr) const override; + virtual bool GetRangeSize(const wxRichTextRange& range, wxSize& size, int& descent, wxReadOnlyDC& dc, wxRichTextDrawingContext& context, int flags, const wxPoint& position = wxPoint(0,0), const wxSize& parentSize = wxDefaultSize, wxArrayInt* partialExtents = nullptr) const override; /** Returns the 'natural' size for this object - the image size. @@ -5063,7 +5063,7 @@ class WXDLLIMPEXP_RICHTEXT wxRichTextImage: public wxRichTextObject /** Creates a cached image at the required size. */ - virtual bool LoadImageCache(wxDC& dc, wxRichTextDrawingContext& context, wxSize& retImageSize, bool resetCache = false, const wxSize& parentSize = wxDefaultSize); + virtual bool LoadImageCache(wxReadOnlyDC& dc, wxRichTextDrawingContext& context, wxSize& retImageSize, bool resetCache = false, const wxSize& parentSize = wxDefaultSize); /** Do the loading and scaling @@ -5606,7 +5606,7 @@ class WXDLLIMPEXP_RICHTEXT wxRichTextBuffer: public wxRichTextParagraphLayoutBox // Implementation - virtual int HitTest(wxDC& dc, wxRichTextDrawingContext& context, const wxPoint& pt, long& textPosition, wxRichTextObject** obj, wxRichTextObject** contextObj, int flags = 0) override; + virtual int HitTest(wxReadOnlyDC& dc, wxRichTextDrawingContext& context, const wxPoint& pt, long& textPosition, wxRichTextObject** obj, wxRichTextObject** contextObj, int flags = 0) override; /** Copies the buffer. @@ -5945,7 +5945,7 @@ class WXDLLIMPEXP_RICHTEXT wxRichTextCell: public wxRichTextBox virtual bool Draw(wxDC& dc, wxRichTextDrawingContext& context, const wxRichTextRange& range, const wxRichTextSelection& selection, const wxRect& rect, int descent, int style) override; - virtual int HitTest(wxDC& dc, wxRichTextDrawingContext& context, const wxPoint& pt, long& textPosition, wxRichTextObject** obj, wxRichTextObject** contextObj, int flags = 0) override; + virtual int HitTest(wxReadOnlyDC& dc, wxRichTextDrawingContext& context, const wxPoint& pt, long& textPosition, wxRichTextObject** obj, wxRichTextObject** contextObj, int flags = 0) override; virtual bool AdjustAttributes(wxRichTextAttr& attr, wxRichTextDrawingContext& context) override; @@ -6023,15 +6023,15 @@ class WXDLLIMPEXP_RICHTEXT wxRichTextTable: public wxRichTextBox virtual bool Draw(wxDC& dc, wxRichTextDrawingContext& context, const wxRichTextRange& range, const wxRichTextSelection& selection, const wxRect& rect, int descent, int style) override; - virtual int HitTest(wxDC& dc, wxRichTextDrawingContext& context, const wxPoint& pt, long& textPosition, wxRichTextObject** obj, wxRichTextObject** contextObj, int flags = 0) override; + virtual int HitTest(wxReadOnlyDC& dc, wxRichTextDrawingContext& context, const wxPoint& pt, long& textPosition, wxRichTextObject** obj, wxRichTextObject** contextObj, int flags = 0) override; virtual bool AdjustAttributes(wxRichTextAttr& attr, wxRichTextDrawingContext& context) override; virtual wxString GetXMLNodeName() const override { return wxT("table"); } - virtual bool Layout(wxDC& dc, wxRichTextDrawingContext& context, const wxRect& rect, const wxRect& parentRect, int style) override; + virtual bool Layout(wxReadOnlyDC& dc, wxRichTextDrawingContext& context, const wxRect& rect, const wxRect& parentRect, int style) override; - virtual bool GetRangeSize(const wxRichTextRange& range, wxSize& size, int& descent, wxDC& dc, wxRichTextDrawingContext& context, int flags, const wxPoint& position = wxPoint(0,0), const wxSize& parentSize = wxDefaultSize, wxArrayInt* partialExtents = nullptr) const override; + virtual bool GetRangeSize(const wxRichTextRange& range, wxSize& size, int& descent, wxReadOnlyDC& dc, wxRichTextDrawingContext& context, int flags, const wxPoint& position = wxPoint(0,0), const wxSize& parentSize = wxDefaultSize, wxArrayInt* partialExtents = nullptr) const override; virtual bool DeleteRange(const wxRichTextRange& range) override; @@ -6049,7 +6049,7 @@ class WXDLLIMPEXP_RICHTEXT wxRichTextTable: public wxRichTextBox virtual bool ExportXML(wxXmlNode* parent, wxRichTextXMLHandler* handler) override; #endif - virtual bool FindPosition(wxDC& dc, wxRichTextDrawingContext& context, long index, wxPoint& pt, int* height, bool forceLineStart) override; + virtual bool FindPosition(wxReadOnlyDC& dc, wxRichTextDrawingContext& context, long index, wxPoint& pt, int* height, bool forceLineStart) override; virtual void CalculateRange(long start, long& end) override; @@ -6985,7 +6985,7 @@ class WXDLLIMPEXP_RICHTEXT wxRichTextRenderer: public wxObject /** Measure the bullet. */ - virtual bool MeasureBullet(wxRichTextParagraph* paragraph, wxDC& dc, const wxRichTextAttr& attr, wxSize& sz) = 0; + virtual bool MeasureBullet(wxRichTextParagraph* paragraph, wxReadOnlyDC& dc, const wxRichTextAttr& attr, wxSize& sz) = 0; }; /** @@ -7020,10 +7020,10 @@ class WXDLLIMPEXP_RICHTEXT wxRichTextStdRenderer: public wxRichTextRenderer virtual bool EnumerateStandardBulletNames(wxArrayString& bulletNames) override; // Measure the bullet. - virtual bool MeasureBullet(wxRichTextParagraph* paragraph, wxDC& dc, const wxRichTextAttr& attr, wxSize& sz) override; + virtual bool MeasureBullet(wxRichTextParagraph* paragraph, wxReadOnlyDC& dc, const wxRichTextAttr& attr, wxSize& sz) override; // Set a font which may depend on text effects. - static void SetFontForBullet(wxRichTextBuffer& buffer, wxDC& dc, const wxRichTextAttr& attr); + static void SetFontForBullet(wxRichTextBuffer& buffer, wxReadOnlyDC& dc, const wxRichTextAttr& attr); }; /*! diff --git a/include/wx-3.3/wx/richtext/richtextctrl.h b/include/wx-3.3/wx/richtext/richtextctrl.h index d2cdf59..0268aa7 100644 --- a/include/wx-3.3/wx/richtext/richtextctrl.h +++ b/include/wx-3.3/wx/richtext/richtextctrl.h @@ -1420,7 +1420,7 @@ class WXDLLIMPEXP_RICHTEXT wxRichTextCtrl : public wxControl, /** Implements layout. An application may override this to perform operations before or after layout. */ - virtual void DoLayoutBuffer(wxRichTextBuffer& buffer, wxDC& dc, wxRichTextDrawingContext& context, const wxRect& rect, const wxRect& parentRect, int flags); + virtual void DoLayoutBuffer(wxRichTextBuffer& buffer, wxReadOnlyDC& dc, wxRichTextDrawingContext& context, const wxRect& rect, const wxRect& parentRect, int flags); /** Move the caret to the given character position. diff --git a/include/wx-3.3/wx/richtext/richtextstyles.h b/include/wx-3.3/wx/richtext/richtextstyles.h index e32a4b5..78ca7d8 100644 --- a/include/wx-3.3/wx/richtext/richtextstyles.h +++ b/include/wx-3.3/wx/richtext/richtextstyles.h @@ -532,7 +532,7 @@ class WXDLLIMPEXP_RICHTEXT wxRichTextStyleListBox: public wxHtmlListBox void OnIdle(wxIdleEvent& event); /// Convert units in tends of a millimetre to device units - int ConvertTenthsMMToPixels(wxDC& dc, int units) const; + int ConvertTenthsMMToPixels(wxReadOnlyDC& dc, int units) const; /// Can we set the selection based on the editor caret position? /// Need to override this if being used in a combobox popup diff --git a/include/wx-3.3/wx/richtext/richtextxml.h b/include/wx-3.3/wx/richtext/richtextxml.h index dd776a5..9410f4e 100644 --- a/include/wx-3.3/wx/richtext/richtextxml.h +++ b/include/wx-3.3/wx/richtext/richtextxml.h @@ -163,7 +163,7 @@ class WXDLLIMPEXP_RICHTEXT wxRichTextXMLHelper: public wxObject @class wxRichTextXMLHandler Implements XML loading and saving. Two methods of saving are included: - writing directly to a text stream, and populating an wxXmlDocument + writing directly to a text stream, and populating a wxXmlDocument before writing it. The former method is considerably faster, so we favour that one, even though the code is a little less elegant. */ diff --git a/include/wx-3.3/wx/scrolwin.h b/include/wx-3.3/wx/scrolwin.h index abedfb8..7bd98f8 100644 --- a/include/wx-3.3/wx/scrolwin.h +++ b/include/wx-3.3/wx/scrolwin.h @@ -85,8 +85,24 @@ class WXDLLIMPEXP_CORE wxAnyScrollHelperBase // Override this function to draw the graphic (or just process EVT_PAINT) virtual void OnDraw(wxDC& WXUNUSED(dc)) { } - // change the DC origin according to the scroll position. - virtual void DoPrepareDC(wxDC& dc) = 0; + // Set up the DC according to the scroll position. + // + // For historical reasons, we have DoPrepareDC() but new code should + // implement DoPrepareReadOnlyDC() instead, which ought to be pure virtual + // if it hasn't been added later. + virtual void DoPrepareReadOnlyDC(wxReadOnlyDC& WXUNUSED(dc)) + { + // If DoPrepareDC() is overridden in the derived class, this function + // won't be called at all unless PrepareReadOnlyDC() is explicitly + // called. + // + // But if DoPrepareDC() is not overridden, this one must be. + wxFAIL_MSG("Must be overridden if DoPrepareDC() is not."); + } + + // This function continues to exist for compatibility but delegates to + // DoPrepareReadOnlyDC() now. + virtual void DoPrepareDC(wxDC& dc); // Simple accessor for the window that is really being scrolled. wxWindow *GetTargetWindow() const { return m_targetWindow; } @@ -218,7 +234,7 @@ class WXDLLIMPEXP_CORE wxScrollHelperBase : public wxAnyScrollHelperBase void SetTargetRect(const wxRect& rect) { m_rectToScroll = rect; } wxRect GetTargetRect() const { return m_rectToScroll; } - virtual void DoPrepareDC(wxDC& dc) override; + virtual void DoPrepareReadOnlyDC(wxReadOnlyDC& dc) override; // are we generating the autoscroll events? bool IsAutoScrolling() const { return m_timerAutoScroll != nullptr; } @@ -354,7 +370,9 @@ class WXDLLIMPEXP_CORE wxScrollHelperBase : public wxAnyScrollHelperBase // methods to corresponding wxScrollHelper methods #define WX_FORWARD_TO_SCROLL_HELPER() \ public: \ + virtual void PrepareReadOnlyDC(wxReadOnlyDC& dc) override { DoPrepareReadOnlyDC(dc); } \ virtual void PrepareDC(wxDC& dc) override { DoPrepareDC(dc); } \ + void PrepareDC(wxReadOnlyDC& dc) { DoPrepareReadOnlyDC(dc); } \ virtual bool Layout() override { return ScrollLayout(); } \ virtual bool CanScroll(int orient) const override \ { return IsScrollbarShown(orient); } \ diff --git a/include/wx-3.3/wx/simplebook.h b/include/wx-3.3/wx/simplebook.h index fa122a8..e6061ba 100644 --- a/include/wx-3.3/wx/simplebook.h +++ b/include/wx-3.3/wx/simplebook.h @@ -199,8 +199,10 @@ class wxSimplebook : public wxCompositeBookCtrlBase page->ShowWithEffect(m_showEffect, m_showTimeout); // Unlike simple Show(), ShowWithEffect() doesn't necessarily give - // focus to the window, but we do expect the new page to have focus. - page->SetFocus(); + // focus to the window, but we do expect the new page to have focus + // if it's currently visible. + if ( page->IsShownOnScreen() ) + page->SetFocus(); } else { diff --git a/include/wx-3.3/wx/string.h b/include/wx-3.3/wx/string.h index 094327d..69b8cd7 100644 --- a/include/wx-3.3/wx/string.h +++ b/include/wx-3.3/wx/string.h @@ -1502,7 +1502,7 @@ class WXDLLIMPEXP_BASE wxString wxString& Truncate(size_t uiLen); // empty string contents void Empty() { clear(); } - // empty the string and free memory + // empty string contents void Clear() { clear(); } // contents test diff --git a/include/wx-3.3/wx/sysopt.h b/include/wx-3.3/wx/sysopt.h index ab22ae9..f20b211 100644 --- a/include/wx-3.3/wx/sysopt.h +++ b/include/wx-3.3/wx/sysopt.h @@ -11,6 +11,7 @@ #define _WX_SYSOPT_H_ #include "wx/object.h" +#include "wx/string.h" // ---------------------------------------------------------------------------- // Enables an application to influence the wxWidgets implementation diff --git a/include/wx-3.3/wx/systhemectrl.h b/include/wx-3.3/wx/systhemectrl.h index c50dab0..a2bc019 100644 --- a/include/wx-3.3/wx/systhemectrl.h +++ b/include/wx-3.3/wx/systhemectrl.h @@ -72,6 +72,9 @@ class wxSystemThemedControl : public C, DoEnableSystemTheme(enable, this); } + // Using wxBORDER_THEME is unnecessary and looks bad for these controls. + virtual bool CanApplyThemeBorder() const override { return false; } + protected: void EnableSystemThemeByDefault() { diff --git a/include/wx-3.3/wx/textctrl.h b/include/wx-3.3/wx/textctrl.h index e55e5e1..44956d4 100644 --- a/include/wx-3.3/wx/textctrl.h +++ b/include/wx-3.3/wx/textctrl.h @@ -103,7 +103,17 @@ const wxTextCoord wxInvalidTextCoord = -2; // wxTextCtrl file types // ---------------------------------------------------------------------------- -#define wxTEXT_TYPE_ANY 0 +// wxOSX and wxMSW support RTF in wxTextCtrl. +#if defined(__WXOSX__) || (defined(__WXMSW__) && wxUSE_RICHEDIT) + #define wxHAS_TEXTCTRL_RTF +#endif + +enum wxTextCtrlFileType +{ + wxTEXT_TYPE_ANY, + wxTEXT_TYPE_PLAIN, + wxTEXT_TYPE_RTF +}; // ---------------------------------------------------------------------------- // wxTextCtrl::HitTest return values @@ -680,6 +690,14 @@ class WXDLLIMPEXP_CORE wxTextAreaBase virtual wxString GetValue() const = 0; virtual void SetValue(const wxString& value) = 0; + // Returns whether the RTF-related functions below can be used. + virtual bool IsRTFSupported() { return false; } + + // Base class implementations simply assert, if IsRTFSupported() returns + // true, the port must override these functions to really implement them. + virtual wxString GetRTFValue() const; + virtual void SetRTFValue(const wxString& val); + protected: // implementation of loading/saving virtual bool DoLoadFile(const wxString& file, int fileType); diff --git a/include/wx-3.3/wx/tglbtn.h b/include/wx-3.3/wx/tglbtn.h index 23abefc..b193fb5 100644 --- a/include/wx-3.3/wx/tglbtn.h +++ b/include/wx-3.3/wx/tglbtn.h @@ -54,6 +54,7 @@ class WXDLLIMPEXP_CORE wxToggleButtonBase : public wxAnyButton wxUpdateUIEvent event( GetId() ); event.SetEventObject(this); + DoPrepareUpdateWindowUI(event); if (GetEventHandler()->ProcessEvent(event) ) { diff --git a/include/wx-3.3/wx/typeinfo.h b/include/wx-3.3/wx/typeinfo.h index f3b81d4..4b54b94 100644 --- a/include/wx-3.3/wx/typeinfo.h +++ b/include/wx-3.3/wx/typeinfo.h @@ -38,7 +38,7 @@ #endif #include -#include +#include #define _WX_DECLARE_TYPEINFO_CUSTOM(CLS, IDENTFUNC) #define WX_DECLARE_TYPEINFO_INLINE(CLS) @@ -116,23 +116,22 @@ public: \ // type identifier, defined with WX_DEFINE_TYPEINFO(). #define WX_DECLARE_TYPEINFO(CLS) \ private: \ - static CLS sm_wxClassInfo(); \ -_WX_DECLARE_TYPEINFO_CUSTOM(CLS, sm_wxClassInfo) + static char ms_wxDummy; \ + static void ms_wxClassInfo(); \ +_WX_DECLARE_TYPEINFO_CUSTOM(CLS, ms_wxClassInfo) // Use this macro to implement type identifier function required by // WX_DECLARE_TYPEINFO(). -// NOTE: CLS is required to have default ctor. If it doesn't -// already, you should provide a private dummy one. #define WX_DEFINE_TYPEINFO(CLS) \ -CLS CLS::sm_wxClassInfo() { return CLS(); } +char CLS::ms_wxDummy; \ +void CLS::ms_wxClassInfo() { ms_wxDummy = 0; } // Use this macro to declare type info fully inline in class. -// NOTE: CLS is required to have default ctor. If it doesn't -// already, you should provide a private dummy one. #define WX_DECLARE_TYPEINFO_INLINE(CLS) \ private: \ - static CLS sm_wxClassInfo() { return CLS(); } \ -_WX_DECLARE_TYPEINFO_CUSTOM(CLS, sm_wxClassInfo) + static char ms_wxDummy; \ + static void ms_wxClassInfo() { ms_wxDummy = 0; } \ +_WX_DECLARE_TYPEINFO_CUSTOM(CLS, ms_wxClassInfo) #define wxTypeId(OBJ) (OBJ).GetWxTypeId() diff --git a/include/wx-3.3/wx/utils.h b/include/wx-3.3/wx/utils.h index 47c5e35..9dbcb23 100644 --- a/include/wx-3.3/wx/utils.h +++ b/include/wx-3.3/wx/utils.h @@ -803,6 +803,10 @@ WXDLLIMPEXP_CORE bool wxYield(); // Like wxYield, but fails silently if the yield is recursive. WXDLLIMPEXP_CORE bool wxYieldIfNeeded(); +#ifdef __WINDOWS__ +WXDLLIMPEXP_CORE bool wxMSWIsOnSecureScreen(); +#endif // __WINDOWS__ + // ---------------------------------------------------------------------------- // Windows resources access // ---------------------------------------------------------------------------- diff --git a/include/wx-3.3/wx/versioninfo.h b/include/wx-3.3/wx/versioninfo.h index 1aa9f89..865484c 100644 --- a/include/wx-3.3/wx/versioninfo.h +++ b/include/wx-3.3/wx/versioninfo.h @@ -12,6 +12,16 @@ #include "wx/string.h" +// ---------------------------------------------------------------------------- +// wxVersionContext: defines which version information to retrieve +// ---------------------------------------------------------------------------- + +enum class wxVersionContext +{ + RunTime, // Version used during run-time. + BuildTime // Version that the application was built with. +}; + // ---------------------------------------------------------------------------- // wxVersionInfo: represents version information // ---------------------------------------------------------------------------- @@ -61,6 +71,12 @@ class wxVersionInfo return m_micro >= micro; } + // Return true if this version object actually has any version information. + bool IsOk() const + { + return AtLeast(0) || !m_name.empty() || !m_description.empty(); + } + const wxString& GetName() const { return m_name; } int GetMajor() const { return m_major; } @@ -73,10 +89,10 @@ class wxVersionInfo return HasDescription() ? GetDescription() : GetVersionString(); } - wxString GetVersionString() const + wxString GetNumericVersionString() const { wxString str; - str << m_name << ' ' << GetMajor() << '.' << GetMinor(); + str << GetMajor() << '.' << GetMinor(); if ( GetMicro() || GetRevision() ) { str << '.' << GetMicro(); @@ -87,6 +103,14 @@ class wxVersionInfo return str; } + wxString GetVersionString() const + { + wxString str; + str << m_name << ' ' << GetNumericVersionString(); + + return str; + } + bool HasDescription() const { return !m_description.empty(); } const wxString& GetDescription() const { return m_description; } diff --git a/include/wx-3.3/wx/webrequest.h b/include/wx-3.3/wx/webrequest.h index 42110d6..83deb6e 100644 --- a/include/wx-3.3/wx/webrequest.h +++ b/include/wx-3.3/wx/webrequest.h @@ -41,6 +41,8 @@ class wxWebCredentials #include "wx/stream.h" #include "wx/versioninfo.h" +#include + class wxWebResponse; class wxWebSession; class wxWebSessionFactory; @@ -121,7 +123,7 @@ class WXDLLIMPEXP_NET wxWebResponse protected: // Ctor is used by wxWebRequest and implementation classes to create public // objects from the existing implementation pointers. - friend class wxWebRequest; + friend class wxWebRequestBase; friend class wxWebRequestImpl; friend class wxWebResponseImpl; explicit wxWebResponse(const wxWebResponseImplPtr& impl); @@ -129,7 +131,7 @@ class WXDLLIMPEXP_NET wxWebResponse wxWebResponseImplPtr m_impl; }; -class WXDLLIMPEXP_NET wxWebRequest +class WXDLLIMPEXP_NET wxWebRequestBase { public: enum State @@ -149,10 +151,46 @@ class WXDLLIMPEXP_NET wxWebRequest Storage_None }; - wxWebRequest(); - wxWebRequest(const wxWebRequest& other); - wxWebRequest& operator=(const wxWebRequest& other); - ~wxWebRequest(); + struct Result + { + static Result Ok(State state = State_Active) + { + Result result; + result.state = state; + return result; + } + + static Result Cancelled() + { + Result result; + result.state = State_Cancelled; + return result; + } + + static Result Error(const wxString& error) + { + Result result; + result.state = State_Failed; + result.error = error; + return result; + } + + static Result Unauthorized(const wxString& error) + { + Result result; + result.state = State_Unauthorized; + result.error = error; + return result; + } + + bool operator!() const + { + return state == State_Failed; + } + + State state = State_Idle; + wxString error; + }; bool IsOk() const { return m_impl.get() != nullptr; } @@ -162,26 +200,19 @@ class WXDLLIMPEXP_NET wxWebRequest void SetData(const wxString& text, const wxString& contentType, const wxMBConv& conv = wxConvUTF8); - bool SetData(wxInputStream* dataStream, const wxString& contentType, wxFileOffset dataSize = wxInvalidOffset); + bool SetData(std::unique_ptr dataStream, const wxString& contentType, wxFileOffset dataSize = wxInvalidOffset); + + bool SetData(wxInputStream* dataStream, const wxString& contentType, wxFileOffset dataSize = wxInvalidOffset) + { + return SetData(std::unique_ptr(dataStream), contentType, dataSize); + } void SetStorage(Storage storage); Storage GetStorage() const; - void Start(); - - void Cancel(); - wxWebResponse GetResponse() const; - wxWebAuthChallenge GetAuthChallenge() const; - - int GetId() const; - - wxWebSession& GetSession() const; - - State GetState() const; - wxFileOffset GetBytesSent() const; wxFileOffset GetBytesExpectedToSend() const; @@ -192,9 +223,54 @@ class WXDLLIMPEXP_NET wxWebRequest wxWebRequestHandle GetNativeHandle() const; - void DisablePeerVerify(bool disable = true); + enum + { + Ignore_Certificate = 1, + Ignore_Host = 2, + Ignore_All = Ignore_Certificate | Ignore_Host + }; + + void MakeInsecure(int flags = Ignore_All); + int GetSecurityFlags() const; + + void DisablePeerVerify(bool disable = true) + { + MakeInsecure(disable ? Ignore_Certificate : 0); + } + + bool IsPeerVerifyDisabled() const + { + return (GetSecurityFlags() & Ignore_Certificate) != 0; + } + +protected: + wxWebRequestBase(); + explicit wxWebRequestBase(const wxWebRequestImplPtr& impl); + wxWebRequestBase(const wxWebRequestBase& other); + wxWebRequestBase& operator=(const wxWebRequestBase& other); + ~wxWebRequestBase(); + + wxWebRequestImplPtr m_impl; +}; + +class WXDLLIMPEXP_NET wxWebRequest : public wxWebRequestBase +{ +public: + wxWebRequest() = default; + wxWebRequest(const wxWebRequest& other) = default; + wxWebRequest& operator=(const wxWebRequest& other) = default; + + void Start(); + + void Cancel(); + + wxWebAuthChallenge GetAuthChallenge() const; + + int GetId() const; + + wxWebSession& GetSession() const; - bool IsPeerVerifyDisabled() const; + State GetState() const; private: // Ctor is used by wxWebSession and implementation classes to create @@ -202,46 +278,103 @@ class WXDLLIMPEXP_NET wxWebRequest friend class wxWebSession; friend class wxWebRequestImpl; friend class wxWebResponseImpl; - explicit wxWebRequest(const wxWebRequestImplPtr& impl); + explicit wxWebRequest(const wxWebRequestImplPtr& impl) + : wxWebRequestBase(impl) + { + } +}; - wxWebRequestImplPtr m_impl; +class WXDLLIMPEXP_NET wxWebRequestSync : public wxWebRequestBase +{ +public: + wxWebRequestSync() = default; + wxWebRequestSync(const wxWebRequestSync& other) = default; + wxWebRequestSync& operator=(const wxWebRequestSync& other) = default; + + // Possible return values for the state here are State_Completed, + // State_Failed and State_Unauthorized. + Result Execute() const; + +private: + friend class wxWebSessionSync; + + explicit wxWebRequestSync(const wxWebRequestImplPtr& impl) + : wxWebRequestBase(impl) + { + } +}; + + +// Describe the proxy to be used by the web session. +class wxWebProxy +{ +public: + static wxWebProxy FromURL(const wxString& url) + { + return wxWebProxy(Type::URL, url); + } + + static wxWebProxy Disable() { return wxWebProxy(Type::Disabled); } + static wxWebProxy Default() { return wxWebProxy(Type::Default); } + + enum class Type + { + URL, + Disabled, + Default + }; + + Type GetType() const { return m_type; } + + const wxString& GetURL() const + { + wxASSERT( m_type == Type::URL ); + return m_url; + } + +private: + wxWebProxy(Type type, const wxString& url = wxString{}) + : m_type(type), m_url(url) + { + } + + // These fields never change but can't be const because we want these + // objects to be copyable/assignable. + Type m_type; + wxString m_url; }; extern WXDLLIMPEXP_DATA_NET(const char) wxWebSessionBackendWinHTTP[]; extern WXDLLIMPEXP_DATA_NET(const char) wxWebSessionBackendURLSession[]; extern WXDLLIMPEXP_DATA_NET(const char) wxWebSessionBackendCURL[]; -class WXDLLIMPEXP_NET wxWebSession +// Common base class for synchronous and asynchronous web sessions. +class WXDLLIMPEXP_NET wxWebSessionBase { public: // Default ctor creates an invalid session object, only IsOpened() can be // called on it. - wxWebSession(); - - wxWebSession(const wxWebSession& other); - wxWebSession& operator=(const wxWebSession& other); - ~wxWebSession(); - - // Objects of this class can't be created directly, use the following - // factory functions to get access to them. - static wxWebSession& GetDefault(); + wxWebSessionBase(); - static wxWebSession New(const wxString& backend = wxString()); + wxWebSessionBase(const wxWebSessionBase& other); + wxWebSessionBase& operator=(const wxWebSessionBase& other); + ~wxWebSessionBase(); // Can be used to check if the given backend is available without actually // creating a session using it. static bool IsBackendAvailable(const wxString& backend); - wxWebRequest - CreateRequest(wxEvtHandler* handler, const wxString& url, int id = wxID_ANY); + wxVersionInfo GetLibraryVersionInfo() const; - wxVersionInfo GetLibraryVersionInfo(); + bool SetBaseURL(const wxString& url); void AddCommonHeader(const wxString& name, const wxString& value); void SetTempDir(const wxString& dir); wxString GetTempDir() const; + bool SetProxy(const wxWebProxy& proxy); + bool IsOpened() const; void Close(); @@ -256,11 +389,75 @@ class WXDLLIMPEXP_NET wxWebSession static void InitFactoryMap(); - explicit wxWebSession(const wxWebSessionImplPtr& impl); +protected: + // This function handles empty backend string correctly, i.e. returns the + // default backend in this case. + // + // The returned pointer should not be deleted by the caller. + // + // If the specified backend is not found, returns a null pointer. + static wxWebSessionFactory* FindFactory(const wxString& backend); + + explicit wxWebSessionBase(const wxWebSessionImplPtr& impl); + + // Return the absolute URL combining the provided one with the base URL if + // it's relative. + wxString GetFullURL(const wxString& url) const; wxWebSessionImplPtr m_impl; }; +// Web session class for using asynchronous web requests, suitable for use in +// the main thread of GUI applications. +class WXDLLIMPEXP_NET wxWebSession : public wxWebSessionBase +{ +public: + wxWebSession() = default; + + wxWebSession(const wxWebSession& other) = default; + wxWebSession& operator=(const wxWebSession& other) = default; + + // Objects of this class can't be created directly, use the following + // factory functions to get access to them. + static wxWebSession& GetDefault(); + + static wxWebSession New(const wxString& backend = wxString()); + + wxWebRequest + CreateRequest(wxEvtHandler* handler, const wxString& url, int id = wxID_ANY); + +private: + explicit wxWebSession(const wxWebSessionImplPtr& impl) + : wxWebSessionBase(impl) + { + } +}; + +// Web session class for using synchronous web requests, suitable for use in +// background worker threads. +class WXDLLIMPEXP_NET wxWebSessionSync : public wxWebSessionBase +{ +public: + wxWebSessionSync() = default; + + wxWebSessionSync(const wxWebSessionSync& other) = default; + wxWebSessionSync& operator=(const wxWebSessionSync& other) = default; + + // Objects of this class can't be created directly, use the following + // factory functions to get access to them. + static wxWebSessionSync& GetDefault(); + + static wxWebSessionSync New(const wxString& backend = wxString()); + + wxWebRequestSync CreateRequest(const wxString& url); + +private: + explicit wxWebSessionSync(const wxWebSessionImplPtr& impl) + : wxWebSessionBase(impl) + { + } +}; + class WXDLLIMPEXP_NET wxWebRequestEvent : public wxEvent { public: diff --git a/include/wx-3.3/wx/webview.h b/include/wx-3.3/wx/webview.h index 516d8fc..365b866 100644 --- a/include/wx-3.3/wx/webview.h +++ b/include/wx-3.3/wx/webview.h @@ -185,7 +185,11 @@ class WXDLLIMPEXP_WEBVIEW wxWebViewFactory : public wxObject long style = 0, const wxString& name = wxASCII_STR(wxWebViewNameStr)) = 0; virtual bool IsAvailable() { return true; } - virtual wxVersionInfo GetVersionInfo() { return wxVersionInfo(); } + virtual wxVersionInfo + GetVersionInfo(wxVersionContext WXUNUSED(context) = wxVersionContext::RunTime) + { + return wxVersionInfo(); + } virtual wxWebViewConfiguration CreateConfiguration(); }; @@ -226,7 +230,10 @@ class WXDLLIMPEXP_WEBVIEW wxWebView : public wxControl static void RegisterFactory(const wxString& backend, wxSharedPtr factory); static bool IsBackendAvailable(const wxString& backend); - static wxVersionInfo GetBackendVersionInfo(const wxString& backend = wxASCII_STR(wxWebViewBackendDefault)); + static wxVersionInfo GetBackendVersionInfo( + const wxString& backend = wxASCII_STR(wxWebViewBackendDefault), + wxVersionContext context = wxVersionContext::RunTime + ); static wxWebViewConfiguration NewConfiguration(const wxString& backend = wxASCII_STR(wxWebViewBackendDefault)); // General methods @@ -235,6 +242,7 @@ class WXDLLIMPEXP_WEBVIEW wxWebView : public wxControl m_showMenu = enable; } virtual void EnableAccessToDevTools(bool WXUNUSED(enable) = true) { } + virtual bool ShowDevTools() { return false; } virtual void EnableBrowserAcceleratorKeys(bool WXUNUSED(enable) = true) { } virtual bool AreBrowserAcceleratorKeysEnabled() const { return false; } virtual wxString GetCurrentTitle() const = 0; diff --git a/include/wx-3.3/wx/webview_chromium.h b/include/wx-3.3/wx/webview_chromium.h index 4074ad8..fe034a6 100644 --- a/include/wx-3.3/wx/webview_chromium.h +++ b/include/wx-3.3/wx/webview_chromium.h @@ -76,6 +76,10 @@ class WXDLLIMPEXP_WEBVIEW wxWebViewChromium : public wxWebView virtual void Reload(wxWebViewReloadFlags flags = wxWEBVIEW_RELOAD_DEFAULT) override; virtual bool SetProxy(const wxString& proxy) override; + virtual void EnableAccessToDevTools(bool enable) override; + virtual bool ShowDevTools() override; + virtual bool IsAccessToDevToolsEnabled() const override; + virtual wxString GetPageSource() const override; virtual wxString GetPageText() const override; @@ -205,6 +209,10 @@ class wxWebViewConfigurationChromium // Logging level must be one of cef_log_severity_t values (0 means default). int m_logLevel = 0; + // If non-zero, specifies the port to use for remote debugging (the usual + // value for it is 9223). + int m_remoteDebuggingPort = 0; + // Function to create the custom CefClient to use if non-null. // // The CefClient subclass must delegate all not otherwise implemented diff --git a/include/wx-3.3/wx/window.h b/include/wx-3.3/wx/window.h index 4931619..2e18ade 100644 --- a/include/wx-3.3/wx/window.h +++ b/include/wx-3.3/wx/window.h @@ -58,6 +58,7 @@ class WXDLLIMPEXP_FWD_CORE wxControl; class WXDLLIMPEXP_FWD_CORE wxDC; class WXDLLIMPEXP_FWD_CORE wxDropTarget; class WXDLLIMPEXP_FWD_CORE wxLayoutConstraints; +class WXDLLIMPEXP_FWD_CORE wxReadOnlyDC; class WXDLLIMPEXP_FWD_CORE wxSizer; class WXDLLIMPEXP_FWD_CORE wxTextEntry; class WXDLLIMPEXP_FWD_CORE wxToolTip; @@ -1142,7 +1143,8 @@ class WXDLLIMPEXP_CORE wxWindowBase : public wxEvtHandler // return true if window had been frozen and not unthawed yet bool IsFrozen() const { return m_freezeCount != 0; } - // adjust DC for drawing on this window + // adjust DC for measuring or drawing on this window + virtual void PrepareReadOnlyDC( wxReadOnlyDC & WXUNUSED(dc) ) { } virtual void PrepareDC( wxDC & WXUNUSED(dc) ) { } // enable or disable double buffering @@ -1339,6 +1341,11 @@ class WXDLLIMPEXP_CORE wxWindowBase : public wxEvtHandler // send wxUpdateUIEvents to this window, and children if recurse is true virtual void UpdateWindowUI(long flags = wxUPDATE_UI_NONE); + // do the window-specific processing before processing the update event + // (mainly for deciding whether wxUpdateUIEvent::Is3State() is set) + virtual void DoPrepareUpdateWindowUI(wxUpdateUIEvent& event) const + { event.Allow3rdState(false); } + // do the window-specific processing after processing the update event virtual void DoUpdateWindowUI(wxUpdateUIEvent& event) ; diff --git a/include/wx-3.3/wx/wxprec.h b/include/wx-3.3/wx/wxprec.h index 9ad7321..7ee6e0a 100644 --- a/include/wx-3.3/wx/wxprec.h +++ b/include/wx-3.3/wx/wxprec.h @@ -10,14 +10,10 @@ // compiler detection; includes setup.h #include "wx/defs.h" -// check if to use precompiled headers: do it for most Windows compilers unless -// explicitly disabled by defining NOPCH -#if defined(__VISUALC__) - // If user did not request NOCPH and we're not building using configure - // then assume user wants precompiled headers. - #if !defined(NOPCH) && !defined(__WX_SETUP_H__) - #define WX_PRECOMP - #endif +// check if to use precompiled headers: do it for MSVC unless explicitly +// disabled by defining NOPCH +#if !defined(WX_PRECOMP) && defined(__VISUALC__) && !defined(NOPCH) + #define WX_PRECOMP #endif #ifdef WX_PRECOMP diff --git a/include/xlsxwriter.h b/include/xlsxwriter.h index 702b08e..2dfde5f 100644 --- a/include/xlsxwriter.h +++ b/include/xlsxwriter.h @@ -1,7 +1,8 @@ /* * libxlsxwriter * - * Copyright 2014-2022, John McNamara, jmcnamara@cpan.org. See LICENSE.txt. + * SPDX-License-Identifier: BSD-2-Clause + * Copyright 2014-2024, John McNamara, jmcnamara@cpan.org. */ /** @@ -18,8 +19,8 @@ #include "xlsxwriter/format.h" #include "xlsxwriter/utility.h" -#define LXW_VERSION "1.1.5" -#define LXW_VERSION_ID 115 -#define LXW_SOVERSION "5" +#define LXW_VERSION "1.1.8" +#define LXW_VERSION_ID 118 +#define LXW_SOVERSION "7" #endif /* __LXW_XLSXWRITER_H__ */ diff --git a/include/xlsxwriter/app.h b/include/xlsxwriter/app.h index 34f2e3b..2931cf7 100644 --- a/include/xlsxwriter/app.h +++ b/include/xlsxwriter/app.h @@ -1,7 +1,8 @@ /* * libxlsxwriter * - * Copyright 2014-2022, John McNamara, jmcnamara@cpan.org. See LICENSE.txt. + * SPDX-License-Identifier: BSD-2-Clause + * Copyright 2014-2024, John McNamara, jmcnamara@cpan.org. * * app - A libxlsxwriter library for creating Excel XLSX app files. * diff --git a/include/xlsxwriter/chart.h b/include/xlsxwriter/chart.h index 3a90056..82cac96 100644 --- a/include/xlsxwriter/chart.h +++ b/include/xlsxwriter/chart.h @@ -1,7 +1,8 @@ /* * libxlsxwriter * - * Copyright 2014-2022, John McNamara, jmcnamara@cpan.org. See LICENSE.txt. + * SPDX-License-Identifier: BSD-2-Clause + * Copyright 2014-2024, John McNamara, jmcnamara@cpan.org. * * chart - A libxlsxwriter library for creating Excel XLSX chart files. * diff --git a/include/xlsxwriter/chartsheet.h b/include/xlsxwriter/chartsheet.h index 5406249..dcf87c5 100644 --- a/include/xlsxwriter/chartsheet.h +++ b/include/xlsxwriter/chartsheet.h @@ -1,7 +1,8 @@ /* * libxlsxwriter * - * Copyright 2014-2022, John McNamara, jmcnamara@cpan.org. See LICENSE.txt. + * SPDX-License-Identifier: BSD-2-Clause + * Copyright 2014-2024, John McNamara, jmcnamara@cpan.org. * * chartsheet - A libxlsxwriter library for creating Excel XLSX chartsheet files. * diff --git a/include/xlsxwriter/comment.h b/include/xlsxwriter/comment.h index e13f353..d5495e7 100644 --- a/include/xlsxwriter/comment.h +++ b/include/xlsxwriter/comment.h @@ -1,7 +1,8 @@ /* * libxlsxwriter * - * Copyright 2014-2022, John McNamara, jmcnamara@cpan.org. See LICENSE.txt. + * SPDX-License-Identifier: BSD-2-Clause + * Copyright 2014-2024, John McNamara, jmcnamara@cpan.org. * * comment - A libxlsxwriter library for creating Excel XLSX comment files. * diff --git a/include/xlsxwriter/common.h b/include/xlsxwriter/common.h index 12679b4..2125394 100644 --- a/include/xlsxwriter/common.h +++ b/include/xlsxwriter/common.h @@ -1,7 +1,8 @@ /* * libxlsxwriter * - * Copyright 2014-2022, John McNamara, jmcnamara@cpan.org. See LICENSE.txt. + * SPDX-License-Identifier: BSD-2-Clause + * Copyright 2014-2024, John McNamara, jmcnamara@cpan.org. */ /** @@ -9,7 +10,7 @@ * * @brief Common functions and defines for the libxlsxwriter library. * - * + * * */ #ifndef __LXW_COMMON_H__ @@ -106,6 +107,9 @@ typedef enum lxw_error { /** Function parameter validation error. */ LXW_ERROR_PARAMETER_VALIDATION, + /** Function string parameter is empty. */ + LXW_ERROR_PARAMETER_IS_EMPTY, + /** Worksheet name exceeds Excel's limit of 31 characters. */ LXW_ERROR_SHEETNAME_LENGTH_EXCEEDED, diff --git a/include/xlsxwriter/content_types.h b/include/xlsxwriter/content_types.h index 1cb811b..e337ca1 100644 --- a/include/xlsxwriter/content_types.h +++ b/include/xlsxwriter/content_types.h @@ -1,7 +1,8 @@ /* * libxlsxwriter * - * Copyright 2014-2022, John McNamara, jmcnamara@cpan.org. See LICENSE.txt. + * SPDX-License-Identifier: BSD-2-Clause + * Copyright 2014-2024, John McNamara, jmcnamara@cpan.org. * * content_types - A libxlsxwriter library for creating Excel XLSX * content_types files. @@ -63,6 +64,7 @@ void lxw_ct_add_shared_strings(lxw_content_types *content_types); void lxw_ct_add_calc_chain(lxw_content_types *content_types); void lxw_ct_add_custom_properties(lxw_content_types *content_types); void lxw_ct_add_metadata(lxw_content_types *content_types); +void lxw_ct_add_rich_value(lxw_content_types *content_types); /* Declarations required for unit testing. */ #ifdef TESTING diff --git a/include/xlsxwriter/core.h b/include/xlsxwriter/core.h index 40479ba..555e448 100644 --- a/include/xlsxwriter/core.h +++ b/include/xlsxwriter/core.h @@ -1,7 +1,8 @@ /* * libxlsxwriter * - * Copyright 2014-2022, John McNamara, jmcnamara@cpan.org. See LICENSE.txt. + * SPDX-License-Identifier: BSD-2-Clause + * Copyright 2014-2024, John McNamara, jmcnamara@cpan.org. * * core - A libxlsxwriter library for creating Excel XLSX core files. * diff --git a/include/xlsxwriter/custom.h b/include/xlsxwriter/custom.h index 3231257..b1029fb 100644 --- a/include/xlsxwriter/custom.h +++ b/include/xlsxwriter/custom.h @@ -1,7 +1,8 @@ /* * libxlsxwriter * - * Copyright 2014-2022, John McNamara, jmcnamara@cpan.org. See LICENSE.txt. + * SPDX-License-Identifier: BSD-2-Clause + * Copyright 2014-2024, John McNamara, jmcnamara@cpan.org. * * custom - A libxlsxwriter library for creating Excel custom property files. * diff --git a/include/xlsxwriter/drawing.h b/include/xlsxwriter/drawing.h index 1025a04..0ed22ef 100644 --- a/include/xlsxwriter/drawing.h +++ b/include/xlsxwriter/drawing.h @@ -1,7 +1,8 @@ /* * libxlsxwriter * - * Copyright 2014-2022, John McNamara, jmcnamara@cpan.org. See LICENSE.txt. + * SPDX-License-Identifier: BSD-2-Clause + * Copyright 2014-2024, John McNamara, jmcnamara@cpan.org. * * drawing - A libxlsxwriter library for creating Excel XLSX drawing files. * diff --git a/include/xlsxwriter/format.h b/include/xlsxwriter/format.h index 9ff8ee1..116ea9a 100644 --- a/include/xlsxwriter/format.h +++ b/include/xlsxwriter/format.h @@ -1,7 +1,8 @@ /* * libxlsxwriter * - * Copyright 2014-2022, John McNamara, jmcnamara@cpan.org. See LICENSE.txt. + * SPDX-License-Identifier: BSD-2-Clause + * Copyright 2014-2024, John McNamara, jmcnamara@cpan.org. */ /** diff --git a/include/xlsxwriter/hash_table.h b/include/xlsxwriter/hash_table.h index d334d14..e9ea189 100644 --- a/include/xlsxwriter/hash_table.h +++ b/include/xlsxwriter/hash_table.h @@ -1,7 +1,8 @@ /* * libxlsxwriter * - * Copyright 2014-2022, John McNamara, jmcnamara@cpan.org. See LICENSE.txt. + * SPDX-License-Identifier: BSD-2-Clause + * Copyright 2014-2024, John McNamara, jmcnamara@cpan.org. * * hash_table - Hash table functions for libxlsxwriter. * diff --git a/include/xlsxwriter/metadata.h b/include/xlsxwriter/metadata.h index 86cb5cd..85fbb7a 100644 --- a/include/xlsxwriter/metadata.h +++ b/include/xlsxwriter/metadata.h @@ -1,7 +1,8 @@ /* * libxlsxwriter * - * Copyright 2014-2022, John McNamara, jmcnamara@cpan.org. See LICENSE.txt. + * SPDX-License-Identifier: BSD-2-Clause + * Copyright 2014-2024, John McNamara, jmcnamara@cpan.org. * * metadata - A libxlsxwriter library for creating Excel XLSX metadata files. * @@ -19,6 +20,9 @@ typedef struct lxw_metadata { FILE *file; + uint8_t has_dynamic_functions; + uint8_t has_embedded_images; + uint32_t num_embedded_images; } lxw_metadata; diff --git a/include/xlsxwriter/packager.h b/include/xlsxwriter/packager.h index e5ba793..7016573 100644 --- a/include/xlsxwriter/packager.h +++ b/include/xlsxwriter/packager.h @@ -1,7 +1,8 @@ /* * libxlsxwriter * - * Copyright 2014-2022, John McNamara, jmcnamara@cpan.org. See LICENSE.txt. + * SPDX-License-Identifier: BSD-2-Clause + * Copyright 2014-2024, John McNamara, jmcnamara@cpan.org. * * packager - A libxlsxwriter library for creating Excel XLSX packager files. * @@ -36,6 +37,10 @@ #include "vml.h" #include "comment.h" #include "metadata.h" +#include "rich_value.h" +#include "rich_value_rel.h" +#include "rich_value_types.h" +#include "rich_value_structure.h" #define LXW_ZIP_BUFFER_SIZE (16384) diff --git a/include/xlsxwriter/relationships.h b/include/xlsxwriter/relationships.h index d72ad0a..882d9ff 100644 --- a/include/xlsxwriter/relationships.h +++ b/include/xlsxwriter/relationships.h @@ -1,7 +1,8 @@ /* * libxlsxwriter * - * Copyright 2014-2022, John McNamara, jmcnamara@cpan.org. See LICENSE.txt. + * SPDX-License-Identifier: BSD-2-Clause + * Copyright 2014-2024, John McNamara, jmcnamara@cpan.org. * * relationships - A libxlsxwriter library for creating Excel XLSX * relationships files. @@ -60,6 +61,7 @@ void lxw_add_ms_package_relationship(lxw_relationships *self, void lxw_add_worksheet_relationship(lxw_relationships *self, const char *type, const char *target, const char *target_mode); +void lxw_add_rich_value_relationship(lxw_relationships *self); /* Declarations required for unit testing. */ #ifdef TESTING diff --git a/include/xlsxwriter/rich_value.h b/include/xlsxwriter/rich_value.h new file mode 100644 index 0000000..1ea4388 --- /dev/null +++ b/include/xlsxwriter/rich_value.h @@ -0,0 +1,51 @@ +/* + * libxlsxwriter + * + * Copyright 2014-2024, John McNamara, jmcnamara@cpan.org. See LICENSE.txt. + * + * rich_value - A libxlsxwriter library for creating Excel XLSX rich_value files. + * + */ +#ifndef __LXW_RICH_VALUE_H__ +#define __LXW_RICH_VALUE_H__ + +#include + +#include "common.h" +#include "workbook.h" + +/* + * Struct to represent a rich_value object. + */ +typedef struct lxw_rich_value { + + FILE *file; + lxw_workbook *workbook; + +} lxw_rich_value; + + +/* *INDENT-OFF* */ +#ifdef __cplusplus +extern "C" { +#endif +/* *INDENT-ON* */ + +lxw_rich_value *lxw_rich_value_new(void); +void lxw_rich_value_free(lxw_rich_value *rich_value); +void lxw_rich_value_assemble_xml_file(lxw_rich_value *self); + +/* Declarations required for unit testing. */ +#ifdef TESTING + +STATIC void _rich_value_xml_declaration(lxw_rich_value *self); + +#endif /* TESTING */ + +/* *INDENT-OFF* */ +#ifdef __cplusplus +} +#endif +/* *INDENT-ON* */ + +#endif /* __LXW_RICH_VALUE_H__ */ diff --git a/include/xlsxwriter/rich_value_rel.h b/include/xlsxwriter/rich_value_rel.h new file mode 100644 index 0000000..2d35ef0 --- /dev/null +++ b/include/xlsxwriter/rich_value_rel.h @@ -0,0 +1,50 @@ +/* + * libxlsxwriter + * + * Copyright 2014-2024, John McNamara, jmcnamara@cpan.org. See LICENSE.txt. + * + * rich_value_rel - A libxlsxwriter library for creating Excel XLSX rich_value_rel files. + * + */ +#ifndef __LXW_RICH_VALUE_REL_H__ +#define __LXW_RICH_VALUE_REL_H__ + +#include + +#include "common.h" + +/* + * Struct to represent a rich_value_rel object. + */ +typedef struct lxw_rich_value_rel { + + FILE *file; + uint32_t num_embedded_images; + +} lxw_rich_value_rel; + + +/* *INDENT-OFF* */ +#ifdef __cplusplus +extern "C" { +#endif +/* *INDENT-ON* */ + +lxw_rich_value_rel *lxw_rich_value_rel_new(void); +void lxw_rich_value_rel_free(lxw_rich_value_rel *rich_value_rel); +void lxw_rich_value_rel_assemble_xml_file(lxw_rich_value_rel *self); + +/* Declarations required for unit testing. */ +#ifdef TESTING + +STATIC void _rich_value_rel_xml_declaration(lxw_rich_value_rel *self); + +#endif /* TESTING */ + +/* *INDENT-OFF* */ +#ifdef __cplusplus +} +#endif +/* *INDENT-ON* */ + +#endif /* __LXW_RICH_VALUE_REL_H__ */ diff --git a/include/xlsxwriter/rich_value_structure.h b/include/xlsxwriter/rich_value_structure.h new file mode 100644 index 0000000..750adc1 --- /dev/null +++ b/include/xlsxwriter/rich_value_structure.h @@ -0,0 +1,53 @@ +/* + * libxlsxwriter + * + * Copyright 2014-2024, John McNamara, jmcnamara@cpan.org. See LICENSE.txt. + * + * rich_value_structure - A libxlsxwriter library for creating Excel XLSX rich_value_structure files. + * + */ +#ifndef __LXW_RICH_VALUE_STRUCTURE_H__ +#define __LXW_RICH_VALUE_STRUCTURE_H__ + +#include + +#include "common.h" + +/* + * Struct to represent a rich_value_structure object. + */ +typedef struct lxw_rich_value_structure { + + FILE *file; + uint8_t has_embedded_image_descriptions; + +} lxw_rich_value_structure; + + +/* *INDENT-OFF* */ +#ifdef __cplusplus +extern "C" { +#endif +/* *INDENT-ON* */ + +lxw_rich_value_structure *lxw_rich_value_structure_new(void); +void lxw_rich_value_structure_free(lxw_rich_value_structure + *rich_value_structure); +void lxw_rich_value_structure_assemble_xml_file(lxw_rich_value_structure + *self); + +/* Declarations required for unit testing. */ +#ifdef TESTING + +STATIC void _rich_value_structure_xml_declaration(lxw_rich_value_structure + *self); + +#endif /* TESTING */ + +/* *INDENT-OFF* */ +#ifdef __cplusplus +} +#endif +/* *INDENT-ON* */ + +#endif /* __LXW_RICH_VALUE_STRUCTURE_H__ */ diff --git a/include/xlsxwriter/rich_value_types.h b/include/xlsxwriter/rich_value_types.h new file mode 100644 index 0000000..24bb9aa --- /dev/null +++ b/include/xlsxwriter/rich_value_types.h @@ -0,0 +1,49 @@ +/* + * libxlsxwriter + * + * Copyright 2014-2024, John McNamara, jmcnamara@cpan.org. See LICENSE.txt. + * + * rich_value_types - A libxlsxwriter library for creating Excel XLSX rich_value_types files. + * + */ +#ifndef __LXW_RICH_VALUE_TYPES_H__ +#define __LXW_RICH_VALUE_TYPES_H__ + +#include + +#include "common.h" + +/* + * Struct to represent a rich_value_types object. + */ +typedef struct lxw_rich_value_types { + + FILE *file; + +} lxw_rich_value_types; + + +/* *INDENT-OFF* */ +#ifdef __cplusplus +extern "C" { +#endif +/* *INDENT-ON* */ + +lxw_rich_value_types *lxw_rich_value_types_new(void); +void lxw_rich_value_types_free(lxw_rich_value_types *rich_value_types); +void lxw_rich_value_types_assemble_xml_file(lxw_rich_value_types *self); + +/* Declarations required for unit testing. */ +#ifdef TESTING + +STATIC void _rich_value_types_xml_declaration(lxw_rich_value_types *self); + +#endif /* TESTING */ + +/* *INDENT-OFF* */ +#ifdef __cplusplus +} +#endif +/* *INDENT-ON* */ + +#endif /* __LXW_RICH_VALUE_TYPES_H__ */ diff --git a/include/xlsxwriter/shared_strings.h b/include/xlsxwriter/shared_strings.h index 98a2710..a4dc0c4 100644 --- a/include/xlsxwriter/shared_strings.h +++ b/include/xlsxwriter/shared_strings.h @@ -1,7 +1,8 @@ /* * libxlsxwriter * - * Copyright 2014-2022, John McNamara, jmcnamara@cpan.org. See LICENSE.txt. + * SPDX-License-Identifier: BSD-2-Clause + * Copyright 2014-2024, John McNamara, jmcnamara@cpan.org. * * shared_strings - A libxlsxwriter library for creating Excel XLSX * sst files. diff --git a/include/xlsxwriter/styles.h b/include/xlsxwriter/styles.h index 780fdb6..5fffab7 100644 --- a/include/xlsxwriter/styles.h +++ b/include/xlsxwriter/styles.h @@ -1,7 +1,8 @@ /* * libxlsxwriter * - * Copyright 2014-2022, John McNamara, jmcnamara@cpan.org. See LICENSE.txt. + * SPDX-License-Identifier: BSD-2-Clause + * Copyright 2014-2024, John McNamara, jmcnamara@cpan.org. * * styles - A libxlsxwriter library for creating Excel XLSX styles files. * diff --git a/include/xlsxwriter/table.h b/include/xlsxwriter/table.h index 452d83c..baf613f 100644 --- a/include/xlsxwriter/table.h +++ b/include/xlsxwriter/table.h @@ -1,7 +1,8 @@ /* * libxlsxwriter * - * Copyright 2014-2022, John McNamara, jmcnamara@cpan.org. See LICENSE.txt. + * SPDX-License-Identifier: BSD-2-Clause + * Copyright 2014-2024, John McNamara, jmcnamara@cpan.org. * * table - A libxlsxwriter library for creating Excel XLSX table files. * diff --git a/include/xlsxwriter/theme.h b/include/xlsxwriter/theme.h index 4a2a2e6..7cbb085 100644 --- a/include/xlsxwriter/theme.h +++ b/include/xlsxwriter/theme.h @@ -1,7 +1,8 @@ /* * libxlsxwriter * - * Copyright 2014-2022, John McNamara, jmcnamara@cpan.org. See LICENSE.txt. + * SPDX-License-Identifier: BSD-2-Clause + * Copyright 2014-2024, John McNamara, jmcnamara@cpan.org. * * theme - A libxlsxwriter library for creating Excel XLSX theme files. * diff --git a/include/xlsxwriter/third_party/ioapi.h b/include/xlsxwriter/third_party/ioapi.h index 50b669a..32bae47 100644 --- a/include/xlsxwriter/third_party/ioapi.h +++ b/include/xlsxwriter/third_party/ioapi.h @@ -66,7 +66,7 @@ #if (_MSC_VER >= 1400) && (!(defined(NO_MSCVER_FILE64_FUNC))) #define ftello64 _ftelli64 #define fseeko64 _fseeki64 - #else // old MSC + #else /* old MSC */ #define ftello64 ftell #define fseeko64 fseek #endif @@ -150,7 +150,7 @@ typedef long (ZCALLBACK *tell_file_func) (voidpf opaque, voidpf stream) typedef long (ZCALLBACK *seek_file_func) (voidpf opaque, voidpf stream, uLong offset, int origin); -/* here is the "old" 32 bits structure structure */ +/* here is the "old" 32 bits structure */ typedef struct zlib_filefunc_def_s { open_file_func zopen_file; @@ -194,8 +194,8 @@ typedef struct zlib_filefunc64_32_def_s #define ZREAD64(filefunc,filestream,buf,size) ((*((filefunc).zfile_func64.zread_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size)) #define ZWRITE64(filefunc,filestream,buf,size) ((*((filefunc).zfile_func64.zwrite_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size)) -/*#define ZTELL64(filefunc,filestream) ((*((filefunc).ztell64_file)) ((filefunc).opaque,filestream))*/ -/*#define ZSEEK64(filefunc,filestream,pos,mode) ((*((filefunc).zseek64_file)) ((filefunc).opaque,filestream,pos,mode))*/ +/* #define ZTELL64(filefunc,filestream) ((*((filefunc).ztell64_file)) ((filefunc).opaque,filestream)) */ +/* #define ZSEEK64(filefunc,filestream,pos,mode) ((*((filefunc).zseek64_file)) ((filefunc).opaque,filestream,pos,mode)) */ #define ZCLOSE64(filefunc,filestream) ((*((filefunc).zfile_func64.zclose_file)) ((filefunc).zfile_func64.opaque,filestream)) #define ZERROR64(filefunc,filestream) ((*((filefunc).zfile_func64.zerror_file)) ((filefunc).zfile_func64.opaque,filestream)) diff --git a/include/xlsxwriter/third_party/zip.h b/include/xlsxwriter/third_party/zip.h index 791f013..1921339 100644 --- a/include/xlsxwriter/third_party/zip.h +++ b/include/xlsxwriter/third_party/zip.h @@ -49,7 +49,7 @@ extern "C" { #endif -/*#define HAVE_BZIP2*/ +/* #define HAVE_BZIP2 */ #ifndef _ZLIB_H #include "zlib.h" @@ -190,9 +190,9 @@ extern int ZEXPORT zipOpenNewFileInZip64(zipFile file, filename : the filename in zip (if NULL, '-' without quote will be used *zipfi contain supplemental information if extrafield_local!=NULL and size_extrafield_local>0, extrafield_local - contains the extrafield data the the local header + contains the extrafield data for the local header if extrafield_global!=NULL and size_extrafield_global>0, extrafield_global - contains the extrafield data the the local header + contains the extrafield data for the global header if comment != NULL, comment contain the comment string method contain the compression method (0 for store, Z_DEFLATED for deflate) level contain the level of compression (can be Z_DEFAULT_COMPRESSION) diff --git a/include/xlsxwriter/utility.h b/include/xlsxwriter/utility.h index 3c770f5..5853d10 100644 --- a/include/xlsxwriter/utility.h +++ b/include/xlsxwriter/utility.h @@ -1,7 +1,8 @@ /* * libxlsxwriter * - * Copyright 2014-2022, John McNamara, jmcnamara@cpan.org. See LICENSE.txt. + * SPDX-License-Identifier: BSD-2-Clause + * Copyright 2014-2024, John McNamara, jmcnamara@cpan.org. */ /** @@ -9,7 +10,7 @@ * * @brief Utility functions for libxlsxwriter. * - * + * * */ @@ -220,10 +221,9 @@ double lxw_unixtime_to_excel_date_epoch(int64_t unixtime, uint8_t date_1904); char *lxw_strdup(const char *str); char *lxw_strdup_formula(const char *formula); - size_t lxw_utf8_strlen(const char *str); - void lxw_str_tolower(char *str); +uint8_t lxw_str_is_empty(const char *str); /* Define a portable version of strcasecmp(). */ #ifdef _MSC_VER diff --git a/include/xlsxwriter/vml.h b/include/xlsxwriter/vml.h index b5a5866..79cb1fa 100644 --- a/include/xlsxwriter/vml.h +++ b/include/xlsxwriter/vml.h @@ -1,7 +1,8 @@ /* * libxlsxwriter * - * Copyright 2014-2022, John McNamara, jmcnamara@cpan.org. See LICENSE.txt. + * SPDX-License-Identifier: BSD-2-Clause + * Copyright 2014-2024, John McNamara, jmcnamara@cpan.org. * * vml - A libxlsxwriter library for creating Excel XLSX vml files. * diff --git a/include/xlsxwriter/workbook.h b/include/xlsxwriter/workbook.h index 8988461..e635006 100644 --- a/include/xlsxwriter/workbook.h +++ b/include/xlsxwriter/workbook.h @@ -1,7 +1,8 @@ /* * libxlsxwriter * - * Copyright 2014-2022, John McNamara, jmcnamara@cpan.org. See LICENSE.txt. + * SPDX-License-Identifier: BSD-2-Clause + * Copyright 2014-2024, John McNamara, jmcnamara@cpan.org. */ /** @@ -298,6 +299,7 @@ typedef struct lxw_workbook { struct lxw_worksheet_names *worksheet_names; struct lxw_chartsheet_names *chartsheet_names; struct lxw_image_md5s *image_md5s; + struct lxw_image_md5s *embedded_image_md5s; struct lxw_image_md5s *header_image_md5s; struct lxw_image_md5s *background_md5s; struct lxw_charts *charts; @@ -321,6 +323,7 @@ typedef struct lxw_workbook { uint16_t num_format_count; uint16_t drawing_count; uint16_t comment_count; + uint32_t num_embedded_images; uint16_t font_count; uint16_t border_count; @@ -336,6 +339,9 @@ typedef struct lxw_workbook { uint8_t has_vml; uint8_t has_comments; uint8_t has_metadata; + uint8_t has_embedded_images; + uint8_t has_dynamic_functions; + uint8_t has_embedded_image_descriptions; lxw_hash_table *used_xf_formats; lxw_hash_table *used_dxf_formats; @@ -468,6 +474,7 @@ lxw_workbook *workbook_new_opt(const char *filename, * * The worksheet name must be a valid Excel worksheet name, i.e: * + * - The name cannot be blank. * - The name is less than or equal to 31 UTF-8 characters. * - The name doesn't contain any of the characters: ` [ ] : * ? / \ ` * - The name doesn't start or end with an apostrophe. @@ -510,6 +517,7 @@ lxw_worksheet *workbook_add_worksheet(lxw_workbook *workbook, * * The chartsheet name must be a valid Excel worksheet name, i.e.: * + * - The name cannot be blank. * - The name is less than or equal to 31 UTF-8 characters. * - The name doesn't contain any of the characters: ` [ ] : * ? / \ ` * - The name doesn't start or end with an apostrophe. @@ -853,7 +861,7 @@ lxw_error workbook_set_custom_property_datetime(lxw_workbook *workbook, * @endcode * * The rules for names in Excel are explained in the - * [Microsoft Office documentation](http://office.microsoft.com/en-001/excel-help/define-and-use-names-in-formulas-HA010147120.aspx). + * [Microsoft Office documentation](https://support.microsoft.com/en-us/office/define-and-use-names-in-formulas-4d0f13ac-53b7-422e-afd2-abd7ff379c64). * */ lxw_error workbook_define_name(lxw_workbook *workbook, const char *name, @@ -926,6 +934,7 @@ lxw_chartsheet *workbook_get_chartsheet_by_name(lxw_workbook *workbook, * This function is used to validate a worksheet or chartsheet name according * to the rules used by Excel: * + * - The name cannot be blank. * - The name is less than or equal to 31 UTF-8 characters. * - The name doesn't contain any of the characters: ` [ ] : * ? / \ ` * - The name doesn't start or end with an apostrophe. diff --git a/include/xlsxwriter/worksheet.h b/include/xlsxwriter/worksheet.h index caf3f81..fe145ee 100644 --- a/include/xlsxwriter/worksheet.h +++ b/include/xlsxwriter/worksheet.h @@ -1,7 +1,8 @@ /* * libxlsxwriter * - * Copyright 2014-2022, John McNamara, jmcnamara@cpan.org. See LICENSE.txt. + * SPDX-License-Identifier: BSD-2-Clause + * Copyright 2014-2024, John McNamara, jmcnamara@cpan.org. */ /** @@ -720,6 +721,7 @@ enum cell_types { DYNAMIC_ARRAY_FORMULA_CELL, BLANK_CELL, BOOLEAN_CELL, + ERROR_CELL, COMMENT, HYPERLINK_URL, HYPERLINK_INTERNAL, @@ -817,6 +819,7 @@ STAILQ_HEAD(lxw_selections, lxw_selection); STAILQ_HEAD(lxw_data_validations, lxw_data_val_obj); STAILQ_HEAD(lxw_cond_format_list, lxw_cond_format_obj); STAILQ_HEAD(lxw_image_props, lxw_object_properties); +STAILQ_HEAD(lxw_embedded_image_props, lxw_object_properties); STAILQ_HEAD(lxw_chart_props, lxw_object_properties); STAILQ_HEAD(lxw_comment_objs, lxw_vml_obj); STAILQ_HEAD(lxw_table_objs, lxw_table_obj); @@ -982,7 +985,7 @@ typedef struct lxw_data_validation { const char *value_formula; /** - * This parameter is used to set a list of strings for a drop down list. + * This parameter is used to set a list of strings for a dropdown list. * The list should be a `NULL` terminated array of char* strings: * * @code @@ -1695,8 +1698,8 @@ typedef struct lxw_filter_rule_obj { /** * @brief Options for inserted images. * - * Options for modifying images inserted via `worksheet_insert_image_opt()`. - * + * Options for modifying images inserted via `worksheet_insert_image_opt()` and + * `worksheet_embed_image_opt()`. */ typedef struct lxw_image_options { @@ -1735,6 +1738,10 @@ typedef struct lxw_image_options { /** Add an optional mouseover tip for a hyperlink to the image. */ const char *tip; + /** Add an optional format to the cell. Only used with + * `worksheet_embed_image_opt()` */ + lxw_format *cell_format; + } lxw_image_options; /** @@ -1806,6 +1813,7 @@ typedef struct lxw_object_properties { char *md5; char *image_position; uint8_t decorative; + lxw_format *format; STAILQ_ENTRY (lxw_object_properties) list_pointers; } lxw_object_properties; @@ -2119,6 +2127,7 @@ typedef struct lxw_worksheet { struct lxw_data_validations *data_validations; struct lxw_cond_format_hash *conditional_formats; struct lxw_image_props *image_props; + struct lxw_image_props *embedded_image_props; struct lxw_chart_props *chart_data; struct lxw_drawing_rel_ids *drawing_rel_ids; struct lxw_vml_drawing_rel_ids *vml_drawing_rel_ids; @@ -2192,7 +2201,7 @@ typedef struct lxw_worksheet { uint8_t zoom_scale_normal; uint8_t black_white; uint8_t num_validations; - uint8_t has_dynamic_arrays; + uint8_t has_dynamic_functions; char *vba_codename; uint16_t num_buttons; @@ -2251,6 +2260,7 @@ typedef struct lxw_worksheet { uint8_t has_header_vml; uint8_t has_background_image; uint8_t has_buttons; + uint8_t storing_embedded_image; lxw_rel_tuple *external_vml_comment_link; lxw_rel_tuple *external_comment_link; lxw_rel_tuple *external_vml_header_link; @@ -3621,9 +3631,18 @@ lxw_error worksheet_set_column_pixels_opt(lxw_worksheet *worksheet, * **Note**: * The scaling of a image may be affected if is crosses a row that has its * default height changed due to a font that is larger than the default font - * size or that has text wrapping turned on. To avoid this you should - * explicitly set the height of the row using `worksheet_set_row()` if it - * crosses an inserted image. See @ref working_with_object_positioning. + * size or that has text wrapping turned on. To avoid this you should explicitly + * set the height of the row using `worksheet_set_row()` if it crosses an + * inserted image. See @ref working_with_object_positioning. + * + * **NOTE on SVG files**: + * Excel doesn't directly support SVG files in the same way as other image file + * formats. It allows SVG to be inserted into a worksheet but converts them to, + * and displays them as, PNG files. It stores the original SVG image in the file + * so the original format can be retrieved. This removes the file size and + * resolution advantage of using SVG files. As such SVG files are not supported + * by `libxlsxwriter` since a conversion to the PNG format would be required + * and that format is already supported. * * BMP images are only supported for backward compatibility. In general it is * best to avoid BMP images since they aren't compressed. If used, BMP images @@ -3746,7 +3765,7 @@ lxw_error worksheet_insert_image_buffer(lxw_worksheet *worksheet, * * The `%worksheet_insert_image_buffer_opt()` function is like * `worksheet_insert_image_buffer()` function except that it takes an optional - * #lxw_image_options struct * #lxw_image_options struct with the following members/options: + * #lxw_image_options struct with the following members/options: * * - `x_offset`: Offset from the left of the cell in pixels. * - `y_offset`: Offset from the top of the cell in pixels. @@ -3782,6 +3801,126 @@ lxw_error worksheet_insert_image_buffer_opt(lxw_worksheet *worksheet, size_t image_size, lxw_image_options *options); +/** + * @brief Embed an image in a worksheet cell. + * + * @param worksheet Pointer to a lxw_worksheet instance to be updated. + * @param row The zero indexed row number. + * @param col The zero indexed column number. + * @param filename The image filename, with path if required. + * + * @return A #lxw_error code. + * + * This function can be used to embed a image into a worksheet cell and have the + * image automatically scale to the width and height of the cell. The X/Y + * scaling of the image is preserved but the size of the image is adjusted to + * fit the largest possible width or height depending on the cell dimensions. + * + * This is the equivalent of Excel's menu option to insert an image using the + * option to "Place in Cell" which is only available in Excel 365 versions from + * 2023 onwards. For older versions of Excel a `#VALUE!` error is displayed. + * + * @dontinclude embed_images.c + * @skip Change + * @until B6 + * + * @image html embed_image.png + * + * The `worksheet_embed_image_opt()` function takes additional optional + * parameters to add urls or format the cell background, see below. + * + */ +lxw_error worksheet_embed_image(lxw_worksheet *worksheet, + lxw_row_t row, lxw_col_t col, + const char *filename); + +/** + * @brief Embed an image in a worksheet cell, with options. + * + * @param worksheet Pointer to a lxw_worksheet instance to be updated. + * @param row The zero indexed row number. + * @param col The zero indexed column number. + * @param filename The image filename, with path if required. + * @param options Optional image parameters. + * + * @return A #lxw_error code. + * + * The `%worksheet_embed_image_opt()` function is like + * `worksheet_embed_image()` function except that it takes an optional + * #lxw_image_options struct with the following members/options: + * + * - `description`: Optional description or "Alt text" for the image. + * - `decorative`: Optional parameter to mark image as decorative. + * - `url`: Add an optional hyperlink to the image. + * - `cell_format`: Add a format for the cell behind the embedded image. + * + */ +lxw_error worksheet_embed_image_opt(lxw_worksheet *worksheet, + lxw_row_t row, lxw_col_t col, + const char *filename, + lxw_image_options *options); + +/** + * @brief Embed an image in a worksheet cell, from a memory buffer. + * + * @param worksheet Pointer to a lxw_worksheet instance to be updated. + * @param row The zero indexed row number. + * @param col The zero indexed column number. + * @param image_buffer Pointer to an array of bytes that holds the image data. + * @param image_size The size of the array of bytes. + * + * @return A #lxw_error code. + * + * This function can be used to embed a image into a worksheet from a memory + * buffer: + * + * @dontinclude embed_image_buffer.c + * @skip Embed + * @until B3 + * + * @image html embed_image_buffer.png + * + * The buffer should be a pointer to an array of unsigned char data with a + * specified size. + * + * See `worksheet_embed_image()` for details about the supported image + * formats, and other image features. + */ +lxw_error worksheet_embed_image_buffer(lxw_worksheet *worksheet, + lxw_row_t row, + lxw_col_t col, + const unsigned char *image_buffer, + size_t image_size); + +/** + * @brief Embed an image in a worksheet cell, from a memory buffer. + * + * @param worksheet Pointer to a lxw_worksheet instance to be updated. + * @param row The zero indexed row number. + * @param col The zero indexed column number. + * @param image_buffer Pointer to an array of bytes that holds the image data. + * @param image_size The size of the array of bytes. + * @param options Optional image parameters. + * + * @return A #lxw_error code. + * + * The `%worksheet_embed_image_buffer_opt()` function is like + * `worksheet_embed_image_buffer()` function except that it takes an optional + * #lxw_image_options struct with the following members/options: + * + * - `description`: Optional description or "Alt text" for the image. + * - `decorative`: Optional parameter to mark image as decorative. + * - `url`: Add an optional hyperlink to the image. + * - `cell_format`: Add a format for the cell behind the embedded image. + * + */ +lxw_error worksheet_embed_image_buffer_opt(lxw_worksheet *worksheet, + lxw_row_t row, + lxw_col_t col, + const unsigned char *image_buffer, + size_t image_size, + lxw_image_options *options); + /** * @brief Set the background image for a worksheet. * @@ -3995,7 +4134,7 @@ lxw_error worksheet_merge_range(lxw_worksheet *worksheet, lxw_row_t first_row, * The `%worksheet_autofilter()` function allows an autofilter to be added to * a worksheet. * - * An autofilter is a way of adding drop down lists to the headers of a 2D + * An autofilter is a way of adding dropdown lists to the headers of a 2D * range of worksheet data. This allows users to filter the data based on * simple criteria so that some data is shown and some is hidden. * @@ -4578,9 +4717,9 @@ void worksheet_split_panes_opt(lxw_worksheet *worksheet, * @endcode * */ -void worksheet_set_selection(lxw_worksheet *worksheet, - lxw_row_t first_row, lxw_col_t first_col, - lxw_row_t last_row, lxw_col_t last_col); +lxw_error worksheet_set_selection(lxw_worksheet *worksheet, + lxw_row_t first_row, lxw_col_t first_col, + lxw_row_t last_row, lxw_col_t last_col); /** * @brief Set the first visible cell at the top left of a worksheet. @@ -5811,6 +5950,10 @@ void lxw_worksheet_write_sheet_pr(lxw_worksheet *worksheet); void lxw_worksheet_write_page_setup(lxw_worksheet *worksheet); void lxw_worksheet_write_header_footer(lxw_worksheet *worksheet); +void worksheet_set_error_cell(lxw_worksheet *worksheet, + lxw_object_properties *object_props, + uint32_t ref_id); + /* Declarations required for unit testing. */ #ifdef TESTING diff --git a/include/xlsxwriter/xmlwriter.h b/include/xlsxwriter/xmlwriter.h index 3994095..0796df7 100644 --- a/include/xlsxwriter/xmlwriter.h +++ b/include/xlsxwriter/xmlwriter.h @@ -1,7 +1,8 @@ /* * libxlsxwriter * - * Copyright 2014-2022, John McNamara, jmcnamara@cpan.org. See LICENSE.txt. + * SPDX-License-Identifier: BSD-2-Clause + * Copyright 2014-2024, John McNamara, jmcnamara@cpan.org. * * xmlwriter - A libxlsxwriter library for creating Excel XLSX * XML files. @@ -55,7 +56,7 @@ STAILQ_HEAD(xml_attribute_list, xml_attribute); /* Create a new attribute struct to add to a xml_attribute_list. */ struct xml_attribute *lxw_new_attribute_str(const char *key, const char *value); -struct xml_attribute *lxw_new_attribute_int(const char *key, uint64_t value); +struct xml_attribute *lxw_new_attribute_int(const char *key, int32_t value); struct xml_attribute *lxw_new_attribute_dbl(const char *key, double value); /* Macro to initialize the xml_attribute_list pointers. */ diff --git a/lib/libSDL2.a b/lib/libSDL2.a index d7694c7..ccfbb3a 100644 --- a/lib/libSDL2.a +++ b/lib/libSDL2.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7f0b6cab74edbdd67a35c1354c285552c1ea716aaf476039a03ee6247fd1eef3 -size 18385232 +oid sha256:e1c4386da635c61416907f500e708e5ab43b1351a0df84d60bdc36781953bf0d +size 18433640 diff --git a/lib/libavcodec.a b/lib/libavcodec.a index ebec2b8..591e703 100644 --- a/lib/libavcodec.a +++ b/lib/libavcodec.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a6ca04cd3091f48449aabb7de075e6bf60a8f42e0dc68ceb1531ba03dbec42f2 -size 165368976 +oid sha256:f709f1c29b4cafceb49907a0e76d7f37d1fd737c2277d9df679fa2665f359f13 +size 163702432 diff --git a/lib/libavdevice.a b/lib/libavdevice.a index 0226544..7cafc10 100644 --- a/lib/libavdevice.a +++ b/lib/libavdevice.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:09a4272b53e6bed1d498594d188b00a8913692f9d71699cebed331b4c6eaad96 -size 1099824 +oid sha256:1f1561a972ffb10594464cca5a1ace4c1bc049be7a9ecdae3f4696a3f71927aa +size 1099784 diff --git a/lib/libavfilter.a b/lib/libavfilter.a index 59a7b34..891ecd8 100644 --- a/lib/libavfilter.a +++ b/lib/libavfilter.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1e21b57cf613e2c768fd510a1f14b4b772cf8d787b344c31160a096fcfdc653f -size 52124760 +oid sha256:053f7d18bf46b06a2c873a947a45ac4672d3f6c26eacc7165a21d938df93916d +size 51569000 diff --git a/lib/libavformat.a b/lib/libavformat.a index 46bbc8c..86c99dc 100644 --- a/lib/libavformat.a +++ b/lib/libavformat.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cb68f83a02048cce07114a7b53ede73eee72c3fb3cdb24e154adb19bd849e3e6 -size 53540632 +oid sha256:4aab2dd86362851284bfce7ba0c7e4128c906805de3ff64df4e34278c39e0ee0 +size 53451592 diff --git a/lib/libavutil.a b/lib/libavutil.a index b29d7bf..c13286e 100644 --- a/lib/libavutil.a +++ b/lib/libavutil.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7a526c64f7e999d3f2fa4a3fe72a99d98696b68b1ba4ae345ae1e14684afd6e0 -size 6177072 +oid sha256:41f4d169a66cf38202a494633cc2ec1d3b6f4d453afc96eced76fb9516c6ab3c +size 6269712 diff --git a/lib/libhidapi.a b/lib/libhidapi.a index bc07169..2cf5ea7 100644 --- a/lib/libhidapi.a +++ b/lib/libhidapi.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7f125df8590c9496c8b2b0e08fb9024ebe37d54a983897f4173b5c1c3ad78218 -size 243888 +oid sha256:3527fe04f4be3de6cfd00bd45c5c87d14da84629a524175b0866b77209b123d3 +size 246192 diff --git a/lib/libliquidfun.a b/lib/libliquidfun.a index d3006d1..c4d8c54 100644 --- a/lib/libliquidfun.a +++ b/lib/libliquidfun.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b8f64e280254d2c0c584bb849b532543b8320efad520fe4028e794afc0651dfb -size 11350128 +oid sha256:cdc15430aefb1c0f80e42f0bd4d6a860bc302fd31d03f4448035f42811ce0cef +size 11452064 diff --git a/lib/liblog4cpp.a b/lib/liblog4cpp.a index cb20f70..a9b830f 100644 --- a/lib/liblog4cpp.a +++ b/lib/liblog4cpp.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:de2e469fb6e413192eb9504493a47021e906bae44647b6a412ddbac84d8d8b2c -size 23983328 +oid sha256:361f8d234a3611d864e5623d4ae1914bc5d604d84536cd4d66e28e87ebcf37eb +size 24096232 diff --git a/lib/liblua.a b/lib/liblua.a index 14ab02f..fb9ba23 100644 --- a/lib/liblua.a +++ b/lib/liblua.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4e9d4cb69948591f629c264cd77468a66147ec35469a5ac05263a66c9664a658 -size 4106576 +oid sha256:c090761a49c0158630804cbe85f1c98278fd8945bcb2f74f1b8cd81a0b0c32b2 +size 4147568 diff --git a/lib/libpostproc.a b/lib/libpostproc.a index 7bd7259..09f9651 100644 --- a/lib/libpostproc.a +++ b/lib/libpostproc.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9375f0a0543221ffec2e36119f3756262930845e78e8c14df90bd829aa57cf78 -size 232432 +oid sha256:7ad1fff762fbb1786664d424d0eb7ea871e8707fe8ea53caabaa2b1d201c065d +size 228744 diff --git a/lib/libsharpyuv.a b/lib/libsharpyuv.a index 046a282..e068d5a 100644 --- a/lib/libsharpyuv.a +++ b/lib/libsharpyuv.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e54825d58df32f5ed0ad5d95f432589134bc79362decd0b10ec71b57cd7752d9 -size 193920 +oid sha256:e7ef7d49b725f576055e647a29aa1142737bc7bdb62554573d4ed7722f2445a2 +size 197168 diff --git a/lib/libswresample.a b/lib/libswresample.a index 1d4fa9f..51980d6 100644 --- a/lib/libswresample.a +++ b/lib/libswresample.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b6f0d560eec17e241d0ac6bbd9f1d06347c693981ec8ff4877e90a1d893815bb -size 904192 +oid sha256:0f87d1a1ffe350e834f19392cd7b5d271b6709481b7f23c83fd396efc9e85b3d +size 887056 diff --git a/lib/libswscale.a b/lib/libswscale.a index f363c6e..385771e 100644 --- a/lib/libswscale.a +++ b/lib/libswscale.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:77abdda8123887927edd7def82a7f348ac064c1ea272983370d054e645d8d936 -size 6082800 +oid sha256:38c93d9a16bcbbb73b557ba2c8268fd03c705b63fdfd98786400d12f54cbfb46 +size 5932760 diff --git a/lib/libwebp.a b/lib/libwebp.a index e6837d9..4c030ea 100644 --- a/lib/libwebp.a +++ b/lib/libwebp.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1827e6400bf5fec1ff81063a7095f3d922964f756d90048d8a4fd08ea282195f -size 7046464 +oid sha256:3403eb4b9e36f6f205a651c06cb44239d60670d717059fba7ecfee3831367575 +size 7088704 diff --git a/lib/libwebpdemux.a b/lib/libwebpdemux.a index a6cd259..1791d64 100644 --- a/lib/libwebpdemux.a +++ b/lib/libwebpdemux.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b4883a15b6dceff8a009963224c4ce42edd17c02ee5bc85c35e5b087f79c4ddf -size 202560 +oid sha256:183a2fdfc9100095967a99b891b8f7f6164073a02bc7a82ba6561f25721c84f1 +size 202128 diff --git a/lib/libwx_baseu-3.3.a b/lib/libwx_baseu-3.3.a index fbabeda..1f8e916 100644 --- a/lib/libwx_baseu-3.3.a +++ b/lib/libwx_baseu-3.3.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d929d2320083ba19a350d94f497fa0340f56235cdb5c12ef65dbbbeaa31291b3 -size 159359656 +oid sha256:c3afbe872e8fae4340f44a4cbaab1b8e71b5485beaa42f0340932852314f9047 +size 155671320 diff --git a/lib/libwx_baseu_net-3.3.a b/lib/libwx_baseu_net-3.3.a index e60dfea..9b82650 100644 --- a/lib/libwx_baseu_net-3.3.a +++ b/lib/libwx_baseu_net-3.3.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:59b6c5b2087446dc28c55df1224321239aadf9f7710c54b5a435ee3f91283a79 -size 21128992 +oid sha256:e1378e1a09f38b3a8a1a5e1ff07c754ca499cc180a9aa54c7ce5106546ccfc52 +size 21131824 diff --git a/lib/libwx_baseu_xml-3.3.a b/lib/libwx_baseu_xml-3.3.a index 23e615b..e77487a 100644 --- a/lib/libwx_baseu_xml-3.3.a +++ b/lib/libwx_baseu_xml-3.3.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0d74e223af4bae9b063c3d6e489b89aa8c3256f33da289cfe84a3fff443cd42f -size 2412960 +oid sha256:dc2b81d55efc6f03ce8c62be3e73c0cd4db0fcebddf134808b6c116c0793c987 +size 2319536 diff --git a/lib/libwx_osx_cocoau_adv-3.3.a b/lib/libwx_osx_cocoau_adv-3.3.a index 1237935..9a5a1f2 100644 --- a/lib/libwx_osx_cocoau_adv-3.3.a +++ b/lib/libwx_osx_cocoau_adv-3.3.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:870f34620ed9f722903aa16492d7feac2d4f2da8225e0e717007e07e9277c03d -size 4608 +oid sha256:bcabb32fd35fce1356be386b2d548c6562d0d30bf9b348dd14e4e501238053bf +size 4688 diff --git a/lib/libwx_osx_cocoau_aui-3.3.a b/lib/libwx_osx_cocoau_aui-3.3.a index 50db2f3..22c58ba 100644 --- a/lib/libwx_osx_cocoau_aui-3.3.a +++ b/lib/libwx_osx_cocoau_aui-3.3.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:26609730304b16e10ca84ed60905183e5c489ac108e863c3ff16a0d52251614e -size 25239120 +oid sha256:7081b9ca1fc97e5dcd82af131952911feddc656a60b2a05bc118b660f3bc5d7f +size 24900400 diff --git a/lib/libwx_osx_cocoau_core-3.3.a b/lib/libwx_osx_cocoau_core-3.3.a index 6bf072d..c04c197 100644 --- a/lib/libwx_osx_cocoau_core-3.3.a +++ b/lib/libwx_osx_cocoau_core-3.3.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:515fd0d58b8c65ca2a84f0cdec0b16c1f2c462df1370be1059c06e608f4a9bce -size 873146528 +oid sha256:9cf8e0b6aef510a4d48debe0c3ec732bd4324c0459a29e894fa1aa391d9b99e3 +size 859749328 diff --git a/lib/libwx_osx_cocoau_gl-3.3.a b/lib/libwx_osx_cocoau_gl-3.3.a index 3d9b84b..c7d2982 100644 --- a/lib/libwx_osx_cocoau_gl-3.3.a +++ b/lib/libwx_osx_cocoau_gl-3.3.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:424857ae94dbbe69abadbb9a4f4d626ed986dba9bfb28d780b5dadbaeea4f321 -size 8477936 +oid sha256:89a8502b7de34cff842a99ea24128f5a2d7d160bf469ef818d7d68e6c487c24d +size 8388544 diff --git a/lib/libwx_osx_cocoau_html-3.3.a b/lib/libwx_osx_cocoau_html-3.3.a index 5c32f2a..f0c33b2 100644 --- a/lib/libwx_osx_cocoau_html-3.3.a +++ b/lib/libwx_osx_cocoau_html-3.3.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:21e9e01fc3326b3b43fd09c2691689ca6cec1e47dee6ca9a2cc47cf6dcaddf4a -size 62684536 +oid sha256:984aa199d73305af2ab4d2060cb6a5d8eab37a4056b3f1492894b99bf33290c5 +size 61372568 diff --git a/lib/libwx_osx_cocoau_propgrid-3.3.a b/lib/libwx_osx_cocoau_propgrid-3.3.a index 9033cef..acf40bf 100644 --- a/lib/libwx_osx_cocoau_propgrid-3.3.a +++ b/lib/libwx_osx_cocoau_propgrid-3.3.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f40e127e52c4f2be42727f36866d3a82c2d3032d7271585afee63980148617bb -size 53868512 +oid sha256:51d4d6e9506919e9e5c1ef2a0814e0698c25930cce3c5e6456836b32302c4480 +size 52329752 diff --git a/lib/libwx_osx_cocoau_qa-3.3.a b/lib/libwx_osx_cocoau_qa-3.3.a index 48e0ac5..6c60b60 100644 --- a/lib/libwx_osx_cocoau_qa-3.3.a +++ b/lib/libwx_osx_cocoau_qa-3.3.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:99818e5f55d5f3395857d8e27913e77bd90d778b9ea94a61c2a39f0a6da252d2 -size 8366904 +oid sha256:2a4245deb6d3328c9360d2c4c4805912bfa7e328202b07227a65de517bbc7db2 +size 7864432 diff --git a/lib/libwx_osx_cocoau_richtext-3.3.a b/lib/libwx_osx_cocoau_richtext-3.3.a index 1cb354d..5b2fb9c 100644 --- a/lib/libwx_osx_cocoau_richtext-3.3.a +++ b/lib/libwx_osx_cocoau_richtext-3.3.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:12282ad8434ef57e9e00e26ea8e397d27927d215e6229cb6623e796d0574003f -size 86465712 +oid sha256:17ba0c44a4dfbd3d9e6c6b0e7f90f0701426931ceaefb07a2c01b90084c2a549 +size 84822560 diff --git a/lib/libwx_osx_cocoau_webview-3.3.a b/lib/libwx_osx_cocoau_webview-3.3.a index 109b445..c1a0f01 100644 --- a/lib/libwx_osx_cocoau_webview-3.3.a +++ b/lib/libwx_osx_cocoau_webview-3.3.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7bb769e1527a84085d660c260414c4734b845686cf39ef67c798234996e63de3 -size 12785960 +oid sha256:4482928763a5ea3a915dff4717e42d5d39c2e4684505fa560e60f05f7007125b +size 12410848 diff --git a/lib/libwxexpat-3.3.a b/lib/libwxexpat-3.3.a index 111b8e0..edab521 100644 --- a/lib/libwxexpat-3.3.a +++ b/lib/libwxexpat-3.3.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f65d731d6ed26d45353daed9fc25f573770b9ec0d6807cbe0ac1bb35aaa7a9fe -size 1640192 +oid sha256:6ef346518e11bbdb7f6266cafe2c20bcf8484e09ea0382f1e3496e5288562b1f +size 1681216 diff --git a/lib/libwxjpeg-3.3.a b/lib/libwxjpeg-3.3.a index 8917db2..fc0bc7a 100644 --- a/lib/libwxjpeg-3.3.a +++ b/lib/libwxjpeg-3.3.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7d0ed0197cc1cd9655da8459c69cc52fd3b96e666d39256182b8c3ce50805daf -size 4524320 +oid sha256:bbe5f64817db5e49a587382f99efb89091f455010f95d8b4495f833076280b67 +size 4532016 diff --git a/lib/libwxpng-3.3.a b/lib/libwxpng-3.3.a index f506176..f4ac77b 100644 --- a/lib/libwxpng-3.3.a +++ b/lib/libwxpng-3.3.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2af2d8c971e782aed16d281c74f9262b4331b7c524fc7cd29f470972f75c3a8e -size 3226952 +oid sha256:fbdb99ebc09ab33437224d800e5f38489ffe3368b17d3db01b5db3b21b5668dd +size 3235736 diff --git a/lib/libwxregexu-3.3.a b/lib/libwxregexu-3.3.a index 81f5450..15e36ab 100644 --- a/lib/libwxregexu-3.3.a +++ b/lib/libwxregexu-3.3.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:55bca637e04ffc582e464393e72f0575b1e2f53b5ab2c1f1d8597e0850daf20f -size 2531376 +oid sha256:fb1fbd9837e54ee6e9f85e4641fc8ce3ca5d949ac7292502a0e21ea32323c219 +size 2553216 diff --git a/lib/libwxzlib-3.3.a b/lib/libwxzlib-3.3.a index b905ac8..6c6da9d 100644 --- a/lib/libwxzlib-3.3.a +++ b/lib/libwxzlib-3.3.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:678e388b0271dbdee13c067d64b586cd1164040c8c9021eccc1453f2d48cade6 -size 1052224 +oid sha256:8d75ee486b55c051f8a977ed8bf867f2b2fbaa236a29858c2792d6f15e771a31 +size 1060256 diff --git a/lib/libxlsxwriter.a b/lib/libxlsxwriter.a index f0972f4..88f9a53 100644 --- a/lib/libxlsxwriter.a +++ b/lib/libxlsxwriter.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:be189dbe6ebd8e0de2498c9ce328349699db167639e885192823ac9153d9a31a -size 5037056 +oid sha256:3b71425e5c7136c47fab12b11281512d291f9045f90f9d8bb68606c7effadf72 +size 5443056 diff --git a/lib/libzstd.a b/lib/libzstd.a index 1ee8bcf..1900e44 100644 --- a/lib/libzstd.a +++ b/lib/libzstd.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:eec5849d88d02cbbb5cbe78ec3291172d8390fb8298cb9e8d95d93cc083a6d24 -size 15606136 +oid sha256:4c43b96e09f750dd030dab096c47785d81a982286c61859afe9085507cd7a1f6 +size 15829600 diff --git a/libdbg/libSDL2.a b/libdbg/libSDL2.a index f1cd8dc..68d8391 100644 --- a/libdbg/libSDL2.a +++ b/libdbg/libSDL2.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d215b7e23a02cf17e11bf375cd8cbbf1084b007c5cbc50ac800665c0d652450f -size 12104496 +oid sha256:011f9853e9b7cd72268a338aa01410bb6917dc4a81d46b6a805fb525197d963a +size 12135552 diff --git a/libdbg/libavcodec.a b/libdbg/libavcodec.a index b61fee7..48f6929 100644 --- a/libdbg/libavcodec.a +++ b/libdbg/libavcodec.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:abb2d261c185060b43c0df03e300729cf1424d2afb73d60159f75a6641a295c1 -size 128024688 +oid sha256:8dbf29e8d13e5b2fcc04e30e210035b6c143748b35e5b0ad0cead901eb9130a6 +size 127973384 diff --git a/libdbg/libavdevice.a b/libdbg/libavdevice.a index 8b9d13a..c4fb56d 100644 --- a/libdbg/libavdevice.a +++ b/libdbg/libavdevice.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9f397c7709ee12d5d454a8882f2d4068a4143db9e9921c0228bf88a0bebf547f -size 1009696 +oid sha256:226936f7c09189f811423c771406aa3bab3f33be20841f687c06f34308706431 +size 1013728 diff --git a/libdbg/libavfilter.a b/libdbg/libavfilter.a index 7ff4b00..c4ae093 100644 --- a/libdbg/libavfilter.a +++ b/libdbg/libavfilter.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e0a796829f3ceaec83d5c99a84630269de9dd9a891fd1d100e480d5ce6e59c4d -size 44484632 +oid sha256:a445a851e2c2349debd1d89dd6f04737bc29e866895c0913df4da74e96188e23 +size 44386432 diff --git a/libdbg/libavformat.a b/libdbg/libavformat.a index f5257f4..9e14616 100644 --- a/libdbg/libavformat.a +++ b/libdbg/libavformat.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:753e38747d53553c0db0b590bd9ad194eb3365a13557b91a2b47e8a28606f83f -size 47419472 +oid sha256:becd6ac67205682eb257d110a9cb9ba0600897c8f774d440c1306c7f7c668f97 +size 47402800 diff --git a/libdbg/libavutil.a b/libdbg/libavutil.a index 2e26dd0..188a294 100644 --- a/libdbg/libavutil.a +++ b/libdbg/libavutil.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:30c3582abfb46c7bcc43ee9a1c8df217cf3f1be855db32cf756974eddb780c38 -size 4448104 +oid sha256:dbdb28d7b96be04b2912d2891bd593a266bf452a92ad06847c720f8ece8ad7d7 +size 4441920 diff --git a/libdbg/libhidapi.a b/libdbg/libhidapi.a index 84ffca4..578432d 100644 --- a/libdbg/libhidapi.a +++ b/libdbg/libhidapi.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f79fd2a7f1ab0fe0c7762407a90bc0ad9388d10059832e151ac3c9cb09e794c1 -size 121920 +oid sha256:045114b7ac3073ec977ce00be9c38a49b28222231196745dd09c411e6b74391b +size 121912 diff --git a/libdbg/libliquidfun.a b/libdbg/libliquidfun.a index c7077c6..d914f3d 100644 --- a/libdbg/libliquidfun.a +++ b/libdbg/libliquidfun.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:18b450c976ffaf4e080a9b77cc23eae4fdef2ab3bc0b13d537e2a382e7ade3aa -size 8053000 +oid sha256:61a4ed3f2f20f7409110b486691bd825be534fe6d184cbabe0b16290c5fa8c89 +size 8069032 diff --git a/libdbg/liblog4cpp.a b/libdbg/liblog4cpp.a index 06b80f2..edb8f1a 100644 --- a/libdbg/liblog4cpp.a +++ b/libdbg/liblog4cpp.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fcd93c41d77b3aac8788378039f6dcb632d1823aa646980eba0ccc4dfa3b11b7 -size 20484856 +oid sha256:b457ccd38876b9bf25075aa59dcfd8988dd3806aba1f0a2421614580120f8d8e +size 20692896 diff --git a/libdbg/liblua.a b/libdbg/liblua.a index fe49cbe..b8c8d35 100644 --- a/libdbg/liblua.a +++ b/libdbg/liblua.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f7fc8f73462cfbc7347bbc2f917086ffb46bc21d4a28439b821efabccef2352b -size 2132592 +oid sha256:4cd229c3d6570963d3eefa0b41b17e4516c00cbc69d2b373966af592d61c8fb2 +size 2138016 diff --git a/libdbg/libpostproc.a b/libdbg/libpostproc.a index cc8f3c8..bf4007b 100644 --- a/libdbg/libpostproc.a +++ b/libdbg/libpostproc.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:79c3d7d20a00cbb121b996c28c1fbaced93aea9bd47def068f98bcfe5ca877f4 -size 199552 +oid sha256:d78d8462aa8a817100d76e6c896b249757ff88617b8272e6754e11860e5b18ab +size 198824 diff --git a/libdbg/libsharpyuv.a b/libdbg/libsharpyuv.a index b471dc3..a84c482 100644 --- a/libdbg/libsharpyuv.a +++ b/libdbg/libsharpyuv.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7e29b5c1fb815340b2c5974aaecaad35a3bc31ca222b72ced6d0e778a987dc99 -size 118360 +oid sha256:78a33e52fa52aec2f2f2a038fd295d7e895689a8a01b9d14563fa1deeeae3943 +size 118448 diff --git a/libdbg/libswresample.a b/libdbg/libswresample.a index 13ad263..2cd2cfc 100644 --- a/libdbg/libswresample.a +++ b/libdbg/libswresample.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b2ccf3dfe09fb4c2622eb2d1ecce168cc775d97d6c5343b32e688be6d239cd1a -size 607584 +oid sha256:fe010e2431b909b110061b3153337a7b044aa982874dbf4f30cd6cdc8a65e4fc +size 606152 diff --git a/libdbg/libswscale.a b/libdbg/libswscale.a index 96822dc..cc80e65 100644 --- a/libdbg/libswscale.a +++ b/libdbg/libswscale.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:da97eeec0771b7061953138123547e04e7f8397e4cc2b99d519a9cd3d3119eb9 -size 6772256 +oid sha256:ff165d2ab20b5ce50f8b7e8040ceec519ffc56ef564610eab43fb5d17a2c26b6 +size 6769416 diff --git a/libdbg/libwebp.a b/libdbg/libwebp.a index df9e182..a2f8ab6 100644 --- a/libdbg/libwebp.a +++ b/libdbg/libwebp.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ddf96f7cc5dd4d09b28067b16b8256604356367dfce65254f143ac364302aa7c -size 3369832 +oid sha256:38597c60892d6f63b1ad4865ed3a5ffd183c2b1a767d5a20b94aa7a99f229ee7 +size 3375968 diff --git a/libdbg/libwebpdemux.a b/libdbg/libwebpdemux.a index fbb0bcc..e28e764 100644 --- a/libdbg/libwebpdemux.a +++ b/libdbg/libwebpdemux.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:725d8171ca2756f58514e01bda26bd619b14f4937ddf5c25d285361f79341a34 -size 125008 +oid sha256:6280890ac2f4c9ea73c9f372b385f0f528b6b1c6b186656df049a45d428c777a +size 125216 diff --git a/libdbg/libwx_baseu-3.3.0.0.0.dylib b/libdbg/libwx_baseu-3.3.0.0.0.dylib index 092fb2c..d5c4a9e 100755 --- a/libdbg/libwx_baseu-3.3.0.0.0.dylib +++ b/libdbg/libwx_baseu-3.3.0.0.0.dylib @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9fc9e115c7a578ffb53347f3e4c064394e8294740495ebf9761e3845421bd1c8 -size 12195576 +oid sha256:7b5c51a99e0bfc6f3ffb5d662b59f838820dc48a001885867d1da95d32ec954a +size 12254136 diff --git a/libdbg/libwx_baseu_net-3.3.0.0.0.dylib b/libdbg/libwx_baseu_net-3.3.0.0.0.dylib index 463e1d9..0cbcff1 100755 --- a/libdbg/libwx_baseu_net-3.3.0.0.0.dylib +++ b/libdbg/libwx_baseu_net-3.3.0.0.0.dylib @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:56a7cfbccf6473baf1a795f292d91a58cc05fff9ca325a0c2ad7f872d9156896 -size 1905944 +oid sha256:8f5ae99f39197104b65c7fdf46dc108378078321a542c85afe94c990192ac719 +size 2014880 diff --git a/libdbg/libwx_baseu_xml-3.3.0.0.0.dylib b/libdbg/libwx_baseu_xml-3.3.0.0.0.dylib index c17bc06..c6e0591 100755 --- a/libdbg/libwx_baseu_xml-3.3.0.0.0.dylib +++ b/libdbg/libwx_baseu_xml-3.3.0.0.0.dylib @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0b3757de54fd698ef61b4b3b0e8478477beaf21029602208a97c071705a6500f -size 968056 +oid sha256:584829141f88c2c0bcce8ac245b0ba6857bd2af5b020b39c508439aa22039dfa +size 970544 diff --git a/libdbg/libwx_osx_cocoau_adv-3.3.0.0.0.dylib b/libdbg/libwx_osx_cocoau_adv-3.3.0.0.0.dylib index 21cd886..34fbeca 100755 --- a/libdbg/libwx_osx_cocoau_adv-3.3.0.0.0.dylib +++ b/libdbg/libwx_osx_cocoau_adv-3.3.0.0.0.dylib @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9bdca743b3a5fd5835a69035eaf738cf02d759b4a922de8f4cda91f1ef672ac9 -size 66256 +oid sha256:1c7f0b8b998425361295389e0f8b6463e7932f3fc8293eeb209b9ca09e6a272f +size 66264 diff --git a/libdbg/libwx_osx_cocoau_aui-3.3.0.0.0.dylib b/libdbg/libwx_osx_cocoau_aui-3.3.0.0.0.dylib index ba28967..288e3ac 100755 --- a/libdbg/libwx_osx_cocoau_aui-3.3.0.0.0.dylib +++ b/libdbg/libwx_osx_cocoau_aui-3.3.0.0.0.dylib @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d1e637963d3b12e26f1feaa69bb39e04d0d02811c070285f3ee91e6ab081c998 -size 2618048 +oid sha256:3dcb6701f15522133700b43cffcbe94791b5c11fa22a0bbebef57e20d3c91f6c +size 2622168 diff --git a/libdbg/libwx_osx_cocoau_core-3.3.0.0.0.dylib b/libdbg/libwx_osx_cocoau_core-3.3.0.0.0.dylib index 60f4ebf..5f81335 100755 --- a/libdbg/libwx_osx_cocoau_core-3.3.0.0.0.dylib +++ b/libdbg/libwx_osx_cocoau_core-3.3.0.0.0.dylib @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bb664ffbf26b6ec382ce306c5f28ca271015e3b96fc09babc189ea35c93cef56 -size 32706656 +oid sha256:81f150a7879e82d5989dec3ec0e7f03ade9717da5195fb6ed22250607941f07d +size 33348072 diff --git a/libdbg/libwx_osx_cocoau_gl-3.3.0.0.0.dylib b/libdbg/libwx_osx_cocoau_gl-3.3.0.0.0.dylib index 7062e23..236271e 100755 --- a/libdbg/libwx_osx_cocoau_gl-3.3.0.0.0.dylib +++ b/libdbg/libwx_osx_cocoau_gl-3.3.0.0.0.dylib @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0c04347fc182f54a063b3900155ede1ee4b5391ee8925ea3c316434e249af3b2 -size 453520 +oid sha256:e434c808ed00537e0e5d0937b79ffd00ecf8850218ed5a8154cb39545797ae66 +size 455696 diff --git a/libdbg/libwx_osx_cocoau_html-3.3.0.0.0.dylib b/libdbg/libwx_osx_cocoau_html-3.3.0.0.0.dylib index 0ecd53d..8716a4b 100755 --- a/libdbg/libwx_osx_cocoau_html-3.3.0.0.0.dylib +++ b/libdbg/libwx_osx_cocoau_html-3.3.0.0.0.dylib @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:44cb337c16bc2f6875149296dbda03e9811e498ff06fab63ff8dde4be442b02d -size 3333744 +oid sha256:36ef906ab619f7273100f149a50d88aed13ffc4a7ff1b3d2c0411b0d0b57c693 +size 3335000 diff --git a/libdbg/libwx_osx_cocoau_propgrid-3.3.0.0.0.dylib b/libdbg/libwx_osx_cocoau_propgrid-3.3.0.0.0.dylib index b4c9880..c68671f 100755 --- a/libdbg/libwx_osx_cocoau_propgrid-3.3.0.0.0.dylib +++ b/libdbg/libwx_osx_cocoau_propgrid-3.3.0.0.0.dylib @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:75110014725b6a60d1565ebf886584b73d8ec5c4a5bcc859b20cd8a5287b9b43 -size 5389536 +oid sha256:55c29e3d84937ed30c4f910d1d3943846f9d2157fa480da7ed2eaa971ede486d +size 5398696 diff --git a/libdbg/libwx_osx_cocoau_qa-3.3.0.0.0.dylib b/libdbg/libwx_osx_cocoau_qa-3.3.0.0.0.dylib index 42ba8cf..503b76b 100755 --- a/libdbg/libwx_osx_cocoau_qa-3.3.0.0.0.dylib +++ b/libdbg/libwx_osx_cocoau_qa-3.3.0.0.0.dylib @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:99250d1baf58b01dfccfb4dfbec4d8c8cdbc336dc209219017f74b3199257e3c -size 940096 +oid sha256:66da2ee3603b4ef29004c771b3fd4c6f91ff97577f5a1851e431709974cefa40 +size 959712 diff --git a/libdbg/libwx_osx_cocoau_richtext-3.3.0.0.0.dylib b/libdbg/libwx_osx_cocoau_richtext-3.3.0.0.0.dylib index fd0cdb0..3849668 100755 --- a/libdbg/libwx_osx_cocoau_richtext-3.3.0.0.0.dylib +++ b/libdbg/libwx_osx_cocoau_richtext-3.3.0.0.0.dylib @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:24c8ce3c477b101218a011bc020a6265ea24191bb617ee99693b3e8b42a4a372 -size 6675488 +oid sha256:0d514b3fb70e5317a30aadaa31783cbe546088da9769293847544f6aa58f9781 +size 6681880 diff --git a/libdbg/libwx_osx_cocoau_webview-3.3.0.0.0.dylib b/libdbg/libwx_osx_cocoau_webview-3.3.0.0.0.dylib index 9836068..a1a351d 100755 --- a/libdbg/libwx_osx_cocoau_webview-3.3.0.0.0.dylib +++ b/libdbg/libwx_osx_cocoau_webview-3.3.0.0.0.dylib @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7558da9a692b8a120c9ace93422535bb17b4529fc94718e452b717e17e592aa7 -size 1239840 +oid sha256:1241bff7d9f4cad284f47337158070f68121b59677b696a4acf0be583874cd34 +size 1262792 diff --git a/libdbg/libxlsxwriter.a b/libdbg/libxlsxwriter.a index dc83ddc..7894d3d 100644 --- a/libdbg/libxlsxwriter.a +++ b/libdbg/libxlsxwriter.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:12e631534af64d5daae2e72c83281ae01a518aef33c6e750e32c9aabf614fbb0 -size 2922920 +oid sha256:8e293e6b4deabbd8ff83a17e418882a99d7bb5e2b1c203a27a6401638778bd4c +size 3111960 diff --git a/libdbg/libzstd.a b/libdbg/libzstd.a index 43c16a4..3b79ea0 100644 --- a/libdbg/libzstd.a +++ b/libdbg/libzstd.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:15a5c156a349fa77ecf2c71519cf5e2fb33ddb428cab314aaba3e00f746b5d3f -size 8985384 +oid sha256:0430da399f867684888de59c812c6f165dc890f300ad5e2c41204a9866a6ac45 +size 9051896 diff --git a/share/bakefile/presets/wx_win32.bkl b/share/bakefile/presets/wx_win32.bkl index 842de4e..ef85e18 100644 --- a/share/bakefile/presets/wx_win32.bkl +++ b/share/bakefile/presets/wx_win32.bkl @@ -275,6 +275,8 @@ kernel32 user32 gdi32 + gdiplus + msimg32 comdlg32 winspool winmm