From e4f1d811cc5b15a148ae7331c033d1749940cac0 Mon Sep 17 00:00:00 2001 From: Francesco Montorsi Date: Mon, 24 Mar 2008 18:17:11 +0000 Subject: [PATCH] further prototype revisions; rename interface/aui.h to interface/framemanager.h since wxAuiManager and wxAuiPaneInfo are declared in the latter (in the real headers) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52768 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- interface/aboutdlg.h | 8 +-- interface/animate.h | 32 +++++------ interface/artprov.h | 72 +++++++++++++------------ interface/aui/dockart.h | 19 ++----- interface/aui/{aui.h => framemanager.h} | 0 5 files changed, 61 insertions(+), 70 deletions(-) rename interface/aui/{aui.h => framemanager.h} (100%) diff --git a/interface/aboutdlg.h b/interface/aboutdlg.h index bf7087527d..1688a5a45c 100644 --- a/interface/aboutdlg.h +++ b/interface/aboutdlg.h @@ -196,9 +196,9 @@ public: } @endcode - Please see the @ref page_utils_samples_dialogs for more examples of - using this function and wxAboutDialogInfo for the description of the - information which can be shown in the about dialog. + Please see the @ref page_samples_dialogs for more examples of using this + function and wxAboutDialogInfo for the description of the information which + can be shown in the about dialog. @header{wx/aboutdlg.h} */ @@ -212,7 +212,7 @@ void wxAboutBox(const wxAboutDialogInfo& info); custom controls to it (customizing the native dialog is not currently supported). - See the @ref page_utils_samples_dialogs for an example of about dialog + See the @ref page_samples_dialogs for an example of about dialog customization. @see wxAboutDialogInfo diff --git a/interface/animate.h b/interface/animate.h index 6352f63c6f..861625aec3 100644 --- a/interface/animate.h +++ b/interface/animate.h @@ -103,7 +103,7 @@ public: /** Returns the animation associated with this control. */ - wxAnimation GetAnimation() const; + virtual wxAnimation GetAnimation() const; /** Returns the inactive bitmap shown in this control when the; @@ -114,14 +114,14 @@ public: /** Returns @true if the animation is being played. */ - bool IsPlaying() const; + virtual bool IsPlaying() const; /** Loads the animation from the given file and calls SetAnimation(). See wxAnimation::LoadFile for more info. */ - bool LoadFile(const wxString& file, - wxAnimationType animType = wxANIMATION_TYPE_ANY); + virtual bool LoadFile(const wxString& file, + wxAnimationType animType = wxANIMATION_TYPE_ANY); /** Starts playing the animation. @@ -130,7 +130,7 @@ public: animation has an infinite delay time) and always start from the first frame even if you @ref Stop "stopped" it while some other frame was displayed. */ - bool Play(); + virtual bool Play(); /** Sets the animation to play in this control. @@ -140,7 +140,7 @@ public: animation or the background colour will be shown (see SetInactiveBitmap() for more info). */ - void SetAnimation(const wxAnimation& anim); + virtual void SetAnimation(const wxAnimation& anim); /** Sets the bitmap to show on the control when it's not playing an animation. @@ -163,7 +163,7 @@ public: The control will show the first frame of the animation, a custom static image or the window's background colour as specified by the last SetInactiveBitmap() call. */ - void Stop(); + virtual void Stop(); }; @@ -213,27 +213,27 @@ public: Returns the delay for the i-th frame in milliseconds. If @c -1 is returned the frame is to be displayed forever. */ - int GetDelay(unsigned int i) const; + virtual int GetDelay(unsigned int i) const; /** Returns the i-th frame as a wxImage. */ - wxImage GetFrame(unsigned int i) const; + virtual wxImage GetFrame(unsigned int i) const; /** Returns the number of frames for this animation. */ - unsigned int GetFrameCount() const; + virtual unsigned int GetFrameCount() const; /** Returns the size of the animation. */ - wxSize GetSize() const; + virtual wxSize GetSize() const; /** Returns @true if animation data is present. */ - bool IsOk() const; + virtual bool IsOk() const; /** Loads an animation from the given stream. @@ -248,8 +248,8 @@ public: @returns @true if the operation succeeded, @false otherwise. */ - bool Load(wxInputStream& stream, - wxAnimationType type = wxANIMATION_TYPE_ANY); + virtual bool Load(wxInputStream& stream, + wxAnimationType type = wxANIMATION_TYPE_ANY); /** Loads an animation from a file. @@ -262,8 +262,8 @@ public: @returns @true if the operation succeeded, @false otherwise. */ - bool LoadFile(const wxString& name, - wxAnimationType type = wxANIMATION_TYPE_ANY); + virtual bool LoadFile(const wxString& name, + wxAnimationType type = wxANIMATION_TYPE_ANY); /** Assignment operator, using @ref overview_refcount "reference counting". diff --git a/interface/artprov.h b/interface/artprov.h index eb96e27c7b..a54889c17d 100644 --- a/interface/artprov.h +++ b/interface/artprov.h @@ -55,7 +55,7 @@ Every bitmap and icon bundle are known to wxArtProvider under an unique ID that is used when requesting a resource from it. The ID is represented by wxArtID type and can have one of these predefined values (you can see bitmaps represented by these - constants in the @ref page_utils_samples_artprovider): + constants in the @ref page_samples_artprovider):
@@ -152,7 +152,7 @@ @library{wxcore} @category{misc,data} - @see the @ref page_utils_samples_artprovider for an example of wxArtProvider usage. + @see the @ref page_samples_artprovider for an example of wxArtProvider usage. */ class wxArtProvider : public wxObject { @@ -163,39 +163,6 @@ public: */ virtual ~wxArtProvider(); - /** - Derived art provider classes must override this method to create requested art - resource. Note that returned bitmaps are cached by wxArtProvider and it is - therefore not necessary to optimize CreateBitmap() for speed (e.g. you may - create wxBitmap objects from XPMs here). - - @param id - wxArtID unique identifier of the bitmap. - @param client - wxArtClient identifier of the client (i.e. who is asking for the bitmap). - This only servers as a hint. - @param size - Preferred size of the bitmap. The function may return a bitmap of different - dimensions, it will be automatically rescaled to meet client's request. - - @note - This is not part of wxArtProvider's public API, use wxArtProvider::GetBitmap - or wxArtProvider::GetIconBundle or wxArtProvider::GetIcon to query wxArtProvider - for a resource. - - @see CreateIconBundle() - */ - virtual wxBitmap CreateBitmap(const wxArtID& id, - const wxArtClient& client, - const wxSize& size); - - /** - This method is similar to CreateBitmap() but can be used when a bitmap - (or an icon) exists in several sizes. - */ - wxIconBundle CreateIconBundle(const wxArtID& id, - const wxArtClient& client); - /** Delete the given @a provider. */ @@ -277,5 +244,40 @@ public: deleted, unlike when using Delete(). */ static bool Remove(wxArtProvider* provider); + +protected: + + /** + Derived art provider classes must override this method to create requested art + resource. Note that returned bitmaps are cached by wxArtProvider and it is + therefore not necessary to optimize CreateBitmap() for speed (e.g. you may + create wxBitmap objects from XPMs here). + + @param id + wxArtID unique identifier of the bitmap. + @param client + wxArtClient identifier of the client (i.e. who is asking for the bitmap). + This only servers as a hint. + @param size + Preferred size of the bitmap. The function may return a bitmap of different + dimensions, it will be automatically rescaled to meet client's request. + + @note + This is not part of wxArtProvider's public API, use wxArtProvider::GetBitmap + or wxArtProvider::GetIconBundle or wxArtProvider::GetIcon to query wxArtProvider + for a resource. + + @see CreateIconBundle() + */ + virtual wxBitmap CreateBitmap(const wxArtID& id, + const wxArtClient& client, + const wxSize& size); + + /** + This method is similar to CreateBitmap() but can be used when a bitmap + (or an icon) exists in several sizes. + */ + virtual wxIconBundle CreateIconBundle(const wxArtID& id, + const wxArtClient& client); }; diff --git a/interface/aui/dockart.h b/interface/aui/dockart.h index 5b7b33e90f..6d9918a696 100644 --- a/interface/aui/dockart.h +++ b/interface/aui/dockart.h @@ -81,7 +81,7 @@ enum wxAuiButtonId wxAuiDockArt is the art provider: provides all drawing functionality to the wxAui dock manager. This allows the dock manager to have a plugable look-and-feel. - By default, a wxAuiManager uses an instance of this class called + By default, a wxAuiManager uses an instance of this class called wxAuiDefaultDockArt which provides bitmap art and a colour scheme that is adapted to the major platforms' look. You can either derive from that class to alter its behaviour or write a completely new dock art class. @@ -103,7 +103,7 @@ public: /** Destructor. */ - ~wxAuiDockArt(); + virtual ~wxAuiDockArt(); /** Draws a background. @@ -151,17 +151,11 @@ public: virtual void DrawSash(wxDC& dc, wxWindow* window, int orientation, const wxRect& rect); - - /** - The same as GetColour(). - */ - virtual wxColour GetColor(int id); - /** Get the colour of a certain setting. @a id can be one of the colour values of @b wxAuiPaneDockArtSetting. */ - virtual wxColour GetColour(int id); + virtual wxColour GetColour(int id) = 0; /** Get a font setting. @@ -174,16 +168,11 @@ public: */ virtual int GetMetric(int id); - /** - The same as SetColour(). - */ - virtual void SetColor(int id, const wxColour& color); - /** Set a certain setting with the value @e colour. @a id can be one of the colour values of @b wxAuiPaneDockArtSetting. */ - virtual void SetColour(int id, const wxColor& colour); + virtual void SetColour(int id, const wxColor& colour) = 0; /** Set a font setting. diff --git a/interface/aui/aui.h b/interface/aui/framemanager.h similarity index 100% rename from interface/aui/aui.h rename to interface/aui/framemanager.h -- 2.50.0