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
c5ae65ac
Commit
c5ae65ac
authored
Nov 17, 2005
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Help callback in curve window
parent
409440f4
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
50 additions
and
13 deletions
+50
-13
xtt/lib/ge/src/ge_curve.cpp
xtt/lib/ge/src/ge_curve.cpp
+20
-6
xtt/lib/ge/src/ge_curve.h
xtt/lib/ge/src/ge_curve.h
+2
-1
xtt/lib/xtt/src/xtt_fast.cpp
xtt/lib/xtt/src/xtt_fast.cpp
+12
-2
xtt/lib/xtt/src/xtt_fast.h
xtt/lib/xtt/src/xtt_fast.h
+2
-1
xtt/lib/xtt/src/xtt_trend.cpp
xtt/lib/xtt/src/xtt_trend.cpp
+12
-2
xtt/lib/xtt/src/xtt_trend.h
xtt/lib/xtt/src/xtt_trend.h
+2
-1
No files found.
xtt/lib/ge/src/ge_curve.cpp
View file @
c5ae65ac
/*
* Proview $Id: ge_curve.cpp,v 1.
7 2005-11-14 16:18:32
claes Exp $
* Proview $Id: ge_curve.cpp,v 1.
8 2005-11-17 09:03:20
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -188,6 +188,8 @@ static void gec_activate_xlimits( Widget w, GeCurve *curve,
static
void
gec_activate_help
(
Widget
w
,
GeCurve
*
curve
,
XmAnyCallbackStruct
*
data
)
{
if
(
curve
->
help_cb
)
(
curve
->
help_cb
)(
curve
->
parent_ctx
);
}
static
void
gec_create_pane
(
Widget
w
,
GeCurve
*
curve
,
XmAnyCallbackStruct
*
data
)
...
...
@@ -898,7 +900,7 @@ GeCurve::GeCurve( void *gc_parent_ctx,
border_dark
(
glow_eDrawType_Color28
),
border_bright
(
glow_eDrawType_Color22
),
cd
(
0
),
axis_window_width
(
0
),
auto_refresh
(
1
),
axis_displayed
(
1
),
minmax_idx
(
0
),
close_cb
(
0
),
initial_right_position
(
pos_right
)
minmax_idx
(
0
),
close_cb
(
0
),
help_cb
(
0
),
initial_right_position
(
pos_right
)
{
char
uid_filename
[
120
]
=
{
"xtt_curve.uid"
};
char
*
uid_filename_p
=
uid_filename
;
...
...
@@ -1251,7 +1253,7 @@ void GeCurveData::scale( int axis_type, int value_type,
minval
=
i_value
;
min_lines
=
abs
(
i_value
);
}
else
if
(
max_value
-
min_value
<
3
000
)
{
else
if
(
max_value
-
min_value
<
1
000
)
{
i_value
=
int
(
max_value
/
10
)
*
10
+
10
;
maxval
=
i_value
;
max_lines
=
i_value
/
10
;
...
...
@@ -1263,6 +1265,18 @@ void GeCurveData::scale( int axis_type, int value_type,
minval
=
i_value
;
min_lines
=
abs
(
i_value
)
/
10
;
}
else
if
(
max_value
-
min_value
<
3000
)
{
i_value
=
int
(
max_value
/
50
)
*
50
+
50
;
maxval
=
i_value
;
max_lines
=
i_value
/
50
;
if
(
fabs
(
min_value
)
<
DBL_EPSILON
)
i_value
=
0
;
else
i_value
=
int
(
min_value
/
50
)
*
50
-
50
;
minval
=
i_value
;
min_lines
=
abs
(
i_value
)
/
50
;
}
else
if
(
max_value
-
min_value
<
10000
)
{
i_value
=
int
(
max_value
/
100
)
*
100
+
100
;
maxval
=
i_value
;
...
...
@@ -1322,7 +1336,7 @@ void GeCurveData::scale( int axis_type, int value_type,
format_type
=
1
;
}
else
{
i_value
=
int
(
max_value
/
600
)
*
3600
+
3600
;
i_value
=
int
(
max_value
/
3
600
)
*
3600
+
3600
;
maxval
=
i_value
;
max_lines
=
i_value
/
3600
;
...
...
@@ -1332,8 +1346,8 @@ void GeCurveData::scale( int axis_type, int value_type,
i_value
=
int
(
min_value
/
3600
)
*
3600
-
3600
;
minval
=
i_value
;
min_lines
=
abs
(
i_value
)
/
3600
;
axlinequot
=
2
;
axvaluequot
=
2
;
axlinequot
=
2
*
int
((
max_value
-
min_value
)
/
140000
)
;
axvaluequot
=
2
*
int
((
max_value
-
min_value
)
/
140000
)
;
format_type
=
2
;
}
}
...
...
xtt/lib/ge/src/ge_curve.h
View file @
c5ae65ac
/*
* Proview $Id: ge_curve.h,v 1.
6 2005-11-14 16:18:32
claes Exp $
* Proview $Id: ge_curve.h,v 1.
7 2005-11-17 09:03:20
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -133,6 +133,7 @@ class GeCurve {
int
axis_displayed
;
int
minmax_idx
;
void
(
*
close_cb
)(
void
*
);
void
(
*
help_cb
)(
void
*
);
int
initial_right_position
;
char
title
[
300
];
...
...
xtt/lib/xtt/src/xtt_fast.cpp
View file @
c5ae65ac
/*
* Proview $Id: xtt_fast.cpp,v 1.
5 2005-11-14 16:15:02
claes Exp $
* Proview $Id: xtt_fast.cpp,v 1.
6 2005-11-17 09:03:20
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -60,6 +60,7 @@ extern "C" {
}
static
void
fast_close_cb
(
void
*
ctx
);
static
void
fast_help_cb
(
void
*
ctx
);
static
void
fast_scan
(
XttFast
*
fast
);
XttFast
::
XttFast
(
...
...
@@ -69,7 +70,7 @@ XttFast::XttFast(
Widget
*
w
,
pwr_sAttrRef
*
fast_arp
,
int
*
sts
)
:
xnav
(
parent_ctx
),
parent_widget
(
parent_wid
),
fast_cnt
(
0
),
close_cb
(
0
),
first_scan
(
1
),
xnav
(
parent_ctx
),
parent_widget
(
parent_wid
),
fast_cnt
(
0
),
close_cb
(
0
),
help_cb
(
0
),
first_scan
(
1
),
axis_configured
(
false
)
{
pwr_sAttrRef
aref
=
pwr_cNAttrRef
;
...
...
@@ -201,6 +202,7 @@ XttFast::XttFast(
cdh_StrncpyCutOff
(
title
,
name
,
sizeof
(
title
),
1
);
curve
=
new
GeCurve
(
this
,
parent_widget
,
title
,
NULL
,
gcd
,
0
);
curve
->
close_cb
=
fast_close_cb
;
curve
->
help_cb
=
fast_help_cb
;
// timerid = XtAppAddTimeOut(
// XtWidgetToApplicationContext(parent_widget), 1000,
...
...
@@ -232,6 +234,14 @@ static void fast_close_cb( void *ctx)
delete
fast
;
}
static
void
fast_help_cb
(
void
*
ctx
)
{
XttFast
*
fast
=
(
XttFast
*
)
ctx
;
if
(
fast
->
help_cb
)
(
fast
->
help_cb
)(
fast
->
xnav
,
"fastwindow"
);
}
void
fast_scan
(
XttFast
*
fast
)
{
int
i
,
j
,
k
;
...
...
xtt/lib/xtt/src/xtt_fast.h
View file @
c5ae65ac
/*
* Proview $Id: xtt_fast.h,v 1.
3 2005-09-01 14:57:48
claes Exp $
* Proview $Id: xtt_fast.h,v 1.
4 2005-11-17 09:03:20
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -82,6 +82,7 @@ class XttFast {
int
max_points
;
//!< Max number of points in curves.
XtIntervalId
timerid
;
//!< Time id for scan.
void
(
*
close_cb
)(
void
*
,
XttFast
*
);
//!< Close callback to parent.
void
(
*
help_cb
)(
void
*
,
char
*
);
//!< Open help window.
pwr_tBoolean
old_new
;
//!< Old value of new. Used to detect edge of New.
pwr_tMask
fast_function
;
//!< Function configured in DsFastCurve object.
bool
first_scan
;
//!< Indicates that this is the first scan.
...
...
xtt/lib/xtt/src/xtt_trend.cpp
View file @
c5ae65ac
/*
* Proview $Id: xtt_trend.cpp,v 1.
6 2005-11-14 16:14:55
claes Exp $
* Proview $Id: xtt_trend.cpp,v 1.
7 2005-11-17 09:03:20
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -59,6 +59,7 @@ extern "C" {
}
static
void
trend_close_cb
(
void
*
ctx
);
static
void
trend_help_cb
(
void
*
ctx
);
static
void
trend_scan
(
XttTrend
*
trend
);
XttTrend
::
XttTrend
(
...
...
@@ -69,7 +70,7 @@ XttTrend::XttTrend(
pwr_sAttrRef
*
trend_list
,
pwr_sAttrRef
*
plotgroup
,
int
*
sts
)
:
xnav
(
parent_ctx
),
parent_widget
(
parent_wid
),
trend_cnt
(
0
),
close_cb
(
0
)
xnav
(
parent_ctx
),
parent_widget
(
parent_wid
),
trend_cnt
(
0
),
close_cb
(
0
)
,
help_cb
(
0
)
{
pwr_sAttrRef
*
aref_list
;
pwr_sAttrRef
*
aref_p
;
...
...
@@ -268,6 +269,7 @@ XttTrend::XttTrend(
curve
=
new
GeCurve
(
this
,
parent_widget
,
name
,
NULL
,
gcd
,
1
);
curve
->
close_cb
=
trend_close_cb
;
curve
->
help_cb
=
trend_help_cb
;
timerid
=
XtAppAddTimeOut
(
XtWidgetToApplicationContext
(
parent_widget
),
1000
,
...
...
@@ -299,6 +301,14 @@ static void trend_close_cb( void *ctx)
delete
trend
;
}
static
void
trend_help_cb
(
void
*
ctx
)
{
XttTrend
*
trend
=
(
XttTrend
*
)
ctx
;
if
(
trend
->
help_cb
)
(
trend
->
help_cb
)(
trend
->
xnav
,
"trendwindow"
);
}
static
void
trend_scan
(
XttTrend
*
trend
)
{
int
i
,
j
,
k
;
...
...
xtt/lib/xtt/src/xtt_trend.h
View file @
c5ae65ac
/*
* Proview $Id: xtt_trend.h,v 1.
3 2005-09-01 14:57:48
claes Exp $
* Proview $Id: xtt_trend.h,v 1.
4 2005-11-17 09:03:20
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -63,6 +63,7 @@ class XttTrend {
int
last_buffer
[
XTT_TREND_MAX
];
int
last_next_index
[
XTT_TREND_MAX
];
void
(
*
close_cb
)(
void
*
,
XttTrend
*
);
void
(
*
help_cb
)(
void
*
,
char
*
);
void
pop
();
~
XttTrend
();
};
...
...
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