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
3848e8bc
Commit
3848e8bc
authored
May 28, 2014
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Xtt signal flags, inv/conv/test displayed in collection view
parent
6e628f3e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
71 additions
and
3 deletions
+71
-3
xtt/lib/xtt/src/xtt_item.cpp
xtt/lib/xtt/src/xtt_item.cpp
+52
-3
xtt/lib/xtt/src/xtt_item.h
xtt/lib/xtt/src/xtt_item.h
+1
-0
xtt/lib/xtt/src/xtt_xattnav.cpp
xtt/lib/xtt/src/xtt_xattnav.cpp
+8
-0
xtt/lib/xtt/src/xtt_xnav.cpp
xtt/lib/xtt/src/xtt_xnav.cpp
+9
-0
xtt/lib/xtt/src/xtt_xnav_brow.cpp
xtt/lib/xtt/src/xtt_xnav_brow.cpp
+1
-0
No files found.
xtt/lib/xtt/src/xtt_item.cpp
View file @
3848e8bc
...
...
@@ -768,10 +768,10 @@ ItemAttr::ItemAttr( XNavBrow *brow, pwr_tObjid item_objid,
ItemBaseAttr
(
item_objid
,
attr_name
,
attr_type_id
,
attr_tid
,
attr_size
,
attr_flags
,
item_is_root
,
item_display_type
)
{
pwr_tO
Name
obj_name
;
pwr_tO
bjName
obj_name
;
pwr_tAName
annot
;
int
sts
;
type
=
xnav_eItemType_Attr
;
strcpy
(
name
,
attr_name
);
...
...
@@ -835,6 +835,7 @@ ItemAttr::ItemAttr( XNavBrow *brow, pwr_tObjid item_objid,
else
brow_SetTraceAttr
(
node
,
obj_name
,
attr_name
,
flow_eTraceType_User
);
}
}
ItemAttrArray
::
ItemAttrArray
(
XNavBrow
*
brow
,
pwr_tObjid
item_objid
,
...
...
@@ -1479,7 +1480,7 @@ ItemCollect::ItemCollect( XNavBrow *brow, pwr_tObjid item_objid, char *attr_name
attr_type_id
,
attr_tid
,
attr_size
,
attr_flags
,
item_is_root
,
item_eDisplayType_Path
)
{
int
sts
;
pwr_t
O
Name
obj_name
;
pwr_t
A
Name
obj_name
;
pwr_tObjid
tst_objid
;
type
=
xnav_eItemType_Collect
;
...
...
@@ -1510,6 +1511,52 @@ ItemCollect::ItemCollect( XNavBrow *brow, pwr_tObjid item_objid, char *attr_name
brow_SetTraceAttr
(
node
,
obj_name
,
attr
,
flow_eTraceType_User
);
}
set_signal_flags
(
brow
);
}
// Add signal flags
void
ItemCollect
::
set_signal_flags
(
XNavBrow
*
brow
)
{
pwr_tAName
obj_name
;
pwr_tStatus
sts
;
sts
=
gdh_ObjidToName
(
objid
,
obj_name
,
sizeof
(
obj_name
),
cdh_mName_volumeStrict
);
if
(
EVEN
(
sts
))
throw
co_error
(
sts
);
strcat
(
obj_name
,
"."
);
strcat
(
obj_name
,
attr
);
char
*
s
=
strrchr
(
obj_name
,
'.'
);
if
(
s
&&
strcmp
(
s
+
1
,
"ActualValue"
)
==
0
)
{
pwr_tAttrRef
aref
;
pwr_tCid
cid
;
*
s
=
0
;
sts
=
gdh_NameToAttrref
(
pwr_cNObjid
,
obj_name
,
&
aref
);
if
(
EVEN
(
sts
))
return
;
sts
=
gdh_GetAttrRefTid
(
&
aref
,
&
cid
);
if
(
EVEN
(
sts
))
return
;
switch
(
cid
)
{
case
pwr_cClass_Di
:
case
pwr_cClass_Do
:
case
pwr_cClass_Ii
:
case
pwr_cClass_Io
:
case
pwr_cClass_Ai
:
case
pwr_cClass_Ao
:
case
pwr_cClass_Co
:
case
pwr_cClass_Po
:
{
xnav_set_sigchan_flags
(
brow
,
&
aref
,
cid
,
node
,
1
);
break
;
}
default:
;
}
}
}
static
int
add_window
(
XNav
*
xnav
,
pwr_tObjid
objid
,
brow_tNode
node
,
int
*
child_exist
)
...
...
@@ -2490,6 +2537,8 @@ static void xnav_set_sigchan_flags( XNavBrow *brow, pwr_tAttrRef *arp, pwr_tCid
brow_SetAnnotPixmap
(
node
,
annot
,
brow
->
pixmap_teston
);
else
if
(
inv
)
brow_SetAnnotPixmap
(
node
,
annot
,
brow
->
pixmap_inverted
);
else
brow_RemoveAnnotPixmap
(
node
,
annot
);
}
...
...
xtt/lib/xtt/src/xtt_item.h
View file @
3848e8bc
...
...
@@ -326,6 +326,7 @@ class ItemCollect : public ItemBaseAttr {
ItemCollect
(
XNavBrow
*
brow
,
pwr_tObjid
item_objid
,
char
*
attr_name
,
brow_tNode
dest
,
flow_eDest
dest_code
,
int
attr_type_id
,
pwr_tTid
attr_tid
,
int
attr_size
,
int
attr_flags
,
int
item_is_root
);
void
set_signal_flags
(
XNavBrow
*
brow
);
};
class
ItemMenu
:
public
Item
{
...
...
xtt/lib/xtt/src/xtt_xattnav.cpp
View file @
3848e8bc
...
...
@@ -588,6 +588,14 @@ int XAttNav::trace_scan_bc( brow_tObject object, void *p)
ItemAttr
*
item
;
item
=
(
ItemAttr
*
)
base_item
;
if
(
item
->
type
==
xnav_eItemType_Collect
)
{
// Add signal flags
XAttNav
*
xattnav
;
brow_GetCtxUserData
(
brow_GetCtx
(
item
->
node
),
(
void
**
)
&
xattnav
);
((
ItemCollect
*
)
item
)
->
set_signal_flags
(
xattnav
->
brow
);
}
if
(
!
item
->
first_scan
)
{
if
(
item
->
size
>
(
int
)
sizeof
(
item
->
old_value
)
&&
...
...
xtt/lib/xtt/src/xtt_xnav.cpp
View file @
3848e8bc
...
...
@@ -2488,6 +2488,14 @@ int XNav::trace_scan_bc( brow_tObject object, void *p)
ItemAttr
*
item
;
item
=
(
ItemAttr
*
)
base_item
;
if
(
item
->
type
==
xnav_eItemType_Collect
)
{
// Add signal flags
XNav
*
xnav
;
brow_GetCtxUserData
(
brow_GetCtx
(
item
->
node
),
(
void
**
)
&
xnav
);
((
ItemCollect
*
)
item
)
->
set_signal_flags
(
xnav
->
brow
);
}
if
(
!
item
->
first_scan
)
{
if
(
item
->
size
>
(
int
)
sizeof
(
item
->
old_value
)
&&
...
...
@@ -2508,6 +2516,7 @@ int XNav::trace_scan_bc( brow_tObject object, void *p)
brow_SetAnnotation
(
object
,
1
,
buf
,
len
);
memcpy
(
item
->
old_value
,
p
,
min
(
item
->
size
,
(
int
)
sizeof
(
item
->
old_value
)));
break
;
}
case
xnav_eItemType_Enum
:
{
...
...
xtt/lib/xtt/src/xtt_xnav_brow.cpp
View file @
3848e8bc
...
...
@@ -1215,6 +1215,7 @@ void XNavBrow::create_nodeclasses()
brow_CreateNodeClass
(
ctx
,
"NavigatorAttr"
,
flow_eNodeGroup_Common
,
&
nc_attr
);
brow_AddAnnotPixmap
(
nc_attr
,
0
,
0.2
,
0.1
,
flow_eDrawType_Line
,
2
,
0
);
brow_AddAnnotPixmap
(
nc_attr
,
1
,
1.4
,
0.1
,
flow_eDrawType_Line
,
2
,
0
);
brow_AddAnnot
(
nc_attr
,
2.9
,
0.6
,
0
,
flow_eDrawType_TextHelvetica
,
2
,
flow_eAnnotType_OneLine
,
0
);
...
...
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