35 unsigned int const i_len_x,
36 unsigned int const i_len_y);
65 bool const i_editable=
true);
73 unsigned char const* i_str);
97 size_t const i_needed);
101 struct box& o_bbox)
const;
114 unsigned char const i_char);
118 unsigned char const i_char);
122 unsigned char const i_char);
138 operator=(
entry const&);
142 inline unsigned char const*
171 struct box& o_bbox)
const 178 bool const i_editable)
186 signal_changed_t i_signal)
227 #define __entry_hpp__ void show_cursor()
sets the cursor type/shape. Cursor shape depends on the state of the cursor (insert/overwrite) and wi...
Definition: entry.hpp:205
void set_text(unsigned char const *i_str)
set the text of the entry
Definition: entry.cpp:526
void del()
delete character at current position from the buffer
Definition: entry.cpp:153
virtual ~entry()
destructor
Definition: entry.cpp:41
void cursor_block()
sets the cursor shape to a solid block
Definition: djgpp/cursor.c:60
unsigned char const * get_text() const
get text buffer
Definition: entry.hpp:143
int pos_inc()
increments position (m_caret, m_slot, m_offset)
Definition: entry.cpp:460
virtual void draw() const
draws the widget
Definition: entry.cpp:50
void caret_set_position() const
moves the cursor to the current position (m_caret)
Definition: entry.cpp:432
int pos_dec()
decrements position (m_caret, m_slot, m_offset)
Definition: entry.cpp:500
void ins(unsigned char const i_char)
insert character at current position into the buffer
Definition: entry.cpp:192
virtual void focus_leave()
handle leaving focus
Definition: entry.cpp:426
virtual void focus_enter()
handle entering focus
Definition: entry.cpp:419
bool m_editable
Definition: entry.hpp:89
size_t m_block_size
Definition: entry.hpp:87
enum purpose get_purpose() const
get the text entry purpose
Definition: entry.hpp:156
virtual void get_bbox(struct box &o_bbox) const
get the inner bounding box param[out] o_bbox bounding box to fill
Definition: entry.hpp:170
void set_signal_changed(signal_changed_t i_signal)
set callback
Definition: entry.hpp:185
size_t m_length
Definition: entry.hpp:86
void set_purpose(enum purpose const i_purpose)
set the input purpose
Definition: entry.hpp:162
size_t m_offset
Definition: entry.hpp:84
size_t m_slot
Definition: entry.hpp:85
void cursor_underline()
sets the cursor shape to underline
Definition: djgpp/cursor.c:47
Allows a user to enter text.
Definition: entry.hpp:14
void(* signal_changed_t)(entry const *i_entry, void *io_user_data)
function prototype to recieve signal
Definition: entry.hpp:19
event_response
response
Definition: event.h:14
void cursor_hide()
hide the cursor
Definition: djgpp/cursor.c:34
bool validate(unsigned char const i_char)
validates a character against the widgets purpose
Definition: entry.cpp:258
unsigned char * m_block
Definition: entry.hpp:88
size_t m_caret
Definition: entry.hpp:83
void set_editable(bool const i_editable=true)
set whether or not the entry is editable
Definition: entry.hpp:177
purpose
indicator of the type of input the entry can accept
Definition: entry.hpp:23
virtual enum event_response event_key(struct event_key const &i_event)
handle key event
Definition: entry.cpp:325
enum purpose m_purpose
Definition: entry.hpp:82
signal_changed_t m_signal_changed
Definition: entry.hpp:90
size_t get_text_length() const
get the number of characters in the text buffer
Definition: entry.hpp:150
enum cursor_mode _cursor_mode
global to hold the mode of the cursor
Definition: djgpp/cursor.c:15
void grow(size_t const i_needed)
grow internal buffer
Definition: entry.cpp:105
void ovw(unsigned char const i_char)
insert character at current position into the buffer
Definition: entry.cpp:238
defines a rectangular region
Definition: box.h:12
void emit_changed()
emit the changed signal
Definition: entry.hpp:193
container for a keyboard event
Definition: event.h:23