/////////////////////////////////////////////////////////////////////////////
// Name:        PawnOutput.cpp
// Purpose:     
// Author:      Vince Harron
// Modified by: 
// Created:     10/12/05 10:41:27
// RCS-ID:      
// Copyright:   2005 Sony Online Entertainment
// Licence:     
/////////////////////////////////////////////////////////////////////////////

// Generated by DialogBlocks (unregistered), 10/12/05 10:41:27

#if defined(__GNUG__) && !defined(__APPLE__)
#pragma implementation "PawnOutput.h"
#endif

// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"

#ifdef __BORLANDC__
#pragma hdrstop
#endif

#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif

////@begin includes
////@end includes

#include "PawnOutput.h"

////@begin XPM images
////@end XPM images

/*!
 * PawnOutput type definition
 */

IMPLEMENT_DYNAMIC_CLASS( PawnOutput, wxDialog )

/*!
 * PawnOutput event table definition
 */

BEGIN_EVENT_TABLE( PawnOutput, wxDialog )

////@begin PawnOutput event table entries
    EVT_CLOSE( PawnOutput::OnCloseWindow )

////@end PawnOutput event table entries

END_EVENT_TABLE()

/*!
 * PawnOutput constructors
 */

PawnOutput::PawnOutput( )
{
}

PawnOutput::PawnOutput( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{
    Create(parent, id, caption, pos, size, style);
}

/*!
 * PawnDebug creator
 */

bool PawnOutput::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{
////@begin PawnOutput member initialisation
    mpOutput = NULL;
////@end PawnOutput member initialisation

////@begin PawnOutput creation
    wxDialog::Create( parent, id, caption, pos, size, style );

    CreateControls();
////@end PawnOutput creation
    return true;
}

/*!
 * Control creation for PawnDebug
 */

void PawnOutput::CreateControls()
{    
////@begin PawnOutput content construction
    // Generated by DialogBlocks, 10/12/05 11:48:35 (unregistered)

    PawnOutput* itemDialog1 = this;

    wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
    itemDialog1->SetSizer(itemBoxSizer2);

    mpOutput = new wxTextCtrl( itemDialog1, ID_OUTPUT, _T(""), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
    itemBoxSizer2->Add(mpOutput, 1, wxGROW|wxALL, 5);

////@end PawnOutput content construction
}

/*!
 * wxEVT_CLOSE_WINDOW event handler for ID_DIALOG
 */

void PawnOutput::OnCloseWindow( wxCloseEvent& event )
{
////@begin wxEVT_CLOSE_WINDOW event handler for ID_DIALOG in PawnDebug.
    // Before editing this code, remove the block markers.
    event.Skip();
////@end wxEVT_CLOSE_WINDOW event handler for ID_DIALOG in PawnDebug. 
}

/*!
 * Should we show tooltips?
 */

bool PawnOutput::ShowToolTips()
{
    return true;
}

/*!
 * Get bitmap resources
 */

wxBitmap PawnOutput::GetBitmapResource( const wxString& name )
{
    // Bitmap retrieval
////@begin PawnOutput bitmap retrieval
    wxUnusedVar(name);
    return wxNullBitmap;
////@end PawnOutput bitmap retrieval
}

/*!
 * Get icon resources
 */

wxIcon PawnOutput::GetIconResource( const wxString& name )
{
    // Icon retrieval
////@begin PawnOutput icon retrieval
    wxUnusedVar(name);
    return wxNullIcon;
////@end PawnOutput icon retrieval
}


void PawnOutput::Output(const wxString &output)
{
  wxString out= mpOutput->GetValue();
  out.Append(output);
  mpOutput->SetValue(out);
}
