29
29
// This constructor creates a new notebook (a tab control) and clears out the
30
30
// rest of the data members.
33
ctlTabWindow::ctlTabWindow( wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, long style, const wxString &name )
34
: ctlAuiNotebook( parent, id, pos, size, style ),
32
ctlTabWindow::ctlTabWindow(wxWindow *parent, wxWindowID id, const wxPoint &pos,
33
const wxSize &size, long style, const wxString &name)
34
: ctlAuiNotebook(parent, id, pos, size, style),
42
42
wxWindowBase::SetFont(settings->GetSystemFont());
43
43
m_tabMap = new wsTabHash();
46
void ctlTabWindow::selectTab( wxWindowID id )
46
void ctlTabWindow::SelectTab(wxWindowID id)
48
wsTabHash::iterator result = m_tabMap->find( id );
48
wsTabHash::iterator result = m_tabMap->find(id);
50
if( result != m_tabMap->end())
50
if (result != m_tabMap->end())
52
SetSelection( result->second );
52
SetSelection(result->second);
56
56
////////////////////////////////////////////////////////////////////////////////
59
59
// This function returns a pointer to our child result window (m_resultWindow)
60
60
// and creates that window when we first need it.
63
ctlResultGrid *ctlTabWindow::getResultWindow( void )
62
ctlResultGrid *ctlTabWindow::GetResultWindow()
65
if( m_resultWindow == 0 )
64
if (m_resultWindow == 0)
67
66
// We don't have a result window yet - go ahead and create one
69
m_resultWindow = new ctlResultGrid( this, -1 );
70
AddPage( m_resultWindow, _( "Results" ), true );
68
m_resultWindow = new ctlResultGrid(this, -1);
69
AddPage(m_resultWindow, _("Results"), true);
73
return( m_resultWindow );
72
return m_resultWindow;
76
75
////////////////////////////////////////////////////////////////////////////////
79
78
// This function returns a pointer to our child 'local-variables' window
80
79
// (m_varWindow) and creates that window when we first need it.
83
ctlVarWindow *ctlTabWindow::getVarWindow( bool create )
81
ctlVarWindow *ctlTabWindow::GetVarWindow(bool _create)
85
if(( m_varWindow == NULL ) && create )
83
if ((m_varWindow == NULL) && _create)
87
85
// We don't have a variable window yet - go ahead and create one
89
87
(*m_tabMap)[ID_VARGRID] = GetPageCount();
91
m_varWindow = new ctlVarWindow( this, ID_VARGRID );
92
AddPage( m_varWindow, _( "Local Variables" ), true );
89
m_varWindow = new ctlVarWindow(this, ID_VARGRID);
90
AddPage(m_varWindow, _("Local Variables"), true);
95
return( m_varWindow );
98
96
////////////////////////////////////////////////////////////////////////////////
101
99
// This function returns a pointer to our child 'package-variables' window
102
100
// (m_varWindow) and creates that window when we first need it.
105
ctlVarWindow *ctlTabWindow::getPkgVarWindow( bool create )
102
ctlVarWindow *ctlTabWindow::GetPkgVarWindow(bool create)
107
if(( m_pkgVarWindow == NULL ) && create )
104
if ((m_pkgVarWindow == NULL) && create)
109
106
// We don't have a variable window yet - go ahead and create one
111
108
(*m_tabMap)[ID_PKGVARGRID] = GetPageCount();
113
m_pkgVarWindow = new ctlVarWindow( this, ID_PKGVARGRID );
114
AddPage( m_pkgVarWindow, _( "Package Variables" ), true );
110
m_pkgVarWindow = new ctlVarWindow(this, ID_PKGVARGRID);
111
AddPage(m_pkgVarWindow, _("Package Variables"), true);
117
return( m_pkgVarWindow );
114
return m_pkgVarWindow;
120
117
////////////////////////////////////////////////////////////////////////////////
123
120
// This function returns a pointer to our child 'parameters' window
124
121
// (m_paramWindow) and creates that window when we first need it.
127
ctlVarWindow *ctlTabWindow::getParamWindow( bool create )
123
ctlVarWindow *ctlTabWindow::GetParamWindow(bool create)
129
if(( m_paramWindow == NULL ) && create )
125
if ((m_paramWindow == NULL) && create)
131
127
// We don't have a variable window yet - go ahead and create one
133
129
(*m_tabMap)[ID_PARAMGRID] = GetPageCount();
135
m_paramWindow = new ctlVarWindow( this, ID_PARAMGRID );
136
AddPage( m_paramWindow, _( "Parameters" ), true );
131
m_paramWindow = new ctlVarWindow(this, ID_PARAMGRID);
132
AddPage(m_paramWindow, _("Parameters"), true);
139
return( m_paramWindow );
135
return m_paramWindow;
142
138
////////////////////////////////////////////////////////////////////////////////
143
// getMessageWindow()
139
// GetMessageWindow()
145
141
// This function returns a pointer to our child 'messages' window
146
142
// (m_messageWindow) and creates that window when we first need it.
149
ctlMessageWindow *ctlTabWindow::getMessageWindow( void )
144
ctlMessageWindow *ctlTabWindow::GetMessageWindow()
151
if( m_messageWindow == 0 )
146
if (m_messageWindow == 0)
153
148
// We don't have a variable window yet - go ahead and create one
155
150
(*m_tabMap)[ID_MSG_PAGE] = GetPageCount();
157
m_messageWindow = new ctlMessageWindow( this, ID_MSG_PAGE );
158
AddPage( m_messageWindow, _( "DBMS Messages" ), true );
152
m_messageWindow = new ctlMessageWindow(this, ID_MSG_PAGE);
153
AddPage(m_messageWindow, _("DBMS Messages"), true);
160
return( m_messageWindow );
155
return m_messageWindow;
163
158
////////////////////////////////////////////////////////////////////////////////
166
161
// This function returns a pointer to our child stack-trace window
167
162
// (m_stackWindow) and creates that window when we first need it.
170
ctlStackWindow *ctlTabWindow::getStackWindow( )
164
ctlStackWindow *ctlTabWindow::GetStackWindow()
172
if( m_stackWindow == 0 )
166
if (m_stackWindow == 0)
174
168
// We don't have a stack-trace window yet - go ahead and create one
175
m_stackWindow = new ctlStackWindow( this, -1 );
176
AddPage( m_stackWindow, _( "Stack" ), true );
169
m_stackWindow = new ctlStackWindow(this, -1);
170
AddPage(m_stackWindow, _("Stack"), true);
179
return( m_stackWindow );
173
return m_stackWindow;