1
//////////////////////////////////////////////////////////////////////////////
3
// Purpose: Find/Replace, Goto dialogs
4
// Maintainer: Otto Wyss
6
// RCS-ID: $Id: finddialogs.cpp 7443 2011-09-01 16:29:16Z mortenmacfly $
7
// Copyright: (c) 2005 wyoGuide
9
//////////////////////////////////////////////////////////////////////////////
11
//----------------------------------------------------------------------------
13
//----------------------------------------------------------------------------
15
This file is part of Code Snippets, a plugin for Code::Blocks
16
Copyright (C) 2006 Arto Jonsson
17
Copyright (C) 2007 Pecan Heber
19
This program is free software; you can redistribute it and/or
20
modify it under the terms of the GNU General Public License
21
as published by the Free Software Foundation; either version 2
22
of the License, or (at your option) any later version.
24
This program is distributed in the hope that it will be useful,
25
but WITHOUT ANY WARRANTY; without even the implied warranty of
26
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27
GNU General Public License for more details.
29
You should have received a copy of the GNU General Public License
30
along with this program; if not, write to the Free Software
31
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
33
// RCS-ID: $Id: finddialogs.cpp 7443 2011-09-01 16:29:16Z mortenmacfly $
36
//----------------------------------------------------------------------------
38
//----------------------------------------------------------------------------
40
// For compilers that support precompilation, includes <wx/wx.h>.
41
#include <wx/wxprec.h>
47
// for all others, include the necessary headers (this file is usually all you
48
// need because it includes almost all 'standard' wxWidgets headers)
54
#include <wx/accel.h> // accelerator support
55
#include <wx/config.h>
56
//#include <wx/confbase.h>
57
//#include <wx/fileconf.h>
58
//#include <wx/msw/regconf.h> (wxRegConfig class)
61
#include "defsext.h" // Additional definitions
62
#include "finddialogs.h" // Dialogs
64
#define g_appname wxT("Find")
65
//----------------------------------------------------------------------------
67
//----------------------------------------------------------------------------
70
//============================================================================
72
//============================================================================
74
const int MAXHISTORY = 10;
75
const wxString FINDREPLACEDLG = _T("FindReplaceDlg");
76
const wxString DIRECTORYHISTORY = _T("History/Directory");
77
const wxString FINDSTRHISTORY = _T("History/Findtext");
78
const wxString REPLACESTRHISTORY = _T("History/Replacetext");
81
//============================================================================
83
//============================================================================
85
//----------------------------------------------------------------------------
87
//----------------------------------------------------------------------------
90
static wxArrayString m_finddirHist;
91
static wxArrayString m_findstrHist;
92
static wxArrayString m_replacestrHist;
94
BEGIN_EVENT_TABLE (myFindReplaceDlg, wxScrollingDialog)
95
EVT_BUTTON (wxID_CANCEL, myFindReplaceDlg::OnCancel)
96
EVT_BUTTON (wxID_OK, myFindReplaceDlg::OnOkay)
97
EVT_BUTTON (myID_REPLACE, myFindReplaceDlg::OnReplace)
98
EVT_BUTTON (myID_REPLACEALL, myFindReplaceDlg::OnReplaceAll)
99
EVT_MENU (wxID_HELP, myFindReplaceDlg::OnHelp)
102
myFindReplaceDlg::myFindReplaceDlg (wxWindow *parent,
103
const wxString &findstr,
104
const wxString &replacestr,
107
: wxScrollingDialog (parent, -1, _("Dialog"),
108
wxDefaultPosition, wxDefaultSize,
109
style | wxDEFAULT_DIALOG_STYLE) {
113
//accelerators (for help)
114
const int nEntries = 1 ;
115
wxAcceleratorEntry entries[nEntries];
116
entries[0].Set (wxACCEL_NORMAL, WXK_F1, wxID_HELP);
117
wxAcceleratorTable accel (nEntries, entries);
118
SetAcceleratorTable (accel);
121
m_findpane = new wxBoxSizer (wxVERTICAL);
123
// find, replace text and options, direction
124
wxBoxSizer *findsizer = new wxBoxSizer (wxHORIZONTAL);
125
findsizer->Add (new wxStaticText (this, -1, _("Search for:"),
126
wxDefaultPosition, wxSize(80, -1)),
127
0, wxALIGN_CENTRE_VERTICAL | wxRIGHT, 6);
128
m_findstr = new wxComboBox (this, myID_DLG_FIND_TEXT, findstr,
129
wxDefaultPosition, wxSize(200, -1));
130
findsizer->Add (m_findstr, 1, wxALIGN_CENTRE_VERTICAL);
131
m_findpane->Add (findsizer, 0, wxEXPAND | wxBOTTOM, 6);
133
m_fdirsizer = new wxBoxSizer (wxHORIZONTAL);
134
m_fdirsizer->Add (new wxStaticText (this, -1, _("In directories:"),
135
wxDefaultPosition, wxSize(80, -1)),
136
0, wxALIGN_CENTRE_VERTICAL | wxRIGHT, 6);
138
m_finddir = new wxComboBox (this, -1, finddir,
139
wxDefaultPosition, wxSize(200, -1),
140
//0, NULL); //AMD64 ambiguity betw int vs wxArray
141
(int)0, (const wxString*) NULL);
142
m_fdirsizer->Add (m_finddir, 1, wxALIGN_CENTRE_VERTICAL);
143
m_findpane->Show (m_fdirsizer, false);
144
m_findpane->Add (m_fdirsizer, 0, wxEXPAND | wxBOTTOM, 6);
146
m_specsizer = new wxBoxSizer (wxHORIZONTAL);
147
m_specsizer->Add (new wxStaticText (this, -1, _("With filespec:"),
148
wxDefaultPosition, wxSize(80, -1)),
149
0, wxALIGN_CENTRE_VERTICAL | wxRIGHT, 6);
150
m_findspec = new wxTextCtrl (this, -1, wxEmptyString,
151
wxDefaultPosition, wxSize(200, -1));
152
m_specsizer->Add (m_findspec, 1, wxALIGN_CENTRE_VERTICAL);
153
m_findpane->Show (m_specsizer, false);
154
m_findpane->Add (m_specsizer, 0, wxEXPAND | wxBOTTOM, 6);
156
m_replsizer = new wxBoxSizer (wxHORIZONTAL);
157
m_replsizer->Add (new wxStaticText (this, -1, _("Replace with:"),
158
wxDefaultPosition, wxSize(80, -1)),
159
0, wxALIGN_CENTRE_VERTICAL | wxRIGHT, 6);
160
m_replacestr = new wxComboBox (this, -1, replacestr,
161
wxDefaultPosition, wxSize(200, -1));
162
m_replsizer->Add (m_replacestr, 1, wxALIGN_CENTRE_VERTICAL);
163
m_findpane->Show (m_replsizer, false);
164
m_findpane->Add (m_replsizer, 0, wxEXPAND | wxBOTTOM, 6);
167
m_optionsizer = new wxBoxSizer (wxVERTICAL);
168
m_matchcase = new wxCheckBox (this, -1, _("Match &case"));
169
m_matchcase->SetValue ((flags & myFR_MATCHCASE) > 0);
170
m_optionsizer->Add (m_matchcase, 0, wxBOTTOM, 6);
171
m_wholeword = new wxCheckBox (this, -1, _("Whole &word"));
172
m_wholeword->SetValue ((flags & myFR_WHOLEWORD) > 0);
173
m_wholeword->Enable (false);
174
m_optionsizer->Add (m_wholeword, 0, wxBOTTOM, 6);
175
m_findregex = new wxCheckBox (this, -1, _("Regular &expression"));
176
m_findregex->SetValue ((flags & myFR_FINDREGEX) > 0);
177
m_optionsizer->Add (m_findregex, 0, wxBOTTOM, 6);
178
m_subfolder = new wxCheckBox (this, -1, _("Sub &directories"));
179
m_subfolder->SetValue ((flags & myFR_SUBFOLDER) > 0);
180
m_optionsizer->Add (m_subfolder, 0);
183
m_dirssizer = new wxBoxSizer (wxVERTICAL);
184
static const wxString directions[] = {_("&Upwards"), _("&Downwards")};
185
m_direction = new wxRadioBox (this, -1, _("Direction"),
186
wxDefaultPosition, wxDefaultSize,
187
WXSIZEOF(directions), directions,
188
1, wxRA_SPECIFY_COLS);
189
m_direction->SetSelection(1);
190
m_dirssizer->Add (m_direction, 0);
192
// options and directions
193
m_optionpane = new wxBoxSizer (wxHORIZONTAL);
194
m_optionpane->Add (m_optionsizer, 1, wxALIGN_TOP|wxALIGN_LEFT);
195
m_optionpane->Add (m_dirssizer, 0, wxALIGN_TOP|wxALIGN_RIGHT);
196
m_findpane->Add (0, 6);
197
m_findpane->Add (m_optionpane, 0, wxEXPAND);
200
m_buttonpane = new wxBoxSizer (wxVERTICAL);
201
m_findButton = new wxButton (this, wxID_OK, _("&Find"));
202
m_findButton->SetDefault();
203
m_buttonpane->Add (m_findButton, 0, wxEXPAND|wxALIGN_TOP|wxBOTTOM, 6);
204
m_replaceButton = new wxButton (this, myID_REPLACE, _("&Replace"));
205
m_buttonpane->Add (m_replaceButton, 0, wxEXPAND|wxALIGN_TOP|wxBOTTOM, 6);
206
m_buttonpane->Show (m_replaceButton, false);
207
m_replaceAllButton = new wxButton (this, myID_REPLACEALL, _("Replace &all"));
208
m_buttonpane->Add (m_replaceAllButton, 0, wxEXPAND|wxALIGN_TOP|wxBOTTOM, 6);
209
m_buttonpane->Show (m_replaceAllButton, false);
210
m_cancelButton = new wxButton (this, wxID_CANCEL, _("Cancel"));
211
m_buttonpane->Add (m_cancelButton, 0, wxEXPAND|wxALIGN_BOTTOM);
213
m_totalpane = new wxBoxSizer (wxHORIZONTAL);
214
m_totalpane->Add (m_findpane, 0, wxEXPAND | wxALL, 10);
215
m_totalpane->Add (m_buttonpane, 0, wxEXPAND | wxALL, 10);
217
m_findstr->SetFocus();
218
m_findstr->SetSelection (-1, -1);
219
SetSizerAndFit (m_totalpane);
224
LoadReplaceHistory ();
226
UpdateFindHistory ();
227
UpdateReplaceHistory ();
231
myFindReplaceDlg::~myFindReplaceDlg () {
236
StoreReplaceHistory ();
240
//----------------------------------------------------------------------------
243
void myFindReplaceDlg::OnCancel (wxCommandEvent &WXUNUSED(event)) {
244
EndModal (wxID_CANCEL);
247
void myFindReplaceDlg::OnHelp (wxCommandEvent &WXUNUSED(event)) {
248
////(pecan 2007/4/05)
249
//-g_help->Display(_T("dialogs.html#findreplace"));
252
void myFindReplaceDlg::OnOkay (wxCommandEvent &WXUNUSED(event)) {
253
UpdateFindHistory (m_findstr->GetValue ());
254
if (m_style & myFR_REPLACEDIALOG) {
255
UpdateReplaceHistory (m_replacestr->GetValue ());
256
}else if (m_style & myFR_FINDINFILES) {
257
UpdateDirHistory (m_finddir->GetValue ());
262
void myFindReplaceDlg::OnReplace (wxCommandEvent &WXUNUSED(event)) {
263
UpdateFindHistory (m_findstr->GetValue ());
264
if (m_style & myFR_REPLACEDIALOG) {
265
UpdateReplaceHistory (m_replacestr->GetValue ());
266
}else if (m_style & myFR_FINDINFILES) {
267
UpdateDirHistory (m_finddir->GetValue ());
269
EndModal (myID_REPLACE);
272
void myFindReplaceDlg::OnReplaceAll (wxCommandEvent &WXUNUSED(event)) {
273
UpdateFindHistory (m_findstr->GetValue ());
274
if (m_style & myFR_REPLACEDIALOG) {
275
UpdateReplaceHistory (m_replacestr->GetValue ());
276
}else if (m_style & myFR_FINDINFILES) {
277
UpdateDirHistory (m_finddir->GetValue ());
279
EndModal (myID_REPLACEALL);
282
//----------------------------------------------------------------------------
285
wxString myFindReplaceDlg::GetFindDirectory () {
286
return m_finddir->GetValue ();
289
void myFindReplaceDlg::SetFindDirectory (const wxString &finddir) {
290
m_finddir->SetValue (finddir);
293
wxString myFindReplaceDlg::GetFindFilespec () {
294
return m_findspec->GetValue ();
297
void myFindReplaceDlg::SetFindFilespec (const wxString &findspec) {
298
m_findspec->SetValue (findspec);
301
wxString myFindReplaceDlg::GetFindString () {
302
return m_findstr->GetValue ();
305
void myFindReplaceDlg::SetFindString (const wxString &findstr) {
306
m_findstr->SetSelection (0);
307
m_findstr->SetValue (findstr);
310
wxString myFindReplaceDlg::GetReplaceString () {
311
return m_replacestr->GetValue ();
314
void myFindReplaceDlg::SetReplaceString (const wxString &replacestr) {
315
m_replacestr->SetSelection (0);
316
m_replacestr->SetValue (replacestr);
319
int myFindReplaceDlg::GetFlags () {
320
// flags (myFR_DOWN, myFR_MATCHCASE, myFR_WHOLEWORD, myFR_FINDREGEX)
322
if (m_direction->GetSelection()!=0) flags |= myFR_DOWN;
323
if (m_matchcase->GetValue()) flags |= myFR_MATCHCASE;
324
if (m_wholeword->GetValue()) flags |= myFR_WHOLEWORD;
325
if (m_findregex->GetValue()) flags |= myFR_FINDREGEX;
326
if (m_subfolder->GetValue()) flags |= myFR_SUBFOLDER;
330
void myFindReplaceDlg::SetFlags (int flags) {
331
if (flags & myFR_DOWN) {
332
m_direction->SetSelection (1);
334
m_direction->SetSelection (0);
336
m_matchcase->SetValue ((flags & myFR_MATCHCASE) > 0);
337
m_wholeword->SetValue ((flags & myFR_WHOLEWORD) > 0);
338
m_findregex->SetValue ((flags & myFR_FINDREGEX) > 0);
339
m_subfolder->SetValue ((flags & myFR_SUBFOLDER) > 0);
342
int myFindReplaceDlg::ShowModal (long style) {
344
UpdateFindHistory ();
345
UpdateReplaceHistory ();
347
if (m_style & myFR_REPLACEDIALOG) {
348
SetTitle(_("Find and Replace"));
349
m_findpane->Show (m_fdirsizer, false);
350
m_findpane->Show (m_specsizer, false);
351
m_findpane->Show (m_replsizer, true);
352
m_optionsizer->Show (m_wholeword, true);
353
m_optionsizer->Show (m_subfolder, false);
354
m_dirssizer->Show (m_direction, true);
355
m_buttonpane->Show (m_replaceButton, true);
356
m_buttonpane->Show (m_replaceAllButton, true);
357
}else if (m_style & myFR_FINDINFILES) {
358
SetTitle(_("Find in Files"));
359
m_findpane->Show (m_fdirsizer, true);
360
m_findpane->Show (m_specsizer, true);
361
m_findpane->Show (m_replsizer, false);
362
m_optionsizer->Show (m_wholeword, false);
363
m_optionsizer->Show (m_subfolder, true);
364
m_dirssizer->Show (m_direction, false);
365
m_buttonpane->Show (m_replaceButton, false);
366
m_buttonpane->Show (m_replaceAllButton, false);
367
m_wholeword->Enable (false);
370
m_findpane->Show (m_fdirsizer, false);
371
m_findpane->Show (m_specsizer, false);
372
m_findpane->Show (m_replsizer, false);
373
m_optionsizer->Show (m_wholeword, true);
374
m_optionsizer->Show (m_subfolder, false);
375
m_dirssizer->Show (m_direction, true);
376
m_buttonpane->Show (m_replaceButton, false);
377
m_buttonpane->Show (m_replaceAllButton, false);
378
m_wholeword->Enable (true);
380
m_direction->Enable (true);
381
m_matchcase->Enable (!(style & myFR_NOMATCHCASE));
382
m_wholeword->Enable (!(style & myFR_NOWHOLEWORD));
383
m_findregex->Enable (!(style & myFR_NOFINDREGEX));
384
m_findstr->SetFocus();
385
m_findstr->SetSelection (-1, -1);
387
return wxScrollingDialog::ShowModal ();
390
void myFindReplaceDlg::LoadDirHistory () {
391
if (!m_finddirHist.IsEmpty()) return;
392
wxConfig *cfg = new wxConfig (g_appname);
393
wxString group = FINDREPLACEDLG + _T("/") + DIRECTORYHISTORY;
397
for (i = 0; i < MAXHISTORY; ++i) {
398
key = group + wxString::Format (_T("%d"), i);
399
if (cfg->Read (key, &value)) m_finddirHist.Add (value);
404
void myFindReplaceDlg::StoreDirHistory () {
405
wxConfig *cfg = new wxConfig (g_appname);
406
wxString group = FINDREPLACEDLG + _T("/") + DIRECTORYHISTORY;
410
for (i = 0; i < (int)m_finddirHist.GetCount(); ++i) {
411
key = group + wxString::Format (_T("%d"), i);
412
cfg->Write (key, m_finddirHist[i]);
417
void myFindReplaceDlg::UpdateDirHistory (wxString item) {
418
// FIXME: //(pecan 2007/4/05)
419
// wxString value = m_finddir->GetValue();
420
// if (!item.IsEmpty()) {
421
// int i = m_finddirHist.Index (item);
422
// if (i != wxNOT_FOUND) m_finddirHist.Remove (item);
423
// if (m_finddirHist.GetCount() == MAXHISTORY) {
424
// m_finddirHist.Remove (m_finddirHist.Last());
426
// m_finddirHist.Insert (item, 0);
428
// // since m_finddir->Clear() clears to much
429
// while (m_finddir->GetCount() > 0) m_finddir->Delete (0);
431
// for (i = 0; i < (int)m_finddirHist.GetCount(); ++i) {
432
// m_finddir->Append (m_finddirHist[i]);
434
// m_finddir->SetValue(value);
437
void myFindReplaceDlg::LoadFindHistory () {
438
// FIXME: //(pecan 2007/4/05)
439
// if (!m_findstrHist.IsEmpty()) return;
440
// wxConfig *cfg = new wxConfig (g_appname);
441
// wxString group = FINDREPLACEDLG + _T("/") + FINDSTRHISTORY;
445
// for (i = 0; i < MAXHISTORY; ++i) {
446
// key = group + wxString::Format (_T("%d"), i);
447
// if (cfg->Read (key, &value)) m_findstrHist.Add (value);
452
void myFindReplaceDlg::StoreFindHistory () {
453
wxConfig *cfg = new wxConfig (g_appname);
454
wxString group = FINDREPLACEDLG + _T("/") + FINDSTRHISTORY;
458
for (i = 0; i < (int)m_findstrHist.GetCount(); ++i) {
459
key = group + wxString::Format (_T("%d"), i);
460
cfg->Write (key, m_findstrHist[i]);
465
void myFindReplaceDlg::UpdateFindHistory (wxString item) {
466
// FIXME: //(pecan 2007/4/05)
467
// wxString value = m_findstr->GetValue();
468
// if (!item.IsEmpty()) {
469
// int i = m_findstrHist.Index (item);
470
// if (i != wxNOT_FOUND) m_findstrHist.Remove (item);
471
// if (m_findstrHist.GetCount() == MAXHISTORY) {
472
// m_findstrHist.Remove (m_findstrHist.Last());
474
// m_findstrHist.Insert (item, 0);
476
// // since m_findstr->Clear() clears to much
477
// while (m_findstr->GetCount() > 0) m_findstr->Delete (0);
479
// for (i = 0; i < (int)m_findstrHist.GetCount(); ++i) {
480
// m_findstr->Append (m_findstrHist[i]);
482
// m_findstr->SetValue(value);
485
void myFindReplaceDlg::LoadReplaceHistory ()
486
{// FIXME: //(pecan 2007/4/05)
487
// if (!m_replacestrHist.IsEmpty()) return;
488
// wxConfig *cfg = new wxConfig (g_appname);
489
// wxString group = FINDREPLACEDLG + _T("/") + REPLACESTRHISTORY;
493
// for (i = 0; i < MAXHISTORY; ++i) {
494
// key = group + wxString::Format (_T("%d"), i);
495
// if (cfg->Read (key, &value)) m_replacestrHist.Add (value);
500
void myFindReplaceDlg::StoreReplaceHistory ()
501
{// FIXME: //(pecan 2007/4/05)
502
// wxConfig *cfg = new wxConfig (g_appname);
503
// wxString group = FINDREPLACEDLG + _T("/") + REPLACESTRHISTORY;
507
// for (i = 0; i < (int)m_replacestrHist.GetCount(); ++i) {
508
// key = group + wxString::Format (_T("%d"), i);
509
// cfg->Write (key, m_replacestrHist[i]);
514
void myFindReplaceDlg::UpdateReplaceHistory (wxString item)
515
{// FIXME: //(pecan 2007/4/05)
516
// wxString value = m_replacestr->GetValue();
517
// if (!item.IsEmpty()) {
518
// int i = m_replacestrHist.Index (item);
519
// if (i != wxNOT_FOUND) m_replacestrHist.Remove (item);
520
// if (m_replacestrHist.GetCount() == MAXHISTORY) {
521
// m_replacestrHist.Remove (m_replacestrHist.Last());
523
// m_replacestrHist.Insert (item, 0);
525
// // since m_replacestr->Clear() clears to much
526
// while (m_replacestr->GetCount() > 0) m_replacestr->Delete (0);
528
// for (i = 0; i < (int)m_replacestrHist.GetCount(); ++i) {
529
// m_replacestr->Append (m_replacestrHist[i]);
531
// m_replacestr->SetValue(value);
535
//----------------------------------------------------------------------------
537
//----------------------------------------------------------------------------
539
BEGIN_EVENT_TABLE (myGotoDlg, wxScrollingDialog)
540
EVT_MENU (wxID_HELP, myGotoDlg::OnHelp)
543
myGotoDlg::myGotoDlg (wxWindow *parent,
545
: wxScrollingDialog (parent, -1, _("Goto line"),
546
wxDefaultPosition, wxDefaultSize,
547
style | wxDEFAULT_DIALOG_STYLE) {
549
//accelerators (for help)
550
const int nEntries = 1 ;
551
wxAcceleratorEntry entries[nEntries];
552
entries[0].Set (wxACCEL_NORMAL, WXK_F1, wxID_HELP);
553
wxAcceleratorTable accel (nEntries, entries);
554
SetAcceleratorTable (accel);
557
wxBoxSizer *gotopane = new wxBoxSizer (wxHORIZONTAL);
558
gotopane->Add (new wxStaticText (this, -1, _("Go to:"),
559
wxDefaultPosition, wxSize(60, -1)),
560
0, wxALIGN_TOP | wxALIGN_LEFT);
561
gotopane->Add (6, 0);
562
m_position = new wxTextCtrl (this, -1, _T(""),
563
wxDefaultPosition, wxSize(60, -1));
564
gotopane->Add (m_position, 0, wxALIGN_TOP | wxALIGN_RIGHT);
567
wxBoxSizer *buttonpane = new wxBoxSizer (wxVERTICAL);
568
m_gotoButton = new wxButton (this, wxID_OK, _("&Goto"));
569
m_gotoButton->SetDefault();
570
buttonpane->Add (m_gotoButton, 0, wxEXPAND | wxALIGN_TOP | wxBOTTOM, 6);
571
m_cancelButton = new wxButton (this, wxID_CANCEL, _("Cancel"));
572
buttonpane->Add (m_cancelButton, 0, wxEXPAND | wxALIGN_BOTTOM);
574
wxBoxSizer *totalpane = new wxBoxSizer (wxHORIZONTAL);
575
totalpane->Add (gotopane, 0, wxEXPAND | wxALL, 10);
576
totalpane->Add (buttonpane, 0, wxEXPAND | wxALL, 10);
578
m_position->SetFocus();
579
m_position->SetSelection (-1, -1);
580
SetSizerAndFit (totalpane);
584
//----------------------------------------------------------------------------
587
void myGotoDlg::OnHelp (wxCommandEvent &WXUNUSED(event)) {
588
// //(pecan 2007/4/05)
589
//g_help->Display(_T("dialogs.html#gotoposition"));
592
//----------------------------------------------------------------------------
595
int myGotoDlg::GetPosition () {
597
if (m_position->GetValue ().ToLong(&position)) return position;
601
void myGotoDlg::SetPosition (int position) {
602
m_position->SetValue (wxString::Format(_T("%d"), position));
605
int myGotoDlg::ShowModal (long WXUNUSED(style)) {
606
m_position->SetFocus();
607
m_position->SetSelection (-1, -1);
608
return wxScrollingDialog::ShowModal ();