2012-06-15 17:45:27 -05:00
|
|
|
/*
|
|
|
|
|
==============================================================================
|
|
|
|
|
|
2014-07-10 14:24:30 -05:00
|
|
|
This file is part of the JUCE library.
|
2015-09-02 18:09:07 -05:00
|
|
|
Copyright (c) 2015 - ROLI Ltd.
|
2012-06-15 17:45:27 -05:00
|
|
|
|
2014-07-10 14:24:30 -05:00
|
|
|
Permission is granted to use this software under the terms of either:
|
|
|
|
|
a) the GPL v2 (or any later version)
|
|
|
|
|
b) the Affero GPL v3
|
2012-06-15 17:45:27 -05:00
|
|
|
|
2014-07-10 14:24:30 -05:00
|
|
|
Details of these licenses can be found at: www.gnu.org/licenses
|
2012-06-15 17:45:27 -05:00
|
|
|
|
|
|
|
|
JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
|
|
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
|
|
|
|
2014-07-10 14:24:30 -05:00
|
|
|
------------------------------------------------------------------------------
|
2012-06-15 17:45:27 -05:00
|
|
|
|
|
|
|
|
To release a closed-source product which uses JUCE, commercial licenses are
|
2014-07-10 14:24:30 -05:00
|
|
|
available: visit www.juce.com for more information.
|
2012-06-15 17:45:27 -05:00
|
|
|
|
|
|
|
|
==============================================================================
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
ButtonPropertyComponent::ButtonPropertyComponent (const String& name,
|
|
|
|
|
const bool triggerOnMouseDown)
|
|
|
|
|
: PropertyComponent (name)
|
|
|
|
|
{
|
2014-07-10 14:24:30 -05:00
|
|
|
addAndMakeVisible (button);
|
2012-06-15 17:45:27 -05:00
|
|
|
button.setTriggeredOnMouseDown (triggerOnMouseDown);
|
|
|
|
|
button.addListener (this);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ButtonPropertyComponent::~ButtonPropertyComponent()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void ButtonPropertyComponent::refresh()
|
|
|
|
|
{
|
|
|
|
|
button.setButtonText (getButtonText());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void ButtonPropertyComponent::buttonClicked (Button*)
|
|
|
|
|
{
|
|
|
|
|
buttonClicked();
|
|
|
|
|
}
|