MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / OnAbout

Method OnAbout

lib/mdflib/mdfviewer/src/mainframe.cpp:109–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107}
108
109void MainFrame::OnAbout(wxCommandEvent&) {
110 wxAboutDialogInfo info;
111 info.SetName("MDF Viewer");
112 info.SetVersion("1.0");
113 info.SetDescription("Simple MDF file viewer.");
114
115 wxArrayString devs;
116 devs.push_back("Ingemar Hedvall");
117 info.SetDevelopers(devs);
118
119 info.SetCopyright("(C) 2021 Ingemar Hedvall");
120 info.SetLicense("MIT License (https://opensource.org/licenses/MIT)\n"
121 "Copyright 2021 Ingemar Hedvall\n"
122 "\n"
123 "Permission is hereby granted, free of charge, to any person obtaining a copy of this\n"
124 "software and associated documentation files (the \"Software\"),\n"
125 "to deal in the Software without restriction, including without limitation the rights to use, copy,\n"
126 "modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,\n"
127 "and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n"
128 "\n"
129 "The above copyright notice and this permission notice shall be included in all copies or substantial\n"
130 "portions of the Software.\n"
131 "\n"
132 "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n"
133 "INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR\n"
134 "PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n"
135 "DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR\n"
136 "IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
137 );
138 if (!info.HasIcon()) {
139#ifdef _WIN32
140 wxIcon app("APP_ICON", wxBITMAP_TYPE_ICO_RESOURCE);
141#else
142 wxIcon app {wxICON(app)};
143#endif
144 info.SetIcon(app);
145 }
146
147
148 wxAboutBox(info);
149}
150
151void MainFrame::OnUpdateNoDoc(wxUpdateUIEvent &event) {
152 auto* man = wxDocManager::GetDocumentManager();

Callers

nothing calls this directly

Calls 2

SetNameMethod · 0.45
SetDescriptionMethod · 0.45

Tested by

no test coverage detected