/////////////////////////////////////////////////////////////////////////////
// Name:        logdlg.cpp
// Purpose:     wxPackageLogDlg
// Author:      Francesco Montorsi
// Modified by: 
// Created:     18/07/2006 23:08:19
// RCS-ID:      $Id: logdlg.cpp,v 1.2 2007/01/01 20:06:21 frm Exp $
// Copyright:   (c) 2006 Francesco Montorsi
// Licence:     wxWidgets license
/////////////////////////////////////////////////////////////////////////////


// 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

#include "guipm/logdlg.h"



// ----------------------------------------------------------------------------
// wxPackageLogDlg
// ----------------------------------------------------------------------------

IMPLEMENT_DYNAMIC_CLASS( wxPackageLogDlg, wxDialog )
BEGIN_EVENT_TABLE( wxPackageLogDlg, wxDialog )
END_EVENT_TABLE()

wxPackageLogDlg::wxPackageLogDlg( )
{
}

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

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

////@begin wxPackageLogDlg creation
    SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS);
    wxDialog::Create( parent, id, caption, pos, size, style );

    CreateControls();
    if (GetSizer())
    {
        GetSizer()->SetSizeHints(this);
        SetSize(GetMinSize()*3);
    }
    CentreOnScreen();
////@end wxPackageLogDlg creation
    return true;
}

void wxPackageLogDlg::CreateControls()
{    
////@begin wxPackageLogDlg content construction
    wxPackageLogDlg* itemDialog1 = this;

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

    m_pLabel = new wxStaticText( itemDialog1, wxID_STATIC, _("Log for %STAGE% of %s package:"), wxDefaultPosition, wxDefaultSize, 0 );
    itemBoxSizer2->Add(m_pLabel, 0, wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE, 5);

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

    wxStdDialogButtonSizer* itemStdDialogButtonSizer5 = new wxStdDialogButtonSizer;

    itemBoxSizer2->Add(itemStdDialogButtonSizer5, 0, wxALIGN_RIGHT|wxTOP|wxBOTTOM, 5);
    wxButton* itemButton6 = new wxButton( itemDialog1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
    itemStdDialogButtonSizer5->AddButton(itemButton6);

    itemStdDialogButtonSizer5->Realize();

////@end wxPackageLogDlg content construction
}

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

