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
17da3024
Commit
17da3024
authored
Dec 21, 2011
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ge support for multiline texts
parent
bacf689e
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
79 additions
and
15 deletions
+79
-15
xtt/lib/ge/src/ge_attrnav.cpp
xtt/lib/ge/src/ge_attrnav.cpp
+9
-0
xtt/lib/ge/src/ge_dyn.cpp
xtt/lib/ge/src/ge_dyn.cpp
+2
-0
xtt/lib/ge/src/ge_graph.cpp
xtt/lib/ge/src/ge_graph.cpp
+9
-1
xtt/lib/ge/src/ge_graph_command.cpp
xtt/lib/ge/src/ge_graph_command.cpp
+12
-3
xtt/lib/ge/src/ge_graph_web.cpp
xtt/lib/ge/src/ge_graph_web.cpp
+34
-7
xtt/lib/glow/src/glow.h
xtt/lib/glow/src/glow.h
+2
-1
xtt/lib/glow/src/glow_growapi.cpp
xtt/lib/glow/src/glow_growapi.cpp
+5
-0
xtt/lib/xtt/gtk/xtt_xattone_gtk.cpp
xtt/lib/xtt/gtk/xtt_xattone_gtk.cpp
+6
-3
No files found.
xtt/lib/ge/src/ge_attrnav.cpp
View file @
17da3024
...
@@ -859,6 +859,11 @@ static attrnav_sEnumElement elem_hot_indication[] = {
...
@@ -859,6 +859,11 @@ static attrnav_sEnumElement elem_hot_indication[] = {
{
(
int
)
glow_eHotIndication_LightColor
,
"LightColor"
},
{
(
int
)
glow_eHotIndication_LightColor
,
"LightColor"
},
{
0
,
""
}};
{
0
,
""
}};
static
attrnav_sEnumElement
elem_annot_type
[]
=
{
{
(
int
)
glow_eAnnotType_OneLine
,
"OneLine"
},
{
(
int
)
glow_eAnnotType_MultiLine
,
"MultiLine"
},
{
0
,
""
}};
static
attrnav_sEnumElement
elem_access
[]
=
{
static
attrnav_sEnumElement
elem_access
[]
=
{
{
(
unsigned
int
)
pwr_mPrv_RtRead
,
"RtRead"
},
{
(
unsigned
int
)
pwr_mPrv_RtRead
,
"RtRead"
},
{
(
unsigned
int
)
pwr_mPrv_RtWrite
,
"RtWrite"
},
{
(
unsigned
int
)
pwr_mPrv_RtWrite
,
"RtWrite"
},
...
@@ -982,6 +987,7 @@ static attrnav_sEnum enum_types[] = {
...
@@ -982,6 +987,7 @@ static attrnav_sEnum enum_types[] = {
{
(
int
)
ge_eAttrType_CurveDataType
,
(
attrnav_sEnumElement
*
)
&
elem_curve_datatype
},
{
(
int
)
ge_eAttrType_CurveDataType
,
(
attrnav_sEnumElement
*
)
&
elem_curve_datatype
},
{
(
int
)
glow_eType_Gradient
,
(
attrnav_sEnumElement
*
)
&
elem_gradient
},
{
(
int
)
glow_eType_Gradient
,
(
attrnav_sEnumElement
*
)
&
elem_gradient
},
{
(
int
)
glow_eType_HotIndication
,
(
attrnav_sEnumElement
*
)
&
elem_hot_indication
},
{
(
int
)
glow_eType_HotIndication
,
(
attrnav_sEnumElement
*
)
&
elem_hot_indication
},
{
(
int
)
glow_eType_AnnotType
,
(
attrnav_sEnumElement
*
)
&
elem_annot_type
},
{
0
,
NULL
}};
{
0
,
NULL
}};
static
attrnav_sEnum
mask_types
[]
=
{
static
attrnav_sEnum
mask_types
[]
=
{
...
@@ -1034,6 +1040,7 @@ int attrnav_attr_string_to_value( int type_id, char *value_str,
...
@@ -1034,6 +1040,7 @@ int attrnav_attr_string_to_value( int type_id, char *value_str,
case
glow_eType_Int
:
case
glow_eType_Int
:
case
glow_eType_Direction
:
case
glow_eType_Direction
:
case
glow_eType_Adjustment
:
case
glow_eType_Adjustment
:
case
glow_eType_AnnotType
:
case
glow_eType_Font
:
case
glow_eType_Font
:
case
glow_eType_Color
:
case
glow_eType_Color
:
case
glow_eType_Tone
:
case
glow_eType_Tone
:
...
@@ -1119,6 +1126,7 @@ void attrnav_attrvalue_to_string( int type_id, void *value_ptr,
...
@@ -1119,6 +1126,7 @@ void attrnav_attrvalue_to_string( int type_id, void *value_ptr,
}
}
case
glow_eType_Direction
:
case
glow_eType_Direction
:
case
glow_eType_Adjustment
:
case
glow_eType_Adjustment
:
case
glow_eType_AnnotType
:
case
glow_eType_Font
:
case
glow_eType_Font
:
case
glow_eType_Color
:
case
glow_eType_Color
:
case
glow_eType_Tone
:
case
glow_eType_Tone
:
...
@@ -2174,6 +2182,7 @@ ItemLocal::ItemLocal( AttrNav *attrnav, const char *item_name, const char *attr,
...
@@ -2174,6 +2182,7 @@ ItemLocal::ItemLocal( AttrNav *attrnav, const char *item_name, const char *attr,
{
{
case
glow_eType_Direction
:
case
glow_eType_Direction
:
case
glow_eType_Adjustment
:
case
glow_eType_Adjustment
:
case
glow_eType_AnnotType
:
case
glow_eType_Font
:
case
glow_eType_Font
:
case
glow_eType_Color
:
case
glow_eType_Color
:
case
glow_eType_Tone
:
case
glow_eType_Tone
:
...
...
xtt/lib/ge/src/ge_dyn.cpp
View file @
17da3024
...
@@ -156,6 +156,7 @@ static int check_format( char *format, int type)
...
@@ -156,6 +156,7 @@ static int check_format( char *format, int type)
return
1
;
return
1
;
break
;
break
;
case
pwr_eType_String
:
case
pwr_eType_String
:
case
pwr_eType_Text
:
if
(
*
s
==
's'
)
if
(
*
s
==
's'
)
return
1
;
return
1
;
break
;
break
;
...
@@ -3728,6 +3729,7 @@ int GeValue::scan( grow_tObject object)
...
@@ -3728,6 +3729,7 @@ int GeValue::scan( grow_tObject object)
break
;
break
;
}
}
case
pwr_eType_String
:
case
pwr_eType_String
:
case
pwr_eType_Text
:
if
(
!
first_scan
)
{
if
(
!
first_scan
)
{
if
(
strncmp
(
old_value
,
(
char
*
)
p
,
size
)
==
0
)
if
(
strncmp
(
old_value
,
(
char
*
)
p
,
size
)
==
0
)
// No change since last time
// No change since last time
...
...
xtt/lib/ge/src/ge_graph.cpp
View file @
17da3024
...
@@ -4373,7 +4373,15 @@ void Graph::string_to_type( char *type_str, pwr_eType *type,
...
@@ -4373,7 +4373,15 @@ void Graph::string_to_type( char *type_str, pwr_eType *type,
else
else
*
size
=
atoi
(
str
+
6
);
*
size
=
atoi
(
str
+
6
);
}
}
if
(
!
found
&&
strncmp
(
"BIT"
,
str
,
3
)
==
0
)
else
if
(
!
found
&&
strncmp
(
"TEXT"
,
str
,
4
)
==
0
)
{
*
type
=
pwr_eType_Text
;
if
(
*
(
str
+
4
)
==
0
)
*
size
=
80
;
else
*
size
=
atoi
(
str
+
4
);
}
else
if
(
!
found
&&
strncmp
(
"BIT"
,
str
,
3
)
==
0
)
{
{
*
type
=
(
pwr_eType
)
graph_eType_Bit
;
*
type
=
(
pwr_eType
)
graph_eType_Bit
;
*
size
=
4
;
*
size
=
4
;
...
...
xtt/lib/ge/src/ge_graph_command.cpp
View file @
17da3024
...
@@ -219,7 +219,7 @@ dcli_tCmdTable graph_command_table[] = {
...
@@ -219,7 +219,7 @@ dcli_tCmdTable graph_command_table[] = {
{
{
"EXPORT"
,
"EXPORT"
,
&
graph_export_func
,
&
graph_export_func
,
{
"dcli_arg1"
,
""
}
{
"dcli_arg1"
,
"
/SIGNATURE"
,
"
"
}
},
},
{
{
"DISABLE"
,
"DISABLE"
,
...
@@ -1576,9 +1576,16 @@ static int graph_export_func( void *client_data,
...
@@ -1576,9 +1576,16 @@ static int graph_export_func( void *client_data,
char
filename
[
120
];
char
filename
[
120
];
char
name
[
80
];
char
name
[
80
];
char
graph_name
[
80
];
char
graph_name
[
80
];
char
*
signature_p
;
char
signature
[
80
];
char
*
s
;
char
*
s
;
int
sts
;
int
sts
;
if
(
dcli_get_qualifier
(
"/SIGNATURE"
,
signature
,
sizeof
(
signature
)))
signature_p
=
signature
;
else
signature_p
=
0
;
if
(
!
graph
->
get_java_name
(
name
))
{
if
(
!
graph
->
get_java_name
(
name
))
{
// Set default name
// Set default name
graph
->
get_name
(
graph_name
);
graph
->
get_name
(
graph_name
);
...
@@ -1645,7 +1652,8 @@ static int graph_export_func( void *client_data,
...
@@ -1645,7 +1652,8 @@ static int graph_export_func( void *client_data,
// Compile frame
// Compile frame
graph
->
get_systemname
(
systemname
);
graph
->
get_systemname
(
systemname
);
sprintf
(
cmd
,
"$pwr_exe/ge_javac.sh java %s %s"
,
filename
,
systemname
);
sprintf
(
cmd
,
"$pwr_exe/ge_javac.sh java %s %s
\"
%s
\"
"
,
filename
,
systemname
,
signature
);
sts
=
system
(
cmd
);
sts
=
system
(
cmd
);
if
(
sts
!=
0
)
{
if
(
sts
!=
0
)
{
graph
->
message
(
'E'
,
"Java compilation errors"
);
graph
->
message
(
'E'
,
"Java compilation errors"
);
...
@@ -1670,7 +1678,8 @@ static int graph_export_func( void *client_data,
...
@@ -1670,7 +1678,8 @@ static int graph_export_func( void *client_data,
// Compile applet
// Compile applet
graph
->
get_systemname
(
systemname
);
graph
->
get_systemname
(
systemname
);
sprintf
(
cmd
,
"$pwr_exe/ge_javac.sh java_web %s %s"
,
filename
,
systemname
);
sprintf
(
cmd
,
"$pwr_exe/ge_javac.sh java_web %s %s
\"
%s
\"
"
,
filename
,
systemname
,
signature
);
sts
=
system
(
cmd
);
sts
=
system
(
cmd
);
if
(
sts
!=
0
)
{
if
(
sts
!=
0
)
{
graph
->
message
(
'E'
,
"Java compilation errors"
);
graph
->
message
(
'E'
,
"Java compilation errors"
);
...
...
xtt/lib/ge/src/ge_graph_web.cpp
View file @
17da3024
...
@@ -106,6 +106,7 @@ int Graph::generate_web( ldh_tSesContext ldhses)
...
@@ -106,6 +106,7 @@ int Graph::generate_web( ldh_tSesContext ldhses)
pwr_tString80
title
;
pwr_tString80
title
;
pwr_tString80
text
;
pwr_tString80
text
;
pwr_tString80
file_name
;
pwr_tString80
file_name
;
pwr_tString80
pwrhost
;
pwr_tBoolean
enable_login
;
pwr_tBoolean
enable_login
;
pwr_tBoolean
enable_alarmlist
;
pwr_tBoolean
enable_alarmlist
;
pwr_tBoolean
enable_eventlog
;
pwr_tBoolean
enable_eventlog
;
...
@@ -192,6 +193,14 @@ int Graph::generate_web( ldh_tSesContext ldhses)
...
@@ -192,6 +193,14 @@ int Graph::generate_web( ldh_tSesContext ldhses)
strcpy
(
text
,
value_p
);
strcpy
(
text
,
value_p
);
free
(
value_p
);
free
(
value_p
);
// Attribute PwrHost
sts
=
ldh_GetObjectPar
(
ldhses
,
webhandler_objid
,
"RtBody"
,
"PwrHost"
,
&
value_p
,
&
size
);
if
(
EVEN
(
sts
))
return
sts
;
strcpy
(
pwrhost
,
value_p
);
free
(
value_p
);
dcli_trim
(
pwrhost
,
pwrhost
);
// Attribute EnableLogin
// Attribute EnableLogin
sts
=
ldh_GetObjectPar
(
ldhses
,
webhandler_objid
,
"RtBody"
,
"EnableLogin"
,
sts
=
ldh_GetObjectPar
(
ldhses
,
webhandler_objid
,
"RtBody"
,
"EnableLogin"
,
&
value_p
,
&
size
);
&
value_p
,
&
size
);
...
@@ -241,7 +250,8 @@ int Graph::generate_web( ldh_tSesContext ldhses)
...
@@ -241,7 +250,8 @@ int Graph::generate_web( ldh_tSesContext ldhses)
strcpy
(
load_archives
,
(
char
*
)
value_p
);
strcpy
(
load_archives
,
(
char
*
)
value_p
);
free
(
value_p
);
free
(
value_p
);
strcpy
(
arlist
,
"pwr_rt_client.jar,pwr_jop.jar,pwr_jopc.jar,pwr_bcomp.jar,pwr_bcompfc.jar,pwr_abb.jar"
);
strcpy
(
arlist
,
"pwr_rt_client.jar,pwr_jop.jar,pwr_jopc.jar"
);
// strcat( arlist ",pwr_bcomp.jar,pwr_bcompfc.jar,pwr_abb.jar");
dcli_trim
(
load_archives
,
load_archives
);
dcli_trim
(
load_archives
,
load_archives
);
if
(
strcmp
(
load_archives
,
""
)
!=
0
)
{
if
(
strcmp
(
load_archives
,
""
)
!=
0
)
{
strcat
(
arlist
,
","
);
strcat
(
arlist
,
","
);
...
@@ -509,17 +519,34 @@ graph_text << "'," << resize << "," << width+20 << "," << height+20
...
@@ -509,17 +519,34 @@ graph_text << "'," << resize << "," << width+20 << "," << height+20
" <title>"
<<
title
<<
"</title>"
<<
endl
<<
" <title>"
<<
title
<<
"</title>"
<<
endl
<<
" </head>"
<<
endl
<<
" </head>"
<<
endl
<<
" <body>"
<<
endl
<<
" <body>"
<<
endl
<<
"<!--[if !IE]> -->"
<<
endl
<<
" <object classid=
\"
java:jpwr.jop.JopOpWindowApplet.class
\"
"
<<
endl
<<
" type=
\"
application/x-java-applet
\"
"
<<
endl
<<
" archive=
\"
"
<<
arlist
<<
",pwrp_"
<<
sname
<<
"_web.jar
\"
"
<<
endl
<<
" width=100% height=100% >"
<<
endl
<<
" <param name =
\"
code
\"
value=
\"
jpwr.jop.JopOpWindowApplet.class
\"
>"
<<
endl
<<
" <param name =
\"
archive
\"
value=
\"
"
<<
arlist
<<
",pwrp_"
<<
sname
<<
"_web.jar
\"
>"
<<
endl
<<
" <param name=
\"
persistState
\"
value=
\"
false
\"
/>"
<<
endl
<<
" <param name=
\"
scriptable
\"
value=
\"
false
\"
>"
<<
endl
;
if
(
strcmp
(
pwrhost
,
""
)
!=
0
)
fp_ow
<<
" <param name=
\"
pwrhost
\"
value=
\"
"
<<
pwrhost
<<
"
\"
>"
<<
endl
;
fp_ow
<<
" </object>"
<<
endl
<<
"<!--<![endif]--> "
<<
endl
<<
"<!--[if IE]>"
<<
endl
<<
" <object classid=
\"
clsid:8AD9C840-044E-11D1-B3E9-00805F499D93
\"
"
<<
endl
<<
" <object classid=
\"
clsid:8AD9C840-044E-11D1-B3E9-00805F499D93
\"
"
<<
endl
<<
" width=100% height=100% codebase=
\"
"
<<
codebase
<<
"
\"
>"
<<
endl
<<
" width=100% height=100% codebase=
\"
"
<<
codebase
<<
"
\"
>"
<<
endl
<<
" <param name = code value=jpwr.jop.JopOpWindowApplet.class >"
<<
endl
<<
" <param name = code value=jpwr.jop.JopOpWindowApplet.class >"
<<
endl
<<
" <param name =
\"
archive
\"
value=
\"
"
<<
arlist
<<
",pwrp_"
<<
sname
<<
"_web.jar
\"
>"
<<
endl
<<
" <param name =
\"
archive
\"
value=
\"
"
<<
arlist
<<
",pwrp_"
<<
sname
<<
"_web.jar
\"
>"
<<
endl
<<
" <param name=
\"
type
\"
value=
\"
application/x-java-applet;version=1.3
\"
>"
<<
endl
<<
" <param name=
\"
type
\"
value=
\"
application/x-java-applet;version=1.3
\"
>"
<<
endl
<<
" <param name=
\"
scriptable
\"
value=
\"
false
\"
>"
<<
endl
<<
" <param name=
\"
scriptable
\"
value=
\"
false
\"
>"
<<
endl
;
" <embed type=
\"
application/x-java-applet;version=1.4
\"
"
<<
endl
<<
if
(
strcmp
(
pwrhost
,
""
)
!=
0
)
" code = jpwr.jop.JopOpWindowApplet.class "
<<
endl
<<
fp_ow
<<
" archive=
\"
"
<<
arlist
<<
",pwrp_"
<<
sname
<<
"_web.jar
\"
"
<<
endl
<<
" <param name=
\"
pwrhost
\"
value=
\"
"
<<
pwrhost
<<
"
\"
>"
<<
endl
;
" width = 100% height = 100% scriptable=false "
<<
endl
<<
fp_ow
<<
" pluginspage=
\"
http://java.sun.com/products/plugin/index.html#download
\"
>"
<<
endl
<<
" </object>"
<<
endl
<<
"<![endif]-->"
<<
endl
<<
" </body>"
<<
endl
<<
" </body>"
<<
endl
<<
"</html>"
<<
endl
;
"</html>"
<<
endl
;
fp_ow
.
close
();
fp_ow
.
close
();
...
...
xtt/lib/glow/src/glow.h
View file @
17da3024
...
@@ -98,7 +98,8 @@ typedef enum {
...
@@ -98,7 +98,8 @@ typedef enum {
glow_eType_Adjustment
,
//!< Type is glow_eAdjustment
glow_eType_Adjustment
,
//!< Type is glow_eAdjustment
glow_eType_Font
,
//!< Type is glow_eFont
glow_eType_Font
,
//!< Type is glow_eFont
glow_eType_Gradient
,
//!< Type is glow_eGradient
glow_eType_Gradient
,
//!< Type is glow_eGradient
glow_eType_HotIndication
//!< Type is glow_eHotIndication
glow_eType_HotIndication
,
//!< Type is glow_eHotIndication
glow_eType_AnnotType
//!< Type is glow_eAnnotType
}
glow_eType
;
}
glow_eType
;
//! Type of Ctx class
//! Type of Ctx class
...
...
xtt/lib/glow/src/glow_growapi.cpp
View file @
17da3024
...
@@ -1601,6 +1601,11 @@ int grow_GetObjectAttrInfo( grow_tObject object, char *transtab,
...
@@ -1601,6 +1601,11 @@ int grow_GetObjectAttrInfo( grow_tObject object, char *transtab,
attrinfo
[
i
].
type
=
glow_eType_Font
;
attrinfo
[
i
].
type
=
glow_eType_Font
;
attrinfo
[
i
++
].
size
=
sizeof
(
op
->
font
);
attrinfo
[
i
++
].
size
=
sizeof
(
op
->
font
);
strcpy
(
attrinfo
[
i
].
name
,
"Type"
);
attrinfo
[
i
].
value_p
=
&
op
->
annot_type
;
attrinfo
[
i
].
type
=
glow_eType_AnnotType
;
attrinfo
[
i
++
].
size
=
sizeof
(
op
->
annot_type
);
break
;
break
;
}
}
case
glow_eObjectType_GrowText
:
case
glow_eObjectType_GrowText
:
...
...
xtt/lib/xtt/gtk/xtt_xattone_gtk.cpp
View file @
17da3024
...
@@ -145,9 +145,12 @@ int XAttOneGtk::change_value( int set_focus)
...
@@ -145,9 +145,12 @@ int XAttOneGtk::change_value( int set_focus)
sts
=
gdh_GetObjectInfoAttrref
(
&
aref
,
aval
,
sizeof
(
aval
));
sts
=
gdh_GetObjectInfoAttrref
(
&
aref
,
aval
,
sizeof
(
aval
));
if
(
EVEN
(
sts
))
return
sts
;
if
(
EVEN
(
sts
))
return
sts
;
if
(
atype
==
pwr_eType_Text
)
value
=
aval
;
else
{
XNav
::
attrvalue_to_string
(
atype
,
atype
,
&
aval
,
buf
,
sizeof
(
buf
),
&
len
,
NULL
);
XNav
::
attrvalue_to_string
(
atype
,
atype
,
&
aval
,
buf
,
sizeof
(
buf
),
&
len
,
NULL
);
value
=
buf
;
value
=
buf
;
}
if
(
!
access_rw
)
{
if
(
!
access_rw
)
{
gtk_label_set_text
(
GTK_LABEL
(
cmd_label
),
buf
);
gtk_label_set_text
(
GTK_LABEL
(
cmd_label
),
buf
);
...
...
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