Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
31bb216e
Commit
31bb216e
authored
Oct 20, 2016
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Xtt command 'set subwindow', /focus to set input focus added
parent
1bfce6a6
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
7 deletions
+63
-7
xtt/lib/ge/src/ge_graph.cpp
xtt/lib/ge/src/ge_graph.cpp
+1
-1
xtt/lib/glow/src/glow_growctx.cpp
xtt/lib/glow/src/glow_growctx.cpp
+32
-0
xtt/lib/glow/src/glow_growctx.h
xtt/lib/glow/src/glow_growctx.h
+1
-2
xtt/lib/xtt/src/xtt_xnav_command.cpp
xtt/lib/xtt/src/xtt_xnav_command.cpp
+29
-4
No files found.
xtt/lib/ge/src/ge_graph.cpp
View file @
31bb216e
...
...
@@ -4328,7 +4328,7 @@ int Graph::set_object_focus( const char *name, int empty)
if
(
!
change_value_cb
)
return
0
;
sts
=
grow_FindObjectByName
(
grow
->
ctx
,
name
,
&
object
);
sts
=
grow_FindObjectByName
(
grow
->
base_ctx
()
,
name
,
&
object
);
if
(
EVEN
(
sts
))
return
GE__OBJNOTFOUND
;
grow_GetUserData
(
object
,
(
void
**
)
&
dyn
);
...
...
xtt/lib/glow/src/glow_growctx.cpp
View file @
31bb216e
...
...
@@ -4896,3 +4896,35 @@ int GrowCtx::signal_send( char *signalname)
return
1
;
}
int
GrowCtx
::
find_by_name
(
const
char
*
name
,
GlowArrayElem
**
element
)
{
const
char
*
s
;
char
wname
[
32
];
if
(
(
s
=
strchr
(
name
,
'.'
))
==
0
)
return
a
.
find_by_name
(
name
,
element
);
else
{
// Find in subwindow
GlowArrayElem
*
wind
;
int
len
;
int
sts
;
len
=
s
-
name
;
strncpy
(
wname
,
name
,
len
);
wname
[
len
]
=
0
;
sts
=
a
.
find_by_name
(
wname
,
&
wind
);
if
(
EVEN
(
sts
))
return
sts
;
switch
(
wind
->
type
())
{
case
glow_eObjectType_GrowWindow
:
case
glow_eObjectType_GrowFolder
:
break
;
default:
return
0
;
}
return
((
GrowWindow
*
)
wind
)
->
window_ctx
->
find_by_name
(
&
name
[
len
+
1
],
element
);
}
}
xtt/lib/glow/src/glow_growctx.h
View file @
31bb216e
...
...
@@ -233,8 +233,7 @@ class GrowCtx : public GlowCtx {
\param element Pointer to found object.
\return Returns 1 if object is found, else 0.
*/
int
find_by_name
(
const
char
*
name
,
GlowArrayElem
**
element
)
{
return
a
.
find_by_name
(
name
,
element
);};
int
find_by_name
(
const
char
*
name
,
GlowArrayElem
**
element
);
//! Find a nodeclass by name.
/*!
...
...
xtt/lib/xtt/src/xtt_xnav_command.cpp
View file @
31bb216e
...
...
@@ -371,7 +371,8 @@ dcli_tCmdTable xnav_command_table[] = {
&
xnav_set_func
,
{
"dcli_arg1"
,
"dcli_arg2"
,
"/NAME"
,
"/VALUE"
,
"/BYPASS"
,
"/PUBLICWRITE"
,
"/INDEX"
,
"/SOURCE"
,
"/OBJECT"
,
"/CONTINUE"
,
"/X0"
,
"/Y0"
,
"/X1"
,
"/Y1"
,
"/INSTANCE"
,
"/ESCAPESTORE"
,
""
}
"/X0"
,
"/Y0"
,
"/X1"
,
"/Y1"
,
"/INSTANCE"
,
"/ESCAPESTORE"
,
"/FOCUS"
,
"/INPUTEMPTY"
,
""
}
},
{
"SETUP"
,
...
...
@@ -885,6 +886,11 @@ static int xnav_set_func( void *client_data,
char
*
object_p
;
pwr_tOName
source_str
;
int
cont
;
int
inputempty
;
char
focus_str
[
200
];
char
*
focus_p
;
int
sts
;
char
focus
[
200
];
if
(
EVEN
(
dcli_get_qualifier
(
"dcli_arg2"
,
graph_str
,
sizeof
(
graph_str
))))
{
xnav
->
message
(
'E'
,
"Graph name is missing"
);
...
...
@@ -904,6 +910,13 @@ static int xnav_set_func( void *client_data,
else
object_p
=
0
;
inputempty
=
ODD
(
dcli_get_qualifier
(
"/INPUTEMPTY"
,
0
,
0
));
if
(
ODD
(
dcli_get_qualifier
(
"/FOCUS"
,
focus_str
,
sizeof
(
focus_str
))))
focus_p
=
focus_str
;
else
focus_p
=
0
;
if
(
object_p
)
xnav_replace_node_str
(
object_p
,
object_p
);
...
...
@@ -912,14 +925,26 @@ static int xnav_set_func( void *client_data,
if
(
cdh_NoCaseStrcmp
(
graph_str
,
"$current"
)
==
0
&&
xnav
->
current_cmd_ctx
)
{
gectx
=
(
XttGe
*
)
xnav
->
current_cmd_ctx
;
return
gectx
->
set_subwindow_source
(
name_str
,
source_str
,
object_p
);
sts
=
gectx
->
set_subwindow_source
(
name_str
,
source_str
,
object_p
);
if
(
focus_p
)
{
sprintf
(
focus
,
"%s.%s"
,
name_str
,
focus_p
);
gectx
->
set_object_focus
(
focus
,
inputempty
);
}
return
sts
;
}
else
if
(
xnav
->
appl
.
find_graph
(
graph_str
,
0
,
(
void
**
)
&
gectx
))
{
if
(
strcmp
(
source_str
,
""
)
==
0
)
{
xnav
->
message
(
'E'
,
"Syntax error"
);
return
XNAV__HOLDCOMMAND
;
}
return
gectx
->
set_subwindow_source
(
name_str
,
source_str
,
object_p
);
sts
=
gectx
->
set_subwindow_source
(
name_str
,
source_str
,
object_p
);
if
(
focus_p
)
{
sprintf
(
focus
,
"%s.%s"
,
name_str
,
focus_p
);
gectx
->
set_object_focus
(
focus
,
inputempty
);
}
return
sts
;
}
else
{
pwr_tStatus
sts
;
...
...
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