Commit a3c98799 authored by Davis King's avatar Davis King

Added has_input_focus() to the field_field.

parent dbc1ea4d
......@@ -455,6 +455,16 @@ namespace dlib
t.start();
}
// ----------------------------------------------------------------------------------------
bool text_field::
has_input_focus (
) const
{
auto_mutex M(m);
return has_focus;
}
// ----------------------------------------------------------------------------------------
void text_field::
......
......@@ -435,6 +435,9 @@ namespace dlib
void give_input_focus (
);
bool has_input_focus (
) const;
void select_all_text (
);
......
......@@ -533,10 +533,11 @@ namespace dlib
{
/*!
INITIAL VALUE
text() == ""
width() == 10
height() == a height appropriate for the font used.
The text color will be black.
- text() == ""
- width() == 10
- height() == a height appropriate for the font used. The text color will
be black.
- has_input_focus() == false
WHAT THIS OBJECT REPRESENTS
This object represents a simple one line text input field.
......@@ -622,7 +623,16 @@ namespace dlib
);
/*!
ensures
- gives this text field input keyboard focus
- #has_input_focus() == true
!*/
bool has_input_focus (
);
/*!
ensures
- Returns true if this txt field has input keyboard focus. If this
is the case then it means that when the user types on the keyboard
the output will appear inside the text field.
!*/
void select_all_text (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment