Commit 65f5d4f6 authored by claes's avatar claes

GTK added

parent bf001ac4
include $(pwre_dir_symbols)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/$(type_name)_generic.mk
ifeq ($($(type_name)_generic_mk),)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(type_name)_generic.mk
endif
ifeq ($($(type_name)_generic_mk),)
include $(pwre_kroot)/tools/bld/src/$(type_name)_generic.mk
endif
-include ../../special.mk
-include ../special.mk
-include special.mk
This diff is collapsed.
/*
* Proview $Id: rt_pb_gsd_attr_gtk.h,v 1.1 2007-01-04 08:42:43 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**/
#ifndef rt_pb_gsd_attr_gtk_h
#define rt_pb_gsd_attr_gtk_h
/* rt_pb_gsd_attr_gtk.h -- Profibus gsd attribute editor */
#include "rt_pb_gsd_attr.h"
class GsdAttrGtk : public GsdAttr {
public:
GtkWidget *parent_wid;
GtkWidget *brow_widget;
GtkWidget *form_widget;
GtkWidget *toplevel;
GtkWidget *msg_label;
GtkWidget *cmd_prompt;
GtkWidget *cmd_input;
GtkWidget *attrnav_form;
GtkWidget *cmd_ok;
GtkWidget *cmd_cancel;
GtkWidget *menubutton_copy;
GtkWidget *menubutton_cut;
GtkWidget *menubutton_paste;
GtkWidget *menubutton_changevalue;
GsdAttrGtk( GtkWidget *a_parent_wid,
void *a_parent_ctx,
void *a_object,
pb_gsd *a_gsd,
int a_edit_mode);
~GsdAttrGtk();
void message( char severity, char *message);
void set_prompt( char *prompt);
void change_value();
static void gsdattr_message( void *attr, char severity, char *message);
static void gsdattr_change_value_cb( void *attr_ctx);
static void activate_change_value( GtkWidget *w, gpointer data);
static void activate_exit( GtkWidget *w, gpointer data);
static void activate_help( GtkWidget *w, gpointer data);
static void activate_copy( GtkWidget *w, gpointer data);
static void activate_cut( GtkWidget *w, gpointer data);
static void activate_paste( GtkWidget *w, gpointer data);
static void activate_zoom_in( GtkWidget *w, gpointer data);
static void activate_zoom_out( GtkWidget *w, gpointer data);
static void activate_zoom_reset( GtkWidget *w, gpointer data);
static void activate_print( GtkWidget *w, gpointer data);
static void activate_cmd_input( GtkWidget *w, gpointer data);
static void activate_cmd_ok( GtkWidget *w, gpointer data);
static void cmd_close_apply_cb( void *ctx, void *data);
static void cmd_close_no_cb( void *ctx, void *data);
static void activate_cmd_ca( GtkWidget *w, gpointer dataxo);
static gboolean action_inputfocus( GtkWidget *w, GdkEvent *event, gpointer data);
//static void valchanged_cmd_input( GtkWidget *w, gpointer data);
};
#endif
/*
* Proview $Id: rt_pb_gsd_attrnav_gtk.cpp,v 1.1 2007-01-04 08:42:43 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**/
/* rt_pb_gsd_attrnav_gtk.cpp -- Display gsd attributes */
#include "glow_std.h"
#include <stdio.h>
#include <stdlib.h>
#include <gtk/gtk.h>
#include "co_cdh.h"
#include "co_time.h"
#include "co_wow_gtk.h"
#include "flow.h"
#include "flow_browctx.h"
#include "flow_browapi.h"
#include "flow_browwidget_gtk.h"
#include "flow_msg.h"
#include "glow.h"
#include "glow_growctx.h"
#include "glow_growapi.h"
#include "glow_growwidget_gtk.h"
#include "rt_pb_gsd.h"
#include "rt_pb_gsd_attr_gtk.h"
#include "rt_pb_gsd_attrnav_gtk.h"
#include "rt_pb_msg.h"
//
// Create the navigator widget
//
GsdAttrNavGtk::GsdAttrNavGtk( void *xn_parent_ctx,
GtkWidget *xn_parent_wid,
char *xn_name,
pb_gsd *xn_gsd,
int xn_edit_mode,
GtkWidget **w,
pwr_tStatus *status) :
GsdAttrNav( xn_parent_ctx, xn_name, xn_gsd, xn_edit_mode, status),
parent_wid(xn_parent_wid)
{
form_widget = scrolledbrowwidgetgtk_new( init_brow_cb,
this, &brow_widget);
gtk_widget_show_all( brow_widget);
*w = form_widget;
wow = new CoWowGtk( brow_widget);
trace_timerid = wow->timer_new();
*status = 1;
}
//
// Delete a nav context
//
GsdAttrNavGtk::~GsdAttrNavGtk()
{
delete trace_timerid;
delete wow;
delete brow;
gtk_widget_destroy( form_widget);
}
void GsdAttrNavGtk::set_inputfocus()
{
gdk_window_focus( brow_widget->window, GDK_CURRENT_TIME);
}
/*
* Proview $Id: rt_pb_gsd_attrnav_gtk.h,v 1.1 2007-01-04 08:42:43 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**/
#ifndef rt_pb_gsd_attrnav_gtk_h
#define rt_pb_gsd_attrnav_gtk_h
/* rt_pb_gsd_attrnav_gtk.h -- Profibus gsd configurator navigator */
#ifndef rt_pb_gsd_attrnav_h
# include "rt_pb_gsd_attrnav.h"
#endif
//! The navigation area of the attribute editor.
class GsdAttrNavGtk : public GsdAttrNav {
public:
GsdAttrNavGtk(
void *xn_parent_ctx,
GtkWidget *xn_parent_wid,
char *xn_name,
pb_gsd *xn_gsd,
int xn_edit_mode,
GtkWidget **w,
pwr_tStatus *status);
~GsdAttrNavGtk();
void set_inputfocus();
GtkWidget *parent_wid;
GtkWidget *brow_widget;
GtkWidget *form_widget;
GtkWidget *toplevel;
};
#endif
include $(pwre_dir_symbols)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/$(type_name)_generic.mk
ifeq ($($(type_name)_generic_mk),)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(type_name)_generic.mk
endif
ifeq ($($(type_name)_generic_mk),)
include $(pwre_kroot)/tools/bld/src/$(type_name)_generic.mk
endif
-include ../../special.mk
-include ../special.mk
-include special.mk
This diff is collapsed.
/*
* Proview $Id: rt_pb_gsd_attr_motif.h,v 1.1 2007-01-04 08:43:47 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**/
#ifndef rt_pb_gsd_attr_motif_h
#define rt_pb_gsd_attr_motif_h
/* rt_pb_gsd_attr_motif.h -- Profibus gsd attribute editor */
#include "rt_pb_gsd_attr.h"
class GsdAttrMotif : public GsdAttr {
public:
Widget parent_wid;
Widget brow_widget;
Widget form_widget;
Widget toplevel;
Widget msg_label;
Widget cmd_prompt;
Widget cmd_input;
Widget attrnav_form;
Widget cmd_ok;
Widget cmd_cancel;
Widget menubutton_copy;
Widget menubutton_cut;
Widget menubutton_paste;
Widget menubutton_changevalue;
GsdAttrMotif( Widget a_parent_wid,
void *a_parent_ctx,
void *a_object,
pb_gsd *a_gsd,
int a_edit_mode);
~GsdAttrMotif();
void message( char severity, char *message);
void set_prompt( char *prompt);
void change_value();
static void gsdattr_message( void *attr, char severity, char *message);
static void gsdattr_change_value_cb( void *attr_ctx);
static void activate_change_value( Widget w, GsdAttr *attr, XmAnyCallbackStruct *data);
static void activate_exit( Widget w, GsdAttr *attr, XmAnyCallbackStruct *data);
static void activate_help( Widget w, GsdAttr *attr, XmAnyCallbackStruct *data);
static void activate_copy( Widget w, GsdAttr *attr, XmAnyCallbackStruct *data);
static void activate_cut( Widget w, GsdAttr *attr, XmAnyCallbackStruct *data);
static void activate_paste( Widget w, GsdAttr *attr, XmAnyCallbackStruct *data);
static void activate_zoom_in( Widget w, GsdAttr *attr, XmAnyCallbackStruct *data);
static void activate_zoom_out( Widget w, GsdAttr *attr, XmAnyCallbackStruct *data);
static void activate_zoom_reset( Widget w, GsdAttr *attr, XmAnyCallbackStruct *data);
static void activate_print( Widget w, GsdAttr *attr, XmAnyCallbackStruct *data);
static void activate_cmd_ok( Widget w, GsdAttr *attr, XmAnyCallbackStruct *data);
static void cmd_close_apply_cb( void *ctx, void *data);
static void cmd_close_no_cb( void *ctx, void *data);
static void activate_cmd_ca( Widget w, GsdAttr *attr, XmAnyCallbackStruct *dataxo);
static void create_menubutton( Widget w, GsdAttr *attr, XmAnyCallbackStruct *data);
static void create_msg_label( Widget w, GsdAttr *attr, XmAnyCallbackStruct *data);
static void create_cmd_prompt( Widget w, GsdAttr *attr, XmAnyCallbackStruct *data);
static void create_cmd_ok( Widget w, GsdAttr *attr, XmAnyCallbackStruct *data);
static void create_cmd_ca( Widget w, GsdAttr *attr, XmAnyCallbackStruct *data);
static void create_cmd_input( Widget w, GsdAttr *attr, XmAnyCallbackStruct *data);
static void create_attrnav_form( Widget w, GsdAttr *attr, XmAnyCallbackStruct *data);
static void action_inputfocus( Widget w, XmAnyCallbackStruct *data);
static void valchanged_cmd_input( Widget w, XEvent *event);
};
#endif
/*
* Proview $Id: rt_pb_gsd_attrnav_motif.cpp,v 1.1 2007-01-04 08:43:47 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**/
/* rt_pb_gsd_attrnav.cpp -- Display gsd attributes */
#include "glow_std.h"
#include <stdio.h>
#include <stdlib.h>
#include "co_cdh.h"
#include "co_time.h"
#include "co_wow_motif.h"
#include <Xm/Xm.h>
#include <Xm/XmP.h>
#include <Xm/Text.h>
#include <Mrm/MrmPublic.h>
#include <X11/Intrinsic.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include "flow.h"
#include "flow_browctx.h"
#include "flow_browapi.h"
#include "flow_browwidget_motif.h"
#include "flow_msg.h"
#include "glow.h"
#include "glow_growctx.h"
#include "glow_growapi.h"
#include "glow_growwidget_motif.h"
#include "rt_pb_gsd.h"
#include "rt_pb_gsd_attr_motif.h"
#include "rt_pb_gsd_attrnav_motif.h"
#include "rt_pb_msg.h"
//
// Create the navigator widget
//
GsdAttrNavMotif::GsdAttrNavMotif( void *xn_parent_ctx,
Widget xn_parent_wid,
char *xn_name,
pb_gsd *xn_gsd,
int xn_edit_mode,
Widget *w,
pwr_tStatus *status) :
GsdAttrNav( xn_parent_ctx, xn_name, xn_gsd, xn_edit_mode, status),
parent_wid(xn_parent_wid)
{
form_widget = ScrolledBrowCreate( parent_wid, name, NULL, 0,
init_brow_cb, this, (Widget *)&brow_widget);
XtManageChild( form_widget);
// Create the root item
*w = form_widget;
wow = new CoWowMotif( brow_widget);
trace_timerid = wow->timer_new();
*status = 1;
}
//
// Delete a nav context
//
GsdAttrNavMotif::~GsdAttrNavMotif()
{
delete trace_timerid;
delete wow;
delete brow;
XtDestroyWidget( form_widget);
}
void GsdAttrNavMotif::set_inputfocus()
{
XtCallAcceptFocus( brow_widget, CurrentTime);
}
/*
* Proview $Id: rt_pb_gsd_attrnav_motif.h,v 1.1 2007-01-04 08:43:47 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**/
#ifndef rt_pb_gsd_attrnav_motif_h
#define rt_pb_gsd_attrnav_motif_h
/* rt_pb_gsd_attrnav_motif.h -- Profibus gsd configurator navigator */
#ifndef rt_pb_gsd_attrnav_h
# include "rt_pb_gsd_attrnav.h"
#endif
//! The navigation area of the attribute editor.
class GsdAttrNavMotif : public GsdAttrNav {
public:
GsdAttrNavMotif(
void *xn_parent_ctx,
Widget xn_parent_wid,
char *xn_name,
pb_gsd *xn_gsd,
int xn_edit_mode,
Widget *w,
pwr_tStatus *status);
~GsdAttrNavMotif();
void set_inputfocus();
Widget parent_wid;
Widget brow_widget;
Widget form_widget;
Widget toplevel;
};
#endif
This diff is collapsed.
/*
* Proview $Id: rt_pb_gsd_attr.h,v 1.3 2006-04-12 12:17:45 claes Exp $
* Proview $Id: rt_pb_gsd_attr.h,v 1.4 2007-01-04 08:42:20 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -24,10 +24,6 @@
#include "rt_pb_gsd.h"
#if defined __cplusplus
extern "C" {
#endif
typedef struct {
void *value;
char name[80];
......@@ -41,58 +37,55 @@ typedef struct {
} attr_sItem;
class GsdAttrNav;
class CoWow;
class GsdAttr {
public:
GsdAttr(
Widget a_parent_wid,
void *a_parent_ctx,
void *a_object,
// void (*close_cb) (attr_tCtx),
// void (*redraw_cb) (attr_tCtx),
pb_gsd *a_gsd,
int a_edit_mode);
void *parent_ctx;
Widget parent_wid;
char name[80];
pb_gsd *gsd;
int edit_mode;
Widget brow_widget;
Widget form_widget;
Widget toplevel;
GsdAttrNav *attrnav;
Widget msg_label;
Widget cmd_prompt;
Widget cmd_input;
Widget attrnav_form;
Widget cmd_ok;
Widget cmd_cancel;
Widget menubutton_copy;
Widget menubutton_cut;
Widget menubutton_paste;
Widget menubutton_changevalue;
int input_open;
void *object;
void (*close_cb) (void *);
int (*save_cb) (void *);
int (*help_cb) (void *, char *);
void *client_data;
int recall_idx;
static char value_recall[30][160];
int value_current_recall;
void message( char severity, char *message);
void set_prompt( char *prompt);
void change_value();
public:
void *parent_ctx;
char name[80];
pb_gsd *gsd;
int edit_mode;
GsdAttrNav *attrnav;
int input_open;
void *object;
void (*close_cb) (void *);
int (*save_cb) (void *);
int (*help_cb) (void *, char *);
void *client_data;
int recall_idx;
static char value_recall[30][160];
int value_current_recall;
CoWow *wow;
GsdAttr( void *a_parent_ctx,
void *a_object,
pb_gsd *a_gsd,
int a_edit_mode);
virtual ~GsdAttr();
virtual void message( char severity, char *message) {}
virtual void set_prompt( char *prompt) {}
virtual void change_value() {}
void activate_exit();
void activate_help();
void activate_copy();
void activate_cut();
void activate_paste();
void activate_print();
void activate_zoom_in();
void activate_zoom_out();
void activate_zoom_reset();
void activate_cmd_ok();
void activate_cmd_ca();
~GsdAttr();
};
static void gsdattr_message( void *attr, char severity, char *message);
static void gsdattr_change_value_cb( void *attr_ctx);
static void cmd_close_apply_cb( void *ctx, void *data);
static void cmd_close_no_cb( void *ctx, void *data);
};
/*@}*/
#if defined __cplusplus
}
#endif
#endif
......
/*
* Proview $Id: rt_pb_gsd_attrnav.cpp,v 1.3 2006-07-25 11:01:19 claes Exp $
* Proview $Id: rt_pb_gsd_attrnav.cpp,v 1.4 2007-01-04 08:42:20 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -24,29 +24,17 @@
#include <stdio.h>
#include <stdlib.h>
extern "C" {
#include "co_cdh.h"
#include "co_time.h"
}
#include <Xm/Xm.h>
#include <Xm/XmP.h>
#include <Xm/Text.h>
#include <Mrm/MrmPublic.h>
#include <X11/Intrinsic.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include "co_wow.h"
#include "flow.h"
#include "flow_browctx.h"
#include "flow_browapi.h"
#include "flow_browwidget.h"
#include "flow_msg.h"
#include "glow.h"
#include "glow_growctx.h"
#include "glow_growapi.h"
#include "glow_growwidget.h"
#include "rt_pb_gsd.h"
......@@ -111,18 +99,12 @@ extern "C" {
static char null_str[] = "";
static void attrnav_trace_scan( GsdAttrNav *attrnav);
static int attrnav_trace_scan_bc( brow_tObject object, void *p);
static int attrnav_trace_connect_bc( brow_tObject object, char *name, char *attr,
flow_eTraceType type, /* flow_eDrawType color, */ void **p);
static int attrnav_trace_disconnect_bc( brow_tObject object);
static int attrnav_init_brow_cb( FlowCtx *fctx, void *client_data);
//
// Convert attribute string to value
//
static int attrnav_attr_string_to_value( int type_id, char *value_str,
void *buffer_ptr, int buff_size, int attr_size)
int GsdAttrNav::attr_string_to_value( int type_id, char *value_str,
void *buffer_ptr, int buff_size, int attr_size)
{
switch ( type_id ) {
......@@ -164,8 +146,8 @@ static int attrnav_attr_string_to_value( int type_id, char *value_str,
//
// Convert attribute value to string
//
static void attrnav_attrvalue_to_string( int type_id, void *value_ptr,
char *str, int size, int *len, char *format)
void GsdAttrNav::attrvalue_to_string( int type_id, void *value_ptr,
char *str, int size, int *len, char *format)
{
if ( value_ptr == 0) {
......@@ -430,25 +412,16 @@ void GsdAttrNavBrow::allocate_pixmaps()
//
GsdAttrNav::GsdAttrNav(
void *xn_parent_ctx,
Widget xn_parent_wid,
char *xn_name,
pb_gsd *xn_gsd,
int xn_edit_mode,
Widget *w,
pwr_tStatus *status) :
parent_ctx(xn_parent_ctx), parent_wid(xn_parent_wid),
gsd(xn_gsd), edit_mode(xn_edit_mode), trace_started(0),
message_cb(0), change_value_cb(0)
parent_ctx(xn_parent_ctx),
gsd(xn_gsd), edit_mode(xn_edit_mode), trace_started(0),
message_cb(0), change_value_cb(0)
{
strcpy( name, xn_name);
form_widget = ScrolledBrowCreate( parent_wid, name, NULL, 0,
attrnav_init_brow_cb, this, (Widget *)&brow_widget);
XtManageChild( form_widget);
// Create the root item
*w = form_widget;
*status = 1;
}
......@@ -457,11 +430,6 @@ GsdAttrNav::GsdAttrNav(
//
GsdAttrNav::~GsdAttrNav()
{
if ( trace_started)
XtRemoveTimeOut( trace_timerid);
delete brow;
XtDestroyWidget( form_widget);
}
GsdAttrNavBrow::~GsdAttrNavBrow()
......@@ -469,11 +437,6 @@ GsdAttrNavBrow::~GsdAttrNavBrow()
free_pixmaps();
}
void GsdAttrNav::set_inputfocus()
{
XtCallAcceptFocus( brow_widget, CurrentTime);
}
//
// Get current zoom factor
//
......@@ -539,8 +502,8 @@ int GsdAttrNav::set_attr_value( char *value_str)
case attrnav_eItemType_PbBase: {
ItemPbBase *item = (ItemPbBase *)base_item;
sts = attrnav_attr_string_to_value( item->type_id, value_str,
buffer, sizeof(buffer), item->size);
sts = attr_string_to_value( item->type_id, value_str,
buffer, sizeof(buffer), item->size);
if ( EVEN(sts)) return sts;
if ( item->max_limit != 0 || item->min_limit != 0) {
......@@ -592,8 +555,8 @@ int GsdAttrNav::check_attr_value( char **value)
*value = 0;
return PB__ATTRNOEDIT;
}
attrnav_attrvalue_to_string( item->type_id, item->value_p, buf,
sizeof(buf), &len, NULL);
attrvalue_to_string( item->type_id, item->value_p, buf,
sizeof(buf), &len, NULL);
*value = buf;
return PB__SUCCESS;
}
......@@ -608,7 +571,7 @@ int GsdAttrNav::check_attr_value( char **value)
//
// Callbacks from brow
//
static int attrnav_brow_cb( FlowCtx *ctx, flow_tEvent event)
int GsdAttrNav::brow_cb( FlowCtx *ctx, flow_tEvent event)
{
GsdAttrNav *attrnav;
ItemPb *item;
......@@ -703,7 +666,7 @@ static int attrnav_brow_cb( FlowCtx *ctx, flow_tEvent event)
doubleclick_event = (flow_tEvent) calloc( 1, sizeof(*doubleclick_event));
memcpy( doubleclick_event, event, sizeof(*doubleclick_event));
doubleclick_event->event = flow_eEvent_MB1DoubleClick;
sts = attrnav_brow_cb( ctx, doubleclick_event);
sts = brow_cb( ctx, doubleclick_event);
free( (char *) doubleclick_event);
return sts;
}
......@@ -899,16 +862,15 @@ static int attrnav_brow_cb( FlowCtx *ctx, flow_tEvent event)
return 1;
}
static void attrnav_trace_scan( GsdAttrNav *attrnav)
void GsdAttrNav::trace_scan( void *data)
{
GsdAttrNav *attrnav = (GsdAttrNav *)data;
int time = 200;
if ( attrnav->trace_started) {
brow_TraceScan( attrnav->brow->ctx);
attrnav->trace_timerid = XtAppAddTimeOut(
XtWidgetToApplicationContext(attrnav->brow_widget) , time,
(XtTimerCallbackProc)attrnav_trace_scan, attrnav);
attrnav->trace_timerid->add( time, trace_scan, attrnav);
}
}
......@@ -918,7 +880,7 @@ void GsdAttrNav::force_trace_scan()
brow_TraceScan( brow->ctx);
}
static int attrnav_trace_scan_bc( brow_tObject object, void *p)
int GsdAttrNav::trace_scan_bc( brow_tObject object, void *p)
{
ItemPb *base_item;
char buf[200];
......@@ -949,7 +911,7 @@ static int attrnav_trace_scan_bc( brow_tObject object, void *p)
else
item->first_scan = 0;
attrnav_attrvalue_to_string( item->type_id, p, buf, sizeof(buf), &len, NULL);
attrvalue_to_string( item->type_id, p, buf, sizeof(buf), &len, NULL);
brow_SetAnnotation( object, 1, buf, len);
memcpy( item->old_value, p, min(item->size, (int) sizeof(item->old_value)));
break;
......@@ -1136,8 +1098,8 @@ static int attrnav_trace_scan_bc( brow_tObject object, void *p)
return 1;
}
static int attrnav_trace_connect_bc( brow_tObject object, char *name, char *attr,
flow_eTraceType type, /* flow_eDrawType color, */ void **p)
int GsdAttrNav::trace_connect_bc( brow_tObject object, char *name, char *attr,
flow_eTraceType type, void **p)
{
ItemPb *base_item;
......@@ -1188,7 +1150,7 @@ static int attrnav_trace_connect_bc( brow_tObject object, char *name, char *attr
return 1;
}
static int attrnav_trace_disconnect_bc( brow_tObject object)
int GsdAttrNav::trace_disconnect_bc( brow_tObject object)
{
ItemPb *base_item;
......@@ -1450,40 +1412,40 @@ void GsdAttrNavBrow::brow_setup()
brow_SetCtxUserData( ctx, attrnav);
brow_EnableEvent( ctx, flow_eEvent_MB1Click, flow_eEventType_CallBack,
attrnav_brow_cb);
GsdAttrNav::brow_cb);
brow_EnableEvent( ctx, flow_eEvent_MB2Click, flow_eEventType_CallBack,
attrnav_brow_cb);
GsdAttrNav::brow_cb);
brow_EnableEvent( ctx, flow_eEvent_MB1DoubleClick, flow_eEventType_CallBack,
attrnav_brow_cb);
GsdAttrNav::brow_cb);
brow_EnableEvent( ctx, flow_eEvent_MB1DoubleClickCtrl, flow_eEventType_CallBack,
attrnav_brow_cb);
GsdAttrNav::brow_cb);
brow_EnableEvent( ctx, flow_eEvent_SelectClear, flow_eEventType_CallBack,
attrnav_brow_cb);
GsdAttrNav::brow_cb);
brow_EnableEvent( ctx, flow_eEvent_ObjectDeleted, flow_eEventType_CallBack,
attrnav_brow_cb);
GsdAttrNav::brow_cb);
brow_EnableEvent( ctx, flow_eEvent_Key_Up, flow_eEventType_CallBack,
attrnav_brow_cb);
GsdAttrNav::brow_cb);
brow_EnableEvent( ctx, flow_eEvent_Key_Down, flow_eEventType_CallBack,
attrnav_brow_cb);
GsdAttrNav::brow_cb);
brow_EnableEvent( ctx, flow_eEvent_Key_Right, flow_eEventType_CallBack,
attrnav_brow_cb);
GsdAttrNav::brow_cb);
brow_EnableEvent( ctx, flow_eEvent_Key_Left, flow_eEventType_CallBack,
attrnav_brow_cb);
GsdAttrNav::brow_cb);
brow_EnableEvent( ctx, flow_eEvent_Key_PF3, flow_eEventType_CallBack,
attrnav_brow_cb);
GsdAttrNav::brow_cb);
brow_EnableEvent( ctx, flow_eEvent_Radiobutton, flow_eEventType_CallBack,
attrnav_brow_cb);
GsdAttrNav::brow_cb);
brow_EnableEvent( ctx, flow_eEvent_Key_PageUp, flow_eEventType_CallBack,
attrnav_brow_cb);
GsdAttrNav::brow_cb);
brow_EnableEvent( ctx, flow_eEvent_Key_PageDown, flow_eEventType_CallBack,
attrnav_brow_cb);
GsdAttrNav::brow_cb);
}
//
// Backcall routine called at creation of the brow widget
// Enable event, create nodeclasses and insert the root objects.
//
static int attrnav_init_brow_cb( FlowCtx *fctx, void *client_data)
int GsdAttrNav::init_brow_cb( FlowCtx *fctx, void *client_data)
{
GsdAttrNav *attrnav = (GsdAttrNav *) client_data;
BrowCtx *ctx = (BrowCtx *)fctx;
......@@ -1497,11 +1459,11 @@ static int attrnav_init_brow_cb( FlowCtx *fctx, void *client_data)
// Create the root item
attrnav->object_attr();
sts = brow_TraceInit( ctx, attrnav_trace_connect_bc,
attrnav_trace_disconnect_bc, attrnav_trace_scan_bc);
sts = brow_TraceInit( ctx, trace_connect_bc,
trace_disconnect_bc, trace_scan_bc);
attrnav->trace_started = 1;
attrnav_trace_scan( attrnav);
trace_scan( attrnav);
return 1;
}
......
/*
* Proview $Id: rt_pb_gsd_attrnav.h,v 1.3 2006-07-25 11:01:19 claes Exp $
* Proview $Id: rt_pb_gsd_attrnav.h,v 1.4 2007-01-04 08:42:20 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -103,42 +103,40 @@ class GsdAttrNavBrow {
void brow_setup();
};
class CoWow;
class CoWowTimer;
//! The navigation area of the attribute editor.
class GsdAttrNav {
public:
GsdAttrNav(
void *xn_parent_ctx,
Widget xn_parent_wid,
char *xn_name,
pb_gsd *xn_gsd,
int xn_edit_mode,
Widget *w,
pwr_tStatus *status);
~GsdAttrNav();
void *parent_ctx;
Widget parent_wid;
pb_gsd *gsd;
char name[80];
Widget brow_widget;
Widget form_widget;
Widget toplevel;
GsdAttrNavBrow *brow;
attr_sItem *itemlist;
int item_cnt;
int edit_mode;
XtIntervalId trace_timerid;
int trace_started;
void (*message_cb)( void *, char, char *);
void (*change_value_cb)( void *);
CoWow *wow;
CoWowTimer *trace_timerid;
GsdAttrNav(
void *xn_parent_ctx,
char *xn_name,
pb_gsd *xn_gsd,
int xn_edit_mode,
pwr_tStatus *status);
virtual ~GsdAttrNav();
virtual void set_inputfocus() {}
void start_trace( pwr_tObjid Objid, char *object_str);
int set_attr_value( char *value_str);
int check_attr_value( char **value);
int get_select( pwr_sAttrRef *attrref, int *is_attr);
void message( char sev, char *text);
void set_inputfocus();
void force_trace_scan();
int object_attr();
void print( char *filename);
......@@ -147,6 +145,17 @@ class GsdAttrNav {
void unzoom();
void get_zoom( double *zoom_factor);
static void trace_scan( void *data);
static int trace_scan_bc( brow_tObject object, void *p);
static int trace_connect_bc( brow_tObject object, char *name, char *attr,
flow_eTraceType type, void **p);
static int trace_disconnect_bc( brow_tObject object);
static int init_brow_cb( FlowCtx *fctx, void *client_data);
static int attr_string_to_value( int type_id, char *value_str,
void *buffer_ptr, int buff_size, int attr_size);
static void attrvalue_to_string( int type_id, void *value_ptr,
char *str, int size, int *len, char *format);
static int brow_cb( FlowCtx *ctx, flow_tEvent event);
};
class ItemPb {
......
include $(pwre_dir_symbols)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/$(type_name)_generic.mk
ifeq ($($(type_name)_generic_mk),)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(type_name)_generic.mk
endif
ifeq ($($(type_name)_generic_mk),)
include $(pwre_kroot)/tools/bld/src/$(type_name)_generic.mk
endif
-include ../../special.mk
-include ../special.mk
-include special.mk
/*
* Proview $Id: wb_c_pb_dp_slave_gtk.cpp,v 1.1 2007-01-04 08:44:14 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**/
/* wb_c_pb_dp_slave_gtk.c -- work bench methods of the Pb_DP_Slave class. */
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <vector>
#include <map>
#include "pwr.h"
#include "pwr_baseclasses.h"
#include "pwr_profibusclasses.h"
#include <gtk/gtk.h>
#include "wb_env.h"
#include "flow.h"
#include "flow_ctx.h"
#include "flow_api.h"
#include "flow_browctx.h"
#include "flow_browapi.h"
#include "co_msg.h"
#include "co_cdh.h"
#include "co_dcli.h"
#include "co_wow.h"
#include "co_xhelp_gtk.h"
#include "rt_pb_gsd.h"
#include "rt_pb_gsd_attr_gtk.h"
#include "wb_c_pb_dp_slave.h"
#include "wb_pwrs.h"
#include "wb_ldh_msg.h"
#include "wb_ldh.h"
#include "wb_pwrb_msg.h"
#include "rt_pb_msg.h"
#include "wb_wnav.h"
using namespace std;
static pwr_tStatus Configure (
ldh_sMenuCall *ip
)
{
pwr_tStatus sts;
slave_sCtx *ctx;
sts = pb_dp_slave_create_ctx( ip->PointedSession, ip->Pointed, ip->wnav, &ctx);
if ( sts != PB__USERPRMDATALEN && EVEN(sts)) return sts;
ctx->attr = new GsdAttrGtk( CoXHelpGtk::get_widget(), ctx, 0, ctx->gsd,
ctx->edit_mode);
ctx->attr->close_cb = pb_dp_slave_close_cb;
ctx->attr->save_cb = pb_dp_slave_save_cb;
ctx->attr->help_cb = pb_dp_slave_help_cb;
if ( EVEN(sts)) {
ctx->attr->wow->DisplayError( "Configuration load error",
"Configuration load error\nCheck configuration data");
}
return 1;
}
static pwr_tStatus ConfigureFilter (
ldh_sMenuCall *ip
)
{
#if 0
char *gsd;
int size;
int sts;
sts = ldh_GetObjectPar( ip->PointedSession, ip->Pointed.Objid, "RtBody",
"GSDfile", &gsd, &size);
if ( EVEN(sts)) return sts;
if ( strcmp( gsd, "") == 0) {
free( gsd);
return 0;
}
free( gsd);
#endif
return 1;
}
/*----------------------------------------------------------------------------*\
Every method to be exported to the workbench should be registred here.
\*----------------------------------------------------------------------------*/
pwr_dExport pwr_BindMethods(Pb_DP_Slave) = {
pwr_BindMethod(Configure),
pwr_BindMethod(ConfigureFilter),
pwr_NullMethod
};
include $(pwre_dir_symbols)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/$(type_name)_generic.mk
ifeq ($($(type_name)_generic_mk),)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(type_name)_generic.mk
endif
ifeq ($($(type_name)_generic_mk),)
include $(pwre_kroot)/tools/bld/src/$(type_name)_generic.mk
endif
-include ../../special.mk
-include ../special.mk
-include special.mk
/*
* Proview $Id: wb_c_pb_dp_slave_motif.cpp,v 1.1 2007-01-04 08:44:09 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**/
/* wb_c_pb_dp_slave_motif.c -- work bench methods of the Pb_DP_Slave class. */
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <vector>
#include <map>
#include "pwr.h"
#include "pwr_baseclasses.h"
#include "pwr_profibusclasses.h"
#include <Xm/Xm.h>
#include <Mrm/MrmPublic.h>
#include <X11/Intrinsic.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include "wb_env.h"
#include "flow.h"
#include "flow_ctx.h"
#include "flow_api.h"
#include "flow_browctx.h"
#include "flow_browapi.h"
#include "co_msg.h"
#include "co_cdh.h"
#include "co_dcli.h"
#include "co_wow.h"
#include "co_xhelp_motif.h"
#include "rt_pb_gsd.h"
#include "rt_pb_gsd_attr_motif.h"
#include "wb_c_pb_dp_slave.h"
#include "wb_pwrs.h"
#include "wb_ldh_msg.h"
#include "wb_ldh.h"
#include "wb_pwrb_msg.h"
#include "rt_pb_msg.h"
#include "wb_wnav.h"
using namespace std;
static pwr_tStatus Configure (
ldh_sMenuCall *ip
)
{
pwr_tStatus sts;
slave_sCtx *ctx;
sts = pb_dp_slave_create_ctx( ip->PointedSession, ip->Pointed, ip->wnav, &ctx);
if ( sts != PB__USERPRMDATALEN && EVEN(sts)) return sts;
ctx->attr = new GsdAttrMotif( CoXHelpMotif::get_widget(), ctx, 0, ctx->gsd,
ctx->edit_mode);
ctx->attr->close_cb = pb_dp_slave_close_cb;
ctx->attr->save_cb = pb_dp_slave_save_cb;
ctx->attr->help_cb = pb_dp_slave_help_cb;
if ( EVEN(sts)) {
ctx->attr->wow->DisplayError( "Configuration load error",
"Configuration load error\nCheck configuration data");
}
return 1;
}
static pwr_tStatus ConfigureFilter (
ldh_sMenuCall *ip
)
{
#if 0
char *gsd;
int size;
int sts;
sts = ldh_GetObjectPar( ip->PointedSession, ip->Pointed.Objid, "RtBody",
"GSDfile", &gsd, &size);
if ( EVEN(sts)) return sts;
if ( strcmp( gsd, "") == 0) {
free( gsd);
return 0;
}
free( gsd);
#endif
return 1;
}
/*----------------------------------------------------------------------------*\
Every method to be exported to the workbench should be registred here.
\*----------------------------------------------------------------------------*/
pwr_dExport pwr_BindMethods(Pb_DP_Slave) = {
pwr_BindMethod(Configure),
pwr_BindMethod(ConfigureFilter),
pwr_NullMethod
};
/*
* Proview $Id: wb_c_pb_dp_slave.cpp,v 1.7 2006-10-10 07:41:15 claes Exp $
* Proview $Id: wb_c_pb_dp_slave.cpp,v 1.8 2007-01-04 08:44:02 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -26,12 +26,9 @@
#include <vector>
#include <map>
#include <Xm/Xm.h>
#include <Mrm/MrmPublic.h>
#include <X11/Intrinsic.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include "pwr.h"
#include "pwr_baseclasses.h"
#include "pwr_profibusclasses.h"
#include "wb_env.h"
#include "flow.h"
#include "flow_ctx.h"
......@@ -39,19 +36,16 @@
#include "flow_browctx.h"
#include "flow_browapi.h"
#include "pwr.h"
#include "co_msg.h"
#include "co_cdh.h"
#include "co_dcli.h"
#include "co_wow.h"
#include "wb_nav_macros.h"
#include "co_xhelp.h"
#include "rt_pb_gsd.h"
#include "rt_pb_gsd_attr.h"
#include "wb_c_pb_dp_slave.h"
#include "wb_pwrs.h"
#include "pwr_baseclasses.h"
#include "pwr_profibusclasses.h"
#include "wb_ldh_msg.h"
#include "wb_ldh.h"
#include "wb_pwrb_msg.h"
......@@ -65,15 +59,6 @@ using namespace std;
Configure the slave from gsd file.
\*----------------------------------------------------------------------------*/
typedef struct {
pb_gsd *gsd;
GsdAttr *attr;
ldh_tSession ldhses;
pwr_tAttrRef aref;
gsd_sModuleClass *mc;
void *editor_ctx;
} slave_sCtx;
static void get_subcid( ldh_tSession ldhses, pwr_tCid cid, vector<pwr_tCid>& v)
{
......@@ -88,7 +73,7 @@ static void get_subcid( ldh_tSession ldhses, pwr_tCid cid, vector<pwr_tCid>& v)
}
}
static int attr_help_cb( void *sctx, char *text)
int pb_dp_slave_help_cb( void *sctx, char *text)
{
pwr_tCmd cmd;
slave_sCtx *ctx = (slave_sCtx *)sctx;
......@@ -98,7 +83,7 @@ static int attr_help_cb( void *sctx, char *text)
return ((WNav *)ctx->editor_ctx)->command( cmd);
}
static void attr_close_cb( void *sctx)
void pb_dp_slave_close_cb( void *sctx)
{
slave_sCtx *ctx = (slave_sCtx *)sctx;
delete ctx->attr;
......@@ -106,7 +91,7 @@ static void attr_close_cb( void *sctx)
free( (char *)ctx);
}
static int attr_save_cb( void *sctx)
int pb_dp_slave_save_cb( void *sctx)
{
slave_sCtx *ctx = (slave_sCtx *)sctx;
pwr_tStatus sts;
......@@ -472,30 +457,26 @@ static pwr_tStatus load_modules( slave_sCtx *ctx)
return 1;
}
static pwr_tStatus Configure (
ldh_sMenuCall *ip
)
pwr_tStatus pb_dp_slave_create_ctx( ldh_tSession ldhses, pwr_tAttrRef aref,
void *editor_ctx, slave_sCtx **ctxp)
{
pwr_tOName name;
char *gsdfile;
int size;
int sts;
int lsts;
int edit_mode;
pwr_tFileName fname;
ldh_sSessInfo Info;
vector<pwr_tCid> mcv;
sts = ldh_GetSessionInfo (ip->PointedSession, &Info);
edit_mode = (ODD(sts) && Info.Access == ldh_eAccess_ReadWrite) &&
ldh_LocalObject( ip->PointedSession, ip->Pointed.Objid);
sts = ldh_GetSessionInfo( ldhses, &Info);
sts = ldh_ObjidToName(ip->PointedSession, ip->Pointed.Objid,
ldh_eName_Hierarchy, name, sizeof(name), &size);
sts = ldh_ObjidToName( ldhses, aref.Objid,
ldh_eName_Hierarchy, name, sizeof(name), &size);
if ( EVEN(sts)) return sts;
sts = ldh_GetObjectPar( ip->PointedSession, ip->Pointed.Objid, "RtBody",
sts = ldh_GetObjectPar( ldhses, aref.Objid, "RtBody",
"GSDfile", &gsdfile, &size);
if ( EVEN(sts)) return sts;
if ( strcmp( gsdfile, "") == 0) {
......@@ -504,9 +485,11 @@ static pwr_tStatus Configure (
}
slave_sCtx *ctx = (slave_sCtx *) calloc( 1, sizeof(slave_sCtx));
ctx->ldhses = ip->PointedSession;
ctx->aref = ip->Pointed;
ctx->editor_ctx = ip->EditorContext;
ctx->ldhses = ldhses;
ctx->aref = aref;
ctx->editor_ctx = editor_ctx;
ctx->edit_mode = (ODD(sts) && Info.Access == ldh_eAccess_ReadWrite) &&
ldh_LocalObject( ldhses, aref.Objid);
get_subcid( ctx->ldhses, pwr_cClass_Pb_Module, mcv);
ctx->mc = (gsd_sModuleClass *) calloc( mcv.size() + 2, sizeof(gsd_sModuleClass));
......@@ -529,6 +512,7 @@ static pwr_tStatus Configure (
}
else
strcpy( fname, gsdfile);
free( gsdfile);
ctx->gsd = new pb_gsd();
sts = ctx->gsd->read( fname);
......@@ -540,53 +524,10 @@ static pwr_tStatus Configure (
lsts = load_modules( ctx);
if ( lsts != PB__USERPRMDATALEN && EVEN(lsts)) return lsts;
ctx->attr = new GsdAttr( (Widget) ip->WindowContext, ctx, 0, ctx->gsd, edit_mode);
ctx->attr->close_cb = attr_close_cb;
ctx->attr->save_cb = attr_save_cb;
ctx->attr->help_cb = attr_help_cb;
if ( EVEN(lsts)) {
wow_DisplayError( ctx->attr->toplevel, "Configuration load error",
"Configuration load error\nCheck configuration data");
}
free( gsdfile);
*ctxp = ctx;
return 1;
}
static pwr_tStatus ConfigureFilter (
ldh_sMenuCall *ip
)
{
#if 0
char *gsd;
int size;
int sts;
sts = ldh_GetObjectPar( ip->PointedSession, ip->Pointed.Objid, "RtBody",
"GSDfile", &gsd, &size);
if ( EVEN(sts)) return sts;
if ( strcmp( gsd, "") == 0) {
free( gsd);
return 0;
}
free( gsd);
#endif
return 1;
}
/*----------------------------------------------------------------------------*\
Every method to be exported to the workbench should be registred here.
\*----------------------------------------------------------------------------*/
pwr_dExport pwr_BindMethods(Pb_DP_Slave) = {
pwr_BindMethod(Configure),
pwr_BindMethod(ConfigureFilter),
pwr_NullMethod
};
/*
* Proview $Id: wb_c_pb_dp_slave.h,v 1.1 2007-01-04 08:44:02 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**/
#ifndef wb_c_pb_dp_slave_h
#define wb_c_pb_dp_slave_h
/* wb-c_pb_dp_slave.h -- Profibus gsd configure method */
typedef struct {
pb_gsd *gsd;
GsdAttr *attr;
ldh_tSession ldhses;
pwr_tAttrRef aref;
gsd_sModuleClass *mc;
void *editor_ctx;
int edit_mode;
} slave_sCtx;
pwr_tStatus pb_dp_slave_create_ctx( ldh_tSession ldhses, pwr_tAttrRef aref,
void *editor_ctx, slave_sCtx **ctxp);
int pb_dp_slave_help_cb( void *sctx, char *text);
void pb_dp_slave_close_cb( void *sctx);
int pb_dp_slave_save_cb( void *sctx);
#endif
include $(pwre_dir_symbols)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/$(type_name)_generic.mk
ifeq ($($(type_name)_generic_mk),)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(type_name)_generic.mk
endif
ifeq ($($(type_name)_generic_mk),)
include $(pwre_kroot)/tools/bld/src/$(type_name)_generic.mk
endif
-include ../../special.mk
-include ../special.mk
-include special.mk
/*
* Proview $Id: rt_xtt.h,v 1.4 2005-09-01 14:57:48 claes Exp $
* Proview $Id: xtt_c_pb_dp_slave_gtk.cpp,v 1.1 2007-01-04 08:44:46 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -17,91 +17,53 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef rt_xtt_h
#define rt_xtt_h
/* xtt_c_pb_db_slave_gtk.cpp -- xtt methods for Pb_DP_Slave. */
/* rt_xtt.h -- Simple navigator */
#include "pwr_baseclasses.h"
#include "pwr_profibusclasses.h"
#include "flow_std.h"
#include <gtk/gtk.h>
#ifndef pwr_h
extern "C" {
# include "pwr.h"
}
#endif
#ifndef flow_h
#include "flow.h"
#endif
#ifndef flow_browctx_h
#include "flow_browapi.h"
#endif
#ifndef rt_trace_h
extern "C" {
#include "rt_trace.h"
}
#endif
#ifndef rt_qcom_h
extern "C" {
#include "rt_qcom.h"
}
#endif
#ifndef xtt_xnav_h
#include "co_cdh.h"
#include "xtt_menu.h"
#include "xtt_xnav.h"
#endif
#ifndef xtt_focustimer_h
#include "xtt_focustimer.h"
#endif
class Xtt {
public:
Xtt( int argc, char *argv[], int *sts);
void *parent_ctx;
Widget parent_wid;
char name[80];
Widget brow_widget;
Widget form_widget;
Widget toplevel;
XNav *xnav;
void *root_item;
Widget msg_label;
Widget cmd_prompt;
Widget cmd_input;
Widget xnav_form;
int input_open;
int command_open;
char cmd_recall[30][160];
int cmd_current_recall;
char value_recall[30][160];
int value_current_recall;
Widget india_widget;
Widget india_label;
Widget india_text;
void (*india_ok_cb)( Xtt *, char *);
qcom_sQid queid;
XtIntervalId timerid;
FocusTimer focustimer;
};
#endif
#include "rt_xnav_msg.h"
#include "pwr_privilege.h"
#include "rt_pb_gsd.h"
#include "co_xhelp_gtk.h"
#include "rt_pb_gsd_attr_gtk.h"
#include "xtt_c_pb_dp_slave.h"
// Show Configuration
static pwr_tStatus ShowConfiguration( xmenu_sMenuCall *ip)
{
xtt_slave_sCtx *ctx;
int edit_mode = 0;
xtt_pb_dp_slave_create_ctx( ip->Pointed, ip->EditorContext, &ctx);
ctx->attr = new GsdAttrGtk( CoXHelpGtk::get_widget(), ctx, 0, ctx->gsd, edit_mode);
ctx->attr->close_cb = xtt_pb_dp_slave_close_cb;
ctx->attr->save_cb = xtt_pb_dp_slave_save_cb;
ctx->attr->help_cb = xtt_pb_dp_slave_help_cb;
return 1;
}
/*----------------------------------------------------------------------------*\
Every method to be exported to xtt should be registred here.
\*----------------------------------------------------------------------------*/
pwr_dExport pwr_BindXttMethods(Pb_DP_Slave) = {
pwr_BindXttMethod(ShowConfiguration),
pwr_NullMethod
};
......
include $(pwre_dir_symbols)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/$(type_name)_generic.mk
ifeq ($($(type_name)_generic_mk),)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(type_name)_generic.mk
endif
ifeq ($($(type_name)_generic_mk),)
include $(pwre_kroot)/tools/bld/src/$(type_name)_generic.mk
endif
-include ../../special.mk
-include ../special.mk
-include special.mk
/*
* Proview $Id: xtt_c_pb_dp_slave_motif.cpp,v 1.1 2007-01-04 08:44:54 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* xtt_c_pb_db_slave.cpp -- xtt methods for Pb_DP_Slave. */
#include "pwr_baseclasses.h"
#include "pwr_profibusclasses.h"
#include "flow_std.h"
#include <Xm/Xm.h>
#include <Xm/XmP.h>
#include <Xm/Text.h>
#include <Mrm/MrmPublic.h>
#include <X11/Intrinsic.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include "co_cdh.h"
#include "xtt_menu.h"
#include "xtt_xnav.h"
#include "rt_xnav_msg.h"
#include "pwr_privilege.h"
#include "rt_pb_gsd.h"
#include "co_xhelp_motif.h"
#include "rt_pb_gsd_attr_motif.h"
#include "xtt_c_pb_dp_slave.h"
// Show Configuration
static pwr_tStatus ShowConfiguration( xmenu_sMenuCall *ip)
{
xtt_slave_sCtx *ctx;
int edit_mode = 0;
xtt_pb_dp_slave_create_ctx( ip->Pointed, ip->EditorContext, &ctx);
ctx->attr = new GsdAttrMotif( CoXHelpMotif::get_widget(), ctx, 0, ctx->gsd, edit_mode);
ctx->attr->close_cb = xtt_pb_dp_slave_close_cb;
ctx->attr->save_cb = xtt_pb_dp_slave_save_cb;
ctx->attr->help_cb = xtt_pb_dp_slave_help_cb;
return 1;
}
/*----------------------------------------------------------------------------*\
Every method to be exported to xtt should be registred here.
\*----------------------------------------------------------------------------*/
pwr_dExport pwr_BindXttMethods(Pb_DP_Slave) = {
pwr_BindXttMethod(ShowConfiguration),
pwr_NullMethod
};
/*
* Proview $Id: xtt_c_pb_dp_slave.cpp,v 1.3 2006-07-25 11:01:19 claes Exp $
* Proview $Id: xtt_c_pb_dp_slave.cpp,v 1.4 2007-01-04 08:44:40 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -23,14 +23,7 @@
#include "pwr_profibusclasses.h"
#include "flow_std.h"
#include <Xm/Xm.h>
#include <Xm/XmP.h>
#include <Xm/Text.h>
#include <Mrm/MrmPublic.h>
#include <X11/Intrinsic.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include "co_cdh.h"
#include "xtt_menu.h"
#include "xtt_xnav.h"
#include "rt_xnav_msg.h"
......@@ -38,39 +31,32 @@
#include "rt_pb_gsd.h"
#include "rt_pb_gsd_attr.h"
#include "xtt_c_pb_dp_slave.h"
typedef struct {
pb_gsd *gsd;
GsdAttr *attr;
pwr_tAttrRef aref;
gsd_sModuleClass *mc;
void *editor_ctx;
} slave_sCtx;
static int attr_help_cb( void *sctx, char *text)
int xtt_pb_dp_slave_help_cb( void *sctx, char *text)
{
pwr_tCmd cmd;
slave_sCtx *ctx = (slave_sCtx *)sctx;
xtt_slave_sCtx *ctx = (xtt_slave_sCtx *)sctx;
strcpy( cmd, "help ");
strcat( cmd, text);
return ((XNav *)ctx->editor_ctx)->command( cmd);
}
static void attr_close_cb( void *sctx)
void xtt_pb_dp_slave_close_cb( void *sctx)
{
slave_sCtx *ctx = (slave_sCtx *)sctx;
xtt_slave_sCtx *ctx = (xtt_slave_sCtx *)sctx;
delete ctx->attr;
delete ctx->gsd;
free( (char *)ctx);
}
static int attr_save_cb( void *sctx)
int xtt_pb_dp_slave_save_cb( void *sctx)
{
return 1;
}
static pwr_tStatus load_modules( slave_sCtx *ctx)
static pwr_tStatus xtt_pb_dp_slave_load_modules( xtt_slave_sCtx *ctx)
{
pwr_tOid oid;
pwr_tCid cid;
......@@ -164,13 +150,13 @@ static pwr_tStatus load_modules( slave_sCtx *ctx)
return 1;
}
// Show Configuration
static pwr_tStatus ShowConfiguration( xmenu_sMenuCall *ip)
pwr_tStatus xtt_pb_dp_slave_create_ctx( pwr_tAttrRef aref, void *editor_ctx,
xtt_slave_sCtx **ctxp)
{
pwr_tAName name;
pwr_tString80 gsdfile;
int sts;
int edit_mode = 0;
pwr_tFileName fname;
pwr_tCid cid;
pwr_tOid oid;
......@@ -179,11 +165,11 @@ static pwr_tStatus ShowConfiguration( xmenu_sMenuCall *ip)
int module_cnt;
pwr_tAttrRef aaref;
sts = gdh_ObjidToName( ip->Pointed.Objid,
sts = gdh_ObjidToName( aref.Objid,
name, sizeof(name), cdh_mName_volumeStrict);
if ( EVEN(sts)) return sts;
sts = gdh_ArefANameToAref( &ip->Pointed, "GSDFile", &aaref);
sts = gdh_ArefANameToAref( &aref, "GSDFile", &aaref);
if ( EVEN(sts)) return sts;
sts = gdh_GetObjectInfoAttrref( &aaref, gsdfile, sizeof(gsdfile));
......@@ -192,12 +178,12 @@ static pwr_tStatus ShowConfiguration( xmenu_sMenuCall *ip)
return 1;
}
slave_sCtx *ctx = (slave_sCtx *) calloc( 1, sizeof(slave_sCtx));
ctx->aref = ip->Pointed;
xtt_slave_sCtx *ctx = (xtt_slave_sCtx *) calloc( 1, sizeof(xtt_slave_sCtx));
ctx->aref = aref;
// Count modules
module_cnt = 0;
for ( sts = gdh_GetChild( ip->Pointed.Objid, &oid);
for ( sts = gdh_GetChild( aref.Objid, &oid);
ODD(sts);
sts = gdh_GetNextSibling( oid, &oid)) {
module_cnt++;
......@@ -205,7 +191,7 @@ static pwr_tStatus ShowConfiguration( xmenu_sMenuCall *ip)
ctx->mc = (gsd_sModuleClass *) calloc( module_cnt + 2, sizeof(gsd_sModuleClass));
mc_cnt = 0;
ctx->editor_ctx = ip->EditorContext;
ctx->editor_ctx = editor_ctx;
ctx->mc[0].cid = pwr_cClass_Pb_Module;
sts = gdh_ObjidToName( cdh_ClassIdToObjid(ctx->mc[0].cid),
......@@ -213,7 +199,7 @@ static pwr_tStatus ShowConfiguration( xmenu_sMenuCall *ip)
if ( EVEN(sts)) return sts;
mc_cnt++;
for ( sts = gdh_GetChild( ip->Pointed.Objid, &oid);
for ( sts = gdh_GetChild( aref.Objid, &oid);
ODD(sts);
sts = gdh_GetNextSibling( oid, &oid)) {
sts = gdh_GetObjectClass( oid, &cid);
......@@ -250,30 +236,14 @@ static pwr_tStatus ShowConfiguration( xmenu_sMenuCall *ip)
ctx->gsd->set_classes( ctx->mc);
sts = load_modules( ctx);
sts = xtt_pb_dp_slave_load_modules( ctx);
if ( EVEN(sts)) return sts;
ctx->attr = new GsdAttr( (Widget) ip->WindowContext, ctx, 0, ctx->gsd, edit_mode);
ctx->attr->close_cb = attr_close_cb;
ctx->attr->save_cb = attr_save_cb;
ctx->attr->help_cb = attr_help_cb;
*ctxp = ctx;
return 1;
}
/*----------------------------------------------------------------------------*\
Every method to be exported to xtt should be registred here.
\*----------------------------------------------------------------------------*/
pwr_dExport pwr_BindXttMethods(Pb_DP_Slave) = {
pwr_BindXttMethod(ShowConfiguration),
pwr_NullMethod
};
/*
* Proview $Id: xtt_c_pb_dp_slave.h,v 1.1 2007-01-04 08:44:40 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**/
#ifndef xtt_c_pb_dp_slave_h
#define xtt_c_pb_dp_slave_h
/* xtt_c_pb_dp_slave.h -- Profibus gsd configure method */
typedef struct {
pb_gsd *gsd;
GsdAttr *attr;
pwr_tAttrRef aref;
gsd_sModuleClass *mc;
void *editor_ctx;
} xtt_slave_sCtx;
pwr_tStatus xtt_pb_dp_slave_create_ctx( pwr_tAttrRef aref,
void *editor_ctx, xtt_slave_sCtx **ctxp);
int xtt_pb_dp_slave_help_cb( void *sctx, char *text);
void xtt_pb_dp_slave_close_cb( void *sctx);
int xtt_pb_dp_slave_save_cb( void *sctx);
#endif
/*
* Proview $Id: co_merge.c,v 1.6 2006-04-05 08:40:56 claes Exp $
* Proview $Id: co_merge.c,v 1.7 2007-01-04 08:47:26 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -123,7 +123,7 @@ int main( int argc, char *argv[])
break;
}
case merge_eMtype_WbBase: {
strcpy( cfile, "/tmp/wb_i_base_methods.c");
strcpy( cfile, "/tmp/wb_i_base_methods.cpp");
strcpy( ofile, "/tmp/wb_i_base_methods.o");
outfp = fopen( cfile, "w");
......@@ -171,7 +171,13 @@ int main( int argc, char *argv[])
}
dcli_translate_filename( incdir, "$pwr_einc");
sprintf( cmd, "gcc -c -I%s -DOS_LINUX -o %s %s", incdir, ofile, cfile);
switch ( mtype) {
case merge_eMtype_WbBase:
sprintf( cmd, "g++ -c -I%s -DOS_LINUX -o %s %s", incdir, ofile, cfile);
break;
default:
sprintf( cmd, "gcc -c -I%s -DOS_LINUX -o %s %s", incdir, ofile, cfile);
}
// printf( "co_merge: %s\n", cmd);
system( cmd);
sprintf( cmd, "ar r %s %s", outfile, ofile);
......
/*
* Proview $Id: rt_elog.h,v 1.5 2005-12-14 13:05:12 claes Exp $
* Proview $Id: rt_elog.h,v 1.6 2007-01-04 08:47:26 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -39,6 +39,10 @@
#include "rt_mh_outunit.h"
#include "co_dcli.h"
#if defined __cplusplus
extern "C" {
#endif
#define DUMPFILE "rt_eventlog.dump"
#define DATABASE "$pwrp_db/rt_eventlog.db"
#define DATABASE_INFO "$pwrp_db/rt_eventlog_info.txt"
......@@ -79,4 +83,9 @@ typedef struct s_HelCB {
pwr_tNodeId Nid;
pwr_tInt64 StoreIdx;
}sHelCB;
#if defined __cplusplus
}
#endif
#endif
......@@ -94,8 +94,8 @@ wb_msg_eobjs := $(eobj_dir)/pwr_msg_wb.o $(eobj_dir)/pwr_msg_ge.o $(eobj_dir)/p
log_done =
csetos := -DOS_LINUX=1 -DOS=linux -DHW_X86=1 -DHW=x86
cinc := -I$(inc_dir) -I$(einc_dir) -I$(hw_source) -I$(os_source) -I$(co_source) -I/usr/X11R6/include -I$(jdk)/include -I$(jdk)/include/linux
cinc := -I$(inc_dir) -I$(einc_dir) -I$(hw_source) -I$(os_source) -I$(co_source) -I/usr/X11R6/include -I$(jdk)/include -I$(jdk)/include/linux \
-I /usr/include/libgnome-2.0 -I /usr/include/libgnome-2.0/libgnome -I /usr/include/glib-2.0 -I /usr/lib/glib-2.0/include -I /usr/include/libbonobo-2.0 -I /usr/include/libgnomeui-2.0 -I /usr/include/gtk-2.0 -I /usr/include/pango-1.0 -I /usr/lib/gtk-2.0/include -I /usr/include/atk-1.0 -I /usr/include/libgnomecanvas-2.0 -I /usr/include/libart-2.0 -I /usr/include/libbonoboui-2.0 -I /usr/include/gnome-vfs-2.0 -I /usr/include/cairo -DPREFIX=\"/usr/local\" -DSYSCONFDIR=\"/etc\" -DDATADIR=\"/usr/share\" -DLIBDIR=\"/usr/lib\"
rm := rm
cp := cp
cpflags :=
......
......@@ -133,6 +133,9 @@ clean_hpp_includes := $(patsubst %.hpp,clean_%.hpp, $(hpp_includes))
lib_name := libpwr_$(comp_name)
ifneq ($(src_name),src)
lib_name := libpwr_$(comp_name)_$(src_name)
endif
export_lib := $(lib_dir)/$(lib_name)$(lib_ext)
java_classes := $(addsuffix .class, $(basename $(java_sources)))
......@@ -205,12 +208,13 @@ $(clean_pwsg) : clean_%.pwsg : %.pwsg
@ $(rm) $(rmflags) $(exe_dir)/$*.pwsg
$(export_lib) : $(objects)
@ if [ -e $(export_lib) ]; then \
$(rm) $(export_lib); \
fi
@ echo "Building archive $(notdir $(export_lib))"
@ $(ar) -cr $(export_lib) $(objects)
# @ if [ -e $(export_lib) ]; then \
# $(rm) $(export_lib); \
# fi
-include $(source_dependencies)
endif
......@@ -29,6 +29,7 @@ endif
vpath %.uil $(hw_source):$(os_source):$(co_source)
vpath %.pwg $(hw_source):$(os_source):$(co_source)
vpath %.pwsg $(hw_source):$(os_source):$(co_source)
vpath %.png $(hw_source):$(os_source):$(co_source)
source_dirs := $(hw_source) $(os_source) $(co_source)
......@@ -68,10 +69,20 @@ pwsg_sources := $(sort \
) \
)
png_sources := $(sort \
$(foreach file, \
$(foreach dir, \
$(source_dirs), \
$(wildcard $(dir)/*.png) \
), $(notdir $(file)) \
) \
)
export_uid := $(addprefix $(exe_dir)/, $(patsubst %.uil, %.uid, $(uil_sources)))
export_c_pwg := $(addprefix $(exe_dir)/, $(pwg_c_sources))
export_pwg := $(addprefix $(exe_dir)/, $(pwg_sources))
export_pwsg := $(addprefix $(exe_dir)/, $(pwsg_sources))
export_png := $(addprefix $(exe_dir)/, $(png_sources))
$(exe_dir)/%.uid : %.uil
@ $(log_uil_uid)
......@@ -81,6 +92,7 @@ clean_uid := $(patsubst %.uil,clean_%.uid,$(uil_sources))
clean_c_pwg := $(patsubst %.pwg,clean_%.pwg,$(pwg_c_sources))
clean_pwg := $(patsubst %.pwg,clean_%.pwg,$(pwg_sources))
clean_pwsg := $(patsubst %.pwsg,clean_%.pwsg,$(pwsg_sources))
clean_png := $(patsubst %.png,clean_%.png,$(png_sources))
.PHONY : all init copy lib exe clean realclean\
dirs clean_bld clean_dirs $(clean_uid)
......@@ -89,13 +101,13 @@ all : init copy
init : dirs
copy : $(export_uid) $(export_c_pwg) $(export_pwg) $(export_pwsg)
copy : $(export_uid) $(export_c_pwg) $(export_pwg) $(export_pwsg) $(export_png)
lib :
exe :
clean : $(clean_uid) $(clean_pwg) $(clean_pwsg)
clean : $(clean_uid) $(clean_pwg) $(clean_pwsg) $(clean_png)
realclean : clean
......@@ -117,5 +129,9 @@ $(clean_pwsg) : clean_%.pwsg : %.pwsg
@ echo "Removing pwsg"
@ $(rm) $(rmflags) $(exe_dir)/$*.pwsg
$(clean_png) : clean_%.png : %.png
@ echo "Removing png"
@ $(rm) $(rmflags) $(exe_dir)/$*.png
endif
......@@ -221,6 +221,10 @@ $(exe_dir)/%.pwg : %.pwg
@ $(log_h_h)
@ $(cp) $(cpflags) $(source) $(target)
$(exe_dir)/%.png : %.png
@ $(log_h_h)
@ $(cp) $(cpflags) $(source) $(target)
$(exe_dir)/%.html : ../../%.html
@ $(log_h_h)
@ $(cp) $(cpflags) $(source) $(target)
......
......@@ -40,9 +40,9 @@ prev := pred_ $(word)
pred := $(subst $(space),$(empty),$(prev))
word := $($(pred))
src_name := $(word $(word), $(cwd_dirs))
ifneq ($(src_name),src)
include ___error___no_source_subdirectory
endif
#ifneq ($(src_name),src)
#include ___error___no_source_subdirectory
#endif
prev := pred_ $(word)
pred := $(subst $(space),$(empty),$(prev))
......@@ -58,9 +58,9 @@ prev := pred_ $(word)
pred := $(subst $(space),$(empty),$(prev))
word := $($(pred))
root_name := $(word $(word), $(cwd_dirs))
ifneq ($(src_name),src)
include ___error___incorrect_source_root1
endif
#ifneq ($(src_name),src)
#include ___error___incorrect_source_root1
#endif
#rest = /$(type_name)/$(comp_name)/src/$(os_name)/$(hw_name)/
#test_source_root := $(subst $(rest),$(empty),$(PWD))
......
This diff is collapsed.
......@@ -62,7 +62,7 @@ else
for lib in $libraries; do
arname=${lib##/*/}
if [ $arname = "libpwr_rt.a" ] || [ $arname = "libpwr_wb.a" ]|| [ $arname = "libpwr_xtt.a" ]; then
if [ $arname = "libpwr_rt.a" ] || [ $arname = "libpwr_rt_motif.a" ] || [ $arname = "libpwr_rt_gtk.a" ] || [ $arname = "libpwr_wb.a" ] || [ $arname = "libpwr_wb_motif.a" ] || [ $arname = "libpwr_wb_gtk.a" ] || [ $arname = "libpwr_xtt.a" ] || [ $arname = "libpwr_xtt_motif.a" ] || [ $arname = "libpwr_xtt_gtk.a" ]; then
echo "Merge $lib"
modules=`eval ar -tf $lib`
ar -xf $lib
......
/*
* Proview $Id: wb_c_ai_ai32up.c,v 1.2 2006-04-24 13:22:24 claes Exp $
* Proview $Id: wb_c_ai_ai32up.cpp,v 1.1 2007-01-04 08:46:09 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -29,7 +29,6 @@
#include "pwr_ssaboxclasses.h"
#include "wb_ldh.h"
#include "wb_wsx.h"
#include "wb_nav_macros.h"
/*----------------------------------------------------------------------------*\
......@@ -58,12 +57,12 @@ static pwr_tStatus AnteAdopt (
if (EVEN(sts)) return sts;
MaxChan = co_min(32, RCard.MaxNoOfChannels);
for (i = 0, Chan = 1; i < MaxChan; i++, Chan <<= 1) {
for (i = 0, Chan = 1; i < (int)MaxChan; i++, Chan <<= 1) {
if ((DCard.ChannelAllocation & Chan) == 0)
break;
}
if (i >= MaxChan)
if (i >= (int)MaxChan)
return PWRB__ALOCHAN;
else
return LDH__ADOPTRENAME;
......@@ -104,12 +103,12 @@ static pwr_tStatus PostAdopt (
if (EVEN(sts)) return sts;
MaxChan = co_min(32, RCard.MaxNoOfChannels);
for (i = 0, Chan = 1; i < MaxChan; i++, Chan <<= 1) {
for (i = 0, Chan = 1; i < (int)MaxChan; i++, Chan <<= 1) {
if ((DCard.ChannelAllocation & Chan) == 0)
break;
}
if (i >= MaxChan)
if (i >= (int)MaxChan)
return PWRB__ALOCHAN;
/* allocate new channel */
......
/*
* Proview $Id: wb_c_ai_hvai32.c,v 1.2 2006-04-24 13:22:24 claes Exp $
* Proview $Id: wb_c_ai_hvai32.cpp,v 1.1 2007-01-04 08:46:09 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -29,7 +29,6 @@
#include "pwr_ssaboxclasses.h"
#include "wb_ldh.h"
#include "wb_wsx.h"
#include "wb_nav_macros.h"
/*----------------------------------------------------------------------------*\
......@@ -58,12 +57,12 @@ static pwr_tStatus AnteAdopt (
if (EVEN(sts)) return sts;
MaxChan = co_min(32, RCard.MaxNoOfChannels);
for (i = 0, Chan = 1; i < MaxChan; i++, Chan <<= 1) {
for (i = 0, Chan = 1; i < (int)MaxChan; i++, Chan <<= 1) {
if ((DCard.ChannelAllocation & Chan) == 0)
break;
}
if (i >= MaxChan)
if (i >= (int)MaxChan)
return PWRB__ALOCHAN;
else
return LDH__ADOPTRENAME;
......@@ -104,12 +103,12 @@ static pwr_tStatus PostAdopt (
if (EVEN(sts)) return sts;
MaxChan = co_min(32, RCard.MaxNoOfChannels);
for (i = 0, Chan = 1; i < MaxChan; i++, Chan <<= 1) {
for (i = 0, Chan = 1; i < (int)MaxChan; i++, Chan <<= 1) {
if ((DCard.ChannelAllocation & Chan) == 0)
break;
}
if (i >= MaxChan)
if (i >= (int)MaxChan)
return PWRB__ALOCHAN;
/* allocate new channel */
......
/*
* Proview $Id: wb_c_ao_ao8up.c,v 1.3 2006-04-24 13:22:24 claes Exp $
* Proview $Id: wb_c_ao_ao8up.cpp,v 1.1 2007-01-04 08:46:09 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -29,7 +29,6 @@
#include "pwr_ssaboxclasses.h"
#include "wb_ldh.h"
#include "wb_wsx.h"
#include "wb_nav_macros.h"
/* AnteAdopt -- check if it's ok to adopt a new object */
......@@ -56,12 +55,12 @@ static pwr_tStatus AnteAdopt (
if (EVEN(sts)) return sts;
MaxChan = co_min(32, RCard.MaxNoOfChannels);
for (i = 0, Chan = 1; i < MaxChan; i++, Chan <<= 1) {
for (i = 0, Chan = 1; i < (int)MaxChan; i++, Chan <<= 1) {
if ((DCard.ChannelAllocation & Chan) == 0)
break;
}
if (i >= MaxChan)
if (i >= (int)MaxChan)
return PWRB__ALOCHAN;
else
return LDH__ADOPTRENAME;
......@@ -101,12 +100,12 @@ static pwr_tStatus PostAdopt (
if (EVEN(sts)) return sts;
MaxChan = co_min(32, RCard.MaxNoOfChannels);
for (i = 0, Chan = 1; i < MaxChan; i++, Chan <<= 1) {
for (i = 0, Chan = 1; i < (int)MaxChan; i++, Chan <<= 1) {
if ((DCard.ChannelAllocation & Chan) == 0)
break;
}
if (i >= MaxChan)
if (i >= (int)MaxChan)
return PWRB__ALOCHAN;
/* allocate new channel */
......
/*
* Proview $Id: wb_c_ao_hvao4.c,v 1.2 2006-04-24 13:22:24 claes Exp $
* Proview $Id: wb_c_ao_hvao4.cpp,v 1.1 2007-01-04 08:46:09 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -29,7 +29,6 @@
#include "pwr_ssaboxclasses.h"
#include "wb_ldh.h"
#include "wb_wsx.h"
#include "wb_nav_macros.h"
/* AnteAdopt -- check if it's ok to adopt a new object */
......@@ -56,12 +55,12 @@ static pwr_tStatus AnteAdopt (
if (EVEN(sts)) return sts;
MaxChan = co_min(32, RCard.MaxNoOfChannels);
for (i = 0, Chan = 1; i < MaxChan; i++, Chan <<= 1) {
for (i = 0, Chan = 1; i < (int)MaxChan; i++, Chan <<= 1) {
if ((DCard.ChannelAllocation & Chan) == 0)
break;
}
if (i >= MaxChan)
if (i >= (int)MaxChan)
return PWRB__ALOCHAN;
else
return LDH__ADOPTRENAME;
......@@ -101,12 +100,12 @@ static pwr_tStatus PostAdopt (
if (EVEN(sts)) return sts;
MaxChan = co_min(32, RCard.MaxNoOfChannels);
for (i = 0, Chan = 1; i < MaxChan; i++, Chan <<= 1) {
for (i = 0, Chan = 1; i < (int)MaxChan; i++, Chan <<= 1) {
if ((DCard.ChannelAllocation & Chan) == 0)
break;
}
if (i >= MaxChan)
if (i >= (int)MaxChan)
return PWRB__ALOCHAN;
/* allocate new channel */
......
/*
* Proview $Id: wb_c_co_co4up.c,v 1.2 2006-04-24 13:22:24 claes Exp $
* Proview $Id: wb_c_co_co4up.cpp,v 1.1 2007-01-04 08:46:09 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -29,7 +29,6 @@
#include "pwr_ssaboxclasses.h"
#include "wb_ldh.h"
#include "wb_wsx.h"
#include "wb_nav_macros.h"
/* Check if it's ok to adopt a new object. */
......@@ -57,12 +56,12 @@ AnteAdopt (
if (EVEN(sts)) return sts;
MaxCounter = co_min(32, RCard.MaxNoOfCounters);
for (i = 0, Chan = 1; i < MaxCounter; i++, Chan <<= 1) {
for (i = 0, Chan = 1; i < (int)MaxCounter; i++, Chan <<= 1) {
if ((DCard.ChannelAllocation & Chan) == 0)
break;
}
if (i >= MaxCounter)
if (i >= (int)MaxCounter)
return PWRB__ALOCHAN;
else
return LDH__ADOPTRENAME;
......@@ -101,12 +100,12 @@ PostAdopt (
if (EVEN(sts)) return sts;
MaxCounter = co_min(32, RCard.MaxNoOfCounters);
for (i = 0, Chan = 1; i < MaxCounter; i++, Chan <<= 1) {
for (i = 0, Chan = 1; i < (int)MaxCounter; i++, Chan <<= 1) {
if ((DCard.ChannelAllocation & Chan) == 0)
break;
}
if (i >= MaxCounter)
if (i >= (int)MaxCounter)
return PWRB__ALOCHAN;
/* allocate new channel */
......
/*
* Proview $Id: wb_c_co_pi24bo.c,v 1.2 2006-04-24 13:22:24 claes Exp $
* Proview $Id: wb_c_co_pi24bo.cpp,v 1.1 2007-01-04 08:46:09 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -29,7 +29,6 @@
#include "pwr_ssaboxclasses.h"
#include "wb_ldh.h"
#include "wb_wsx.h"
#include "wb_nav_macros.h"
/* Check if it's ok to adopt a new object. */
......@@ -57,12 +56,12 @@ AnteAdopt (
if (EVEN(sts)) return sts;
MaxCounter = co_min(32, RCard.MaxNoOfCounters);
for (i = 0, Chan = 1; i < MaxCounter; i++, Chan <<= 1) {
for (i = 0, Chan = 1; i < (int)MaxCounter; i++, Chan <<= 1) {
if ((DCard.ChannelAllocation & Chan) == 0)
break;
}
if (i >= MaxCounter)
if (i >= (int)MaxCounter)
return PWRB__ALOCHAN;
else
return LDH__ADOPTRENAME;
......@@ -101,12 +100,12 @@ PostAdopt (
if (EVEN(sts)) return sts;
MaxCounter = co_min(32, RCard.MaxNoOfCounters);
for (i = 0, Chan = 1; i < MaxCounter; i++, Chan <<= 1) {
for (i = 0, Chan = 1; i < (int)MaxCounter; i++, Chan <<= 1) {
if ((DCard.ChannelAllocation & Chan) == 0)
break;
}
if (i >= MaxCounter)
if (i >= (int)MaxCounter)
return PWRB__ALOCHAN;
/* allocate new channel */
......
/*
* Proview $Id: wb_c_di_dix2.c,v 1.2 2006-04-24 13:22:24 claes Exp $
* Proview $Id: wb_c_di_dix2.cpp,v 1.1 2007-01-04 08:46:09 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -29,7 +29,6 @@
#include "pwr_ssaboxclasses.h"
#include "wb_ldh.h"
#include "wb_wsx.h"
#include "wb_nav_macros.h"
/*----------------------------------------------------------------------------*\
......@@ -58,12 +57,12 @@ static pwr_tStatus AnteAdopt (
if (EVEN(sts)) return sts;
MaxChan = co_min(32, RCard.MaxNoOfChannels);
for (i = 0, Chan = 1; i < MaxChan; i++, Chan <<= 1) {
for (i = 0, Chan = 1; i < (int)MaxChan; i++, Chan <<= 1) {
if ((DCard.ChannelAllocation & Chan) == 0)
break;
}
if (i >= MaxChan)
if (i >= (int)MaxChan)
return PWRB__ALOCHAN;
else
return LDH__ADOPTRENAME;
......@@ -103,12 +102,12 @@ static pwr_tStatus PostAdopt (
if (EVEN(sts)) return sts;
MaxChan = co_min(32, RCard.MaxNoOfChannels);
for (i = 0, Chan = 1; i < MaxChan; i++, Chan <<= 1) {
for (i = 0, Chan = 1; i < (int)MaxChan; i++, Chan <<= 1) {
if ((DCard.ChannelAllocation & Chan) == 0)
break;
}
if (i >= MaxChan)
if (i >= (int)MaxChan)
return PWRB__ALOCHAN;
/* allocate new channel */
......
/*
* Proview $Id: wb_c_do_hvdo32.c,v 1.2 2006-04-24 13:22:24 claes Exp $
* Proview $Id: wb_c_do_hvdo32.cpp,v 1.1 2007-01-04 08:46:09 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -29,7 +29,6 @@
#include "pwr_ssaboxclasses.h"
#include "wb_ldh.h"
#include "wb_wsx.h"
#include "wb_nav_macros.h"
/*----------------------------------------------------------------------------*\
......@@ -58,12 +57,12 @@ static pwr_tStatus AnteAdopt (
if (EVEN(sts)) return sts;
MaxChan = co_min(32, RCard.MaxNoOfChannels);
for (i = 0, Chan = 1; i < MaxChan; i++, Chan <<= 1) {
for (i = 0, Chan = 1; i < (int)MaxChan; i++, Chan <<= 1) {
if ((DCard.ChannelAllocation & Chan) == 0)
break;
}
if (i >= MaxChan)
if (i >= (int)MaxChan)
return PWRB__ALOCHAN;
else
return LDH__ADOPTRENAME;
......@@ -103,12 +102,12 @@ static pwr_tStatus PostAdopt (
if (EVEN(sts)) return sts;
MaxChan = co_min(32, RCard.MaxNoOfChannels);
for (i = 0, Chan = 1; i < MaxChan; i++, Chan <<= 1) {
for (i = 0, Chan = 1; i < (int)MaxChan; i++, Chan <<= 1) {
if ((DCard.ChannelAllocation & Chan) == 0)
break;
}
if (i >= MaxChan)
if (i >= (int)MaxChan)
return PWRB__ALOCHAN;
/* allocate new channel */
......
include $(pwre_dir_symbols)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/$(type_name)_generic.mk
ifeq ($($(type_name)_generic_mk),)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(type_name)_generic.mk
endif
ifeq ($($(type_name)_generic_mk),)
include $(pwre_kroot)/tools/bld/src/$(type_name)_generic.mk
endif
-include ../../special.mk
-include ../special.mk
-include special.mk
ifndef link_rule_mk
link_rule_mk := 1
ifeq ($(export_type),exp)
link = $(ldxx) $(explinkflags) $(domap) -o $(pwr_exe)/rt_xtt_gtk \
$(bld_dir)/rt_xtt_gtk.o $(bld_dir)/xtt_main.o $(rt_msg_eobjs) \
$(pwr_eobj)/rt_io_user.o -L/usr/X11R6/lib\
-L/opt/gnome/lib \
-lpwr_xtt_gtk -lpwr_xtt -lpwr_xtt_gtk -lpwr_xtt -lpwr_ge_gtk -lpwr_ge -lpwr_rt_gtk -lpwr_rt \
-lpwr_co_gtk -lpwr_co -lpwr_flow_gtk -lpwr_flow -lpwr_glow_gtk -lpwr_glow \
`pkg-config --libs gtk+-2.0` \
-lpwr_msg_dummy -lgdk_imlib -lMrm -lXm -lXpm -lXt -lX11 -lXext -lXp\
-lSM -lICE\
-ldb -lrpcsvc -lpthread -lm -lrt -lasound
else
link = $(ldxx) $(elinkflags) $(domap) -o $(pwr_exe)/rt_xtt_gtk \
$(bld_dir)/rt_xtt_gtk.o $(bld_dir)/xtt_main.o $(rt_msg_eobjs) \
$(pwr_eobj)/rt_io_user.o -L/usr/X11R6/lib\
-L/opt/gnome/lib \
-lpwr_xtt_gtk -lpwr_xtt -lpwr_xtt_gtk -lpwr_xtt -lpwr_ge_gtk -lpwr_ge -lpwr_rt_gtk -lpwr_rt \
-lpwr_co_gtk -lpwr_co -lpwr_flow_gtk -lpwr_flow -lpwr_glow_gtk -lpwr_glow \
`pkg-config --libs gtk+-2.0` \
-lpwr_msg_dummy -lgdk_imlib -lMrm -lXm -lXpm -lXt -lX11 -lXext -lXp\
-lSM -lICE\
-ldb -lrpcsvc -lpthread -lm -lrt -lasound
endif
endif
This diff is collapsed.
/*
* Proview $Id: rt_xtt_gtk.h,v 1.1 2007-01-04 08:40:24 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef rt_xtt_gtk_h
#define rt_xtt_gtk_h
/* rt_xtt_gtk.h -- Simple navigator */
typedef void *Widget;
#ifndef rt_xtt_main_h
# include "rt_xtt_main.h"
#endif
#ifndef co_wow_gtk_h
# include "co_wow_gtk.h"
#endif
class CoWowRecall;
class CoWowEntryGtk;
class XttHotkey;
class XttGtk : public Xtt {
public:
GtkWidget *parent_wid;
GtkWidget *brow_widget;
GtkWidget *form_widget;
GtkWidget *toplevel;
GtkWidget *msg_label;
GtkWidget *cmd_prompt;
GtkWidget *cmd_input;
GtkWidget *xnav_form;
GtkWidget *india_widget;
GtkWidget *india_label;
GtkWidget *india_text;
CoWowFocusTimerGtk focustimer;
CoWowRecall *cmd_recall;
CoWowRecall *value_recall;
CoWowEntryGtk *cmd_entry;
XttHotkey *hotkey;
XttGtk( int argc, char *argv[], int *sts);
~XttGtk();
void message( char severity, char *msg);
void xtt_mainloop();
// int init_hotkey( XtAppContext AppCtx, Widget Top);
void open_input_dialog( char *text, char *title,
char *init_text,
void (*ok_cb)( Xtt *, char *));
void set_prompt( char *prompt);
void open_change_value();
void create_input_dialog();
static void close( void *ctx, int terminate);
static void set_dimension( void *ctx, int width, int height);
static void map( void *ctx);
static void activate_change_value( GtkWidget *w, gpointer data);
static void activate_command( GtkWidget *w, gpointer data);
static void activate_exit( GtkWidget *w, gpointer data);
static void activate_print( GtkWidget *w, gpointer data);
static void activate_find( GtkWidget *w, gpointer data);
static void activate_findregex( GtkWidget *w, gpointer data);
static void activate_findnext( GtkWidget *w, gpointer data);
static void activate_collapse( GtkWidget *w, gpointer data);
static void activate_openobject( GtkWidget *w, gpointer data);
static void activate_openplc( GtkWidget *w, gpointer data);
static void activate_showcrossref( GtkWidget *w, gpointer data);
static void activate_opengraph( GtkWidget *w, gpointer data);
static void activate_collect_insert( GtkWidget *w, gpointer data);
static void activate_collect_show( GtkWidget *w, gpointer data);
static void activate_collect_remove( GtkWidget *w, gpointer data);
static void activate_collect_clear( GtkWidget *w, gpointer data);
static void activate_advanceduser( GtkWidget *w, gpointer data);
static void activate_zoom_in( GtkWidget *w, gpointer data);
static void activate_zoom_out( GtkWidget *w, gpointer data);
static void activate_zoom_reset( GtkWidget *w, gpointer data);
static void activate_help( GtkWidget *w, gpointer data);
static void activate_help_project( GtkWidget *w, gpointer data);
static void activate_help_proview( GtkWidget *w, gpointer data);
static void activate_back( GtkWidget *w, gpointer data);
static void create_msg_label( GtkWidget *w, gpointer data);
static void create_cmd_prompt( GtkWidget *w, gpointer data);
static void create_cmd_input( GtkWidget *w, gpointer data);
static void create_xnav_form( GtkWidget *w, gpointer data);
static void create_india_label( GtkWidget *w, gpointer data);
static void create_india_text( GtkWidget *w, gpointer data);
static void activate_india_ok( GtkWidget *w, gpointer data);
static void activate_india_cancel( GtkWidget *w, gpointer data);
static gboolean action_inputfocus( GtkWidget *w, GdkEvent *event, gpointer data);
static void valchanged_cmd_input( GtkWidget *w, gpointer data);
static void hotkey_Command( char *arg, void *userdata);
static void hotkey_ToggleDig( char *arg, void *userdata);
static void hotkey_SetDig( char *arg, void *userdata);
static void hotkey_ResetDig( char *arg, void *userdata);
};
#endif
include $(pwre_dir_symbols)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/$(type_name)_generic.mk
ifeq ($($(type_name)_generic_mk),)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(type_name)_generic.mk
endif
ifeq ($($(type_name)_generic_mk),)
include $(pwre_kroot)/tools/bld/src/$(type_name)_generic.mk
endif
-include ../../special.mk
-include ../special.mk
-include special.mk
ifndef link_rule_mk
link_rule_mk := 1
ifeq ($(export_type),exp)
link = $(ldxx) $(explinkflags) $(domap) -o $(pwr_exe)/rt_xtt_motif \
$(bld_dir)/rt_xtt_motif.o $(bld_dir)/xtt_main.o $(rt_msg_eobjs) \
$(pwr_eobj)/rt_io_user.o -L/usr/X11R6/lib\
-L/opt/gnome/lib \
-lpwr_xtt_motif -lpwr_xtt -lpwr_xtt_motif -lpwr_xtt -lpwr_ge_motif -lpwr_ge -lpwr_rt_motif -lpwr_rt \
-lpwr_co_motif -lpwr_co -lpwr_flow_motif -lpwr_flow -lpwr_glow_motif -lpwr_glow \
-lpwr_msg_dummy -lImlib -lMrm -lXm -lXpm -lXt -lX11 -lXext -lXp\
-lSM -lICE\
-ldb -lrpcsvc -lpthread -lm -lrt -lasound
else
link = $(ldxx) $(elinkflags) $(domap) -o $(pwr_exe)/rt_xtt_motif \
$(bld_dir)/rt_xtt_motif.o $(bld_dir)/xtt_main.o $(rt_msg_eobjs) \
$(pwr_eobj)/rt_io_user.o -L/usr/X11R6/lib\
-L/opt/gnome/lib \
-lpwr_xtt_motif -lpwr_xtt -lpwr_xtt_motif -lpwr_xtt -lpwr_ge_motif -lpwr_ge -lpwr_rt_motif -lpwr_rt \
-lpwr_co_motif -lpwr_co -lpwr_flow_motif -lpwr_flow -lpwr_glow_motif -lpwr_glow \
-lpwr_msg_dummy -lImlib -lMrm -lXm -lXpm -lXt -lX11 -lXext -lXp\
-lSM -lICE\
-ldb -lrpcsvc -lpthread -lm -lrt -lasound
endif
endif
This diff is collapsed.
/*
* Proview $Id: rt_xtt_motif.h,v 1.1 2007-01-04 08:40:33 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with the program, if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef rt_xtt_motif_h
#define rt_xtt_motif_h
/* rt_xtt_motif.h -- Simple navigator */
#ifndef rt_xtt_main_h
# include "rt_xtt_main.h"
#endif
#ifndef co_wow_motif_h
#include "co_wow_motif.h"
#endif
#ifndef xtt_hotkey_motif_h
#include "xtt_hotkey_motif.h"
#endif
class XttMotif : public Xtt {
public:
Widget parent_wid;
Widget brow_widget;
Widget form_widget;
Widget toplevel;
Widget msg_label;
Widget cmd_prompt;
Widget cmd_input;
Widget xnav_form;
Widget india_widget;
Widget india_label;
Widget india_text;
CoWowFocusTimerMotif focustimer;
hotkeyHandle HotkeyHandle;
char cmd_recall[30][160];
int cmd_current_recall;
char value_recall[30][160];
int value_current_recall;
XttMotif( int argc, char *argv[], int *sts);
~XttMotif();
void message( char severity, char *msg);
void xtt_mainloop (XtAppContext AppCtx);
int init_hotkey( XtAppContext AppCtx, Widget Top);
void open_input_dialog( char *text, char *title,
char *init_text,
void (*ok_cb)( Xtt *, char *));
void set_prompt( char *prompt);
void open_change_value();
static void close( void *ctx, int terminate);
static void set_dimension( void *ctx, int width, int height);
static void map( void *ctx);
static void activate_change_value( Widget w, Xtt *xtt, XmAnyCallbackStruct *data);
static void activate_command( Widget w, Xtt *xtt, XmAnyCallbackStruct *data);
static void activate_exit( Widget w, Xtt *xtt, XmAnyCallbackStruct *data);
static void activate_print( Widget w, Xtt *xtt, XmAnyCallbackStruct *data);
static void activate_find( Widget w, Xtt *xtt, XmAnyCallbackStruct *data);
static void activate_findregex( Widget w, Xtt *xtt, XmAnyCallbackStruct *data);
static void activate_findnext( Widget w, Xtt *xtt, XmAnyCallbackStruct *data);
static void activate_collapse( Widget w, Xtt *xtt, XmAnyCallbackStruct *data);
static void activate_openobject( Widget w, Xtt *xtt, XmAnyCallbackStruct *data);
static void activate_openplc( Widget w, Xtt *xtt, XmAnyCallbackStruct *data);
static void activate_showcrossref( Widget w, Xtt *xtt, XmAnyCallbackStruct *data);
static void activate_opengraph( Widget w, Xtt *xtt, XmAnyCallbackStruct *data);
static void activate_collect_insert( Widget w, Xtt *xtt, XmAnyCallbackStruct *data);
static void activate_collect_show( Widget w, Xtt *xtt, XmAnyCallbackStruct *data);
static void activate_collect_remove( Widget w, Xtt *xtt, XmAnyCallbackStruct *data);
static void activate_collect_clear( Widget w, Xtt *xtt, XmAnyCallbackStruct *data);
static void activate_advanceduser( Widget w, Xtt *xtt, XmAnyCallbackStruct *data);
static void activate_zoom_in( Widget w, Xtt *xtt, XmAnyCallbackStruct *data);
static void activate_zoom_out( Widget w, Xtt *xtt, XmAnyCallbackStruct *data);
static void activate_zoom_reset( Widget w, Xtt *xtt, XmAnyCallbackStruct *data);
static void activate_help( Widget w, Xtt *xtt, XmAnyCallbackStruct *data);
static void activate_help_project( Widget w, Xtt *xtt, XmAnyCallbackStruct *data);
static void activate_help_proview( Widget w, Xtt *xtt, XmAnyCallbackStruct *data);
static void create_msg_label( Widget w, Xtt *xtt, XmAnyCallbackStruct *data);
static void create_cmd_prompt( Widget w, Xtt *xtt, XmAnyCallbackStruct *data);
static void create_cmd_input( Widget w, Xtt *xtt, XmAnyCallbackStruct *data);
static void create_xnav_form( Widget w, Xtt *xtt, XmAnyCallbackStruct *data);
static void create_india_label( Widget w, Xtt *xtt, XmAnyCallbackStruct *data);
static void create_india_text( Widget w, Xtt *xtt, XmAnyCallbackStruct *data);
static void activate_india_ok( Widget w, Xtt *xtt, XmAnyCallbackStruct *data);
static void activate_india_cancel( Widget w, Xtt *xtt, XmAnyCallbackStruct *data);
static void action_inputfocus( Widget w, XmAnyCallbackStruct *data);
static void valchanged_cmd_input( Widget w, XEvent *event, XmAnyCallbackStruct *data);
static void hotkey_Command( Widget w, XKeyEvent* ev, String* av, Cardinal* ac);
static void hotkey_ToggleDig( Widget w, XKeyEvent* ev, String* av, Cardinal* ac);
static void hotkey_SetDig( Widget w, XKeyEvent* ev, String* av, Cardinal* ac);
static void hotkey_ResetDig( Widget w, XKeyEvent* ev, String* av, Cardinal* ac);
};
#endif
ifndef link_rule_mk
link_rule_mk := 1
ifeq ($(export_type),exp)
link = $(ldxx) $(explinkflags) $(domap) -o $(export_exe) \
$(export_obj) $(objects) $(rt_msg_eobjs) \
$(pwr_eobj)/rt_io_user.o -L/usr/X11R6/lib\
-L/opt/gnome/lib \
-lpwr_xtt -lpwr_ge -lpwr_rt -lpwr_co -lpwr_flow -lpwr_glow \
-lpwr_msg_dummy -lImlib -lMrm -lXm -lXpm -lXt -lX11 -lXext -lXp\
-lSM -lICE\
-ldb -lrpcsvc -lpthread -lm -lrt -lasound
else
link = $(ldxx) $(elinkflags) $(domap) -o $(export_exe) \
$(export_obj) $(objects) $(rt_msg_eobjs) \
$(export_obj) $(rt_msg_eobjs) \
$(pwr_eobj)/rt_io_user.o -L/usr/X11R6/lib\
-L/opt/gnome/lib \
-lpwr_xtt -lpwr_ge -lpwr_rt -lpwr_co -lpwr_flow -lpwr_glow \
......@@ -20,4 +10,3 @@ else
-lSM -lICE\
-ldb -lrpcsvc -lpthread -lm -lrt -lasound
endif
endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
include $(pwre_dir_symbols)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/$(type_name)_generic.mk
ifeq ($($(type_name)_generic_mk),)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(type_name)_generic.mk
endif
ifeq ($($(type_name)_generic_mk),)
include $(pwre_kroot)/tools/bld/src/$(type_name)_generic.mk
endif
-include ../../special.mk
-include ../special.mk
-include special.mk
ifndef link_rule_mk
link_rule_mk := 1
link = $(ldxx) $(elinkflags) $(domap) -o $(pwr_exe)/wb_ge_gtk \
$(bld_dir)/wb_ge_gtk.o $(wb_msg_eobjs) $(rt_msg_eobjs) \
$(pwr_eobj)/rt_io_user.o $(pwr_eobj)/wb_provider.o -L/usr/X11R6/lib \
-L/usr/local/BerkeleyDB.4.0/lib \
-L/opt/gnome/lib \
-lpwr_ge_gtk -lpwr_ge -lpwr_wb_gtk -lpwr_wb -lpwr_wb_gtk -l pwr_wb -lpwr_ge_gtk -lpwr_ge \
-lpwr_flow_gtk -lpwr_flow -lpwr_glow_gtk -lpwr_glow -lpwr_rt_gtk -lpwr_rt \
-lpwr_co_gtk -lpwr_co -lpwr_flow_gtk -lpwr_flow \
`pkg-config --libs gtk+-2.0` \
-lpwr_msg_dummy -lantlr -lgdk_imlib -lMrm -lXm -lXpm -lXt -lX11 -lXext -lXp\
-lXmu -lSM -lICE\
-lrpcsvc -lpthread -lm -ldb_cxx -lz
endif
This diff is collapsed.
include $(pwre_dir_symbols)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/$(type_name)_generic.mk
ifeq ($($(type_name)_generic_mk),)
-include $(pwre_kroot)/tools/bld/src/$(os_name)/$(type_name)_generic.mk
endif
ifeq ($($(type_name)_generic_mk),)
include $(pwre_kroot)/tools/bld/src/$(type_name)_generic.mk
endif
-include ../../special.mk
-include ../special.mk
-include special.mk
ifndef link_rule_mk
link_rule_mk := 1
link = $(ldxx) $(elinkflags) $(domap) -o $(pwr_exe)/wb_ge_motif \
$(bld_dir)/wb_ge_motif.o $(wb_msg_eobjs) $(rt_msg_eobjs) \
$(pwr_eobj)/rt_io_user.o $(pwr_eobj)/wb_provider.o -L/usr/X11R6/lib \
-L/usr/local/BerkeleyDB.4.0/lib \
-L/opt/gnome/lib \
-lpwr_ge_motif -lpwr_ge -lpwr_wb_motif -lpwr_wb -lpwr_wb_motif -lpwr_wb -lpwr_flow_motif -lpwr_flow \
-lpwr_glow_motif -lpwr_glow -lpwr_rt_motif -lpwr_rt -lpwr_co_motif -lpwr_co \
-lpwr_msg_dummy -lantlr -lImlib -lMrm -lXm -lXpm -lXt -lX11 -lXext -lXp\
-lXmu -lSM -lICE\
-lrpcsvc -lpthread -lm -ldb_cxx -lz
endif
This diff is collapsed.
This diff is collapsed.
!
! Proview $Id: ge.uil,v 1.4 2005-09-06 10:39:34 claes Exp $
! Proview $Id: ge.uil,v 1.1 2007-01-04 08:39:37 claes Exp $
! Copyright (C) 2005 SSAB Oxelsund AB.
!
! This program is free software; you can redistribute it and/or
......
!
! Proview $Id: ge_attr.uil,v 1.3 2005-09-06 10:39:34 claes Exp $
! Proview $Id: ge_attr.uil,v 1.1 2007-01-04 08:39:37 claes Exp $
! Copyright (C) 2005 SSAB Oxelsund AB.
!
! This program is free software; you can redistribute it and/or
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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