bool wxToolBarToolBase::Toggle(bool toggle) { wxASSERT_MSG( CanBeToggled(), wxT("can't toggle this tool") ); if ( m_toggled == toggle ) return false; m_toggled = toggle; return true; }
// is this tool pressed, even temporarily? (this is different from being // permanently toggled which is what IsToggled() returns) bool IsPressed() const { return CanBeToggled() ? IsToggled() != m_isInverted : m_isInverted; }