------------------------------------------------------------------------
--
-- (c) Copyright 1998 to Current Year AVEVA Solutions Limited
--
-- File: [Link]
-- Type: Function Definition
-- Group: Graphic View
-- Keyword: VIEW
-- Module: common
-- Replaces:
--
-- Author: [Link]
-- Created: Tue Jan 20 [Link] WAT 1998
--
-- Last modified by $Author: nrh $ on $Date: 2003/01/09 [Link] $
-- $Revision: 1.28 $
--
-- Description:
-- Standard Design Graphic View
--
------------------------------------------------------------------------
--
-- Function Type: Function/Procedure
-- Arguments:
-- [#] [R/RW] [Data Type] [Description]
-- 1 R REAL Form number
-- Return:
-- [Data Type] [Description]
-- FORM Form created
--
------------------------------------------------------------------------
-- Define function
define function !!gph3DDesign(!number is REAL) is FORM
-- Initialise Variables
!form = '!!gph3DDesign' & !number
!module = !!module()
-- Define form
setup form $!<form> resize DOCUMENT
$!<form>.formTitle = 'Default'
$!<form>.iconTitle = '3DView'
$!<form>.callback = ''
$!<form>.formRevision = ' $Revision: 1.28 $ '
$!<form>.cancelCall = '!'
-- Body of form definition
-- Define Prompt
para .prompt at x0 ymax width 80 lines 1
-- New model editor view
if(![Link]() eq 'design') then
!volumeType = 'GIVolume'
!autoCeIcon = !
!rotateCeIcon = !
!mouseZoomRectIcon = !
!mouseZoomInOutIcon = !
!mouseRotateIcon = !
!mousePanIcon = !
!mouseWalkIcon = !
!mouseWalkIconOff = !
!restoreOneIcon = !
!restoreOneIconOff = !
!restoreTwoIcon = !
!restoreTwoIconOff = !
!restoreThreeIcon = !
!restoreThreeIconOff = !
!restoreFourIcon = !
!restoreFourIconOff = !
!zoomToCEIcon = !
!zoomToIdentifyIcon = !
!walkToDrawlistIcon = !
!zoomToSelectionIcon = !
!zoomToSelIconOff = !
!clippingIconOn = !
!clippingIconOff = !
!clipCE = !
--------------------------------------------------------------------------------
--------------------------------------------------
-- DO NOT ATTEMPT TO MODIFY THE NAMES OR DEFINITIONS OF ANY .core BUTTONS. THE
SE ARE CONTROLLED BY PDMS DESIGN CORE.
--------------------------------------------------------------------------------
--------------------------------------------------
-- define view control buttons
button .autoCE tooltip 'Limits CE & Options'
pixmap /$!<autoCeIcon> width 16 height 16 at x0 ymax+0.2 callba
ck |!|
button .coreZoomToSelectionButton tooltip 'Zoom to Selection'
pixmap /$!<zoomToSelectionIcon> width 16 height 16 at xmin ymax
button .coreWalkToDrawlistButton tooltip 'Walk to Draw List'
pixmap /$!<walkToDrawlistIcon> width 16 height 16 at xmin ymax
button .coreCentreButton tooltip 'Centre on Selection'
pixmap /$!<rotateCeIcon> width 16 height 16 at xmin ymax callba
ck |!|
-- Middle mouse button view manipulation modes
button .coreZoomRectButton toggle tooltip 'Middle mouse button: Zoom Rect
angle' pixmap /$!<mouseZoomRectIcon> /$!<mouseZoomRectIcon>
width 16 height 16 at xmin ymax+0.3
button .coreZoomInOutButton toggle tooltip 'Middle mouse button: Zoom In/O
ut' pixmap /$!<mouseZoomInOutIcon> /$!<mouseZoomInOutIcon>
width 16 height 16 at xmin ymax
button .coreRotateButton toggle tooltip 'Middle mouse button: Rotate'
pixmap /$!<mouseRotateIcon> /$!<mouseRotateIcon>
width 16 height 16 at xmin ymax
button .corePanButton toggle tooltip 'Middle mouse button: Pan'
pixmap /$!<mousePanIcon> /$!<mousePanIcon>
width 16 height 16 at xmin ymax
button .coreWalkButton toggle tooltip 'Middle mouse button: Walkthrou
gh' pixmap /$!<mouseWalkIcon> /$!<mouseWalkIcon> /$!<mouseWalkIconOff>
width 16 height 16 at xmin ymax
button .clippingButton toggle tooltip 'Clipping & Options'
pixmap /$!<clippingIconOff> /$!<clippingIconOn>
width 16 height 16 at xmin ymax+0.3 callback |!![Link]
ipButton(|
button .clippingCE tooltip 'Clip CE'
pixmap /$!<clipCE> width 1
6 height 16 at xmin ymax callback |!|
-- View save and restore commands
button .coreRestoreView1Button tooltip 'Restore View 1' pixmap /$!<res
toreOneIcon> /$!<restoreOneIcon> /$!<restoreOneIconOff> width 16 heigh
t 16 at xmin ymax+0.3
button .coreRestoreView2Button tooltip 'Restore View 2' pixmap /$!<res
toreTwoIcon> /$!<restoreTwoIcon> /$!<restoreTwoIconOff> width 16 heigh
t 16 at xmin ymax
button .coreRestoreView3Button tooltip 'Restore View 3' pixmap /$!<res
toreThreeIcon> /$!<restoreThreeIcon> /$!<restoreThreeIconOff> width 16 heigh
t 16 at xmin ymax
button .coreRestoreView4Button tooltip 'Restore View 4' pixmap /$!<res
toreFourIcon> /$!<restoreFourIcon> /$!<restoreFourIconOff> width 16 heigh
t 16 at xmin ymax
-- Added by Simon Liddicott
button .newButton tooltip 'New button' pixmap /$!<restoreFourIcon> wid
th 16 height 16 at xmin ymax callback |$P new button|
-- Edit ends
-- Standard Graphic View
else
!volumeType = 'Volume'
!autoCeIcon = !
!rotateCeIcon = !
!mouseZoomIcon = !
!mousePanIcon = !
!mouseRotateIcon = !
!restoreOneIcon = !
!restoreTwoIcon = !
!restoreThreeIcon = !
!restoreFourIcon = !
-- define view control buttons
button .autoCE tooltip 'Limits CE' pixmap /$!<autoCeIcon> width 16 height
16 at x0 [Link] callback |!|
button .rotateCE tooltip 'Rotate Origin CE' pixmap /$!<rotateCeIcon> width
16 height 16 at xmin ymax callback |!|
button .mouseZoom tooltip 'Zoom' pixmap /$!<mouseZoomIcon> width 16 height
16 at xmin ymax+0.5 callback |![Link] = 'Zoom'|
button .mousePan tooltip 'Pan' pixmap /$!<mousePanIcon> width 16 height 16
at xmin ymax callback |![Link] = 'Pan'|
button .mouseRotate tooltip 'Rotate' pixmap /$!<mouseRotateIcon> width 16
height 16 at xmin ymax callback |![Link] = 'Rotate'|
button .restoreView1 tooltip 'Restore View 1' pixmap /$!<restoreOneIcon> w
idth 16 height 16 at xmin ymax+0.5 callback ||
button .restoreView2 tooltip 'Restore View 2' pixmap /$!<restoreTwoIcon> w
idth 16 height 16 at xmin ymax callback ||
button .restoreView3 tooltip 'Restore View 3' pixmap /$!<restoreThreeIcon>
width 16 height 16 at xmin ymax callback ||
button .restoreView4 tooltip 'Restore View 4' pixmap /$!<restoreFourIcon>
width 16 height 16 at xmin ymax callback ||
endif
-- Define graphics view
view .view at xmax+0.2 [Link] prompt .prompt $!<volumeType>
width $!![Link] height $!![Link]
limits local s5000mm w5000mm d5000mm to n5000mm e5000mm u5000mm
-- Input Modes
-- Navigate
inmode create _navi type |DES_NAVIGATE|
-- Standard Element Pick
inmode create _pick type |DES_PICK|
-- Pick Any (Element, Ppoint, Pline)
inmode create _pAny type |DES_PICK_ANY|
-- Plines
inmode create _pLine type |DES_PICK_PLINE|
-- Ppoints
inmode create _point type |DES_PICK_POINT|
-- Screen Position
inmode create _screen type |DES_3D_LINE|
-- Default (Navigation)
inmode create _pickDetail type |DES_PICK_DETAIL|
-- Default (Navigation)
inmode create _default type |DES_NAVIGATE|
exit
-- Set Defaults for Modes
_view.[Link] = 'Pointer'
_view.[Link] = 'Navigate : '
_view.[Link] = 'Pointer'
_view.[Link] = 'Pick Element : '
_view.[Link] = 'Pointer'
_view.[Link] = 'Pick Any : '
_view.[Link] = 'Pointer'
_view.[Link] = 'Pick Pline : '
_view.[Link] = 'Pick'
_view.[Link] = 'Point Ppoint : '
_view.[Link] = 'Crosshair'
_view.[Link] = 'Pick 3D Position : '
_view.[Link] = 'Pointer'
_view.[Link] = 'Navigate : '
-- Form Members
-- Clip Data
member .clipbox is GPHCLIPBOX
-- Form Information
member .type is STRING
member .number is REAL
exit
-- End of form definition
-- Initialise Form Data
!formName = $!<form>
![Link] = 'Design'
![Link] = !number
!module = !!module()
-- start form maximised in MDI window
![Link] = true
-- Assign defaults clipbox

-- New model editor view
if(![Link]() eq 'design') then




















-- Assocuate limits menu with limits button


-- Standard Graphics View
else
-- build popup menus for restore/save view buttons

')

')

')

')




-- Load bar menus with standard pulldowns
!
endif
-- Set defaults
!
return !formName
endfunction
-- End of function definition for !!gph3DDesign