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

  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_686A291F6327C9C4__
#define __JUCE_HEADER_686A291F6327C9C4__

//[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 SendPortComponent  : public Component,
                           public ChangeBroadcaster,
                           public LabelListener
{
public:
    //==============================================================================
    SendPortComponent (const String& game, const String& address, const String& port);
    ~SendPortComponent();

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

	///	Used to remove a connection.
	void mouseDown(const MouseEvent& event);
	///	Used to finish removing a connection.
	void mouseUp(const MouseEvent& event);
	///	Used so the connection can be drawn while it's being dragged.
	void mouseDrag(const MouseEvent& event);

	///	Returns the component's address.
	const String getAddress() const {return addressLabel->getText();};
	///	Returns the component's port.
	const String getPort() const {return portLabel->getText();};

    //[/UserMethods]

    void paint (Graphics& g);
    void resized();
    void labelTextChanged (Label* labelThatHasChanged);



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

    //==============================================================================
    ScopedPointer<Label> gameLabel;
    ScopedPointer<Label> addressLabel;
    ScopedPointer<Label> portLabel;


    //==============================================================================
    JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (SendPortComponent)
};

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

#endif   // __JUCE_HEADER_686A291F6327C9C4__
