Numworks Epsilon
1.4.1
Graphing Calculator Operating System
scroll_view_indicator.h
Go to the documentation of this file.
1
#ifndef ESCHER_SCROLL_VIEW_INDICATOR_H
2
#define ESCHER_SCROLL_VIEW_INDICATOR_H
3
4
#include <
escher/view.h
>
5
6
class
ScrollViewIndicator
:
public
View
{
7
public
:
8
enum class
Direction
{
9
Horizontal
,
10
Vertical
11
};
12
ScrollViewIndicator
(
Direction
direction);
13
void
drawRect
(
KDContext
* ctx,
KDRect
rect)
const override
;
14
15
void
setIndicatorColor
(
KDColor
c
) { m_indicatorColor =
c
; }
16
KDColor
indicatorColor
()
const
{
return
m_indicatorColor; }
17
void
setBackgroundColor
(
KDColor
c
) { m_backgroundColor =
c
; }
18
KDColor
backgroundColor
()
const
{
return
m_backgroundColor; }
19
void
setMargin
(
KDCoordinate
m) { m_margin = m; }
20
KDCoordinate
margin
()
const
{
return
m_margin; }
21
22
float
start
()
const
;
23
void
setStart
(
float
start
);
24
float
end
()
const
;
25
void
setEnd
(
float
end
);
26
KDRect
frame
();
27
protected
:
28
#if ESCHER_VIEW_LOGGING
29
virtual
const
char
* className()
const override
;
30
virtual
void
logAttributes(std::ostream &os)
const override
;
31
#endif
32
private
:
33
constexpr
static
KDCoordinate
k_indicatorThickness = 4;
34
Direction
m_direction;
35
float
m_start;
36
float
m_end;
37
KDColor
m_indicatorColor;
38
KDColor
m_backgroundColor;
39
KDCoordinate
m_margin;
40
};
41
42
#endif
ScrollViewIndicator::Direction
Direction
Definition:
scroll_view_indicator.h:8
ScrollViewIndicator::Direction::Horizontal
KDCoordinate
int16_t KDCoordinate
Definition:
coordinate.h:6
ScrollViewIndicator::Direction::Vertical
ScrollViewIndicator::setIndicatorColor
void setIndicatorColor(KDColor c)
Definition:
scroll_view_indicator.h:15
ScrollViewIndicator
Definition:
scroll_view_indicator.h:6
c
c(generic_all_nodes)
view.h
ScrollViewIndicator::setEnd
void setEnd(float end)
Definition:
scroll_view_indicator.cpp:58
KDContext
Definition:
context.h:8
ScrollViewIndicator::backgroundColor
KDColor backgroundColor() const
Definition:
scroll_view_indicator.h:18
ScrollViewIndicator::start
float start() const
Definition:
scroll_view_indicator.cpp:43
ScrollViewIndicator::setMargin
void setMargin(KDCoordinate m)
Definition:
scroll_view_indicator.h:19
ScrollViewIndicator::margin
KDCoordinate margin() const
Definition:
scroll_view_indicator.h:20
ScrollViewIndicator::ScrollViewIndicator
ScrollViewIndicator(Direction direction)
Definition:
scroll_view_indicator.cpp:7
KDRect
Definition:
rect.h:26
KDColor
Definition:
color.h:6
View
Definition:
view.h:23
ScrollViewIndicator::setStart
void setStart(float start)
Definition:
scroll_view_indicator.cpp:47
ScrollViewIndicator::end
float end() const
Definition:
scroll_view_indicator.cpp:54
ScrollViewIndicator::indicatorColor
KDColor indicatorColor() const
Definition:
scroll_view_indicator.h:16
ScrollViewIndicator::drawRect
void drawRect(KDContext *ctx, KDRect rect) const override
Definition:
scroll_view_indicator.cpp:18
ScrollViewIndicator::frame
KDRect frame()
Definition:
scroll_view_indicator.cpp:65
ScrollViewIndicator::setBackgroundColor
void setBackgroundColor(KDColor c)
Definition:
scroll_view_indicator.h:17
epsilon
escher
include
escher
scroll_view_indicator.h
Generated by
1.8.14