3
3
// pgAdmin III - PostgreSQL Tools
5
// Copyright (C) 2002 - 2012, The pgAdmin Development Team
5
// Copyright (C) 2002 - 2013, The pgAdmin Development Team
6
6
// This software is released under the PostgreSQL Licence
8
8
// ctlMessageWindow.cpp - debugger
18
18
#include "debugger/ctlMessageWindow.h"
20
IMPLEMENT_CLASS( ctlMessageWindow, wxTextCtrl )
20
IMPLEMENT_CLASS(ctlMessageWindow, wxTextCtrl)
22
BEGIN_EVENT_TABLE(ctlMessageWindow, wxTextCtrl)
23
EVT_TIMER(wxID_ANY, ctlMessageWindow::OnTimer)
22
26
////////////////////////////////////////////////////////////////////////////////
23
27
// ctlMessageWindow constructor
25
29
// Initialize the grid control and clear it out....
28
ctlMessageWindow::ctlMessageWindow( wxWindow *parent, wxWindowID id )
29
: wxTextCtrl( parent, wxID_ANY, wxT(""), wxPoint(0, 0), wxSize(0, 0),
30
wxTE_MULTILINE | wxTE_READONLY)
32
ctlMessageWindow::ctlMessageWindow(wxWindow *parent, wxWindowID id)
33
: wxTextCtrl(parent, wxID_ANY, wxT(""), wxPoint(0, 0), wxSize(0, 0),
34
wxTE_MULTILINE | wxTE_READONLY)
32
36
SetFont(settings->GetSQLFont());
37
m_timer.SetOwner(this);
35
40
////////////////////////////////////////////////////////////////////////////////
38
43
// Adds the message in the 'DBMS Messages' window.
41
void ctlMessageWindow::addMessage( wxString message )
43
AppendText(message + wxT("\n"));
46
void ctlMessageWindow::AddMessage(wxString message)
49
m_currMsg += message + wxT("\n");
52
if (!m_timer.IsRunning())
53
m_timer.Start(100, true);
56
void ctlMessageWindow::OnTimer(wxTimerEvent &ev)
59
AppendText(m_currMsg);
60
m_currMsg = wxEmptyString;
46
64
////////////////////////////////////////////////////////////////////////////////
49
67
// Removes the given message from the 'DBMS Messages' window.
52
void ctlMessageWindow::delMessage( const char *name )
70
void ctlMessageWindow::DelMessage(const char *name)
58
wxString ctlMessageWindow::getMessage( int row )
76
wxString ctlMessageWindow::GetMessage(int row)