Пример #1
0
void Button::sendClickMessage (const ModifierKeys& modifiers)
{
    Component::BailOutChecker checker (this);

    if (commandManagerToUse != nullptr && commandID != 0)
    {
        ApplicationCommandTarget::InvocationInfo info (commandID);
        info.invocationMethod = ApplicationCommandTarget::InvocationInfo::fromButton;
        info.originatingComponent = this;

        commandManagerToUse->invoke (info, true);
    }

    clicked (modifiers);

    if (checker.shouldBailOut())
        return;

    buttonListeners.callChecked (checker, [this] (Listener& l) { l.buttonClicked (this); });

    if (checker.shouldBailOut())
        return;

    if (onClick != nullptr)
        onClick();
}
Пример #2
0
void Button::sendStateMessage()
{
    Component::BailOutChecker checker (this);

    buttonStateChanged();

    if (checker.shouldBailOut())
        return;

    buttonListeners.callChecked (checker, [this] (Listener& l) { l.buttonStateChanged (this); });

    if (checker.shouldBailOut())
        return;

    if (onStateChange != nullptr)
        onStateChange();
}
Пример #3
0
void Button::sendStateMessage()
{
    Component::BailOutChecker checker (this);

    buttonStateChanged();

    if (! checker.shouldBailOut())
        buttonListeners.callChecked (checker, &ButtonListener::buttonStateChanged, this);
}
//==============================================================================
void BasicFileBrowser::sendListenerChangeMessage()
{
    Component::BailOutChecker checker (this);
    
    // You shouldn't delete the browser when the file gets changed!
    jassert (! checker.shouldBailOut());
    
    listeners.callChecked (checker, &FileBrowserListener::selectionChanged);
}
//==============================================================================
void FileBrowserComponent::sendListenerChangeMessage()
{
    Component::BailOutChecker checker (this);

    if (previewComp != nullptr)
        previewComp->selectedFileChanged (getSelectedFile (0));

    // You shouldn't delete the browser when the file gets changed!
    jassert (! checker.shouldBailOut());

    listeners.callChecked (checker, &FileBrowserListener::selectionChanged);
}
void OscOutputManagerComponent::oscOutputRemoved(OscOutputComponent *o)
{
	//this gets called when the remove button is pressed on the component passed in
	String hostnameToRemove = o->getHostname();
	
	//let the maincomponent know
	Component::BailOutChecker checker ( this );
	if (!checker.shouldBailOut() )
		listeners.callChecked( checker, &OscOutputManagerComponent::Listener::oscOutputRemoved, hostnameToRemove, 7000 );
	
	//remove it from the list
	hostnameList.removeString( hostnameToRemove);
			
	//update the box
	hostnameListBox.updateContent();
}
Пример #7
0
void Button::sendClickMessage (const ModifierKeys& modifiers)
{
    Component::BailOutChecker checker (this);

    if (commandManagerToUse != nullptr && commandID != 0)
    {
        ApplicationCommandTarget::InvocationInfo info (commandID);
        info.invocationMethod = ApplicationCommandTarget::InvocationInfo::fromButton;
        info.originatingComponent = this;

        commandManagerToUse->invoke (info, true);
    }

    clicked (modifiers);

    if (! checker.shouldBailOut())
        buttonListeners.callChecked (checker, &ButtonListener::buttonClicked, this);  // (can't use Button::Listener due to idiotic VC2005 bug)
}
void OscOutputManagerComponent::oscOutputAdded(juce::String newHostname)
{
	//this gets called to add a oscoutput to the list
	
	//only add it if it's a validly formatted ipaddress or .local
	if ( IPAddress ( newHostname).toString() == newHostname || newHostname.endsWith( ".local") )
	{
		
		if ( !hostnameList.contains( newHostname) )
		{
			//let the mainComponent know to create a new OscSender
			Component::BailOutChecker checker ( this );
			if (!checker.shouldBailOut() )
				listeners.callChecked( checker, &OscOutputManagerComponent::Listener::oscOutputAdded, newHostname, 7000 );
			
			//we only need to add the ip to the list,
			//the listbox takes care of creating and destroying the components
			hostnameList.add( newHostname);
			hostnameListBox.updateContent();
		}
	}
}