wxDialog(parent,
id, title, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER),
59 intposX, posY, sizeW, sizeH;
65 ERRORMSG(
"Failed to get dialog position+size from registry, using default");
66SetSize(100, 100, 500, 400);
68SetSize(posX, posY, sizeW, sizeH);
101textCtrl =
newwxTextCtrl(
this, -1,
"", wxDefaultPosition, wxSize(500, 450), wxTE_MULTILINE | wxHSCROLL);
102bDone =
newwxButton(
this, -1,
"Done");
103bRevert =
newwxButton(
this, -1,
"Revert");
105wxBoxSizer* textSizer =
newwxBoxSizer(wxVERTICAL | wxHORIZONTAL);
106textSizer->Add(textCtrl, 1, wxEXPAND | wxALL, 5);
108wxBoxSizer* buttonSizer =
newwxBoxSizer(wxHORIZONTAL);
109buttonSizer->Add(bRevert);
110buttonSizer->Add(bDone);
112wxBoxSizer* mainSizer =
newwxBoxSizer(wxVERTICAL);
113mainSizer->Add(textSizer, wxSizerFlags(1).Expand().Border(wxALL, 5));
114mainSizer->Add(buttonSizer, 0, wxALIGN_RIGHT | wxRIGHT | wxBOTTOM, 10);
116this->SetSizer(mainSizer);
117SetSizerAndFit(mainSizer);
121SetAutoLayout(
true);
129 intposX, posY, sizeW, sizeH;
130GetPosition(&posX, &posY);
131GetSize(&sizeW, &sizeH);
137 ERRORMSG(
"Failed to set dialog position+size in registry");
177 boolretval = Show(show);
185 if(event.GetEventObject() ==
bDone)
187 else if(event.GetEventObject() ==
bRevert)
198 if(!lines)
return false;
200 for(
int i=0;
i<
textCtrl->GetNumberOfLines(); ++
i)
202 if(i < textCtrl->GetNumberOfLines() - 1 ||
textCtrl->GetLineText(
i).size() > 0)
209singleString->erase();
210 for(
int i=0;
i<
textCtrl->GetNumberOfLines(); ++
i) {
212 if(i < textCtrl->GetNumberOfLines() - 1 ||
textCtrl->GetLineText(
i).size() > 0) {
213 if(
i> 0) singleString->append(1,
' ');
214singleString->append(
WX_TO_STD(
textCtrl->GetLineText(
i).Strip(wxString::both)));
virtual void DialogDestroyed(const MultiTextDialog *destroyed)=0
virtual void DialogTextChanged(const MultiTextDialog *changed)=0
const TextLines initialText
bool GetLine(std::string *singleString) const
void SetToInitialText(void)
void OnButton(wxCommandEvent &event)
bool GetLines(TextLines *lines) const
std::vector< std::string > TextLines
void OnCloseWindow(wxCloseEvent &event)
MultiTextDialogOwner * myOwner
void OnTextChange(wxCommandEvent &event)
int ShowModalDialog(void)
Include a standard set of the NCBI C++ Toolkit most basic headers.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_SCOPE(ns)
Define a new scope.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4