Numworks Epsilon
1.4.1
Graphing Calculator Operating System
calculation_cell.h
Go to the documentation of this file.
1
#ifndef PROBABILITY_CALCULATION_CELL_H
2
#define PROBABILITY_CALCULATION_CELL_H
3
4
#include <
escher.h
>
5
6
namespace
Probability
{
7
8
class
CalculationCell
:
public
HighlightCell
{
9
public
:
10
CalculationCell
(
Responder
* parentResponder =
nullptr
,
char
* draftTextBuffer =
nullptr
,
TextFieldDelegate
* textFieldDelegate =
nullptr
);
11
Responder
*
responder
()
override
;
12
void
setResponder
(
bool
shouldbeResponder);
13
void
setHighlighted
(
bool
highlight)
override
;
14
KDSize
minimalSizeForOptimalDisplay
()
const override
;
15
void
drawRect
(
KDContext
* ctx,
KDRect
rect)
const override
;
16
EditableTextCell
*
editableTextCell
();
17
MessageTextView
*
messageTextView
();
18
private
:
19
constexpr
static
KDCoordinate
k_margin = 5;
20
constexpr
static
KDCoordinate
k_minTextFieldWidth = 4*
KDText::charSize
().
width
()+
TextCursorView::k_width
;
21
constexpr
static
KDCoordinate
k_maxTextFieldWidth = 14*
KDText::charSize
().
width
()+
TextCursorView::k_width
;
22
int
numberOfSubviews()
const override
;
23
View
* subviewAtIndex(
int
index)
override
;
24
void
layoutSubviews()
override
;
25
KDCoordinate
calculationCellWidth()
const
;
26
MessageTextView
m_text;
27
EditableTextCell
m_calculation;
28
bool
m_isResponder;
29
};
30
31
}
32
33
#endif
Probability::CalculationCell::responder
Responder * responder() override
Definition:
calculation_cell.cpp:15
Probability::CalculationCell::CalculationCell
CalculationCell(Responder *parentResponder=nullptr, char *draftTextBuffer=nullptr, TextFieldDelegate *textFieldDelegate=nullptr)
Definition:
calculation_cell.cpp:8
Probability::CalculationCell::editableTextCell
EditableTextCell * editableTextCell()
Definition:
calculation_cell.cpp:44
Probability
Definition:
app.cpp:8
KDCoordinate
int16_t KDCoordinate
Definition:
coordinate.h:6
KDSize::width
constexpr KDCoordinate width() const
Definition:
size.h:10
Probability::CalculationCell::minimalSizeForOptimalDisplay
KDSize minimalSizeForOptimalDisplay() const override
Definition:
calculation_cell.cpp:31
Probability::CalculationCell::drawRect
void drawRect(KDContext *ctx, KDRect rect) const override
Definition:
calculation_cell.cpp:36
escher.h
TextFieldDelegate
Definition:
text_field_delegate.h:8
TextCursorView::k_width
static constexpr KDCoordinate k_width
Definition:
text_cursor_view.h:11
KDSize
Definition:
size.h:6
Responder
Definition:
responder.h:9
HighlightCell
Definition:
highlight_cell.h:7
MessageTextView
Definition:
message_text_view.h:7
KDContext
Definition:
context.h:8
Probability::CalculationCell::setResponder
void setResponder(bool shouldbeResponder)
Definition:
calculation_cell.cpp:22
Probability::CalculationCell
Definition:
calculation_cell.h:8
EditableTextCell
Definition:
editable_text_cell.h:9
Probability::CalculationCell::messageTextView
MessageTextView * messageTextView()
Definition:
calculation_cell.cpp:48
KDRect
Definition:
rect.h:26
Probability::CalculationCell::setHighlighted
void setHighlighted(bool highlight) override
Definition:
calculation_cell.cpp:26
View
Definition:
view.h:23
KDText::charSize
static constexpr KDSize charSize(FontSize size=FontSize::Large)
Definition:
text.h:16
epsilon
apps
probability
calculation_cell.h
Generated by
1.8.14