logdlg.cpp

00001 
00002 // Name:        logdlg.cpp
00003 // Purpose:     wxPackageLogDlg
00004 // Author:      Francesco Montorsi
00005 // Modified by: 
00006 // Created:     18/07/2006 23:08:19
00007 // RCS-ID:      $Id: logdlg.cpp,v 1.2 2007/01/01 20:06:21 frm Exp $
00008 // Copyright:   (c) 2006 Francesco Montorsi
00009 // Licence:     wxWidgets license
00011 
00012 
00013 // For compilers that support precompilation, includes "wx/wx.h".
00014 #include "wx/wxprec.h"
00015 
00016 #ifdef __BORLANDC__
00017 #pragma hdrstop
00018 #endif
00019 
00020 #ifndef WX_PRECOMP
00021 #include "wx/wx.h"
00022 #endif
00023 
00024 #include "guipm/logdlg.h"
00025 
00026 
00027 
00028 // ----------------------------------------------------------------------------
00029 // wxPackageLogDlg
00030 // ----------------------------------------------------------------------------
00031 
00032 IMPLEMENT_DYNAMIC_CLASS( wxPackageLogDlg, wxDialog )
00033 BEGIN_EVENT_TABLE( wxPackageLogDlg, wxDialog )
00034 END_EVENT_TABLE()
00035 
00036 wxPackageLogDlg::wxPackageLogDlg( )
00037 {
00038 }
00039 
00040 wxPackageLogDlg::wxPackageLogDlg( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
00041 {
00042     Create(parent, id, caption, pos, size, style);
00043 }
00044 
00045 bool wxPackageLogDlg::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
00046 {
00048     m_pLabel = NULL;
00049     m_pLog = NULL;
00051 
00053     SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS);
00054     wxDialog::Create( parent, id, caption, pos, size, style );
00055 
00056     CreateControls();
00057     if (GetSizer())
00058     {
00059         GetSizer()->SetSizeHints(this);
00060         SetSize(GetMinSize()*3);
00061     }
00062     CentreOnScreen();
00064     return true;
00065 }
00066 
00067 void wxPackageLogDlg::CreateControls()
00068 {    
00070     wxPackageLogDlg* itemDialog1 = this;
00071 
00072     wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
00073     itemDialog1->SetSizer(itemBoxSizer2);
00074 
00075     m_pLabel = new wxStaticText( itemDialog1, wxID_STATIC, _("Log for %STAGE% of %s package:"), wxDefaultPosition, wxDefaultSize, 0 );
00076     itemBoxSizer2->Add(m_pLabel, 0, wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE, 5);
00077 
00078     m_pLog = new wxTextCtrl( itemDialog1, ID_LOG_TEXT, _T(""), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
00079     itemBoxSizer2->Add(m_pLog, 1, wxGROW|wxALL, 5);
00080 
00081     wxStdDialogButtonSizer* itemStdDialogButtonSizer5 = new wxStdDialogButtonSizer;
00082 
00083     itemBoxSizer2->Add(itemStdDialogButtonSizer5, 0, wxALIGN_RIGHT|wxTOP|wxBOTTOM, 5);
00084     wxButton* itemButton6 = new wxButton( itemDialog1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
00085     itemStdDialogButtonSizer5->AddButton(itemButton6);
00086 
00087     itemStdDialogButtonSizer5->Realize();
00088 
00090 }
00091 
00092 bool wxPackageLogDlg::ShowToolTips()
00093 {
00094     return true;
00095 }
00096 

Generated on Thu Feb 1 22:14:31 2007 for wxWidgets Package Manager by  doxygen 1.5.1-p1