opuntiaOS - an operating system targeting x86 and ARMv7
1/* 2 * Copyright (C) 2020-2022 The opuntiaOS Project Authors. 3 * + Contributed by Nikita Melekhin <nimelehin@gmail.com> 4 * 5 * Use of this source code is governed by a BSD-style license that can be 6 * found in the LICENSE file. 7 */ 8 9#pragma once 10#include "../MenuItemAnswer.h" 11#include <libg/Context.h> 12 13namespace WinServer { 14 15class BaseWidget { 16public: 17 BaseWidget() = default; 18 virtual ~BaseWidget() = default; 19 20 size_t height() { return 20; } 21 virtual size_t width() { return 0; } 22 virtual void draw(LG::Context& ctx) { } 23 virtual MenuItemAnswer mouse_down(int x, int y) { return MenuItemAnswer::Empty; } 24 virtual MenuItemAnswer mouse_up() { return MenuItemAnswer::Empty; } 25 virtual void popup_rect(LG::Rect& r) { } 26}; 27 28} // namespace WinServer