Skip to content

Commit

Permalink
Update to 2024.01 tag
Browse files Browse the repository at this point in the history
  • Loading branch information
dkulp committed Jan 13, 2024
1 parent 65543da commit cf4dafd
Show file tree
Hide file tree
Showing 81 changed files with 2,325 additions and 1,293 deletions.
Binary file modified bin/wxrc-3.3
Binary file not shown.
3 changes: 2 additions & 1 deletion include/wx-3.3/wx/aui/auibar.h
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,6 @@ class WXDLLIMPEXP_AUI wxAuiToolBar : public wxControl
bool m_gripperVisible;
bool m_overflowVisible;

bool RealizeHelper(wxClientDC& dc, bool horizontal);
static bool IsPaneValid(long style, const wxAuiPaneInfo& pane);
bool IsPaneValid(long style) const;
void SetArtFlags() const;
Expand All @@ -705,6 +704,8 @@ class WXDLLIMPEXP_AUI wxAuiToolBar : public wxControl
// Common part of OnLeaveWindow() and OnCaptureLost().
void DoResetMouseState();

wxSize RealizeHelper(wxClientDC& dc, wxOrientation orientation);

wxDECLARE_EVENT_TABLE();
wxDECLARE_CLASS(wxAuiToolBar);
};
Expand Down
6 changes: 6 additions & 0 deletions include/wx-3.3/wx/aui/auibook.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@ class WXDLLIMPEXP_AUI wxAuiTabContainer
wxRect m_rect;
size_t m_tabOffset;
unsigned int m_flags;

private:
int GetCloseButtonState(const wxAuiNotebookPage& page) const;
};


Expand All @@ -210,6 +213,9 @@ class WXDLLIMPEXP_AUI wxAuiTabCtrl : public wxControl,

void SetRect(const wxRect& rect) { wxAuiTabContainer::SetRect(rect, this); }

// Internal helper.
void DoShowTab(int idx);

protected:
// choose the default border for this window
virtual wxBorder GetDefaultBorder() const override { return wxBORDER_NONE; }
Expand Down
7 changes: 3 additions & 4 deletions include/wx-3.3/wx/aui/framemanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ enum wxAuiManagerOption
wxAUI_MGR_DEFAULT = wxAUI_MGR_ALLOW_FLOATING |
wxAUI_MGR_TRANSPARENT_HINT |
wxAUI_MGR_HINT_FADE |
wxAUI_MGR_NO_VENETIAN_BLINDS_FADE
wxAUI_MGR_NO_VENETIAN_BLINDS_FADE |
wxAUI_MGR_LIVE_RESIZE
};


Expand Down Expand Up @@ -416,7 +417,7 @@ class WXDLLIMPEXP_AUI wxAuiManager : public wxEvtHandler
void SetFlags(unsigned int flags);
unsigned int GetFlags() const;

static bool AlwaysUsesLiveResize();
static bool AlwaysUsesLiveResize(const wxWindow* window = nullptr);
bool HasLiveResize() const;

void SetManagedWindow(wxWindow* managedWnd);
Expand Down Expand Up @@ -485,8 +486,6 @@ class WXDLLIMPEXP_AUI wxAuiManager : public wxEvtHandler
virtual void ShowHint(const wxRect& rect);
virtual void HideHint();

void OnHintActivate(wxActivateEvent& event);

public:

// deprecated -- please use SetManagedWindow()
Expand Down
27 changes: 18 additions & 9 deletions include/wx-3.3/wx/bitmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "wx/gdicmn.h" // for wxBitmapType
#include "wx/colour.h"
#include "wx/image.h"
#include "wx/variant.h"

class WXDLLIMPEXP_FWD_CORE wxBitmap;
class WXDLLIMPEXP_FWD_CORE wxBitmapHandler;
Expand All @@ -28,15 +29,6 @@ class WXDLLIMPEXP_FWD_CORE wxMask;
class WXDLLIMPEXP_FWD_CORE wxPalette;
class WXDLLIMPEXP_FWD_CORE wxPixelDataBase;

// ----------------------------------------------------------------------------
// wxVariant support
// ----------------------------------------------------------------------------

#if wxUSE_VARIANT
#include "wx/variant.h"
DECLARE_VARIANT_OBJECT_EXPORTED(wxBitmap,WXDLLIMPEXP_CORE)
#endif

// ----------------------------------------------------------------------------
// wxMask represents the transparent area of the bitmap
// ----------------------------------------------------------------------------
Expand Down Expand Up @@ -100,6 +92,9 @@ class WXDLLIMPEXP_CORE wxBitmapHelpers

// Rescale the given bitmap to the requested size.
static void Rescale(wxBitmap& bmp, const wxSize& sizeNeeded);

// wxVariant support
wxDECLARE_VARIANT_OBJECT_EXPORTED(wxBitmap, WXDLLIMPEXP_CORE);
};


Expand Down Expand Up @@ -178,6 +173,11 @@ class WXDLLIMPEXP_CORE wxBitmapBase : public wxGDIObject,
virtual bool Create(int width, int height, int depth = wxBITMAP_SCREEN_DEPTH) = 0;
virtual bool Create(const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH) = 0;

// DIP size and logical size are the same thing for ports using scaling,
// i.e. where physical and logical sizes are different (e.g. wxGTK and
// wxOSX), but we want to have both sets of functions to use them in the
// ports where physical and logical sizes are the same (wxMSW).

bool CreateWithDIPSize(const wxSize& sz,
double scale,
int depth = wxBITMAP_SCREEN_DEPTH)
Expand All @@ -187,6 +187,15 @@ class WXDLLIMPEXP_CORE wxBitmapBase : public wxGDIObject,
int depth = wxBITMAP_SCREEN_DEPTH)
{ return DoCreate(wxSize(width, height), scale, depth); }

bool CreateWithLogicalSize(const wxSize& sz,
double scale,
int depth = wxBITMAP_SCREEN_DEPTH)
{ return DoCreate(sz, scale, depth); }
bool CreateWithLogicalSize(int width, int height,
double scale,
int depth = wxBITMAP_SCREEN_DEPTH)
{ return DoCreate(wxSize(width, height), scale, depth); }

virtual int GetHeight() const = 0;
virtual int GetWidth() const = 0;
virtual int GetDepth() const = 0;
Expand Down
25 changes: 10 additions & 15 deletions include/wx-3.3/wx/bmpbndl.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
class wxBitmapBundleImpl;
class WXDLLIMPEXP_FWD_CORE wxIconBundle;
class WXDLLIMPEXP_FWD_CORE wxImageList;
class WXDLLIMPEXP_FWD_BASE wxVariant;
class WXDLLIMPEXP_FWD_CORE wxWindow;

// ----------------------------------------------------------------------------
Expand Down Expand Up @@ -155,6 +156,15 @@ class WXDLLIMPEXP_CORE wxBitmapBundle
return GetImpl() == other.GetImpl();
}

// Allow using wxBitmapBundle with wxVariant
#if wxUSE_VARIANT
friend WXDLLIMPEXP_CORE
wxBitmapBundle& operator<<(wxBitmapBundle& value, const wxVariant& variant);
friend WXDLLIMPEXP_CORE
wxVariant& operator<<(wxVariant& variant, const wxBitmapBundle& value);
#endif // wxUSE_VARIANT


// Implementation only from now on.

// Get the bitmap size preferred by the majority of the elements of the
Expand Down Expand Up @@ -274,19 +284,4 @@ class WXDLLIMPEXP_CORE wxBitmapBundleImpl : public wxRefCounter
virtual wxBitmap GetBitmap(const wxSize& size) = 0;
};

// ----------------------------------------------------------------------------
// Allow using wxBitmapBundle in wxVariant
// ----------------------------------------------------------------------------

#if wxUSE_VARIANT

class WXDLLIMPEXP_FWD_BASE wxVariant;

WXDLLIMPEXP_CORE
wxBitmapBundle& operator<<(wxBitmapBundle& value, const wxVariant& variant);
WXDLLIMPEXP_CORE
wxVariant& operator<<(wxVariant& variant, const wxBitmapBundle& value);

#endif // wxUSE_VARIANT

#endif // _WX_BMPBNDL_H_
4 changes: 4 additions & 0 deletions include/wx-3.3/wx/brush.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ extern WXDLLIMPEXP_DATA_CORE(wxBrushList*) wxTheBrushList;
// to compile without warnings which it would otherwise provoke from some
// compilers as it compares elements of different enums

#if WXWIN_COMPATIBILITY_3_2

wxDEPRECATED_MSG("use wxBRUSHSTYLE_XXX constants only")
inline bool operator==(wxBrushStyle s, wxDeprecatedGUIConstants t)
{
Expand All @@ -114,4 +116,6 @@ inline bool operator!=(wxBrushStyle s, wxDeprecatedGUIConstants t)
return static_cast<int>(s) != static_cast<int>(t);
}

#endif // WXWIN_COMPATIBILITY_3_2

#endif // _WX_BRUSH_H_BASE_
77 changes: 77 additions & 0 deletions include/wx-3.3/wx/buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
#include "wx/defs.h"
#include "wx/wxcrtbase.h"

#if wxUSE_STD_IOSTREAM
#include "wx/iosfwrap.h"
#endif

#include <stdlib.h> // malloc() and free()

class WXDLLIMPEXP_FWD_BASE wxCStrData;
Expand Down Expand Up @@ -55,14 +59,70 @@ struct UntypedBufferData
// NB: this is defined in string.cpp and not the (non-existent) buffer.cpp
WXDLLIMPEXP_BASE UntypedBufferData * GetUntypedNullData();

// Implementation of stream insertion operators: they can't be inline because
// we don't have full std::ostream declaration here.
#if wxUSE_STD_IOSTREAM
WXDLLIMPEXP_BASE std::ostream& OutputCharBuffer(std::ostream&, const char* s);
WXDLLIMPEXP_BASE std::ostream& OutputWCharBuffer(std::ostream&, const wchar_t* ws);
#if defined(HAVE_WOSTREAM)
WXDLLIMPEXP_BASE std::wostream& OutputWCharBuffer(std::wostream&, const wchar_t* ws);
#endif // defined(HAVE_WOSTREAM)
#endif // wxUSE_STD_IOSTREAM

} // namespace wxPrivate


// Template used as CRTP base class for wxScopedCharTypeBuffer in order to
// define overloaded operator<<() for it.
//
// By default we don't define any operators, but we do define them for the
// usual char and wchar_t specializations below.
template <typename T, typename Buffer>
struct wxScopedCharTypeBufferStreamSupport
{
};

// Suppress the warning about declaring a non-template friend because this is
// exactly what we want to do here.
wxGCC_ONLY_WARNING_SUPPRESS(non-template-friend)

template <typename Buffer>
struct wxScopedCharTypeBufferStreamSupport<char, Buffer>
{
#if wxUSE_STD_IOSTREAM
friend std::ostream& operator<<(std::ostream& oss, const Buffer& buf)
{
return wxPrivate::OutputCharBuffer(oss, buf.data());
}
#endif // wxUSE_STD_IOSTREAM
};

template <typename Buffer>
struct wxScopedCharTypeBufferStreamSupport<wchar_t, Buffer>
{
#if wxUSE_STD_IOSTREAM
friend std::ostream& operator<<(std::ostream& oss, const Buffer& buf)
{
return wxPrivate::OutputWCharBuffer(oss, buf.data());
}
#if defined(HAVE_WOSTREAM)
friend std::wostream& operator<<(std::wostream& woss, const Buffer& buf)
{
return wxPrivate::OutputWCharBuffer(woss, buf.data());
}
#endif // defined(HAVE_WOSTREAM)
#endif // wxUSE_STD_IOSTREAM
};

wxGCC_ONLY_WARNING_RESTORE(non-template-friend)


// Reference-counted character buffer for storing string data. The buffer
// is only valid for as long as the "parent" object that provided the data
// is valid; see wxCharTypeBuffer<T> for persistent variant.
template <typename T>
class wxScopedCharTypeBuffer
: wxScopedCharTypeBufferStreamSupport<T, wxScopedCharTypeBuffer<T>>
{
public:
typedef T CharType;
Expand Down Expand Up @@ -368,6 +428,13 @@ class wxCharBuffer : public wxCharTypeBuffer<char>
wxCharBuffer(size_t len) : wxCharTypeBufferBase(len) {}

wxCharBuffer(const wxCStrData& cstr);

#if wxUSE_STD_IOSTREAM
// Define this to disambiguate between converting to the base class or to
// wxString when using operator<<() with the objects of this class.
friend WXDLLIMPEXP_BASE
std::ostream& operator<<(std::ostream& oss, const wxCharBuffer& buf);
#endif // wxUSE_STD_IOSTREAM
};

class wxWCharBuffer : public wxCharTypeBuffer<wchar_t>
Expand All @@ -385,6 +452,16 @@ class wxWCharBuffer : public wxCharTypeBuffer<wchar_t>
wxWCharBuffer(size_t len) : wxCharTypeBufferBase(len) {}

wxWCharBuffer(const wxCStrData& cstr);

#if wxUSE_STD_IOSTREAM
// See wxCharBuffer for why this is needed.
friend WXDLLIMPEXP_BASE
std::ostream& operator<<(std::ostream& oss, const wxWCharBuffer& buf);
#if defined(HAVE_WOSTREAM)
friend WXDLLIMPEXP_BASE
std::wostream& operator<<(std::wostream& woss, const wxWCharBuffer& buf);
#endif // defined(HAVE_WOSTREAM)
#endif // wxUSE_STD_IOSTREAM
};

// wxCharTypeBuffer<T> implicitly convertible to T*, for char and wchar_t,
Expand Down
12 changes: 3 additions & 9 deletions include/wx-3.3/wx/colour.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

#include "wx/defs.h"
#include "wx/gdiobj.h"
#include "wx/variant.h"

class WXDLLIMPEXP_FWD_CORE wxColour;

Expand Down Expand Up @@ -53,15 +54,6 @@ const unsigned char wxALPHA_OPAQUE = 0xff;
#define wxTransparentColour wxColour(0, 0, 0, wxALPHA_TRANSPARENT)
#define wxTransparentColor wxTransparentColour

// ----------------------------------------------------------------------------
// wxVariant support
// ----------------------------------------------------------------------------

#if wxUSE_VARIANT
#include "wx/variant.h"
DECLARE_VARIANT_OBJECT_EXPORTED(wxColour,WXDLLIMPEXP_CORE)
#endif

//-----------------------------------------------------------------------------
// wxColourBase: this class has no data members, just some functions to avoid
// code redundancy in all native wxColour implementations
Expand Down Expand Up @@ -188,6 +180,8 @@ class WXDLLIMPEXP_CORE wxColourBase : public
wxColour ChangeLightness(int ialpha) const;
wxColour& MakeDisabled(unsigned char brightness = 255);

wxDECLARE_VARIANT_OBJECT_EXPORTED(wxColour, WXDLLIMPEXP_CORE);

protected:
// Some ports need Init() and while we don't, provide a stub so that the
// ports which don't need it are not forced to define it
Expand Down
4 changes: 3 additions & 1 deletion include/wx-3.3/wx/confbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ enum
wxCONFIG_USE_GLOBAL_FILE = 2,
wxCONFIG_USE_RELATIVE_PATH = 4,
wxCONFIG_USE_NO_ESCAPE_CHARACTERS = 8,
wxCONFIG_USE_SUBDIR = 16
wxCONFIG_USE_SUBDIR = 16,
wxCONFIG_USE_XDG = 32,
wxCONFIG_USE_HOME = 64
};

// ----------------------------------------------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions include/wx-3.3/wx/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@
#if defined(__WINDOWS__) && wxUSE_CONFIG_NATIVE
#include "wx/msw/regconf.h"
#define wxConfig wxRegConfig
#define wxHAS_CONFIG_AS_REGCONFIG
#else // either we're under Unix or wish to always use config files
#include "wx/fileconf.h"
#define wxConfig wxFileConfig
#define wxHAS_CONFIG_AS_FILECONFIG
#endif

#endif // wxUSE_CONFIG
Expand Down
19 changes: 3 additions & 16 deletions include/wx-3.3/wx/datetime.h
Original file line number Diff line number Diff line change
Expand Up @@ -1278,6 +1278,8 @@ class WXDLLIMPEXP_BASE wxTimeSpan
return wxTimeSpan(*this).Multiply(n);
}

friend WXDLLIMPEXP_BASE wxTimeSpan operator*(int n, const wxTimeSpan& ts);

// return this timespan with opposite sign
wxTimeSpan Negate() const { return wxTimeSpan(-GetValue()); }
// negate the value of the timespan
Expand Down Expand Up @@ -1531,6 +1533,7 @@ class WXDLLIMPEXP_BASE wxDateSpan
{
return wxDateSpan(*this).Multiply(n);
}
friend WXDLLIMPEXP_BASE wxDateSpan operator*(int n, const wxDateSpan& ds);

// ds1 == d2 if and only if for every wxDateTime t t + ds1 == t + ds2
inline bool operator==(const wxDateSpan& ds) const
Expand Down Expand Up @@ -2243,22 +2246,6 @@ inline wxDateSpan wxDateSpan::Subtract(const wxDateSpan& other) const

#undef MODIFY_AND_RETURN

// ============================================================================
// binary operators
// ============================================================================

// ----------------------------------------------------------------------------
// wxTimeSpan operators
// ----------------------------------------------------------------------------

wxTimeSpan WXDLLIMPEXP_BASE operator*(int n, const wxTimeSpan& ts);

// ----------------------------------------------------------------------------
// wxDateSpan
// ----------------------------------------------------------------------------

wxDateSpan WXDLLIMPEXP_BASE operator*(int n, const wxDateSpan& ds);

// ============================================================================
// other helper functions
// ============================================================================
Expand Down
Loading

0 comments on commit cf4dafd

Please sign in to comment.