From c30eb8f2ffc7c038e58aeaec0cac8234761f9765 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 23 May 2019 21:26:14 -0700 Subject: [PATCH] Add missing and fix broken interface items for wxPython --- interface/wx/clrpicker.h | 2 ++ interface/wx/colordlg.h | 18 ++++++++++++++++++ interface/wx/gbsizer.h | 2 +- interface/wx/graphics.h | 2 +- interface/wx/popupwin.h | 2 ++ interface/wx/sizer.h | 21 ++++++++++++--------- interface/wx/wrapsizer.h | 2 +- 7 files changed, 37 insertions(+), 12 deletions(-) diff --git a/interface/wx/clrpicker.h b/interface/wx/clrpicker.h index d8db2adb38..d7860d6efe 100644 --- a/interface/wx/clrpicker.h +++ b/interface/wx/clrpicker.h @@ -11,6 +11,8 @@ #define wxCLRP_SHOW_ALPHA 0x0010 wxEventType wxEVT_COLOURPICKER_CHANGED; +wxEventType wxEVT_COLOURPICKER_CURRENT_CHANGED; +wxEventType wxEVT_COLOURPICKER_DIALOG_CANCELLED; /** diff --git a/interface/wx/colordlg.h b/interface/wx/colordlg.h index ece8d9127b..b2344e0870 100644 --- a/interface/wx/colordlg.h +++ b/interface/wx/colordlg.h @@ -109,12 +109,30 @@ public: class wxColourDialogEvent : public wxCommandEvent { public: + wxColourDialogEvent(); + + /** + The constructor is not normally used by the user code. + */ + wxColourDialogEvent(wxEventType evtType, + wxColourDialog* dialog, + const wxColour& colour); + /** Retrieve the colour the user has just selected. */ wxColour GetColour() const; + + /** + Set the colour to be sent with the event. + */ + void SetColour(const wxColour& colour); }; + +wxEventType wxEVT_COLOUR_CHANGED; + + // ============================================================================ // Global functions/macros // ============================================================================ diff --git a/interface/wx/gbsizer.h b/interface/wx/gbsizer.h index 1fd3857d8d..ab0c2f5be2 100644 --- a/interface/wx/gbsizer.h +++ b/interface/wx/gbsizer.h @@ -187,7 +187,7 @@ public: Called when the managed size of the sizer is needed or when layout needs done. */ - void RecalcSizes(); + virtual void RepositionChildren(const wxSize& minSize); /** Set the size used for cells in the grid with no item. diff --git a/interface/wx/graphics.h b/interface/wx/graphics.h index 78932c0f98..95720f0113 100644 --- a/interface/wx/graphics.h +++ b/interface/wx/graphics.h @@ -1359,7 +1359,7 @@ public: @since 3.1.3 */ - static wxGraphicsContext* CreateContextFromUnknownDC(wxDC& dc); + wxGraphicsContext* CreateContextFromUnknownDC(wxDC& dc); /** Creates a wxGraphicsContext associated with a wxImage. diff --git a/interface/wx/popupwin.h b/interface/wx/popupwin.h index fe7c92b313..ff0e0892fa 100644 --- a/interface/wx/popupwin.h +++ b/interface/wx/popupwin.h @@ -5,6 +5,8 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// +#define wxPU_CONTAINS_CONTROLS 0x0001 + /** @class wxPopupWindow diff --git a/interface/wx/sizer.h b/interface/wx/sizer.h index c42fd3e380..90b2b5751d 100644 --- a/interface/wx/sizer.h +++ b/interface/wx/sizer.h @@ -1038,7 +1038,7 @@ public: */ void SetNegativeButton(wxButton* button); - virtual void RecalcSizes(); + virtual void RepositionChildren(const wxSize& minSize); virtual wxSize CalcMin(); }; @@ -1713,7 +1713,7 @@ public: */ const wxArrayInt& GetColWidths() const; - virtual void RecalcSizes(); + virtual void RepositionChildren(const wxSize& minSize); virtual wxSize CalcMin(); }; @@ -1840,7 +1840,7 @@ public: void SetVGap(int gap); virtual wxSize CalcMin(); - virtual void RecalcSizes(); + virtual void RepositionChildren(const wxSize& minSize); }; @@ -1903,7 +1903,7 @@ public: wxStaticBox* GetStaticBox() const; virtual wxSize CalcMin(); - virtual void RecalcSizes(); + virtual void RepositionChildren(const wxSize& minSize); }; @@ -1968,12 +1968,15 @@ public: void SetOrientation(int orient); /** - Implements the calculation of a box sizer's dimensions and then sets - the size of its children (calling wxWindow::SetSize if the child is a window). + Method which must be overridden in the derived sizer classes. - It is used internally only and must not be called by the user - (call Layout() if you want to resize). Documented for information. + The implementation should reposition the children using the current + total size available to the sizer (@c m_size) and the size computed by + the last call to CalcMin(). + + @since 3.1.3, before this version RecalcSizes() method not taking any + arguments had to be overridden in the derived classes instead. */ - virtual void RecalcSizes(); + virtual void RepositionChildren(const wxSize& minSize); }; diff --git a/interface/wx/wrapsizer.h b/interface/wx/wrapsizer.h index 302da9643f..9f32ebe6eb 100644 --- a/interface/wx/wrapsizer.h +++ b/interface/wx/wrapsizer.h @@ -59,7 +59,7 @@ public: virtual bool InformFirstDirection(int direction, int size, int availableOtherDir); - virtual void RecalcSizes(); + virtual void RepositionChildren(const wxSize& minSize); virtual wxSize CalcMin(); protected: