opuntiaOS - an operating system targeting x86 and ARMv7
at master 22 lines 700 B view raw
1#include "ViewController.h" 2#include <libui/AppDelegate.h> 3 4class AppDelegate : public UI::AppDelegate { 5public: 6 AppDelegate() = default; 7 virtual ~AppDelegate() = default; 8 9 LG::Size preferred_desktop_window_size() const override { return LG::Size(220, 180); } 10 const char* icon_path() const override { return "/res/icons/apps/activity_monitor.icon"; } 11 12 virtual bool application() override 13 { 14 auto& window = std::opuntiaos::construct<UI::Window>("Monitor", window_size(), icon_path(), StatusBarStyle().set_hide_text()); 15 auto& superview = window.create_superview<UI::View, ViewController>(); 16 return true; 17 } 18 19private: 20}; 21 22SET_APP_DELEGATE(AppDelegate);