0% found this document useful (0 votes)
338 views6 pages

Add Button Bar

Uploaded by

lowermine
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
338 views6 pages

Add Button Bar

Uploaded by

lowermine
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

------------------------------------------------------------------------

--
-- (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 = '!![Link](' & !form & ')'
-- 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 = !![Link]('[Link]')
!rotateCeIcon = !![Link]('[Link]')
!mouseZoomRectIcon = !![Link]('ng_zoomrectangle.png')
!mouseZoomInOutIcon = !![Link]('ng_zoominout.png')
!mouseRotateIcon = !![Link]('ng_rotatemode.png')
!mousePanIcon = !![Link]('ng_panmode.png')
!mouseWalkIcon = !![Link]('ng_walkmode.png')
!mouseWalkIconOff = !![Link]('ng_walkmode_off.png')
!restoreOneIcon = !![Link]('ng_restoreview1.png')
!restoreOneIconOff = !![Link]('ng_restoreview1_off.png')
!restoreTwoIcon = !![Link]('ng_restoreview2.png')
!restoreTwoIconOff = !![Link]('ng_restoreview2_off.png')
!restoreThreeIcon = !![Link]('ng_restoreview3.png')
!restoreThreeIconOff = !![Link]('ng_restoreview3_off.png')
!restoreFourIcon = !![Link]('ng_restoreview4.png')
!restoreFourIconOff = !![Link]('ng_restoreview4_off.png')
!zoomToCEIcon = !![Link]('ng_zoomtoce.png')
!zoomToIdentifyIcon = !![Link]('ng_zoomtoidentify.png')
!walkToDrawlistIcon = !![Link]('ng_zoomtodrawlist.png')
!zoomToSelectionIcon = !![Link]('ng_zoomtoselection.png')
!zoomToSelIconOff = !![Link]('ng_zoomtoselection_off.png')
!clippingIconOn = !![Link]('clippingicon_on16.png')
!clippingIconOff = !![Link]('clippingicon_off16.png')
!clipCE = !![Link]('[Link]')
--------------------------------------------------------------------------------
--------------------------------------------------
-- 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 |!![Link](![Link], !!ce)|
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 |!![Link](![Link], !![Link])|
-- 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 |!![Link](![Link], !!C
E)|
-- 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 = !![Link]('[Link]')
!rotateCeIcon = !![Link]('[Link]')
!mouseZoomIcon = !![Link]('[Link]')
!mousePanIcon = !![Link]('[Link]')
!mouseRotateIcon = !![Link]('[Link]')
!restoreOneIcon = !![Link]('[Link]')
!restoreTwoIcon = !![Link]('[Link]')
!restoreThreeIcon = !![Link]('[Link]')
!restoreFourIcon = !![Link]('[Link]')
-- define view control buttons
button .autoCE tooltip 'Limits CE' pixmap /$!<autoCeIcon> width 16 height
16 at x0 [Link] callback |!![Link](![Link], !!ce)|
button .rotateCE tooltip 'Rotate Origin CE' pixmap /$!<rotateCeIcon> width
16 height 16 at xmin ymax callback |!![Link](![Link], !![Link]
)|
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 |![Link](1)|
button .restoreView2 tooltip 'Restore View 2' pixmap /$!<restoreTwoIcon> w
idth 16 height 16 at xmin ymax callback |![Link](2)|
button .restoreView3 tooltip 'Restore View 3' pixmap /$!<restoreThreeIcon>
width 16 height 16 at xmin ymax callback |![Link](3)|
button .restoreView4 tooltip 'Restore View 4' pixmap /$!<restoreFourIcon>
width 16 height 16 at xmin ymax callback |![Link](4)|
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
![Link](![Link])
-- New model editor view
if(![Link]() eq 'design') then
![Link]('limitsMenu')
![Link]('CALLBACK', 'Obstruction', '!![Link]
(')
![Link]('CALLBACK', 'Clipbox', '!![Link](
')
![Link]('separator')
![Link]('CALLBACK', 'Restore', '!![Link]
ore(')
![Link]('separator')
![Link]('CALLBACK', 'Explicit...', '!![Link]
icit(')
![Link]('lclippingMenu')
![Link]('toggle', 'Enable', '!![Link]('
)
![Link]('toggle', 'Capped', '!![Link]('
)
![Link]('callback', 'Colour...', '!![Link]('
)
![Link]('separator')
![Link]('callback', 'CE', '!![Link]
ement(')
![Link]('callback', 'Owner', '!![Link]
ement(')
![Link]('callback', 'Limits Box', '!![Link]
x(')
![Link]('callback', 'Pick item', '!![Link]
ck(')
![Link]('separator')
![Link]('callback', 'Pick limits', '!![Link]
ck(')
![Link]('separator')
![Link]('callback', 'Explicit...', '!![Link]
plicit(')
-- Assocuate limits menu with limits button
![Link](![Link])
![Link](![Link])
-- Standard Graphics View
else
-- build popup menus for restore/save view buttons
![Link]('saveView1')
![Link]('callback', 'Save 1', '![Link](1)')
![Link]('saveView2')
![Link]('callback', 'Save 2', '![Link](2)')
![Link]('saveView3')
![Link]('callback', 'Save 3', '![Link](3)')
![Link]('saveView4')
![Link]('callback', 'Save 4', '![Link](4)')
![Link](!formName.saveView1)
![Link](!formName.saveView2)
![Link](!formName.saveView3)
![Link](!formName.saveView4)
-- Load bar menus with standard pulldowns
!![Link](!formName)
endif
-- Set defaults
!![Link](![Link])
return !formName
endfunction
-- End of function definition for !!gph3DDesign

You might also like