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
14e57a76
Commit
14e57a76
authored
Mar 03, 2005
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Postscript print from xtt
parent
90e4af94
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
201 additions
and
2 deletions
+201
-2
src/exp/com/src/os_linux/rt_print.sh
src/exp/com/src/os_linux/rt_print.sh
+28
-0
xtt/exe/rt_xtt/src/rt_xtt.cpp
xtt/exe/rt_xtt/src/rt_xtt.cpp
+8
-1
xtt/lib/xtt/src/xtt_ev.cpp
xtt/lib/xtt/src/xtt_ev.cpp
+43
-0
xtt/lib/xtt/src/xtt_evlist.cpp
xtt/lib/xtt/src/xtt_evlist.cpp
+5
-0
xtt/lib/xtt/src/xtt_evlist.h
xtt/lib/xtt/src/xtt_evlist.h
+1
-0
xtt/lib/xtt/src/xtt_ge.cpp
xtt/lib/xtt/src/xtt_ge.cpp
+13
-0
xtt/lib/xtt/src/xtt_ge.h
xtt/lib/xtt/src/xtt_ge.h
+1
-0
xtt/lib/xtt/src/xtt_hist.cpp
xtt/lib/xtt/src/xtt_hist.cpp
+11
-0
xtt/lib/xtt/src/xtt_item.cpp
xtt/lib/xtt/src/xtt_item.cpp
+3
-1
xtt/lib/xtt/src/xtt_xnav.cpp
xtt/lib/xtt/src/xtt_xnav.cpp
+37
-0
xtt/lib/xtt/src/xtt_xnav_command.cpp
xtt/lib/xtt/src/xtt_xnav_command.cpp
+51
-0
No files found.
src/exp/com/src/os_linux/rt_print.sh
0 → 100755
View file @
14e57a76
#! /bin/bash
#
FileName
=
"
$1
"
Color
=
"
$2
"
Printer
=
"
$pwr_rt_print
"
ColorPrinter
=
"
$pwr_rt_colorprint
"
if
[
"
$Color
"
==
"1"
]
;
then
if
[
-z
"
$pwr_rt_colorprint
"
]
;
then
Printer
=
$pwr_rt_print
else
Printer
=
$pwr_rt_colorprint
fi
else
if
[
-z
"
$pwr_rt_print
"
]
;
then
Printer
=
$pwr_rt_colorprint
else
Printer
=
$pwr_rt_print
fi
fi
if
[
-z
"
$Printer
"
]
;
then
echo
"Printer is not defined in env 'pwr_rt_print'"
else
echo
"Printing
$1
"
$Printer
$1
fi
xtt/exe/rt_xtt/src/rt_xtt.cpp
View file @
14e57a76
...
...
@@ -515,7 +515,14 @@ static void xtt_activate_exit( Widget w, Xtt *xtt, XmAnyCallbackStruct *data)
static
void
xtt_activate_print
(
Widget
w
,
Xtt
*
xtt
,
XmAnyCallbackStruct
*
data
)
{
xtt
->
xnav
->
print
(
"pwrp_tmp:xnav.ps"
);
pwr_tFileName
filename
;
pwr_tCmd
cmd
;
dcli_translate_filename
(
filename
,
"$pwrp_tmp/xnav.ps"
);
xtt
->
xnav
->
print
(
filename
);
sprintf
(
cmd
,
"$pwr_exe/rt_print.sh %s"
,
filename
);
system
(
cmd
);
}
static
void
xtt_activate_find
(
Widget
w
,
Xtt
*
xtt
,
XmAnyCallbackStruct
*
data
)
...
...
xtt/lib/xtt/src/xtt_ev.cpp
View file @
14e57a76
...
...
@@ -13,6 +13,7 @@
extern
"C"
{
#include "co_cdh.h"
#include "co_time.h"
#include "co_dcli.h"
#include "pwr_baseclasses.h"
#include "rt_gdh.h"
#include "rt_mh.h"
...
...
@@ -53,6 +54,9 @@ static void ev_blk_action_inputfocus( Widget w, XmAnyCallbackStruct *data);
static
void
ev_eve_activate_exit
(
Widget
w
,
Ev
*
ev
,
XmAnyCallbackStruct
*
data
);
static
void
ev_ala_activate_exit
(
Widget
w
,
Ev
*
ev
,
XmAnyCallbackStruct
*
data
);
static
void
ev_blk_activate_exit
(
Widget
w
,
Ev
*
ev
,
XmAnyCallbackStruct
*
data
);
static
void
ev_eve_activate_print
(
Widget
w
,
Ev
*
ev
,
XmAnyCallbackStruct
*
data
);
static
void
ev_ala_activate_print
(
Widget
w
,
Ev
*
ev
,
XmAnyCallbackStruct
*
data
);
static
void
ev_blk_activate_print
(
Widget
w
,
Ev
*
ev
,
XmAnyCallbackStruct
*
data
);
static
void
ev_eve_activate_ack_last
(
Widget
w
,
Ev
*
ev
,
XmAnyCallbackStruct
*
data
);
static
void
ev_ala_activate_ack_last
(
Widget
w
,
Ev
*
ev
,
XmAnyCallbackStruct
*
data
);
static
void
ev_eve_activate_zoom_in
(
Widget
w
,
Ev
*
ev
,
XmAnyCallbackStruct
*
data
);
...
...
@@ -151,6 +155,7 @@ Ev::Ev(
static
MrmRegisterArg
reglist
[]
=
{
{
"ev_ctx"
,
0
},
{
"ev_eve_activate_exit"
,(
caddr_t
)
ev_eve_activate_exit
},
{
"ev_eve_activate_print"
,(
caddr_t
)
ev_eve_activate_print
},
{
"ev_eve_activate_ack_last"
,(
caddr_t
)
ev_eve_activate_ack_last
},
{
"ev_eve_activate_zoom_in"
,(
caddr_t
)
ev_eve_activate_zoom_in
},
{
"ev_eve_activate_zoom_out"
,(
caddr_t
)
ev_eve_activate_zoom_out
},
...
...
@@ -164,6 +169,7 @@ Ev::Ev(
{
"ev_eve_activate_helpevent"
,(
caddr_t
)
ev_eve_activate_helpevent
},
{
"ev_eve_create_form"
,(
caddr_t
)
ev_eve_create_form
},
{
"ev_ala_activate_exit"
,(
caddr_t
)
ev_ala_activate_exit
},
{
"ev_ala_activate_print"
,(
caddr_t
)
ev_ala_activate_print
},
{
"ev_ala_activate_ack_last"
,(
caddr_t
)
ev_ala_activate_ack_last
},
{
"ev_ala_activate_zoom_in"
,(
caddr_t
)
ev_ala_activate_zoom_in
},
{
"ev_ala_activate_zoom_out"
,(
caddr_t
)
ev_ala_activate_zoom_out
},
...
...
@@ -177,6 +183,7 @@ Ev::Ev(
{
"ev_ala_activate_helpevent"
,(
caddr_t
)
ev_ala_activate_helpevent
},
{
"ev_ala_create_form"
,(
caddr_t
)
ev_ala_create_form
},
{
"ev_blk_activate_exit"
,(
caddr_t
)
ev_blk_activate_exit
},
{
"ev_blk_activate_print"
,(
caddr_t
)
ev_blk_activate_print
},
{
"ev_blk_activate_zoom_in"
,(
caddr_t
)
ev_blk_activate_zoom_in
},
{
"ev_blk_activate_zoom_out"
,(
caddr_t
)
ev_blk_activate_zoom_out
},
{
"ev_blk_activate_zoom_reset"
,(
caddr_t
)
ev_blk_activate_zoom_reset
},
...
...
@@ -557,6 +564,42 @@ static void ev_blk_activate_exit( Widget w, Ev *ev, XmAnyCallbackStruct *data)
ev
->
blk_displayed
=
0
;
}
static
void
ev_eve_activate_print
(
Widget
w
,
Ev
*
ev
,
XmAnyCallbackStruct
*
data
)
{
pwr_tFileName
filename
;
pwr_tCmd
cmd
;
dcli_translate_filename
(
filename
,
"$pwrp_tmp/xnav.ps"
);
ev
->
eve
->
print
(
filename
);
sprintf
(
cmd
,
"$pwr_exe/rt_print.sh %s"
,
filename
);
system
(
cmd
);
}
static
void
ev_ala_activate_print
(
Widget
w
,
Ev
*
ev
,
XmAnyCallbackStruct
*
data
)
{
pwr_tFileName
filename
;
pwr_tCmd
cmd
;
dcli_translate_filename
(
filename
,
"$pwrp_tmp/xnav.ps"
);
ev
->
ala
->
print
(
filename
);
sprintf
(
cmd
,
"$pwr_exe/rt_print.sh %s"
,
filename
);
system
(
cmd
);
}
static
void
ev_blk_activate_print
(
Widget
w
,
Ev
*
ev
,
XmAnyCallbackStruct
*
data
)
{
pwr_tFileName
filename
;
pwr_tCmd
cmd
;
dcli_translate_filename
(
filename
,
"$pwrp_tmp/xnav.ps"
);
ev
->
blk
->
print
(
filename
);
sprintf
(
cmd
,
"$pwr_exe/rt_print.sh %s"
,
filename
);
system
(
cmd
);
}
static
void
ev_eve_activate_ack_last
(
Widget
w
,
Ev
*
ev
,
XmAnyCallbackStruct
*
data
)
{
mh_sEventId
*
id
;
...
...
xtt/lib/xtt/src/xtt_evlist.cpp
View file @
14e57a76
...
...
@@ -769,6 +769,11 @@ void EvList::event_return( mh_sReturn *msg)
}
}
void
EvList
::
print
(
char
*
filename
)
{
brow_Print
(
brow
->
ctx
,
filename
);
}
void
EvList
::
event_clear_alarmlist
(
pwr_tNodeIndex
nix
)
{
int
i
;
...
...
xtt/lib/xtt/src/xtt_evlist.h
View file @
14e57a76
...
...
@@ -177,6 +177,7 @@ class EvList {
int
get_selected_event
(
char
*
eventname
);
int
get_destination
(
pwr_tTime
time
,
void
**
dest
);
void
block_remove
();
void
print
(
char
*
filename
);
};
class
ItemAlarm
{
...
...
xtt/lib/xtt/src/xtt_ge.cpp
View file @
14e57a76
...
...
@@ -29,6 +29,7 @@ extern "C" {
#include "rt_gdh.h"
#include "rt_gdh_msg.h"
#include "co_cdh.h"
#include "co_dcli.h"
#include "co_time.h"
#include "co_mrm_util.h"
}
...
...
@@ -376,6 +377,18 @@ void ge_pop( ge_tCtx gectx)
flow_MapWidget
(
gectx
->
toplevel
);
}
void
ge_print
(
ge_tCtx
gectx
)
{
pwr_tFileName
filename
;
pwr_tCmd
cmd
;
dcli_translate_filename
(
filename
,
"$pwrp_tmp/graph.ps"
);
((
Graph
*
)
gectx
->
graph
)
->
print
(
filename
);
sprintf
(
cmd
,
"$pwr_exe/rt_print.sh %s 1"
,
filename
);
system
(
cmd
);
}
void
ge_swap
(
ge_tCtx
gectx
,
int
mode
)
{
((
Graph
*
)
gectx
->
graph
)
->
swap
(
mode
);
...
...
xtt/lib/xtt/src/xtt_ge.h
View file @
14e57a76
...
...
@@ -57,6 +57,7 @@ typedef struct ge_sCtx {
}
*
ge_tCtx
;
void
ge_pop
(
ge_tCtx
gectx
);
void
ge_print
(
ge_tCtx
gectx
);
int
ge_set_object_focus
(
ge_tCtx
gectx
,
char
*
name
,
int
empty
);
int
ge_set_folder_index
(
ge_tCtx
gectx
,
char
*
name
,
int
idx
);
void
ge_swap
(
ge_tCtx
gectx
,
int
mode
);
...
...
xtt/lib/xtt/src/xtt_hist.cpp
View file @
14e57a76
...
...
@@ -64,6 +64,8 @@ static void hist_action_inputfocus( Widget w, XmAnyCallbackStruct *data);
static
void
hist_activate_exit
(
Widget
w
,
Hist
*
histOP
,
XmAnyCallbackStruct
*
data
);
static
void
hist_activate_print
(
Widget
w
,
Hist
*
histOP
,
XmAnyCallbackStruct
*
data
);
static
void
hist_activate_zoom_in
(
Widget
w
,
Hist
*
histOP
,
XmAnyCallbackStruct
*
data
);
static
void
hist_activate_zoom_out
(
Widget
w
,
Hist
*
histOP
,
XmAnyCallbackStruct
*
data
);
...
...
@@ -188,6 +190,7 @@ Hist::Hist(
static
MrmRegisterArg
reglist
[]
=
{
{
"hist_ctx"
,
0
},
{
"hist_activate_exit"
,(
caddr_t
)
hist_activate_exit
},
{
"hist_activate_print"
,(
caddr_t
)
hist_activate_print
},
{
"hist_activate_zoom_in"
,(
caddr_t
)
hist_activate_zoom_in
},
{
"hist_activate_zoom_out"
,(
caddr_t
)
hist_activate_zoom_out
},
{
"hist_activate_zoom_reset"
,(
caddr_t
)
hist_activate_zoom_reset
},
...
...
@@ -431,6 +434,14 @@ static void hist_activate_exit( Widget w, Hist *histOP, XmAnyCallbackStruct *dat
//flow_UnmapWidget( histOP->parent_wid_hist);
}
static
void
hist_activate_print
(
Widget
w
,
Hist
*
histOP
,
XmAnyCallbackStruct
*
data
)
{
char
filename
[
200
];
dcli_translate_filename
(
filename
,
"$pwrp_tmp/xnav.ps"
);
histOP
->
hist
->
print
(
filename
);
}
static
void
hist_activate_zoom_in
(
Widget
w
,
Hist
*
histOP
,
XmAnyCallbackStruct
*
data
)
{
histOP
->
hist
->
zoom
(
1.2
);
...
...
xtt/lib/xtt/src/xtt_item.cpp
View file @
14e57a76
...
...
@@ -619,7 +619,7 @@ int ItemBaseAttr::open_children( XNavBrow *brow, double x, double y)
}
free
(
(
char
*
)
vd
);
}
else
{
else
if
(
type_id
==
pwr_eType_Mask
)
{
gdh_sBitDef
*
bd
;
int
rows
;
...
...
@@ -637,6 +637,8 @@ int ItemBaseAttr::open_children( XNavBrow *brow, double x, double y)
}
free
(
(
char
*
)
bd
);
}
else
return
0
;
brow_SetOpen
(
node
,
xnav_mOpen_Children
);
brow_SetAnnotPixmap
(
node
,
1
,
brow
->
pixmap_openmap
);
...
...
xtt/lib/xtt/src/xtt_xnav.cpp
View file @
14e57a76
...
...
@@ -101,6 +101,7 @@ int xnav_get_trace_attr( pwr_sAttrRef *arp, char *attr)
case
pwr_cClass_Ii
:
case
pwr_cClass_Io
:
case
pwr_cClass_Iv
:
case
pwr_cClass_Sv
:
strcpy
(
attr
,
"ActualValue"
);
break
;
case
pwr_cClass_ChanDi
:
...
...
@@ -158,6 +159,13 @@ int xnav_get_trace_attr( pwr_sAttrRef *arp, char *attr)
case
pwr_cClass_inv
:
case
pwr_cClass_waith
:
case
pwr_cClass_darithm
:
case
pwr_cClass_Even
:
case
pwr_cClass_Odd
:
case
pwr_cClass_Equal
:
case
pwr_cClass_GreaterEqual
:
case
pwr_cClass_GreaterThan
:
case
pwr_cClass_LessEqual
:
case
pwr_cClass_LessThan
:
strcpy
(
attr
,
"Status"
);
break
;
case
pwr_cClass_DSup
:
...
...
@@ -177,6 +185,35 @@ int xnav_get_trace_attr( pwr_sAttrRef *arp, char *attr)
case
pwr_cClass_adelay
:
case
pwr_cClass_aarithm
:
case
pwr_cClass_timint
:
case
pwr_cClass_IAbs
:
case
pwr_cClass_IAdd
:
case
pwr_cClass_IDiv
:
case
pwr_cClass_ILimit
:
case
pwr_cClass_IMax
:
case
pwr_cClass_IMin
:
case
pwr_cClass_IMul
:
case
pwr_cClass_ISel
:
case
pwr_cClass_ISub
:
case
pwr_cClass_IMux
:
case
pwr_cClass_Add
:
case
pwr_cClass_Div
:
case
pwr_cClass_Mul
:
case
pwr_cClass_Max
:
case
pwr_cClass_Min
:
case
pwr_cClass_Mux
:
case
pwr_cClass_Sub
:
case
pwr_cClass_Sin
:
case
pwr_cClass_Cos
:
case
pwr_cClass_Tan
:
case
pwr_cClass_ASin
:
case
pwr_cClass_ACos
:
case
pwr_cClass_ATan
:
case
pwr_cClass_Exp
:
case
pwr_cClass_Log
:
case
pwr_cClass_Ln
:
case
pwr_cClass_Sqrt
:
case
pwr_cClass_Abs
:
case
pwr_cClass_Mod
:
strcpy
(
attr
,
"ActVal"
);
break
;
case
pwr_cClass_maxmin
:
...
...
xtt/lib/xtt/src/xtt_xnav_command.cpp
View file @
14e57a76
...
...
@@ -155,6 +155,8 @@ static int xnav_call_func( void *client_data,
void
*
client_flag
);
static
int
xnav_check_func
(
void
*
client_data
,
void
*
client_flag
);
static
int
xnav_print_func
(
void
*
client_data
,
void
*
client_flag
);
dcli_tCmdTable
xnav_command_table
[]
=
{
{
...
...
@@ -296,6 +298,13 @@ dcli_tCmdTable xnav_command_table[] = {
&
xnav_check_func
,
{
"dcli_arg1"
,
"/METHOD"
,
"/OBJECT"
,
""
}
},
{
"PRINT"
,
&
xnav_print_func
,
{
"dcli_arg1"
,
"dcli_arg2"
,
"/NAME"
,
"/FILE"
,
"/OBJECT"
,
""
}
},
{
""
,}};
...
...
@@ -4235,6 +4244,48 @@ static int xnav_check_func( void *client_data,
}
static
int
xnav_print_func
(
void
*
client_data
,
void
*
client_flag
)
{
XNav
*
xnav
=
(
XNav
*
)
client_data
;
char
arg1_str
[
80
];
int
arg1_sts
;
arg1_sts
=
dcli_get_qualifier
(
"dcli_arg1"
,
arg1_str
);
if
(
strncmp
(
arg1_str
,
"GRAPH"
,
strlen
(
arg1_str
))
==
0
)
{
char
file_str
[
80
];
char
name_str
[
80
]
=
""
;
ge_tCtx
gectx
;
char
fname
[
200
];
if
(
ODD
(
dcli_get_qualifier
(
"dcli_arg2"
,
file_str
)))
{
if
(
file_str
[
0
]
==
'/'
)
{
xnav
->
message
(
'E'
,
"Syntax error"
);
return
XNAV__HOLDCOMMAND
;
}
}
else
if
(
ODD
(
dcli_get_qualifier
(
"/FILE"
,
file_str
)))
{
// Get base class graphs on $pwr_exe
cdh_ToLower
(
fname
,
file_str
);
}
if
(
xnav
->
appl
.
find
(
applist_eType_Graph
,
file_str
,
name_str
,
(
void
**
)
&
gectx
))
ge_print
(
gectx
);
else
{
xnav
->
message
(
'E'
,
"Graph not found"
);
return
XNAV__HOLDCOMMAND
;
}
}
else
xnav
->
message
(
'E'
,
"Syntax error"
);
return
XNAV__SUCCESS
;
}
int
XNav
::
show_database
()
{
int
sts
;
...
...
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