# $XConsortium: IconGadget1.scr /main/4 1995/07/17 20:17:08 drk $
# Motif
#
# Copyright (c) 1987-2012, The Open Group. All rights reserved.
#
# These libraries and programs are free software; you can
# redistribute them and/or modify them under the terms of the GNU
# Lesser General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option)
# any later version.
#
# These libraries and programs are distributed in the hope that
# they will be useful, but WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU Lesser General Public License for more
# details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with these librararies and programs; if not, write
# to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
# Floor, Boston, MA 02110-1301 USA
#
#
# HISTORY
# #) A drawing area will appear containing 3 icon gadgets.
# #) "IconGad1" is displayed in its LARGE_ICON view, using the mountain bitmap.
# The label string "IconGad1" should be beneath the icon.
# It has 3 details displayed next to it, saying "First object Chocolate 33".
# #) "IconGad2" and "IconGad3" are also displayed in their large icon view,
# but are not using any pixmap.
# #) The respective position of the 3 icon gadgets should be (20,20), (50,100)
# and (30,170).
# #) A control panel should appear composed of 10 rows of resources,
# then an "Apply" button and a check box for selecting the icon gadgets
# you want the resources to be applied to.
# #) Each row of resources is composed of a check box, and an option
# menu displaying the different values you can set for this resource.
# C)
LocatePointer IconGadget1
CompareVisual IconGadget1
Continue
# #) Select the following resources, and every time the check mark on the
# left:
# !)
# labelString How about something longer ...
# smallIconPixmap large.xpm
# smallIconMask none
# detail 3 details
# detailCount 3
# viewType XmSMALL_ICON
LocatePointer TogSet_labelString
ClickMB Btn1
LocatePointer OM_labelString ROptionButton
PressMB Btn1
LocatePointer labelStringPB3
ReleaseMB Btn1
LocatePointer TogSet_smallIconPixmap
ClickMB Btn1
LocatePointer OM_smallIconPixmap ROptionButton
PressMB Btn1
LocatePointer smallIconPixmapPB0
ReleaseMB Btn1
LocatePointer TogSet_smallIconMask
ClickMB Btn1
LocatePointer OM_smallIconMask ROptionButton
PressMB Btn1
LocatePointer smallIconMaskPB3
ReleaseMB Btn1
LocatePointer TogSet_detail
ClickMB Btn1
LocatePointer OM_detail ROptionButton
PressMB Btn1
LocatePointer detailPB2
ReleaseMB Btn1
LocatePointer TogSet_detailCount
ClickMB Btn1
LocatePointer OM_detailCount ROptionButton
PressMB Btn1
LocatePointer detailCountPB3
ReleaseMB Btn1
LocatePointer TogSet_viewType
ClickMB Btn1
LocatePointer OM_viewType ROptionButton
PressMB Btn1
LocatePointer viewTypePB1
ReleaseMB Btn1
# #) Now select the "IconGad2" toggle button and click on the "Apply" button.
# #) You should see the bee pixmap displayed on the left of the labelString,
# and 3 details added on the same line.
LocatePointer TB_IconGad2
ClickMB Btn1
LocatePointer Apply
ClickMB Btn1
WindowRaise IconGadget1
CompareVisual IconGadget1
# #) Select "large_m.xpm" from the "smallIconMask", and unselected the other
# check marks. Select 5 from "shadowThickness" and click on the check mark.
# #) Click on the "Apply" button. A mask is applied on the bee pixmap, so
# that the pixmap is no longer in a box. The details should not
# disappear. The label should be fully visible and not truncated on its
# left.
# C)
LocatePointer OM_smallIconMask ROptionButton
PressMB Btn1
LocatePointer smallIconMaskPB0
ReleaseMB Btn1
LocatePointer TogSet_labelString
ClickMB Btn1
LocatePointer TogSet_smallIconPixmap
ClickMB Btn1
LocatePointer TogSet_detail
ClickMB Btn1
LocatePointer TogSet_detailCount
ClickMB Btn1
LocatePointer TogSet_viewType
ClickMB Btn1
LocatePointer TogSet_shadowThickness
ClickMB Btn1
LocatePointer OM_shadowThickness ROptionButton
PressMB Btn1
LocatePointer shadowThicknessPB3
ReleaseMB Btn1
LocatePointer Apply
ClickMB Btn1
WindowRaise IconGadget1
CompareVisual IconGadget1
Continue
# #) Select the following resources, and every time the check mark on the
# left:
# !)
# labelString A
# largeIconPixmap small.xpm
# largeIconMask none
# detail 2 details
# detailCount 2
# shadowThickness 10
#
LocatePointer TogSet_labelString
ClickMB Btn1
LocatePointer OM_labelString ROptionButton
PressMB Btn1
LocatePointer labelStringPB0
ReleaseMB Btn1
LocatePointer TogSet_largeIconPixmap
ClickMB Btn1
LocatePointer OM_largeIconPixmap ROptionButton
PressMB Btn1
LocatePointer largeIconPixmapPB1
ReleaseMB Btn1
LocatePointer TogSet_largeIconMask
ClickMB Btn1
LocatePointer OM_largeIconMask ROptionButton
PressMB Btn1
LocatePointer largeIconMaskPB3
ReleaseMB Btn1
LocatePointer TogSet_detail
ClickMB Btn1
LocatePointer OM_detail ROptionButton
PressMB Btn1
LocatePointer detailPB1
ReleaseMB Btn1
LocatePointer TogSet_detailCount
ClickMB Btn1
LocatePointer OM_detailCount ROptionButton
PressMB Btn1
LocatePointer detailCountPB2
ReleaseMB Btn1
LocatePointer OM_shadowThickness ROptionButton
PressMB Btn1
LocatePointer shadowThicknessPB4
ReleaseMB Btn1
# #) Unselect the other check marks you don't need.
# #) Now select the "IconGad3" toggle button and unselect "IconGad2".
# Click on the "Apply" button.
# #) You should see the girl pixmap displayed on top of the labelString,
# and 2 details added on the same line. The shadow thickness is around
# both the icon and the label. The pixmap should be fully visible.
LocatePointer TogSet_smallIconMask
ClickMB Btn1
LocatePointer TB_IconGad2
ClickMB Btn1
LocatePointer TB_IconGad3
ClickMB Btn1
LocatePointer Apply
ClickMB Btn1
WindowRaise IconGadget1
CompareVisual IconGadget1
# #) Select "small_m.xpm" from the "largeIconMask", and unselected the other
# check marks.
# #) Click on the "Apply" button. A mask is applied on the girl pixmap, so
# that the background is no longer a black box. The details should not
# disappear. Now the shadow thickness is only around the label.
# The pixmap should be fully visible.
# C)
LocatePointer OM_largeIconMask ROptionButton
PressMB Btn1
LocatePointer largeIconMaskPB1
ReleaseMB Btn1
LocatePointer TogSet_labelString
ClickMB Btn1
LocatePointer TogSet_largeIconPixmap
ClickMB Btn1
LocatePointer TogSet_detail
ClickMB Btn1
LocatePointer TogSet_detailCount
ClickMB Btn1
LocatePointer TogSet_shadowThickness
ClickMB Btn1
LocatePointer Apply
ClickMB Btn1
WindowRaise IconGadget1
CompareVisual IconGadget1
Continue
#
# #) Select "0" from "detailCount" and its check mark, and unselect the
# other check marks.
# #) Select "IconGad1", "IconGad2" and "IconGad3", and click on the "Apply"
# button.
# #) All the details should disappear.
LocatePointer TogSet_largeIconMask
ClickMB Btn1
LocatePointer TogSet_detailCount
ClickMB Btn1
LocatePointer OM_detailCount ROptionButton
PressMB Btn1
LocatePointer detailCountPB0
ReleaseMB Btn1
LocatePointer TB_IconGad1
ClickMB Btn1
LocatePointer TB_IconGad2
ClickMB Btn1
LocatePointer Apply
ClickMB Btn1
WindowRaise IconGadget1
CompareVisual IconGadget1
# #) Select "3" from "detailCount".
# #) Select only "IconGad1", and click on the "Apply" button.
# #) The details "First object Chocolate 33" should reappear.
LocatePointer OM_detailCount ROptionButton
PressMB Btn1
LocatePointer detailCountPB3
ReleaseMB Btn1
LocatePointer TB_IconGad2
ClickMB Btn1
LocatePointer TB_IconGad3
ClickMB Btn1
LocatePointer Apply
ClickMB Btn1
WindowRaise IconGadget1
CompareVisual IconGadget1
# #) Now select "3 details" from "detail", and its check mark.
# #) Click again on the "Apply button".
# #) New details appear "First detail Second detail Last detail".
# C)
LocatePointer TogSet_detail
ClickMB Btn1
LocatePointer OM_detail ROptionButton
PressMB Btn1
LocatePointer detailPB2
ReleaseMB Btn1
LocatePointer Apply
ClickMB Btn1
WindowRaise IconGadget1
CompareVisual IconGadget1
Continue
#
# #) Select the following resources, and every time the check mark on the
# left:
# !)
# largeIconPixmap small.xbm
# largeIconMask round.xbm
# visualEmphasis XmSELECTED
#
LocatePointer TogSet_largeIconPixmap
ClickMB Btn1
LocatePointer OM_largeIconPixmap ROptionButton
PressMB Btn1
LocatePointer largeIconPixmapPB3
ReleaseMB Btn1
LocatePointer TogSet_largeIconMask
ClickMB Btn1
LocatePointer OM_largeIconMask ROptionButton
PressMB Btn1
LocatePointer largeIconMaskPB2
ReleaseMB Btn1
LocatePointer TogSet_visualEmphasis
ClickMB Btn1
LocatePointer OM_visualEmphasis ROptionButton
PressMB Btn1
LocatePointer visualEmphasisPB1
ReleaseMB Btn1
# #) Unselect the other check marks you don't need.
# #) Now select only the "IconGad1" toggle button and click on the
# "Apply" button.
# #) You should see the girl bitmap displayed on top of the labelString,
# in a round mask.
# #) The icon gadget is selected.
LocatePointer TogSet_detail
ClickMB Btn1
LocatePointer TogSet_detailCount
ClickMB Btn1
LocatePointer Apply
ClickMB Btn1
WindowRaise IconGadget1
CompareVisual IconGadget1
# #) Keep the visualEmphasis to "XmSELECTED" and removed the other check
# marks.
# #) Select "IconGad3" and click on the "Apply" button.
# #) Only the label appears selected.
LocatePointer TogSet_largeIconPixmap
ClickMB Btn1
LocatePointer TogSet_largeIconMask
ClickMB Btn1
LocatePointer TB_IconGad1
ClickMB Btn1
LocatePointer TB_IconGad3
ClickMB Btn1
LocatePointer Apply
ClickMB Btn1
WindowRaise IconGadget1
CompareVisual IconGadget1
# #) Select "How about something longer but useless" from "labelString" option
# menu, and its check mark. Click on the "Apply" button. The label should
# be centered under the icon.
# C)
LocatePointer TogSet_labelString
ClickMB Btn1
LocatePointer OM_labelString ROptionButton
PressMB Btn1
LocatePointer labelStringPB3
ReleaseMB Btn1
LocatePointer Apply
ClickMB Btn1
WindowRaise IconGadget1
CompareVisual IconGadget1
Continue
#
# #) The function XmObjectAtPoint is called.
# #) You should see the following message in your term window:
# !)
# The following Icon Gadget is located at 50 200: IconGad3
#
# E)
Exit