X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4cbc57f086cee690f397ac5622d3f1d7153b300e..d66c3960d541cf9e3ba10519a49a9e34b4ddfc81:/contrib/src/fl/barhintspl.cpp diff --git a/contrib/src/fl/barhintspl.cpp b/contrib/src/fl/barhintspl.cpp index eb1f671685..8cc2b570c5 100644 --- a/contrib/src/fl/barhintspl.cpp +++ b/contrib/src/fl/barhintspl.cpp @@ -121,16 +121,16 @@ void cbBarHintsPlugin::CreateBoxes() } -void cbBarHintsPlugin::Draw3DBox( wxDC& dc, const wxPoint& pos, bool pressed ) +void cbBarHintsPlugin::Draw3DBox( wxDC& WXUNUSED(dc), const wxPoint& WXUNUSED(pos), bool WXUNUSED(pressed) ) { } -void cbBarHintsPlugin::DrawCloseBox( wxDC& dc, const wxPoint& pos, bool pressed ) +void cbBarHintsPlugin::DrawCloseBox( wxDC& WXUNUSED(dc), const wxPoint& WXUNUSED(pos), bool WXUNUSED(pressed) ) { } -void cbBarHintsPlugin::DrawCollapseBox( wxDC& dc, const wxPoint& pos, - bool atLeft, bool disabled, bool pressed ) +void cbBarHintsPlugin::DrawCollapseBox( wxDC& WXUNUSED(dc), const wxPoint& WXUNUSED(pos), + bool WXUNUSED(atLeft), bool WXUNUSED(disabled), bool WXUNUSED(pressed) ) { } @@ -200,7 +200,7 @@ void cbBarHintsPlugin::ExcludeHints( wxRect& rect, cbBarInfo& info ) } void cbBarHintsPlugin::DoDrawHint( wxDC& dc, wxRect& rect, - int pos, int boxOfs, int grooveOfs, + int pos, int WXUNUSED(boxOfs), int grooveOfs, bool isFixed ) { if ( !isFixed ) @@ -467,6 +467,11 @@ void cbBarHintsPlugin::OnLeftDown( cbLeftDownEvent& event ) { int i; for ( i = 0; i != BOXES_IN_HINT; ++i ) + { + mBoxes[i]->mPressed = FALSE; + mBoxes[i]->mWasClicked = FALSE; + } + for ( i = 0; i != BOXES_IN_HINT; ++i ) { mBoxes[i]->OnLeftDown( inFrame ); @@ -495,7 +500,7 @@ void cbBarHintsPlugin::OnLeftUp( cbLeftUpEvent& event ) GetHintsLayout( mpClickedBar->mBoundsInParent, *mpClickedBar, boxOfs, grooveOfs, pos ); - int result = HitTestHints( *mpClickedBar, event.mPos ); + HitTestHints( *mpClickedBar, event.mPos ); int i; for ( i = 0; i != BOXES_IN_HINT; ++i ) @@ -507,6 +512,9 @@ void cbBarHintsPlugin::OnLeftUp( cbLeftUpEvent& event ) if ( i == 0 ) { mpLayout->SetBarState( mpClickedBar, wxCBAR_HIDDEN, TRUE ); + // Notify bar child window of close event: + if(mpClickedBar->mpBarWnd!=NULL) + mpClickedBar->mpBarWnd->Close(); } else {