1 /////////////////////////////////////////////////////////////////////////////
2 // Program: wxWidgets Widgets Sample
4 // Purpose: part of the widgets sample showing wxTextCtrl
5 // Author: Vadim Zeitlin
8 // Copyright: (c) 2001 Vadim Zeitlin
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 // ============================================================================
14 // ============================================================================
16 // ----------------------------------------------------------------------------
18 // ----------------------------------------------------------------------------
20 // for compilers that support precompilation, includes "wx/wx.h".
21 #include "wx/wxprec.h"
27 // for all others, include the necessary headers
32 #include "wx/bitmap.h"
33 #include "wx/button.h"
34 #include "wx/checkbox.h"
35 #include "wx/radiobox.h"
36 #include "wx/statbox.h"
37 #include "wx/stattext.h"
38 #include "wx/textctrl.h"
39 #include "wx/msgdlg.h"
43 #include "wx/ioswrap.h"
47 #include "icons/text.xpm"
49 // ----------------------------------------------------------------------------
51 // ----------------------------------------------------------------------------
56 TextPage_Reset
= wxID_HIGHEST
,
64 TextPage_StreamRedirector
,
71 // textctrl line number radiobox values
79 // wrap style radio box
91 // textctrl kind values
102 // default values for the controls
103 static const struct ControlValues
119 TextLines_Multi
, // multiline
120 false, // not password
121 false, // not readonly
122 true, // do process enter
123 false, // not filename
124 WrapStyle_Word
, // wrap on word boundaries
126 TextKind_Plain
// plain EDIT control
130 // ----------------------------------------------------------------------------
132 // ----------------------------------------------------------------------------
134 // Define a new frame type: this is going to be our main frame
135 class TextWidgetsPage
: public WidgetsPage
139 TextWidgetsPage(WidgetsBookCtrl
*book
, wxImageList
*imaglist
);
140 virtual ~TextWidgetsPage(){};
142 virtual wxControl
*GetWidget() const { return m_text
; }
143 virtual wxTextEntryBase
*GetTextEntry() const { return m_text
; }
144 virtual void RecreateWidget() { CreateText(); }
146 // lazy creation of the content
147 virtual void CreateContent();
150 // create an info text contorl
151 wxTextCtrl
*CreateInfoText();
153 // create a horz sizer holding a static text and this text control
154 wxSizer
*CreateTextWithLabelSizer(const wxString
& label
,
156 const wxString
& label2
= wxEmptyString
,
157 wxTextCtrl
*text2
= NULL
);
160 void OnButtonReset(wxCommandEvent
& event
);
161 void OnButtonClearLog(wxCommandEvent
& event
);
163 void OnButtonSet(wxCommandEvent
& event
);
164 void OnButtonAdd(wxCommandEvent
& event
);
165 void OnButtonInsert(wxCommandEvent
& event
);
166 void OnButtonClear(wxCommandEvent
& event
);
167 void OnButtonLoad(wxCommandEvent
& event
);
169 void OnStreamRedirector(wxCommandEvent
& event
);
170 void OnButtonQuit(wxCommandEvent
& event
);
172 void OnText(wxCommandEvent
& event
);
173 void OnTextEnter(wxCommandEvent
& event
);
175 void OnCheckOrRadioBox(wxCommandEvent
& event
);
177 void OnUpdateUIClearButton(wxUpdateUIEvent
& event
);
179 void OnUpdateUIPasswordCheckbox(wxUpdateUIEvent
& event
);
180 void OnUpdateUIWrapLinesCheckbox(wxUpdateUIEvent
& event
);
182 void OnUpdateUIResetButton(wxUpdateUIEvent
& event
);
184 void OnIdle(wxIdleEvent
& event
);
186 // reset the textctrl parameters
189 // (re)create the textctrl
192 // is the control currently single line?
193 bool IsSingleLine() const
195 return m_radioTextLines
->GetSelection() == TextLines_Single
;
201 // the radiobox to choose between single and multi line
202 wxRadioBox
*m_radioTextLines
;
204 // and another one to choose the wrapping style
205 wxRadioBox
*m_radioWrap
;
207 // the checkboxes controlling text ctrl styles
208 wxCheckBox
*m_chkPassword
,
213 // under MSW we test rich edit controls as well here
215 wxRadioBox
*m_radioKind
;
218 // the textctrl itself and the sizer it is in
220 wxSizer
*m_sizerText
;
222 // the information text zones
223 wxTextCtrl
*m_textPosCur
,
232 // and the data to show in them
238 wxString m_range10_20
;
241 // any class wishing to process wxWidgets events must use this macro
242 DECLARE_EVENT_TABLE()
243 DECLARE_WIDGETS_PAGE(TextWidgetsPage
)
246 // ----------------------------------------------------------------------------
248 // ----------------------------------------------------------------------------
250 class WidgetsTextCtrl
: public wxTextCtrl
253 WidgetsTextCtrl(wxWindow
*parent
,
255 const wxString
& value
,
257 : wxTextCtrl(parent
, id
, value
, wxDefaultPosition
, wxDefaultSize
, flags
)
262 void OnRightClick(wxMouseEvent
& event
)
266 switch ( HitTest(event
.GetPosition(), &x
, &y
) )
269 wxFAIL_MSG( wxT("unexpected HitTest() result") );
272 case wxTE_HT_UNKNOWN
:
274 where
= wxT("nowhere near");
278 where
= wxT("before");
282 where
= wxT("below");
286 where
= wxT("beyond");
289 case wxTE_HT_ON_TEXT
:
294 wxLogMessage(wxT("Mouse is %s (%ld, %ld)"), where
.c_str(), x
, y
);
300 DECLARE_EVENT_TABLE()
303 // ----------------------------------------------------------------------------
305 // ----------------------------------------------------------------------------
307 BEGIN_EVENT_TABLE(TextWidgetsPage
, WidgetsPage
)
308 EVT_IDLE(TextWidgetsPage::OnIdle
)
310 EVT_BUTTON(TextPage_Reset
, TextWidgetsPage::OnButtonReset
)
312 EVT_BUTTON(TextPage_StreamRedirector
, TextWidgetsPage::OnStreamRedirector
)
314 EVT_BUTTON(TextPage_Clear
, TextWidgetsPage::OnButtonClear
)
315 EVT_BUTTON(TextPage_Set
, TextWidgetsPage::OnButtonSet
)
316 EVT_BUTTON(TextPage_Add
, TextWidgetsPage::OnButtonAdd
)
317 EVT_BUTTON(TextPage_Insert
, TextWidgetsPage::OnButtonInsert
)
318 EVT_BUTTON(TextPage_Load
, TextWidgetsPage::OnButtonLoad
)
320 EVT_UPDATE_UI(TextPage_Clear
, TextWidgetsPage::OnUpdateUIClearButton
)
322 EVT_UPDATE_UI(TextPage_Password
, TextWidgetsPage::OnUpdateUIPasswordCheckbox
)
323 EVT_UPDATE_UI(TextPage_WrapLines
, TextWidgetsPage::OnUpdateUIWrapLinesCheckbox
)
325 EVT_UPDATE_UI(TextPage_Reset
, TextWidgetsPage::OnUpdateUIResetButton
)
327 EVT_TEXT(TextPage_Textctrl
, TextWidgetsPage::OnText
)
328 EVT_TEXT_ENTER(TextPage_Textctrl
, TextWidgetsPage::OnTextEnter
)
330 EVT_CHECKBOX(wxID_ANY
, TextWidgetsPage::OnCheckOrRadioBox
)
331 EVT_RADIOBOX(wxID_ANY
, TextWidgetsPage::OnCheckOrRadioBox
)
334 BEGIN_EVENT_TABLE(WidgetsTextCtrl
, wxTextCtrl
)
335 EVT_RIGHT_UP(WidgetsTextCtrl::OnRightClick
)
338 // ============================================================================
340 // ============================================================================
342 #if defined(__WXX11__)
343 #define FAMILY_CTRLS NATIVE_CTRLS
344 #elif defined(__WXUNIVERSAL__)
345 #define FAMILY_CTRLS UNIVERSAL_CTRLS
347 #define FAMILY_CTRLS NATIVE_CTRLS
350 IMPLEMENT_WIDGETS_PAGE(TextWidgetsPage
, wxT("Text"),
351 FAMILY_CTRLS
| EDITABLE_CTRLS
354 // ----------------------------------------------------------------------------
355 // TextWidgetsPage creation
356 // ----------------------------------------------------------------------------
358 TextWidgetsPage::TextWidgetsPage(WidgetsBookCtrl
*book
, wxImageList
*imaglist
)
359 : WidgetsPage(book
, imaglist
, text_xpm
)
366 m_radioTextLines
= (wxRadioBox
*)NULL
;
371 m_chkFilename
= (wxCheckBox
*)NULL
;
381 m_textRange
= (wxTextCtrl
*)NULL
;
383 m_sizerText
= (wxSizer
*)NULL
;
388 m_selTo
= -2; // not -1 which means "no selection"
391 void TextWidgetsPage::CreateContent()
394 static const wxString modes
[] =
400 wxStaticBox
*box
= new wxStaticBox(this, wxID_ANY
, wxT("&Set textctrl parameters"));
401 m_radioTextLines
= new wxRadioBox(this, wxID_ANY
, wxT("&Number of lines:"),
402 wxDefaultPosition
, wxDefaultSize
,
403 WXSIZEOF(modes
), modes
,
404 1, wxRA_SPECIFY_COLS
);
406 wxSizer
*sizerLeft
= new wxStaticBoxSizer(box
, wxVERTICAL
);
408 sizerLeft
->Add(m_radioTextLines
, 0, wxGROW
| wxALL
, 5);
409 sizerLeft
->AddSpacer(5);
411 m_chkPassword
= CreateCheckBoxAndAddToSizer(
412 sizerLeft
, wxT("&Password control"), TextPage_Password
414 m_chkReadonly
= CreateCheckBoxAndAddToSizer(
415 sizerLeft
, wxT("&Read-only mode")
417 m_chkProcessEnter
= CreateCheckBoxAndAddToSizer(
418 sizerLeft
, wxT("Process &Enter")
420 m_chkFilename
= CreateCheckBoxAndAddToSizer(
421 sizerLeft
, wxT("&Filename control")
423 m_chkFilename
->Disable(); // not implemented yet
424 sizerLeft
->AddSpacer(5);
426 static const wxString wrap
[] =
434 m_radioWrap
= new wxRadioBox(this, wxID_ANY
, wxT("&Wrap style:"),
435 wxDefaultPosition
, wxDefaultSize
,
436 WXSIZEOF(wrap
), wrap
,
437 1, wxRA_SPECIFY_COLS
);
438 sizerLeft
->Add(m_radioWrap
, 0, wxGROW
| wxALL
, 5);
441 static const wxString kinds
[] =
445 wxT("rich edit 2.0"),
448 m_radioKind
= new wxRadioBox(this, wxID_ANY
, wxT("Control &kind"),
449 wxDefaultPosition
, wxDefaultSize
,
450 WXSIZEOF(kinds
), kinds
,
451 1, wxRA_SPECIFY_COLS
);
453 sizerLeft
->AddSpacer(5);
454 sizerLeft
->Add(m_radioKind
, 0, wxGROW
| wxALL
, 5);
457 wxButton
*btn
= new wxButton(this, TextPage_Reset
, wxT("&Reset"));
458 sizerLeft
->Add(2, 2, 0, wxGROW
| wxALL
, 1); // spacer
459 sizerLeft
->Add(btn
, 0, wxALIGN_CENTRE_HORIZONTAL
| wxALL
, 15);
462 wxStaticBox
*box2
= new wxStaticBox(this, wxID_ANY
, wxT("&Change contents:"));
463 wxSizer
*sizerMiddleUp
= new wxStaticBoxSizer(box2
, wxVERTICAL
);
465 btn
= new wxButton(this, TextPage_Set
, wxT("&Set text value"));
466 sizerMiddleUp
->Add(btn
, 0, wxALL
| wxGROW
, 1);
468 btn
= new wxButton(this, TextPage_Add
, wxT("&Append text"));
469 sizerMiddleUp
->Add(btn
, 0, wxALL
| wxGROW
, 1);
471 btn
= new wxButton(this, TextPage_Insert
, wxT("&Insert text"));
472 sizerMiddleUp
->Add(btn
, 0, wxALL
| wxGROW
, 1);
474 btn
= new wxButton(this, TextPage_Load
, wxT("&Load file"));
475 sizerMiddleUp
->Add(btn
, 0, wxALL
| wxGROW
, 1);
477 btn
= new wxButton(this, TextPage_Clear
, wxT("&Clear"));
478 sizerMiddleUp
->Add(btn
, 0, wxALL
| wxGROW
, 1);
480 btn
= new wxButton(this, TextPage_StreamRedirector
, wxT("St&ream redirection"));
481 sizerMiddleUp
->Add(btn
, 0, wxALL
| wxGROW
, 1);
483 wxStaticBox
*box4
= new wxStaticBox(this, wxID_ANY
, wxT("&Info:"));
484 wxSizer
*sizerMiddleDown
= new wxStaticBoxSizer(box4
, wxVERTICAL
);
486 m_textPosCur
= CreateInfoText();
487 m_textRowCur
= CreateInfoText();
488 m_textColCur
= CreateInfoText();
490 wxSizer
*sizerRow
= new wxBoxSizer(wxHORIZONTAL
);
491 sizerRow
->Add(CreateTextWithLabelSizer
497 sizerRow
->Add(CreateTextWithLabelSizer
502 0, wxLEFT
| wxRIGHT
, 5);
503 sizerRow
->Add(CreateTextWithLabelSizer
509 sizerMiddleDown
->Add(sizerRow
, 0, wxALL
, 5);
511 m_textLineLast
= CreateInfoText();
512 m_textPosLast
= CreateInfoText();
515 CreateTextWithLabelSizer
517 wxT("Number of lines:"),
519 wxT("Last position:"),
525 m_textSelFrom
= CreateInfoText();
526 m_textSelTo
= CreateInfoText();
529 CreateTextWithLabelSizer
531 wxT("Selection: from"),
539 m_textRange
= new wxTextCtrl(this, wxID_ANY
, wxEmptyString
,
540 wxDefaultPosition
, wxDefaultSize
,
544 CreateTextWithLabelSizer
546 wxT("Range 10..20:"),
552 wxSizer
*sizerMiddle
= new wxBoxSizer(wxVERTICAL
);
553 sizerMiddle
->Add(sizerMiddleUp
, 0, wxGROW
);
554 sizerMiddle
->Add(sizerMiddleDown
, 1, wxGROW
| wxTOP
, 5);
557 wxStaticBox
*box3
= new wxStaticBox(this, wxID_ANY
, wxT("&Text:"));
558 m_sizerText
= new wxStaticBoxSizer(box3
, wxHORIZONTAL
);
561 m_sizerText
->SetMinSize(150, 0);
563 // the 3 panes panes compose the upper part of the window
564 wxSizer
*sizerTop
= new wxBoxSizer(wxHORIZONTAL
);
565 sizerTop
->Add(sizerLeft
, 0, wxGROW
| (wxALL
& ~wxLEFT
), 10);
566 sizerTop
->Add(sizerMiddle
, 0, wxGROW
| wxALL
, 10);
567 sizerTop
->Add(m_sizerText
, 1, wxGROW
| (wxALL
& ~wxRIGHT
), 10);
572 // ----------------------------------------------------------------------------
574 // ----------------------------------------------------------------------------
576 wxTextCtrl
*TextWidgetsPage::CreateInfoText()
578 static int s_maxWidth
= 0;
582 GetTextExtent(wxT("9999999"), &s_maxWidth
, NULL
);
585 wxTextCtrl
*text
= new wxTextCtrl(this, wxID_ANY
, wxEmptyString
,
587 wxSize(s_maxWidth
, wxDefaultCoord
),
592 wxSizer
*TextWidgetsPage::CreateTextWithLabelSizer(const wxString
& label
,
594 const wxString
& label2
,
597 wxSizer
*sizerRow
= new wxBoxSizer(wxHORIZONTAL
);
598 sizerRow
->Add(new wxStaticText(this, wxID_ANY
, label
), 0,
599 wxALIGN_CENTRE_VERTICAL
| wxRIGHT
, 5);
600 sizerRow
->Add(text
, 0, wxALIGN_CENTRE_VERTICAL
);
603 sizerRow
->Add(new wxStaticText(this, wxID_ANY
, label2
), 0,
604 wxALIGN_CENTRE_VERTICAL
| wxLEFT
| wxRIGHT
, 5);
605 sizerRow
->Add(text2
, 0, wxALIGN_CENTRE_VERTICAL
);
611 // ----------------------------------------------------------------------------
613 // ----------------------------------------------------------------------------
615 void TextWidgetsPage::Reset()
617 m_radioTextLines
->SetSelection(DEFAULTS
.textLines
);
619 m_chkPassword
->SetValue(DEFAULTS
.password
);
620 m_chkReadonly
->SetValue(DEFAULTS
.readonly
);
621 m_chkProcessEnter
->SetValue(DEFAULTS
.processEnter
);
622 m_chkFilename
->SetValue(DEFAULTS
.filename
);
624 m_radioWrap
->SetSelection(DEFAULTS
.wrapStyle
);
627 m_radioKind
->SetSelection(DEFAULTS
.textKind
);
631 void TextWidgetsPage::CreateText()
633 int flags
= ms_defaultFlags
;
634 switch ( m_radioTextLines
->GetSelection() )
637 wxFAIL_MSG( wxT("unexpected lines radio box selection") );
639 case TextLines_Single
:
642 case TextLines_Multi
:
643 flags
|= wxTE_MULTILINE
;
644 m_chkPassword
->SetValue(false);
648 if ( m_chkPassword
->GetValue() )
649 flags
|= wxTE_PASSWORD
;
650 if ( m_chkReadonly
->GetValue() )
651 flags
|= wxTE_READONLY
;
652 if ( m_chkProcessEnter
->GetValue() )
653 flags
|= wxTE_PROCESS_ENTER
;
655 switch ( m_radioWrap
->GetSelection() )
658 wxFAIL_MSG( wxT("unexpected wrap style radio box selection") );
661 flags
|= wxTE_DONTWRAP
; // same as wxHSCROLL
665 flags
|= wxTE_WORDWRAP
;
669 flags
|= wxTE_CHARWRAP
;
673 // this is default but use symbolic file name for consistency
674 flags
|= wxTE_BESTWRAP
;
679 switch ( m_radioKind
->GetSelection() )
682 wxFAIL_MSG( wxT("unexpected kind radio box selection") );
700 valueOld
= m_text
->GetValue();
702 m_sizerText
->Detach( m_text
);
707 valueOld
= wxT("Hello, Universe!");
710 m_text
= new WidgetsTextCtrl(this, TextPage_Textctrl
, valueOld
, flags
);
713 if ( m_chkFilename
->GetValue() )
717 // cast to int needed to silence gcc warning about different enums
718 m_sizerText
->Add(m_text
, 1, wxALL
|
719 (flags
& wxTE_MULTILINE
? (int)wxGROW
721 m_sizerText
->Layout();
724 // ----------------------------------------------------------------------------
726 // ----------------------------------------------------------------------------
728 void TextWidgetsPage::OnIdle(wxIdleEvent
& WXUNUSED(event
))
730 // update all info texts
734 long posCur
= m_text
->GetInsertionPoint();
735 if ( posCur
!= m_posCur
)
737 m_textPosCur
->Clear();
738 m_textRowCur
->Clear();
739 m_textColCur
->Clear();
742 m_text
->PositionToXY(posCur
, &col
, &row
);
744 *m_textPosCur
<< posCur
;
745 *m_textRowCur
<< row
;
746 *m_textColCur
<< col
;
754 long posLast
= m_text
->GetLastPosition();
755 if ( posLast
!= m_posLast
)
757 m_textPosLast
->Clear();
758 *m_textPosLast
<< posLast
;
764 if ( m_textLineLast
)
766 m_textLineLast
->SetValue(
767 wxString::Format(wxT("%d"), m_text
->GetNumberOfLines()) );
770 if ( m_textSelFrom
&& m_textSelTo
)
773 m_text
->GetSelection(&selFrom
, &selTo
);
774 if ( selFrom
!= m_selFrom
)
776 m_textSelFrom
->Clear();
777 *m_textSelFrom
<< selFrom
;
782 if ( selTo
!= m_selTo
)
784 m_textSelTo
->Clear();
785 *m_textSelTo
<< selTo
;
793 wxString range
= m_text
->GetRange(10, 20);
794 if ( range
!= m_range10_20
)
796 m_range10_20
= range
;
797 m_textRange
->SetValue(range
);
802 void TextWidgetsPage::OnButtonReset(wxCommandEvent
& WXUNUSED(event
))
809 void TextWidgetsPage::OnButtonSet(wxCommandEvent
& WXUNUSED(event
))
811 m_text
->SetValue(m_text
->GetWindowStyle() & wxTE_MULTILINE
812 ? wxT("Here,\nthere and\neverywhere")
813 : wxT("Yellow submarine"));
818 void TextWidgetsPage::OnButtonAdd(wxCommandEvent
& WXUNUSED(event
))
820 if ( m_text
->GetWindowStyle() & wxTE_MULTILINE
)
822 m_text
->AppendText(wxT("We all live in a\n"));
825 m_text
->AppendText(wxT("Yellow submarine"));
828 void TextWidgetsPage::OnButtonInsert(wxCommandEvent
& WXUNUSED(event
))
830 m_text
->WriteText(wxT("Is there anybody going to listen to my story"));
831 if ( m_text
->GetWindowStyle() & wxTE_MULTILINE
)
833 m_text
->WriteText(wxT("\nall about the girl who came to stay"));
837 void TextWidgetsPage::OnButtonClear(wxCommandEvent
& WXUNUSED(event
))
843 void TextWidgetsPage::OnButtonLoad(wxCommandEvent
& WXUNUSED(event
))
845 // search for the file in several dirs where it's likely to be
847 pathlist
.Add(wxT("."));
848 pathlist
.Add(wxT(".."));
849 pathlist
.Add(wxT("../../../samples/widgets"));
851 wxString filename
= pathlist
.FindValidPath(wxT("textctrl.cpp"));
854 wxLogError(wxT("File textctrl.cpp not found."));
859 if ( !m_text
->LoadFile(filename
) )
861 // this is not supposed to happen ...
862 wxLogError(wxT("Error loading file."));
866 long elapsed
= sw
.Time();
867 wxLogMessage(wxT("Loaded file '%s' in %lu.%us"),
868 filename
.c_str(), elapsed
/ 1000,
869 (unsigned int) elapsed
% 1000);
874 void TextWidgetsPage::OnUpdateUIClearButton(wxUpdateUIEvent
& event
)
876 event
.Enable(!m_text
->GetValue().empty());
879 void TextWidgetsPage::OnUpdateUIWrapLinesCheckbox(wxUpdateUIEvent
& event
)
881 event
.Enable( !IsSingleLine() );
884 void TextWidgetsPage::OnUpdateUIPasswordCheckbox(wxUpdateUIEvent
& event
)
886 // can't put multiline control in password mode
887 event
.Enable( IsSingleLine() );
890 void TextWidgetsPage::OnUpdateUIResetButton(wxUpdateUIEvent
& event
)
892 event
.Enable( (m_radioTextLines
->GetSelection() != DEFAULTS
.textLines
) ||
894 (m_radioKind
->GetSelection() != DEFAULTS
.textKind
) ||
896 (m_chkPassword
->GetValue() != DEFAULTS
.password
) ||
897 (m_chkReadonly
->GetValue() != DEFAULTS
.readonly
) ||
898 (m_chkProcessEnter
->GetValue() != DEFAULTS
.processEnter
) ||
899 (m_chkFilename
->GetValue() != DEFAULTS
.filename
) ||
900 (m_radioWrap
->GetSelection() != DEFAULTS
.wrapStyle
) );
903 void TextWidgetsPage::OnText(wxCommandEvent
& WXUNUSED(event
))
905 // small hack to suppress the very first message: by then the logging is
906 // not yet redirected and so initial setting of the text value results in
907 // an annoying message box
908 static bool s_firstTime
= true;
915 wxLogMessage(wxT("Text ctrl value changed"));
918 void TextWidgetsPage::OnTextEnter(wxCommandEvent
& event
)
920 wxLogMessage(wxT("Text entered: '%s'"), event
.GetString().c_str());
924 void TextWidgetsPage::OnCheckOrRadioBox(wxCommandEvent
& WXUNUSED(event
))
929 void TextWidgetsPage::OnStreamRedirector(wxCommandEvent
& WXUNUSED(event
))
931 #if wxHAS_TEXT_WINDOW_STREAM
932 wxStreamToTextRedirector
redirect(m_text
);
933 wxString
str( wxT("Outputed to cout, appears in wxTextCtrl!") );
934 wxSTD cout
<< str
<< wxSTD endl
;
936 wxMessageBox(wxT("This wxWidgets build does not support wxStreamToTextRedirector"));