// An application with a window, menus, and a dialog. #include #include #include #include #include dcl_sub_(ex4win, q::win) using base::base; mut_(about, ()); dcl_end void ex4win::about() { q::DlgAbout dlg(this, APP_NAME); dlg.exec(); } int main(int argc, pcstr argv[]) { q::app app(argc, argv, APP_NAME, nullptr, ORG_DOMAIN, nullptr); q::acts acts; ex4win win(acts); auto& mb = win.menuBar(); auto& mf = mb.addMenu("&File"); auto& mv = mb.addMenu("&View"); auto& ma = mb.addMenu("&About"); mf.addAct(acts.get(q::Quit)); mv.addAct(acts.get(q::MenuBar)) .separator() .addAct(acts.get(q::FullScreen)); // TD Mac ma.addAct(acts.get(q::About)); win.show(); app.exec(); } // eof