macro;
81Create(parent,
id, caption, pos,
size, style);
89 bool CMacroErrorDlg::Create( wxWindow* parent, wxWindowID
id,
constwxString& caption,
constwxPoint& pos,
constwxSize&
size,
longstyle )
92SetExtraStyle(wxWS_EX_VALIDATE_RECURSIVELY|wxWS_EX_BLOCK_EVENTS);
93wxDialog::Create( parent,
id, caption, pos,
size, style );
98GetSizer()->SetSizeHints(
this);
125m_ErrorTextCtrl =
NULL;
126m_ErrorDetailsLink =
NULL;
127m_ErrorDetailsCtrl =
NULL;
128m_DataDetailsLink =
NULL;
129m_DataDetailsCtrl =
NULL;
143m_VSizer =
newwxBoxSizer(wxVERTICAL);
144itemDialog1->SetSizer(m_VSizer);
146m_ErrorTextCtrl =
newwxStaticText( itemDialog1, wxID_ERROR_STATIC,
_(
"Static text"), wxDefaultPosition, wxSize(400, -1), 0 );
147m_VSizer->Add(m_ErrorTextCtrl, 0, wxGROW|wxALL, 5);
149wxStaticLine* itemStaticLine4 =
newwxStaticLine( itemDialog1, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
150m_VSizer->Add(itemStaticLine4, 0, wxGROW|wxALL, 5);
152m_ErrorDetailsLink =
newwxHyperlinkCtrl( itemDialog1, ID_ERROR_DETALS_HYPERLINKCTRL, wxGetTranslation(wxString() + (wxChar) 0x02C5 +
wxT(
" Error Details")), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
153m_ErrorDetailsLink->Enable(
false);
154m_VSizer->Add(m_ErrorDetailsLink, 0, wxALIGN_LEFT|wxALL, 5);
156m_ErrorDetailsCtrl =
newwxTextCtrl( itemDialog1, ID_ERROR_DETAILS_TEXTCTRL, wxEmptyString, wxDefaultPosition, wxSize(-1, 100), wxTE_MULTILINE|wxTE_READONLY );
157m_ErrorDetailsCtrl->Show(
false);
158m_VSizer->Add(m_ErrorDetailsCtrl, 0, wxGROW|wxALL|
wxFIXED_MINSIZE, 5);
160wxStaticLine* itemStaticLine7 =
newwxStaticLine( itemDialog1, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
161m_VSizer->Add(itemStaticLine7, 0, wxGROW|wxALL, 5);
163m_DataDetailsLink =
newwxHyperlinkCtrl( itemDialog1, ID_DATA_DETAILS_HYPERLINKCTRL, wxGetTranslation(wxString() + (wxChar) 0x02C5 +
wxT(
" Data Details")), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
164m_DataDetailsLink->Enable(
false);
165m_VSizer->Add(m_DataDetailsLink, 0, wxALIGN_LEFT|wxALL, 5);
167m_DataDetailsCtrl =
newwxTextCtrl( itemDialog1, ID_DATA_DETAILS_TEXTCTRL, wxEmptyString, wxDefaultPosition, wxSize(-1, 100), wxTE_MULTILINE|wxTE_READONLY );
168m_DataDetailsCtrl->Show(
false);
169m_VSizer->Add(m_DataDetailsCtrl, 0, wxGROW|wxALL|
wxFIXED_MINSIZE, 5);
171wxStaticLine* itemStaticLine10 =
newwxStaticLine( itemDialog1, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
172m_VSizer->Add(itemStaticLine10, 0, wxGROW|wxALL, 5);
174wxBoxSizer* itemBoxSizer11 =
newwxBoxSizer(wxHORIZONTAL);
175m_VSizer->Add(itemBoxSizer11, 0, wxGROW|wxALL, 5);
177itemBoxSizer11->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5);
179wxButton* itemButton13 =
newwxButton( itemDialog1, ID_FEEDBACK_BUTTON,
_(
"Send Feedback..."), wxDefaultPosition, wxDefaultSize, 0 );
180itemBoxSizer11->Add(itemButton13, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
182wxButton* itemButton14 =
newwxButton( itemDialog1, wxID_CANCEL,
_(
"Close"), wxDefaultPosition, wxDefaultSize, 0 );
183itemButton14->SetDefault();
184itemBoxSizer11->Add(itemButton14, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
191 string msg(message);
193 msg+= x_MergeExceptionMessages(
error);
196 constmacro::CMacroDataException *pDataException = x_FindDataException(
error);
198SetReport(
error.ReportAll());
199 if(pDataException) {
200SetData(pDataException->GetDataAsString());
207m_ErrorTextCtrl->SetLabelText(message.c_str());
208m_ErrorTextCtrl->GetContainingSizer()->Fit(m_ErrorTextCtrl);
209m_VSizer->SetSizeHints(
this);
215m_ErrorDetailsCtrl->Clear();
216m_ErrorDetailsCtrl->AppendText(report.c_str());
217m_ErrorDetailsLink->Enable();
218m_VSizer->SetSizeHints(
this);
224m_DataDetailsCtrl->Clear();
225m_DataDetailsCtrl->AppendText(
data.c_str());
226m_DataDetailsLink->Enable();
227m_VSizer->SetSizeHints(
this);
272 if(m_ErrorDetailsCtrl->IsShown()) {
273m_ErrorDetailsLink->SetLabel(L
"\u02C5 Error Details");
274m_VSizer->Show(m_ErrorDetailsCtrl,
false);
277m_ErrorDetailsLink->SetLabel(L
"\u02C4 Error Details");
278m_VSizer->Show(m_ErrorDetailsCtrl);
281m_VSizer->SetSizeHints(
this);
292 if(m_DataDetailsCtrl->IsShown()) {
293m_DataDetailsLink->SetLabel(L
"\u02C5 Data Details");
294m_VSizer->Show(m_DataDetailsCtrl,
false);
297m_DataDetailsLink->SetLabel(L
"\u02C4 Data Details");
298m_VSizer->Show(m_DataDetailsCtrl);
301m_VSizer->SetSizeHints(
this);
309 while(
nullptr!= current) {
322 while(
nullptr!= current) {
328 returnpDataException;
338description += m_ErrorTextCtrl->GetLabelText().mb_str(wxConvUTF8);
339description +=
"\n\n";
340description +=
"Error Details:\n";
341description += m_ErrorDetailsCtrl->GetValue().mb_str(wxConvUTF8);
class CMacroExecException
void CreateControls()
Creates the controls and sizers.
const macro::CMacroDataException * x_FindDataException(const CException &error) const
void SetData(const string &data)
void OnErrorDetalsClicked(wxHyperlinkEvent &event)
wxEVT_COMMAND_HYPERLINK event handler for ID_ERROR_DETALS_HYPERLINKCTRL
void Init()
Initialises member variables.
void OnFeedbackButtonClick(wxCommandEvent &event)
wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_FEEDBACK_BUTTON
~CMacroErrorDlg()
Destructor.
bool Create(wxWindow *parent, wxWindowID id=ID_CMACROERRORDLG, const wxString &caption=_("Macro Error"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(400, 300), long style=wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL)
Creation.
static bool ShowToolTips()
Should we show tooltips?
void SetMessage(const string &message)
wxBitmap GetBitmapResource(const wxString &name)
Retrieves bitmap resources.
void SetReport(const string &report)
wxIcon GetIconResource(const wxString &name)
Retrieves icon resources.
string x_MergeExceptionMessages(const CException &error) const
CMacroErrorDlg()
Constructors.
void SetException(const string &message, const CException &error)
void OnDataDetailsClicked(wxHyperlinkEvent &event)
wxEVT_COMMAND_HYPERLINK event handler for ID_DATA_DETAILS_HYPERLINKCTRL
void ShowFeedbackDialog(bool opt_out=false, const char *problem_description=nullptr)
single callable function that will show the feedback wizard, collect information, and file a report.
const string & GetMsg(void) const
Get message string.
const CException * GetPredecessor(void) const
Get "previous" exception from the backlog.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
const struct ncbi::grid::netcache::search::fields::SIZE size
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
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