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
4a3e57db
Commit
4a3e57db
authored
Nov 21, 2016
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ge dynamic ValueInput.UpdateOpen added
parent
92480fba
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
6 deletions
+33
-6
xtt/lib/ge/src/ge_dyn.cpp
xtt/lib/ge/src/ge_dyn.cpp
+11
-2
xtt/lib/ge/src/ge_dyn.h
xtt/lib/ge/src/ge_dyn.h
+7
-4
xtt/lib/glow/src/glow_growapi.cpp
xtt/lib/glow/src/glow_growapi.cpp
+8
-0
xtt/lib/glow/src/glow_growapi.h
xtt/lib/glow/src/glow_growapi.h
+1
-0
xtt/lib/glow/src/glow_grownode.cpp
xtt/lib/glow/src/glow_grownode.cpp
+5
-0
xtt/lib/glow/src/glow_grownode.h
xtt/lib/glow/src/glow_grownode.h
+1
-0
No files found.
xtt/lib/ge/src/ge_dyn.cpp
View file @
4a3e57db
...
...
@@ -4689,9 +4689,10 @@ int GeValue::scan( grow_tObject object)
}
}
int
annot_num
=
GeDyn
::
instance_to_number
(
instance
);
if
(
annot_num
==
1
)
//
if ( annot_num == 1)
// grow_SetAnnotationBrief( object, annot_num, buf, len);
grow_SetAnnotation
(
object
,
annot_num
,
buf
,
len
);
if
(
update_open
)
grow_SetAnnotationInput
(
object
,
annot_num
,
buf
,
len
);
else
grow_SetAnnotation
(
object
,
annot_num
,
buf
,
len
);
return
1
;
...
...
@@ -4756,6 +4757,11 @@ void GeValueInput::get_attributes( attr_sItem *attrinfo, int *item_count)
attrinfo
[
i
].
type
=
ge_eAttrType_KeyboardType
;
attrinfo
[
i
++
].
size
=
sizeof
(
keyboard_type
);
strcpy
(
attrinfo
[
i
].
name
,
"ValueInput.UpdateOpen"
);
attrinfo
[
i
].
value
=
&
update_open
;
attrinfo
[
i
].
type
=
glow_eType_Boolean
;
attrinfo
[
i
++
].
size
=
sizeof
(
update_open
);
dyn
->
display_access
=
true
;
*
item_count
=
i
;
}
...
...
@@ -4778,6 +4784,7 @@ void GeValueInput::save( ofstream& fp)
fp
<<
int
(
ge_eSave_ValueInput_maxvalue_attr
)
<<
FSPACE
<<
maxvalue_attr
<<
endl
;
fp
<<
int
(
ge_eSave_ValueInput_escape_store
)
<<
FSPACE
<<
escape_store
<<
endl
;
fp
<<
int
(
ge_eSave_ValueInput_keyboard_type
)
<<
FSPACE
<<
(
int
)
keyboard_type
<<
endl
;
fp
<<
int
(
ge_eSave_ValueInput_update_open
)
<<
FSPACE
<<
update_open
<<
endl
;
fp
<<
int
(
ge_eSave_End
)
<<
endl
;
}
...
...
@@ -4815,6 +4822,7 @@ void GeValueInput::open( ifstream& fp)
break
;
case
ge_eSave_ValueInput_escape_store
:
fp
>>
escape_store
;
break
;
case
ge_eSave_ValueInput_keyboard_type
:
fp
>>
tmp
;
keyboard_type
=
(
graph_eKeyboard
)
tmp
;
break
;
case
ge_eSave_ValueInput_update_open
:
fp
>>
update_open
;
break
;
case
ge_eSave_End
:
end_found
=
1
;
break
;
default:
cout
<<
"GeValueInput:open syntax error"
<<
endl
;
...
...
@@ -4836,6 +4844,7 @@ int GeValueInput::connect( grow_tObject object, glow_sTraceData *trace_data)
value_element
=
(
GeValue
*
)
elem
;
annot_typeid
=
value_element
->
annot_typeid
;
annot_size
=
value_element
->
annot_size
;
value_element
->
update_open
=
update_open
;
break
;
}
}
...
...
xtt/lib/ge/src/ge_dyn.h
View file @
4a3e57db
...
...
@@ -445,6 +445,7 @@
ge_eSave_ValueInput_maxvalue_attr
=
1308
,
ge_eSave_ValueInput_escape_store
=
1309
,
ge_eSave_ValueInput_keyboard_type
=
1310
,
ge_eSave_ValueInput_update_open
=
1311
,
ge_eSave_Rotate_attribute
=
1400
,
ge_eSave_Rotate_x0
=
1401
,
ge_eSave_Rotate_y0
=
1402
,
...
...
@@ -1440,15 +1441,16 @@ class GeValue : public GeDynElem {
int
annot_typeid
;
int
annot_size
;
pwr_tTid
tid
;
int
update_open
;
GeValue
(
GeDyn
*
e_dyn
,
ge_mInstance
e_instance
=
ge_mInstance_1
)
:
GeDynElem
(
e_dyn
,
ge_mDynType1_Value
,
ge_mDynType2_No
,
ge_mActionType1_No
,
ge_mActionType2_No
,
ge_eDynPrio_Value
),
zero_blank
(
0
),
decimals_decr
(
0
),
annot_typeid
(
0
),
annot_size
(
0
),
tid
(
0
)
zero_blank
(
0
),
decimals_decr
(
0
),
annot_typeid
(
0
),
annot_size
(
0
),
tid
(
0
)
,
update_open
(
0
)
{
strcpy
(
attribute
,
""
);
strcpy
(
format
,
""
);
strcpy
(
decimals_attr
,
""
);
instance
=
e_instance
;
memset
(
old_value
,
0
,
sizeof
(
old_value
));}
GeValue
(
const
GeValue
&
x
)
:
GeDynElem
(
x
.
dyn
,
x
.
dyn_type1
,
x
.
dyn_type2
,
x
.
action_type1
,
x
.
action_type2
,
x
.
prio
),
zero_blank
(
x
.
zero_blank
),
decimals_decr
(
x
.
decimals_decr
)
decimals_decr
(
x
.
decimals_decr
)
,
update_open
(
x
.
update_open
)
{
strcpy
(
attribute
,
x
.
attribute
);
strcpy
(
format
,
x
.
format
);
strcpy
(
decimals_attr
,
x
.
decimals_attr
);
instance
=
x
.
instance
;
instance_mask
=
x
.
instance_mask
;
memset
(
old_value
,
0
,
sizeof
(
old_value
));}
...
...
@@ -1477,6 +1479,7 @@ class GeValueInput : public GeDynElem {
pwr_tAName
minvalue_attr
;
pwr_tAName
maxvalue_attr
;
graph_eKeyboard
keyboard_type
;
int
update_open
;
int
annot_typeid
;
int
annot_size
;
...
...
@@ -1486,12 +1489,12 @@ class GeValueInput : public GeDynElem {
GeDynElem
(
e_dyn
,
ge_mDynType1_No
,
ge_mDynType2_No
,
ge_mActionType1_ValueInput
,
ge_mActionType2_No
,
ge_eDynPrio_ValueInput
),
min_value
(
0
),
max_value
(
0
),
clear
(
0
),
popup
(
0
),
unselect
(
0
),
escape_store
(
0
),
keyboard_type
(
graph_eKeyboard_Standard
),
value_element
(
0
)
keyboard_type
(
graph_eKeyboard_Standard
),
update_open
(
0
),
value_element
(
0
)
{
strcpy
(
minvalue_attr
,
""
);
strcpy
(
maxvalue_attr
,
""
);}
GeValueInput
(
const
GeValueInput
&
x
)
:
GeDynElem
(
x
.
dyn
,
x
.
dyn_type1
,
x
.
dyn_type2
,
x
.
action_type1
,
x
.
action_type2
,
x
.
prio
),
min_value
(
x
.
min_value
),
max_value
(
x
.
max_value
),
clear
(
x
.
clear
),
popup
(
x
.
popup
),
unselect
(
x
.
unselect
),
escape_store
(
x
.
escape_store
),
keyboard_type
(
x
.
keyboard_type
)
escape_store
(
x
.
escape_store
),
keyboard_type
(
x
.
keyboard_type
)
,
update_open
(
x
.
update_open
)
{
strcpy
(
minvalue_attr
,
x
.
minvalue_attr
);
strcpy
(
maxvalue_attr
,
x
.
maxvalue_attr
);}
void
get_attributes
(
attr_sItem
*
attrinfo
,
int
*
item_count
);
void
save
(
ofstream
&
fp
);
...
...
xtt/lib/glow/src/glow_growapi.cpp
View file @
4a3e57db
...
...
@@ -292,6 +292,14 @@ void grow_SetAnnotation( grow_tNode node, int number, const char *text, int size
((
GrowNode
*
)
node
)
->
set_annotation
(
number
,
text
,
size
,
0
);
}
void
grow_SetAnnotationInput
(
grow_tNode
node
,
int
number
,
const
char
*
text
,
int
size
)
{
if
(
((
GlowArrayElem
*
)
node
)
->
type
()
==
glow_eObjectType_GrowNode
||
((
GlowArrayElem
*
)
node
)
->
type
()
==
glow_eObjectType_GrowSlider
||
((
GlowArrayElem
*
)
node
)
->
type
()
==
glow_eObjectType_GrowGroup
)
((
GrowNode
*
)
node
)
->
set_annotation_input
(
number
,
text
,
size
,
0
);
}
void
grow_SetAnnotationBrief
(
grow_tNode
node
,
int
number
,
const
char
*
text
,
int
size
)
{
if
(
((
GlowArrayElem
*
)
node
)
->
type
()
==
glow_eObjectType_GrowNode
||
...
...
xtt/lib/glow/src/glow_growapi.h
View file @
4a3e57db
...
...
@@ -383,6 +383,7 @@ extern "C" {
\param size Length of text.
*/
void
grow_SetAnnotation
(
grow_tNode
node
,
int
number
,
const
char
*
text
,
int
size
);
void
grow_SetAnnotationInput
(
grow_tNode
node
,
int
number
,
const
char
*
text
,
int
size
);
//! Set the text of an annotation in a GrowNode object. Just redraw the background of the annotation.
/*!
...
...
xtt/lib/glow/src/glow_grownode.cpp
View file @
4a3e57db
...
...
@@ -1373,6 +1373,11 @@ void GrowNode::set_annotation( int num, const char *text, int size, int nodraw,
if
(
annotv_inputmode
[
num
])
return
;
set_annotation_input
(
num
,
text
,
size
,
nodraw
,
brief
);
}
void
GrowNode
::
set_annotation_input
(
int
num
,
const
char
*
text
,
int
size
,
int
nodraw
,
int
brief
)
{
if
(
!
root_node
)
{
if
(
!
nodraw
&&
!
invisible
)
{
...
...
xtt/lib/glow/src/glow_grownode.h
View file @
4a3e57db
...
...
@@ -683,6 +683,7 @@ class GrowNode : public GlowNode {
\param brief Just redraw the background object for the annotation, not the whole area.
*/
void
set_annotation
(
int
num
,
const
char
*
text
,
int
size
,
int
nodraw
,
int
brief
=
0
);
void
set_annotation_input
(
int
num
,
const
char
*
text
,
int
size
,
int
nodraw
,
int
brief
=
0
);
//! Store the current transform
/*! The stored transform can be used as starting point for future scaling or rotations.
...
...
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