CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
UIMenuBar.hpp
Go to the documentation of this file.
1//
2// CeresEngine - A game development framework
3//
4// Created by Rogiel Sulzbach.
5// Copyright (c) 2018-2022 Rogiel Sulzbach. All rights reserved.
6//
7
8#pragma once
9
12
13namespace CeresEngine {
14
16 class UIMenuBar : public UIView {
17 private:
18 // HTexture mIcon;
19
20 public:
22 explicit UIMenuBar(const UIRect& frame);
23 ~UIMenuBar() override;
24
25 public:
28
30 void draw(UIGraphicsContext& context, const UIRect& dirtyRect) override;
31
33 [[nodiscard]] bool getClearsContextBeforeDrawing() const noexcept override { return false; }
34
35 public:
37 };
38
39 class UIMenuBarButton : public UIButton {};
40
41} // namespace CeresEngine
An object that represents a graphics context.
Definition GraphicsContext.hpp:45
A control that defines an area on the screen that can be used to trigger actions.
Definition UIButton.hpp:30
Definition UIMenuBar.hpp:39
A UI control that displays a bar with the app icon and a set of menu items.
Definition UIMenuBar.hpp:16
static const UIColorAppearanceProperty backgroundColorProperty
Definition UIMenuBar.hpp:36
bool getClearsContextBeforeDrawing() const noexcept override
A Boolean value that determines whether the view's bounds should be automatically cleared before draw...
Definition UIMenuBar.hpp:33
UIMenuBar(const UIRect &frame)
UISize getIntrinsicContentSize() const override
The natural size for the receiving view, considering only properties of the view itself.
UIMenuBar()
Definition UIMenuBar.hpp:21
void draw(UIGraphicsContext &context, const UIRect &dirtyRect) override
Overridden by subclasses to draw the view's texture within the specified rectangle.
The infrastructure for drawing and handling events in a UI.
Definition UIView.hpp:153
static const UIRect kDefaultFrame
A rectangle that represents the default frame set by a view without an explicit frame.
Definition UIView.hpp:296
Definition Application.hpp:19
Size2 UISize
A type that contains width and height values.
Definition UIUtility.hpp:30
Rect2 UIRect
A structure that contains the location and dimensions of a rectangle.
Definition UIUtility.hpp:33
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
A UI appearance property that returns a color.
Definition UIAppearance.hpp:30