Commit 683a976b authored by Claes Sjofors's avatar Claes Sjofors

Xtt curve window, colortheme added

parent 6cbb72b6
...@@ -749,9 +749,10 @@ GeCurveGtk::GeCurveGtk( void *gc_parent_ctx, ...@@ -749,9 +749,10 @@ GeCurveGtk::GeCurveGtk( void *gc_parent_ctx,
int pos_right, int pos_right,
int gc_width, int gc_width,
int gc_height, int gc_height,
unsigned int gc_options) : unsigned int gc_options,
int gc_color_theme) :
GeCurve( gc_parent_ctx, curve_name, filename, curve_data, pos_right, GeCurve( gc_parent_ctx, curve_name, filename, curve_data, pos_right,
gc_width, gc_height, gc_options), gc_width, gc_height, gc_options, gc_color_theme),
minmax_widget(0), export_widget(0), disable_timecombo_callback(0), clock_cursor(0) minmax_widget(0), export_widget(0), disable_timecombo_callback(0), clock_cursor(0)
{ {
......
...@@ -49,7 +49,7 @@ class GeCurveGtk : public GeCurve { ...@@ -49,7 +49,7 @@ class GeCurveGtk : public GeCurve {
public: public:
GeCurveGtk( void *gc_parent_ctx, GtkWidget *parent_widget, char *curve_name, GeCurveGtk( void *gc_parent_ctx, GtkWidget *parent_widget, char *curve_name,
char *filename, GeCurveData *curve_data, int pos_right, char *filename, GeCurveData *curve_data, int pos_right,
int gc_width, int gc_height, unsigned int gc_options); int gc_width, int gc_height, unsigned int gc_options, int gc_color_theme);
GtkWidget *parent_wid; GtkWidget *parent_wid;
GtkWidget *grow_widget; GtkWidget *grow_widget;
GtkWidget *curve_widget; GtkWidget *curve_widget;
......
This diff is collapsed.
...@@ -208,10 +208,11 @@ class GeCurve { ...@@ -208,10 +208,11 @@ class GeCurve {
int center_from_window; int center_from_window;
unsigned int options; unsigned int options;
unsigned int layout_mask; unsigned int layout_mask;
int color_theme;
GeCurve( void *gc_parent_ctx, char *curve_name, GeCurve( void *gc_parent_ctx, char *curve_name,
char *filename, GeCurveData *curve_data, int pos_right, char *filename, GeCurveData *curve_data, int pos_right,
int gc_width, int gc_height, unsigned int options); int gc_width, int gc_height, unsigned int options, int color_theme);
virtual ~GeCurve(); virtual ~GeCurve();
virtual void write_title( char *str) {} virtual void write_title( char *str) {}
virtual void pop() {} virtual void pop() {}
...@@ -261,6 +262,7 @@ class GeCurve { ...@@ -261,6 +262,7 @@ class GeCurve {
void x_to_points( double x, double *time, double *values); void x_to_points( double x, double *time, double *values);
void set_center_from_window( int val) { center_from_window = val;} void set_center_from_window( int val) { center_from_window = val;}
void set_title( const char *str); void set_title( const char *str);
void update_color_theme( int ct);
static int growcurve_cb( GlowCtx *ctx, glow_tEvent event); static int growcurve_cb( GlowCtx *ctx, glow_tEvent event);
static int init_growcurve_cb( GlowCtx *fctx, void *client_data); static int init_growcurve_cb( GlowCtx *fctx, void *client_data);
......
...@@ -637,7 +637,7 @@ GlowDrawGtk::GlowDrawGtk( ...@@ -637,7 +637,7 @@ GlowDrawGtk::GlowDrawGtk(
original_background = background; original_background = background;
if ( type == glow_eCtxType_Grow) { if ( type == glow_eCtxType_Grow || type == glow_eCtxType_Curve) {
ctx->customcolors = create_customcolors(); ctx->customcolors = create_customcolors();
push_customcolors( ctx->customcolors); push_customcolors( ctx->customcolors);
} }
......
...@@ -1637,7 +1637,8 @@ int GrowCtx::event_handler( glow_eEvent event, int x, int y, int w, int h) ...@@ -1637,7 +1637,8 @@ int GrowCtx::event_handler( glow_eEvent event, int x, int y, int w, int h)
e.any.y = double (y + mw.offset_y) / mw.zoom_factor_y; e.any.y = double (y + mw.offset_y) / mw.zoom_factor_y;
e.object.object = restriction_object; e.object.object = restriction_object;
e.object.object_type = restriction_object->type(); e.object.object_type = restriction_object->type();
event_callback[glow_eEvent_SliderMoveEnd]( this, &e); if ( event_callback[glow_eEvent_SliderMoveEnd])
event_callback[glow_eEvent_SliderMoveEnd]( this, &e);
} }
node_move_last_x = x; node_move_last_x = x;
node_move_last_y = y; node_move_last_y = y;
......
...@@ -70,8 +70,9 @@ XttFastGtk::XttFastGtk( void *parent_ctx, ...@@ -70,8 +70,9 @@ XttFastGtk::XttFastGtk( void *parent_ctx,
int width, int width,
int height, int height,
unsigned int options, unsigned int options,
int xn_color_theme,
int *sts) : int *sts) :
XttFast( parent_ctx, name, fast_arp, sts), parent_widget(parent_wid) XttFast( parent_ctx, name, fast_arp, xn_color_theme, sts), parent_widget(parent_wid)
{ {
char title[250]; char title[250];
...@@ -86,7 +87,7 @@ XttFastGtk::XttFastGtk( void *parent_ctx, ...@@ -86,7 +87,7 @@ XttFastGtk::XttFastGtk( void *parent_ctx,
gdh_AttrrefToName( fast_arp, title, sizeof(title), cdh_mNName); gdh_AttrrefToName( fast_arp, title, sizeof(title), cdh_mNName);
curve = new GeCurveGtk( this, parent_widget, title, NULL, gcd, 0, width, height, curve = new GeCurveGtk( this, parent_widget, title, NULL, gcd, 0, width, height,
options); options, color_theme);
curve->close_cb = fast_close_cb; curve->close_cb = fast_close_cb;
curve->help_cb = fast_help_cb; curve->help_cb = fast_help_cb;
curve->export_cb = fast_export_cb; curve->export_cb = fast_export_cb;
...@@ -103,8 +104,9 @@ XttFastGtk::XttFastGtk( void *parent_ctx, ...@@ -103,8 +104,9 @@ XttFastGtk::XttFastGtk( void *parent_ctx,
const char *name, const char *name,
GtkWidget **w, GtkWidget **w,
char *filename, char *filename,
int xn_color_theme,
int *sts) : int *sts) :
XttFast( parent_ctx, name, filename, sts), XttFast( parent_ctx, name, filename, xn_color_theme, sts),
parent_widget(parent_wid) parent_widget(parent_wid)
{ {
char title[250]; char title[250];
...@@ -116,7 +118,7 @@ XttFastGtk::XttFastGtk( void *parent_ctx, ...@@ -116,7 +118,7 @@ XttFastGtk::XttFastGtk( void *parent_ctx,
*sts = XNAV__SUCCESS; *sts = XNAV__SUCCESS;
curve = new GeCurveGtk( this, parent_widget, title, NULL, gcd, 1, 0, 0, 0); curve = new GeCurveGtk( this, parent_widget, title, NULL, gcd, 1, 0, 0, 0, color_theme);
curve->close_cb = fast_close_cb; curve->close_cb = fast_close_cb;
curve->help_cb = fast_help_cb; curve->help_cb = fast_help_cb;
curve->enable(0); curve->enable(0);
......
...@@ -55,12 +55,14 @@ class XttFastGtk : public XttFast { ...@@ -55,12 +55,14 @@ class XttFastGtk : public XttFast {
int width, int width,
int height, int height,
unsigned int xn_options, unsigned int xn_options,
int xn_color_theme,
int *sts); int *sts);
XttFastGtk( void *parent_ctx, XttFastGtk( void *parent_ctx,
GtkWidget *parent_wid, GtkWidget *parent_wid,
const char *name, const char *name,
GtkWidget **w, GtkWidget **w,
char *filename, char *filename,
int xn_color_theme,
int *sts); int *sts);
~XttFastGtk(); ~XttFastGtk();
}; };
......
...@@ -495,13 +495,15 @@ XttMultiViewGtk::XttMultiViewGtk( GtkWidget *mv_parent_wid, void *mv_parent_ctx, ...@@ -495,13 +495,15 @@ XttMultiViewGtk::XttMultiViewGtk( GtkWidget *mv_parent_wid, void *mv_parent_ctx,
if ( plotgroup_found) { if ( plotgroup_found) {
trend[i*rows + j] = new XttTrendGtk( this, toplevel, (char *)"No title", &widget, trend[i*rows + j] = new XttTrendGtk( this, toplevel, (char *)"No title", &widget,
0, &plotgroup, w, h, (unsigned int)curve_mOptions_Embedded, sts); 0, &plotgroup, w, h, (unsigned int)curve_mOptions_Embedded,
color_theme, sts);
} }
else { else {
arefv[0] = mv.Action[i*rows+j].Object[0]; arefv[0] = mv.Action[i*rows+j].Object[0];
memset( &arefv[1], 0, sizeof(arefv[0])); memset( &arefv[1], 0, sizeof(arefv[0]));
trend[i*rows + j] = new XttTrendGtk( this, toplevel, (char *)"No title", &widget, trend[i*rows + j] = new XttTrendGtk( this, toplevel, (char *)"No title", &widget,
arefv, 0, w, h, (unsigned int)curve_mOptions_Embedded, sts); arefv, 0, w, h, (unsigned int)curve_mOptions_Embedded,
color_theme, sts);
} }
if ( EVEN(*sts)) break; if ( EVEN(*sts)) break;
...@@ -696,9 +698,9 @@ XttMultiViewGtk::XttMultiViewGtk( GtkWidget *mv_parent_wid, void *mv_parent_ctx, ...@@ -696,9 +698,9 @@ XttMultiViewGtk::XttMultiViewGtk( GtkWidget *mv_parent_wid, void *mv_parent_ctx,
if ( EVEN(lsts)) break; if ( EVEN(lsts)) break;
sevhist[i*rows + j] = new XttSevHistGtk( this, toplevel, (char *)"No title", &widget, sevhist[i*rows + j] = new XttSevHistGtk( this, toplevel, (char *)"No title", &widget,
oidv, anamev, onamev, sevhistobjectv, oidv, anamev, onamev, sevhistobjectv,
xnav->scctx, w, h, xnav->scctx, w, h,
(unsigned int)curve_mOptions_Embedded, sts); (unsigned int)curve_mOptions_Embedded, color_theme, sts);
if ( EVEN(*sts)) break; if ( EVEN(*sts)) break;
sevhist[i*rows + j]->help_cb = multiview_trend_help_cb; sevhist[i*rows + j]->help_cb = multiview_trend_help_cb;
...@@ -1058,13 +1060,15 @@ int XttMultiViewGtk::set_subwindow_source( const char *name, char *source, char ...@@ -1058,13 +1060,15 @@ int XttMultiViewGtk::set_subwindow_source( const char *name, char *source, char
XttTrendGtk *ctx; XttTrendGtk *ctx;
if ( plotgroup_found) { if ( plotgroup_found) {
ctx = new XttTrendGtk( this, toplevel, (char *)"No title", &comp_w, ctx = new XttTrendGtk( this, toplevel, (char *)"No title", &comp_w,
0, &plotgroup, w, h, (unsigned int)curve_mOptions_Embedded, &lsts); 0, &plotgroup, w, h, (unsigned int)curve_mOptions_Embedded,
color_theme, &lsts);
} }
else { else {
arefv[0] = object_aref; arefv[0] = object_aref;
memset( &arefv[1], 0, sizeof(arefv[0])); memset( &arefv[1], 0, sizeof(arefv[0]));
ctx = new XttTrendGtk( this, toplevel, (char *)"No title", &comp_w, ctx = new XttTrendGtk( this, toplevel, (char *)"No title", &comp_w,
arefv, 0, w, h, (unsigned int)curve_mOptions_Embedded, &lsts); arefv, 0, w, h, (unsigned int)curve_mOptions_Embedded,
color_theme, &lsts);
} }
if ( EVEN(lsts)) break; if ( EVEN(lsts)) break;
...@@ -1258,7 +1262,7 @@ int XttMultiViewGtk::set_subwindow_source( const char *name, char *source, char ...@@ -1258,7 +1262,7 @@ int XttMultiViewGtk::set_subwindow_source( const char *name, char *source, char
ctx = new XttSevHistGtk( this, toplevel, (char *)"No title", &comp_w, ctx = new XttSevHistGtk( this, toplevel, (char *)"No title", &comp_w,
oidv, anamev, onamev, sevhistobjectv, oidv, anamev, onamev, sevhistobjectv,
xnav->scctx, w, h, xnav->scctx, w, h,
(unsigned int)curve_mOptions_Embedded, &lsts); (unsigned int)curve_mOptions_Embedded, color_theme, &lsts);
if ( EVEN(lsts)) break; if ( EVEN(lsts)) break;
ctx->help_cb = multiview_trend_help_cb; ctx->help_cb = multiview_trend_help_cb;
......
...@@ -73,8 +73,9 @@ XttSevHistGtk::XttSevHistGtk( void *parent_ctx, ...@@ -73,8 +73,9 @@ XttSevHistGtk::XttSevHistGtk( void *parent_ctx,
int xn_width, int xn_width,
int xn_height, int xn_height,
unsigned int xn_options, unsigned int xn_options,
int xn_color_theme,
int *sts) : int *sts) :
XttSevHist( parent_ctx, name, xn_oidv, xn_anamev, xn_onamev, sevhistobjectv, xn_scctx, sts), XttSevHist( parent_ctx, name, xn_oidv, xn_anamev, xn_onamev, sevhistobjectv, xn_scctx, xn_color_theme, sts),
parent_widget(parent_wid) parent_widget(parent_wid)
{ {
char title[250]; char title[250];
...@@ -87,7 +88,7 @@ XttSevHistGtk::XttSevHistGtk( void *parent_ctx, ...@@ -87,7 +88,7 @@ XttSevHistGtk::XttSevHistGtk( void *parent_ctx,
*sts = XNAV__SUCCESS; *sts = XNAV__SUCCESS;
curve = new GeCurveGtk( this, parent_widget, title, NULL, gcd, 1, curve = new GeCurveGtk( this, parent_widget, title, NULL, gcd, 1,
xn_width, xn_height, xn_options); xn_width, xn_height, xn_options, color_theme);
curve->close_cb = sevhist_close_cb; curve->close_cb = sevhist_close_cb;
curve->help_cb = sevhist_help_cb; curve->help_cb = sevhist_help_cb;
curve->increase_period_cb = sevhist_increase_period_cb; curve->increase_period_cb = sevhist_increase_period_cb;
...@@ -116,8 +117,9 @@ XttSevHistGtk::XttSevHistGtk( void *parent_ctx, ...@@ -116,8 +117,9 @@ XttSevHistGtk::XttSevHistGtk( void *parent_ctx,
const char *name, const char *name,
GtkWidget **w, GtkWidget **w,
char *filename, char *filename,
int xn_color_theme,
int *sts) : int *sts) :
XttSevHist( parent_ctx, name, filename, sts), XttSevHist( parent_ctx, name, filename, xn_color_theme, sts),
parent_widget(parent_wid) parent_widget(parent_wid)
{ {
char title[250]; char title[250];
...@@ -129,7 +131,7 @@ XttSevHistGtk::XttSevHistGtk( void *parent_ctx, ...@@ -129,7 +131,7 @@ XttSevHistGtk::XttSevHistGtk( void *parent_ctx,
*sts = XNAV__SUCCESS; *sts = XNAV__SUCCESS;
curve = new GeCurveGtk( this, parent_widget, title, NULL, gcd, 1, 0, 0, 0); curve = new GeCurveGtk( this, parent_widget, title, NULL, gcd, 1, 0, 0, 0, color_theme);
curve->close_cb = sevhist_close_cb; curve->close_cb = sevhist_close_cb;
curve->help_cb = sevhist_help_cb; curve->help_cb = sevhist_help_cb;
curve->enable(0); curve->enable(0);
......
...@@ -59,12 +59,14 @@ class XttSevHistGtk : public XttSevHist { ...@@ -59,12 +59,14 @@ class XttSevHistGtk : public XttSevHist {
int width, int width,
int height, int height,
unsigned int options, unsigned int options,
int xn_color_theme,
int *sts); int *sts);
XttSevHistGtk( void *parent_ctx, XttSevHistGtk( void *parent_ctx,
GtkWidget *parent_wid, GtkWidget *parent_wid,
const char *name, const char *name,
GtkWidget **w, GtkWidget **w,
char *filename, char *filename,
int xn_color_theme,
int *sts); int *sts);
~XttSevHistGtk(); ~XttSevHistGtk();
}; };
......
...@@ -69,8 +69,9 @@ XttTCurveGtk::XttTCurveGtk( void *parent_ctx, ...@@ -69,8 +69,9 @@ XttTCurveGtk::XttTCurveGtk( void *parent_ctx,
int xn_width, int xn_width,
int xn_height, int xn_height,
unsigned int xn_options, unsigned int xn_options,
int xn_color_theme,
int *sts) : int *sts) :
XttTCurve( parent_ctx, name, xn_arefv, sts), XttTCurve( parent_ctx, name, xn_arefv, xn_color_theme, sts),
parent_widget(parent_wid) parent_widget(parent_wid)
{ {
char title[250]; char title[250];
...@@ -83,7 +84,7 @@ XttTCurveGtk::XttTCurveGtk( void *parent_ctx, ...@@ -83,7 +84,7 @@ XttTCurveGtk::XttTCurveGtk( void *parent_ctx,
*sts = XNAV__SUCCESS; *sts = XNAV__SUCCESS;
curve = new GeCurveGtk( this, parent_widget, title, NULL, gcd, 1, curve = new GeCurveGtk( this, parent_widget, title, NULL, gcd, 1,
xn_width, xn_height, xn_options); xn_width, xn_height, xn_options, color_theme);
curve->close_cb = tcurve_close_cb; curve->close_cb = tcurve_close_cb;
curve->help_cb = tcurve_help_cb; curve->help_cb = tcurve_help_cb;
curve->increase_period_cb = tcurve_increase_period_cb; curve->increase_period_cb = tcurve_increase_period_cb;
......
...@@ -55,6 +55,7 @@ class XttTCurveGtk : public XttTCurve { ...@@ -55,6 +55,7 @@ class XttTCurveGtk : public XttTCurve {
int xn_width, int xn_width,
int xn_height, int xn_height,
unsigned int xn_options, unsigned int xn_options,
int xn_color_theme,
int *sts); int *sts);
~XttTCurveGtk(); ~XttTCurveGtk();
}; };
......
...@@ -69,8 +69,9 @@ XttTrendGtk::XttTrendGtk( void *parent_ctx, ...@@ -69,8 +69,9 @@ XttTrendGtk::XttTrendGtk( void *parent_ctx,
int width, int width,
int height, int height,
unsigned int x_options, unsigned int x_options,
int x_color_theme,
int *sts) : int *sts) :
XttTrend( parent_ctx, name, trend_list, plotgroup, x_options, sts), XttTrend( parent_ctx, name, trend_list, plotgroup, x_options, x_color_theme, sts),
parent_widget(parent_wid) parent_widget(parent_wid)
{ {
if ( EVEN(*sts)) if ( EVEN(*sts))
...@@ -78,7 +79,7 @@ XttTrendGtk::XttTrendGtk( void *parent_ctx, ...@@ -78,7 +79,7 @@ XttTrendGtk::XttTrendGtk( void *parent_ctx,
*sts = XNAV__SUCCESS; *sts = XNAV__SUCCESS;
curve = new GeCurveGtk( this, parent_widget, name, NULL, gcd, 1, width, height, curve = new GeCurveGtk( this, parent_widget, name, NULL, gcd, 1, width, height,
options); options, color_theme);
curve->close_cb = trend_close_cb; curve->close_cb = trend_close_cb;
curve->help_cb = trend_help_cb; curve->help_cb = trend_help_cb;
curve->snapshot_cb = trend_snapshot_cb; curve->snapshot_cb = trend_snapshot_cb;
......
...@@ -56,6 +56,7 @@ class XttTrendGtk : public XttTrend { ...@@ -56,6 +56,7 @@ class XttTrendGtk : public XttTrend {
int width, int width,
int height, int height,
unsigned int options, unsigned int options,
int x_color_theme,
int *sts); int *sts);
~XttTrendGtk(); ~XttTrendGtk();
}; };
......
...@@ -275,41 +275,41 @@ Op *XNavGtk::op_new( char *opplace, pwr_tStatus *sts) ...@@ -275,41 +275,41 @@ Op *XNavGtk::op_new( char *opplace, pwr_tStatus *sts)
} }
XttTrend *XNavGtk::xtttrend_new( char *name, pwr_tAttrRef *objar, pwr_tAttrRef *plotgroup, XttTrend *XNavGtk::xtttrend_new( char *name, pwr_tAttrRef *objar, pwr_tAttrRef *plotgroup,
int width, int height, unsigned int options, pwr_tStatus *sts) int width, int height, unsigned int options, int color_theme, pwr_tStatus *sts)
{ {
GtkWidget *w; GtkWidget *w;
return new XttTrendGtk( this, parent_wid, name, &w, objar, plotgroup, width, height, options, sts); return new XttTrendGtk( this, parent_wid, name, &w, objar, plotgroup, width, height, options, color_theme, sts);
} }
XttSevHist *XNavGtk::xttsevhist_new( char *name, pwr_tOid *oidv, pwr_tOName *anamev, pwr_tOName *onamev, XttSevHist *XNavGtk::xttsevhist_new( char *name, pwr_tOid *oidv, pwr_tOName *anamev, pwr_tOName *onamev,
bool *sevhistobjectv, sevcli_tCtx scctx, char *filename, bool *sevhistobjectv, sevcli_tCtx scctx, char *filename,
int width, int height, unsigned int options, pwr_tStatus *sts) int width, int height, unsigned int options, int color_theme, pwr_tStatus *sts)
{ {
GtkWidget *w; GtkWidget *w;
if ( !filename) if ( !filename)
return new XttSevHistGtk( this, parent_wid, name, &w, oidv, anamev, onamev, sevhistobjectv, scctx, width, height, options, sts); return new XttSevHistGtk( this, parent_wid, name, &w, oidv, anamev, onamev, sevhistobjectv, scctx, width, height, options, color_theme, sts);
else else
return new XttSevHistGtk( this, parent_wid, name, &w, filename, sts); return new XttSevHistGtk( this, parent_wid, name, &w, filename, color_theme, sts);
} }
XttTCurve *XNavGtk::xtttcurve_new( char *name, pwr_tAttrRef *arefv, int width, int height, unsigned int options, pwr_tStatus *sts) XttTCurve *XNavGtk::xtttcurve_new( char *name, pwr_tAttrRef *arefv, int width, int height, unsigned int options, int color_theme, pwr_tStatus *sts)
{ {
GtkWidget *w; GtkWidget *w;
return new XttTCurveGtk( this, parent_wid, name, &w, arefv, width, height, options, sts); return new XttTCurveGtk( this, parent_wid, name, &w, arefv, width, height, options, color_theme, sts);
} }
XttFast *XNavGtk::xttfast_new( char *name, pwr_tAttrRef *objar, int width, int height, XttFast *XNavGtk::xttfast_new( char *name, pwr_tAttrRef *objar, int width, int height,
unsigned int options, char *filename, pwr_tStatus *sts) unsigned int options, char *filename, int color_theme, pwr_tStatus *sts)
{ {
GtkWidget *w; GtkWidget *w;
if ( !filename) if ( !filename)
return new XttFastGtk( this, parent_wid, name, &w, objar, width, height, options, sts); return new XttFastGtk( this, parent_wid, name, &w, objar, width, height, options, color_theme, sts);
else else
return new XttFastGtk( this, parent_wid, name, &w, filename, sts); return new XttFastGtk( this, parent_wid, name, &w, filename, color_theme, sts);
} }
XAttOne *XNavGtk::xattone_new( pwr_tAttrRef *objar, char *title, unsigned int priv, XAttOne *XNavGtk::xattone_new( pwr_tAttrRef *objar, char *title, unsigned int priv,
...@@ -359,9 +359,9 @@ XttStream *XNavGtk::stream_new( const char *name, const char *uri, ...@@ -359,9 +359,9 @@ XttStream *XNavGtk::stream_new( const char *name, const char *uri,
} }
GeCurve *XNavGtk::gecurve_new( char *name, char *filename, GeCurveData *data, GeCurve *XNavGtk::gecurve_new( char *name, char *filename, GeCurveData *data,
int pos_right, unsigned int options) int pos_right, unsigned int options, int color_theme)
{ {
return new GeCurveGtk( this, parent_wid, name, filename, data, pos_right, 0, 0, options); return new GeCurveGtk( this, parent_wid, name, filename, data, pos_right, 0, 0, options, color_theme);
} }
XttFileview *XNavGtk::fileview_new( pwr_tOid oid, char *title, char *dir, char *pattern, XttFileview *XNavGtk::fileview_new( pwr_tOid oid, char *title, char *dir, char *pattern,
......
...@@ -77,13 +77,15 @@ class XNavGtk : public XNav { ...@@ -77,13 +77,15 @@ class XNavGtk : public XNav {
pwr_tStatus *sts); pwr_tStatus *sts);
Op *op_new( char *opplace, pwr_tStatus *sts); Op *op_new( char *opplace, pwr_tStatus *sts);
XttTrend *xtttrend_new( char *name, pwr_tAttrRef *objar, pwr_tAttrRef *plotgroup, XttTrend *xtttrend_new( char *name, pwr_tAttrRef *objar, pwr_tAttrRef *plotgroup,
int width, int height, unsigned int options, pwr_tStatus *sts); int width, int height, unsigned int options, int color_theme, pwr_tStatus *sts);
XttSevHist *xttsevhist_new( char *name, pwr_tOid *oidv, pwr_tOName *anamev, XttSevHist *xttsevhist_new( char *name, pwr_tOid *oidv, pwr_tOName *anamev,
pwr_tOName *onamev, bool *sevhistobjectv, sevcli_tCtx scctx, pwr_tOName *onamev, bool *sevhistobjectv, sevcli_tCtx scctx,
char *filename, int width, int height, unsigned int options, pwr_tStatus *sts); char *filename, int width, int height, unsigned int options, int color_theme,
XttTCurve *xtttcurve_new( char *name, pwr_tAttrRef *arefv, int width, int height, unsigned int options, pwr_tStatus *sts); pwr_tStatus *sts);
XttTCurve *xtttcurve_new( char *name, pwr_tAttrRef *arefv, int width, int height, unsigned int options,
int color_theme, pwr_tStatus *sts);
XttFast *xttfast_new( char *name, pwr_tAttrRef *objar, int width, int height, unsigned int options, XttFast *xttfast_new( char *name, pwr_tAttrRef *objar, int width, int height, unsigned int options,
char *filename, pwr_tStatus *sts); char *filename, int color_theme, pwr_tStatus *sts);
XAttOne *xattone_new( pwr_tAttrRef *objar, char *title, unsigned int priv, XAttOne *xattone_new( pwr_tAttrRef *objar, char *title, unsigned int priv,
pwr_tStatus *sts); pwr_tStatus *sts);
CLog *clog_new( const char *name, pwr_tStatus *sts); CLog *clog_new( const char *name, pwr_tStatus *sts);
...@@ -105,7 +107,7 @@ class XNavGtk : public XNav { ...@@ -105,7 +107,7 @@ class XNavGtk : public XNav {
int width, int height, int x, int y, double scan_time, int width, int height, int x, int y, double scan_time,
unsigned int options, int embedded, pwr_tAttrRef *arp, pwr_tStatus *sts); unsigned int options, int embedded, pwr_tAttrRef *arp, pwr_tStatus *sts);
GeCurve *gecurve_new( char *name, char *filename, GeCurveData *data, GeCurve *gecurve_new( char *name, char *filename, GeCurveData *data,
int pos_right, unsigned int options); int pos_right, unsigned int options, int color_theme);
XttFileview *fileview_new( pwr_tOid oid, char *title, char *dir, char *pattern, XttFileview *fileview_new( pwr_tOid oid, char *title, char *dir, char *pattern,
int type, char *target_attr, char *trigger_attr, char *filetype); int type, char *target_attr, char *trigger_attr, char *filetype);
CoLogin *login_new( const char *wl_name, CoLogin *login_new( const char *wl_name,
......
...@@ -49,7 +49,8 @@ typedef enum { ...@@ -49,7 +49,8 @@ typedef enum {
applist_eType_Hist, applist_eType_Hist,
applist_eType_Fast, applist_eType_Fast,
applist_eType_MultiView, applist_eType_MultiView,
applist_eType_Stream applist_eType_Stream,
applist_eType_SevHist
} applist_eType; } applist_eType;
......
...@@ -67,9 +67,10 @@ ...@@ -67,9 +67,10 @@
XttFast::XttFast( void *parent_ctx, XttFast::XttFast( void *parent_ctx,
char *name, char *name,
pwr_sAttrRef *fast_arp, pwr_sAttrRef *fast_arp,
int xn_color_theme,
int *sts) : int *sts) :
xnav(parent_ctx), fast_cnt(0), timerid(0), close_cb(0), help_cb(0), first_scan(1), xnav(parent_ctx), fast_cnt(0), timerid(0), close_cb(0), help_cb(0), first_scan(1),
axis_configured(false) axis_configured(false), color_theme(xn_color_theme)
{ {
pwr_sAttrRef aref = pwr_cNAttrRef; pwr_sAttrRef aref = pwr_cNAttrRef;
pwr_tAName fast_name; pwr_tAName fast_name;
...@@ -216,8 +217,9 @@ XttFast::XttFast( void *parent_ctx, ...@@ -216,8 +217,9 @@ XttFast::XttFast( void *parent_ctx,
XttFast::XttFast( void *parent_ctx, XttFast::XttFast( void *parent_ctx,
const char *name, const char *name,
char *filename, char *filename,
int xn_color_theme,
int *sts) : xnav(parent_ctx), fast_cnt(0), timerid(0), close_cb(0), help_cb(0), int *sts) : xnav(parent_ctx), fast_cnt(0), timerid(0), close_cb(0), help_cb(0),
first_scan(1), axis_configured(false) first_scan(1), axis_configured(false), color_theme(xn_color_theme)
{ {
*sts = read_export( filename); *sts = read_export( filename);
......
...@@ -97,17 +97,20 @@ class XttFast { ...@@ -97,17 +97,20 @@ class XttFast {
pwr_sAttrRef first_index_attr; //!< Attrref to FirstIndex attribute in DsFastCurve object. pwr_sAttrRef first_index_attr; //!< Attrref to FirstIndex attribute in DsFastCurve object.
pwr_sAttrRef last_index_attr; //!< Attrref to LastIndex attribute in DsFastCurve object. pwr_sAttrRef last_index_attr; //!< Attrref to LastIndex attribute in DsFastCurve object.
pwr_sAttrRef trigg_time_attr; //!< Attrref to TriggTime attribute in DsFastCurve object. pwr_sAttrRef trigg_time_attr; //!< Attrref to TriggTime attribute in DsFastCurve object.
char title[250]; //!< Window title char title[250]; //!< Window title
CoWow *wow; CoWow *wow;
int color_theme;
//! Constructor //! Constructor
XttFast( void *xn_parent_ctx, XttFast( void *xn_parent_ctx,
char *xn_name, char *xn_name,
pwr_sAttrRef *fast_arp, pwr_sAttrRef *fast_arp,
int color_theme,
int *sts); int *sts);
XttFast( void *parent_ctx, XttFast( void *parent_ctx,
const char *name, const char *name,
char *filename, char *filename,
int color_theme,
int *sts); int *sts);
//! Destructor //! Destructor
...@@ -117,6 +120,7 @@ class XttFast { ...@@ -117,6 +120,7 @@ class XttFast {
void pop(); void pop();
void setup(); void setup();
int read_export( char *filename); int read_export( char *filename);
void update_color_theme( int ct) { curve->update_color_theme(ct);}
static void fast_close_cb( void *ctx); static void fast_close_cb( void *ctx);
static void fast_help_cb( void *ctx); static void fast_help_cb( void *ctx);
......
...@@ -70,10 +70,11 @@ XttSevHist::XttSevHist( void *parent_ctx, ...@@ -70,10 +70,11 @@ XttSevHist::XttSevHist( void *parent_ctx,
pwr_tOName *xn_onamev, pwr_tOName *xn_onamev,
bool *xn_sevhistobjectv, bool *xn_sevhistobjectv,
sevcli_tCtx xn_scctx, sevcli_tCtx xn_scctx,
int xn_color_theme,
int *sts) : int *sts) :
xnav(parent_ctx), gcd(0), curve(0), rows(0), vsize(0), timerid(0), close_cb(0), help_cb(0), xnav(parent_ctx), gcd(0), curve(0), rows(0), vsize(0), timerid(0), close_cb(0), help_cb(0),
get_select_cb(0), first_scan(1), scctx(xn_scctx), wow(0), time_low_old(0), time_high_old(0), get_select_cb(0), first_scan(1), scctx(xn_scctx), wow(0), time_low_old(0), time_high_old(0),
initial_period(time_ePeriod_) initial_period(time_ePeriod_), color_theme(xn_color_theme)
{ {
pwr_tTime from, to; pwr_tTime from, to;
...@@ -124,9 +125,11 @@ XttSevHist::XttSevHist( void *parent_ctx, ...@@ -124,9 +125,11 @@ XttSevHist::XttSevHist( void *parent_ctx,
XttSevHist::XttSevHist( void *parent_ctx, XttSevHist::XttSevHist( void *parent_ctx,
const char *name, const char *name,
char *filename, char *filename,
int xn_color_theme,
int *sts) : int *sts) :
xnav(parent_ctx), gcd(0), curve(0), rows(0), vsize(0), timerid(0), close_cb(0), help_cb(0), xnav(parent_ctx), gcd(0), curve(0), rows(0), vsize(0), timerid(0), close_cb(0), help_cb(0),
get_select_cb(0), first_scan(1), scctx(0), time_low_old(0), time_high_old(0), initial_period(time_ePeriod_) get_select_cb(0), first_scan(1), scctx(0), time_low_old(0), time_high_old(0), initial_period(time_ePeriod_),
color_theme(xn_color_theme)
{ {
strncpy( title, filename, sizeof(title)); strncpy( title, filename, sizeof(title));
......
...@@ -95,19 +95,22 @@ class XttSevHist { ...@@ -95,19 +95,22 @@ class XttSevHist {
long int time_high_old; long int time_high_old;
bool sevhistobjectv[XTT_SEVHIST_MAX]; //!< Indicates that it is a SevHistObject bool sevhistobjectv[XTT_SEVHIST_MAX]; //!< Indicates that it is a SevHistObject
time_ePeriod initial_period; time_ePeriod initial_period;
int color_theme;
//! Constructor //! Constructor
XttSevHist( void *xn_parent_ctx, XttSevHist( void *xn_parent_ctx,
const char *xn_name, const char *xn_name,
pwr_tOid* xn_oidv, pwr_tOid* xn_oidv,
pwr_tOName *xn_aname, pwr_tOName *xn_aname,
pwr_tOName *xn_oname, pwr_tOName *xn_oname,
bool *sevhistobjectv, bool *sevhistobjectv,
sevcli_tCtx xn_scctx, sevcli_tCtx xn_scctx,
int *sts); int xn_color_theme,
int *sts);
XttSevHist( void *parent_ctx, XttSevHist( void *parent_ctx,
const char *name, const char *name,
char *filename, char *filename,
int xn_color_theme,
int *sts); int *sts);
//! Destructor //! Destructor
...@@ -122,6 +125,7 @@ class XttSevHist { ...@@ -122,6 +125,7 @@ class XttSevHist {
bool sevhistobject); bool sevhistobject);
int read_export( char *filename); int read_export( char *filename);
void setup(); void setup();
void update_color_theme( int ct) { curve->update_color_theme(ct);}
static void sevhist_close_cb( void *ctx); static void sevhist_close_cb( void *ctx);
static void sevhist_increase_period_cb( void *ctx); static void sevhist_increase_period_cb( void *ctx);
......
...@@ -67,9 +67,10 @@ ...@@ -67,9 +67,10 @@
XttTCurve::XttTCurve( void *parent_ctx, XttTCurve::XttTCurve( void *parent_ctx,
const char *name, const char *name,
pwr_tAttrRef *xn_arefv, pwr_tAttrRef *xn_arefv,
int xn_color_theme,
int *sts) : int *sts) :
xnav(parent_ctx), gcd(0), curve(0), rows(0), vsize(0), timerid(0), close_cb(0), help_cb(0), xnav(parent_ctx), gcd(0), curve(0), rows(0), vsize(0), timerid(0), close_cb(0), help_cb(0),
get_select_cb(0), first_scan(1), time_low_old(0), time_high_old(0) get_select_cb(0), first_scan(1), time_low_old(0), time_high_old(0), color_theme(xn_color_theme)
{ {
pwr_tTime from, to; pwr_tTime from, to;
......
...@@ -113,11 +113,13 @@ class XttTCurve { ...@@ -113,11 +113,13 @@ class XttTCurve {
long int time_low_old; long int time_low_old;
long int time_high_old; long int time_high_old;
tcurve_sTc tc; tcurve_sTc tc;
int color_theme;
//! Constructor //! Constructor
XttTCurve( void *xn_parent_ctx, XttTCurve( void *xn_parent_ctx,
const char *xn_name, const char *xn_name,
pwr_tAttrRef* xn_arefv, pwr_tAttrRef* xn_arefv,
int xn_color_theme,
int *sts); int *sts);
//! Destructor //! Destructor
...@@ -132,6 +134,7 @@ class XttTCurve { ...@@ -132,6 +134,7 @@ class XttTCurve {
void save( char *filename); void save( char *filename);
void open( char *filename); void open( char *filename);
void set_title( const char *str); void set_title( const char *str);
void update_color_theme( int ct) { curve->update_color_theme(ct);}
static void tcurve_close_cb( void *ctx); static void tcurve_close_cb( void *ctx);
static void tcurve_new_cb( void *ctx); static void tcurve_new_cb( void *ctx);
......
...@@ -68,9 +68,10 @@ XttTrend::XttTrend( void *parent_ctx, ...@@ -68,9 +68,10 @@ XttTrend::XttTrend( void *parent_ctx,
pwr_sAttrRef *trend_list, pwr_sAttrRef *trend_list,
pwr_sAttrRef *plotgroup, pwr_sAttrRef *plotgroup,
unsigned int x_options, unsigned int x_options,
int xn_color_theme,
int *sts) : int *sts) :
xnav(parent_ctx), trend_cnt(0), update_time(1000), options(x_options), xnav(parent_ctx), trend_cnt(0), update_time(1000), options(x_options),
close_cb(0), help_cb(0), command_cb(0), get_select_cb(0) close_cb(0), help_cb(0), command_cb(0), get_select_cb(0), color_theme(xn_color_theme)
{ {
pwr_sAttrRef *aref_list; pwr_sAttrRef *aref_list;
pwr_sAttrRef *aref_p; pwr_sAttrRef *aref_p;
......
...@@ -84,17 +84,20 @@ class XttTrend { ...@@ -84,17 +84,20 @@ class XttTrend {
void (*command_cb)( void *, const char *); void (*command_cb)( void *, const char *);
int (*get_select_cb)( void *, pwr_tAttrRef *, int *); //!< Get selected trend object. int (*get_select_cb)( void *, pwr_tAttrRef *, int *); //!< Get selected trend object.
CoWow *wow; CoWow *wow;
int color_theme;
XttTrend( void *xn_parent_ctx, XttTrend( void *xn_parent_ctx,
char *xn_name, char *xn_name,
pwr_sAttrRef *objid, pwr_sAttrRef *objid,
pwr_sAttrRef *plotgroup, pwr_sAttrRef *plotgroup,
unsigned int options, unsigned int options,
int xn_color_theme,
int *sts); int *sts);
virtual ~XttTrend(); virtual ~XttTrend();
void pop(); void pop();
void setup(); void setup();
void curve_add( pwr_tAttrRef *arp, pwr_tAttrRef *trend_arp, pwr_tStatus *sts); void curve_add( pwr_tAttrRef *arp, pwr_tAttrRef *trend_arp, pwr_tStatus *sts);
void update_color_theme( int ct) { curve->update_color_theme(ct);}
static void trend_close_cb( void *ctx); static void trend_close_cb( void *ctx);
static void trend_help_cb( void *ctx); static void trend_help_cb( void *ctx);
......
...@@ -361,13 +361,15 @@ class XNav { ...@@ -361,13 +361,15 @@ class XNav {
pwr_tStatus *sts) {return 0;} pwr_tStatus *sts) {return 0;}
virtual Op *op_new( char *opplace, pwr_tStatus *sts) {return 0;} virtual Op *op_new( char *opplace, pwr_tStatus *sts) {return 0;}
virtual XttTrend *xtttrend_new( char *name, pwr_tAttrRef *objar, pwr_tAttrRef *plotgroup, virtual XttTrend *xtttrend_new( char *name, pwr_tAttrRef *objar, pwr_tAttrRef *plotgroup,
int width, int height, unsigned int options, pwr_tStatus *sts) {return 0;} int width, int height, unsigned int options, int color_theme, pwr_tStatus *sts) {return 0;}
virtual XttSevHist *xttsevhist_new( char *name, pwr_tOid *oidv, pwr_tOName *aname, virtual XttSevHist *xttsevhist_new( char *name, pwr_tOid *oidv, pwr_tOName *aname,
pwr_tOName *oname, bool *sevhistobjectv, sevcli_tCtx scctx, pwr_tOName *oname, bool *sevhistobjectv, sevcli_tCtx scctx,
char *filename, int width, int height, unsigned int options, pwr_tStatus *sts) {return 0;} char *filename, int width, int height, unsigned int options,
virtual XttTCurve *xtttcurve_new( char *name, pwr_tAttrRef *arefv, int width, int height, unsigned int options, pwr_tStatus *sts) {return 0;} int color_theme, pwr_tStatus *sts) {return 0;}
virtual XttTCurve *xtttcurve_new( char *name, pwr_tAttrRef *arefv, int width, int height, unsigned int options,
int color_theme, pwr_tStatus *sts) {return 0;}
virtual XttFast *xttfast_new( char *name, pwr_tAttrRef *objar, int width, int height, unsigned int options, virtual XttFast *xttfast_new( char *name, pwr_tAttrRef *objar, int width, int height, unsigned int options,
char *filename, pwr_tStatus *sts) {return 0;} char *filename, int color_theme, pwr_tStatus *sts) {return 0;}
virtual XAttOne *xattone_new( pwr_tAttrRef *objar, char *title, unsigned int priv, virtual XAttOne *xattone_new( pwr_tAttrRef *objar, char *title, unsigned int priv,
pwr_tStatus *sts) {return 0;} pwr_tStatus *sts) {return 0;}
virtual CLog *clog_new( const char *name, pwr_tStatus *sts) {return 0;} virtual CLog *clog_new( const char *name, pwr_tStatus *sts) {return 0;}
...@@ -389,7 +391,7 @@ class XNav { ...@@ -389,7 +391,7 @@ class XNav {
int width, int height, int x, int y, double scan_time, int width, int height, int x, int y, double scan_time,
unsigned int options, int embedded, pwr_tAttrRef *arp, pwr_tStatus *sts) {return 0;} unsigned int options, int embedded, pwr_tAttrRef *arp, pwr_tStatus *sts) {return 0;}
virtual GeCurve *gecurve_new( char *name, char *filename, GeCurveData *data, virtual GeCurve *gecurve_new( char *name, char *filename, GeCurveData *data,
int pos_right, unsigned int options) {return 0;} int pos_right, unsigned int options, int color_theme) {return 0;}
virtual XttFileview *fileview_new( pwr_tOid oid, char *title, char *dir, char *pattern, virtual XttFileview *fileview_new( pwr_tOid oid, char *title, char *dir, char *pattern,
int type, char *target_attr, char *trigger_attr, int type, char *target_attr, char *trigger_attr,
char *filetype) {return 0;} char *filetype) {return 0;}
......
...@@ -183,6 +183,7 @@ static void xnav_trend_help_cb( void *ctx, const char *key); ...@@ -183,6 +183,7 @@ static void xnav_trend_help_cb( void *ctx, const char *key);
static void xnav_tcurve_close_cb( void *ctx, XttTCurve *trend); static void xnav_tcurve_close_cb( void *ctx, XttTCurve *trend);
static void xnav_tcurve_help_cb( void *ctx, const char *key); static void xnav_tcurve_help_cb( void *ctx, const char *key);
static void xnav_sevhist_help_cb( void *ctx, const char *key); static void xnav_sevhist_help_cb( void *ctx, const char *key);
static void xnav_sevhist_close_cb( void *ctx, XttSevHist *hist);
static int xnav_sevhist_get_select_cb( void *ctx, pwr_tOid *oid, char *aname, char *oname); static int xnav_sevhist_get_select_cb( void *ctx, pwr_tOid *oid, char *aname, char *oname);
static int xnav_get_select_cb( void *ctx, pwr_tAttrRef *aref, int *is_attr); static int xnav_get_select_cb( void *ctx, pwr_tAttrRef *aref, int *is_attr);
static void xnav_fast_close_cb( void *ctx, XttFast *fast); static void xnav_fast_close_cb( void *ctx, XttFast *fast);
...@@ -1153,6 +1154,12 @@ static int xnav_set_func( void *client_data, ...@@ -1153,6 +1154,12 @@ static int xnav_set_func( void *client_data,
for ( elem = xnav->appl.root; elem; elem = elem->next) { for ( elem = xnav->appl.root; elem; elem = elem->next) {
if ( elem->type == applist_eType_Graph) if ( elem->type == applist_eType_Graph)
((XttGe *)elem->ctx)->update_color_theme( idx); ((XttGe *)elem->ctx)->update_color_theme( idx);
else if ( elem->type == applist_eType_SevHist)
((XttSevHist *)elem->ctx)->update_color_theme( idx);
else if ( elem->type == applist_eType_Trend)
((XttTrend *)elem->ctx)->update_color_theme( idx);
else if ( elem->type == applist_eType_Fast)
((XttFast *)elem->ctx)->update_color_theme( idx);
} }
} }
if ( xnav->op) if ( xnav->op)
...@@ -4099,7 +4106,7 @@ static int xnav_open_func( void *client_data, ...@@ -4099,7 +4106,7 @@ static int xnav_open_func( void *client_data,
trend->pop(); trend->pop();
} }
else { else {
trend = xnav->xtttrend_new( title_str, NULL, &plotgroup, width, height, options, &sts); trend = xnav->xtttrend_new( title_str, NULL, &plotgroup, width, height, options, xnav->gbl.color_theme, &sts);
if ( EVEN(sts)) if ( EVEN(sts))
xnav->message('E',"Error in trend configuration"); xnav->message('E',"Error in trend configuration");
else { else {
...@@ -4119,7 +4126,7 @@ static int xnav_open_func( void *client_data, ...@@ -4119,7 +4126,7 @@ static int xnav_open_func( void *client_data,
trend->pop(); trend->pop();
} }
else { else {
trend = xnav->xtttrend_new( title_str, aref_vect, 0, width, height, options, &sts); trend = xnav->xtttrend_new( title_str, aref_vect, 0, width, height, options, xnav->gbl.color_theme, &sts);
if ( EVEN(sts)) if ( EVEN(sts))
xnav->message('E',"Error in trend configuration"); xnav->message('E',"Error in trend configuration");
else { else {
...@@ -4133,7 +4140,7 @@ static int xnav_open_func( void *client_data, ...@@ -4133,7 +4140,7 @@ static int xnav_open_func( void *client_data,
} }
} }
else { else {
trend = xnav->xtttrend_new( title_str, aref_vect, 0, width, height, options, &sts); trend = xnav->xtttrend_new( title_str, aref_vect, 0, width, height, options, xnav->gbl.color_theme, &sts);
if ( ODD(sts)) { if ( ODD(sts)) {
trend->close_cb = xnav_trend_close_cb; trend->close_cb = xnav_trend_close_cb;
trend->command_cb = xnav_trend_command_cb; trend->command_cb = xnav_trend_command_cb;
...@@ -4257,7 +4264,7 @@ static int xnav_open_func( void *client_data, ...@@ -4257,7 +4264,7 @@ static int xnav_open_func( void *client_data,
if ( ODD( dcli_get_qualifier( "/NEW", 0, 0))) { if ( ODD( dcli_get_qualifier( "/NEW", 0, 0))) {
XttTCurve *tcurve = xnav->xtttcurve_new( title_str, 0, width, height, XttTCurve *tcurve = xnav->xtttcurve_new( title_str, 0, width, height,
options, &sts); options, xnav->gbl.color_theme, &sts);
if ( ODD(sts)) { if ( ODD(sts)) {
tcurve->close_cb = xnav_tcurve_close_cb; tcurve->close_cb = xnav_tcurve_close_cb;
tcurve->command_cb = xnav_trend_command_cb; tcurve->command_cb = xnav_trend_command_cb;
...@@ -4298,7 +4305,7 @@ static int xnav_open_func( void *client_data, ...@@ -4298,7 +4305,7 @@ static int xnav_open_func( void *client_data,
return XNAV__HOLDCOMMAND; return XNAV__HOLDCOMMAND;
} }
XttTCurve *tcurve = xnav->xtttcurve_new( title_str, aref_vect, XttTCurve *tcurve = xnav->xtttcurve_new( title_str, aref_vect,
width, height, options, &sts); width, height, options, xnav->gbl.color_theme, &sts);
if ( ODD(sts)) { if ( ODD(sts)) {
tcurve->close_cb = xnav_tcurve_close_cb; tcurve->close_cb = xnav_tcurve_close_cb;
tcurve->command_cb = xnav_trend_command_cb; tcurve->command_cb = xnav_trend_command_cb;
...@@ -4373,11 +4380,15 @@ static int xnav_open_func( void *client_data, ...@@ -4373,11 +4380,15 @@ static int xnav_open_func( void *client_data,
if ( ODD( dcli_get_qualifier( "/FILE", file_str, sizeof(file_str)))) { if ( ODD( dcli_get_qualifier( "/FILE", file_str, sizeof(file_str)))) {
// Open exported history file // Open exported history file
hist = xnav->xttsevhist_new( title_str, 0, 0, 0, 0, 0, file_str,
width, height, options, &sts); hist = xnav->xttsevhist_new( file_str, 0, 0, 0, 0, 0, file_str,
width, height, options, xnav->gbl.color_theme, &sts);
if ( ODD(sts)) { if ( ODD(sts)) {
hist->help_cb = xnav_sevhist_help_cb; hist->help_cb = xnav_sevhist_help_cb;
hist->close_cb = xnav_sevhist_close_cb;
hist->get_select_cb = xnav_sevhist_get_select_cb; hist->get_select_cb = xnav_sevhist_get_select_cb;
xnav->appl.insert( applist_eType_SevHist, (void *)hist, pwr_cNOid, "",
NULL);
} }
return XNAV__SUCCESS; return XNAV__SUCCESS;
} }
...@@ -4625,26 +4636,35 @@ static int xnav_open_func( void *client_data, ...@@ -4625,26 +4636,35 @@ static int xnav_open_func( void *client_data,
xnav->set_clock_cursor(); xnav->set_clock_cursor();
if ( plotgroup_found) { if ( plotgroup_found) {
hist = xnav->xttsevhist_new( title_str, oidv, anamev, onamev, sevhistobjectv, hist = xnav->xttsevhist_new( title_str, oidv, anamev, onamev, sevhistobjectv,
xnav->scctx, 0, width, height, options, &sts); xnav->scctx, 0, width, height, options, xnav->gbl.color_theme, &sts);
if ( ODD(sts)) { if ( ODD(sts)) {
hist->help_cb = xnav_sevhist_help_cb; hist->help_cb = xnav_sevhist_help_cb;
hist->close_cb = xnav_sevhist_close_cb;
hist->get_select_cb = xnav_sevhist_get_select_cb; hist->get_select_cb = xnav_sevhist_get_select_cb;
xnav->appl.insert( applist_eType_SevHist, (void *)hist, oidv[0], "",
NULL);
} }
} }
else if( sevHistObjectFound ) { else if( sevHistObjectFound ) {
hist = xnav->xttsevhist_new( title_str, oidv, anamev, onamev, sevhistobjectv, hist = xnav->xttsevhist_new( title_str, oidv, anamev, onamev, sevhistobjectv,
xnav->scctx, 0, width, height, options, &sts); xnav->scctx, 0, width, height, options, xnav->gbl.color_theme, &sts);
if ( ODD(sts)) { if ( ODD(sts)) {
hist->help_cb = xnav_sevhist_help_cb; hist->help_cb = xnav_sevhist_help_cb;
hist->close_cb = xnav_sevhist_close_cb;
hist->get_select_cb = xnav_sevhist_get_select_cb; hist->get_select_cb = xnav_sevhist_get_select_cb;
xnav->appl.insert( applist_eType_SevHist, (void *)hist, oidv[0], "",
NULL);
} }
} }
else { else {
hist = xnav->xttsevhist_new( title_str, oidv, anamev, onamev, sevhistobjectv, hist = xnav->xttsevhist_new( title_str, oidv, anamev, onamev, sevhistobjectv,
xnav->scctx, 0, width, height, options, &sts); xnav->scctx, 0, width, height, options, xnav->gbl.color_theme, &sts);
if ( ODD(sts)) { if ( ODD(sts)) {
hist->help_cb = xnav_sevhist_help_cb; hist->help_cb = xnav_sevhist_help_cb;
hist->close_cb = xnav_sevhist_close_cb;
hist->get_select_cb = xnav_sevhist_get_select_cb; hist->get_select_cb = xnav_sevhist_get_select_cb;
xnav->appl.insert( applist_eType_SevHist, (void *)hist, oidv[0], "",
NULL);
} }
} }
xnav->reset_cursor(); xnav->reset_cursor();
...@@ -4697,7 +4717,7 @@ static int xnav_open_func( void *client_data, ...@@ -4697,7 +4717,7 @@ static int xnav_open_func( void *client_data,
if ( ODD( dcli_get_qualifier( "/FILE", file_str, sizeof(file_str)))) { if ( ODD( dcli_get_qualifier( "/FILE", file_str, sizeof(file_str)))) {
// Open exported fast file // Open exported fast file
XttFast *fast = xnav->xttfast_new( title_str, 0, width, height, 0, file_str, &sts); XttFast *fast = xnav->xttfast_new( title_str, 0, width, height, 0, file_str, xnav->gbl.color_theme, &sts);
if ( EVEN(sts)) if ( EVEN(sts))
xnav->message('E',"Error in fast configuration"); xnav->message('E',"Error in fast configuration");
else { else {
...@@ -4762,7 +4782,7 @@ static int xnav_open_func( void *client_data, ...@@ -4762,7 +4782,7 @@ static int xnav_open_func( void *client_data,
fast->pop(); fast->pop();
} }
else { else {
fast = xnav->xttfast_new( title_str, &aref, width, height, options, 0, &sts); fast = xnav->xttfast_new( title_str, &aref, width, height, options, 0, xnav->gbl.color_theme, &sts);
if ( EVEN(sts)) if ( EVEN(sts))
xnav->message('E',"Error in fast configuration"); xnav->message('E',"Error in fast configuration");
else { else {
...@@ -5599,6 +5619,14 @@ static void xnav_sevhist_help_cb( void *ctx, const char *key) ...@@ -5599,6 +5619,14 @@ static void xnav_sevhist_help_cb( void *ctx, const char *key)
xnav->message( ' ', null_str); xnav->message( ' ', null_str);
} }
static void xnav_sevhist_close_cb( void *ctx, XttSevHist *hist)
{
XNav *xnav = (XNav *) ctx;
xnav->appl.remove( (void *)hist);
delete hist;
}
static int xnav_sevhist_get_select_cb( void *ctx, pwr_tOid *oid, char *aname, char *oname) static int xnav_sevhist_get_select_cb( void *ctx, pwr_tOid *oid, char *aname, char *oname)
{ {
XNav *xnav = (XNav *) ctx; XNav *xnav = (XNav *) ctx;
...@@ -9549,7 +9577,7 @@ int XNav::set_parameter( char *name_str, char *value_str, int publicwrite) ...@@ -9549,7 +9577,7 @@ int XNav::set_parameter( char *name_str, char *value_str, int publicwrite)
void XNav::open_rttlog( char *name, char *filename) void XNav::open_rttlog( char *name, char *filename)
{ {
gecurve_new( name, filename, NULL, 0, 0); gecurve_new( name, filename, NULL, 0, 0, gbl.color_theme);
} }
...@@ -9823,6 +9851,12 @@ static void xnav_colortheme_selector_ok_cb( void *ctx, char *text) ...@@ -9823,6 +9851,12 @@ static void xnav_colortheme_selector_ok_cb( void *ctx, char *text)
for ( elem = xnav->appl.root; elem; elem = elem->next) { for ( elem = xnav->appl.root; elem; elem = elem->next) {
if ( elem->type == applist_eType_Graph) if ( elem->type == applist_eType_Graph)
((XttGe *)elem->ctx)->update_color_theme( idx); ((XttGe *)elem->ctx)->update_color_theme( idx);
else if ( elem->type == applist_eType_SevHist)
((XttSevHist *)elem->ctx)->update_color_theme( idx);
else if ( elem->type == applist_eType_Trend)
((XttTrend *)elem->ctx)->update_color_theme( idx);
else if ( elem->type == applist_eType_Fast)
((XttFast *)elem->ctx)->update_color_theme( idx);
} }
} }
if ( xnav->op) if ( xnav->op)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment