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
9b78f9a7
Commit
9b78f9a7
authored
Jun 17, 2010
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ge action PopupMenu: attribute can be used, and object methods viewed with cascading menu
parent
38af1e46
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
22 deletions
+60
-22
src/wbl/pwrs/src/pwrs_c_object.wb_load
src/wbl/pwrs/src/pwrs_c_object.wb_load
+6
-0
xtt/lib/ge/src/ge_dyn.cpp
xtt/lib/ge/src/ge_dyn.cpp
+9
-2
xtt/lib/xtt/src/xtt_menu.cpp
xtt/lib/xtt/src/xtt_menu.cpp
+45
-20
No files found.
src/wbl/pwrs/src/pwrs_c_object.wb_load
View file @
9b78f9a7
...
...
@@ -1305,6 +1305,12 @@ SObject pwrs:Class
Attr FilterName = "$Object-CollectFilter"
EndBody
EndObject
Object Object $MenuRef
Body SysBody
Attr ButtonName = "Object"
Attr RefAttribute = "_SelfObject"
EndBody
EndObject
EndObject
Object RtXttCrossref $RtMenu
Object CrrOpenTrace $MenuButton
...
...
xtt/lib/ge/src/ge_dyn.cpp
View file @
9b78f9a7
...
...
@@ -51,6 +51,8 @@
// Until xtt_menu.h i unavailable...
#define xmenu_mUtility_Ge (1 << 5)
#define xmenu_eItemType_Object 1
#define xmenu_eItemType_AttrObject 2
#define xmenu_eItemType_Attribute 3
#define glow_cJBean_Offset 2
#define glow_cJBean_SizeCorr 2
...
...
@@ -9554,10 +9556,15 @@ int GePopupMenu::action( grow_tObject object, glow_tEvent event)
// Display popup menu
grow_GetName
(
dyn
->
graph
->
grow
->
ctx
,
name
);
int
item_type
=
xmenu_eItemType_Attribute
;
if
(
attrref
.
Flags
.
b
.
Object
)
item_type
=
xmenu_eItemType_Object
;
else
if
(
attrref
.
Flags
.
b
.
ObjectAttr
)
item_type
=
xmenu_eItemType_AttrObject
;
dyn
->
graph
->
popup_position
(
event
->
any
.
x_pixel
+
8
,
event
->
any
.
y_pixel
,
&
x
,
&
y
);
(
dyn
->
graph
->
popup_menu_cb
)(
dyn
->
graph
->
parent_ctx
,
attrref
,
xmenu_eItemType_Object
,
xmenu_mUtility_Ge
,
name
,
x
,
y
);
item_type
,
xmenu_mUtility_Ge
,
name
,
x
,
y
);
}
break
;
}
...
...
xtt/lib/xtt/src/xtt_menu.cpp
View file @
9b78f9a7
...
...
@@ -186,29 +186,46 @@ int XNav::getAllMenuItems( xmenu_sMenuCall *ip,
sts
=
XNAV__SUCCESS
;
if
(
ODD
(
sts
))
{
sts
=
gdh_AttrrefToName
(
&
ip
->
Pointed
,
aname
,
sizeof
(
aname
),
cdh_mName_volumeStrict
);
if
(
EVEN
(
sts
))
return
sts
;
strcat
(
aname
,
"."
);
strcat
(
aname
,
mrp
->
RefAttribute
);
int
create_object_button
=
0
;
sts
=
gdh_GetAttributeCharacteristics
(
aname
,
&
a_tid
,
&
a_size
,
&
a_offs
,
&
a_elem
);
if
(
ODD
(
sts
))
{
switch
(
a_tid
)
{
case
pwr_eType_AttrRef
:
sts
=
gdh_GetObjectInfo
(
aname
,
&
currentar
,
sizeof
(
currentar
));
break
;
case
pwr_eType_Objid
:
{
pwr_tOid
oid
;
if
(
strcmp
(
mrp
->
RefAttribute
,
"_SelfObject"
)
==
0
)
{
// Object entry for attributes
char
*
s
;
currentar
=
pwr_cNAttrRef
;
sts
=
gdh_GetObjectInfo
(
aname
,
&
oid
,
sizeof
(
oid
));
currentar
=
cdh_ObjidToAref
(
oid
);
break
;
sts
=
gdh_AttrrefToName
(
&
ip
->
Pointed
,
aname
,
sizeof
(
aname
),
cdh_mName_volumeStrict
);
if
(
EVEN
(
sts
))
return
sts
;
if
(
(
s
=
strrchr
(
aname
,
'.'
)))
*
s
=
0
;
sts
=
gdh_NameToAttrref
(
pwr_cNOid
,
aname
,
&
currentar
);
if
(
EVEN
(
sts
))
return
sts
;
}
else
{
sts
=
gdh_AttrrefToName
(
&
ip
->
Pointed
,
aname
,
sizeof
(
aname
),
cdh_mName_volumeStrict
);
if
(
EVEN
(
sts
))
return
sts
;
strcat
(
aname
,
"."
);
strcat
(
aname
,
mrp
->
RefAttribute
);
sts
=
gdh_GetAttributeCharacteristics
(
aname
,
&
a_tid
,
&
a_size
,
&
a_offs
,
&
a_elem
);
if
(
ODD
(
sts
))
{
switch
(
a_tid
)
{
case
pwr_eType_AttrRef
:
sts
=
gdh_GetObjectInfo
(
aname
,
&
currentar
,
sizeof
(
currentar
));
break
;
case
pwr_eType_Objid
:
{
pwr_tOid
oid
;
currentar
=
pwr_cNAttrRef
;
sts
=
gdh_GetObjectInfo
(
aname
,
&
oid
,
sizeof
(
oid
));
currentar
=
cdh_ObjidToAref
(
oid
);
break
;
}
default:
sts
=
0
;
}
default:
sts
=
0
;
}
create_object_button
=
0
;
}
if
(
ODD
(
sts
)
&&
cdh_ObjidIsNotNull
(
currentar
.
Objid
))
{
(
*
Item
)
->
Level
=
Level
;
...
...
@@ -222,7 +239,7 @@ int XNav::getAllMenuItems( xmenu_sMenuCall *ip,
// Create a label with current object name
sts
=
gdh_AttrrefToName
(
&
currentar
,
aname
,
sizeof
(
aname
),
cdh_mNName
);
if
(
ODD
(
sts
))
{
if
(
ODD
(
sts
)
&&
create_object_button
)
{
(
*
Item
)
->
Level
=
Level
;
(
*
Item
)
->
Item
=
xmenu_eMenuItem_Button
;
(
*
Item
)
->
MenuObject
=
pwr_cNObjid
;
...
...
@@ -239,8 +256,16 @@ int XNav::getAllMenuItems( xmenu_sMenuCall *ip,
sts
=
gdh_GetAttrRefTid
(
&
currentar
,
&
current_cid
);
if
(
EVEN
(
sts
))
return
sts
;
xmenu_eItemType
item_type
=
ip
->
ItemType
;
if
(
currentar
.
Flags
.
b
.
Object
)
ip
->
ItemType
=
xmenu_eItemType_Object
;
else
ip
->
ItemType
=
xmenu_eItemType_AttrObject
;
sts
=
GetObjectMenu
(
ip
,
current_cid
,
Item
,
Level
,
nItems
,
0
,
&
currentar
);
if
(
EVEN
(
sts
))
return
sts
;
ip
->
ItemType
=
item_type
;
}
}
}
...
...
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