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
10
#include "
CeresEngine/UI/UIButton.hpp
"
11
#include "
CeresEngine/UI/UIView.hpp
"
12
13
namespace
CeresEngine
{
14
16
class
UIMenuBar
:
public
UIView
{
17
private
:
18
// HTexture mIcon;
19
20
public
:
21
UIMenuBar
() :
UIMenuBar
(
kDefaultFrame
) {}
22
explicit
UIMenuBar
(
const
UIRect
& frame);
23
~UIMenuBar
()
override
;
24
25
public
:
27
UISize
getIntrinsicContentSize
()
const override
;
28
30
void
draw
(
UIGraphicsContext
& context,
const
UIRect
&
dirtyRect
)
override
;
31
33
[[
nodiscard
]]
bool
getClearsContextBeforeDrawing
()
const
noexcept
override
{
return
false
; }
34
35
public
:
36
static
const
UIColorAppearanceProperty
backgroundColorProperty
;
37
};
38
39
class
UIMenuBarButton
:
public
UIButton
{};
40
41
}
// namespace CeresEngine
UIButton.hpp
UIView.hpp
CeresEngine::GraphicsContext
An object that represents a graphics context.
Definition
GraphicsContext.hpp:45
CeresEngine::UIButton
A control that defines an area on the screen that can be used to trigger actions.
Definition
UIButton.hpp:30
CeresEngine::UIMenuBarButton
Definition
UIMenuBar.hpp:39
CeresEngine::UIMenuBar
A UI control that displays a bar with the app icon and a set of menu items.
Definition
UIMenuBar.hpp:16
CeresEngine::UIMenuBar::~UIMenuBar
~UIMenuBar() override
CeresEngine::UIMenuBar::backgroundColorProperty
static const UIColorAppearanceProperty backgroundColorProperty
Definition
UIMenuBar.hpp:36
CeresEngine::UIMenuBar::getClearsContextBeforeDrawing
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
CeresEngine::UIMenuBar::UIMenuBar
UIMenuBar(const UIRect &frame)
CeresEngine::UIMenuBar::getIntrinsicContentSize
UISize getIntrinsicContentSize() const override
The natural size for the receiving view, considering only properties of the view itself.
CeresEngine::UIMenuBar::UIMenuBar
UIMenuBar()
Definition
UIMenuBar.hpp:21
CeresEngine::UIMenuBar::draw
void draw(UIGraphicsContext &context, const UIRect &dirtyRect) override
Overridden by subclasses to draw the view's texture within the specified rectangle.
CeresEngine::UIView
The infrastructure for drawing and handling events in a UI.
Definition
UIView.hpp:153
CeresEngine::UIView::kDefaultFrame
static const UIRect kDefaultFrame
A rectangle that represents the default frame set by a view without an explicit frame.
Definition
UIView.hpp:296
CeresEngine
Definition
Application.hpp:19
CeresEngine::UISize
Size2 UISize
A type that contains width and height values.
Definition
UIUtility.hpp:30
CeresEngine::UIRect
Rect2 UIRect
A structure that contains the location and dimensions of a rectangle.
Definition
UIUtility.hpp:33
CeresEngine::hash
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition
Hash.hpp:25
CeresEngine::UIAppearanceProperty
A UI appearance property that returns a color.
Definition
UIAppearance.hpp:30
Sources
CeresEngine
UI
UIMenuBar.hpp
Generated by
1.9.8