AnsweredAssumed Answered

a buttonbar scheme, interesting to share?

Question asked by VRFuser on Mar 2, 1998
I agree with Johannes. I will try to explain me.

We like to have a mimic with several equipment. Each equipment is
represented by a box. The status of the equipment is represented by a
different colour (red/Alarm, Green/OK, yellow/Standby, blue/disconnected,
etc..). We think that when the operator want to monitor the equipment
parameters or see which is the alarm that has been raised (red) or to
perform a control command, he can push with the mouse in the same box. In
this case a panel of the equipment is displayed or an alarm function display
is executed.

Due to this, it would be very interesting to have a Colour Alarm indicator
object that could have more than 3 colours and could be an OK button at the
same time. (This is not the first time that I make this suggestion at the
VEE reflector).

Currently we have solved this problem by using in a User Function, a picture
(that is, different bitmaps) and a OK button. Both are put on the panel at
the same room. More or less than Johannes has suggested.

It works nice for us, but it is very complicated (and more if you have a lot
of different equipment to be used at the same time), and you have to
generate a lot of different bitmaps (the user bitmaps directory is a good
idea from my point of view).

Regards,


At 10:13 27/02/98 -0800, you wrote:
>     Dear World,
>    
>     Perhaps I misunderstand the need for this?
>     I usually get by just fine with a bunch of OK buttons that trigger a
>     function-call as particular buttons are pushed.
>     Am I thinking too simply about the proposed problem?
>    
>     (This is a sincere question, not a quip)
>    
>     Andrew
>
>
>______________________________ Reply Separator
_________________________________
>Subject: Vrf: a buttonbar scheme, interesting to share?
>Author:  Non-HP-jcm (jcm@eo.ie.philips.nl) at HP-PaloAlto,mimegw6
>Date:    2/27/98 12:03 PM
>
>
>Vrf: a button scheme, interesting to share?
>    
>Hi all,
>    
>I have worked out a scheme to have windows-like a buttonbar.
>This might be interesting enough to share, although it is not that
>difficult, so here it is.
>Note that creating the pictures is fairly easy by capturing existing
>buttons with programs like paintshoppro.
>    
>Attached an example with just one print button, with the two bitmap
>files. These should be copied to HPVEE's bitmap directory.
>    
>Purpose: show how the Button scheme works
>    
>A button has three modes, each presented by a function:
>- normal (Print)
>- activated (Print_activated)
>- inactive (Print_inactive)
>    
>The normal button is the real function with on its panel only the
>real (raised) button. This is a toggle button, which resets itself.
>If pressed, the function is executed.
>The inactive button is a function containing only a (grayed) picture
>on its panel, on the same place as the real button.
>The activated button is a function also containing only a picture,
>now of a (sunken) button.
>    
>So two pictures are required:
>- the normal button picture, shown either raised or sunken
>- the grayed button picture, shown raised
>    
>At startup the inactive button is shown.
>The button can be enabled or disabled by Show- or Hidepanel of the
>real function.
>The button can be polled by just calling the function.
>At start of the function execution the activated button is shown.
>At end of the function execution the activated button is hidden.
>With kind regards,
>  Johannes Mulder           
>  Philips Electron Optics            tel +31 40 2766867
>  Building AAE-room 21               fax +31 40 2766820
>  P.O.B. 218                  
>  5600 MD ACHT, the Netherlands
>The following section of this message contains a file attachment
>prepared for transmission using the Internet MIME message format.
>If you are using Pegasus Mail, or any another MIME-compliant system,
>you should be able to save it or view it from within your mailer.
>If you cannot, please ask your system administrator for assistance.
>
>   ---- File information -----------
>     File:  print.bmp
>     Date:  27 Feb 1998, 10:49
>     Size:  238 bytes.
>     Type:  BMP-image
>The following section of this message contains a file attachment
>prepared for transmission using the Internet MIME message format.
>If you are using Pegasus Mail, or any another MIME-compliant system,
>you should be able to save it or view it from within your mailer.
>If you cannot, please ask your system administrator for assistance.
>
>   ---- File information -----------
>     File:  print_~1.bmp
>     Date:  27 Feb 1998, 9:37
>     Size:  238 bytes.
>     Type:  BMP-image
>(saveFormat "2.3")
>(date "Fri 27/Feb/1998 11:04:40 ")
>(veerev "4.01")
>(platform "PC")
>(execMode fast)
>(filterNAN 0)
>(workspaceStackingOrder M)
>(SaveCF no)
>(device 0 ROOTCONTEXT
>(properties
>(trigMode deg)
>(nextID 15)
>(popupTitleText "Untitled")
>(popupMoveable 1))
>(deviceList
>(UserFunctions
>(nextID 5)
>(context 3
>(properties
>(name "DisableButtons")
>(trigMode deg)
>(nextID 7)
>(popupTitleText "UserFunction")
>(popupMoveable 1))
>(deviceList
>(device 2 FORMULA
>(properties
>(name "disable "print"")
>(expr 1 "hidePanel("print")")))
>(configuration))
>(contextCarrier
>(active detail)
>(detail
>(extent 240 224)
>(anchorPt 0 0)
>(configuration
>(devCarrierFor 2
>(active icon)
>(icon
>(extent 95 16))
>(open
>(extent 145 32))
>(terminals on)
>(pinCenter 110 130))))))
>(context 0
>(properties
>(name "Print")
>(trigMode deg)
>(nextID 23)
>(popupTitleText "Print1")
>(showPopupTitle 0)
>(showPopupBorder 0))
>(deviceList
>(device 0 TOGGLE25
>(properties
>(name "Print")
>(initializeAtPrerun 1))
>(interface
>(input 1
>(type control)
>(name "Reset")
>(lock name constraints)
>(optional yes))
>(output 1
>(name "Toggle")
>(lock name constraints)))
>(implementation
>(value Int32
>(data  0))
>(initValue Int32
>(data  0))))
>(device 1 PRINTSCREEN)
>(device 2 IFTHENELSE
>(properties
>(name "If 1")
>(cases 1 "A==1"))
>(interface
>(input 1
>(name "A")
>(optional yes))
>(output 1
>(name "Then")
>(lock name constraints))
>(output 2
>(name "Else")
>(lock name constraints))))
>(device 12 CALL
>(properties
>(name "Call restore_display")
>(callFunc "restore_display")
>(parmMode rev30)))
>(device 19 CALL
>(properties
>(name "Call DisableButtons")
>(callFunc "DisableButtons")
>(parmMode rev30)))
>(device 21 FORMULA
>(properties
>(name "show print activated")
>(expr 1 "showPanel("Print_activated", print_x, print_y, button_w,
button_h)"))
>(interface
>(output 1
>(name "Result")
>(tag "Result")
>(lock name constraints)
>(optional yes))))
>(device 22 FORMULA
>(properties
>(name "hide print activated")
>(expr 1 "hidePanel("Print_activated")"))
>(interface
>(output 1
>(name "Result")
>(tag "Result")
>(lock name constraints)
>(optional yes))))
>(configuration
>(connect D0:1 D0:1)
>(connect D5:0 D1:0)
>(connect D0:1 D2:1)
>(connect D6:0 D3:0)
>(connect D2:1 D4:0)
>(connect D4:0 D5:0)
>(connect D1:0 D6:0)))
>(contextCarrier
>(active detail)
>(panel
>(extent 167 67)
>(widget 0 detail
>(relativeOrigin 0 0)
>(bg "Gray")
>(title off)
>(borderStyle convex)
>(extent 26 21)
>(scaled off)
>(showTitle off)
>(onFilename "print.gif")
>(offFilename "print.gif")
>(format custom)))
>(detail
>(extent 587 432)
>(anchorPt 87 122)
>(configuration
>(devCarrierFor 0
>(active open)
>(icon
>(label off))
>(open
>(extent 52 23)
>(scaled off)
>(showTitle off)
>(onFilename "print.gif")
>(offFilename "print.gif")
>(format custom))
>(title off)
>(pinCenter 40 -70))
>(devCarrierFor 1
>(active icon)
>(icon
>(extent 85 16))
>(open
>(extent 61 30))
>(terminals on)
>(pinCenter 150 90))
>(devCarrierFor 2
>(active icon)
>(icon
>(extent 24 25))
>(open
>(extent 61 53))
>(terminals on)
>(pinCenter 120 -70))
>(devCarrierFor 12
>(active icon)
>(icon
>(extent 137 16))
>(open
>(extent 196 53))
>(terminals on)
>(pinCenter 150 210))
>(devCarrierFor 19
>(active icon)
>(icon
>(extent 135 16))
>(open
>(extent 196 53))
>(terminals on)
>(pinCenter 150 20))
>(devCarrierFor 21
>(active icon)
>(icon
>(extent 137 16))
>(open
>(extent 446 102))
>(terminals on)
>(pinCenter 150 50))
>(devCarrierFor 22
>(active icon)
>(icon
>(extent 132 16))
>(open
>(extent 211 102))
>(terminals on)
>(pinCenter 150 130))
>(connect D0:1 D0:1
>(points 6 68 -70 90 -70 90 -40 -10 -40 -10 -70 11 -70))
>(connect D5:0 D1:0
>(points 2 150 60 150 79))
>(connect D0:1 D2:1
>(points 2 68 -70 105 -70))
>(connect D6:0 D3:0
>(points 2 150 140 150 199))
>(connect D2:1 D4:0
>(points 3 134 -80 150 -80 150 9))
>(connect D4:0 D5:0
>(points 2 150 30 150 39))
>(connect D1:0 D6:0
>(points 2 150 100 150 119)))
>(stackingOrder 2 0 4 5 1 6 3))))
>(context 1
>(properties
>(name "Print_activated")
>(trigMode deg)
>(nextID 4)
>(popupTitleText "UserFunction")
>(showPopupTitle 0)
>(showPopupBorder 0)
>(popupMoveable 1))
>(deviceList
>(device 1 PICTURE
>(properties
>(pictureImage "print.gif")))
>(configuration))
>(contextCarrier
>(active panel)
>(panel
>(extent 256 145)
>(widget 0 detail
>(relativeOrigin 0 0)
>(bg "Gray")
>(title off)
>(borderStyle concave)
>(extent 26 21)
>(pictureMode centered)))
>(detail
>(extent 341 346)
>(anchorPt 26 -53)
>(configuration
>(devCarrierFor 1
>(active open)
>(icon
>(extent 48 16))
>(open
>(extent 125 98)
>(pictureMode centered))
>(bg "Gray")
>(pinCenter 200 220))))))
>(context 2
>(properties
>(name "Print_inactive")
>(trigMode deg)
>(nextID 4)
>(popupTitleText "UserFunction")
>(showPopupTitle 0)
>(showPopupBorder 0)
>(popupMoveable 1))
>(deviceList
>(device 1 PICTURE
>(properties
>(pictureImage "print_inactive.bmp")))
>(configuration))
>(contextCarrier
>(active panel)
>(panel
>(extent 256 145)
>(widget 0 detail
>(relativeOrigin 0 0)
>(bg "Gray")
>(title off)
>(borderStyle convex)
>(extent 26 21)
>(pictureMode centered)))
>(detail
>(extent 341 346)
>(anchorPt 111 12)
>(configuration
>(devCarrierFor 1
>(active open)
>(icon)
>(open
>(extent 24 15)
>(pictureMode actual))
>(bg "Gray")
>(pinCenter -36 90))))))
>(context 4
>(properties
>(name "restore_display")
>(trigMode deg)
>(nextID 44)
>(popupTitleText "UserObject")
>(popupMoveable 1))
>(deviceList
>(device 43 FORMULA
>(properties
>(name "enable "print"")
>(expr 1 "showPanel("Print", print_x, print_y, button_w, button_h)")))
>(configuration))
>(contextCarrier
>(active detail)
>(detail
>(extent 526 484)
>(anchorPt 41 93)
>(configuration
>(devCarrierFor 43
>(active icon)
>(icon
>(extent 93 16))
>(open
>(extent 383 32))
>(terminals on)
>(pinCenter 110 -10)))))))
>(device 0 CALL
>(properties
>(name "Print")
>(callFunc "Print")
>(parmMode rev30)))
>(device 1 REPEATUNTILBREAK
>(interface
>(output 1
>(name "Continuous")
>(lock name constraints))))
>(device 2 CALL
>(properties
>(name "Call restore_display")
>(callFunc "restore_display")
>(parmMode rev30)))
>(device 12 CONTEXT
>(properties
>(name "setup")
>(trigMode deg)
>(nextID 9)
>(popupTitleText "UserObject")
>(popupMoveable 1))
>(deviceList
>(device 0 FORMULA
>(properties
>(name "show print inactive")
>(expr 1 "showPanel("Print_inactive", print_x, print_y, button_w, button_h)"))
>(interface
>(output 1
>(name "Result")
>(tag "Result")
>(lock name constraints)
>(optional yes))))
>(device 1 CONSTANT
>(properties
>(name "3"))
>(interface
>(output 1
>(name "Int32")
>(lock name constraints)))
>(implementation
>(value Int32
>(data  4))
>(initValue Int32
>(data  0))))
>(device 2 CONSTANT
>(properties
>(name "25"))
>(interface
>(output 1
>(name "Int32")
>(lock name constraints)))
>(implementation
>(value Int32
>(data  25))
>(initValue Int32
>(data  0))))
>(device 3 CONSTANT
>(properties
>(name "80"))
>(interface
>(output 1
>(name "Int32")
>(lock name constraints)))
>(implementation
>(value Int32
>(data  80))
>(initValue Int32
>(data  0))))
>(device 4 CONSTANT
>(properties
>(name "30"))
>(interface
>(output 1
>(name "Int32")
>(lock name constraints)))
>(implementation
>(value Int32
>(data  30))
>(initValue Int32
>(data  0))))
>(device 5 TOGLOBAL
>(properties
>(name ">button_h")
>(globalName "button_h"))
>(interface
>(input 1
>(name "Data")
>(tag "Data"))))
>(device 6 TOGLOBAL
>(properties
>(name ">button_w")
>(globalName "button_w"))
>(interface
>(input 1
>(name "Data")
>(tag "Data"))))
>(device 7 TOGLOBAL
>(properties
>(name ">print_y")
>(globalName "print_y"))
>(interface
>(input 1
>(name "Data")
>(tag "Data"))))
>(device 8 TOGLOBAL
>(properties
>(name ">print_x")
>(globalName "print_x"))
>(interface
>(input 1
>(name "Data")
>(tag "Data"))))
>(configuration
>(connect D1:0 D0:0)
>(connect D2:0 D1:0)
>(connect D3:0 D2:0)
>(connect D4:0 D3:0)
>(connect D2:1 D5:1)
>(connect D4:1 D6:1)
>(connect D1:1 D7:1)
>(connect D3:1 D8:1)))
>(contextCarrier
>(active detail)
>(detail
>(extent 346 264)
>(anchorPt 0 0)
>(configuration
>(devCarrierFor 0
>(active icon)
>(icon
>(extent 127 16))
>(open
>(extent 444 102))
>(terminals on)
>(pinCenter 130 190))
>(devCarrierFor 1
>(active icon)
>(icon
>(extent 24 16))
>(open
>(extent 84 30)
>(showFormat int))
>(pinCenter 130 160))
>(devCarrierFor 2
>(active icon)
>(icon
>(extent 24 16))
>(open
>(extent 84 30)
>(showFormat int))
>(pinCenter 130 130))
>(devCarrierFor 3
>(active icon)
>(icon
>(extent 24 16))
>(open
>(extent 84 30)
>(showFormat int))
>(pinCenter 130 100))
>(devCarrierFor 4
>(active icon)
>(icon
>(extent 24 16))
>(open
>(extent 84 30)
>(showFormat int))
>(pinCenter 130 70))
>(devCarrierFor 5
>(active icon)
>(icon
>(extent 70 16))
>(open
>(extent 81 53))
>(terminals on)
>(pinCenter 240 130))
>(devCarrierFor 6
>(active icon)
>(icon
>(extent 71 16))
>(open
>(extent 81 53))
>(terminals on)
>(pinCenter 240 70))
>(devCarrierFor 7
>(active icon)
>(icon
>(extent 56 16))
>(open
>(extent 81 53))
>(terminals on)
>(pinCenter 240 160))
>(devCarrierFor 8
>(active icon)
>(icon
>(extent 55 16))
>(open
>(extent 81 53))
>(terminals on)
>(pinCenter 240 100))
>(connect D1:0 D0:0
>(points 2 130 170 130 179))
>(connect D2:0 D1:0
>(points 2 130 140 130 149))
>(connect D3:0 D2:0
>(points 2 130 110 130 119))
>(connect D4:0 D3:0
>(points 2 130 80 130 89))
>(connect D2:1 D5:1
>(points 2 144 130 202 130))
>(connect D4:1 D6:1
>(points 2 144 70 202 70))
>(connect D1:1 D7:1
>(points 2 144 160 209 160))
>(connect D3:1 D8:1
>(points 2 144 100 210 100)))
>(stackingOrder 0 1 2 3 4 5 6 7 8))))
>(device 13 CONFIRM25
>(properties
>(name "Enable printing"))
>(interface
>(output 1
>(name "Go")
>(lock name constraints)))
>(implementation))
>(device 14 NOTE
>(properties
>(text2 25 "Purpose: show how the Button scheme works" ""
>"A button has three modes, each presented by a function: " "- normal (Print)"
>"- activated (Print_activated)" "- inactive (Print_inactive)" ""
>"The normal button is the real function with on its panel"
>"only the real (raised) button. This is a toggle button, which"
>"resets itself. If pressed, the function is executed."
>"The inactive button is a function containing only a (grayed) "
>"picture on its panel, on the same place as the real button."
>"The activated button is a function also containing only"
>"a picture, now of a (sunken) button." "" "So two pictures are required: "
>"- the normal button picture shown either raised or sunken"
>"- the grayed button picture" "" "At startup the inactive button is shown."
>"The button can be enabled or disabled by Show- or Hidepanel "
>"of the real function." "The button can be polled by just calling the
function."
>"At start of the function execution the activated button is shown."
>"At end of the function execution the activated button is hidden.")))
>(configuration
>(connect D1:1 D0:0)
>(connect D2:0 D1:0)
>(connect D4:0 D2:0)
>(connect D3:0 D4:0))
>(ShowOnExecPanel))
>(contextCarrier
>(wndOrigin 16 18)
>(wndState res)
>(active panel)
>(panel
>(extent 642 530)
>(widget 4 detail
>(relativeOrigin 150 3)
>(title off)
>(borderStyle none)
>(extent 125 25))
>(widget 5 detail
>(relativeOrigin 0 35)
>(font "Arial" 12)
>(title off)
>(borderStyle flat)
>(extent 546 418)
>(editing disabled)))
>(detail
>(extent 665 525)
>(anchorPt -16 74)
>(configuration
>(devCarrierFor 0
>(active icon)
>(icon
>(extent 68 24))
>(open
>(extent 196 53))
>(terminals on)
>(titleBg "Light Blue Gray")
>(pinCenter 220 150))
>(devCarrierFor 1
>(active icon)
>(icon
>(extent 74 52)
>(iconImage "loop.icn"))
>(open)
>(terminals on)
>(pinCenter 110 100))
>(devCarrierFor 2
>(active icon)
>(icon
>(extent 137 16))
>(open
>(extent 196 53))
>(terminals on)
>(pinCenter 110 50))
>(devCarrierFor 12
>(active icon)
>(icon
>(extent 39 16))
>(terminals on)
>(pinCenter 110 -50))
>(devCarrierFor 13
>(active open)
>(icon
>(extent 104 0))
>(open
>(extent 125 24))
>(title off)
>(pinCenter 110 0))
>(devCarrierFor 14
>(active open)
>(icon
>(iconImage "notepad.icn"))
>(open
>(extent 620 406)
>(editing enabled))
>(font "Arial" 12)
>(pinCenter 340 220))
>(connect D1:1 D0:0
>(points 3 149 100 220 100 220 135))
>(connect D2:0 D1:0
>(points 2 110 60 110 71))
>(connect D4:0 D2:0
>(points 2 110 14 110 39))
>(connect D3:0 D4:0
>(points 2 110 -40 110 -15)))
>(stackingOrder 1 2 0 3 4 5))
>(numberFormats
>(realFormat standard)
>(realSigDigits 4)
>(realRadixSpec 4)
>(integerBase decimal))))
>
______________________________________________________

Juan Carlos Martin
E-mail     : jcmar@mdr.indra-espacio.es
Phone      : 34-91-3963995
Fax     : 34-91-3963912
Earth Stations Department
INDRA ESPACIO / MADRID /SPAIN


Outcomes