summaryrefslogtreecommitdiff
path: root/xmake/templates/c++/wxwidgets/src/main.cpp
diff options
context:
space:
mode:
authorruki <[email protected]>2026-03-04 00:40:11 +0800
committerruki <[email protected]>2026-03-04 00:40:11 +0800
commit078b2ee0b6087a70bae05d3fa86d01078786513c (patch)
tree6f28e600fd9dcfb11bebb7abf02d36ebf1b7a685 /xmake/templates/c++/wxwidgets/src/main.cpp
parente0e20ef6ddbd0fc62fbaa00d195ce95f22a86fdf (diff)
move templates to repository
Diffstat (limited to 'xmake/templates/c++/wxwidgets/src/main.cpp')
-rw-r--r--xmake/templates/c++/wxwidgets/src/main.cpp48
1 files changed, 0 insertions, 48 deletions
diff --git a/xmake/templates/c++/wxwidgets/src/main.cpp b/xmake/templates/c++/wxwidgets/src/main.cpp
deleted file mode 100644
index 4b43fe6e3..000000000
--- a/xmake/templates/c++/wxwidgets/src/main.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-#include <wx/wx.h>
-
-namespace Examples {
-class Frame : public wxFrame {
- enum wxOwnedID {
- ID_Hello = 2
- };
-
- public:
- Frame() : wxFrame(nullptr, wxID_ANY, "Hello World") {
- auto menuFile = new wxMenu();
- menuFile->Append(ID_Hello, "&Hello...\tCtrl-H", "Help string shown in status bar for this menu item");
- menuFile->AppendSeparator();
- menuFile->Append(wxID_EXIT);
-
- auto menuHelp = new wxMenu();
- menuHelp->Append(wxID_ABOUT);
- auto menuBar = new wxMenuBar();
-
- menuBar->Append(menuFile, "&File");
- menuBar->Append(menuHelp, "&Help");
- SetMenuBar(menuBar);
-
- CreateStatusBar();
- SetStatusText("Welcome to wxWidgets!");
-
- menuBar->Bind(wxEVT_MENU, [&](wxCommandEvent &event) {
- if (event.GetId() == ID_Hello)
- wxLogMessage("Hello world from wxWidgets!");
- else if (event.GetId() == wxID_ABOUT)
- wxMessageBox("This is a wxWidgets Hello World example", "About Hello World", wxOK | wxICON_INFORMATION);
- else if (event.GetId() == wxID_EXIT)
- Close(true);
- else
- event.Skip();
- });
- }
-};
-
-class Application : public wxApp {
- bool OnInit() override {
- (new Frame())->Show();
- return true;
- }
-};
-} // namespace Examples
-
-wxIMPLEMENT_APP(Examples::Application); \ No newline at end of file