X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ba09d3bb3bfbc9a0c2dfb72e667cb63fd7bce4d6..196be0f13767693bb514cdff5b3020fee9ca1676:/contrib/src/fl/dyntbar.cpp?ds=inline diff --git a/contrib/src/fl/dyntbar.cpp b/contrib/src/fl/dyntbar.cpp index 194271339e..8e9697b75b 100644 --- a/contrib/src/fl/dyntbar.cpp +++ b/contrib/src/fl/dyntbar.cpp @@ -29,9 +29,9 @@ #include "wx/fl/dyntbar.h" #include "wx/fl/newbmpbtn.h" -IMPLEMENT_DYNAMIC_CLASS(wxDynamicToolBar, wxControl ) +IMPLEMENT_DYNAMIC_CLASS( wxDynamicToolBar, wxObject ) -BEGIN_EVENT_TABLE( wxDynamicToolBar, wxControl ) +BEGIN_EVENT_TABLE( wxDynamicToolBar, wxToolBarBase ) EVT_SIZE ( wxDynamicToolBar::OnSize ) EVT_PAINT( wxDynamicToolBar::OnPaint ) @@ -39,6 +39,11 @@ BEGIN_EVENT_TABLE( wxDynamicToolBar, wxControl ) END_EVENT_TABLE() +/***** Implementation for class wxToolLayoutItem *****/ + +IMPLEMENT_DYNAMIC_CLASS(wxToolLayoutItem, wxObject) + + /***** Implementation for class wxDynToolInfo *****/ IMPLEMENT_DYNAMIC_CLASS(wxDynToolInfo, wxToolLayoutItem) @@ -71,7 +76,7 @@ bool wxDynamicToolBar::Create(wxWindow *parent, const wxWindowID id, const wxPoint& pos, const wxSize& size, const long style, - const int orientation, const int RowsOrColumns, + const int WXUNUSED(orientation), const int WXUNUSED(RowsOrColumns), const wxString& name) { // cut&pasted from wxtbatsmpl.h @@ -104,7 +109,7 @@ wxDynamicToolBar::~wxDynamicToolBar(void) void wxDynamicToolBar::AddTool( int toolIndex, wxWindow* pToolWindow, - const wxSize& size + const wxSize& WXUNUSED(size) ) { wxDynToolInfo* pInfo = new wxDynToolInfo(); @@ -169,10 +174,10 @@ void wxDynamicToolBar::AddTool( int toolIndex, wxBitmap labelBmp, wxToolBarToolBase* wxDynamicToolBar::AddTool(const int toolIndex, const wxBitmap& bitmap, - const wxBitmap& pushedBitmap, - const bool toggle, const long xPos, - const long yPos, wxObject *clientData, - const wxString& helpString1, const wxString& helpString2) + const wxBitmap& WXUNUSED(pushedBitmap), + const bool WXUNUSED(toggle), const long WXUNUSED(xPos), + const long WXUNUSED(yPos), wxObject *WXUNUSED(clientData), + const wxString& helpString1, const wxString& WXUNUSED(helpString2)) { wxNewBitmapButton* pBmpBtn = new wxNewBitmapButton( bitmap ); @@ -180,6 +185,10 @@ wxToolBarToolBase* pBmpBtn->Reshape(); +#if wxUSE_TOOLTIPS + pBmpBtn->SetToolTip( helpString1 ); +#endif // wxUSE_TOOLTIPS + AddTool( toolIndex, pBmpBtn ); return NULL; @@ -260,12 +269,12 @@ void wxDynamicToolBar::AddSeparator( wxWindow* pSepartorWnd ) mTools.Add( pInfo ); } -void wxDynamicToolBar::OnEraseBackground( wxEraseEvent& event ) +void wxDynamicToolBar::OnEraseBackground( wxEraseEvent& WXUNUSED(event) ) { // FOR NOW:: nothing } -void wxDynamicToolBar::OnSize( wxSizeEvent& event ) +void wxDynamicToolBar::OnSize( wxSizeEvent& WXUNUSED(event) ) { //SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DFACE ) ); @@ -301,7 +310,7 @@ void wxDynamicToolBar::DrawSeparator( wxDynToolInfo& info, wxDC& dc ) } } -void wxDynamicToolBar::OnPaint( wxPaintEvent& event ) +void wxDynamicToolBar::OnPaint( wxPaintEvent& WXUNUSED(event) ) { // draw separators if any wxPaintDC dc(this); @@ -483,7 +492,7 @@ void wxDynamicToolBar::SetLayout( LayoutManagerBase* pLayout ) Layout(); } -void wxDynamicToolBar::EnableTool(const int toolIndex, const bool enable ) +void wxDynamicToolBar::EnableTool(int toolIndex, bool enable ) { wxDynToolInfo* pInfo = GetToolInfo( toolIndex ); @@ -560,39 +569,47 @@ void BagLayout::Layout( const wxSize& parentDim, //////// stuff from 2.1.15 /////////// -wxToolBarToolBase* wxDynamicToolBar::FindToolForPosition( wxCoord x, wxCoord y ) const +wxToolBarToolBase* wxDynamicToolBar::FindToolForPosition( wxCoord WXUNUSED(x), wxCoord WXUNUSED(y) ) const { return NULL; } -bool wxDynamicToolBar::DoInsertTool( size_t pos, wxToolBarToolBase* tool ) +bool wxDynamicToolBar::DoInsertTool( size_t WXUNUSED(pos), wxToolBarToolBase* WXUNUSED(tool) ) { return TRUE; } -bool wxDynamicToolBar::DoDeleteTool( size_t pos, wxToolBarToolBase* tool ) +bool wxDynamicToolBar::DoDeleteTool( size_t WXUNUSED(pos), wxToolBarToolBase* WXUNUSED(tool) ) { return TRUE; } -void wxDynamicToolBar::DoEnableTool( wxToolBarToolBase* tool, bool enable ) +void wxDynamicToolBar::DoEnableTool( wxToolBarToolBase* WXUNUSED(tool), bool WXUNUSED(enable) ) { } -void wxDynamicToolBar::DoToggleTool( wxToolBarToolBase* tool, bool toggle ) +void wxDynamicToolBar::DoToggleTool( wxToolBarToolBase* WXUNUSED(tool), bool WXUNUSED(toggle) ) { } -void wxDynamicToolBar::DoSetToggle( wxToolBarToolBase* tool, bool toggle ) +void wxDynamicToolBar::DoSetToggle( wxToolBarToolBase* WXUNUSED(tool), bool WXUNUSED(toggle) ) { } -wxToolBarToolBase* wxDynamicToolBar::CreateTool( int id, const wxBitmap& bitmap1, const wxBitmap& bitmap2, bool toggle, wxObject* clientData, const wxString& shortHelpString, const wxString& longHelpString ) +wxToolBarToolBase* wxDynamicToolBar::CreateTool( int WXUNUSED(id), + const wxString& WXUNUSED(label), + const wxBitmap& WXUNUSED(bmpNormal), + const wxBitmap& WXUNUSED(bmpDisabled), + wxItemKind WXUNUSED(kind), + wxObject *WXUNUSED(clientData), + const wxString& WXUNUSED(shortHelp), + const wxString& WXUNUSED(longHelp) + ) { return NULL; } -wxToolBarToolBase* wxDynamicToolBar::CreateTool( wxControl* control ) +wxToolBarToolBase* wxDynamicToolBar::CreateTool( wxControl* WXUNUSED(control) ) { return NULL; }