forked from microsoft/Xbox-ATG-Samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
NavigationHint.h
63 lines (51 loc) · 1.87 KB
/
NavigationHint.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//--------------------------------------------------------------------------------------
// NavigationHint.h
//
// Advanced Technology Group (ATG)
// Copyright (C) Microsoft Corporation. All rights reserved.
//--------------------------------------------------------------------------------------
#pragma once
#include "FrontPanel/RasterFont.h"
class NavigationHint
{
public:
NavigationHint(
const wchar_t *fontName,
wchar_t leftIndicator,
wchar_t rightIndicator,
wchar_t upIndicator,
wchar_t downIndicator,
unsigned clientWidth,
unsigned clientHeight);
virtual ~NavigationHint();
unsigned GetWidth() const { return m_width; }
unsigned GetHeight() const { return m_height; }
void DrawLeftIndicator(const ATG::BufferDesc &desc, int x, int y);
void DrawRightIndicator(const ATG::BufferDesc &desc, int x, int y);
void DrawUpIndicator(const ATG::BufferDesc &desc, int x, int y);
void DrawDownIndicator(const ATG::BufferDesc &desc, int x, int y);
void SetClientDimensions(unsigned clientWidth, unsigned clientHeight);
RECT GetClientDimensions() const { return m_clientRect; }
protected:
ATG::RasterFont &m_font;
const wchar_t m_leftIndicator;
const wchar_t m_rightIndicator;
const wchar_t m_upIndicator;
const wchar_t m_downIndicator;
unsigned m_width;
unsigned m_height;
RECT m_clientRect;
unsigned m_leftOffsetX;
unsigned m_leftOffsetY;
unsigned m_rightOffsetX;
unsigned m_rightOffsetY;
unsigned m_upOffsetX;
unsigned m_upOffsetY;
unsigned m_downOffsetX;
unsigned m_downOffsetY;
};
class BasicNavigationHint : public NavigationHint
{
public:
BasicNavigationHint();
};