X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4cbc57f086cee690f397ac5622d3f1d7153b300e..e8332ccfe0cf1653b257d46d5c41339e2b2da438:/contrib/include/wx/fl/dyntbar.h diff --git a/contrib/include/wx/fl/dyntbar.h b/contrib/include/wx/fl/dyntbar.h index ea075be582..f38e0ee9bd 100644 --- a/contrib/include/wx/fl/dyntbar.h +++ b/contrib/include/wx/fl/dyntbar.h @@ -12,37 +12,40 @@ #ifndef __DYNTBAR_G__ #define __DYNTBAR_G__ -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(__APPLE__) #pragma interface "dyntbar.h" #endif #include "wx/tbarbase.h" #include "wx/dynarray.h" +#include "wx/fl/fldefs.h" /* Tool layout item. */ -class wxToolLayoutItem : public wxObject +class WXDLLIMPEXP_FL wxToolLayoutItem : public wxObject { + DECLARE_DYNAMIC_CLASS(wxToolLayoutItem) + public: wxRect mRect; bool mIsSeparator; }; -class wxDynToolInfo; +class WXDLLIMPEXP_FL wxDynToolInfo; typedef wxToolLayoutItem* wxToolLayoutItemPtrT; typedef wxDynToolInfo* wxDynToolInfoPtrT; -WX_DEFINE_ARRAY( wxToolLayoutItemPtrT, wxLayoutItemArrayT ); -WX_DEFINE_ARRAY( wxDynToolInfoPtrT, wxDynToolInfoArrayT ); +WXFL_DEFINE_ARRAY_PTR( wxToolLayoutItemPtrT, wxLayoutItemArrayT ); +WXFL_DEFINE_ARRAY_PTR( wxDynToolInfoPtrT, wxDynToolInfoArrayT ); /* This is a base class for layout algorithm implementations. */ -class LayoutManagerBase +class WXDLLIMPEXP_FL LayoutManagerBase { public: // Constructor. @@ -61,7 +64,7 @@ BagLayout lays out items in left-to-right order from top to bottom. */ -class BagLayout : public LayoutManagerBase +class WXDLLIMPEXP_FL BagLayout : public LayoutManagerBase { public: // Constructor. @@ -76,7 +79,7 @@ public: This class holds dynamic toolbar item information. */ -class wxDynToolInfo : public wxToolLayoutItem +class WXDLLIMPEXP_FL wxDynToolInfo : public wxToolLayoutItem { DECLARE_DYNAMIC_CLASS(wxDynToolInfo) @@ -96,11 +99,9 @@ public: wxDynamicToolBar manages containment and layout of tool windows. */ -class wxDynamicToolBar : public wxToolBarBase +class WXDLLIMPEXP_FL wxDynamicToolBar : public wxToolBarBase { - DECLARE_DYNAMIC_CLASS(wxDynamicToolBar) protected: - friend class wxDynamicToolBarSerializer; wxDynToolInfoArrayT mTools; @@ -147,25 +148,35 @@ public: virtual void AddTool( int toolIndex, const wxString& imageFileName, wxBitmapType imageFileType = wxBITMAP_TYPE_BMP, - const wxString& labelText = "", bool alignTextRight = FALSE, - bool isFlat = TRUE ); + const wxString& labelText = wxT(""), bool alignTextRight = false, + bool isFlat = true ); // Adds a tool. See the documentation for wxToolBar for details. virtual void AddTool( int toolIndex, wxBitmap labelBmp, - const wxString& labelText = "", bool alignTextRight = FALSE, - bool isFlat = TRUE ); + const wxString& labelText = wxT(""), bool alignTextRight = false, + bool isFlat = true ); + + // Unhide method from parent. + + virtual wxToolBarToolBase *AddTool (wxToolBarToolBase *tool) + { return wxToolBarBase::AddTool(tool); }; // Method from wxToolBarBase (for compatibility), only // the first two arguments are valid. // See the documentation for wxToolBar for details. virtual wxToolBarToolBase *AddTool(const int toolIndex, const wxBitmap& bitmap, const wxBitmap& pushedBitmap = wxNullBitmap, - const bool toggle = FALSE, const long xPos = -1, const long yPos = -1, wxObject *clientData = NULL, - const wxString& helpString1 = "", const wxString& helpString2 = ""); + const bool toggle = false, const long xPos = wxDefaultCoord, const long yPos = wxDefaultCoord, wxObject *clientData = NULL, + const wxString& helpString1 = wxT(""), const wxString& helpString2 = wxT("")); // Adds a separator. See the documentation for wxToolBar for details. - virtual void AddSeparator( wxWindow* pSepartorWnd = NULL ); + virtual void AddSeparator( wxWindow* pSepartorWnd ); + + // Unhide method from parent. + + virtual wxToolBarToolBase *AddSeparator() + { return wxToolBarBase::AddSeparator(); }; // Returns tool information for the given tool index. @@ -198,7 +209,7 @@ public: // Enables or disables the given tool. - virtual void EnableTool(const int toolIndex, const bool enable = TRUE); + virtual void EnableTool(int toolIndex, bool enable = true); // Responds to size events, calling Layout. @@ -245,18 +256,21 @@ public: // Creates a toolbar tool. virtual wxToolBarToolBase *CreateTool(int id, - const wxBitmap& bitmap1, - const wxBitmap& bitmap2, - bool toggle, + const wxString& label, + const wxBitmap& bmpNormal, + const wxBitmap& bmpDisabled, + wxItemKind kind, wxObject *clientData, - const wxString& shortHelpString, - const wxString& longHelpString); + const wxString& shortHelp, + const wxString& longHelp); // Creates a toolbar tool. virtual wxToolBarToolBase *CreateTool(wxControl *control); +private: DECLARE_EVENT_TABLE() + DECLARE_DYNAMIC_CLASS(wxDynamicToolBar) }; #endif /* __DYNTBAR_G__ */