Blob Blame History Raw
# $XConsortium: DialogRes.scr /main/5 1995/07/17 20:38:35 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
# 

#
# "OSF/Motif: @(#)DialogRes.scr	1.1 91/09/12";
#
#
# DialogRes.scr
#
#
# This is a test testing the setting VendorShell resources on a
# DialogShell.

CompareVisual Form
CompareVisual RowCol1

# "Post Dialog" button should now be insensitive and the button 
CompareVisual PostDialog
CompareVisual ApplyDecorations
LocatePointer PostDialog
ClickMB Btn1
CompareVisual PostDialog
# Move DialogShell1 to 300, 200 so that it no longer obscures control panel
WindowMove DialogShell1 300 200
# "ApplyDecorations" should now be sensitive. 
CompareVisual ApplyDecorations

# DialogShell1 should have its OK and Cancel buttons not visible, and 
# Help button label changed to "Destroy Me".
CompareVisual DialogShell1

Continue

#  Click on Decor_All to set MWM_DECOR_ALL bit to 1. Now, all the decorations
#  that you specify by toggling the respective values to True, will
#  disappear from the set of decorations.

LocatePointer Decor_All
ClickMB Btn1
LocatePointer ResizeH
ClickMB Btn1
LocatePointer ApplyDecorations
ClickMB Btn1
WindowItemCheck DialogShell1 RWindowDecoration RResizeHandles
LocatePointer Border
ClickMB Btn1
LocatePointer ApplyDecorations
ClickMB Btn1
WindowItemCheck DialogShell1 RWindowDecoration RBorder
Continue
LocatePointer SystemMenu
ClickMB Btn1
LocatePointer ApplyDecorations
ClickMB Btn1
WindowItemCheck DialogShell1 RWindowDecoration RSystemMenu
LocatePointer Title
ClickMB Btn1
LocatePointer ApplyDecorations
ClickMB Btn1
WindowItemCheck DialogShell1 RWindowDecoration RTitle

#  Click on "Decor_All".
LocatePointer Decor_All
ClickMB Btn1

#  Click on "ApplyDecorations". DialogShell1 gets unmapped and mapped and
#  the window decorations should be back in full (except Minimize and
#  Maximize buttons).
LocatePointer ApplyDecorations
ClickMB Btn1
WindowItemCheck DialogShell1 RWindowDecoration RResizeHandles
WindowItemCheck DialogShell1 RWindowDecoration RBorder
WindowItemCheck DialogShell1 RWindowDecoration RSystemMenu
WindowItemCheck DialogShell1 RWindowDecoration RTitle
WindowItemCheck DialogShell1 RWindowDecoration RMinimize
WindowItemCheck DialogShell1 RWindowDecoration RMaximize
Continue

#  The control panel should now be expanded to contain window menu function
#  resource toggle buttons and the pushbutton "ApplyFunctions".

CompareVisual Form
CompareVisual RowCol2

#  Click on Func_All to set MWM_FUNC_ALL bit to 1. Now, all the functions
#  that you specify by toggling the respective values to True, will
#  disappear from the window menu of DialogShell1.
LocatePointer Func_All
ClickMB Btn1
LocatePointer Size
ClickMB Btn1
LocatePointer ApplyFunctions
ClickMB Btn1
WindowItemCheck DialogShell1 RWindowMenu Size
Continue
LocatePointer Move
ClickMB Btn1
LocatePointer ApplyFunctions
ClickMB Btn1
WindowItemCheck DialogShell1 RWindowMenu Move
LocatePointer Close
ClickMB Btn1
LocatePointer ApplyFunctions
ClickMB Btn1
WindowItemCheck DialogShell1 RWindowMenu Close
LocatePointer Func_All
ClickMB Btn1

#  Click on "ApplyFunctions". DialogShell1 gets unmapped and mapped and
#  the window menu should be back in full (except Iconify and Maximize 
#  items).
LocatePointer ApplyFunctions
ClickMB Btn1
WindowMenuPost DialogShell1
WindowMenuUnpost DialogShell1
WindowItemCheck DialogShell1 RWindowMenu Size
WindowItemCheck DialogShell1 RWindowMenu Move
WindowItemCheck DialogShell1 RWindowMenu Close
WindowItemCheck DialogShell1 RWindowMenu Iconify
WindowItemCheck DialogShell1 RWindowMenu FullScreen
Continue

#  This is to test PIR 2133. Post the window menu from DialogShell1.
#  Select "Close" from the menu. You should get a message on your
#  xterm saying "Close window message sent.". If yes, the bug about
#  not being able to trap f.kill is fixed.

WindowMenuPost DialogShell1
WindowMenuSelect DialogShell1 Close
Continue
Exit