/* $XConsortium: IconGadget1.dat /main/4 1995/07/17 10:13:11 drk $ */ /* * @OPENGROUP_COPYRIGHT@ * COPYRIGHT NOTICE * Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc. * Copyright (c) 1996, 1997, 1998, 1999, 2000 The Open Group * ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for * the full copyright text. * * This software is subject to an open license. It may only be * used on, with or for operating systems which are themselves open * source systems. You must contact The Open Group for a license * allowing distribution and sublicensing of this software on, with, * or for operating systems which are not Open Source programs. * * See http://www.opengroup.org/openmotif/license for full * details of the license agreement. Any use, reproduction, or * distribution of the program constitutes recipient's acceptance of * this agreement. * * EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS * PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY * WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY * OR FITNESS FOR A PARTICULAR PURPOSE * * EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT * NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE * EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. * */ /* * 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) #) 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 #) 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. #) 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) #) 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 #) 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. #) 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) #) 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. #) Select "3" from "detailCount". #) Select only "IconGad1", and click on the "Apply" button. #) The details "First object Chocolate 33" should reappear. #) 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) #) Select the following resources, and every time the check mark on the left: !) largeIconPixmap small.xbm largeIconMask round.xbm visualEmphasis XmSELECTED #) 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. #) Keep the visualEmphasis to "XmSELECTED" and removed the other check marks. #) Select "IconGad3" and click on the "Apply" button. #) Only the label appears selected. #) 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) #) 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)