+// ----------------------------------------------------------------------------
+// main frame
+// ----------------------------------------------------------------------------
+
+BEGIN_EVENT_TABLE(MainFrame, wxFrame)
+ EVT_MENU(Show_Shaped, MainFrame::OnShowShaped)
+ EVT_MENU(Show_Transparent, MainFrame::OnShowTransparent)
+END_EVENT_TABLE()
+
+MainFrame::MainFrame()
+ : wxFrame(NULL, wxID_ANY, "wxWidgets Shaped Sample",
+ wxDefaultPosition, wxSize(200, 100))
+{
+ wxMenuBar * const mbar = new wxMenuBar;
+ wxMenu * const menuFrames = new wxMenu;
+ menuFrames->Append(Show_Shaped, "Show &shaped window\tCtrl-S");
+ menuFrames->Append(Show_Transparent, "Show &transparent window\tCtrl-T");
+ menuFrames->AppendSeparator();
+ menuFrames->Append(wxID_EXIT, "E&xit");
+
+ mbar->Append(menuFrames, "&Show");
+ SetMenuBar(mbar);
+
+ Show();
+}
+
+void MainFrame::OnShowShaped(wxCommandEvent& WXUNUSED(event))
+{
+ ShapedFrame *shapedFrame = new ShapedFrame(this);
+ shapedFrame->Show(true);
+}
+
+void MainFrame::OnShowTransparent(wxCommandEvent& WXUNUSED(event))
+{
+ SeeThroughFrame *seeThroughFrame = new SeeThroughFrame();
+ seeThroughFrame->Show(true);
+}
+