/*
  ==============================================================================

  This is an automatically generated GUI class created by the Introjucer!

  Be careful when adding custom code to these files, as only the code within
  the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
  and re-saved.

  Created with Introjucer version: 3.1.0

  ------------------------------------------------------------------------------

  The Introjucer is part of the JUCE library - "Jules' Utility Class Extensions"
  Copyright 2004-13 by Raw Material Software Ltd.

  ==============================================================================
*/

#ifndef __JUCE_HEADER_E98564C56110E94E__
#define __JUCE_HEADER_E98564C56110E94E__

//[Headers]     -- You can add your own extra header files here --
#include "JuceHeader.h"
//[/Headers]



//==============================================================================
/**
                                                                    //[Comments]
    An auto-generated component, created by the Introjucer.

    Describe your class and how it works here!
                                                                    //[/Comments]
*/
class EXCOSCSettingsComponent  : public Component,
                                 public ChangeBroadcaster,
                                 public TextEditor::Listener,
                                 public ButtonListener
{
public:
    //==============================================================================
    EXCOSCSettingsComponent ();
    ~EXCOSCSettingsComponent();

    //==============================================================================
    //[UserMethods]     -- You can add your own custom methods in this section.

	///	So we can send a change message when the user edits the text editor.
	void textEditorTextChanged(TextEditor& editor);

	///	Sets the listenPortEditor text.
	void setListenPort(const String& port);
	///	Sets the sendAddressEditor text.
	void setSendAddress(const String& address);
	///	Sets the sendPortEditor text.
	void setSendPort(const String& port);
	///	Toggles the addToPatcherButton.
	void setAddPortsToPatcher(bool val);

    /// Returns the listenPortEditor text.
    const String getListenPort() const {return listenPortEditor->getText();};
    /// Returns the sendAddressEditor text.
    const String getSendAddress() const {return sendAddressEditor->getText();};
    /// Returns the sendPortEditor text.
    const String getSendPort() const {return sendPortEditor->getText();};
	///	Returns whether or not the ports should be added to the patcher.
	bool getAddPortsToPatcher() const {return addToPatcherButton->getToggleState();};

    //[/UserMethods]

    void paint (Graphics& g);
    void resized();
    void buttonClicked (Button* buttonThatWasClicked);



private:
    //[UserVariables]   -- You can add your own custom variables in this section.
    //[/UserVariables]

    //==============================================================================
    ScopedPointer<Label> listenPortLabel;
    ScopedPointer<TextEditor> listenPortEditor;
    ScopedPointer<Label> sendAddressLabel;
    ScopedPointer<TextEditor> sendAddressEditor;
    ScopedPointer<Label> sendPortLabel;
    ScopedPointer<TextEditor> sendPortEditor;
    ScopedPointer<ToggleButton> addToPatcherButton;


    //==============================================================================
    JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (EXCOSCSettingsComponent)
};

//[EndFile] You can add extra defines here...
//[/EndFile]

#endif   // __JUCE_HEADER_E98564C56110E94E__
