From 86381d4297f0225448823369a0df73ba67664078 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Sun, 11 Sep 2011 00:35:32 +0000 Subject: [PATCH] Fix missing and broken interface items for Phoenix git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69051 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- interface/wx/app.h | 4 +-- interface/wx/bookctrl.h | 23 +--------------- interface/wx/control.h | 33 +++++++++++++++++++++++ interface/wx/log.h | 2 +- interface/wx/menu.h | 2 +- interface/wx/progdlg.h | 9 +++++++ interface/wx/sizer.h | 2 ++ interface/wx/stattext.h | 5 ++++ interface/wx/window.h | 2 +- interface/wx/withimages.h | 57 +++++++++++++++++++++++++++++++++++++++ 10 files changed, 111 insertions(+), 28 deletions(-) create mode 100644 interface/wx/withimages.h diff --git a/interface/wx/app.h b/interface/wx/app.h index d5badd57d1..76b0d53845 100644 --- a/interface/wx/app.h +++ b/interface/wx/app.h @@ -828,9 +828,7 @@ public: @onlyfor{wxosx} */ - wxDEPRECATED_BUT_USED_INTERNALLY( - virtual void MacOpenFile(const wxString& fileName) - ); + virtual void MacOpenFile(const wxString& fileName); /** Called in response of a "get-url" Apple event. diff --git a/interface/wx/bookctrl.h b/interface/wx/bookctrl.h index 06092c4eaf..912f1674c2 100644 --- a/interface/wx/bookctrl.h +++ b/interface/wx/bookctrl.h @@ -27,7 +27,7 @@ @see @ref overview_bookctrl */ -class wxBookCtrlBase : public wxControl +class wxBookCtrlBase : public wxControl, public wxWithImages { public: enum @@ -71,33 +71,12 @@ public: */ //@{ - /** - Sets the image list for the page control and takes ownership of the list. - - @see wxImageList, SetImageList() - */ - void AssignImageList(wxImageList* imageList); - - /** - Returns the associated image list. - - @see wxImageList, SetImageList() - */ - wxImageList* GetImageList() const; /** Returns the image index for the given page. */ virtual int GetPageImage(size_t nPage) const = 0; - /** - Sets the image list for the page control. - It does not take ownership of the image list, you must delete it yourself. - - @see wxImageList, AssignImageList() - */ - virtual void SetImageList(wxImageList* imageList); - /** Sets the image index for the given page. @a image is an index into the image list which was set with SetImageList(). diff --git a/interface/wx/control.h b/interface/wx/control.h index 826145fb16..fe1e60e371 100644 --- a/interface/wx/control.h +++ b/interface/wx/control.h @@ -86,6 +86,39 @@ enum wxEllipsizeMode class wxControl : public wxWindow { public: + + /** + Constructs a control. + + @param parent + Pointer to a parent window. + @param id + Control identifier. If wxID_ANY, will automatically create an identifier. + @param pos + Control position. wxDefaultPosition indicates that wxWidgets + should generate a default position for the control. + @param size + Control size. wxDefaultSize indicates that wxWidgets should generate + a default size for the window. If no suitable size can be found, the + window will be sized to 20x20 pixels so that the window is visible but + obviously not correctly sized. + @param style + Control style. For generic window styles, please see wxWindow. + @param name + Control name. + */ + wxControl(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxControlNameStr); + + bool Create(wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxControlNameStr); + /** Simulates the effect of the user issuing a command to the item. diff --git a/interface/wx/log.h b/interface/wx/log.h index 26f9180ce0..10253f9a71 100644 --- a/interface/wx/log.h +++ b/interface/wx/log.h @@ -942,7 +942,7 @@ public: @since 2.9.1 */ - void LogRecord(wxLogLevel level, const wxString& msg, time_t timestamp); + void LogRecord(wxLogLevel level, const wxString& msg, const wxLogRecordInfo& info); protected: /** diff --git a/interface/wx/menu.h b/interface/wx/menu.h index ad782840e0..87922d10a8 100644 --- a/interface/wx/menu.h +++ b/interface/wx/menu.h @@ -135,7 +135,7 @@ public: context it returns a 2-element list (item, submenu). @endWxPerlOnly */ - virtual wxMenuItem* FindItem(int id, wxMenu* menu = NULL) const; + virtual wxMenuItem* FindItem(int id, wxMenu** menu = NULL) const; /** Returns the index of the menu with the given @a title or @c wxNOT_FOUND if no diff --git a/interface/wx/progdlg.h b/interface/wx/progdlg.h index 45991bb5f3..321a21cd10 100644 --- a/interface/wx/progdlg.h +++ b/interface/wx/progdlg.h @@ -6,6 +6,15 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// +#define wxPD_CAN_ABORT 0x0001 +#define wxPD_APP_MODAL 0x0002 +#define wxPD_AUTO_HIDE 0x0004 +#define wxPD_ELAPSED_TIME 0x0008 +#define wxPD_ESTIMATED_TIME 0x0010 +#define wxPD_SMOOTH 0x0020 +#define wxPD_REMAINING_TIME 0x0040 +#define wxPD_CAN_SKIP 0x0080 + /** @class wxProgressDialog diff --git a/interface/wx/sizer.h b/interface/wx/sizer.h index d923962860..055429d596 100644 --- a/interface/wx/sizer.h +++ b/interface/wx/sizer.h @@ -1225,6 +1225,8 @@ public: */ void SetSpacer(const wxSize& size); + void SetUserData(wxObject* userData); + /** Set the window to be tracked by this item. @deprecated @todo provide deprecation description diff --git a/interface/wx/stattext.h b/interface/wx/stattext.h index 0f9b5cad50..08fddf0b15 100644 --- a/interface/wx/stattext.h +++ b/interface/wx/stattext.h @@ -6,6 +6,11 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// +#define wxST_NO_AUTORESIZE 0x0001 +#define wxST_ELLIPSIZE_START 0x0004 +#define wxST_ELLIPSIZE_MIDDLE 0x0008 +#define wxST_ELLIPSIZE_END 0x0010 + /** @class wxStaticText diff --git a/interface/wx/window.h b/interface/wx/window.h index 2bc1c680b7..192ce514f6 100644 --- a/interface/wx/window.h +++ b/interface/wx/window.h @@ -2410,7 +2410,7 @@ public: @see GetToolTip(), wxToolTip */ - void SetToolTip(const wxString& tip); + void SetToolTip(const wxString& tipString); /** @overload diff --git a/interface/wx/withimages.h b/interface/wx/withimages.h new file mode 100644 index 0000000000..634cecfb51 --- /dev/null +++ b/interface/wx/withimages.h @@ -0,0 +1,57 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: withimages.h +// Purpose: Interface of wxWithImages class. +// RCS-ID: $Id:$ +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +/** + A mixin class to be used with other classes that use a wxImageList. +*/ +class wxWithImages +{ +public: + enum + { + NO_IMAGE = -1 + }; + + wxWithImages(); + virtual ~wxWithImages(); + + /** + Sets the image list for the page control and takes ownership of the list. + + @see wxImageList, SetImageList() + */ + void AssignImageList(wxImageList* imageList); + + /** + Sets the image list to use. It does not take ownership of the image + list, you must delete it yourself. + + @see wxImageList, AssignImageList() + */ + virtual void SetImageList(wxImageList* imageList); + + /** + Returns the associated image list, may be NULL. + + @see wxImageList, SetImageList() + */ + wxImageList* GetImageList() const; + +protected: + /** + Return true if we have a valid image list. + */ + bool HasImageList() const; + + /** + Return the image with the given index from the image list. + + If there is no image list or if index == NO_IMAGE, silently returns + wxNullIcon. + */ + wxIcon GetImage(int iconIndex) const; +}; -- 2.47.2