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
6e9a24ca
Commit
6e9a24ca
authored
Jul 12, 2005
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PulldownMenu scale fixed, and replace_attr added to some classes
parent
ffa9efb4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
6 deletions
+54
-6
xtt/lib/ge/src/ge_dyn.cpp
xtt/lib/ge/src/ge_dyn.cpp
+51
-6
xtt/lib/ge/src/ge_dyn.h
xtt/lib/ge/src/ge_dyn.h
+3
-0
No files found.
xtt/lib/ge/src/ge_dyn.cpp
View file @
6e9a24ca
/* ge
_
dyn.cpp -- Display plant and node hiererachy
/* gedyn.cpp -- Display plant and node hiererachy
PROVIEW/R
Copyright (C) 1996 by Comator Process AB.
...
...
@@ -828,6 +828,20 @@ void GeDyn::update_elements()
}
mask
=
mask
<<
1
;
}
// Update PulldownMenu items
for
(
elem
=
elements
;
elem
;
elem
=
elem
->
next
)
{
if
(
elem
->
action_type
==
ge_mActionType_PulldownMenu
)
{
GePulldownMenu
*
pm
=
(
GePulldownMenu
*
)
elem
;
for
(
int
i
=
0
;
i
<
32
;
i
++
)
{
if
(
pm
->
items_dyn
[
i
])
{
pm
->
items_dyn
[
i
]
->
total_dyn_type
=
pm
->
items_dyn
[
i
]
->
dyn_type
;
pm
->
items_dyn
[
i
]
->
total_action_type
=
pm
->
items_dyn
[
i
]
->
action_type
;
pm
->
items_dyn
[
i
]
->
update_elements
();
}
}
}
}
}
GeDynElem
*
GeDyn
::
create_action_element
(
int
mask
,
int
instance
)
...
...
@@ -1774,8 +1788,11 @@ int GeDigColor::scan( grow_tObject object)
if
(
dyn
->
total_dyn_type
&
ge_mDynType_Tone
)
{
if
(
(
!
inverted
&&
*
p
)
||
(
inverted
&&
!*
p
))
{
if
(
color
>=
(
glow_eDrawType
)
glow_eDrawTone__
)
if
(
color
>=
(
glow_eDrawType
)
glow_eDrawTone__
)
{
if
(
dyn
->
reset_color
)
grow_ResetObjectFillColor
(
object
);
// Previous color might be a tone
grow_SetObjectFillColor
(
object
,
color
);
}
else
grow_SetObjectColorTone
(
object
,
(
glow_eDrawTone
)
color
);
dyn
->
ignore_color
=
true
;
...
...
@@ -3293,6 +3310,12 @@ void GeValueInput::get_attributes( attr_sItem *attrinfo, int *item_count)
*
item_count
=
i
;
}
void
GeValueInput
::
replace_attribute
(
char
*
from
,
char
*
to
,
int
*
cnt
,
int
strict
)
{
GeDyn
::
replace_attribute
(
minvalue_attr
,
sizeof
(
minvalue_attr
),
from
,
to
,
cnt
,
strict
);
GeDyn
::
replace_attribute
(
maxvalue_attr
,
sizeof
(
maxvalue_attr
),
from
,
to
,
cnt
,
strict
);
}
void
GeValueInput
::
save
(
ofstream
&
fp
)
{
fp
<<
int
(
ge_eSave_ValueInput
)
<<
endl
;
...
...
@@ -6162,6 +6185,10 @@ int GeTable::scan( grow_tObject object)
case
pwr_eType_UInt32
:
len
=
sprintf
(
buf
,
format
[
i
],
*
(
pwr_tInt32
*
)
headerref_p
[
i
][
j
]);
break
;
case
pwr_eType_Int16
:
case
pwr_eType_UInt16
:
len
=
sprintf
(
buf
,
format
[
i
],
*
(
pwr_tInt16
*
)
headerref_p
[
i
][
j
]);
break
;
case
pwr_eType_Status
:
case
pwr_eType_NetStatus
:
if
(
*
(
pwr_tStatus
*
)
headerref_p
[
i
][
j
]
==
0
)
{
...
...
@@ -6243,7 +6270,7 @@ int GeTable::scan( grow_tObject object)
default:
{
int
sts
;
sts
=
cdh_AttrValueToString
(
(
pwr_eType
)
type_id
[
i
],
p
+
offs
,
buf
,
sizeof
(
buf
));
p
[
i
]
+
offs
,
buf
,
sizeof
(
buf
));
if
(
EVEN
(
sts
))
sprintf
(
buf
,
"Invalid type"
);
len
=
strlen
(
buf
);
...
...
@@ -7877,6 +7904,11 @@ int GeCommand::get_transtab( char **tt)
return
0
;
}
void
GeCommand
::
replace_attribute
(
char
*
from
,
char
*
to
,
int
*
cnt
,
int
strict
)
{
GeDyn
::
replace_attribute
(
command
,
sizeof
(
command
),
from
,
to
,
cnt
,
strict
);
}
void
GeCommand
::
save
(
ofstream
&
fp
)
{
fp
<<
int
(
ge_eSave_Command
)
<<
endl
;
...
...
@@ -7973,6 +8005,11 @@ int GeCommandDoubleClick::get_transtab( char **tt)
return
0
;
}
void
GeCommandDoubleClick
::
replace_attribute
(
char
*
from
,
char
*
to
,
int
*
cnt
,
int
strict
)
{
GeDyn
::
replace_attribute
(
command
,
sizeof
(
command
),
from
,
to
,
cnt
,
strict
);
}
void
GeCommandDoubleClick
::
save
(
ofstream
&
fp
)
{
fp
<<
int
(
ge_eSave_CommandDC
)
<<
endl
;
...
...
@@ -9333,6 +9370,8 @@ void GeSlider::set_attribute( grow_tObject object, char *attr_name, int *cnt)
void
GeSlider
::
replace_attribute
(
char
*
from
,
char
*
to
,
int
*
cnt
,
int
strict
)
{
GeDyn
::
replace_attribute
(
attribute
,
sizeof
(
attribute
),
from
,
to
,
cnt
,
strict
);
GeDyn
::
replace_attribute
(
minvalue_attr
,
sizeof
(
minvalue_attr
),
from
,
to
,
cnt
,
strict
);
GeDyn
::
replace_attribute
(
maxvalue_attr
,
sizeof
(
maxvalue_attr
),
from
,
to
,
cnt
,
strict
);
}
void
GeSlider
::
save
(
ofstream
&
fp
)
...
...
@@ -10802,8 +10841,10 @@ int GePulldownMenu::action( grow_tObject object, glow_tEvent event)
glow_eDrawType
text_drawtype
,
text_color
,
bg_color
;
int
text_size
;
int
sts
;
sts
=
grow_GetObjectAnnotInfo
(
object
,
1
,
&
text_size
,
&
text_drawtype
,
&
text_color
,
&
bg_color
);
double
scale
;
sts
=
grow_GetObjectAnnotInfo
(
object
,
1
,
&
text_size
,
&
text_drawtype
,
&
text_color
,
&
bg_color
,
&
scale
);
if
(
EVEN
(
sts
))
{
text_size
=
2
;
text_drawtype
=
glow_eDrawType_TextHelveticaBold
;
...
...
@@ -10819,6 +10860,7 @@ int GePulldownMenu::action( grow_tObject object, glow_tEvent event)
text_drawtype
,
text_color
,
glow_eDrawType_MediumGray
,
0
,
&
menu_object
);
grow_SetObjectScale
(
menu_object
,
scale
,
scale
,
0
,
0
,
glow_eScaleType_LowerLeft
);
grow_SetMenuInputFocus
(
menu_object
,
1
);
}
break
;
...
...
@@ -11472,8 +11514,10 @@ int GeOptionMenu::action( grow_tObject object, glow_tEvent event)
glow_eDrawType
text_drawtype
,
text_color
,
bg_color
;
int
text_size
;
int
sts
;
double
scale
;
sts
=
grow_GetObjectAnnotInfo
(
object
,
1
,
&
text_size
,
&
text_drawtype
,
&
text_color
,
&
bg_color
);
sts
=
grow_GetObjectAnnotInfo
(
object
,
1
,
&
text_size
,
&
text_drawtype
,
&
text_color
,
&
bg_color
,
&
scale
);
if
(
EVEN
(
sts
))
{
text_size
=
2
;
text_drawtype
=
glow_eDrawType_TextHelveticaBold
;
...
...
@@ -11489,6 +11533,7 @@ int GeOptionMenu::action( grow_tObject object, glow_tEvent event)
text_drawtype
,
text_color
,
glow_eDrawType_MediumGray
,
0
,
&
menu_object
);
grow_SetObjectScale
(
menu_object
,
scale
,
scale
,
0
,
0
,
glow_eScaleType_LowerLeft
);
}
break
;
case
glow_eEvent_MenuActivated
:
...
...
xtt/lib/ge/src/ge_dyn.h
View file @
6e9a24ca
...
...
@@ -1138,6 +1138,7 @@ class GeValueInput : public GeDynElem {
int
action
(
grow_tObject
object
,
glow_tEvent
event
);
int
change_value
(
grow_tObject
object
,
char
*
text
);
int
export_java
(
grow_tObject
object
,
ofstream
&
fp
,
bool
first
,
char
*
var_name
);
void
replace_attribute
(
char
*
from
,
char
*
to
,
int
*
cnt
,
int
strict
);
};
...
...
@@ -1634,6 +1635,7 @@ class GeCommand : public GeDynElem {
void
save
(
ofstream
&
fp
);
void
open
(
ifstream
&
fp
);
int
action
(
grow_tObject
object
,
glow_tEvent
event
);
void
replace_attribute
(
char
*
from
,
char
*
to
,
int
*
cnt
,
int
strict
);
int
export_java
(
grow_tObject
object
,
ofstream
&
fp
,
bool
first
,
char
*
var_name
);
};
...
...
@@ -1655,6 +1657,7 @@ class GeCommandDoubleClick : public GeDynElem {
void
save
(
ofstream
&
fp
);
void
open
(
ifstream
&
fp
);
int
action
(
grow_tObject
object
,
glow_tEvent
event
);
void
replace_attribute
(
char
*
from
,
char
*
to
,
int
*
cnt
,
int
strict
);
};
...
...
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