wxPanel::Create(parent,
id, wxDefaultPosition, wxSize(0,0), 0);
73 CGlInfoWindow(wxWindow* parent, wxWindowID
id, wxTextCtrl* textCtrl) :
96wxBoxSizer *topSizer =
newwxBoxSizer(wxVERTICAL);
97wxBoxSizer *barSizer =
newwxBoxSizer(wxHORIZONTAL);
99topSizer->Add(barSizer, 0, wxALIGN_RIGHT);
101wxTextCtrl *textCtrl=
newwxTextCtrl(
this,
ID_TEXT_CTRL, wxEmptyString,
102wxDefaultPosition, wxDefaultSize,
103wxTE_READONLY|wxTE_MULTILINE);
105wxFont fixedFont(8, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);
106textCtrl->SetFont(fixedFont);
108topSizer->Add(textCtrl, 1, wxEXPAND);
111barSizer->Add(
newwxButton(
this,
ID_SAVE_BTN,
wxT(
"Save")), 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
118wxFileDialog dialog(
this,
wxT(
"Save OpenGL Info"), wxEmptyString, wxEmptyString,
119 wxT(
"Text files (*.txt)|*.txt|All files (*.*)|*.*"),
120wxFD_SAVE|wxFD_OVERWRITE_PROMPT);
122 if(dialog.ShowModal() != wxID_OK)
125wxTextCtrl *textCtrl= (wxTextCtrl*)FindWindow(
ID_TEXT_CTRL);
126wxString
str= textCtrl->GetValue();
129ostr <<
str.ToUTF8() << endl;
134wxMessageDialog msgDialog(
this,
wxT(
"Failed to save file: ") + dialog.GetFilename(),
135 wxT(
"Error"), wxICON_ERROR|wxOK);
136msgDialog.ShowModal();
static void DumpSystemInfo(CNcbiOstream &ostr)
Dump a text formatted report of the current system configuration.
bool Create(wxWindow *parent, wxWindowID id)
Creation.
void CreateControls()
Creates the controls and sizers.
CGlInfoDemoPanel()
Constructors.
void OnButtonSave(wxCommandEvent &event)
CGlInfoWindow(wxWindow *parent, wxWindowID id, wxTextCtrl *textCtrl)
CNcbiOstrstreamToString class helps convert CNcbiOstrstream to a string Sample usage:
std::ofstream out("events_result.xml")
main entry point for tests
static const char * str(char *buf, int n)
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::ofstream CNcbiOfstream
Portable alias for ofstream.
wxString ToWxString(const string &s)
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