Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
a3c98799
Commit
a3c98799
authored
Jul 12, 2015
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added has_input_focus() to the field_field.
parent
dbc1ea4d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
5 deletions
+28
-5
widgets.cpp
dlib/gui_widgets/widgets.cpp
+10
-0
widgets.h
dlib/gui_widgets/widgets.h
+3
-0
widgets_abstract.h
dlib/gui_widgets/widgets_abstract.h
+15
-5
No files found.
dlib/gui_widgets/widgets.cpp
View file @
a3c98799
...
...
@@ -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
::
...
...
dlib/gui_widgets/widgets.h
View file @
a3c98799
...
...
@@ -435,6 +435,9 @@ namespace dlib
void
give_input_focus
(
);
bool
has_input_focus
(
)
const
;
void
select_all_text
(
);
...
...
dlib/gui_widgets/widgets_abstract.h
View file @
a3c98799
...
...
@@ -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
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment