Commit 8abc2280 authored by Claes Sjofors's avatar Claes Sjofors

Xtt transent also works for trend, fast, sevhist, tcurve, multiview and login

parent 8dea9c42
...@@ -466,7 +466,7 @@ CoLogin *WNavGtk::login_new( const char *name, ...@@ -466,7 +466,7 @@ CoLogin *WNavGtk::login_new( const char *name,
void (* bc_cancel)( void *), void (* bc_cancel)( void *),
pwr_tStatus *status) pwr_tStatus *status)
{ {
return new CoLoginGtk( this, parent_wid, name, groupname, bc_success, bc_cancel, status); return new CoLoginGtk( this, parent_wid, name, groupname, bc_success, bc_cancel, 0, status);
} }
WCrr *WNavGtk::wcrr_new( pwr_tAttrRef *aref, pwr_tStatus *status) WCrr *WNavGtk::wcrr_new( pwr_tAttrRef *aref, pwr_tStatus *status)
......
...@@ -45,6 +45,14 @@ ...@@ -45,6 +45,14 @@
#include "co_api.h" #include "co_api.h"
#include "co_dcli.h" #include "co_dcli.h"
void CoLoginGtk::pop()
{
gtk_editable_delete_text( GTK_EDITABLE(widgets.usernamevalue), 0, -1);
gtk_editable_delete_text( GTK_EDITABLE(widgets.passwordvalue), 0, -1);
gtk_window_present( GTK_WINDOW(widgets.toplevel));
}
// //
// Callback from the pushbutton. // Callback from the pushbutton.
// //
...@@ -104,6 +112,7 @@ CoLoginGtk::CoLoginGtk( void *wl_parent_ctx, ...@@ -104,6 +112,7 @@ CoLoginGtk::CoLoginGtk( void *wl_parent_ctx,
const char *wl_groupname, const char *wl_groupname,
void (* wl_bc_success)( void *), void (* wl_bc_success)( void *),
void (* wl_bc_cancel)( void *), void (* wl_bc_cancel)( void *),
void *basewidget,
pwr_tStatus *status) : pwr_tStatus *status) :
CoLogin(wl_parent_ctx,wl_name,wl_groupname,wl_bc_success,wl_bc_cancel,status), CoLogin(wl_parent_ctx,wl_name,wl_groupname,wl_bc_success,wl_bc_cancel,status),
parent_wid(wl_parent_wid) parent_wid(wl_parent_wid)
...@@ -180,6 +189,9 @@ CoLoginGtk::CoLoginGtk( void *wl_parent_ctx, ...@@ -180,6 +189,9 @@ CoLoginGtk::CoLoginGtk( void *wl_parent_ctx,
gtk_widget_show_all( widgets.toplevel); gtk_widget_show_all( widgets.toplevel);
gtk_widget_grab_focus( widgets.usernamevalue); gtk_widget_grab_focus( widgets.usernamevalue);
if ( basewidget)
gtk_window_set_transient_for(GTK_WINDOW(widgets.toplevel), GTK_WINDOW(basewidget));
*status = 1; *status = 1;
} }
......
...@@ -62,11 +62,13 @@ class CoLoginGtk : public CoLogin { ...@@ -62,11 +62,13 @@ class CoLoginGtk : public CoLogin {
const char *wl_groupname, const char *wl_groupname,
void (* wl_bc_success)( void *), void (* wl_bc_success)( void *),
void (* wl_bc_cancel)( void *), void (* wl_bc_cancel)( void *),
void *base_widget,
pwr_tStatus *sts); pwr_tStatus *sts);
~CoLoginGtk(); ~CoLoginGtk();
pwr_tStatus get_values(); pwr_tStatus get_values();
void message( const char *new_label); void message( const char *new_label);
void pop();
static void activate_ok( GtkWidget *w, gpointer data); static void activate_ok( GtkWidget *w, gpointer data);
static void activate_cancel( GtkWidget *w, gpointer data); static void activate_cancel( GtkWidget *w, gpointer data);
......
...@@ -79,6 +79,7 @@ class CoLogin { ...@@ -79,6 +79,7 @@ class CoLogin {
virtual pwr_tStatus get_values() {return 0;} virtual pwr_tStatus get_values() {return 0;}
virtual void message( const char *new_label) {} virtual void message( const char *new_label) {}
virtual void pop() {}
static pwr_tStatus user_check( const char *groupname, const char *username, const char *password); static pwr_tStatus user_check( const char *groupname, const char *username, const char *password);
static pwr_tStatus insert_login_info( const char *groupname, const char *password, const char *username, static pwr_tStatus insert_login_info( const char *groupname, const char *password, const char *username,
......
...@@ -750,7 +750,8 @@ GeCurveGtk::GeCurveGtk( void *gc_parent_ctx, ...@@ -750,7 +750,8 @@ GeCurveGtk::GeCurveGtk( void *gc_parent_ctx,
int gc_width, int gc_width,
int gc_height, int gc_height,
unsigned int gc_options, unsigned int gc_options,
int gc_color_theme) : int gc_color_theme,
void *basewidget) :
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_color_theme), 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)
...@@ -1166,6 +1167,10 @@ GeCurveGtk::GeCurveGtk( void *gc_parent_ctx, ...@@ -1166,6 +1167,10 @@ GeCurveGtk::GeCurveGtk( void *gc_parent_ctx,
gtk_window_iconify( GTK_WINDOW(toplevel)); gtk_window_iconify( GTK_WINDOW(toplevel));
else if ( options & curve_mOptions_Invisible) else if ( options & curve_mOptions_Invisible)
g_object_set( toplevel, "visible", FALSE, NULL); g_object_set( toplevel, "visible", FALSE, NULL);
if ( basewidget)
gtk_window_set_transient_for(GTK_WINDOW(toplevel), GTK_WINDOW(basewidget));
} }
} }
......
...@@ -49,7 +49,8 @@ class GeCurveGtk : public GeCurve { ...@@ -49,7 +49,8 @@ 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_color_theme); int gc_width, int gc_height, unsigned int gc_options, int gc_color_theme,
void *basewidget);
GtkWidget *parent_wid; GtkWidget *parent_wid;
GtkWidget *grow_widget; GtkWidget *grow_widget;
GtkWidget *curve_widget; GtkWidget *curve_widget;
......
...@@ -70,7 +70,8 @@ XttFastGtk::XttFastGtk( void *parent_ctx, ...@@ -70,7 +70,8 @@ XttFastGtk::XttFastGtk( void *parent_ctx,
int width, int width,
int height, int height,
unsigned int options, unsigned int options,
int xn_color_theme, int xn_color_theme,
void *basewidget,
int *sts) : int *sts) :
XttFast( parent_ctx, name, fast_arp, xn_color_theme, sts), parent_widget(parent_wid) XttFast( parent_ctx, name, fast_arp, xn_color_theme, sts), parent_widget(parent_wid)
{ {
...@@ -87,7 +88,7 @@ XttFastGtk::XttFastGtk( void *parent_ctx, ...@@ -87,7 +88,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, color_theme); options, color_theme, basewidget);
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;
...@@ -104,7 +105,8 @@ XttFastGtk::XttFastGtk( void *parent_ctx, ...@@ -104,7 +105,8 @@ XttFastGtk::XttFastGtk( void *parent_ctx,
const char *name, const char *name,
GtkWidget **w, GtkWidget **w,
char *filename, char *filename,
int xn_color_theme, int xn_color_theme,
void *basewidget,
int *sts) : int *sts) :
XttFast( parent_ctx, name, filename, xn_color_theme, sts), XttFast( parent_ctx, name, filename, xn_color_theme, sts),
parent_widget(parent_wid) parent_widget(parent_wid)
...@@ -118,7 +120,7 @@ XttFastGtk::XttFastGtk( void *parent_ctx, ...@@ -118,7 +120,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, color_theme); curve = new GeCurveGtk( this, parent_widget, title, NULL, gcd, 1, 0, 0, 0, color_theme, basewidget);
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,14 +55,16 @@ class XttFastGtk : public XttFast { ...@@ -55,14 +55,16 @@ 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 xn_color_theme,
void *basewidget,
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 xn_color_theme,
void *basewidget,
int *sts); int *sts);
~XttFastGtk(); ~XttFastGtk();
}; };
......
...@@ -203,8 +203,8 @@ static void destroy_event( GtkWidget *w, gpointer data) ...@@ -203,8 +203,8 @@ static void destroy_event( GtkWidget *w, gpointer data)
XttMultiViewGtk::XttMultiViewGtk( GtkWidget *mv_parent_wid, void *mv_parent_ctx, const char *mv_name, XttMultiViewGtk::XttMultiViewGtk( GtkWidget *mv_parent_wid, void *mv_parent_ctx, const char *mv_name,
pwr_tAttrRef *mv_aref, int mv_width, int mv_height, pwr_tAttrRef *mv_aref, int mv_width, int mv_height,
int mv_x, int mv_y, unsigned int mv_options, int mv_color_theme, int mv_x, int mv_y, unsigned int mv_options, void *basewidget,
pwr_tStatus *sts, int mv_color_theme, pwr_tStatus *sts,
int (*mv_command_cb) (void *, char *, char *, void *), int (*mv_command_cb) (void *, char *, char *, void *),
int (*mv_get_current_objects_cb) (void *, pwr_sAttrRef **, int **), int (*mv_get_current_objects_cb) (void *, pwr_sAttrRef **, int **),
int (*mv_is_authorized_cb) (void *, unsigned int), int (*mv_is_authorized_cb) (void *, unsigned int),
...@@ -446,7 +446,7 @@ XttMultiViewGtk::XttMultiViewGtk( GtkWidget *mv_parent_wid, void *mv_parent_ctx, ...@@ -446,7 +446,7 @@ XttMultiViewGtk::XttMultiViewGtk( GtkWidget *mv_parent_wid, void *mv_parent_ctx,
mvctx[i*rows + j] = new XttMultiViewGtk( toplevel, this, "No title", mvctx[i*rows + j] = new XttMultiViewGtk( toplevel, this, "No title",
&graph_aref, w, h, mv_x, mv_y, &graph_aref, w, h, mv_x, mv_y,
ge_mOptions_Embedded, color_theme, &lsts, ge_mOptions_Embedded, 0, color_theme, &lsts,
multiview_ge_command_cb, multiview_ge_get_current_objects_cb, multiview_ge_command_cb, multiview_ge_get_current_objects_cb,
multiview_ge_is_authorized_cb, multiview_keyboard_cb); multiview_ge_is_authorized_cb, multiview_keyboard_cb);
...@@ -497,14 +497,14 @@ XttMultiViewGtk::XttMultiViewGtk( GtkWidget *mv_parent_wid, void *mv_parent_ctx, ...@@ -497,14 +497,14 @@ 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, 0, &plotgroup, w, h, (unsigned int)curve_mOptions_Embedded,
color_theme, sts); color_theme, 0, 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, arefv, 0, w, h, (unsigned int)curve_mOptions_Embedded,
color_theme, sts); color_theme, 0, sts);
} }
if ( EVEN(*sts)) break; if ( EVEN(*sts)) break;
...@@ -701,7 +701,7 @@ XttMultiViewGtk::XttMultiViewGtk( GtkWidget *mv_parent_wid, void *mv_parent_ctx, ...@@ -701,7 +701,7 @@ XttMultiViewGtk::XttMultiViewGtk( GtkWidget *mv_parent_wid, void *mv_parent_ctx,
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, color_theme, sts); (unsigned int)curve_mOptions_Embedded, color_theme, 0, 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;
...@@ -892,11 +892,15 @@ XttMultiViewGtk::XttMultiViewGtk( GtkWidget *mv_parent_wid, void *mv_parent_ctx, ...@@ -892,11 +892,15 @@ XttMultiViewGtk::XttMultiViewGtk( GtkWidget *mv_parent_wid, void *mv_parent_ctx,
gtk_window_iconify( GTK_WINDOW(toplevel)); gtk_window_iconify( GTK_WINDOW(toplevel));
else if ( options & ge_mOptions_Invisible) else if ( options & ge_mOptions_Invisible)
g_object_set( toplevel, "visible", FALSE, NULL); g_object_set( toplevel, "visible", FALSE, NULL);
if ( basewidget)
gtk_window_set_transient_for(GTK_WINDOW(toplevel), GTK_WINDOW(basewidget));
} }
else { else {
gtk_widget_set_size_request( box_widget, window_width, window_height); gtk_widget_set_size_request( box_widget, window_width, window_height);
} }
*sts = XNAV__SUCCESS; *sts = XNAV__SUCCESS;
} }
...@@ -994,7 +998,7 @@ int XttMultiViewGtk::set_subwindow_source( const char *name, char *source, char ...@@ -994,7 +998,7 @@ int XttMultiViewGtk::set_subwindow_source( const char *name, char *source, char
XttMultiViewGtk *ctx = new XttMultiViewGtk( toplevel, this, "No title", XttMultiViewGtk *ctx = new XttMultiViewGtk( toplevel, this, "No title",
&source_aref, w, h, x, y, &source_aref, w, h, x, y,
ge_mOptions_Embedded, color_theme, &sts, ge_mOptions_Embedded, 0, color_theme, &sts,
multiview_ge_command_cb, multiview_ge_get_current_objects_cb, multiview_ge_command_cb, multiview_ge_get_current_objects_cb,
multiview_ge_is_authorized_cb, multiview_keyboard_cb); multiview_ge_is_authorized_cb, multiview_keyboard_cb);
...@@ -1062,14 +1066,14 @@ int XttMultiViewGtk::set_subwindow_source( const char *name, char *source, char ...@@ -1062,14 +1066,14 @@ int XttMultiViewGtk::set_subwindow_source( const char *name, char *source, char
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, 0, &plotgroup, w, h, (unsigned int)curve_mOptions_Embedded,
color_theme, &lsts); color_theme, 0, &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, arefv, 0, w, h, (unsigned int)curve_mOptions_Embedded,
color_theme, &lsts); color_theme, 0, &lsts);
} }
if ( EVEN(lsts)) break; if ( EVEN(lsts)) break;
...@@ -1263,7 +1267,7 @@ int XttMultiViewGtk::set_subwindow_source( const char *name, char *source, char ...@@ -1263,7 +1267,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, color_theme, &lsts); (unsigned int)curve_mOptions_Embedded, color_theme, 0, &lsts);
if ( EVEN(lsts)) break; if ( EVEN(lsts)) break;
ctx->help_cb = multiview_trend_help_cb; ctx->help_cb = multiview_trend_help_cb;
......
...@@ -77,8 +77,8 @@ class XttMultiViewGtk : public XttMultiView { ...@@ -77,8 +77,8 @@ class XttMultiViewGtk : public XttMultiView {
CoWowFocusTimerGtk focustimer; CoWowFocusTimerGtk focustimer;
XttMultiViewGtk( GtkWidget *parent_wid, void *parent_ctx, const char *name, pwr_tAttrRef *aref, XttMultiViewGtk( GtkWidget *parent_wid, void *parent_ctx, const char *name, pwr_tAttrRef *aref,
int width, int height, int x, int y, unsigned int options, int color_theme, int width, int height, int x, int y, unsigned int options, void *basewidget,
pwr_tStatus *sts, int color_theme, pwr_tStatus *sts,
int (*mv_command_cb) (void *, char *, char *, void *), int (*mv_command_cb) (void *, char *, char *, void *),
int (*mv_get_current_objects_cb) (void *, pwr_sAttrRef **, int **), int (*mv_get_current_objects_cb) (void *, pwr_sAttrRef **, int **),
int (*mv_is_authorized_cb) (void *, unsigned int), int (*mv_is_authorized_cb) (void *, unsigned int),
......
...@@ -73,7 +73,8 @@ XttSevHistGtk::XttSevHistGtk( void *parent_ctx, ...@@ -73,7 +73,8 @@ 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 xn_color_theme,
void *basewidget,
int *sts) : int *sts) :
XttSevHist( parent_ctx, name, xn_oidv, xn_anamev, xn_onamev, sevhistobjectv, xn_scctx, xn_color_theme, 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)
...@@ -88,7 +89,7 @@ XttSevHistGtk::XttSevHistGtk( void *parent_ctx, ...@@ -88,7 +89,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, color_theme); xn_width, xn_height, xn_options, color_theme, basewidget);
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;
...@@ -117,7 +118,8 @@ XttSevHistGtk::XttSevHistGtk( void *parent_ctx, ...@@ -117,7 +118,8 @@ XttSevHistGtk::XttSevHistGtk( void *parent_ctx,
const char *name, const char *name,
GtkWidget **w, GtkWidget **w,
char *filename, char *filename,
int xn_color_theme, int xn_color_theme,
void *basewidget,
int *sts) : int *sts) :
XttSevHist( parent_ctx, name, filename, xn_color_theme, sts), XttSevHist( parent_ctx, name, filename, xn_color_theme, sts),
parent_widget(parent_wid) parent_widget(parent_wid)
...@@ -131,7 +133,7 @@ XttSevHistGtk::XttSevHistGtk( void *parent_ctx, ...@@ -131,7 +133,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, color_theme); curve = new GeCurveGtk( this, parent_widget, title, NULL, gcd, 1, 0, 0, 0, color_theme, basewidget);
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,14 +59,16 @@ class XttSevHistGtk : public XttSevHist { ...@@ -59,14 +59,16 @@ class XttSevHistGtk : public XttSevHist {
int width, int width,
int height, int height,
unsigned int options, unsigned int options,
int xn_color_theme, int xn_color_theme,
void *basewidget,
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 xn_color_theme,
void *basewidget,
int *sts); int *sts);
~XttSevHistGtk(); ~XttSevHistGtk();
}; };
......
...@@ -69,7 +69,8 @@ XttTCurveGtk::XttTCurveGtk( void *parent_ctx, ...@@ -69,7 +69,8 @@ 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 xn_color_theme,
void *basewidget,
int *sts) : int *sts) :
XttTCurve( parent_ctx, name, xn_arefv, xn_color_theme, sts), XttTCurve( parent_ctx, name, xn_arefv, xn_color_theme, sts),
parent_widget(parent_wid) parent_widget(parent_wid)
...@@ -84,7 +85,7 @@ XttTCurveGtk::XttTCurveGtk( void *parent_ctx, ...@@ -84,7 +85,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, color_theme); xn_width, xn_height, xn_options, color_theme, basewidget);
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,7 +55,8 @@ class XttTCurveGtk : public XttTCurve { ...@@ -55,7 +55,8 @@ 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 xn_color_theme,
void *basewidget,
int *sts); int *sts);
~XttTCurveGtk(); ~XttTCurveGtk();
}; };
......
...@@ -69,7 +69,8 @@ XttTrendGtk::XttTrendGtk( void *parent_ctx, ...@@ -69,7 +69,8 @@ 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 x_color_theme,
void *basewidget,
int *sts) : int *sts) :
XttTrend( parent_ctx, name, trend_list, plotgroup, x_options, x_color_theme, sts), XttTrend( parent_ctx, name, trend_list, plotgroup, x_options, x_color_theme, sts),
parent_widget(parent_wid) parent_widget(parent_wid)
...@@ -79,7 +80,7 @@ XttTrendGtk::XttTrendGtk( void *parent_ctx, ...@@ -79,7 +80,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, color_theme); options, color_theme, basewidget);
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;
......
...@@ -57,6 +57,7 @@ class XttTrendGtk : public XttTrend { ...@@ -57,6 +57,7 @@ class XttTrendGtk : public XttTrend {
int height, int height,
unsigned int options, unsigned int options,
int x_color_theme, int x_color_theme,
void *basewidget,
int *sts); int *sts);
~XttTrendGtk(); ~XttTrendGtk();
}; };
......
...@@ -276,41 +276,45 @@ Op *XNavGtk::op_new( char *opplace, pwr_tStatus *sts) ...@@ -276,41 +276,45 @@ 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, int color_theme, pwr_tStatus *sts) int width, int height, unsigned int options, int color_theme,
void *basewidget, pwr_tStatus *sts)
{ {
GtkWidget *w; GtkWidget *w;
return new XttTrendGtk( this, parent_wid, name, &w, objar, plotgroup, width, height, options, color_theme, sts); return new XttTrendGtk( this, parent_wid, name, &w, objar, plotgroup, width, height, options, color_theme,
basewidget, 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, int color_theme, pwr_tStatus *sts) int width, int height, unsigned int options, int color_theme,
void *basewidget, 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, color_theme, sts); return new XttSevHistGtk( this, parent_wid, name, &w, oidv, anamev, onamev, sevhistobjectv, scctx, width, height, options, color_theme, basewidget, sts);
else else
return new XttSevHistGtk( this, parent_wid, name, &w, filename, color_theme, sts); return new XttSevHistGtk( this, parent_wid, name, &w, filename, color_theme, basewidget, sts);
} }
XttTCurve *XNavGtk::xtttcurve_new( char *name, pwr_tAttrRef *arefv, int width, int height, unsigned int options, int color_theme, pwr_tStatus *sts) XttTCurve *XNavGtk::xtttcurve_new( char *name, pwr_tAttrRef *arefv, int width, int height, unsigned int options, int color_theme, void *basewidget, pwr_tStatus *sts)
{ {
GtkWidget *w; GtkWidget *w;
return new XttTCurveGtk( this, parent_wid, name, &w, arefv, width, height, options, color_theme, sts); return new XttTCurveGtk( this, parent_wid, name, &w, arefv, width, height, options, color_theme, basewidget, 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, int color_theme, pwr_tStatus *sts) unsigned int options, char *filename, int color_theme, void *basewidget,
pwr_tStatus *sts)
{ {
GtkWidget *w; GtkWidget *w;
if ( !filename) if ( !filename)
return new XttFastGtk( this, parent_wid, name, &w, objar, width, height, options, color_theme, sts); return new XttFastGtk( this, parent_wid, name, &w, objar, width, height, options, color_theme, basewidget, sts);
else else
return new XttFastGtk( this, parent_wid, name, &w, filename, color_theme, sts); return new XttFastGtk( this, parent_wid, name, &w, filename, color_theme, basewidget, 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,
...@@ -342,14 +346,14 @@ XttGe *XNavGtk::xnav_ge_new( const char *name, const char *filename, int scrollb ...@@ -342,14 +346,14 @@ XttGe *XNavGtk::xnav_ge_new( const char *name, const char *filename, int scrollb
XttMultiView *XNavGtk::multiview_new( const char *name, pwr_tAttrRef *aref, XttMultiView *XNavGtk::multiview_new( const char *name, pwr_tAttrRef *aref,
int width, int height, int x, int y, unsigned int options, int width, int height, int x, int y, unsigned int options,
int color_theme, pwr_tStatus *sts, void *basewidget, int color_theme, pwr_tStatus *sts,
int (*command_cb) (void *, char *, char *, void *), int (*command_cb) (void *, char *, char *, void *),
int (*get_current_objects_cb) (void *, pwr_sAttrRef **, int **), int (*get_current_objects_cb) (void *, pwr_sAttrRef **, int **),
int (*is_authorized_cb) (void *, unsigned int), int (*is_authorized_cb) (void *, unsigned int),
void (*keyboard_cb) (void *, void *, int, int)) void (*keyboard_cb) (void *, void *, int, int))
{ {
return new XttMultiViewGtk( parent_wid, this, name, aref, return new XttMultiViewGtk( parent_wid, this, name, aref,
width, height, x, y, options, color_theme, sts, command_cb, width, height, x, y, options, basewidget, color_theme, sts, command_cb,
get_current_objects_cb, is_authorized_cb, keyboard_cb); get_current_objects_cb, is_authorized_cb, keyboard_cb);
} }
...@@ -362,9 +366,10 @@ XttStream *XNavGtk::stream_new( const char *name, const char *uri, ...@@ -362,9 +366,10 @@ 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 color_theme) int pos_right, unsigned int options, int color_theme, void *basewidget)
{ {
return new GeCurveGtk( this, parent_wid, name, filename, data, pos_right, 0, 0, options, color_theme); return new GeCurveGtk( this, parent_wid, name, filename, data, pos_right, 0, 0, options, color_theme,
basewidget);
} }
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,
...@@ -378,9 +383,10 @@ CoLogin *XNavGtk::login_new( const char *name, ...@@ -378,9 +383,10 @@ CoLogin *XNavGtk::login_new( const char *name,
const char *groupname, const char *groupname,
void (* bc_success)( void *), void (* bc_success)( void *),
void (* bc_cancel)( void *), void (* bc_cancel)( void *),
void *basewidget,
pwr_tStatus *status) pwr_tStatus *status)
{ {
return new CoLoginGtk( this, parent_wid, name, groupname, bc_success, bc_cancel, status); return new CoLoginGtk( this, parent_wid, name, groupname, bc_success, bc_cancel, basewidget, status);
} }
XttKeyboard *XNavGtk::keyboard_new( const char *name, keyboard_eKeymap keymap, keyboard_eType type, XttKeyboard *XNavGtk::keyboard_new( const char *name, keyboard_eKeymap keymap, keyboard_eType type,
......
...@@ -77,15 +77,16 @@ class XNavGtk : public XNav { ...@@ -77,15 +77,16 @@ 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, int color_theme, pwr_tStatus *sts); int width, int height, unsigned int options, int color_theme, void *basewidget,
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, int color_theme, char *filename, int width, int height, unsigned int options, int color_theme,
pwr_tStatus *sts); void *basewidget, pwr_tStatus *sts);
XttTCurve *xtttcurve_new( char *name, pwr_tAttrRef *arefv, int width, int height, unsigned int options, XttTCurve *xtttcurve_new( char *name, pwr_tAttrRef *arefv, int width, int height, unsigned int options,
int color_theme, pwr_tStatus *sts); int color_theme, void *basewidget, 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, int color_theme, pwr_tStatus *sts); char *filename, int color_theme, void *basewidget, 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);
...@@ -100,7 +101,7 @@ class XNavGtk : public XNav { ...@@ -100,7 +101,7 @@ class XNavGtk : public XNav {
void (*xg_keyboard_cb) (void *, void *, int, int)); void (*xg_keyboard_cb) (void *, void *, int, int));
XttMultiView *multiview_new( const char *name, pwr_tAttrRef *aref, XttMultiView *multiview_new( const char *name, pwr_tAttrRef *aref,
int width, int height, int x, int y, unsigned int options, int width, int height, int x, int y, unsigned int options,
int color_theme, pwr_tStatus *sts, void *basewidget, int color_theme, pwr_tStatus *sts,
int (*command_cb) (void *, char *, char *, void *), int (*command_cb) (void *, char *, char *, void *),
int (*get_current_objects_cb) (void *, pwr_sAttrRef **, int **), int (*get_current_objects_cb) (void *, pwr_sAttrRef **, int **),
int (*is_authorized_cb) (void *, unsigned int), int (*is_authorized_cb) (void *, unsigned int),
...@@ -109,13 +110,14 @@ class XNavGtk : public XNav { ...@@ -109,13 +110,14 @@ 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 color_theme); int pos_right, unsigned int options, int color_theme, void *basewidget);
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,
const char *wl_groupname, const char *wl_groupname,
void (* wl_bc_success)( void *), void (* wl_bc_success)( void *),
void (* wl_bc_cancel)( void *), void (* wl_bc_cancel)( void *),
void *basewidget,
pwr_tStatus *status); pwr_tStatus *status);
XttKeyboard *keyboard_new( const char *name, keyboard_eKeymap keymap, keyboard_eType type, XttKeyboard *keyboard_new( const char *name, keyboard_eKeymap keymap, keyboard_eType type,
int color_theme, pwr_tStatus *status); int color_theme, pwr_tStatus *status);
......
...@@ -263,14 +263,16 @@ Op *XNavMotif::op_new( char *opplace, pwr_tStatus *sts) ...@@ -263,14 +263,16 @@ Op *XNavMotif::op_new( char *opplace, pwr_tStatus *sts)
} }
XttTrend *XNavMotif::xtttrend_new( char *name, pwr_tAttrRef *objar, pwr_tAttrRef *plotgroup, XttTrend *XNavMotif::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, void *basewidget,
pwr_tStatus *sts)
{ {
Widget w; Widget w;
return new XttTrendMotif( this, parent_wid, name, &w, objar, plotgroup, width, height, options, sts); return new XttTrendMotif( this, parent_wid, name, &w, objar, plotgroup, width, height, options, sts);
} }
XttFast *XNavMotif::xttfast_new( char *name, pwr_tAttrRef *objar, int width, int height, unsigned int options, pwr_tStatus *sts) XttFast *XNavMotif::xttfast_new( char *name, pwr_tAttrRef *objar, int width, int height, unsigned int options,
void *basewidget, pwr_tStatus *sts)
{ {
Widget w; Widget w;
...@@ -304,7 +306,7 @@ XttGe *XNavMotif::xnav_ge_new( const char *name, const char *filename, int scrol ...@@ -304,7 +306,7 @@ XttGe *XNavMotif::xnav_ge_new( const char *name, const char *filename, int scrol
} }
GeCurve *XNavMotif::gecurve_new( char *name, char *filename, GeCurveData *data, GeCurve *XNavMotif::gecurve_new( char *name, char *filename, GeCurveData *data,
int pos_right, unsigned int options) int pos_right, unsigned int options, basewidget)
{ {
return new GeCurveMotif( this, parent_wid, name, filename, data, pos_right, 0, 0, options); return new GeCurveMotif( this, parent_wid, name, filename, data, pos_right, 0, 0, options);
} }
...@@ -313,6 +315,7 @@ CoLogin *XNavMotif::login_new( const char *name, ...@@ -313,6 +315,7 @@ CoLogin *XNavMotif::login_new( const char *name,
const char *groupname, const char *groupname,
void (* bc_success)( void *), void (* bc_success)( void *),
void (* bc_cancel)( void *), void (* bc_cancel)( void *),
void *basewidget,
pwr_tStatus *status) pwr_tStatus *status)
{ {
return new CoLoginMotif( this, parent_wid, name, groupname, bc_success, bc_cancel, status); return new CoLoginMotif( this, parent_wid, name, groupname, bc_success, bc_cancel, status);
......
...@@ -74,10 +74,10 @@ class XNavMotif : public XNav { ...@@ -74,10 +74,10 @@ class XNavMotif : 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, int width, int height, unsigned int options, void *basewidget,
pwr_tStatus *sts); pwr_tStatus *sts);
XttFast *xttfast_new( char *name, pwr_tAttrRef *objar, int width, int height, XttFast *xttfast_new( char *name, pwr_tAttrRef *objar, int width, int height,
unsigned int options, pwr_tStatus *sts); unsigned int options, void *basewidget, 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);
...@@ -90,11 +90,12 @@ class XNavMotif : public XNav { ...@@ -90,11 +90,12 @@ class XNavMotif : public XNav {
int (*xg_get_current_objects_cb) (void *, pwr_sAttrRef **, int **), int (*xg_get_current_objects_cb) (void *, pwr_sAttrRef **, int **),
int (*xg_is_authorized_cb) (void *, unsigned int)); int (*xg_is_authorized_cb) (void *, unsigned int));
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, void *basewidget);
CoLogin *login_new( const char *wl_name, CoLogin *login_new( const char *wl_name,
const char *wl_groupname, const char *wl_groupname,
void (* wl_bc_success)( void *), void (* wl_bc_success)( void *),
void (* wl_bc_cancel)( void *), void (* wl_bc_cancel)( void *),
void *basewidget,
pwr_tStatus *status); pwr_tStatus *status);
void bell( int time); void bell( int time);
void get_popup_menu( pwr_sAttrRef attrref, void get_popup_menu( pwr_sAttrRef attrref,
......
...@@ -367,15 +367,15 @@ class XNav { ...@@ -367,15 +367,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, int color_theme, pwr_tStatus *sts) {return 0;} int width, int height, unsigned int options, int color_theme, void *basewidget, 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, char *filename, int width, int height, unsigned int options,
int color_theme, pwr_tStatus *sts) {return 0;} int color_theme, void *basewidget, pwr_tStatus *sts) {return 0;}
virtual XttTCurve *xtttcurve_new( char *name, pwr_tAttrRef *arefv, int width, int height, unsigned int options, virtual XttTCurve *xtttcurve_new( char *name, pwr_tAttrRef *arefv, int width, int height, unsigned int options,
int color_theme, pwr_tStatus *sts) {return 0;} int color_theme, void *basewidget, 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, int color_theme, pwr_tStatus *sts) {return 0;} char *filename, int color_theme, void *basewidget, 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;}
...@@ -390,7 +390,7 @@ class XNav { ...@@ -390,7 +390,7 @@ class XNav {
void (*xg_keyboard_cb) (void *, void *, int, int)) {return 0;} void (*xg_keyboard_cb) (void *, void *, int, int)) {return 0;}
virtual XttMultiView *multiview_new( const char *name, pwr_tAttrRef *aref, virtual XttMultiView *multiview_new( const char *name, pwr_tAttrRef *aref,
int width, int height, int x, int y, unsigned int options, int width, int height, int x, int y, unsigned int options,
int color_theme, pwr_tStatus *sts, void *basewidget, int color_theme, pwr_tStatus *sts,
int (*command_cb) (void *, char *, char *, void *), int (*command_cb) (void *, char *, char *, void *),
int (*get_current_objects_cb) (void *, pwr_sAttrRef **, int **), int (*get_current_objects_cb) (void *, pwr_sAttrRef **, int **),
int (*is_authorized_cb) (void *, unsigned int), int (*is_authorized_cb) (void *, unsigned int),
...@@ -399,7 +399,7 @@ class XNav { ...@@ -399,7 +399,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, int color_theme) {return 0;} int pos_right, unsigned int options, int color_theme, void *basewidget) {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;}
...@@ -407,6 +407,7 @@ class XNav { ...@@ -407,6 +407,7 @@ class XNav {
const char *wl_groupname, const char *wl_groupname,
void (* wl_bc_success)( void *), void (* wl_bc_success)( void *),
void (* wl_bc_cancel)( void *), void (* wl_bc_cancel)( void *),
void *basewidget,
pwr_tStatus *status) { return 0;} pwr_tStatus *status) { return 0;}
virtual XttKeyboard *keyboard_new( const char *name, keyboard_eKeymap keymap, keyboard_eType type, virtual XttKeyboard *keyboard_new( const char *name, keyboard_eKeymap keymap, keyboard_eType type,
int color_theme, pwr_tStatus *status) {return 0;} int color_theme, pwr_tStatus *status) {return 0;}
......
...@@ -661,6 +661,7 @@ static int xnav_login_func( void *client_data, ...@@ -661,6 +661,7 @@ static int xnav_login_func( void *client_data,
char systemgroup[80]; char systemgroup[80];
unsigned int priv; unsigned int priv;
char msg[120]; char msg[120];
void *basewidget = 0;
sts = gdh_GetObjectInfo ( "pwrNode-System.SystemGroup", &systemgroup, sts = gdh_GetObjectInfo ( "pwrNode-System.SystemGroup", &systemgroup,
sizeof(systemgroup)); sizeof(systemgroup));
...@@ -668,9 +669,19 @@ static int xnav_login_func( void *client_data, ...@@ -668,9 +669,19 @@ static int xnav_login_func( void *client_data,
if ( EVEN( dcli_get_qualifier( "dcli_arg1", arg1_str, sizeof(arg1_str)))) if ( EVEN( dcli_get_qualifier( "dcli_arg1", arg1_str, sizeof(arg1_str))))
{ {
xnav->cologin = xnav->login_new( "PwR Login", systemgroup, xnav_login_success_bc, if ( xnav->cologin)
xnav_login_cancel_bc, &sts); xnav->cologin->pop();
else {
if ( xnav->opplace_p->Options & pwr_mOpPlaceOptionsMask_AllMainTransient) {
if ( xnav->ge_main)
basewidget = xnav->ge_main->get_widget();
else if ( xnav->multiview_main)
basewidget = xnav->multiview_main->get_widget();
}
xnav->cologin = xnav->login_new( "PwR Login", systemgroup, xnav_login_success_bc,
xnav_login_cancel_bc, basewidget, &sts);
}
return 1; return 1;
} }
if ( EVEN( dcli_get_qualifier( "dcli_arg2", arg2_str, sizeof(arg2_str)))) if ( EVEN( dcli_get_qualifier( "dcli_arg2", arg2_str, sizeof(arg2_str))))
...@@ -3471,6 +3482,7 @@ static int xnav_open_func( void *client_data, ...@@ -3471,6 +3482,7 @@ static int xnav_open_func( void *client_data,
int nr; int nr;
pwr_tStatus sts; pwr_tStatus sts;
pwr_tAttrRef aref_vect[2]; pwr_tAttrRef aref_vect[2];
void *basewidget = 0;
// Command is "OPEN MULTIVIEW" // Command is "OPEN MULTIVIEW"
...@@ -3569,8 +3581,15 @@ static int xnav_open_func( void *client_data, ...@@ -3569,8 +3581,15 @@ static int xnav_open_func( void *client_data,
mvctx->pop(); mvctx->pop();
} }
else { else {
if ( xnav->opplace_p->Options & pwr_mOpPlaceOptionsMask_AllMainTransient) {
if ( xnav->ge_main)
basewidget = xnav->ge_main->get_widget();
else if ( xnav->multiview_main)
basewidget = xnav->multiview_main->get_widget();
}
mvctx = xnav->multiview_new( name_str, &aref, width, height, x, y, options, mvctx = xnav->multiview_new( name_str, &aref, width, height, x, y, options,
xnav->gbl.color_theme, &sts, basewidget, xnav->gbl.color_theme, &sts,
&xnav_multiview_command_cb, &xnav_multiview_command_cb,
&xnav_ge_get_current_objects_cb, &xnav_ge_get_current_objects_cb,
&xnav_ge_is_authorized_cb, &xnav_ge_is_authorized_cb,
...@@ -4120,12 +4139,21 @@ static int xnav_open_func( void *client_data, ...@@ -4120,12 +4139,21 @@ static int xnav_open_func( void *client_data,
strcpy( title_str, "Trend"); strcpy( title_str, "Trend");
} }
void *basewidget = 0;
if ( xnav->opplace_p->Options & pwr_mOpPlaceOptionsMask_AllMainTransient) {
if ( xnav->ge_main)
basewidget = xnav->ge_main->get_widget();
else if ( xnav->multiview_main)
basewidget = xnav->multiview_main->get_widget();
}
if ( plotgroup_found) { if ( plotgroup_found) {
if ( xnav->appl.find( applist_eType_Trend, &plotgroup, (void **) &trend)) { if ( xnav->appl.find( applist_eType_Trend, &plotgroup, (void **) &trend)) {
trend->pop(); trend->pop();
} }
else { else {
trend = xnav->xtttrend_new( title_str, NULL, &plotgroup, width, height, options, xnav->gbl.color_theme, &sts); trend = xnav->xtttrend_new( title_str, NULL, &plotgroup, width, height, options, xnav->gbl.color_theme,
basewidget, &sts);
if ( EVEN(sts)) if ( EVEN(sts))
xnav->message('E',"Error in trend configuration"); xnav->message('E',"Error in trend configuration");
else { else {
...@@ -4145,7 +4173,8 @@ static int xnav_open_func( void *client_data, ...@@ -4145,7 +4173,8 @@ 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, xnav->gbl.color_theme, &sts); trend = xnav->xtttrend_new( title_str, aref_vect, 0, width, height, options, xnav->gbl.color_theme,
basewidget, &sts);
if ( EVEN(sts)) if ( EVEN(sts))
xnav->message('E',"Error in trend configuration"); xnav->message('E',"Error in trend configuration");
else { else {
...@@ -4159,7 +4188,8 @@ static int xnav_open_func( void *client_data, ...@@ -4159,7 +4188,8 @@ static int xnav_open_func( void *client_data,
} }
} }
else { else {
trend = xnav->xtttrend_new( title_str, aref_vect, 0, width, height, options, xnav->gbl.color_theme, &sts); trend = xnav->xtttrend_new( title_str, aref_vect, 0, width, height, options, xnav->gbl.color_theme,
basewidget, &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;
...@@ -4281,9 +4311,17 @@ static int xnav_open_func( void *client_data, ...@@ -4281,9 +4311,17 @@ static int xnav_open_func( void *client_data,
strcpy( title_str, "Trend"); strcpy( title_str, "Trend");
} }
void *basewidget = 0;
if ( xnav->opplace_p->Options & pwr_mOpPlaceOptionsMask_AllMainTransient) {
if ( xnav->ge_main)
basewidget = xnav->ge_main->get_widget();
else if ( xnav->multiview_main)
basewidget = xnav->multiview_main->get_widget();
}
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, xnav->gbl.color_theme, &sts); options, xnav->gbl.color_theme, basewidget, &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;
...@@ -4324,7 +4362,8 @@ static int xnav_open_func( void *client_data, ...@@ -4324,7 +4362,8 @@ 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, xnav->gbl.color_theme, &sts); width, height, options, xnav->gbl.color_theme,
basewidget, &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;
...@@ -4397,11 +4436,19 @@ static int xnav_open_func( void *client_data, ...@@ -4397,11 +4436,19 @@ static int xnav_open_func( void *client_data,
else else
height = 0; height = 0;
void *basewidget = 0;
if ( xnav->opplace_p->Options & pwr_mOpPlaceOptionsMask_AllMainTransient) {
if ( xnav->ge_main)
basewidget = xnav->ge_main->get_widget();
else if ( xnav->multiview_main)
basewidget = xnav->multiview_main->get_widget();
}
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( file_str, 0, 0, 0, 0, 0, file_str, hist = xnav->xttsevhist_new( file_str, 0, 0, 0, 0, 0, file_str,
width, height, options, xnav->gbl.color_theme, &sts); width, height, options, xnav->gbl.color_theme, basewidget, &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->close_cb = xnav_sevhist_close_cb;
...@@ -4655,7 +4702,8 @@ static int xnav_open_func( void *client_data, ...@@ -4655,7 +4702,8 @@ 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, xnav->gbl.color_theme, &sts); xnav->scctx, 0, width, height, options, xnav->gbl.color_theme,
basewidget, &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->close_cb = xnav_sevhist_close_cb;
...@@ -4666,7 +4714,8 @@ static int xnav_open_func( void *client_data, ...@@ -4666,7 +4714,8 @@ static int xnav_open_func( void *client_data,
} }
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, xnav->gbl.color_theme, &sts); xnav->scctx, 0, width, height, options, xnav->gbl.color_theme,
basewidget, &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->close_cb = xnav_sevhist_close_cb;
...@@ -4677,7 +4726,8 @@ static int xnav_open_func( void *client_data, ...@@ -4677,7 +4726,8 @@ static int xnav_open_func( void *client_data,
} }
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, xnav->gbl.color_theme, &sts); xnav->scctx, 0, width, height, options, xnav->gbl.color_theme,
basewidget, &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->close_cb = xnav_sevhist_close_cb;
...@@ -4734,9 +4784,18 @@ static int xnav_open_func( void *client_data, ...@@ -4734,9 +4784,18 @@ static int xnav_open_func( void *client_data,
else else
height = 0; height = 0;
void *basewidget = 0;
if ( xnav->opplace_p->Options & pwr_mOpPlaceOptionsMask_AllMainTransient) {
if ( xnav->ge_main)
basewidget = xnav->ge_main->get_widget();
else if ( xnav->multiview_main)
basewidget = xnav->multiview_main->get_widget();
}
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, xnav->gbl.color_theme, &sts); XttFast *fast = xnav->xttfast_new( title_str, 0, width, height, 0, file_str, xnav->gbl.color_theme,
basewidget, &sts);
if ( EVEN(sts)) if ( EVEN(sts))
xnav->message('E',"Error in fast configuration"); xnav->message('E',"Error in fast configuration");
else { else {
...@@ -4801,7 +4860,8 @@ static int xnav_open_func( void *client_data, ...@@ -4801,7 +4860,8 @@ 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, xnav->gbl.color_theme, &sts); fast = xnav->xttfast_new( title_str, &aref, width, height, options, 0, xnav->gbl.color_theme,
basewidget, &sts);
if ( EVEN(sts)) if ( EVEN(sts))
xnav->message('E',"Error in fast configuration"); xnav->message('E',"Error in fast configuration");
else { else {
...@@ -9792,7 +9852,15 @@ int XNav::set_parameter( char *name_str, char *value_str, int publicwrite) ...@@ -9792,7 +9852,15 @@ 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, gbl.color_theme); void *basewidget = 0;
if ( opplace_p->Options & pwr_mOpPlaceOptionsMask_AllMainTransient) {
if ( ge_main)
basewidget = ge_main->get_widget();
else if ( multiview_main)
basewidget = multiview_main->get_widget();
}
gecurve_new( name, filename, NULL, 0, 0, gbl.color_theme, basewidget);
} }
......
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