MCPcopy Create free account
hub / github.com/ALTaleX531/OpenGlass / AddPathWarningIcon

Method AddPathWarningIcon

OpenGlassGUI/MainFrame.Core.cpp:718–735  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

716 }
717
718 void MainFrame::AddPathWarningIcon(wxWindow* parent, wxBoxSizer* row, wxFilePickerCtrl* picker, wxCheckBox* checkbox, const wxString& title)
719 {
720 if (!parent || !row || !picker)
721 {
722 return;
723 }
724
725 const wxSize iconSize(16, 16);
726 const wxBitmap warnBmp = wxArtProvider::GetBitmap(wxART_WARNING, wxART_MESSAGE_BOX, iconSize);
727 auto* warn = new wxStaticBitmap(parent, wxID_ANY, warnBmp);
728 warn->SetMinSize(iconSize);
729 warn->SetToolTip(title + L" path does not exist. The value will still be saved.");
730 warn->Hide();
731
732 row->Add(warn, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT | wxLEFT, 2);
733
734 m_pathWarnings.push_back({ picker, checkbox, warn, title, wxString(), false, false, false });
735 }
736
737 void MainFrame::UpdatePathWarningIcons()
738 {

Callers

nothing calls this directly

Calls 1

AddMethod · 0.45

Tested by

no test coverage detected