Commit efc197e5 authored by Claes Sjofors's avatar Claes Sjofors

Wb function to build directory, import and export

parent b18698e1
!
! Proview Open Source Process Control.
! Copyright (C) 2005-2014 SSAB EMEA AB.
!
! This file is part of Proview.
!
! 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 Proview. If not, see <http://www.gnu.org/licenses/>
!
! Linking Proview statically or dynamically with other modules is
! making a combined work based on Proview. Thus, the terms and
! conditions of the GNU General Public License cover the whole
! combination.
!
! In addition, as a special exception, the copyright holders of
! Proview give you permission to, from the build function in the
! Proview Configurator, combine Proview with modules generated by the
! Proview PLC Editor to a PLC program, regardless of the license
! terms of these modules. You may copy and distribute the resulting
! combined work under the terms of your choice, provided that every
! copy of the combined work is accompanied by a complete copy of
! the source code of Proview (the version used to produce the
! combined work), being distributed under the terms of the GNU
! General Public License plus this exception.
!
! pwrb_c_applexport.wb_load -- Defines the class ApplExport.
!
SObject pwrb:Class
!/**
! @Version 1.0
! @Group ProjectConfiguration
! @Summary Configures export of applications.
! The ApplExport object configures export of files to other projects.
!
! One ApplExport object causes one or several files (with wildcard
! specification) to be copied from the development project environment
! to a directory where it is available for other projects.
!
! The object reside in the project volume beneath an Export object.
!
! The distribution is carried out when Export in the configurator men
! is activated.
!
! @b See also
! @classlink Export pwrb_export.html
!*/
Object ApplExport $ClassDef 624
Body SysBody
Attr Editor = pwr_eEditor_AttrEd
Attr Method = pwr_eMethod_RtAndDevBodies
EndBody
Object DevBody $ObjBodyDef 2
!/**
! @Summary Source file specification.
! Source file specification.
! The asterisk (*) wild card character can be used in the file
! specification.
!
! Example
! $pwrp_load/*.flw
!*/
Object Source $Attribute 1
Body SysBody
Attr TypeRef = "pwrs:Type-$String80"
EndBody
EndObject
!/**
! @Summary Target file specification.
! Target file specification.
! Should only be supplied if the target path or filename differs
! from the source.
!*/
Object Target $Attribute 2
Body SysBody
Attr TypeRef = "pwrs:Type-$String80"
EndBody
EndObject
EndObject
EndObject
EndSObject
!
! Proview Open Source Process Control.
! Copyright (C) 2005-2014 SSAB EMEA AB.
!
! This file is part of Proview.
!
! 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 Proview. If not, see <http://www.gnu.org/licenses/>
!
! Linking Proview statically or dynamically with other modules is
! making a combined work based on Proview. Thus, the terms and
! conditions of the GNU General Public License cover the whole
! combination.
!
! In addition, as a special exception, the copyright holders of
! Proview give you permission to, from the build function in the
! Proview Configurator, combine Proview with modules generated by the
! Proview PLC Editor to a PLC program, regardless of the license
! terms of these modules. You may copy and distribute the resulting
! combined work under the terms of your choice, provided that every
! copy of the combined work is accompanied by a complete copy of
! the source code of Proview (the version used to produce the
! combined work), being distributed under the terms of the GNU
! General Public License plus this exception.
!
! pwrb_c_applimport.wb_load -- Defines the class ApplImport.
!
SObject pwrb:Class
!/**
! @Version 1.0
! @Group ProjectConfiguration
! @Summary Configures import of applications.
! The ApplImport object configures import of files from other projects.
!
! One ApplImport object causes one or several files (with wildcard
! specification) to be copied from the import directory to the project.
!
! The object reside in the project volume beneath an Import object.
!
! The import is carried out when Import in the configurator men
! is activated.
!
! @b See also
! @classlink Import pwrb_import.html
!*/
Object ApplImport $ClassDef 626
Body SysBody
Attr Editor = pwr_eEditor_AttrEd
Attr Method = pwr_eMethod_RtAndDevBodies
EndBody
Object DevBody $ObjBodyDef 2
!/**
! @Summary Source file specification.
! Source file specification.
! The asterisk (*) wild card character can be used in the file
! specification.
!
! Example
! *.flw
!*/
Object Source $Attribute 1
Body SysBody
Attr TypeRef = "pwrs:Type-$String80"
EndBody
EndObject
!/**
! @Summary Target file specification.
! Target file specification.
! Only the path to the target has to be specified.
!*/
Object Target $Attribute 2
Body SysBody
Attr TypeRef = "pwrs:Type-$String80"
EndBody
EndObject
EndObject
EndObject
EndSObject
!
! Proview Open Source Process Control.
! Copyright (C) 2005-2014 SSAB EMEA AB.
!
! This file is part of Proview.
!
! 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 Proview. If not, see <http://www.gnu.org/licenses/>
!
! Linking Proview statically or dynamically with other modules is
! making a combined work based on Proview. Thus, the terms and
! conditions of the GNU General Public License cover the whole
! combination.
!
! In addition, as a special exception, the copyright holders of
! Proview give you permission to, from the build function in the
! Proview Configurator, combine Proview with modules generated by the
! Proview PLC Editor to a PLC program, regardless of the license
! terms of these modules. You may copy and distribute the resulting
! combined work under the terms of your choice, provided that every
! copy of the combined work is accompanied by a complete copy of
! the source code of Proview (the version used to produce the
! combined work), being distributed under the terms of the GNU
! General Public License plus this exception.
!
! pwrb_c_buildconfig.wb_load -- Defines the class BuildConfig.
!
SObject pwrb:Class
!/**
! @Version 1.0
! @Group ProjectConfig
! @Summary Build configuration root object.
! The BuildConfig is the root object for the build configuration.
!
! @b See also
! @classlink BuildDirectory pwrb_builddirectory.html
! @classlink BuildCopy pwrb_buildcopy.html
! @classlink BuildExecute pwrb_buildexecute.html
!*/
Object BuildConfig $ClassDef 630
Body SysBody
Attr Editor = pwr_eEditor_AttrEd
Attr Method = pwr_eMethod_RtAndDevBodies
Attr Flags |= pwr_mClassDef_TopObject
EndBody
Object DevBody $ObjBodyDef 2
!/**
! Optional description.
!*/
Object Description $Attribute 1
Body SysBody
Attr TypeRef = "pwrs:Type-$String80"
EndBody
EndObject
EndObject
EndObject
EndSObject
!
! Proview Open Source Process Control.
! Copyright (C) 2005-2014 SSAB EMEA AB.
!
! This file is part of Proview.
!
! 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 Proview. If not, see <http://www.gnu.org/licenses/>
!
! Linking Proview statically or dynamically with other modules is
! making a combined work based on Proview. Thus, the terms and
! conditions of the GNU General Public License cover the whole
! combination.
!
! In addition, as a special exception, the copyright holders of
! Proview give you permission to, from the build function in the
! Proview Configurator, combine Proview with modules generated by the
! Proview PLC Editor to a PLC program, regardless of the license
! terms of these modules. You may copy and distribute the resulting
! combined work under the terms of your choice, provided that every
! copy of the combined work is accompanied by a complete copy of
! the source code of Proview (the version used to produce the
! combined work), being distributed under the terms of the GNU
! General Public License plus this exception.
!
! pwrb_c_buildcopy.wb_load -- Defines the class BuildCopy.
!
SObject pwrb:Class
!/**
! @Version 1.0
! @Group ProjectConfiguration
! @Summary Configures export of applications.
! The ApplExport object configures export of files to other projects.
!
! One ApplExport object causes one or several files (with wildcard
! specification) to be copied from a directory in the src tree to the
! bld tree.
!
! The object reside in the project volume beneath an BuildDirectory object.
!
! The distribution is carried out when Build Project in the configurator menu
! is activated.
!
! @b See also
! @classlink BuildConfig pwrb_buildconfig.html
! @classlink BuildDirectory pwrb_builddirectory.html
! @classlink BuildExecute pwrb_buildexecute.html
!*/
Object BuildCopy $ClassDef 628
Body SysBody
Attr Editor = pwr_eEditor_AttrEd
Attr Method = pwr_eMethod_RtAndDevBodies
EndBody
Object DevBody $ObjBodyDef 2
!/**
! @Summary Source file specification.
! Source file specification.
! The asterisk (*) wild card character can be used in the file
! specification.
!
! Example
! $pwrp_load/*.flw
!*/
Object Source $Attribute 1
Body SysBody
Attr TypeRef = "pwrs:Type-$String80"
EndBody
EndObject
!/**
! Target file specification.
! Only the path need to be specified.
!*/
Object Target $Attribute 2
Body SysBody
Attr TypeRef = "pwrs:Type-$String80"
EndBody
EndObject
EndObject
EndObject
EndSObject
!
! Proview Open Source Process Control.
! Copyright (C) 2005-2014 SSAB EMEA AB.
!
! This file is part of Proview.
!
! 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 Proview. If not, see <http://www.gnu.org/licenses/>
!
! Linking Proview statically or dynamically with other modules is
! making a combined work based on Proview. Thus, the terms and
! conditions of the GNU General Public License cover the whole
! combination.
!
! In addition, as a special exception, the copyright holders of
! Proview give you permission to, from the build function in the
! Proview Configurator, combine Proview with modules generated by the
! Proview PLC Editor to a PLC program, regardless of the license
! terms of these modules. You may copy and distribute the resulting
! combined work under the terms of your choice, provided that every
! copy of the combined work is accompanied by a complete copy of
! the source code of Proview (the version used to produce the
! combined work), being distributed under the terms of the GNU
! General Public License plus this exception.
!
! pwrb_c_builddirectory.wb_load -- Defines the class BuildDirectory.
!
SObject pwrb:Class
!/**
! @Version 1.0
! @Group ProjectConfiguration
! @Summary Configures build of a directory.
! The BuildDirectory object configures build of a directory.
!
! @b See also
! @classlink BuildConfig pwrb_buildconfig.html
! @classlink BuildCopy pwrb_buildcopy.html
! @classlink BuildExecute pwrb_buildexecute.html
!*/
Object BuildDirectory $ClassDef 627
Body SysBody
Attr Editor = pwr_eEditor_AttrEd
Attr Method = pwr_eMethod_RtAndDevBodies
EndBody
Object DevBody $ObjBodyDef 2
!/**
! Optional description.
!*/
Object Description $Attribute 1
Body SysBody
Attr TypeRef = "pwrs:Type-$String80"
EndBody
EndObject
!/**
! Directory specification.
!
! Example
! $pwrp_pop
!*/
Object Directory $Attribute 2
Body SysBody
Attr TypeRef = "pwrs:Type-$String256"
EndBody
EndObject
EndObject
EndObject
EndSObject
!
! Proview Open Source Process Control.
! Copyright (C) 2005-2014 SSAB EMEA AB.
!
! This file is part of Proview.
!
! 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 Proview. If not, see <http://www.gnu.org/licenses/>
!
! Linking Proview statically or dynamically with other modules is
! making a combined work based on Proview. Thus, the terms and
! conditions of the GNU General Public License cover the whole
! combination.
!
! In addition, as a special exception, the copyright holders of
! Proview give you permission to, from the build function in the
! Proview Configurator, combine Proview with modules generated by the
! Proview PLC Editor to a PLC program, regardless of the license
! terms of these modules. You may copy and distribute the resulting
! combined work under the terms of your choice, provided that every
! copy of the combined work is accompanied by a complete copy of
! the source code of Proview (the version used to produce the
! combined work), being distributed under the terms of the GNU
! General Public License plus this exception.
!
! pwrb_c_buildexecute.wb_load -- Defines the class BuildExecute.
!
SObject pwrb:Class
!/**
! @Version 1.0
! @Group ProjectConfiguration
! @Summary Configures build actions with shell commands.
! The ApplExport object configures build actions performed with shell commands,
! for example executing make files or shell scripts.
!
! The object reside in the project volume beneath an BuildDirectory object.
!
! The distribution is carried out when Build Project in the configurator men
! is activated.
!
! @b See also
! @classlink BuildConfig pwrb_buildconfig.html
! @classlink BuildDirectory pwrb_builddirectory.html
! @classlink BuildCopy pwrb_buildcopy.html
!*/
Object BuildExecute $ClassDef 629
Body SysBody
Attr Editor = pwr_eEditor_AttrEd
Attr Method = pwr_eMethod_RtAndDevBodies
EndBody
Object DevBody $ObjBodyDef 2
!/**
! Shell command that is executed when the directory is built.
!
! Example
! make
!*/
Object Command $Attribute 1
Body SysBody
Attr TypeRef = "pwrs:Type-$String80"
EndBody
EndObject
EndObject
EndObject
EndSObject
!
! Proview Open Source Process Control.
! Copyright (C) 2005-2014 SSAB EMEA AB.
!
! This file is part of Proview.
!
! 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 Proview. If not, see <http://www.gnu.org/licenses/>
!
! Linking Proview statically or dynamically with other modules is
! making a combined work based on Proview. Thus, the terms and
! conditions of the GNU General Public License cover the whole
! combination.
!
! In addition, as a special exception, the copyright holders of
! Proview give you permission to, from the build function in the
! Proview Configurator, combine Proview with modules generated by the
! Proview PLC Editor to a PLC program, regardless of the license
! terms of these modules. You may copy and distribute the resulting
! combined work under the terms of your choice, provided that every
! copy of the combined work is accompanied by a complete copy of
! the source code of Proview (the version used to produce the
! combined work), being distributed under the terms of the GNU
! General Public License plus this exception.
!
! pwrb_c_export.wb_load -- Defines the class Export.
!
SObject pwrb:Class
!/**
! @Version 1.0
! @Group ProjectConfiguration
! @Summary Configures export of files to other projects.
! The Export object configures export of files from the
! project to other projects in the development environment.
!
! The object reside in the project volume beneath a NodeConfig object.
!
! The collected files are specified in the Components attribute, which is
! a bitmask.
!
! Description of the bits in Compontents:
!
! @b LoadFiles
! Loadfiles are included, i.e.
! - loadfiles for volumes configured with RootVolumeLoad, SubVolumeLoad
! and ClassVolumeLoad objects, and volumes referenced by these volumes,
! - rtt crossreference files.
! @b GraphFiles
! All Ge graph files $pwrp_exe/*.pwg are included.
! @b FlowFiles
! The plc trace files $pwrp_load/*.flw are included.
!
! Other files can be included with an ApplExport object.
!
! @b See also
! @classlink ApplExport pwrb_applexport.html
!*/
Object Export $ClassDef 623
Body SysBody
Attr Editor = pwr_eEditor_AttrEd
Attr Method = pwr_eMethod_RtAndDevBodies
EndBody
Object DevBody $ObjBodyDef 2
!/**
! Optional description.
!*/
Object Description $Attribute 1
Body SysBody
Attr TypeRef = "pwrs:Type-$String80"
EndBody
EndObject
!/**
! Export directory.
! The files specified for export are copied to a directory
! from where they can be imported by other projects.
!*/
Object TargetDirectory $Attribute 2
Body SysBody
Attr TypeRef = "pwrs:Type-$String256"
EndBody
EndObject
!/**
! @Summary Specification of components included in the export.
! Specification of components that are included in the export.
!*/
Object Components $Attribute 3
Body SysBody
Attr TypeRef = "pwrb:Type-ExportImportMask"
EndBody
EndObject
EndObject
Object Template Export
Body DevBody
Attr TargetDirectory = "/usr/local/pwrp/common"
Attr Components = 15
EndBody
EndObject
EndObject
EndSObject
!
! Proview Open Source Process Control.
! Copyright (C) 2005-2014 SSAB EMEA AB.
!
! This file is part of Proview.
!
! 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 Proview. If not, see <http://www.gnu.org/licenses/>
!
! Linking Proview statically or dynamically with other modules is
! making a combined work based on Proview. Thus, the terms and
! conditions of the GNU General Public License cover the whole
! combination.
!
! In addition, as a special exception, the copyright holders of
! Proview give you permission to, from the build function in the
! Proview Configurator, combine Proview with modules generated by the
! Proview PLC Editor to a PLC program, regardless of the license
! terms of these modules. You may copy and distribute the resulting
! combined work under the terms of your choice, provided that every
! copy of the combined work is accompanied by a complete copy of
! the source code of Proview (the version used to produce the
! combined work), being distributed under the terms of the GNU
! General Public License plus this exception.
!
! pwrb_c_import.wb_load -- Defines the class Import.
!
SObject pwrb:Class
!/**
! @Version 1.0
! @Group ProjectConfiguration
! @Summary Configures import of files from other projects.
! The Import object configures import of files from the
! project from other projects in the development environment.
!
! The object reside in the project volume beneath the $System object.
!
! The collected files are specified in the Components attribute, which is
! a bitmask.
!
! Description of the bits in Compontents:
!
! @b LoadFiles
! Loadfiles are included, i.e.
! - loadfiles for volumes configured with RootVolumeLoad, SubVolumeLoad
! and ClassVolumeLoad objects, and volumes referenced by these volumes,
! - rtt crossreference files.
! @b GraphFiles
! All Ge graph files $pwrp_exe/*.pwg are included.
! @b FlowFiles
! The plc trace files $pwrp_load/*.flw are included.
!
! Other files can be included with an ApplImport object.
!
! @b See also
! @classlink ApplImport pwrb_applimport.html
!*/
Object Import $ClassDef 625
Body SysBody
Attr Editor = pwr_eEditor_AttrEd
Attr Method = pwr_eMethod_RtAndDevBodies
EndBody
Object DevBody $ObjBodyDef 2
!/**
! Optional description.
!*/
Object Description $Attribute 1
Body SysBody
Attr TypeRef = "pwrs:Type-$String80"
EndBody
EndObject
!/**
! Import directory.
! Directory from which files should be imported.
!*/
Object SourceDirectory $Attribute 2
Body SysBody
Attr TypeRef = "pwrs:Type-$String256"
EndBody
EndObject
!/**
! @Summary Specification of components included in the import.
! Specification of components that are included in the import.
!*/
Object Components $Attribute 3
Body SysBody
Attr TypeRef = "pwrb:Type-ExportImportMask"
EndBody
EndObject
EndObject
Object Template Import
Body DevBody
Attr SourceDirectory = "/usr/local/pwrp/common"
Attr Components = 15
EndBody
EndObject
EndObject
EndSObject
!
! Proview Open Source Process Control.
! Copyright (C) 2005-2014 SSAB EMEA AB.
!
! This file is part of Proview.
!
! 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 Proview. If not, see <http://www.gnu.org/licenses/>
!
! Linking Proview statically or dynamically with other modules is
! making a combined work based on Proview. Thus, the terms and
! conditions of the GNU General Public License cover the whole
! combination.
!
! In addition, as a special exception, the copyright holders of
! Proview give you permission to, from the build function in the
! Proview Configurator, combine Proview with modules generated by the
! Proview PLC Editor to a PLC program, regardless of the license
! terms of these modules. You may copy and distribute the resulting
! combined work under the terms of your choice, provided that every
! copy of the combined work is accompanied by a complete copy of
! the source code of Proview (the version used to produce the
! combined work), being distributed under the terms of the GNU
! General Public License plus this exception.
!
! pwrb_td_exportimportmask.wb_load -- Defines the mask type ExportImportMask
!
SObject pwrb:Type
!/**
! @Version 1.0
! @Group Types
! Defines mask for export and import.
!*/
Object ExportImportMask $TypeDef 76
Body SysBody
Attr TypeRef = "pwrs:Type-$Mask"
Attr PgmName = "ExportImportMask"
EndBody
!/**
! Loadfiles are included, i.e.
! - loadfiles for volumes configured with RootVolumeLoad, SubVolumeLoad
! and ClassVolumeLoad objects, and volumes referenced by these volumes,
! - rtt crossreference files.
!*/
Object LoadFiles $Bit
Body SysBody
Attr PgmName = "LoadFiles"
Attr Text = "LoadFiles"
Attr Value = 1
EndBody
EndObject
!/**
! All includefiles in $pwrp_inc are exported or imported.
!*/
Object IncludeFiles $Bit
Body SysBody
Attr PgmName = "IncludeFiles"
Attr Text = "IncludeFiles"
Attr Value = 2
EndBody
EndObject
!/**
! All Ge graph files $pwrp_exe/*.pwg are exported or imported.
!*/
Object GraphFiles $Bit
Body SysBody
Attr PgmName = "GraphFiles"
Attr Text = "GraphFiles"
Attr Value = 4
EndBody
EndObject
!/**
! The plc trace files $pwrp_load/*.flw are exported or imported.
!*/
Object FlowFiles $Bit
Body SysBody
Attr PgmName = "FlowFiles"
Attr Text = "FlowFiles"
Attr Value = 8
EndBody
EndObject
EndObject
EndSObject
...@@ -602,6 +602,7 @@ topobjects ProjectNavigatorW2 ...@@ -602,6 +602,7 @@ topobjects ProjectNavigatorW2
class FriendNodeConfig class FriendNodeConfig
class SevNodeConfig class SevNodeConfig
class BusConfig class BusConfig
class BuildConfig
} }
palette ProjectNavigatorPalette palette ProjectNavigatorPalette
...@@ -639,6 +640,20 @@ palette ProjectNavigatorPalette ...@@ -639,6 +640,20 @@ palette ProjectNavigatorPalette
class SharedVolumeLoad class SharedVolumeLoad
class SubVolumeLoad class SubVolumeLoad
class $System class $System
menu Build
{
class BuildConfig
class BuildDirectory
class BuildCopy
class BuildExecute
}
menu Export/Import
{
class ApplExport
class ApplImport
class Export
class Import
}
} }
} }
......
/**
* Proview Open Source Process Control.
* Copyright (C) 2005-2014 SSAB EMEA AB.
*
* This file is part of Proview.
*
* 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 Proview. If not, see <http://www.gnu.org/licenses/>
*
* Linking Proview statically or dynamically with other modules is
* making a combined work based on Proview. Thus, the terms and
* conditions of the GNU General Public License cover the whole
* combination.
*
* In addition, as a special exception, the copyright holders of
* Proview give you permission to, from the build function in the
* Proview Configurator, combine Proview with modules generated by the
* Proview PLC Editor to a PLC program, regardless of the license
* terms of these modules. You may copy and distribute the resulting
* combined work under the terms of your choice, provided that every
* copy of the combined work is accompanied by a complete copy of
* the source code of Proview (the version used to produce the
* combined work), being distributed under the terms of the GNU
* General Public License plus this exception.
**/
/* wb_expw_gtk.cpp -- Backupfile display window */
#include "glow_std.h"
#include <stdio.h>
#include <stdlib.h>
#include <gtk/gtk.h>
#include "co_cdh.h"
#include "co_time.h"
#include "co_dcli.h"
#include "co_lng.h"
#include "cow_xhelp.h"
#include "wb_ldh.h"
#include "wb_expw_gtk.h"
#include "wb_expwnav_gtk.h"
#include "cow_wow_gtk.h"
static gint delete_event( GtkWidget *w, GdkEvent *event, gpointer expw)
{
WbExpWGtk::activate_exit(w, expw);
return TRUE;
}
static void destroy_event( GtkWidget *w, gpointer data)
{
}
WbExpWGtk::WbExpWGtk (
void *expw_parent_ctx,
GtkWidget *expw_parent_wid,
ldh_tSession expw_ldhses,
const char *expw_name,
int l_type,
int l_editmode,
pwr_tStatus *status) :
WbExpW( expw_parent_ctx, expw_ldhses, expw_name, l_type, l_editmode, status), parent_wid(expw_parent_wid)
{
const int window_width = 1100;
const int window_height = 600;
toplevel = (GtkWidget *) g_object_new( GTK_TYPE_WINDOW,
"default-height", window_height,
"default-width", window_width,
"title", expw_name,
NULL);
g_signal_connect( toplevel, "delete_event", G_CALLBACK(delete_event), this);
g_signal_connect( toplevel, "destroy", G_CALLBACK(destroy_event), this);
g_signal_connect( toplevel, "focus-in-event", G_CALLBACK(WbExpWGtk::action_inputfocus), this);
CoWowGtk::SetWindowIcon( toplevel);
GtkAccelGroup *accel_g = (GtkAccelGroup *) g_object_new(GTK_TYPE_ACCEL_GROUP, NULL);
gtk_window_add_accel_group(GTK_WINDOW(toplevel), accel_g);
GtkMenuBar *menu_bar = (GtkMenuBar *) g_object_new(GTK_TYPE_MENU_BAR, NULL);
// File Entry
GtkWidget *file_close = gtk_image_menu_item_new_from_stock(GTK_STOCK_CLOSE, accel_g);
g_signal_connect(file_close, "activate", G_CALLBACK(WbExpWGtk::activate_exit), this);
file_export = gtk_menu_item_new_with_mnemonic( btext);
g_signal_connect(file_export, "activate", G_CALLBACK(WbExpWGtk::activate_export), this);
GtkMenu *file_menu = (GtkMenu *) g_object_new( GTK_TYPE_MENU, NULL);
gtk_menu_shell_append(GTK_MENU_SHELL(file_menu), file_export);
GtkWidget *file = gtk_menu_item_new_with_mnemonic("_File");
gtk_menu_shell_append(GTK_MENU_SHELL(menu_bar), file);
gtk_menu_item_set_submenu(GTK_MENU_ITEM(file), GTK_WIDGET(file_menu));
// Edit menu
GtkWidget *edit_update = gtk_menu_item_new_with_mnemonic( "_Update");
g_signal_connect(edit_update, "activate", G_CALLBACK(WbExpWGtk::activate_update), this);
gtk_widget_add_accelerator( edit_update, "activate", accel_g,
'u', GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);
edit_check_all = gtk_menu_item_new_with_mnemonic( "_Check all");
g_signal_connect(edit_check_all, "activate", G_CALLBACK(WbExpWGtk::activate_check_all), this);
edit_check_clear = gtk_menu_item_new_with_mnemonic( "C_heck clear");
g_signal_connect(edit_check_clear, "activate", G_CALLBACK(WbExpWGtk::activate_check_clear), this);
edit_check_reset = gtk_menu_item_new_with_mnemonic( "Check _reset");
g_signal_connect(edit_check_reset, "activate", G_CALLBACK(WbExpWGtk::activate_check_reset), this);
edit_show_all = gtk_check_menu_item_new_with_mnemonic( "_Show all");
g_signal_connect( edit_show_all, "activate",
G_CALLBACK(activate_show_all), this);
gtk_widget_add_accelerator( edit_show_all, "activate", accel_g,
'a', GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);
GtkMenu *edit_menu = (GtkMenu *) g_object_new( GTK_TYPE_MENU, NULL);
gtk_menu_shell_append(GTK_MENU_SHELL(edit_menu), edit_update);
gtk_menu_shell_append(GTK_MENU_SHELL(edit_menu), edit_check_all);
gtk_menu_shell_append(GTK_MENU_SHELL(edit_menu), edit_check_clear);
gtk_menu_shell_append(GTK_MENU_SHELL(edit_menu), edit_check_reset);
gtk_menu_shell_append(GTK_MENU_SHELL(edit_menu), edit_show_all);
GtkWidget *edit = gtk_menu_item_new_with_mnemonic("_Edit");
gtk_menu_shell_append(GTK_MENU_SHELL(menu_bar), edit);
gtk_menu_item_set_submenu(GTK_MENU_ITEM(edit), GTK_WIDGET(edit_menu));
// View menu
GtkWidget *view_zoom_in = gtk_image_menu_item_new_from_stock(GTK_STOCK_ZOOM_IN, NULL);
g_signal_connect(view_zoom_in, "activate", G_CALLBACK(WbExpWGtk::activate_zoom_in), this);
gtk_widget_add_accelerator( view_zoom_in, "activate", accel_g,
'i', GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);
GtkWidget *view_zoom_out = gtk_image_menu_item_new_from_stock(GTK_STOCK_ZOOM_OUT, NULL);
g_signal_connect(view_zoom_out, "activate", G_CALLBACK(WbExpWGtk::activate_zoom_out), this);
gtk_widget_add_accelerator( view_zoom_out, "activate", accel_g,
'o', GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);
GtkWidget *view_zoom_reset = gtk_image_menu_item_new_from_stock(GTK_STOCK_ZOOM_100, NULL);
g_signal_connect(view_zoom_reset, "activate", G_CALLBACK(WbExpWGtk::activate_zoom_reset), this);
GtkMenu *view_menu = (GtkMenu *) g_object_new( GTK_TYPE_MENU, NULL);
gtk_menu_shell_append(GTK_MENU_SHELL(view_menu), view_zoom_in);
gtk_menu_shell_append(GTK_MENU_SHELL(view_menu), view_zoom_out);
gtk_menu_shell_append(GTK_MENU_SHELL(view_menu), view_zoom_reset);
GtkWidget *view = gtk_menu_item_new_with_mnemonic("_View");
gtk_menu_shell_append(GTK_MENU_SHELL(menu_bar), view);
gtk_menu_item_set_submenu(GTK_MENU_ITEM(view), GTK_WIDGET(view_menu));
// Toolbar
GtkToolbar *tools = (GtkToolbar *) g_object_new(GTK_TYPE_TOOLBAR, NULL);
pwr_tFileName fname;
GtkWidget *tools_export = gtk_button_new();
dcli_translate_filename( fname, "$pwr_exe/wb_export.png");
gtk_container_add( GTK_CONTAINER(tools_export),
gtk_image_new_from_file( fname));
g_signal_connect(tools_export, "clicked", G_CALLBACK(activate_export), this);
g_object_set( tools_export, "can-focus", FALSE, NULL);
gtk_toolbar_append_widget( tools, tools_export, action, "");
GtkWidget *tools_zoom_in = gtk_button_new();
dcli_translate_filename( fname, "$pwr_exe/xtt_zoom_in.png");
gtk_container_add( GTK_CONTAINER(tools_zoom_in),
gtk_image_new_from_file( fname));
g_signal_connect(tools_zoom_in, "clicked", G_CALLBACK(activate_zoom_in), this);
g_object_set( tools_zoom_in, "can-focus", FALSE, NULL);
gtk_toolbar_append_widget( tools, tools_zoom_in, "Zoom in", "");
GtkWidget *tools_zoom_out = gtk_button_new();
dcli_translate_filename( fname, "$pwr_exe/xtt_zoom_out.png");
gtk_container_add( GTK_CONTAINER(tools_zoom_out),
gtk_image_new_from_file( fname));
g_signal_connect(tools_zoom_out, "clicked", G_CALLBACK(activate_zoom_out), this);
g_object_set( tools_zoom_out, "can-focus", FALSE, NULL);
gtk_toolbar_append_widget( tools, tools_zoom_out, "Zoom out", "");
GtkWidget *tools_zoom_reset = gtk_button_new();
dcli_translate_filename( fname, "$pwr_exe/xtt_zoom_reset.png");
gtk_container_add( GTK_CONTAINER(tools_zoom_reset),
gtk_image_new_from_file( fname));
g_signal_connect(tools_zoom_reset, "clicked", G_CALLBACK(activate_zoom_reset), this);
g_object_set( tools_zoom_reset, "can-focus", FALSE, NULL);
gtk_toolbar_append_widget( tools, tools_zoom_reset, "Zoom reset", "");
form = gtk_vbox_new( FALSE, 0);
// Create expwnav
expwnav = new WbExpWNavGtk( this, form, expw_ldhses, l_type, l_editmode, &nav_widget);
gtk_box_pack_start( GTK_BOX(form), GTK_WIDGET(menu_bar), FALSE, FALSE, 0);
gtk_box_pack_start( GTK_BOX(form), GTK_WIDGET(tools), FALSE, FALSE, 0);
gtk_box_pack_start( GTK_BOX(form), GTK_WIDGET(nav_widget), TRUE, TRUE, 0);
gtk_container_add( GTK_CONTAINER(toplevel), form);
gtk_widget_show_all( toplevel);
wow = new CoWowGtk( toplevel);
show();
// expwnav->check_all();
}
//
// Delete window
//
WbExpWGtk::~WbExpWGtk()
{
if ( expwnav)
delete expwnav;
if ( toplevel)
gtk_widget_destroy( toplevel);
}
void WbExpWGtk::print()
{
pwr_tStatus sts;
CoWowGtk::CreateBrowPrintDialogGtk( name, expwnav->brow->ctx, flow_eOrientation_Portrait, 1.0,
(void *)toplevel, &sts);
}
gboolean WbExpWGtk::action_inputfocus( GtkWidget *w, GdkEvent *event, gpointer data)
{
WbExpWGtk *expw = (WbExpWGtk *)data;
if ( expw) {
if ( expw->focustimer.disabled())
return FALSE;
expw->expwnav->set_input_focus();
expw->focustimer.disable( 400);
}
return FALSE;
}
void WbExpWGtk::set_title( char *title)
{
char *titleutf8 = g_convert( title, -1, "UTF-8", "ISO8859-1", NULL, NULL, NULL);
gtk_window_set_title( GTK_WINDOW(toplevel), titleutf8);
g_free( titleutf8);
}
void WbExpWGtk::activate_exit( GtkWidget *w, gpointer data)
{
WbExpWGtk *expw = (WbExpWGtk *)data;
delete expw;
}
void WbExpWGtk::activate_export( GtkWidget *w, gpointer data)
{
WbExpW *expw = (WbExpW *)data;
expw->activate_export();
}
void WbExpWGtk::activate_update( GtkWidget *w, gpointer data)
{
WbExpW *expw = (WbExpW *)data;
expw->activate_update();
}
void WbExpWGtk::activate_check_all( GtkWidget *w, gpointer data)
{
WbExpW *expw = (WbExpW *)data;
expw->activate_check_all();
}
void WbExpWGtk::activate_check_clear( GtkWidget *w, gpointer data)
{
WbExpW *expw = (WbExpW *)data;
expw->activate_check_clear();
}
void WbExpWGtk::activate_check_reset( GtkWidget *w, gpointer data)
{
WbExpW *expw = (WbExpW *)data;
expw->activate_check_reset();
}
void WbExpWGtk::activate_show_all(GtkWidget *w, gpointer data)
{
WbExpW *expw = (WbExpW *)data;
int set = (int) gtk_check_menu_item_get_active( GTK_CHECK_MENU_ITEM( ((WbExpWGtk *)expw)->edit_show_all));
expw->expwnav->set_show_all(set);
}
void WbExpWGtk::activate_zoom_in( GtkWidget *w, gpointer data)
{
WbExpW *expw = (WbExpW *)data;
expw->expwnav->zoom( 1.2);
}
void WbExpWGtk::activate_zoom_out( GtkWidget *w, gpointer data)
{
WbExpW *expw = (WbExpW *)data;
expw->expwnav->zoom( 5.0/6);
}
void WbExpWGtk::activate_zoom_reset( GtkWidget *w, gpointer data)
{
WbExpW *expw = (WbExpW *)data;
expw->expwnav->unzoom();
}
void WbExpWGtk::activate_help( GtkWidget *w, gpointer data)
{
CoXHelp::dhelp( "messagewindow_refman", 0, navh_eHelpFile_Other, "$pwr_lang/man_dg.dat",
true);
}
/**
* Proview Open Source Process Control.
* Copyright (C) 2005-2014 SSAB EMEA AB.
*
* This file is part of Proview.
*
* 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 Proview. If not, see <http://www.gnu.org/licenses/>
*
* Linking Proview statically or dynamically with other modules is
* making a combined work based on Proview. Thus, the terms and
* conditions of the GNU General Public License cover the whole
* combination.
*
* In addition, as a special exception, the copyright holders of
* Proview give you permission to, from the build function in the
* Proview Configurator, combine Proview with modules generated by the
* Proview PLC Editor to a PLC program, regardless of the license
* terms of these modules. You may copy and distribute the resulting
* combined work under the terms of your choice, provided that every
* copy of the combined work is accompanied by a complete copy of
* the source code of Proview (the version used to produce the
* combined work), being distributed under the terms of the GNU
* General Public License plus this exception.
**/
#ifndef wb_expw_gtk_h
#define wb_expw_gtk_h
/* wb_expw_gtk.h -- Backupfile display window */
#ifndef wb_expw_h
# include "wb_expw.h"
#endif
#ifndef cow_wow_gtk_h
# include "cow_wow_gtk.h"
#endif
#include <gtk/gtk.h>
class WbExpWGtk : public WbExpW {
public:
WbExpWGtk(
void *l_parent_ctx,
GtkWidget *l_parent_wid,
ldh_tSession l_ldhses,
const char *l_name,
int type,
int l_editmode,
pwr_tStatus *status);
~WbExpWGtk();
GtkWidget *parent_wid;
GtkWidget *toplevel;
GtkWidget *form;
GtkWidget *nav_widget;
GtkWidget *edit_check_all;
GtkWidget *edit_check_clear;
GtkWidget *edit_check_reset;
GtkWidget *edit_show_all;
GtkWidget *file_export;
CoWowFocusTimerGtk focustimer;
CoWowFocusTimerGtk maptimer;
void print();
void set_title( char *title);
static gboolean action_inputfocus( GtkWidget *w, GdkEvent *event, gpointer data);
static void activate_exit( GtkWidget *w, gpointer data);
static void activate_export( GtkWidget *w, gpointer data);
static void activate_update( GtkWidget *w, gpointer data);
static void activate_check_all( GtkWidget *w, gpointer data);
static void activate_check_clear( GtkWidget *w, gpointer data);
static void activate_check_reset( GtkWidget *w, gpointer data);
static void activate_show_all(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);
};
#endif
/**
* Proview Open Source Process Control.
* Copyright (C) 2005-2014 SSAB EMEA AB.
*
* This file is part of Proview.
*
* 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 Proview. If not, see <http://www.gnu.org/licenses/>
*
* Linking Proview statically or dynamically with other modules is
* making a combined work based on Proview. Thus, the terms and
* conditions of the GNU General Public License cover the whole
* combination.
*
* In addition, as a special exception, the copyright holders of
* Proview give you permission to, from the build function in the
* Proview Configurator, combine Proview with modules generated by the
* Proview PLC Editor to a PLC program, regardless of the license
* terms of these modules. You may copy and distribute the resulting
* combined work under the terms of your choice, provided that every
* copy of the combined work is accompanied by a complete copy of
* the source code of Proview (the version used to produce the
* combined work), being distributed under the terms of the GNU
* General Public License plus this exception.
**/
/* wb_expwnav_gtk.cpp -- Backupfile display window */
#include "glow_std.h"
#include <stdio.h>
#include <stdlib.h>
#include <gtk/gtk.h>
#include "co_cdh.h"
#include "co_time.h"
#include "co_dcli.h"
#include "flow.h"
#include "flow_browctx.h"
#include "flow_browapi.h"
#include "flow_browwidget_gtk.h"
#include "wb_ldh.h"
#include "wb_expwnav_gtk.h"
WbExpWNavGtk::WbExpWNavGtk (
void *l_parent_ctx,
GtkWidget *l_parent_wid,
ldh_tSession l_ldhses,
int l_type,
int l_editmode,
GtkWidget **w) :
WbExpWNav( l_parent_ctx, l_ldhses, l_type, l_editmode), parent_wid(l_parent_wid)
{
form_widget = scrolledbrowwidgetgtk_new(
WbExpWNav::init_brow_cb, this, &brow_widget);
gtk_widget_show_all( brow_widget);
// Create the root item
*w = form_widget;
}
//
// Delete ev
//
WbExpWNavGtk::~WbExpWNavGtk()
{
delete brow;
gtk_widget_destroy( form_widget);
}
void WbExpWNavGtk::set_input_focus()
{
gtk_widget_grab_focus( brow_widget);
}
/**
* Proview Open Source Process Control.
* Copyright (C) 2005-2014 SSAB EMEA AB.
*
* This file is part of Proview.
*
* 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 Proview. If not, see <http://www.gnu.org/licenses/>
*
* Linking Proview statically or dynamically with other modules is
* making a combined work based on Proview. Thus, the terms and
* conditions of the GNU General Public License cover the whole
* combination.
*
* In addition, as a special exception, the copyright holders of
* Proview give you permission to, from the build function in the
* Proview Configurator, combine Proview with modules generated by the
* Proview PLC Editor to a PLC program, regardless of the license
* terms of these modules. You may copy and distribute the resulting
* combined work under the terms of your choice, provided that every
* copy of the combined work is accompanied by a complete copy of
* the source code of Proview (the version used to produce the
* combined work), being distributed under the terms of the GNU
* General Public License plus this exception.
**/
#ifndef wb_expwnav_gtk_h
#define wb_expwnav_gtk_h
/* wb_expwnav_gtk.h -- Backup display window */
#ifndef wb_expwnav_h
# include "wb_expwnav.h"
#endif
class WbExpWNavGtk : public WbExpWNav {
public:
WbExpWNavGtk(
void *expw_parent_ctx,
GtkWidget *expw_parent_wid,
ldh_tSession expw_ldhses,
int l_type,
int l_editmode,
GtkWidget **w);
~WbExpWNavGtk();
GtkWidget *parent_wid;
GtkWidget *brow_widget;
GtkWidget *form_widget;
GtkWidget *toplevel;
void set_input_focus();
};
#endif
...@@ -72,6 +72,7 @@ extern "C" { ...@@ -72,6 +72,7 @@ extern "C" {
#include "wb_utl_gtk.h" #include "wb_utl_gtk.h"
#include "wb_xcrr_gtk.h" #include "wb_xcrr_gtk.h"
#include "wb_bckw_gtk.h" #include "wb_bckw_gtk.h"
#include "wb_expw_gtk.h"
#define max(Dragon,Eagle) ((Dragon) > (Eagle) ? (Dragon) : (Eagle)) #define max(Dragon,Eagle) ((Dragon) > (Eagle) ? (Dragon) : (Eagle))
#define min(Dragon,Eagle) ((Dragon) < (Eagle) ? (Dragon) : (Eagle)) #define min(Dragon,Eagle) ((Dragon) < (Eagle) ? (Dragon) : (Eagle))
...@@ -476,65 +477,20 @@ WbBckW *WNavGtk::bckw_new( char *name, wb_bck_list *list, pwr_tStatus *status) ...@@ -476,65 +477,20 @@ WbBckW *WNavGtk::bckw_new( char *name, wb_bck_list *list, pwr_tStatus *status)
return new WbBckWGtk( this, parent_wid, ldhses, name, list, editmode, status); return new WbBckWGtk( this, parent_wid, ldhses, name, list, editmode, status);
} }
void WNavGtk::wge_subwindow_loop( WGe *wge) WbExpW *WNavGtk::expw_new( char *name, int type, pwr_tStatus *status)
{ {
gtk_main(); return new WbExpWGtk( this, parent_wid, ldhses, name, type, 1, status);
#if 0
XEvent Event;
for (;;) {
XtAppNextEvent( XtWidgetToApplicationContext( parent_wid), &Event);
XtDispatchEvent( &Event);
if ( wge->subwindow_release) {
wge->subwindow_release = 0;
break;
}
}
#endif
} }
void WNavGtk::wge_modal_loop( WGe *wge) void WNavGtk::wge_subwindow_loop( WGe *wge)
{ {
gtk_main(); gtk_main();
#if 0
XEvent Event;
for (;;) {
XtAppNextEvent( XtWidgetToApplicationContext( parent_wid), &Event);
XtDispatchEvent( &Event);
if ( wge->terminated) {
appl.remove( (void *)wge);
delete wge;
break;
}
}
#endif
} }
#if 0 void WNavGtk::wge_modal_loop( WGe *wge)
static char *wnav_dialog_convert_text( char *text)
{ {
char *s, *t; gtk_main();
static char new_text[200];
for ( s = text, t = new_text; *s; s++, t++)
{
if ( *s == '\\' && *(s+1) == 'n')
{
*t = 10;
s++;
}
else
*t = *s;
if ( t > &new_text[sizeof(new_text)-1])
break;
}
*t = *s;
return new_text;
} }
#endif
static void wnav_message_dialog_ok( GtkWidget *w, gint arg1, gpointer wnav) static void wnav_message_dialog_ok( GtkWidget *w, gint arg1, gpointer wnav)
{ {
......
...@@ -97,6 +97,7 @@ class WNavGtk : public WNav { ...@@ -97,6 +97,7 @@ class WNavGtk : public WNav {
void (* bc_success)( void *), void (* bc_cancel)( void *), pwr_tStatus *status); void (* bc_success)( void *), void (* bc_cancel)( void *), pwr_tStatus *status);
WCrr *wcrr_new( pwr_tAttrRef *aref, pwr_tStatus *status); WCrr *wcrr_new( pwr_tAttrRef *aref, pwr_tStatus *status);
WbBckW *bckw_new( char *name, wb_bck_list *list, pwr_tStatus *status); WbBckW *bckw_new( char *name, wb_bck_list *list, pwr_tStatus *status);
WbExpW *expw_new( char *name, int type, pwr_tStatus *status);
static void trace_scan( WNavGtk *wnav); static void trace_scan( WNavGtk *wnav);
static void sel_lose_cb( GtkWidget *w, GdkEventSelection *event, static void sel_lose_cb( GtkWidget *w, GdkEventSelection *event,
......
...@@ -150,6 +150,9 @@ void WttGtk::menu_setup() ...@@ -150,6 +150,9 @@ void WttGtk::menu_setup()
gtk_widget_set_sensitive( menu_buildobject_w, FALSE); gtk_widget_set_sensitive( menu_buildobject_w, FALSE);
gtk_widget_set_sensitive( menu_buildvolume_w, FALSE); gtk_widget_set_sensitive( menu_buildvolume_w, FALSE);
gtk_widget_set_sensitive( menu_buildnode_w, FALSE); gtk_widget_set_sensitive( menu_buildnode_w, FALSE);
gtk_widget_set_sensitive( menu_buildproject_w, FALSE);
gtk_widget_set_sensitive( menu_buildexport_w, FALSE);
gtk_widget_set_sensitive( menu_buildimport_w, FALSE);
gtk_widget_set_sensitive( menu_distribute_w, FALSE); gtk_widget_set_sensitive( menu_distribute_w, FALSE);
gtk_widget_set_sensitive( menu_change_value_w, TRUE); gtk_widget_set_sensitive( menu_change_value_w, TRUE);
gtk_widget_set_sensitive( menu_edit_w, TRUE); gtk_widget_set_sensitive( menu_edit_w, TRUE);
...@@ -181,6 +184,9 @@ void WttGtk::menu_setup() ...@@ -181,6 +184,9 @@ void WttGtk::menu_setup()
gtk_widget_set_sensitive( menu_buildobject_w, FALSE); gtk_widget_set_sensitive( menu_buildobject_w, FALSE);
gtk_widget_set_sensitive( menu_buildvolume_w, FALSE); gtk_widget_set_sensitive( menu_buildvolume_w, FALSE);
gtk_widget_set_sensitive( menu_buildnode_w, TRUE); gtk_widget_set_sensitive( menu_buildnode_w, TRUE);
gtk_widget_set_sensitive( menu_buildproject_w, TRUE);
gtk_widget_set_sensitive( menu_buildexport_w, TRUE);
gtk_widget_set_sensitive( menu_buildimport_w, TRUE);
gtk_widget_set_sensitive( menu_distribute_w, TRUE); gtk_widget_set_sensitive( menu_distribute_w, TRUE);
gtk_widget_set_sensitive( menu_change_value_w, FALSE); gtk_widget_set_sensitive( menu_change_value_w, FALSE);
gtk_widget_set_sensitive( menu_edit_w, TRUE); gtk_widget_set_sensitive( menu_edit_w, TRUE);
...@@ -214,6 +220,9 @@ void WttGtk::menu_setup() ...@@ -214,6 +220,9 @@ void WttGtk::menu_setup()
gtk_widget_set_sensitive( menu_buildobject_w, FALSE); gtk_widget_set_sensitive( menu_buildobject_w, FALSE);
gtk_widget_set_sensitive( menu_buildvolume_w, FALSE); gtk_widget_set_sensitive( menu_buildvolume_w, FALSE);
gtk_widget_set_sensitive( menu_buildnode_w, FALSE); gtk_widget_set_sensitive( menu_buildnode_w, FALSE);
gtk_widget_set_sensitive( menu_buildproject_w, FALSE);
gtk_widget_set_sensitive( menu_buildexport_w, FALSE);
gtk_widget_set_sensitive( menu_buildimport_w, FALSE);
gtk_widget_set_sensitive( menu_distribute_w, FALSE); gtk_widget_set_sensitive( menu_distribute_w, FALSE);
gtk_widget_set_sensitive( menu_change_value_w, TRUE); gtk_widget_set_sensitive( menu_change_value_w, TRUE);
gtk_widget_set_sensitive( menu_edit_w, TRUE); gtk_widget_set_sensitive( menu_edit_w, TRUE);
...@@ -251,6 +260,9 @@ void WttGtk::menu_setup() ...@@ -251,6 +260,9 @@ void WttGtk::menu_setup()
else else
gtk_widget_set_sensitive( menu_buildvolume_w, TRUE); gtk_widget_set_sensitive( menu_buildvolume_w, TRUE);
gtk_widget_set_sensitive( menu_buildnode_w, TRUE); gtk_widget_set_sensitive( menu_buildnode_w, TRUE);
gtk_widget_set_sensitive( menu_buildproject_w, TRUE);
gtk_widget_set_sensitive( menu_buildexport_w, TRUE);
gtk_widget_set_sensitive( menu_buildimport_w, TRUE);
gtk_widget_set_sensitive( menu_distribute_w, TRUE); gtk_widget_set_sensitive( menu_distribute_w, TRUE);
gtk_widget_set_sensitive( menu_change_value_w, FALSE); gtk_widget_set_sensitive( menu_change_value_w, FALSE);
gtk_widget_set_sensitive( menu_edit_w, TRUE); gtk_widget_set_sensitive( menu_edit_w, TRUE);
...@@ -284,6 +296,9 @@ void WttGtk::menu_setup() ...@@ -284,6 +296,9 @@ void WttGtk::menu_setup()
gtk_widget_set_sensitive( menu_buildobject_w, FALSE); gtk_widget_set_sensitive( menu_buildobject_w, FALSE);
gtk_widget_set_sensitive( menu_buildvolume_w, FALSE); gtk_widget_set_sensitive( menu_buildvolume_w, FALSE);
gtk_widget_set_sensitive( menu_buildnode_w, FALSE); gtk_widget_set_sensitive( menu_buildnode_w, FALSE);
gtk_widget_set_sensitive( menu_buildproject_w, FALSE);
gtk_widget_set_sensitive( menu_buildexport_w, FALSE);
gtk_widget_set_sensitive( menu_buildimport_w, FALSE);
gtk_widget_set_sensitive( menu_distribute_w, FALSE); gtk_widget_set_sensitive( menu_distribute_w, FALSE);
gtk_widget_set_sensitive( menu_change_value_w, TRUE); gtk_widget_set_sensitive( menu_change_value_w, TRUE);
gtk_widget_set_sensitive( menu_edit_w, TRUE); gtk_widget_set_sensitive( menu_edit_w, TRUE);
...@@ -315,6 +330,9 @@ void WttGtk::menu_setup() ...@@ -315,6 +330,9 @@ void WttGtk::menu_setup()
gtk_widget_set_sensitive( menu_buildobject_w, FALSE); gtk_widget_set_sensitive( menu_buildobject_w, FALSE);
gtk_widget_set_sensitive( menu_buildvolume_w, TRUE); gtk_widget_set_sensitive( menu_buildvolume_w, TRUE);
gtk_widget_set_sensitive( menu_buildnode_w, TRUE); gtk_widget_set_sensitive( menu_buildnode_w, TRUE);
gtk_widget_set_sensitive( menu_buildproject_w, FALSE);
gtk_widget_set_sensitive( menu_buildexport_w, FALSE);
gtk_widget_set_sensitive( menu_buildimport_w, FALSE);
gtk_widget_set_sensitive( menu_distribute_w, TRUE); gtk_widget_set_sensitive( menu_distribute_w, TRUE);
gtk_widget_set_sensitive( menu_change_value_w, FALSE); gtk_widget_set_sensitive( menu_change_value_w, FALSE);
gtk_widget_set_sensitive( menu_edit_w, FALSE); gtk_widget_set_sensitive( menu_edit_w, FALSE);
...@@ -357,6 +375,9 @@ void WttGtk::menu_setup() ...@@ -357,6 +375,9 @@ void WttGtk::menu_setup()
gtk_widget_set_sensitive( menu_edit_w, TRUE); gtk_widget_set_sensitive( menu_edit_w, TRUE);
gtk_widget_set_sensitive( tools_edit_w, TRUE); gtk_widget_set_sensitive( tools_edit_w, TRUE);
gtk_widget_set_sensitive( tools_buildnode_w, FALSE); gtk_widget_set_sensitive( tools_buildnode_w, FALSE);
gtk_widget_set_sensitive( menu_buildproject_w, FALSE);
gtk_widget_set_sensitive( menu_buildexport_w, FALSE);
gtk_widget_set_sensitive( menu_buildimport_w, FALSE);
gtk_widget_set_sensitive( menu_classeditor_w, FALSE); gtk_widget_set_sensitive( menu_classeditor_w, FALSE);
if ( ldh_VolRepType( ldhses) == ldh_eVolRep_Ced) if ( ldh_VolRepType( ldhses) == ldh_eVolRep_Ced)
gtk_widget_set_sensitive( menu_updateclasses_w, TRUE); gtk_widget_set_sensitive( menu_updateclasses_w, TRUE);
...@@ -386,6 +407,9 @@ void WttGtk::menu_setup() ...@@ -386,6 +407,9 @@ void WttGtk::menu_setup()
gtk_widget_set_sensitive( menu_buildobject_w, FALSE); gtk_widget_set_sensitive( menu_buildobject_w, FALSE);
gtk_widget_set_sensitive( menu_buildvolume_w, TRUE); gtk_widget_set_sensitive( menu_buildvolume_w, TRUE);
gtk_widget_set_sensitive( menu_buildnode_w, FALSE); gtk_widget_set_sensitive( menu_buildnode_w, FALSE);
gtk_widget_set_sensitive( menu_buildproject_w, FALSE);
gtk_widget_set_sensitive( menu_buildexport_w, FALSE);
gtk_widget_set_sensitive( menu_buildimport_w, FALSE);
gtk_widget_set_sensitive( menu_distribute_w, FALSE); gtk_widget_set_sensitive( menu_distribute_w, FALSE);
gtk_widget_set_sensitive( menu_change_value_w, FALSE); gtk_widget_set_sensitive( menu_change_value_w, FALSE);
gtk_widget_set_sensitive( menu_edit_w, TRUE); gtk_widget_set_sensitive( menu_edit_w, TRUE);
...@@ -419,6 +443,9 @@ void WttGtk::menu_setup() ...@@ -419,6 +443,9 @@ void WttGtk::menu_setup()
gtk_widget_set_sensitive( menu_buildobject_w, FALSE); gtk_widget_set_sensitive( menu_buildobject_w, FALSE);
gtk_widget_set_sensitive( menu_buildvolume_w, FALSE); gtk_widget_set_sensitive( menu_buildvolume_w, FALSE);
gtk_widget_set_sensitive( menu_buildnode_w, FALSE); gtk_widget_set_sensitive( menu_buildnode_w, FALSE);
gtk_widget_set_sensitive( menu_buildproject_w, FALSE);
gtk_widget_set_sensitive( menu_buildexport_w, FALSE);
gtk_widget_set_sensitive( menu_buildimport_w, FALSE);
gtk_widget_set_sensitive( menu_distribute_w, FALSE); gtk_widget_set_sensitive( menu_distribute_w, FALSE);
gtk_widget_set_sensitive( menu_change_value_w, TRUE); gtk_widget_set_sensitive( menu_change_value_w, TRUE);
gtk_widget_set_sensitive( menu_edit_w, TRUE); gtk_widget_set_sensitive( menu_edit_w, TRUE);
...@@ -450,6 +477,9 @@ void WttGtk::menu_setup() ...@@ -450,6 +477,9 @@ void WttGtk::menu_setup()
gtk_widget_set_sensitive( menu_buildobject_w, FALSE); gtk_widget_set_sensitive( menu_buildobject_w, FALSE);
gtk_widget_set_sensitive( menu_buildvolume_w, FALSE); gtk_widget_set_sensitive( menu_buildvolume_w, FALSE);
gtk_widget_set_sensitive( menu_buildnode_w, FALSE); gtk_widget_set_sensitive( menu_buildnode_w, FALSE);
gtk_widget_set_sensitive( menu_buildproject_w, FALSE);
gtk_widget_set_sensitive( menu_buildexport_w, FALSE);
gtk_widget_set_sensitive( menu_buildimport_w, FALSE);
gtk_widget_set_sensitive( menu_distribute_w, FALSE); gtk_widget_set_sensitive( menu_distribute_w, FALSE);
gtk_widget_set_sensitive( menu_change_value_w, FALSE); gtk_widget_set_sensitive( menu_change_value_w, FALSE);
gtk_widget_set_sensitive( menu_edit_w, TRUE); gtk_widget_set_sensitive( menu_edit_w, TRUE);
...@@ -483,6 +513,9 @@ void WttGtk::menu_setup() ...@@ -483,6 +513,9 @@ void WttGtk::menu_setup()
gtk_widget_set_sensitive( menu_buildobject_w, FALSE); gtk_widget_set_sensitive( menu_buildobject_w, FALSE);
gtk_widget_set_sensitive( menu_buildvolume_w, FALSE); gtk_widget_set_sensitive( menu_buildvolume_w, FALSE);
gtk_widget_set_sensitive( menu_buildnode_w, FALSE); gtk_widget_set_sensitive( menu_buildnode_w, FALSE);
gtk_widget_set_sensitive( menu_buildproject_w, FALSE);
gtk_widget_set_sensitive( menu_buildexport_w, FALSE);
gtk_widget_set_sensitive( menu_buildimport_w, FALSE);
gtk_widget_set_sensitive( menu_distribute_w, FALSE); gtk_widget_set_sensitive( menu_distribute_w, FALSE);
gtk_widget_set_sensitive( menu_change_value_w, TRUE); gtk_widget_set_sensitive( menu_change_value_w, TRUE);
gtk_widget_set_sensitive( menu_edit_w, TRUE); gtk_widget_set_sensitive( menu_edit_w, TRUE);
...@@ -514,6 +547,9 @@ void WttGtk::menu_setup() ...@@ -514,6 +547,9 @@ void WttGtk::menu_setup()
gtk_widget_set_sensitive( menu_buildobject_w, FALSE); gtk_widget_set_sensitive( menu_buildobject_w, FALSE);
gtk_widget_set_sensitive( menu_buildvolume_w, FALSE); gtk_widget_set_sensitive( menu_buildvolume_w, FALSE);
gtk_widget_set_sensitive( menu_buildnode_w, FALSE); gtk_widget_set_sensitive( menu_buildnode_w, FALSE);
gtk_widget_set_sensitive( menu_buildproject_w, FALSE);
gtk_widget_set_sensitive( menu_buildexport_w, FALSE);
gtk_widget_set_sensitive( menu_buildimport_w, FALSE);
gtk_widget_set_sensitive( menu_distribute_w, FALSE); gtk_widget_set_sensitive( menu_distribute_w, FALSE);
gtk_widget_set_sensitive( menu_change_value_w, FALSE); gtk_widget_set_sensitive( menu_change_value_w, FALSE);
gtk_widget_set_sensitive( menu_edit_w, TRUE); gtk_widget_set_sensitive( menu_edit_w, TRUE);
...@@ -1316,6 +1352,25 @@ void WttGtk::activate_buildnode( GtkWidget *w, gpointer data) ...@@ -1316,6 +1352,25 @@ void WttGtk::activate_buildnode( GtkWidget *w, gpointer data)
wtt->activate_buildnode(); wtt->activate_buildnode();
} }
void WttGtk::activate_buildproject( GtkWidget *w, gpointer data)
{
Wtt *wtt = (Wtt *)data;
wtt->activate_buildproject();
}
void WttGtk::activate_buildimport( GtkWidget *w, gpointer data)
{
Wtt *wtt = (Wtt *)data;
wtt->activate_buildimport();
}
void WttGtk::activate_buildexport( GtkWidget *w, gpointer data)
{
Wtt *wtt = (Wtt *)data;
wtt->activate_buildexport();
}
void WttGtk::activate_distribute( GtkWidget *w, gpointer data) void WttGtk::activate_distribute( GtkWidget *w, gpointer data)
{ {
Wtt *wtt = (Wtt *)data; Wtt *wtt = (Wtt *)data;
...@@ -2446,6 +2501,7 @@ WttGtk::WttGtk( ...@@ -2446,6 +2501,7 @@ WttGtk::WttGtk(
gtk_menu_item_set_submenu(GTK_MENU_ITEM(edit), GTK_WIDGET(edit_menu)); gtk_menu_item_set_submenu(GTK_MENU_ITEM(edit), GTK_WIDGET(edit_menu));
// Functions menu // Functions menu
menu_buildnode_w = gtk_image_menu_item_new_with_mnemonic( "_Build Node"); menu_buildnode_w = gtk_image_menu_item_new_with_mnemonic( "_Build Node");
gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM(menu_buildnode_w), gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM(menu_buildnode_w),
gtk_image_new_from_stock( "gtk-execute", GTK_ICON_SIZE_MENU)); gtk_image_new_from_stock( "gtk-execute", GTK_ICON_SIZE_MENU));
...@@ -2463,6 +2519,30 @@ WttGtk::WttGtk( ...@@ -2463,6 +2519,30 @@ WttGtk::WttGtk(
g_signal_connect( menu_buildobject_w, "activate", g_signal_connect( menu_buildobject_w, "activate",
G_CALLBACK(WttGtk::activate_buildobject), this); G_CALLBACK(WttGtk::activate_buildobject), this);
menu_buildproject_w = gtk_menu_item_new_with_mnemonic( "Bui_ld Directory");
g_signal_connect( menu_buildproject_w, "activate",
G_CALLBACK(WttGtk::activate_buildproject), this);
menu_buildimport_w = gtk_menu_item_new_with_mnemonic( "_Import");
g_signal_connect( menu_buildimport_w, "activate",
G_CALLBACK(WttGtk::activate_buildimport), this);
menu_buildexport_w = gtk_menu_item_new_with_mnemonic( "_Export");
g_signal_connect( menu_buildexport_w, "activate",
G_CALLBACK(WttGtk::activate_buildexport), this);
GtkWidget *functions_build = gtk_menu_item_new_with_mnemonic( "_Build");
GtkMenu *functions_build_menu = (GtkMenu *) g_object_new( GTK_TYPE_MENU, NULL);
gtk_menu_shell_append(GTK_MENU_SHELL(functions_build_menu), menu_buildnode_w);
gtk_menu_shell_append(GTK_MENU_SHELL(functions_build_menu), menu_buildvolume_w);
gtk_menu_shell_append(GTK_MENU_SHELL(functions_build_menu), menu_buildobject_w);
gtk_menu_shell_append(GTK_MENU_SHELL(functions_build_menu), menu_buildproject_w);
gtk_menu_shell_append(GTK_MENU_SHELL(functions_build_menu), menu_buildimport_w);
gtk_menu_shell_append(GTK_MENU_SHELL(functions_build_menu), menu_buildexport_w);
gtk_menu_item_set_submenu(GTK_MENU_ITEM(functions_build),
GTK_WIDGET(functions_build_menu));
menu_utilities_w = gtk_menu_item_new_with_mnemonic( "_Utilities..."); menu_utilities_w = gtk_menu_item_new_with_mnemonic( "_Utilities...");
g_signal_connect( menu_utilities_w, "activate", g_signal_connect( menu_utilities_w, "activate",
G_CALLBACK(WttGtk::activate_utilities), this); G_CALLBACK(WttGtk::activate_utilities), this);
...@@ -2543,9 +2623,7 @@ WttGtk::WttGtk( ...@@ -2543,9 +2623,7 @@ WttGtk::WttGtk(
GTK_ACCEL_VISIBLE); GTK_ACCEL_VISIBLE);
GtkMenu *functions_menu = (GtkMenu *) g_object_new( GTK_TYPE_MENU, NULL); GtkMenu *functions_menu = (GtkMenu *) g_object_new( GTK_TYPE_MENU, NULL);
gtk_menu_shell_append(GTK_MENU_SHELL(functions_menu), menu_buildnode_w); gtk_menu_shell_append(GTK_MENU_SHELL(functions_menu), functions_build);
gtk_menu_shell_append(GTK_MENU_SHELL(functions_menu), menu_buildvolume_w);
gtk_menu_shell_append(GTK_MENU_SHELL(functions_menu), menu_buildobject_w);
gtk_menu_shell_append(GTK_MENU_SHELL(functions_menu), menu_utilities_w); gtk_menu_shell_append(GTK_MENU_SHELL(functions_menu), menu_utilities_w);
gtk_menu_shell_append(GTK_MENU_SHELL(functions_menu), functions_spreadsheet); gtk_menu_shell_append(GTK_MENU_SHELL(functions_menu), functions_spreadsheet);
gtk_menu_shell_append(GTK_MENU_SHELL(functions_menu), menu_distribute_w); gtk_menu_shell_append(GTK_MENU_SHELL(functions_menu), menu_distribute_w);
......
...@@ -112,6 +112,9 @@ class WttGtk : public Wtt { ...@@ -112,6 +112,9 @@ class WttGtk : public Wtt {
GtkWidget *menu_buildobject_w; GtkWidget *menu_buildobject_w;
GtkWidget *menu_buildvolume_w; GtkWidget *menu_buildvolume_w;
GtkWidget *menu_buildnode_w; GtkWidget *menu_buildnode_w;
GtkWidget *menu_buildproject_w;
GtkWidget *menu_buildexport_w;
GtkWidget *menu_buildimport_w;
GtkWidget *menu_distribute_w; GtkWidget *menu_distribute_w;
GtkWidget *menu_change_value_w; GtkWidget *menu_change_value_w;
GtkWidget *menu_edit_w; GtkWidget *menu_edit_w;
...@@ -237,6 +240,9 @@ class WttGtk : public Wtt { ...@@ -237,6 +240,9 @@ class WttGtk : public Wtt {
static void activate_openclasseditor( GtkWidget *w, gpointer data); static void activate_openclasseditor( GtkWidget *w, gpointer data);
static void activate_buildvolume( GtkWidget *w, gpointer data); static void activate_buildvolume( GtkWidget *w, gpointer data);
static void activate_buildnode( GtkWidget *w, gpointer data); static void activate_buildnode( GtkWidget *w, gpointer data);
static void activate_buildproject( GtkWidget *w, gpointer data);
static void activate_buildimport( GtkWidget *w, gpointer data);
static void activate_buildexport( GtkWidget *w, gpointer data);
static void activate_distribute( GtkWidget *w, gpointer data); static void activate_distribute( GtkWidget *w, gpointer data);
static void activate_showcrossref( GtkWidget *w, gpointer data); static void activate_showcrossref( GtkWidget *w, gpointer data);
static void activate_updateclasses( GtkWidget *w, gpointer data); static void activate_updateclasses( GtkWidget *w, gpointer data);
......
...@@ -1413,4 +1413,101 @@ void wb_build::classdef( pwr_tOid oid) ...@@ -1413,4 +1413,101 @@ void wb_build::classdef( pwr_tOid oid)
} }
void wb_build::project( char *dir)
{
pwr_tFileName fname;
char line[400];
char line_item[4][250];
pwr_tFileName found_file;
int num;
int sts;
pwr_tCmd cmd;
dcli_translate_filename( fname, load_cNameDistribute);
ifstream is( fname);
while ( is.getline( line, sizeof(line))) {
dcli_trim( line, line);
if ( line[0] == '#' || line[0] == '!')
continue;
num = dcli_parse( line, " ", "", (char *)line_item,
sizeof(line_item)/sizeof(line_item[0]),
sizeof(line_item[0]), 0);
if ( !num)
continue;
if ( dir && strncmp( dir, line_item[1], strlen(dir)) != 0)
continue;
if ( strcmp( cdh_Low(line_item[0]), "buildcopy") == 0) {
if ( num != 4) {
printf("File corrupt " load_cNameDistribute);
continue;
}
for ( sts = dcli_search_file( line_item[2], found_file, DCLI_DIR_SEARCH_INIT);
ODD(sts);
sts = dcli_search_file( line_item[2], found_file, DCLI_DIR_SEARCH_NEXT)) {
// Check if file should be updated
int update = 0;
pwr_tFileName source, target;
pwr_tTime source_time, target_time;
strncpy( source, found_file, sizeof(source));
strncpy( target, line_item[3], sizeof(target));
sts = dcli_file_time( source, &source_time);
if ( target[strlen(target)-1] == '/') {
// Target is a directory, add file name
char *s = strrchr( source, '/');
if ( !s)
strncat( target, source, sizeof(target));
else
strncat( target, s+1, sizeof(target));
}
dcli_translate_filename( target, target);
sts = dcli_file_time( target, &target_time);
if ( ODD(sts) && time_Acomp( &source_time, &target_time) != 1)
update = 0;
else
update = 1;
if ( !opt.force && !update)
continue;
sprintf( cmd, "cp -a %s %s", source, target);
// system( cmd);
sprintf( cmd, "Build: %s %s -> %s", line_item[1], source, target);
MsgWindow::message( 'I', cmd, msgw_ePop_No);
// wb_log::log( wlog_eCategory_GeBuild, name, 0);
m_sts = PWRB__SUCCESS;
}
dcli_search_file( line_item[1], found_file, DCLI_DIR_SEARCH_END);
}
else if ( strcmp( cdh_Low(line_item[0]), "buildexec") == 0) {
if ( num != 4) {
printf("File corrupt " load_cNameDistribute);
continue;
}
sprintf( cmd, "cd %s;%s", line_item[2], line_item[3]);
// system( cmd);
sprintf( cmd, "Build: executed %s %s", line_item[2], line_item[3]);
MsgWindow::message( 'I', cmd, msgw_ePop_No);
// wb_log::log( wlog_eCategory_GeBuild, name, 0);
m_sts = PWRB__SUCCESS;
}
}
is.close();
}
...@@ -66,6 +66,7 @@ class wb_build : public wb_status ...@@ -66,6 +66,7 @@ class wb_build : public wb_status
void appgraph( pwr_tOid oid); void appgraph( pwr_tOid oid);
void application( pwr_tOid oid); void application( pwr_tOid oid);
void classdef( pwr_tOid oid); void classdef( pwr_tOid oid);
void project( char *dir);
wb_build_opt opt; wb_build_opt opt;
wb_session m_session; wb_session m_session;
......
/**
* Proview Open Source Process Control.
* Copyright (C) 2005-2014 SSAB EMEA AB.
*
* This file is part of Proview.
*
* 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 Proview. If not, see <http://www.gnu.org/licenses/>
*
* Linking Proview statically or dynamically with other modules is
* making a combined work based on Proview. Thus, the terms and
* conditions of the GNU General Public License cover the whole
* combination.
*
* In addition, as a special exception, the copyright holders of
* Proview give you permission to, from the build function in the
* Proview Configurator, combine Proview with modules generated by the
* Proview PLC Editor to a PLC program, regardless of the license
* terms of these modules. You may copy and distribute the resulting
* combined work under the terms of your choice, provided that every
* copy of the combined work is accompanied by a complete copy of
* the source code of Proview (the version used to produce the
* combined work), being distributed under the terms of the GNU
* General Public License plus this exception.
**/
/* wb_bckw.cpp -- Backupfile display window */
#include "glow_std.h"
#include <stdio.h>
#include <stdlib.h>
#include "co_cdh.h"
#include "co_time.h"
#include "co_dcli.h"
#include "co_lng.h"
#include "cow_xhelp.h"
#include "cow_wow.h"
#include "wb_ldh.h"
#include "wb_expw.h"
WbExpW::WbExpW(
void *l_parent_ctx,
ldh_tSesContext l_ldhses,
const char *expw_name,
int l_type,
int l_editmode,
pwr_tStatus *status) :
parent_ctx(l_parent_ctx), ldhses(l_ldhses), expwnav(NULL),
size(0), max_size(500), type(l_type), editmode(l_editmode), wow(0)
{
*status = 1;
strcpy( name, expw_name);
if ( type == expw_eType_Export) {
strcpy( action, "Export files");
strcpy( btext, "_Export files");
strcpy( typetext, "export");
}
else if ( type == expw_eType_Import) {
strcpy( action, "Import files");
strcpy( btext, "_Import files");
strcpy( typetext, "import");
}
else if ( type == expw_eType_BuildProject) {
strcpy( action, "Build Project");
strcpy( btext, "_Build Project");
strcpy( typetext, "build");
}
}
WbExpW::~WbExpW() {
}
void WbExpW::show()
{
expwnav->show();
}
void WbExpW::activate_export()
{
char text[80];
sprintf( text, "Do you want to %s to marked files", typetext);
wow->DisplayQuestion( this, action, text,
export_ok, 0, 0);
}
void WbExpW::export_ok( void *ctx, void *data)
{
WbExpW *expw = (WbExpW *)ctx;
expw->expwnav->exp();
}
/**
* Proview Open Source Process Control.
* Copyright (C) 2005-2014 SSAB EMEA AB.
*
* This file is part of Proview.
*
* 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 Proview. If not, see <http://www.gnu.org/licenses/>
*
* Linking Proview statically or dynamically with other modules is
* making a combined work based on Proview. Thus, the terms and
* conditions of the GNU General Public License cover the whole
* combination.
*
* In addition, as a special exception, the copyright holders of
* Proview give you permission to, from the build function in the
* Proview Configurator, combine Proview with modules generated by the
* Proview PLC Editor to a PLC program, regardless of the license
* terms of these modules. You may copy and distribute the resulting
* combined work under the terms of your choice, provided that every
* copy of the combined work is accompanied by a complete copy of
* the source code of Proview (the version used to produce the
* combined work), being distributed under the terms of the GNU
* General Public License plus this exception.
**/
#ifndef wb_expw_h
#define wb_expw_h
/* wb_expw.h -- Backupfile display window */
#ifndef pwr_h
# include "pwr.h"
#endif
#ifndef wb_bck_h
# include "wb_bck.h"
#endif
#ifndef wb_expwnav_h
# include "wb_expwnav.h"
#endif
class CoWow;
class CoWowFocusTimer;
#include "cow_wow.h"
class WbExpW {
public:
WbExpW(
void *l_parent_ctx,
ldh_tSesContext l_ldhses,
const char *expw_name,
int l_type,
int l_editmode,
pwr_tStatus *status);
~WbExpW();
virtual void set_title( char *title) {}
void show();
void activate_export();
void activate_update() { expwnav->show();}
void activate_check_all() { expwnav->check_all();}
void activate_check_clear() { expwnav->check_clear();}
void activate_check_reset() { expwnav->check_reset();}
static void export_ok( void *ctx, void *data);
void *parent_ctx;
ldh_tSesContext ldhses;
char name[80];
char action[20];
char btext[20];
char typetext[20];
WbExpWNav *expwnav;
int size;
int max_size;
int type;
int editmode;
CoWow *wow;
};
#endif
/**
* Proview Open Source Process Control.
* Copyright (C) 2005-2014 SSAB EMEA AB.
*
* This file is part of Proview.
*
* 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 Proview. If not, see <http://www.gnu.org/licenses/>
*
* Linking Proview statically or dynamically with other modules is
* making a combined work based on Proview. Thus, the terms and
* conditions of the GNU General Public License cover the whole
* combination.
*
* In addition, as a special exception, the copyright holders of
* Proview give you permission to, from the build function in the
* Proview Configurator, combine Proview with modules generated by the
* Proview PLC Editor to a PLC program, regardless of the license
* terms of these modules. You may copy and distribute the resulting
* combined work under the terms of your choice, provided that every
* copy of the combined work is accompanied by a complete copy of
* the source code of Proview (the version used to produce the
* combined work), being distributed under the terms of the GNU
* General Public License plus this exception.
**/
/* wb_logwnav.cpp -- Backupfile display window */
#include "glow_std.h"
#include <stdio.h>
#include <stdlib.h>
#include "co_cdh.h"
#include "co_time.h"
#include "co_dcli.h"
#include "rt_load.h"
#include "flow.h"
#include "flow_browctx.h"
#include "flow_browapi.h"
#include "xnav_bitmap_export8.h"
#include "xnav_bitmap_export10.h"
#include "xnav_bitmap_export12.h"
#include "xnav_bitmap_export14.h"
#include "xnav_bitmap_export16.h"
#include "xnav_bitmap_export18.h"
#include "xnav_bitmap_export20.h"
#include "xnav_bitmap_export24.h"
#include "xnav_bitmap_leaf8.h"
#include "xnav_bitmap_leaf10.h"
#include "xnav_bitmap_leaf12.h"
#include "xnav_bitmap_leaf14.h"
#include "xnav_bitmap_leaf16.h"
#include "xnav_bitmap_leaf18.h"
#include "xnav_bitmap_leaf20.h"
#include "xnav_bitmap_leaf24.h"
#include "xnav_bitmap_map8.h"
#include "xnav_bitmap_map10.h"
#include "xnav_bitmap_map12.h"
#include "xnav_bitmap_map14.h"
#include "xnav_bitmap_map16.h"
#include "xnav_bitmap_map18.h"
#include "xnav_bitmap_map20.h"
#include "xnav_bitmap_map24.h"
#include "xnav_bitmap_openmap8.h"
#include "xnav_bitmap_openmap10.h"
#include "xnav_bitmap_openmap12.h"
#include "xnav_bitmap_openmap14.h"
#include "xnav_bitmap_openmap16.h"
#include "xnav_bitmap_openmap18.h"
#include "xnav_bitmap_openmap20.h"
#include "xnav_bitmap_openmap24.h"
#include "cow_msgwindow.h"
#include "wb_ldh.h"
#include "wb_expwnav.h"
#include "pwr_baseclasses.h"
#include "wb_ldh_msg.h"
//
// Free pixmaps
//
void WbExpWNavBrow::free_pixmaps()
{
brow_FreeAnnotPixmap( ctx, pixmap_export);
brow_FreeAnnotPixmap( ctx, pixmap_leaf);
brow_FreeAnnotPixmap( ctx, pixmap_map);
brow_FreeAnnotPixmap( ctx, pixmap_openmap);
}
//
// Create pixmaps for leaf, closed map and open map
//
void WbExpWNavBrow::allocate_pixmaps()
{
flow_sPixmapData pixmap_data;
int i;
i = 0;
pixmap_data[i].width =xnav_bitmap_export8_width;
pixmap_data[i].height =xnav_bitmap_export8_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_export8_bits;
pixmap_data[i].width =xnav_bitmap_export10_width;
pixmap_data[i].height =xnav_bitmap_export10_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_export10_bits;
pixmap_data[i].width =xnav_bitmap_export12_width;
pixmap_data[i].height =xnav_bitmap_export12_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_export12_bits;
pixmap_data[i].width =xnav_bitmap_export14_width;
pixmap_data[i].height =xnav_bitmap_export14_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_export14_bits;
pixmap_data[i].width =xnav_bitmap_export16_width;
pixmap_data[i].height =xnav_bitmap_export16_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_export16_bits;
pixmap_data[i].width =xnav_bitmap_export18_width;
pixmap_data[i].height =xnav_bitmap_export18_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_export18_bits;
pixmap_data[i].width =xnav_bitmap_export20_width;
pixmap_data[i].height =xnav_bitmap_export20_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_export20_bits;
pixmap_data[i].width =xnav_bitmap_export20_width;
pixmap_data[i].height =xnav_bitmap_export20_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_export20_bits;
pixmap_data[i].width =xnav_bitmap_export24_width;
pixmap_data[i].height =xnav_bitmap_export24_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_export24_bits;
brow_AllocAnnotPixmap( ctx, &pixmap_data, &pixmap_export);
i = 0;
pixmap_data[i].width =xnav_bitmap_leaf8_width;
pixmap_data[i].height =xnav_bitmap_leaf8_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_leaf8_bits;
pixmap_data[i].width =xnav_bitmap_leaf10_width;
pixmap_data[i].height =xnav_bitmap_leaf10_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_leaf10_bits;
pixmap_data[i].width =xnav_bitmap_leaf12_width;
pixmap_data[i].height =xnav_bitmap_leaf12_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_leaf12_bits;
pixmap_data[i].width =xnav_bitmap_leaf14_width;
pixmap_data[i].height =xnav_bitmap_leaf14_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_leaf14_bits;
pixmap_data[i].width =xnav_bitmap_leaf16_width;
pixmap_data[i].height =xnav_bitmap_leaf16_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_leaf16_bits;
pixmap_data[i].width =xnav_bitmap_leaf18_width;
pixmap_data[i].height =xnav_bitmap_leaf18_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_leaf18_bits;
pixmap_data[i].width =xnav_bitmap_leaf20_width;
pixmap_data[i].height =xnav_bitmap_leaf20_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_leaf20_bits;
pixmap_data[i].width =xnav_bitmap_leaf20_width;
pixmap_data[i].height =xnav_bitmap_leaf20_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_leaf20_bits;
pixmap_data[i].width =xnav_bitmap_leaf24_width;
pixmap_data[i].height =xnav_bitmap_leaf24_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_leaf24_bits;
brow_AllocAnnotPixmap( ctx, &pixmap_data, &pixmap_leaf);
i = 0;
pixmap_data[i].width =xnav_bitmap_map8_width;
pixmap_data[i].height =xnav_bitmap_map8_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_map8_bits;
pixmap_data[i].width =xnav_bitmap_map10_width;
pixmap_data[i].height =xnav_bitmap_map10_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_map10_bits;
pixmap_data[i].width =xnav_bitmap_map12_width;
pixmap_data[i].height =xnav_bitmap_map12_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_map12_bits;
pixmap_data[i].width =xnav_bitmap_map14_width;
pixmap_data[i].height =xnav_bitmap_map14_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_map14_bits;
pixmap_data[i].width =xnav_bitmap_map16_width;
pixmap_data[i].height =xnav_bitmap_map16_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_map16_bits;
pixmap_data[i].width =xnav_bitmap_map18_width;
pixmap_data[i].height =xnav_bitmap_map18_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_map18_bits;
pixmap_data[i].width =xnav_bitmap_map20_width;
pixmap_data[i].height =xnav_bitmap_map20_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_map20_bits;
pixmap_data[i].width =xnav_bitmap_map20_width;
pixmap_data[i].height =xnav_bitmap_map20_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_map20_bits;
pixmap_data[i].width =xnav_bitmap_map24_width;
pixmap_data[i].height =xnav_bitmap_map24_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_map24_bits;
brow_AllocAnnotPixmap( ctx, &pixmap_data, &pixmap_map);
i = 0;
pixmap_data[i].width =xnav_bitmap_openmap8_width;
pixmap_data[i].height =xnav_bitmap_openmap8_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_openmap8_bits;
pixmap_data[i].width =xnav_bitmap_openmap10_width;
pixmap_data[i].height =xnav_bitmap_openmap10_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_openmap10_bits;
pixmap_data[i].width =xnav_bitmap_openmap12_width;
pixmap_data[i].height =xnav_bitmap_openmap12_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_openmap12_bits;
pixmap_data[i].width =xnav_bitmap_openmap14_width;
pixmap_data[i].height =xnav_bitmap_openmap14_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_openmap14_bits;
pixmap_data[i].width =xnav_bitmap_openmap16_width;
pixmap_data[i].height =xnav_bitmap_openmap16_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_openmap16_bits;
pixmap_data[i].width =xnav_bitmap_openmap18_width;
pixmap_data[i].height =xnav_bitmap_openmap18_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_openmap18_bits;
pixmap_data[i].width =xnav_bitmap_openmap20_width;
pixmap_data[i].height =xnav_bitmap_openmap20_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_openmap20_bits;
pixmap_data[i].width =xnav_bitmap_openmap20_width;
pixmap_data[i].height =xnav_bitmap_openmap20_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_openmap20_bits;
pixmap_data[i].width =xnav_bitmap_openmap24_width;
pixmap_data[i].height =xnav_bitmap_openmap24_height;
pixmap_data[i++].bits = (char *)xnav_bitmap_openmap24_bits;
brow_AllocAnnotPixmap( ctx, &pixmap_data, &pixmap_openmap);
}
//
// Create nodeclasses
//
void WbExpWNavBrow::create_nodeclasses()
{
allocate_pixmaps();
// Create common-class
brow_CreateNodeClass( ctx, "LogDefault",
flow_eNodeGroup_Common, &nc_exp);
brow_AddAnnotPixmap( nc_exp, 0, 0.2, 0.1, flow_eDrawType_Line, 2, 0);
brow_AddAnnot( nc_exp, 2.8, 0.6, 0,
flow_eDrawType_TextHelvetica, 2, flow_eAnnotType_OneLine,
0);
brow_AddAnnot( nc_exp, 35, 0.6, 1,
flow_eDrawType_TextHelvetica, 2, flow_eAnnotType_OneLine,
0);
brow_AddAnnot( nc_exp, 45, 0.6, 2,
flow_eDrawType_TextHelvetica, 2, flow_eAnnotType_OneLine,
0);
brow_AddFrame( nc_exp, 0, 0, 35, 0.83, flow_eDrawType_LineGray, -1, 1);
// Create common-class with radiobutton
brow_CreateNodeClass( ctx, "LogDefault",
flow_eNodeGroup_Common, &nc_eexp);
brow_AddAnnotPixmap( nc_eexp, 0, 0.2, 0.1, flow_eDrawType_Line, 2, 0);
brow_AddRadiobutton( nc_eexp, 1.4, 0.03, 0.7, 0.7, 0, flow_eDrawType_Line, 1);
brow_AddAnnot( nc_eexp, 2.8, 0.6, 0,
flow_eDrawType_TextHelvetica, 2, flow_eAnnotType_OneLine,
0);
brow_AddAnnot( nc_eexp, 35, 0.6, 1,
flow_eDrawType_TextHelvetica, 2, flow_eAnnotType_OneLine,
0);
brow_AddAnnot( nc_eexp, 45, 0.6, 2,
flow_eDrawType_TextHelvetica, 2, flow_eAnnotType_OneLine,
0);
brow_AddFrame( nc_eexp, 0, 0, 35, 0.83, flow_eDrawType_LineGray, -1, 1);
}
void WbExpWNavBrow::brow_setup()
{
brow_sAttributes brow_attr;
unsigned long mask;
mask = 0;
mask |= brow_eAttr_indentation;
brow_attr.indentation = 0.5;
mask |= brow_eAttr_annotation_space;
brow_attr.annotation_space = 0.5;
brow_SetAttributes( ctx, &brow_attr, mask);
brow_SetCtxUserData( ctx, expwnav);
brow_EnableEvent( ctx, flow_eEvent_MB1Click, flow_eEventType_CallBack,
WbExpWNav::brow_cb);
brow_EnableEvent( ctx, flow_eEvent_MB1DoubleClick, flow_eEventType_CallBack,
WbExpWNav::brow_cb);
brow_EnableEvent( ctx, flow_eEvent_MB3Press, flow_eEventType_CallBack,
WbExpWNav::brow_cb);
brow_EnableEvent( ctx, flow_eEvent_MB3Down, flow_eEventType_CallBack,
WbExpWNav::brow_cb);
brow_EnableEvent( ctx, flow_eEvent_SelectClear, flow_eEventType_CallBack,
WbExpWNav::brow_cb);
brow_EnableEvent( ctx, flow_eEvent_ObjectDeleted, flow_eEventType_CallBack,
WbExpWNav::brow_cb);
brow_EnableEvent( ctx, flow_eEvent_Key_Up, flow_eEventType_CallBack,
WbExpWNav::brow_cb);
brow_EnableEvent( ctx, flow_eEvent_Key_Down, flow_eEventType_CallBack,
WbExpWNav::brow_cb);
brow_EnableEvent( ctx, flow_eEvent_Key_Left, flow_eEventType_CallBack,
WbExpWNav::brow_cb);
brow_EnableEvent( ctx, flow_eEvent_Key_Right, flow_eEventType_CallBack,
WbExpWNav::brow_cb);
brow_EnableEvent( ctx, flow_eEvent_Key_ShiftRight, flow_eEventType_CallBack,
WbExpWNav::brow_cb);
brow_EnableEvent( ctx, flow_eEvent_Key_PF3, flow_eEventType_CallBack,
WbExpWNav::brow_cb);
brow_EnableEvent( ctx, flow_eEvent_Key_PageUp, flow_eEventType_CallBack,
WbExpWNav::brow_cb);
brow_EnableEvent( ctx, flow_eEvent_Key_PageDown, flow_eEventType_CallBack,
WbExpWNav::brow_cb);
brow_EnableEvent( ctx, flow_eEvent_ScrollUp, flow_eEventType_CallBack,
WbExpWNav::brow_cb);
brow_EnableEvent( ctx, flow_eEvent_ScrollDown, flow_eEventType_CallBack,
WbExpWNav::brow_cb);
brow_EnableEvent( ctx, flow_eEvent_Radiobutton, flow_eEventType_CallBack,
WbExpWNav::brow_cb);
}
//
// Backcall routine called at creation of the brow widget
// Enable event, create nodeclasses and insert the root objects.
//
int WbExpWNav::init_brow_cb( FlowCtx *fctx, void *client_data)
{
WbExpWNav *expwnav = (WbExpWNav *) client_data;
BrowCtx *ctx = (BrowCtx *)fctx;
expwnav->brow = new WbExpWNavBrow( ctx, (void *)expwnav);
expwnav->brow->brow_setup();
expwnav->brow->create_nodeclasses();
return 1;
}
WbExpWNav::WbExpWNav( void *l_parent_ctx, ldh_tSesContext l_ldhses, int l_type,
int l_editmode) :
parent_ctx(l_parent_ctx), ldhses(l_ldhses), type(l_type), editmode(l_editmode),
show_all(0), dirlist(0)
{
}
//
// Delete ev
//
WbExpWNav::~WbExpWNav()
{
list_free();
}
WbExpWNavBrow::~WbExpWNavBrow()
{
free_pixmaps();
}
//
// Zoom
//
void WbExpWNav::zoom( double zoom_factor)
{
brow_Zoom( brow->ctx, zoom_factor);
}
//
// Return to base zoom factor
//
void WbExpWNav::unzoom()
{
brow_UnZoom( brow->ctx);
}
//
// Callbacks from brow
//
int WbExpWNav::brow_cb( FlowCtx *ctx, flow_tEvent event)
{
WbExpWNav *expwnav;
ItemExp *item;
int sts;
if ( event->event == flow_eEvent_ObjectDeleted)
{
brow_GetUserData( event->object.object, (void **)&item);
delete item;
return 1;
}
brow_GetCtxUserData( (BrowCtx *)ctx, (void **) &expwnav);
switch ( event->event) {
case flow_eEvent_Key_Right: {
brow_tNode *node_list;
int node_count;
int value;
brow_GetSelectedNodes( expwnav->brow->ctx, &node_list, &node_count);
if ( !node_count)
break;
brow_GetUserData( node_list[0], (void **)&item);
switch( item->type)
{
case expwitem_eItemType_Dir:
brow_GetRadiobutton( node_list[0], 0, &value);
((ItemDir *)item)->set( !value);
//sts = ((ItemDir *)item)->open_children();
break;
case expwitem_eItemType_Exp:
brow_GetRadiobutton( node_list[0], 0, &value);
((ItemExp *)item)->set( !value);
break;
default: ;
}
free( node_list);
break;
}
case flow_eEvent_Key_ShiftRight: {
brow_tNode *node_list;
int node_count;
brow_GetSelectedNodes( expwnav->brow->ctx, &node_list, &node_count);
if ( !node_count)
break;
brow_GetUserData( node_list[0], (void **)&item);
switch( item->type)
{
case expwitem_eItemType_Dir:
sts = ((ItemDir *)item)->open_children();
break;
default: ;
}
free( node_list);
break;
}
case flow_eEvent_Key_Left:
{
brow_tNode *node_list;
int node_count;
brow_tObject object;
int sts;
brow_GetSelectedNodes( expwnav->brow->ctx, &node_list, &node_count);
if ( !node_count)
return 1;
if ( brow_IsOpen( node_list[0]))
// Close this node
object = node_list[0];
else {
// Close parent
sts = brow_GetParent( expwnav->brow->ctx, node_list[0], &object);
if ( EVEN(sts)) {
free( node_list);
return 1;
}
}
brow_GetUserData( object, (void **)&item);
switch( item->type) {
case expwitem_eItemType_Dir:
((ItemDir *)item)->close();
break;
default: ;
}
brow_SelectClear( expwnav->brow->ctx);
brow_SetInverse( object, 1);
brow_SelectInsert( expwnav->brow->ctx, object);
if ( !brow_IsVisible( expwnav->brow->ctx, object, flow_eVisible_Full))
brow_CenterObject( expwnav->brow->ctx, object, 0.25);
free( node_list);
break;
}
case flow_eEvent_Key_Up:
{
brow_tNode *node_list;
int node_count;
brow_tObject object;
int sts;
brow_GetSelectedNodes( expwnav->brow->ctx, &node_list, &node_count);
if ( !node_count) {
sts = brow_GetLastVisible( expwnav->brow->ctx, &object);
if ( EVEN(sts)) return 1;
}
else {
if ( !brow_IsVisible( expwnav->brow->ctx, node_list[0], flow_eVisible_Partial)) {
sts = brow_GetLastVisible( expwnav->brow->ctx, &object);
if ( EVEN(sts)) return 1;
}
else {
sts = brow_GetPrevious( expwnav->brow->ctx, node_list[0], &object);
if ( EVEN(sts)) {
if ( node_count)
free( node_list);
return 1;
}
}
}
brow_SelectClear( expwnav->brow->ctx);
brow_SetInverse( object, 1);
brow_SelectInsert( expwnav->brow->ctx, object);
if ( !brow_IsVisible( expwnav->brow->ctx, object, flow_eVisible_Full))
brow_CenterObject( expwnav->brow->ctx, object, 0.25);
if ( node_count)
free( node_list);
break;
}
case flow_eEvent_Key_Down:
{
brow_tNode *node_list;
int node_count;
brow_tObject object;
int sts;
brow_GetSelectedNodes( expwnav->brow->ctx, &node_list, &node_count);
if ( !node_count) {
sts = brow_GetFirstVisible( expwnav->brow->ctx, &object);
if ( EVEN(sts)) return 1;
}
else {
if ( !brow_IsVisible( expwnav->brow->ctx, node_list[0], flow_eVisible_Partial)) {
sts = brow_GetFirstVisible( expwnav->brow->ctx, &object);
if ( EVEN(sts)) return 1;
}
else {
sts = brow_GetNext( expwnav->brow->ctx, node_list[0], &object);
if ( EVEN(sts)) {
if ( node_count)
free( node_list);
return 1;
}
}
}
brow_SelectClear( expwnav->brow->ctx);
brow_SetInverse( object, 1);
brow_SelectInsert( expwnav->brow->ctx, object);
if ( !brow_IsVisible( expwnav->brow->ctx, object, flow_eVisible_Full))
brow_CenterObject( expwnav->brow->ctx, object, 0.75);
if ( node_count)
free( node_list);
break;
}
case flow_eEvent_SelectClear:
brow_ResetSelectInverse( expwnav->brow->ctx);
break;
case flow_eEvent_MB1Click:
// Select
double ll_x, ll_y, ur_x, ur_y;
int sts;
switch ( event->object.object_type)
{
case flow_eObjectType_Node:
brow_MeasureNode( event->object.object, &ll_x, &ll_y,
&ur_x, &ur_y);
if ( event->object.x < ll_x + 1.0)
{
// Simulate doubleclick
flow_tEvent doubleclick_event;
doubleclick_event = (flow_tEvent) calloc( 1, sizeof(*doubleclick_event));
memcpy( doubleclick_event, event, sizeof(*doubleclick_event));
doubleclick_event->event = flow_eEvent_MB1DoubleClick;
sts = WbExpWNav::brow_cb( ctx, doubleclick_event);
free( (char *) doubleclick_event);
return sts;
}
if ( brow_FindSelectedObject( expwnav->brow->ctx, event->object.object))
{
brow_SelectClear( expwnav->brow->ctx);
}
else
{
brow_SelectClear( expwnav->brow->ctx);
brow_SetInverse( event->object.object, 1);
brow_SelectInsert( expwnav->brow->ctx, event->object.object);
}
break;
default:
brow_SelectClear( expwnav->brow->ctx);
}
break;
case flow_eEvent_Key_PageDown: {
brow_Page( expwnav->brow->ctx, 0.95);
break;
}
case flow_eEvent_Key_PageUp: {
brow_Page( expwnav->brow->ctx, -0.95);
break;
}
case flow_eEvent_ScrollDown: {
brow_Page( expwnav->brow->ctx, 0.10);
break;
}
case flow_eEvent_ScrollUp: {
brow_Page( expwnav->brow->ctx, -0.10);
break;
}
case flow_eEvent_MB1DoubleClick: {
switch ( event->object.object_type) {
case flow_eObjectType_Node:
brow_GetUserData( event->object.object, (void **)&item);
switch( item->type) {
case expwitem_eItemType_Dir:
sts = ((ItemDir *)item)->open_children();
break;
default: ;
}
break;
default: ;
}
}
case flow_eEvent_Radiobutton: {
switch ( event->object.object_type) {
case flow_eObjectType_Node:
brow_GetUserData( event->object.object, (void **)&item);
switch( item->type) {
case expwitem_eItemType_Exp:
((ItemExp *)item)->set( !event->radiobutton.value);
break;
case expwitem_eItemType_Dir:
((ItemDir *)item)->set( !event->radiobutton.value);
break;
default:
;
}
break;
default:
;
}
break;
}
default:
;
}
return 1;
}
void WbExpWNav::show()
{
switch ( type) {
case expw_eType_Import:
case expw_eType_Export:
show_export_import();
break;
case expw_eType_BuildProject:
show_buildproject();
break;
default: ;
}
}
void WbExpWNav::show_export_import()
{
pwr_tFileName fname;
char line[400];
char line_item[3][250];
pwr_tFileName found_file;
int num;
int sts;
char tag[20];
brow_SetNodraw( brow->ctx);
brow_DeleteAll( brow->ctx);
dcli_translate_filename( fname, load_cNameDistribute);
ifstream is( fname);
while ( is.getline( line, sizeof(line))) {
dcli_trim( line, line);
if ( line[0] == '#' || line[0] == '!')
continue;
num = dcli_parse( line, " ", "", (char *)line_item,
sizeof(line_item)/sizeof(line_item[0]),
sizeof(line_item[0]), 0);
if ( !num)
continue;
if ( type == expw_eType_Export)
strcpy( tag, "export");
else
strcpy( tag, "import");
if ( strcmp( cdh_Low(line_item[0]), tag) == 0) {
if ( num != 3) {
printf("File corrupt " load_cNameDistribute);
continue;
}
for ( sts = dcli_search_file( line_item[1], found_file, DCLI_DIR_SEARCH_INIT);
ODD(sts);
sts = dcli_search_file( line_item[1], found_file, DCLI_DIR_SEARCH_NEXT)) {
// Check if file should be updated
int update = 0;
pwr_tFileName source, target;
pwr_tTime source_time, target_time;
strncpy( source, found_file, sizeof(source));
strncpy( target, line_item[2], sizeof(target));
sts = dcli_file_time( source, &source_time);
if ( target[strlen(target)-1] == '/') {
// Target is a directory, add file name
char *s = strrchr( source, '/');
if ( !s)
strncat( target, source, sizeof(target));
else
strncat( target, s+1, sizeof(target));
}
dcli_translate_filename( target, target);
sts = dcli_file_time( target, &target_time);
if ( ODD(sts) && time_Acomp( &source_time, &target_time) != 1)
update = 0;
else
update = 1;
if ( !show_all && !update)
continue;
ItemExp *item = new ItemExp( this, found_file, line_item[2], 0, 0, flow_eDest_IntoLast);
if ( update)
brow_SetRadiobutton( item->node, 0, 1);
}
dcli_search_file( line_item[1], found_file, DCLI_DIR_SEARCH_END);
}
}
is.close();
check_all();
brow_ResetNodraw( brow->ctx);
brow_Redraw( brow->ctx, 0);
}
void WbExpWNav::show_buildproject()
{
pwr_tFileName fname;
char line[400];
char line_item[4][250];
pwr_tFileName found_file;
int num;
int sts;
list_free();
dcli_translate_filename( fname, load_cNameDistribute);
ifstream is( fname);
while ( is.getline( line, sizeof(line))) {
dcli_trim( line, line);
if ( line[0] == '#' || line[0] == '!')
continue;
num = dcli_parse( line, " ", "", (char *)line_item,
sizeof(line_item)/sizeof(line_item[0]),
sizeof(line_item[0]), 0);
if ( !num)
continue;
if ( strcmp( cdh_Low(line_item[0]), "builddir") == 0) {
if ( num != 3) {
printf("File corrupt " load_cNameDistribute);
continue;
}
ExpWDir *dir = dir_find( line_item[1]);
if ( !dir)
dir = dir_insert( line_item[1], line_item[2]);
}
else if ( strcmp( cdh_Low(line_item[0]), "buildcopy") == 0) {
int dir_update = 0;
if ( num != 4) {
printf("File corrupt " load_cNameDistribute);
continue;
}
for ( sts = dcli_search_file( line_item[2], found_file, DCLI_DIR_SEARCH_INIT);
ODD(sts);
sts = dcli_search_file( line_item[2], found_file, DCLI_DIR_SEARCH_NEXT)) {
// Check if file should be updated
int update = 0;
pwr_tFileName source, target;
pwr_tTime source_time, target_time;
strncpy( source, found_file, sizeof(source));
strncpy( target, line_item[3], sizeof(target));
sts = dcli_file_time( source, &source_time);
if ( target[strlen(target)-1] == '/') {
// Target is a directory, add file name
char *s = strrchr( source, '/');
if ( !s)
strncat( target, source, sizeof(target));
else
strncat( target, s+1, sizeof(target));
}
dcli_translate_filename( target, target);
sts = dcli_file_time( target, &target_time);
if ( ODD(sts) && time_Acomp( &source_time, &target_time) != 1)
update = 0;
else
update = 1;
ExpWDir *dir = dir_find( line_item[1]);
if ( !dir) {
printf("File corrupt " load_cNameDistribute);
continue;
}
dir->copy_insert( source, target, update);
if ( update)
dir->update = 1;
}
dcli_search_file( line_item[1], found_file, DCLI_DIR_SEARCH_END);
ItemExp *item = new ItemExp( this, found_file, line_item[1], 0, 0, flow_eDest_IntoLast);
if ( dir_update)
brow_SetRadiobutton( item->node, 0, 1);
}
else if ( strcmp( cdh_Low(line_item[0]), "buildexec") == 0) {
int update = 1;
if ( num != 4) {
printf("File corrupt " load_cNameDistribute);
continue;
}
ExpWDir *dir = dir_find( line_item[1]);
if ( !dir) {
printf("File corrupt " load_cNameDistribute);
continue;
}
dir->exec_insert( line_item[2], line_item[3], update);
if ( update)
dir->update = 1;
}
}
is.close();
redraw();
}
void WbExpWNav::set_show_all( int set)
{
show_all = set;
switch ( type) {
case expw_eType_Export:
case expw_eType_Import:
show();
break;
case expw_eType_BuildProject:
redraw();
break;
}
}
void WbExpWNav::redraw()
{
brow_SetNodraw( brow->ctx);
brow_DeleteAll( brow->ctx);
for ( ExpWDir *dir = dirlist; dir; dir = dir->next) {
ItemDir *item = new ItemDir( this, dir, dir->name, dir->description, 0, flow_eDest_IntoLast);
if ( dir->update)
brow_SetRadiobutton( item->node, 0, 1);
if ( dir->open)
item->open_children();
}
brow_ResetNodraw( brow->ctx);
brow_Redraw( brow->ctx, 0);
}
ExpWDir *WbExpWNav::dir_find( char *name)
{
for ( ExpWDir *dir = dirlist; dir; dir = dir->next) {
if ( strcmp( dir->name, name) == 0)
return dir;
}
return 0;
}
void WbExpWNav::list_free()
{
ExpWDir *dp_next;
for ( ExpWDir *dp = dirlist; dp; dp = dp_next) {
ExpWCopy *cp_next;
for ( ExpWCopy *cp = dp->copylist; cp; cp = cp_next) {
cp_next = cp->next;
delete cp;
}
ExpWExec *ep_next;
for ( ExpWExec *ep = dp->execlist; ep; ep = ep_next) {
ep_next = ep->next;
delete ep;
}
dp_next = dp->next;
delete dp;
}
dirlist = 0;
}
ExpWDir *WbExpWNav::dir_insert( char *name, char *description)
{
ExpWDir *dir = new ExpWDir();
strncpy( dir->name, name, sizeof(dir->name));
strncpy( dir->description, description, sizeof(dir->description));
if ( !dirlist)
dirlist = dir;
else {
ExpWDir *dp;
for ( dp = dirlist; dp->next; dp = dp->next) ;
dp->next = dir;
}
return dir;
}
ExpWCopy *ExpWDir::copy_insert( char *source, char *target, int update)
{
ExpWCopy *copy = new ExpWCopy();
strncpy( copy->source, source, sizeof(copy->source));
strncpy( copy->target, target, sizeof(copy->target));
copy->update = update;
if ( !copylist)
copylist = copy;
else {
ExpWCopy *cp;
for ( cp = copylist; cp->next; cp = cp->next) ;
cp->next = copy;
}
return copy;
}
ExpWExec *ExpWDir::exec_insert( char *dir, char *command, int update)
{
ExpWExec *exec = new ExpWExec();
strncpy( exec->dir, dir, sizeof(exec->dir));
strncpy( exec->command, command, sizeof(exec->command));
exec->update = update;
if ( !execlist)
execlist = exec;
else {
ExpWExec *ep;
for ( ep = execlist; ep->next; ep = ep->next) ;
ep->next = exec;
}
return exec;
}
void WbExpWNav::clear()
{
brow_DeleteAll( brow->ctx);
}
pwr_tStatus WbExpWNav::exp()
{
int sts;
ItemExp *item;
pwr_tCmd cmd;
brow_tNode node;
int rval;
switch ( type) {
case expw_eType_Import:
case expw_eType_Export: {
for ( sts = brow_GetFirst( brow->ctx, &node);
ODD(sts);
sts = brow_GetNext( brow->ctx, node, &node)) {
brow_GetRadiobutton( node, 0, &rval);
if ( rval) {
brow_GetUserData( node, (void **)&item);
sprintf( cmd, "cp -a %s %s", item->source, item->target);
printf( "%s\n", cmd);
sts = system( cmd);
if ( sts != 0) {
char msg[250];
snprintf( msg, sizeof(msg), "Export error %d, %s", WEXITSTATUS(sts), cmd);
MsgWindow::message( 'E', msg, msgw_ePop_Default);
}
}
}
show();
break;
}
case expw_eType_BuildProject: {
for ( ExpWDir *dp = dirlist; dp; dp = dp->next) {
if ( !dp->update)
continue;
for ( ExpWCopy *cp = dp->copylist; cp; cp = cp->next) {
if ( !cp->update)
continue;
sprintf( cmd, "cp -a %s %s", cp->source, cp->target);
printf( "%s\n", cmd);
sts = system( cmd);
if ( sts != 0) {
char msg[250];
snprintf( msg, sizeof(msg), "Build error %d, %s", WEXITSTATUS(sts), cmd);
MsgWindow::message( 'E', msg, msgw_ePop_Default);
}
}
}
for ( ExpWDir *dp = dirlist; dp; dp = dp->next) {
if ( !dp->update)
continue;
for ( ExpWExec *ep = dp->execlist; ep; ep = ep->next) {
if ( !ep->update)
continue;
sprintf( cmd, "cd %s;%s", ep->dir, ep->command);
printf( "%s\n", cmd);
sts = system( cmd);
if ( sts != 0) {
char msg[250];
snprintf( msg, sizeof(msg), "Build error %d, %s", WEXITSTATUS(sts), cmd);
MsgWindow::message( 'E', msg, msgw_ePop_Default);
}
}
}
show();
break;
}
}
return LDH__SUCCESS;
}
void WbExpWNav::check_all()
{
switch ( type) {
case expw_eType_Import:
case expw_eType_Export: {
int sts;
brow_tNode node;
for ( sts = brow_GetFirst( brow->ctx, &node);
ODD(sts);
sts = brow_GetNext( brow->ctx, node, &node))
brow_SetRadiobutton( node, 0, 1);
break;
}
case expw_eType_BuildProject: {
for ( ExpWDir *dir = dirlist; dir; dir = dir->next) {
dir->update = 1;
for ( ExpWCopy *cp = dir->copylist; cp; cp = cp->next)
cp->update = 1;
for ( ExpWExec *ep = dir->execlist; ep; ep = ep->next)
ep->update = 1;
}
redraw();
break;
}
default: ;
}
}
void WbExpWNav::check_clear()
{
switch ( type) {
case expw_eType_Import:
case expw_eType_Export: {
int sts;
brow_tNode node;
for ( sts = brow_GetFirst( brow->ctx, &node);
ODD(sts);
sts = brow_GetNext( brow->ctx, node, &node))
brow_SetRadiobutton( node, 0, 0);
break;
}
case expw_eType_BuildProject: {
for ( ExpWDir *dir = dirlist; dir; dir = dir->next) {
dir->update = 0;
for ( ExpWCopy *cp = dir->copylist; cp; cp = cp->next)
cp->update = 0;
for ( ExpWExec *ep = dir->execlist; ep; ep = ep->next)
ep->update = 0;
}
redraw();
break;
}
default: ;
}
}
void WbExpWNav::check_reset()
{
show();
}
ItemExp::ItemExp( WbExpWNav *item_expwnav, char *item_source, char *item_target, ExpWList *item_listp,
brow_tNode dest, flow_eDest dest_code):
expwnav(item_expwnav), button_value(0), listp(item_listp)
{
type = expwitem_eItemType_Exp;
strncpy( source, item_source, sizeof(source));
strncpy( target, item_target, sizeof(target));
if ( expwnav->editmode)
brow_CreateNode( expwnav->brow->ctx, (char *)"Exp", expwnav->brow->nc_eexp,
dest, dest_code, (void *) this, 1, &node);
else
brow_CreateNode( expwnav->brow->ctx, (char *)"Exp", expwnav->brow->nc_exp,
dest, dest_code, (void *) this, 1, &node);
int annot = 0;
brow_SetAnnotation( node, annot++, source, strlen(source));
brow_SetAnnotation( node, annot++, target, strlen(target));
brow_SetAnnotPixmap( node, 0, expwnav->brow->pixmap_export);
}
void ItemExp::update()
{
if ( button_value)
brow_SetAnnotation( node, 1, "1", 1);
else
brow_SetAnnotation( node, 1, "0", 1);
}
void ItemExp::set( int value)
{
button_value = value;
brow_SetRadiobutton( node, 0, value);
if ( listp)
listp->update = value;
}
ItemDir::ItemDir( WbExpWNav *item_expwnav, ExpWDir *item_dir, char *item_name, char *item_description,
brow_tNode dest, flow_eDest dest_code):
expwnav(item_expwnav), dir(item_dir), button_value(0)
{
type = expwitem_eItemType_Dir;
strncpy( name, item_name, sizeof(name));
strncpy( description, item_description, sizeof(description));
if ( expwnav->editmode)
brow_CreateNode( expwnav->brow->ctx, (char *)"Dir", expwnav->brow->nc_eexp,
dest, dest_code, (void *) this, 1, &node);
else
brow_CreateNode( expwnav->brow->ctx, (char *)"Dir", expwnav->brow->nc_exp,
dest, dest_code, (void *) this, 1, &node);
int annot = 0;
brow_SetAnnotation( node, annot++, name, strlen(name));
brow_SetAnnotation( node, annot++, description, strlen(description));
// Check if map or leaf
int child_exist = 0;
if ( expwnav->show_all) {
if ( dir->copylist || dir->execlist)
child_exist = 1;
}
else {
if ( dir->execlist)
child_exist = 1;
else {
for ( ExpWCopy *cp = dir->copylist; cp; cp = cp->next) {
if ( cp->update) {
child_exist = 1;
break;
}
}
}
}
if ( child_exist)
brow_SetAnnotPixmap( node, 0, expwnav->brow->pixmap_map);
else
brow_SetAnnotPixmap( node, 0, expwnav->brow->pixmap_leaf);
}
void ItemDir::update()
{
if ( button_value)
brow_SetAnnotation( node, 1, "1", 1);
else
brow_SetAnnotation( node, 1, "0", 1);
}
void ItemDir::set( int value)
{
button_value = value;
brow_SetRadiobutton( node, 0, value);
dir->update = value;
}
int ItemDir::open_children()
{
int child_exist = 0;
if ( brow_IsOpen( node)) {
// Close
brow_SetNodraw( expwnav->brow->ctx);
brow_CloseNode( expwnav->brow->ctx, node);
if ( brow_IsOpen( node) & expw_mOpen_Children)
brow_SetAnnotPixmap( node, 0, expwnav->brow->pixmap_map);
brow_ResetOpen( node, expw_mOpen_All);
brow_ResetNodraw( expwnav->brow->ctx);
brow_Redraw( expwnav->brow->ctx, 0);
dir->open = 0;
}
else {
// Create some children
brow_SetNodraw( expwnav->brow->ctx);
for ( ExpWExec *ep = dir->execlist; ep; ep = ep->next) {
ItemExp *item = new ItemExp( expwnav, ep->dir, ep->command, ep, node, flow_eDest_IntoLast);
if ( ep->update)
brow_SetRadiobutton( item->node, 0, 1);
child_exist = 1;
}
for ( ExpWCopy *cp = dir->copylist; cp; cp = cp->next) {
if ( !expwnav->show_all && !cp->update)
continue;
ItemExp *item = new ItemExp( expwnav, cp->source, cp->target, cp, node, flow_eDest_IntoLast);
if ( cp->update)
brow_SetRadiobutton( item->node, 0, 1);
child_exist = 1;
}
if ( child_exist) {
brow_SetOpen( node, expw_mOpen_Children);
brow_SetAnnotPixmap( node, 0, expwnav->brow->pixmap_openmap);
dir->open = 1;
}
brow_ResetNodraw( expwnav->brow->ctx);
if ( child_exist)
brow_Redraw( expwnav->brow->ctx, 0);
else
return 0;
}
return 1;
}
int ItemDir::close()
{
if ( brow_IsOpen( node)) {
// Close
brow_SetNodraw( expwnav->brow->ctx);
brow_CloseNode( expwnav->brow->ctx, node);
if ( brow_IsOpen( node) & expw_mOpen_Children)
brow_SetAnnotPixmap( node, 0, expwnav->brow->pixmap_map);
brow_ResetOpen( node, expw_mOpen_All);
brow_ResetNodraw( expwnav->brow->ctx);
brow_Redraw( expwnav->brow->ctx, 0);
dir->open = 0;
}
return 1;
}
/**
* Proview Open Source Process Control.
* Copyright (C) 2005-2014 SSAB EMEA AB.
*
* This file is part of Proview.
*
* 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 Proview. If not, see <http://www.gnu.org/licenses/>
*
* Linking Proview statically or dynamically with other modules is
* making a combined work based on Proview. Thus, the terms and
* conditions of the GNU General Public License cover the whole
* combination.
*
* In addition, as a special exception, the copyright holders of
* Proview give you permission to, from the build function in the
* Proview Configurator, combine Proview with modules generated by the
* Proview PLC Editor to a PLC program, regardless of the license
* terms of these modules. You may copy and distribute the resulting
* combined work under the terms of your choice, provided that every
* copy of the combined work is accompanied by a complete copy of
* the source code of Proview (the version used to produce the
* combined work), being distributed under the terms of the GNU
* General Public License plus this exception.
**/
#ifndef wb_expwnav_h
#define wb_expwnav_h
/* wb_expwnav.h -- Backupfile display window */
#ifndef pwr_h
# include "pwr.h"
#endif
#ifndef flow_h
#include "flow.h"
#endif
#ifndef flow_browctx_h
#include "flow_browctx.h"
#endif
#ifndef flow_browapi_h
#include "flow_browapi.h"
#endif
#ifndef wb_bck_h
#include "wb_bck.h"
#endif
typedef enum {
expw_mOpen_All = ~0,
expw_mOpen_Children = 1 << 0,
} expw_mOpen;
typedef enum {
expw_eType_Export,
expw_eType_Import,
expw_eType_BuildProject
} expw_eType;
typedef enum {
expwitem_eItemType_Exp,
expwitem_eItemType_Dir
} expwitem_eItemType;
typedef enum {
expw_eListType_Dir,
expw_eListType_Copy,
expw_eListType_Exec,
} expw_eListType;
class ExpWList {
public:
int update;
ExpWList() : update(0) {}
};
class ExpWCopy : public ExpWList {
public:
ExpWCopy *next;
ExpWCopy *prev;
pwr_tFileName source;
pwr_tFileName target;
ExpWCopy() : next(0), prev(0) {}
};
class ExpWExec : public ExpWList {
public:
ExpWExec *next;
ExpWExec *prev;
pwr_tCmd command;
pwr_tFileName dir;
ExpWExec() : next(0), prev(0) {}
};
class ExpWDir : public ExpWList {
public:
ExpWDir *next;
ExpWDir *prev;
ExpWCopy *copylist;
ExpWExec *execlist;
int open;
char name[80];
char description[80];
ExpWDir() : next(0), prev(0), copylist(0), execlist(0), open(0) {}
ExpWCopy *copy_insert( char *source, char *target, int update);
ExpWExec *exec_insert( char *dir, char *command, int update);
};
class WbExpWNavBrow {
public:
WbExpWNavBrow( BrowCtx *brow_ctx, void *lwnav) : ctx(brow_ctx), expwnav(lwnav) {};
~WbExpWNavBrow();
BrowCtx *ctx;
void *expwnav;
brow_tNodeClass nc_exp;
brow_tNodeClass nc_eexp;
flow_sAnnotPixmap *pixmap_export;
flow_sAnnotPixmap *pixmap_map;
flow_sAnnotPixmap *pixmap_openmap;
flow_sAnnotPixmap *pixmap_leaf;
void free_pixmaps();
void allocate_pixmaps();
void create_nodeclasses();
void brow_setup();
};
class WbExpWNav {
public:
WbExpWNav( void *l_parent_ctx, ldh_tSesContext l_ldhses, int l_type, int l_editmode);
virtual ~WbExpWNav();
void *parent_ctx;
ldh_tSesContext ldhses;
WbExpWNavBrow *brow;
int type;
int editmode;
int show_all;
ExpWDir *dirlist;
virtual void set_input_focus() {}
void show();
void show_export_import();
void show_buildproject();
void redraw();
void clear();
void zoom( double zoom_factor);
void unzoom();
pwr_tStatus exp();
void check_all();
void check_clear();
void check_reset();
void set_show_all( int set);
ExpWDir *dir_find( char *name);
ExpWDir *dir_insert( char *name, char *description);
void list_free();
static int init_brow_cb( FlowCtx *fctx, void *client_data);
static int brow_cb( FlowCtx *ctx, flow_tEvent event);
};
class ItemExp {
public:
ItemExp( WbExpWNav *expwnav, char *item_source, char *item_target, ExpWList *item_listp,
brow_tNode dest, flow_eDest dest_code);
expwitem_eItemType type;
WbExpWNav *expwnav;
brow_tNode node;
pwr_tFileName source;
pwr_tFileName target;
int button_value;
ExpWList *listp;
void set( int value);
void update();
virtual ~ItemExp() {}
};
class ItemDir {
public:
ItemDir( WbExpWNav *expwnav, ExpWDir *item_dir, char *item_name, char *item_description,
brow_tNode dest, flow_eDest dest_code);
expwitem_eItemType type;
WbExpWNav *expwnav;
ExpWDir *dir;
brow_tNode node;
char name[80];
char description[80];
int button_value;
int open_children();
int close();
void set( int value);
void update();
virtual ~ItemDir() {}
};
#endif
...@@ -2432,6 +2432,239 @@ pwr_tStatus lfu_SaveDirectoryVolume( ...@@ -2432,6 +2432,239 @@ pwr_tStatus lfu_SaveDirectoryVolume(
sts = ldh_GetNextSibling( ldhses, dbobjid, &dbobjid); sts = ldh_GetNextSibling( ldhses, dbobjid, &dbobjid);
} }
// Export files
pwr_tOid exportoid;
for ( sts = ldh_GetClassList( ldhses, pwr_cClass_Export, &exportoid);
ODD(sts);
sts = ldh_GetNextObject( ldhses, exportoid, &exportoid)) {
pwr_tFileName dir;
char *dir_ptr;
pwr_mExportImportMask *components_ptr;
pwr_tOid appoid;
sts = ldh_GetObjectPar( ldhses, exportoid, "DevBody",
"TargetDirectory", (char **)&dir_ptr, &size);
if ( EVEN(sts)) return sts;
strncpy( dir, dir_ptr, sizeof(dir));
free( dir_ptr);
if ( strcmp( dir, "") == 0) {
MsgWindow::message( 'E', "Export directory is missing", msgw_ePop_Default);
continue;
}
if ( dir[strlen(dir)-1] != '/')
strcat( dir, "/");
sts = ldh_GetObjectPar( ldhses, exportoid, "DevBody",
"Components", (char **)&components_ptr, &size);
if (EVEN(sts)) return sts;
if ( *components_ptr & pwr_mExportImportMask_IncludeFiles)
fprintf( file, "export $pwrp_inc/*.h %s\n", dir);
if ( *components_ptr & pwr_mExportImportMask_GraphFiles)
fprintf( file, "export $pwrp_exe/*.pwg %s\n", dir);
if ( *components_ptr & pwr_mExportImportMask_FlowFiles)
fprintf( file, "export $pwrp_load/*.flw %s\n", dir);
free( components_ptr);
for ( sts = ldh_GetChild( ldhses, exportoid, &appoid);
ODD(sts);
sts = ldh_GetNextSibling( ldhses, appoid, &appoid)) {
sts = ldh_GetObjectClass( ldhses, appoid, &cid);
if ( EVEN(sts)) return sts;
switch ( cid) {
case pwr_cClass_ApplExport: {
sts = ldh_GetObjectPar( ldhses, appoid, "DevBody",
"Source", (char **)&source_ptr, &size);
if ( EVEN(sts)) return sts;
sts = ldh_GetObjectPar( ldhses, appoid, "DevBody",
"Target", (char **)&target_ptr, &size);
if ( EVEN(sts)) return sts;
fprintf( file, "export %s %s%s\n", source_ptr, dir, target_ptr);
free( source_ptr);
free( target_ptr);
break;
}
default: ;
}
}
}
// Import files
pwr_tOid importoid;
for ( sts = ldh_GetClassList( ldhses, pwr_cClass_Import, &importoid);
ODD(sts);
sts = ldh_GetNextObject( ldhses, importoid, &importoid)) {
pwr_tFileName dir;
char *dir_ptr;
pwr_mExportImportMask *components_ptr;
pwr_tOid appoid;
sts = ldh_GetObjectPar( ldhses, importoid, "DevBody",
"SourceDirectory", (char **)&dir_ptr, &size);
if ( EVEN(sts)) return sts;
strncpy( dir, dir_ptr, sizeof(dir));
free( dir_ptr);
if ( strcmp( dir, "") == 0) {
MsgWindow::message( 'E', "Import directory is missing", msgw_ePop_Default);
continue;
}
if ( dir[strlen(dir)-1] != '/')
strcat( dir, "/");
sts = ldh_GetObjectPar( ldhses, importoid, "DevBody",
"Components", (char **)&components_ptr, &size);
if (EVEN(sts)) return sts;
if ( *components_ptr & pwr_mExportImportMask_IncludeFiles)
fprintf( file, "import %s*.h $pwrp_inc/\n", dir);
if ( *components_ptr & pwr_mExportImportMask_GraphFiles)
fprintf( file, "import %s*.pwg $pwrp/exe/\n", dir);
if ( *components_ptr & pwr_mExportImportMask_FlowFiles)
fprintf( file, "import %s*.flw $pwrp_load/\n", dir);
free( components_ptr);
for ( sts = ldh_GetChild( ldhses, importoid, &appoid);
ODD(sts);
sts = ldh_GetNextSibling( ldhses, appoid, &appoid)) {
sts = ldh_GetObjectClass( ldhses, appoid, &cid);
if ( EVEN(sts)) return sts;
switch ( cid) {
case pwr_cClass_ApplImport: {
sts = ldh_GetObjectPar( ldhses, appoid, "DevBody",
"Source", (char **)&source_ptr, &size);
if ( EVEN(sts)) return sts;
sts = ldh_GetObjectPar( ldhses, appoid, "DevBody",
"Target", (char **)&target_ptr, &size);
if ( EVEN(sts)) return sts;
fprintf( file, "import %s%s %s\n", dir, source_ptr, target_ptr);
free( source_ptr);
free( target_ptr);
break;
}
default: ;
}
}
}
// Build files
pwr_tOid builddir_oid;
pwr_tOid coid;
pwr_tObjName oname;
pwr_tOName fullname;
pwr_tOid poid;
for ( sts = ldh_GetClassList( ldhses, pwr_cClass_BuildDirectory, &builddir_oid);
ODD(sts);
sts = ldh_GetNextObject( ldhses, builddir_oid, &builddir_oid)) {
pwr_tFileName dir;
char *dir_ptr;
char *descr_ptr;
sts = ldh_ObjidToName( ldhses, builddir_oid, ldh_eName_Object,
oname, sizeof(oname), &size);
strcpy( fullname, oname);
for ( sts = ldh_GetParent( ldhses, builddir_oid, &poid);
ODD(sts);
sts = ldh_GetParent( ldhses, poid, &poid)) {
pwr_tOName tmp;
pwr_tCid pcid;
sts = ldh_GetObjectClass( ldhses, poid, &pcid);
if ( EVEN(sts)) return sts;
if ( pcid != pwr_cClass_BuildDirectory)
break;
strcpy( tmp, fullname);
sts = ldh_ObjidToName( ldhses, poid, ldh_eName_Object,
oname, sizeof(oname), &size);
if ( EVEN(sts)) return sts;
strcpy( fullname, oname);
strcat( fullname, "-");
strcat( fullname, tmp);
}
sts = ldh_GetObjectPar( ldhses, builddir_oid, "DevBody",
"Directory", (char **)&dir_ptr, &size);
if ( EVEN(sts)) return sts;
strncpy( dir, dir_ptr, sizeof(dir));
free( dir_ptr);
if ( strcmp( dir, "") == 0) {
MsgWindow::message( 'E', "Build directory is missing", msgw_ePop_Default);
continue;
}
if ( dir[strlen(dir)-1] != '/')
strcat( dir, "/");
sts = ldh_GetObjectPar( ldhses, builddir_oid, "DevBody",
"Description", (char **)&descr_ptr, &size);
if ( EVEN(sts)) return sts;
fprintf( file, "builddir %s \"%s\"\n", fullname, descr_ptr);
free( descr_ptr);
for ( sts = ldh_GetChild( ldhses, builddir_oid, &coid);
ODD(sts);
sts = ldh_GetNextSibling( ldhses, coid, &coid)) {
sts = ldh_GetObjectClass( ldhses, coid, &cid);
if ( EVEN(sts)) return sts;
switch ( cid) {
case pwr_cClass_BuildCopy: {
sts = ldh_GetObjectPar( ldhses, coid, "DevBody",
"Source", (char **)&source_ptr, &size);
if ( EVEN(sts)) return sts;
sts = ldh_GetObjectPar( ldhses, coid, "DevBody",
"Target", (char **)&target_ptr, &size);
if ( EVEN(sts)) return sts;
fprintf( file, "buildcopy %s %s%s %s\n", cdh_Low(fullname), dir, source_ptr, target_ptr);
free( source_ptr);
free( target_ptr);
break;
}
case pwr_cClass_BuildExecute: {
char *command_ptr;
sts = ldh_GetObjectPar( ldhses, coid, "DevBody",
"Command", (char **)&command_ptr, &size);
if ( EVEN(sts)) return sts;
fprintf( file, "buildexec %s %s \"%s\"\n", cdh_Low(fullname), dir, command_ptr);
free( command_ptr);
break;
}
default: ;
}
}
}
fclose( file); fclose( file);
#if defined OS_VMS #if defined OS_VMS
system( "purge/nolog " load_cNameDistribute); system( "purge/nolog " load_cNameDistribute);
......
...@@ -75,10 +75,6 @@ ...@@ -75,10 +75,6 @@
# include "cow_wow.h" # include "cow_wow.h"
#endif #endif
//#ifndef cow_xhelp_h
//#include "cow_xhelp.h"
//#endif
#ifndef wb_h #ifndef wb_h
#include "wb.h" #include "wb.h"
#endif #endif
...@@ -91,6 +87,10 @@ ...@@ -91,6 +87,10 @@
#include "wb_bckw.h" #include "wb_bckw.h"
#endif #endif
#ifndef wb_expw_h
#include "wb_expw.h"
#endif
#define wnav_cVersion "X3.3a" #define wnav_cVersion "X3.3a"
#define wnav_cScriptDescKey "!** Description" #define wnav_cScriptDescKey "!** Description"
...@@ -347,6 +347,7 @@ class WNav : public WUtility{ ...@@ -347,6 +347,7 @@ class WNav : public WUtility{
pwr_tStatus *status) { return 0;} pwr_tStatus *status) { return 0;}
virtual WCrr *wcrr_new( pwr_tAttrRef *aref, pwr_tStatus *status) { return 0;} virtual WCrr *wcrr_new( pwr_tAttrRef *aref, pwr_tStatus *status) { return 0;}
virtual WbBckW *bckw_new( char *name, wb_bck_list *list, pwr_tStatus *status) { return 0;} virtual WbBckW *bckw_new( char *name, wb_bck_list *list, pwr_tStatus *status) { return 0;}
virtual WbExpW *expw_new( char *name, int type, pwr_tStatus *status) { return 0;}
static int brow_cb( FlowCtx *ctx, flow_tEvent event); static int brow_cb( FlowCtx *ctx, flow_tEvent event);
static int init_brow_base_cb( FlowCtx *fctx, void *client_data); static int init_brow_base_cb( FlowCtx *fctx, void *client_data);
......
...@@ -453,7 +453,7 @@ dcli_tCmdTable wnav_command_table[] = { ...@@ -453,7 +453,7 @@ dcli_tCmdTable wnav_command_table[] = {
"BUILD", "BUILD",
&wnav_build_func, &wnav_build_func,
{ "dcli_arg1", "dcli_arg2", "/FORCE", "/DEBUG", "/CROSSREFERENCE", { "dcli_arg1", "dcli_arg2", "/FORCE", "/DEBUG", "/CROSSREFERENCE",
"/MANUAL", "/NAME", ""} "/MANUAL", "/NAME", "/WINDOW", ""}
}, },
{ {
"CHECK", "CHECK",
...@@ -474,7 +474,7 @@ dcli_tCmdTable wnav_command_table[] = { ...@@ -474,7 +474,7 @@ dcli_tCmdTable wnav_command_table[] = {
"BACKUP", "BACKUP",
&wnav_backup_func, &wnav_backup_func,
{ "dcli_arg1", "dcli_arg2", "dcli_arg13", "/FILE", "/FILE1", "/FILE2", "/OUT", { "dcli_arg1", "dcli_arg2", "dcli_arg13", "/FILE", "/FILE1", "/FILE2", "/OUT",
"/WINDOW", ""} "/WINDOW", ""},
}, },
{"",}}; {"",}};
...@@ -5150,6 +5150,91 @@ static int wnav_build_func( void *client_data, ...@@ -5150,6 +5150,91 @@ static int wnav_build_func( void *client_data,
free( sel_list); free( sel_list);
free( sel_is_attr); free( sel_is_attr);
} }
else if ( cdh_NoCaseStrncmp( arg1_str, "PROJECT", strlen( arg1_str)) == 0) {
if ( !(CoLogin::privilege() & pwr_mPrv_DevConfig)) {
wnav->message( 'E', "User is not authorized to build");
return WNAV__NOTAUTHORIZED;
}
if ( ODD( dcli_get_qualifier( "/WINDOW", 0, 0))) {
pwr_tStatus sts;
sts = wnav_wccm_get_ldhsession_cb( wnav, &wnav->ldhses);
if ( EVEN(sts)) return sts;
wnav->expw_new( (char *)"Build Project", expw_eType_BuildProject, &sts);
if ( EVEN(sts))
wnav->message(' ', wnav_get_message(sts));
}
else {
char arg2_str[200];
int arg2_sts;
char *dirp;
wb_build build( *(wb_session *)wnav->ldhses, wnav);
build.opt.force = ODD( dcli_get_qualifier( "/FORCE", 0, 0));
build.opt.debug = ODD( dcli_get_qualifier( "/DEBUG", 0, 0));
build.opt.crossref = ODD( dcli_get_qualifier( "/CROSSREFERENCE", 0, 0));
build.opt.manual = ODD( dcli_get_qualifier( "/MANUAL", 0, 0));
arg2_sts = dcli_get_qualifier( "dcli_arg2", arg2_str, sizeof(arg2_str));
if ( EVEN(arg1_sts))
dirp = 0;
else
dirp = arg2_str;
build.project( dirp);
wnav->message(' ', wnav_get_message(build.sts()));
}
}
else if ( cdh_NoCaseStrncmp( arg1_str, "EXPORT", strlen( arg1_str)) == 0) {
// command is "BUILD EXPORT"
if ( !(CoLogin::privilege() & pwr_mPrv_DevConfig)) {
wnav->message( 'E', "User is not authorized to export");
return WNAV__NOTAUTHORIZED;
}
if ( ODD( dcli_get_qualifier( "/WINDOW", 0, 0))) {
pwr_tStatus sts;
sts = wnav_wccm_get_ldhsession_cb( wnav, &wnav->ldhses);
if ( EVEN(sts)) return sts;
wnav->expw_new( (char *)"Export", expw_eType_Export, &sts);
if ( EVEN(sts))
wnav->message(' ', wnav_get_message(sts));
}
else {
// TODO
}
}
else if ( cdh_NoCaseStrncmp( arg1_str, "IMPORT", strlen( arg1_str)) == 0) {
// command is "BUILD IMPORT"
if ( !(CoLogin::privilege() & pwr_mPrv_DevConfig)) {
wnav->message( 'E', "User is not authorized to import");
return WNAV__NOTAUTHORIZED;
}
if ( ODD( dcli_get_qualifier( "/WINDOW", 0, 0))) {
pwr_tStatus sts;
sts = wnav_wccm_get_ldhsession_cb( wnav, &wnav->ldhses);
if ( EVEN(sts)) return sts;
wnav->expw_new( (char *)"Import", expw_eType_Import, &sts);
if ( EVEN(sts))
wnav->message(' ', wnav_get_message(sts));
}
else {
// TODO
}
}
else { else {
wnav->message('E', "Syntax error"); wnav->message('E', "Syntax error");
return WNAV__SYNTAX; return WNAV__SYNTAX;
......
...@@ -2071,6 +2071,30 @@ void Wtt::activate_buildnode() ...@@ -2071,6 +2071,30 @@ void Wtt::activate_buildnode()
reset_cursor(); reset_cursor();
} }
void Wtt::activate_buildproject()
{
char cmd[80] = "build project/window";
if ( !focused_wnav)
set_focus_default();
focused_wnav->command( cmd);
}
void Wtt::activate_buildimport()
{
char cmd[80] = "build import/window";
if ( !focused_wnav)
set_focus_default();
focused_wnav->command( cmd);
}
void Wtt::activate_buildexport()
{
char cmd[80] = "build export/window";
if ( !focused_wnav)
set_focus_default();
focused_wnav->command( cmd);
}
void Wtt::activate_distribute() void Wtt::activate_distribute()
{ {
......
...@@ -252,6 +252,9 @@ class Wtt : public WUtility { ...@@ -252,6 +252,9 @@ class Wtt : public WUtility {
void activate_openclasseditor(); void activate_openclasseditor();
void activate_buildvolume(); void activate_buildvolume();
void activate_buildnode(); void activate_buildnode();
void activate_buildproject();
void activate_buildimport();
void activate_buildexport();
void activate_distribute(); void activate_distribute();
void activate_showcrossref(); void activate_showcrossref();
void activate_updateclasses(); void activate_updateclasses();
......
#define xnav_bitmap_export10_width 10
#define xnav_bitmap_export10_height 10
static char xnav_bitmap_export10_bits[] = {
0x20, 0x00, 0x60, 0x00, 0xbf, 0x00, 0x01, 0x01, 0x01, 0x02, 0x01, 0x02,
0x01, 0x01, 0xbf, 0x00, 0x60, 0x00, 0x20, 0x00};
#define xnav_bitmap_export14_width 14
#define xnav_bitmap_export14_height 14
static char xnav_bitmap_export14_bits[] = {
0x80, 0x00, 0x80, 0x01, 0x80, 0x02, 0xff, 0x04, 0x01, 0x08, 0x01, 0x10,
0x01, 0x20, 0x01, 0x20, 0x01, 0x10, 0x01, 0x08, 0xff, 0x04, 0x80, 0x02,
0x80, 0x01, 0x80, 0x00};
#define xnav_bitmap_export16_width 16
#define xnav_bitmap_export16_height 16
static char xnav_bitmap_export16_bits[] = {
0x00, 0x01, 0x00, 0x03, 0x00, 0x05, 0x00, 0x09, 0xff, 0x11, 0x01, 0x20,
0x01, 0x40, 0x01, 0x80, 0x01, 0x80, 0x01, 0x40, 0x01, 0x20, 0xff, 0x11,
0x00, 0x09, 0x00, 0x05, 0x00, 0x03, 0x00, 0x01};
#define xnav_bitmap_export18_width 18
#define xnav_bitmap_export18_height 18
static char xnav_bitmap_export18_bits[] = {
0x00, 0x02, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x12, 0x00,
0xff, 0x23, 0x00, 0x01, 0x40, 0x00, 0x01, 0x80, 0x00, 0x01, 0x00, 0x01,
0x01, 0x00, 0x02, 0x01, 0x00, 0x02, 0x01, 0x00, 0x01, 0x01, 0x80, 0x00,
0x01, 0x40, 0x00, 0xff, 0x23, 0x00, 0x00, 0x12, 0x00, 0x00, 0x0a, 0x00,
0x00, 0x06, 0x00, 0x00, 0x02, 0x00};
#define xnav_bitmap_export20_width 20
#define xnav_bitmap_export20_height 20
static char xnav_bitmap_export20_bits[] = {
0x00, 0x04, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x14, 0x00, 0x00, 0x24, 0x00,
0xff, 0x47, 0x00, 0x01, 0x80, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 0x02,
0x01, 0x00, 0x04, 0x01, 0x00, 0x08, 0x01, 0x00, 0x08, 0x01, 0x00, 0x04,
0x01, 0x00, 0x02, 0x01, 0x00, 0x01, 0x01, 0x80, 0x00, 0xff, 0x47, 0x00,
0x00, 0x24, 0x00, 0x00, 0x14, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x04, 0x00};
#define xnav_bitmap_export24_width 24
#define xnav_bitmap_export24_height 24
static char xnav_bitmap_export24_bits[] = {
0x00, 0x10, 0x00, 0x00, 0x30, 0x00, 0x00, 0x50, 0x00, 0x00, 0x90, 0x00,
0x00, 0x10, 0x01, 0xff, 0x1f, 0x02, 0x01, 0x00, 0x04, 0x01, 0x00, 0x08,
0x01, 0x00, 0x10, 0x01, 0x00, 0x20, 0x01, 0x00, 0x40, 0x01, 0x00, 0x80,
0x01, 0x00, 0x80, 0x01, 0x00, 0x40, 0x01, 0x00, 0x20, 0x01, 0x00, 0x10,
0x01, 0x00, 0x08, 0x01, 0x00, 0x04, 0xff, 0x1f, 0x02, 0x00, 0x10, 0x01,
0x00, 0x90, 0x00, 0x00, 0x50, 0x00, 0x00, 0x30, 0x00, 0x00, 0x10, 0x00};
#define xnav_bitmap_export8_width 8
#define xnav_bitmap_export8_height 8
static char xnav_bitmap_export8_bits[] = {
0x10, 0x30, 0x5f, 0x81, 0x81, 0x5f, 0x30, 0x10};
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