Commit 9c2084e3 authored by claes's avatar claes

Function to read java export data needed by xttgraph build method

parent 02d5e2b2
/*
* Proview $Id: glow.h,v 1.11 2005-09-01 14:57:53 claes Exp $
* Proview $Id: glow.h,v 1.12 2006-03-31 14:37:31 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -915,7 +915,8 @@ typedef enum {
typedef enum {
glow_eSaveMode_Edit, //!< Save as graph.
glow_eSaveMode_Trace, //!< Not used.
glow_eSaveMode_SubGraph //!< Save as subgraph.
glow_eSaveMode_SubGraph, //!< Save as subgraph.
glow_eSaveMode_ReadConfigOnly //!< Read only configuration data.
} glow_eSaveMode;
//! Tags used when writing objects to a .pwg fil.
......
/*
* Proview $Id: glow_ctx.cpp,v 1.9 2006-01-25 10:46:23 claes Exp $
* Proview $Id: glow_ctx.cpp,v 1.10 2006-03-31 14:37:31 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -56,7 +56,7 @@ GlowCtx::GlowCtx( char *ctx_name, double zoom_fact, int offs_x, int offs_y)
window_width(0), window_height(0), subwindow_x(0), subwindow_y(0), subwindow_scale(1),
nav_window_width(0), nav_window_height(0),
nav_rect_ll_x(0), nav_rect_ll_y(0), nav_rect_ur_x(0), nav_rect_ur_y(0),
node_movement_active(0),
draw_ctx(0), node_movement_active(0),
node_movement_paste_active(0), node_movement_paste_pending(0),
nav_rect_movement_active(0), nav_rect_zoom_active(0),
select_rect_active(0),
......@@ -277,6 +277,10 @@ int GlowCtx::open( char *filename, glow_eSaveMode mode)
case glow_eSave_Ctx_grow:
((GrowCtx *)this)->open_grow( fp);
grow_loaded = 1;
if ( mode == glow_eSaveMode_ReadConfigOnly) {
fp.close();
return 1;
}
break;
case glow_eSave_Ctx_a_nc: a_nc.open( this, fp); break;
case glow_eSave_Ctx_a_cc: a_cc.open( this, fp); break;
......
/*
* Proview $Id: glow_growapi.cpp,v 1.19 2006-01-23 08:46:54 claes Exp $
* Proview $Id: glow_growapi.cpp,v 1.20 2006-03-31 14:37:31 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -4371,6 +4371,22 @@ void grow_GetWindowSize( grow_tCtx ctx, int *width, int *height)
*height = ((GrowCtx *)ctx)->window_height;
}
int grow_IsJava( char *name, int *is_frame, int *is_applet, char *java_name)
{
int sts;
GrowCtx *ctx = new GrowCtx( "tmp");
ctx->set_nodraw();
sts = ctx->open( name, glow_eSaveMode_ReadConfigOnly);
if ( ODD(sts)) {
*is_frame = ctx->is_javaapplication;
*is_applet = ctx->is_javaapplet;
strcpy( java_name, ctx->java_name);
}
delete ctx;
return sts;
}
/*@}*/
......
/*
* Proview $Id: glow_growapi.h,v 1.18 2006-01-23 08:46:54 claes Exp $
* Proview $Id: glow_growapi.h,v 1.19 2006-03-31 14:37:31 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -2872,6 +2872,7 @@ typedef GlowTraceData glow_sTraceData;
int grow_SetFolderIndex( grow_tObject folder, int idx);
int grow_SetWindowSource( grow_tObject window, char *source);
void grow_GetWindowSize( grow_tCtx ctx, int *width, int *height);
int grow_IsJava( char *name, int *is_frame, int *is_applet, char *java_name);
/*@}*/
#if defined __cplusplus
......
/*
* Proview $Id: glow_growctx.cpp,v 1.16 2006-01-25 10:46:23 claes Exp $
* Proview $Id: glow_growctx.cpp,v 1.17 2006-03-31 14:37:31 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -63,7 +63,8 @@ extern "C" {
GrowCtx::~GrowCtx()
{
clear_all( 0);
if ( draw_ctx)
clear_all( 0);
if ( dynamic)
free( dynamic);
}
......@@ -2020,7 +2021,8 @@ void GrowCtx::open_grow( ifstream& fp)
double_buffer_on = 1;
glow_draw_create_buffer( this);
}
set_background( background_color);
if ( draw_ctx)
set_background( background_color);
}
int GrowCtx::save_subgraph( char *filename, glow_eSaveMode mode)
......
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