Numworks Epsilon
1.4.1
Graphing Calculator Operating System
console_edit_cell.h
Go to the documentation of this file.
1
#ifndef CODE_EDIT_CELL_H
2
#define CODE_EDIT_CELL_H
3
4
#include <
escher/responder.h
>
5
#include <
escher/highlight_cell.h
>
6
#include <
escher/text_field.h
>
7
#include <
escher/text_field_delegate.h
>
8
#include <
escher/pointer_text_view.h
>
9
10
namespace
Code
{
11
12
class
ConsoleEditCell
:
public
HighlightCell
,
public
Responder
{
13
public
:
14
ConsoleEditCell
(
Responder
*
parentResponder
=
nullptr
,
TextFieldDelegate
* delegate =
nullptr
);
15
16
// View
17
int
numberOfSubviews
()
const override
;
18
View
*
subviewAtIndex
(
int
index)
override
;
19
void
layoutSubviews
()
override
;
20
21
// Responder
22
void
didBecomeFirstResponder
()
override
;
23
24
/* HighlightCell */
25
Responder
*
responder
()
override
{
26
return
this
;
27
}
28
29
// Edit cell
30
void
setEditing
(
bool
isEditing,
bool
reinitDraftBuffer =
false
);
31
const
char
*
text
()
const
{
return
m_textField.
text
(); }
32
void
setText
(
const
char
*
text
);
33
bool
insertText
(
const
char
*
text
);
34
void
setPrompt
(
const
char
* prompt);
35
private
:
36
char
m_textBuffer[
TextField::maxBufferSize
()];
37
PointerTextView
m_promptView;
38
TextField
m_textField;
39
};
40
41
}
42
43
#endif
Code::ConsoleEditCell::setText
void setText(const char *text)
Definition:
console_edit_cell.cpp:45
TextField
Definition:
text_field.h:8
Code::ConsoleEditCell::numberOfSubviews
int numberOfSubviews() const override
Definition:
console_edit_cell.cpp:18
Code::ConsoleEditCell::responder
Responder * responder() override
Definition:
console_edit_cell.h:25
Code::ConsoleEditCell::didBecomeFirstResponder
void didBecomeFirstResponder() override
Definition:
console_edit_cell.cpp:37
text_field_delegate.h
Code::ConsoleEditCell::insertText
bool insertText(const char *text)
Definition:
console_edit_cell.cpp:54
TextField::maxBufferSize
static constexpr int maxBufferSize()
Definition:
text_field.h:23
Code::ConsoleEditCell::setPrompt
void setPrompt(const char *prompt)
Definition:
console_edit_cell.cpp:49
Code::ConsoleEditCell::subviewAtIndex
View * subviewAtIndex(int index) override
Definition:
console_edit_cell.cpp:22
Responder::parentResponder
Responder * parentResponder() const
Definition:
responder.cpp:12
pointer_text_view.h
responder.h
TextFieldDelegate
Definition:
text_field_delegate.h:8
Code::ConsoleEditCell::layoutSubviews
void layoutSubviews() override
Definition:
console_edit_cell.cpp:31
Responder
Definition:
responder.h:9
Code
Definition:
app.cpp:7
text_field.h
HighlightCell
Definition:
highlight_cell.h:7
TextInput::text
const char * text() const
Definition:
text_input.h:14
PointerTextView
Definition:
pointer_text_view.h:7
Code::ConsoleEditCell
Definition:
console_edit_cell.h:12
View
Definition:
view.h:23
Code::ConsoleEditCell::setEditing
void setEditing(bool isEditing, bool reinitDraftBuffer=false)
Definition:
console_edit_cell.cpp:41
highlight_cell.h
Code::ConsoleEditCell::ConsoleEditCell
ConsoleEditCell(Responder *parentResponder=nullptr, TextFieldDelegate *delegate=nullptr)
Definition:
console_edit_cell.cpp:9
Code::ConsoleEditCell::text
const char * text() const
Definition:
console_edit_cell.h:31
epsilon
apps
code
console_edit_cell.h
Generated by
1.8.14