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

  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_9FA447579EED886__
#define __JUCE_HEADER_9FA447579EED886__

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

class MainContentComponent;
//[/Headers]



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

    Describe your class and how it works here!
                                                                    //[/Comments]
*/
class PatcherPanel  : public Component,
                      public ButtonListener
{
public:
    //==============================================================================
    PatcherPanel (MainContentComponent& mainComp);
    ~PatcherPanel();

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

	///	Adds a new pair of ports to the patcher.
	void addGame(const String& gameName,
				 const String& listenPort,
				 const String& sendAddress,
				 const String& sendPort);

    //[/UserMethods]

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



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

	///	Our copy of the MainContentComponent.
	MainContentComponent& mainComponent;

    //[/UserVariables]

    //==============================================================================
    ScopedPointer<Viewport> patchViewport;
    ScopedPointer<TextButton> addListenPortButton;
    ScopedPointer<TextButton> addSendPortButton;


    //==============================================================================
    JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PatcherPanel)
};

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

#endif   // __JUCE_HEADER_9FA447579EED886__
