fi
- if [ ! -f /usr/dt/share/examples/motif/dogs/Dog.c ]; then
-
- SUNWmfdm=SUNWmfdm
-
- fi
-
fi
pkglist="${DEV_PKGS} ${SUNWmfman} ${SUNWmfdm}"
install_target = /usr/dt/share/examples/template/C/template.t.pm
}
-#
-# examples for Motif
-#
-
-# periodic example
-
-examples/motif/periodic/periodic.c
-{ default
- install_target = /usr/dt/share/examples/motif/periodic/periodic.c
-}
-
-examples/motif/periodic/periodic.uil
-{ default
- install_target = /usr/dt/share/examples/motif/periodic/periodic.uil
-}
-
-examples/motif/periodic/periodic_local.uil
-{ default
- install_target = /usr/dt/share/examples/motif/periodic/periodic_local.uil
-}
-
-examples/motif/periodic/Periodic.ad
-{ default
- install_target = /usr/dt/share/examples/motif/periodic/Periodic
-}
-
-examples/motif/periodic/README
-{ default
- install_target = /usr/dt/share/examples/motif/periodic/README
-}
-
-examples/motif/periodic/Makefile.ibm
-{ default
- install_target = /usr/dt/share/examples/motif/periodic/Makefile.IBM
-}
-
-examples/motif/periodic/Makefile.hp
-{ default
- install_target = /usr/dt/share/examples/motif/periodic/Makefile.HP
-}
-
-examples/motif/periodic/Makefile.sun
-{ default
- install_target = /usr/dt/share/examples/motif/periodic/Makefile.SUN
-}
-
-examples/motif/periodic/Makefile.uxp
-{ default
- install_target = /usr/dt/share/examples/motif/periodic/Makefile.UXP
-}
-
-examples/motif/periodic/Makefile.novell
-{ default
- install_target = /usr/dt/share/examples/motif/periodic/Makefile.NOVELL
-}
-
-# clipboard example
-
-examples/motif/clipboard/cutpaste.c
-{ default
- install_target = /usr/dt/share/examples/motif/clipboard/cutpaste.c
-}
-
-examples/motif/clipboard/cutpaste.uil
-{ default
- install_target = /usr/dt/share/examples/motif/clipboard/cutpaste.uil
-}
-
-examples/motif/clipboard/cutpaste_local.uil
-{ default
- install_target = /usr/dt/share/examples/motif/clipboard/cutpaste_local.uil
-}
-
-examples/motif/clipboard/README
-{ default
- install_target = /usr/dt/share/examples/motif/clipboard/README
-}
-
-examples/motif/clipboard/Makefile.ibm
-{ default
- install_target = /usr/dt/share/examples/motif/clipboard/Makefile.IBM
-}
-
-examples/motif/clipboard/Makefile.hp
-{ default
- install_target = /usr/dt/share/examples/motif/clipboard/Makefile.HP
-}
-
-examples/motif/clipboard/Makefile.sun
-{ default
- install_target = /usr/dt/share/examples/motif/clipboard/Makefile.SUN
-}
-
-examples/motif/clipboard/Makefile.uxp
-{ default
- install_target = /usr/dt/share/examples/motif/clipboard/Makefile.UXP
-}
-
-examples/motif/clipboard/Makefile.novell
-{ default
- install_target = /usr/dt/share/examples/motif/clipboard/Makefile.NOVELL
-}
-
-# draganddrop example
-
-examples/motif/draganddrop/DNDDemo.c
-{ default
- install_target = /usr/dt/share/examples/motif/draganddrop/DNDDemo.c
-}
-
-examples/motif/draganddrop/DNDDemo.h
-{ default
- install_target = /usr/dt/share/examples/motif/draganddrop/DNDDemo.h
-}
-
-examples/motif/draganddrop/DNDDraw.c
-{ default
- install_target = /usr/dt/share/examples/motif/draganddrop/DNDDraw.c
-}
-
-examples/motif/draganddrop/README
-{ default
- install_target = /usr/dt/share/examples/motif/draganddrop/README
-}
-
-examples/motif/draganddrop/Makefile.ibm
-{ default
- install_target = /usr/dt/share/examples/motif/draganddrop/Makefile.IBM
-}
-
-examples/motif/draganddrop/Makefile.hp
-{ default
- install_target = /usr/dt/share/examples/motif/draganddrop/Makefile.HP
-}
-
-examples/motif/draganddrop/Makefile.sun
-{ default
- install_target = /usr/dt/share/examples/motif/draganddrop/Makefile.SUN
-}
-
-examples/motif/draganddrop/Makefile.uxp
-{ default
- install_target = /usr/dt/share/examples/motif/draganddrop/Makefile.UXP
-}
-
-examples/motif/draganddrop/Makefile.novell
-{ default
- install_target = /usr/dt/share/examples/motif/draganddrop/Makefile.NOVELL
-}
-
-# dogs example
-
-examples/motif/dogs/dogs.c
-{ default
- install_target = /usr/dt/share/examples/motif/dogs/dogs.c
-}
-
-examples/motif/dogs/dogs.uil
-{ default
- install_target = /usr/dt/share/examples/motif/dogs/dogs.uil
-}
-
-examples/motif/dogs/Dog.h
-{ default
- install_target = /usr/dt/share/examples/motif/dogs/Dog.h
-}
-
-examples/motif/dogs/DogP.h
-{ default
- install_target = /usr/dt/share/examples/motif/dogs/DogP.h
-}
-
-examples/motif/dogs/Dog.c
-{ default
- install_target = /usr/dt/share/examples/motif/dogs/Dog.c
-}
-
-examples/motif/dogs/up.bm
-{ default
- install_target = /usr/dt/share/examples/motif/dogs/up.bm
-}
-
-examples/motif/dogs/down.bm
-{ default
- install_target = /usr/dt/share/examples/motif/dogs/down.bm
-}
-
-examples/motif/dogs/bark.bm
-{ default
- install_target = /usr/dt/share/examples/motif/dogs/bark.bm
-}
-
-examples/motif/dogs/Dog.uil
-{ default
- install_target = /usr/dt/share/examples/motif/dogs/Dog.uil
-}
-
-examples/motif/dogs/Square.h
-{ default
- install_target = /usr/dt/share/examples/motif/dogs/Square.h
-}
-
-examples/motif/dogs/SquareP.h
-{ default
- install_target = /usr/dt/share/examples/motif/dogs/SquareP.h
-}
-
-examples/motif/dogs/Square.c
-{ default
- install_target = /usr/dt/share/examples/motif/dogs/Square.c
-}
-
-examples/motif/dogs/Square.uil
-{ default
- install_target = /usr/dt/share/examples/motif/dogs/Square.uil
-}
-
-examples/motif/dogs/README
-{ default
- install_target = /usr/dt/share/examples/motif/dogs/README
-}
-
-examples/motif/dogs/Makefile.ibm
-{ default
- install_target = /usr/dt/share/examples/motif/dogs/Makefile.IBM
-}
-
-examples/motif/dogs/Makefile.hp
-{ default
- install_target = /usr/dt/share/examples/motif/dogs/Makefile.HP
-}
-
-examples/motif/dogs/Makefile.sun
-{ default
- install_target = /usr/dt/share/examples/motif/dogs/Makefile.SUN
-}
-
-examples/motif/dogs/Makefile.uxp
-{ default
- install_target = /usr/dt/share/examples/motif/dogs/Makefile.UXP
-}
-
-examples/motif/dogs/Makefile.novell
-{ default
- install_target = /usr/dt/share/examples/motif/dogs/Makefile.NOVELL
-}
-
#
# examples README
#
Motif reference- resolving mechanism if you want your application to be binary
compatible with future releases of the Common Desktop Environment.</para>
</note>
-<para>For details regarding this Motif mechanism, consult the Motif 2.1 <filename>XmResolvePartOffsets(3x)</filename> and <filename>XmResolveAllPartOffsets(3x)</filename> man pages and the <emphasis>Motif Programmer's Reference</emphasis>. You can find example source code in <filename>/usr/dt/examples/motif/dogs</filename><literal><indexterm><primary>guidelines</primary><secondary>Common
+<para>For details regarding this Motif mechanism, consult the Motif 2.1 <filename>XmResolvePartOffsets(3x)</filename> and <filename>XmResolveAllPartOffsets(3x)</filename> man pages and the <emphasis>Motif Programmer's Reference</emphasis>. You can find example source code in Motif's example code<literal><indexterm><primary>guidelines</primary><secondary>Common
Desktop Environment Motif widget binary compatibility</secondary></indexterm><indexterm>
<primary>compatibility</primary><secondary>guidelines, for Common Desktop
Environment widgets</secondary></indexterm><indexterm><primary>widget</primary>
+++ /dev/null
-# $XConsortium: Makefile.hp /main/2 1996/05/13 11:55:06 drk $
-##########################################################################
-#
-# Makefile for Motif clipboard examples (HP)
-#
-# (c) Copyright 1993, 1994 Hewlett-Packard Company
-# (c) Copyright 1993, 1994 International Business Machines Corp.
-# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
-# (c) Copyright 1993, 1994 Novell, Inc.
-#
-##########################################################################
-
-CC = cc
-RM = rm -f
-UIL = /usr/dt/bin/uil
-
-PROGRAM = cutpaste
-SOURCES = cutpaste.c
-OBJECTS = cutpaste.o
-UID = cutpaste.uid
-UILSOURCE = cutpaste.uil
-
-DEFINES =
-CDEBUGFLAGS = -O
-CFLAGS = -Aa -z $(DEFINES) $(CDEBUGFLAGS)
-
-DTINCLUDE = -I/usr/dt/include
-X11INCLUDE = -I/usr/include/X11R5
-
-INCLUDES = $(DTINCLUDE) $(X11INCLUDE)
-
-DTLIBS = -L/usr/dt/lib -lMrm -lXm
-X11LIBS = -L/usr/lib/X11R5 -lXt -lX11
-SYSLIBS =
-
-LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS)
-LDFLAGS =
-
-.c.o:
- ${CC} -c $(CFLAGS) $(INCLUDES) $<
-
-all:: $(PROGRAM) $(UID)
-
-$(PROGRAM):: $(OBJECTS)
- $(CC) -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
-
-$(UID):: $(UILSOURCE)
- $(UIL) -o $(UID) $(UILSOURCE)
-
-clean::
- $(RM) $(PROGRAM) $(OBJECTS) $(UID)
-
+++ /dev/null
-# $XConsortium: Makefile.ibm /main/2 1996/05/13 11:55:26 drk $
-##########################################################################
-#
-# Makefile for Motif clipboard examples (IBM)
-#
-# (c) Copyright 1993, 1994 Hewlett-Packard Company
-# (c) Copyright 1993, 1994 International Business Machines Corp.
-# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
-# (c) Copyright 1993, 1994 Novell, Inc.
-#
-##########################################################################
-
-CC = cc
-RM = rm -f
-UIL = /usr/dt/bin/uil
-
-PROGRAM = cutpaste
-SOURCES = cutpaste.c
-OBJECTS = cutpaste.o
-UID = cutpaste.uid
-UILSOURCE = cutpaste.uil
-
-DEFINES =
-CDEBUGFLAGS = -O
-CFLAGS = $(DEFINES) $(CDEBUGFLAGS)
-
-DTINCLUDE = -I/usr/dt/include
-X11INCLUDE = -I/usr/include
-
-INCLUDES = $(DTINCLUDE) $(X11INCLUDE)
-
-DTLIBS = -L/usr/dt/lib -lMrm -lXm
-X11LIBS = -L/usr/lib -lXt -lX11
-SYSLIBS =
-
-LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS)
-LDFLAGS =
-
-.c.o:
- $(CC) -c $(CFLAGS) $(INCLUDES) $<
-
-all:: $(PROGRAM) $(UID)
-
-$(PROGRAM):: $(OBJECTS)
- $(CC) -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
-
-$(UID):: $(UILSOURCE)
- $(UIL) -o $(UID) $(UILSOURCE)
-
-clean::
- $(RM) $(PROGRAM) $(OBJECTS) $(UID)
+++ /dev/null
-# $XConsortium: Makefile.novell /main/2 1996/05/13 11:55:41 drk $
-##########################################################################
-#
-# Makefile for Motif clipboard examples (Novell)
-#
-# (c) Copyright 1993, 1994 Hewlett-Packard Company
-# (c) Copyright 1993, 1994 International Business Machines Corp.
-# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
-# (c) Copyright 1993, 1994 Novell, Inc.
-#
-##########################################################################
-
-CC = cc
-RM = rm -f
-UIL = /usr/dt/bin/uil
-
-PROGRAM = cutpaste
-SOURCES = cutpaste.c
-OBJECTS = cutpaste.o
-UID = cutpaste.uid
-UILSOURCE = cutpaste.uil
-
-DEFINES =
-CDEBUGFLAGS = -O
-CFLAGS = -Xc $(DEFINES) $(CDEBUGFLAGS)
-
-DTINCLUDE = -I/usr/dt/include
-X11INCLUDE = -I/usr/X/include
-
-INCLUDES = $(DTINCLUDE) $(X11INCLUDE)
-
-DTLIBS = -L/usr/dt/lib -lMrm -lXm
-X11LIBS = -L/usr/X/lib -lXt -lX11
-SYSLIBS = -lw -lgen -lnsl -lresolv -lsocket -lXIM
-
-LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS)
-LDFLAGS =
-
-.c.o:
- $(CC) -c $(CFLAGS) $(INCLUDES) $<
-
-all:: $(PROGRAM) $(UID)
-
-$(PROGRAM):: $(OBJECTS)
- $(CC) -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
-
-$(UID):: $(UILSOURCE)
- $(UIL) -o $(UID) $(UILSOURCE)
-
-clean::
- $(RM) $(PROGRAM) $(OBJECTS) $(UID)
-
+++ /dev/null
-# $XConsortium: Makefile.sun /main/2 1996/05/13 11:55:58 drk $
-##########################################################################
-#
-# Makefile for Motif clipboard examples (SUN)
-#
-# (c) Copyright 1993, 1994 Hewlett-Packard Company
-# (c) Copyright 1993, 1994 International Business Machines Corp.
-# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
-# (c) Copyright 1993, 1994 Novell, Inc.
-#
-##########################################################################
-
-CC = cc
-RM = rm -f
-UIL = /usr/dt/bin/uil
-
-PROGRAM = cutpaste
-SOURCES = cutpaste.c
-OBJECTS = cutpaste.o
-UID = cutpaste.uid
-UILSOURCE = cutpaste.uil
-
-DEFINES =
-CDEBUGFLAGS = -O
-CFLAGS = $(DEFINES) $(CDEBUGFLAGS)
-
-DTINCLUDE = -I/usr/dt/include
-X11INCLUDE = -I/usr/openwin/include
-
-INCLUDES = $(DTINCLUDE) $(X11INCLUDE)
-
-DTLIBS = -L/usr/dt/lib -lMrm -lXm
-X11LIBS = -L/usr/openwin/lib -lXt -lX11
-SYSLIBS = -ldl -lw -lgen
-
-LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS)
-LDFLAGS = -R/usr/dt/lib:/usr/openwin/lib
-
-.c.o:
- $(CC) -c $(CFLAGS) $(INCLUDES) $<
-
-all:: $(PROGRAM) $(UID)
-
-$(PROGRAM):: $(OBJECTS)
- $(CC) -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
-
-$(UID):: $(UILSOURCE)
- $(UIL) -o $(UID) $(UILSOURCE)
-
-clean::
- $(RM) $(PROGRAM) $(OBJECTS) $(UID)
+++ /dev/null
-# $XConsortium: Makefile.uxp /main/2 1996/05/13 11:56:16 drk $
-##########################################################################
-#
-# Makefile for Motif clipboard examples (UXP)
-#
-# (Fujitsu.patch applied)
-#
-# (c) Copyright 1993, 1994 Hewlett-Packard Company
-# (c) Copyright 1993, 1994 International Business Machines Corp.
-# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
-# (c) Copyright 1993, 1994 Novell, Inc.
-#
-##########################################################################
-
-CC = cc
-RM = rm -f
-UIL = /usr/dt/bin/uil
-
-PROGRAM = cutpaste
-SOURCES = cutpaste.c
-OBJECTS = cutpaste.o
-UID = cutpaste.uid
-UILSOURCE = cutpaste.uil
-
-DEFINES =
-CDEBUGFLAGS = -O
-CFLAGS = -Xc $(DEFINES) $(CDEBUGFLAGS)
-
-DTINCLUDE = -I/usr/dt/include
-
-INCLUDES = $(DTINCLUDE)
-
-DTLIBS = -L/usr/dt/lib -lMrm -lXm
-X11LIBS = -lXt -lX11
-SYSLIBS = -lw -lgen -lnsl -lresolv -lsocket
-
-LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS)
-LDFLAGS =
-
-.c.o:
- $(CC) -c $(CFLAGS) $(INCLUDES) $<
-
-all:: $(PROGRAM) $(UID)
-
-$(PROGRAM):: $(OBJECTS)
- $(CC) -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
-
-$(UID):: $(UILSOURCE)
- $(UIL) -o $(UID) $(UILSOURCE)
-
-clean::
- $(RM) $(PROGRAM) $(OBJECTS) $(UID)
-
+++ /dev/null
-/* $XConsortium: README /main/2 1996/07/15 14:03:37 drk $ */
-
-This directory contains demonstrations of the Motif Clipboard.
-
-cutpaste - Examples of cutting and pasting application defined
- data formats using the XmClipboard API.
-
- Run two cutpaste clients, and transfer graph values
- using the pulldown and popup menus.
+++ /dev/null
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-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 libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/* $XConsortium: cutpaste.c /main/4 1995/10/27 10:41:39 rswiston $ */
-/*
- * (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC.
- * ALL RIGHTS RESERVED
- */
-/*
- * Motif Release 1.2
- */
-
-/******************************************************************************
- * cutpaste.c
- *
- *
- *****************************************************************************/
-
-#include <stdio.h>
-#include <Xm/Xm.h>
-#include <Xm/CutPaste.h>
-#include <Mrm/MrmPublic.h>
-
-
-static Boolean CopyToClipboard(
- Time time);
-static Boolean PasteClipboard(
- Time time );
-static void PopupHandler(
- Widget w,
- Widget pw,
- XEvent *event,
- Boolean *ctd );
-static void ManageCb(
- Widget w,
- String id,
- XtPointer cb );
-static void InitPopupCb(
- Widget w,
- String id,
- XtPointer cb );
-static void CutCb(
- Widget w,
- XtPointer cd,
- XmPushButtonCallbackStruct *cb );
-static void CopyCb(
- Widget w,
- XtPointer cd,
- XmPushButtonCallbackStruct *cb );
-static void PasteCb(
- Widget w,
- XtPointer cd,
- XmPushButtonCallbackStruct *cb );
-static void ExitCb(
- Widget w,
- XtPointer cd,
- XtPointer cb );
-
-
-static MrmHierarchy mrm_id;
-static char *mrm_vec[]={"cutpaste.uid"};
-static MrmCode mrm_class;
-static MRMRegisterArg mrm_names[] = {
- {"InitPopupCb", (XtPointer)InitPopupCb },
- {"ManageCb", (XtPointer)ManageCb },
- {"CutCb", (XtPointer)CutCb },
- {"CopyCb", (XtPointer)CopyCb },
- {"PasteCb", (XtPointer)PasteCb },
- {"ExitCb", (XtPointer)ExitCb }
-};
-
-#define GraphFormat "MY_GRAPH_DATA"
-
-#define MIN(x,y) ((x) > (y) ? (y) : (x))
-
-static XtAppContext appContext;
-static Widget shell;
-static Widget *bars;
-static Cardinal nbars;
-
-int
-main(
- int argc,
- char *argv[] )
-{
- Widget app_main;
- Display *display;
- Arg args[2];
- Widget *children;
-
- XtToolkitInitialize();
- MrmInitialize ();
- appContext = XtCreateApplicationContext();
- display = XtOpenDisplay(appContext, NULL, argv[0], "Cutpaste",
- NULL, 0, &argc, argv);
- if (display == NULL) {
- fprintf(stderr, "%s: Can't open display\n", argv[0]);
- exit(1);
- }
- shell = XtAppCreateShell(argv[0], NULL, applicationShellWidgetClass,
- display, NULL, 0);
- if (MrmOpenHierarchy (1, mrm_vec, NULL, &mrm_id) != MrmSUCCESS) exit(0);
- MrmRegisterNames(mrm_names, XtNumber(mrm_names));
- MrmFetchWidget (mrm_id, "appMain", shell, &app_main, &mrm_class);
- XtManageChild(app_main);
-
- /* define graph data format */
-
- while (XmClipboardRegisterFormat (display, GraphFormat, 32) ==
- XmClipboardLocked) { }
-
- XtSetArg (args[0], XmNchildren, &children);
- XtSetArg (args[1], XmNnumChildren, &nbars);
- XtGetValues (XtNameToWidget (shell, "*graphForm"), args, 2);
- bars = (Widget *) XtMalloc (nbars * sizeof(Widget));
- memcpy (bars, children, nbars * sizeof(Widget));
-
- XtRealizeWidget(shell);
-
- XtAppMainLoop(appContext);
-}
-
-static void
-ManageCb(
- Widget w,
- String id,
- XtPointer cb )
-
-{
- XtManageChild (XtNameToWidget (shell, id));
-}
-
-static void
-ExitCb(
- Widget w,
- XtPointer cd,
- XtPointer cb )
-{
- exit(0);
-}
-
-/*****************************************************************
- *
- * PopupMenu support
- *
- *****************************************************************/
-
-static void
-InitPopupCb(
- Widget w,
- String id,
- XtPointer cb )
-{
- Widget popupWindow = XtNameToWidget (shell, id);
-
- XtAddEventHandler (popupWindow, ButtonPressMask, False,
- (XtEventHandler)PopupHandler, (XtPointer) w);
-}
-
-static void
-PopupHandler (
- Widget w,
- Widget pw,
- XEvent *event,
- Boolean *ctd )
-{
- if (((XButtonEvent *)event)->button != Button3) return;
-
- XmMenuPosition((Widget) pw, (XButtonEvent *)event);
- XtManageChild ((Widget) pw);
-}
-
-/*****************************************************************
- *
- * Clipboard support
- *
- *****************************************************************/
-
-static void
-CutCb(
- Widget w,
- XtPointer cd,
- XmPushButtonCallbackStruct *cb )
-{
- XButtonEvent *be = (XButtonEvent *)cb->event;
- Arg args[1];
- int i;
-
- if (CopyToClipboard(be->time) == True) {
-
- /* clear graph data */
-
- XtSetArg (args[0], XmNvalue, 0);
- for (i=0; i < nbars; i++)
- XtSetValues (bars[i], args, 1);
- }
- else {
- XBell (XtDisplay(w), 0);
- }
-}
-
-static void
-CopyCb(
- Widget w,
- XtPointer cd,
- XmPushButtonCallbackStruct *cb )
-{
- XButtonEvent *be = (XButtonEvent *)cb->event;
-
- if (CopyToClipboard(be->time) != True) {
- XBell (XtDisplay(w), 0);
- }
-}
-
-static void
-PasteCb(
- Widget w,
- XtPointer cd,
- XmPushButtonCallbackStruct *cb )
-{
- XButtonEvent *be = (XButtonEvent *)cb->event;
-
- if (PasteClipboard(be->time) != True) {
- XBell (XtDisplay(w), 0);
- }
-}
-
-static Boolean
-CopyToClipboard(
- Time time )
-{
- Display *dpy = XtDisplay (shell);
- Window window = XtWindow (shell);
- long itemId = 0;
- XmString clipLabel;
- long *graphData;
- int value;
- int i;
- Arg args[1];
-
- if (XmClipboardLock (dpy, window) == XmClipboardLocked)
- return (False);
-
- clipLabel = XmStringCreateLtoR ("cutpaste", XmFONTLIST_DEFAULT_TAG);
-
- XmClipboardStartCopy ( dpy, window, clipLabel, time, NULL, NULL, &itemId);
-
- /* copy graph data */
-
- graphData = (long *)XtMalloc (nbars * sizeof (long));
- XtSetArg (args[0], XmNvalue, &value);
- for (i=0; i < nbars; i++) {
- XtGetValues (bars[i], args, 1);
- graphData[i] = (long)value;
- }
-
- XmClipboardCopy (dpy, window, itemId, GraphFormat, (XtPointer)graphData,
- (nbars * sizeof(long)), 0, NULL);
-
- XmClipboardEndCopy (dpy, window, itemId);
-
- XmClipboardUnlock (dpy, window, False);
-
- XtFree ((char *)clipLabel);
- XtFree ((char *)graphData);
-
- return (True);
-}
-
-static Boolean
-PasteClipboard(
- Time time )
-{
- Display *dpy = XtDisplay (shell);
- Window window = XtWindow (shell);
- unsigned long length = 0;
- long *graphData;
- int i;
- int setBars;
- Arg args[1];
-
- if (XmClipboardStartRetrieve (dpy, window, time) == XmClipboardLocked)
- return (False);
-
- XmClipboardInquireLength(dpy, window, GraphFormat, &length);
-
- if (length == 0) {
- XmClipboardEndRetrieve (dpy, window);
- return (False);
- }
-
- graphData = (long *)XtMalloc (length * sizeof (long));
-
- XmClipboardRetrieve(dpy, window, GraphFormat, graphData, length,
- NULL, NULL);
-
- XmClipboardEndRetrieve(dpy, window);
-
- setBars = MIN (nbars, length);
- for (i = 0; i < setBars; i++) {
- XtSetArg (args[0], XmNvalue, graphData[i]);
- XtSetValues (bars[i], args, 1);
- }
-
- XtFree ((char *)graphData);
-
- return (True);
-}
-
+++ /dev/null
-! (c) Copyright 1989, 1990, 1991, 1992, 1993 OPEN SOFTWARE FOUNDATION, INC.
-! ALL RIGHTS RESERVED
-!
-! Motif Release 1.2.2
-
-
-module cutpaste
- version = 'v1.2'
- names = case_sensitive
- character_set=iso_latin1
- objects = {
- XmLabel = widget;
- XmPushButton = widget;
- XmToggleButton = widget;
- XmCascadeButton = widget;
- XmSeparator = widget;
- }
-
-include file ("cutpaste_local.uil");
-
-procedure
- InitPopupCb(string);
- ManageCb(string);
- CutCb();
- CopyCb();
- PasteCb();
- ExitCb();
-
-list scrollArgs : arguments {
- XmNleftAttachment = XmATTACH_POSITION;
- XmNrightAttachment = XmATTACH_POSITION;
- XmNtopAttachment = XmATTACH_FORM;
- XmNbottomAttachment = XmATTACH_FORM;
- XmNshowArrows = false;
- XmNsliderSize = 5;
- XmNtraversalOn = true;
- XmNhighlightThickness = 1;
- XmNprocessingDirection = XmMAX_ON_TOP;
-};
-
-
-!
-! Main window
-!
-object appMain : XmMainWindow {
- arguments {
- XmNmenuBar = XmMenuBar menuBar;
- };
- controls {
- XmMenuBar menuBar;
- XmFrame workArea;
- unmanaged XmInformationDialog helpDialog;
- };
-};
-
-
-
-
-!
-! Menu bar and pulldown menus
-!
-
-object menuBar : XmMenuBar {
- arguments {
- XmNmenuHelpWidget = XmCascadeButton helpCascade;
- };
- controls {
- XmCascadeButton fileCascade;
- XmCascadeButton editCascade;
- XmCascadeButton helpCascade;
- };
-};
-
-object fileCascade : XmCascadeButton {
- arguments {
- XmNlabelString = fileCascadeText;
- XmNmnemonic = keysym(fileCascadeMnem);
- };
- controls { XmPulldownMenu {
-! arguments { XmNtearOffModel = XmTEAR_OFF_ENABLED; };
- controls {
- XmPushButton exitButton;
- }; };
- };
-};
-
-object exitButton : XmPushButton {
- arguments {
- XmNlabelString = exitButtonText;
- XmNmnemonic = keysym(exitButtonMnem);
- };
- callbacks { XmNactivateCallback = procedure ExitCb(); };
-};
-object editCascade : XmCascadeButton {
- arguments {
- XmNlabelString = editCascadeText;
- XmNmnemonic = keysym(editCascadeMnem);
- };
- controls { XmPulldownMenu {
- arguments { XmNtearOffModel = XmTEAR_OFF_ENABLED; };
- controls {
- XmPushButton cutButton;
- XmPushButton copyButton;
- XmPushButton pasteButton;
- }; };
- };
-};
-
-object helpCascade : XmCascadeButton {
- arguments {
- XmNlabelString = helpCascadeText;
- XmNmnemonic = keysym(helpCascadeMnem);
- };
- controls { XmPulldownMenu {
- arguments { XmNtearOffModel = XmTEAR_OFF_ENABLED; };
- controls {
- XmPushButton helpButton;
- }; };
- };
-};
-object helpButton : XmPushButton {
- arguments {
- XmNlabelString = helpButtonText;
- XmNmnemonic = keysym(helpButtonMnem);
- };
- callbacks { XmNactivateCallback = procedure ManageCb("*helpDialog"); };
-};
-
-
-
-
-!
-! Popup menu
-!
-
-object popupMenu : XmPopupMenu {
- arguments { XmNtearOffModel = XmTEAR_OFF_ENABLED; };
- controls {
- XmLabel { arguments { XmNlabelString = popupTitleText; }; };
- XmSeparator { arguments { XmNseparatorType = XmDOUBLE_LINE; }; };
- XmPushButton cutButton;
- XmPushButton copyButton;
- XmPushButton pasteButton;
- };
- callbacks {
- MrmNcreateCallback = procedure InitPopupCb("*displayArea");
- };
-};
-
-object cutButton : XmPushButton {
- arguments {
- XmNlabelString = menuCutText;
- XmNmnemonic = keysym(menuCutMnem);
- };
- callbacks { XmNactivateCallback = procedure CutCb(); };
-};
-object copyButton : XmPushButton {
- arguments {
- XmNlabelString = menuCopyText;
- XmNmnemonic = keysym(menuCopyMnem);
- };
- callbacks { XmNactivateCallback = procedure CopyCb(); };
-};
-object pasteButton : XmPushButton {
- arguments {
- XmNlabelString = menuPasteText;
- XmNmnemonic = keysym(menuPasteMnem);
- };
- callbacks { XmNactivateCallback = procedure PasteCb(); };
-};
-
-
-!
-! Work area
-!
-
-object workArea : XmFrame {
- arguments {
- XmNmarginWidth = 20;
- XmNmarginHeight = 20;
- };
- controls { XmFrame displayArea; };
-};
-
-object displayArea : XmFrame {
- arguments {
- XmNmarginWidth = 10;
- XmNmarginHeight = 10;
- XmNshadowType = XmSHADOW_OUT;
- XmNshadowThickness = 1;
- };
- controls {
- XmLabel graphLabel;
- XmForm graphForm;
- unmanaged XmPopupMenu popupMenu;
- };
-};
-
-object graphLabel : XmLabel {
- arguments {
- XmNchildType = XmFRAME_TITLE_CHILD;
- XmNchildHorizontalAlignment = XmALIGNMENT_END;
- XmNlabelString = graphLabelText;
- };
-};
-
-object graphForm : XmForm {
- arguments {
- XmNfractionBase = 15;
- };
- controls {
- XmScrollBar { arguments {
- arguments scrollArgs;
- XmNleftPosition = 0; XmNrightPosition = 1;
- }; };
- XmScrollBar { arguments {
- arguments scrollArgs;
- XmNleftPosition = 1; XmNrightPosition = 2;
- }; };
- XmScrollBar { arguments {
- arguments scrollArgs;
- XmNleftPosition = 2; XmNrightPosition = 3;
- }; };
- XmScrollBar { arguments {
- arguments scrollArgs;
- XmNleftPosition = 3; XmNrightPosition = 4;
- }; };
- XmScrollBar { arguments {
- arguments scrollArgs;
- XmNleftPosition = 4; XmNrightPosition = 5;
- }; };
- XmScrollBar { arguments {
- arguments scrollArgs;
- XmNleftPosition = 5; XmNrightPosition = 6;
- }; };
- XmScrollBar { arguments {
- arguments scrollArgs;
- XmNleftPosition = 6; XmNrightPosition = 7;
- }; };
- XmScrollBar { arguments {
- arguments scrollArgs;
- XmNleftPosition = 7; XmNrightPosition = 8;
- }; };
- XmScrollBar { arguments {
- arguments scrollArgs;
- XmNleftPosition = 8; XmNrightPosition = 9;
- }; };
- XmScrollBar { arguments {
- arguments scrollArgs;
- XmNleftPosition = 9; XmNrightPosition = 10;
- }; };
- XmScrollBar { arguments {
- arguments scrollArgs;
- XmNleftPosition = 10; XmNrightPosition = 11;
- }; };
- XmScrollBar { arguments {
- arguments scrollArgs;
- XmNleftPosition = 11; XmNrightPosition = 12;
- }; };
- XmScrollBar { arguments {
- arguments scrollArgs;
- XmNleftPosition = 12; XmNrightPosition = 13;
- }; };
- XmScrollBar { arguments {
- arguments scrollArgs;
- XmNleftPosition = 13; XmNrightPosition = 14;
- }; };
- XmScrollBar { arguments {
- arguments scrollArgs;
- XmNleftPosition = 14; XmNrightPosition = 15;
- }; };
- };
-};
-
-!
-! Help dialog
-!
-
-object helpDialog : XmInformationDialog {
- arguments {
- XmNdialogTitle = helpTitleText;
- XmNcancelLabelString = helpCancelText;
- XmNmessageString = helpMessageText;
- };
- controls {
- Xm_OK unmanaged { };
- Xm_Help unmanaged { };
- };
-};
-
-
-
-end module;
+++ /dev/null
-! (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC.
-! ALL RIGHTS RESERVED
-!
-! Motif Release 1.2
-
-! Main Window
-
-! Menu bar
-
-value
-
-fileCascadeText : "File";
-fileCascadeMnem : "F";
-exitButtonText : "Exit";
-exitButtonMnem : "E";
-
-editCascadeText : "Edit";
-editCascadeMnem : "E";
-
-menuCutText : "Cut";
-menuCutMnem : "t";
-menuCopyText : "Copy";
-menuCopyMnem : "C";
-menuPasteText : "Paste";
-menuPasteMnem : "P";
-
-helpCascadeText : "Help";
-helpCascadeMnem : "H";
-helpButtonText : "Overiew";
-helpButtonMnem : "O";
-
-! work area
-
-graphLabelText : "Distribution";
-
-! Help dialog
-
-helpTitleText : "cutpaste";
-helpCancelText : "Dismiss";
-helpMessageText :
- compound_string ("cutpaste", separate=true) &
- compound_string ("", separate=true) &
- compound_string ("Set graph slider values.", separate=true) &
- compound_string ("", separate=true) &
- compound_string ("Copy graph values between ") &
- compound_string ("cutpaste clients", separate=true) &
- compound_string ("using popup and pulldown menu commands.") &
- compound_string ("", separate=true) &
- compound_string ("");
-
-! Popup menu
-
-popupTitleText : "Edit";
-popupCutText : "Cut";
-popupCutMnem : "t";
-popupCopyText : "Copy";
-popupCopyMnem : "C";
-popupPasteText : "Paste";
-popupPasteMnem : "P";
-
-
-
+++ /dev/null
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-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 libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/*
- * (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC.
- * ALL RIGHTS RESERVED
-*/
-/*
- * Motif Release 1.2
-*/
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = "$XConsortium: Dog.c /main/4 1995/10/27 10:41:52 rswiston $"
-#endif
-#endif
-
-/*****************************************************************************
-*
-* Dog.c - Dog widget source file
-*
-******************************************************************************/
-#include <stdio.h>
-#include <X11/StringDefs.h>
-#include <Xm/Xm.h>
-#include <Mrm/MrmPublic.h>
-#include "DogP.h"
-
-#include "up.bm"
-#include "down.bm"
-#include "bark.bm"
-
-#ifndef MAX
-#define MAX(x,y) ((x) > (y) ? (x) : (y))
-#endif
-
-#define WagTime(w) XmField(w,offsets,Dog,wag_time, int)
-#define BarkTime(w) XmField(w,offsets,Dog,bark_time, int)
-#define BarkCallback(w) XmField(w,offsets,Dog,bark_callback,XtCallbackList)
-#define UpPixmap(w) XmField(w,offsets,Dog,up_pixmap,Pixmap)
-#define DownPixmap(w) XmField(w,offsets,Dog,down_pixmap,Pixmap)
-#define BarkPixmap(w) XmField(w,offsets,Dog,bark_pixmap,Pixmap)
-#define CurrPixmap(w) XmField(w,offsets,Dog,curr_pixmap,Pixmap)
-#define CurrPx(w) XmField(w,offsets,Dog,curr_px,int)
-#define Wagging(w) XmField(w,offsets,Dog,wagging,Boolean)
-#define Barking(w) XmField(w,offsets,Dog,barking,Boolean)
-#define DrawGC(w) XmField(w,offsets,Dog,draw_GC,GC)
-#define PixmapX(w) XmField(w,offsets,Dog,pixmap_x,Position)
-#define PixmapY(w) XmField(w,offsets,Dog,pixmap_y,Position)
-#define DrawX(w) XmField(w,offsets,Dog,draw_x,Position)
-#define DrawY(w) XmField(w,offsets,Dog,draw_y,Position)
-#define DrawWidth(w) XmField(w,offsets,Dog,draw_width,Dimension)
-#define DrawHeight(w) XmField(w,offsets,Dog,draw_height,Dimension)
-#define CurrWidth(w) XmField(w,offsets,Dog,curr_width,Dimension)
-#define CurrHeight(w) XmField(w,offsets,Dog,curr_height,Dimension)
-#define HighlightThickness(w) \
- XmField(w,offsets,XmPrimitive,highlight_thickness,Dimension)
-#define ShadowThickness(w) \
- XmField(w,offsets,XmPrimitive,shadow_thickness,Dimension)
-#define Foreground(w) XmField(w,offsets,XmPrimitive,foreground,Pixel)
-#define Highlighted(w) XmField(w,offsets,XmPrimitive,highlighted,Boolean)
-#define TopShadowGC(w) XmField(w,offsets,XmPrimitive,top_shadow_GC,GC)
-#define BottomShadowGC(w) XmField(w,offsets,XmPrimitive,bottom_shadow_GC,GC)
-#define BackgroundPixel(w) XmField(w,offsets,Core,background_pixel,Pixel)
-#define Width(w) XmField(w,offsets,Core,width,Dimension)
-#define Height(w) XmField(w,offsets,Core,height,Dimension)
-
-#define SetPixmap(w, px, pixmap, width, height) \
- CurrPx(w) = px; CurrPixmap(w) = pixmap; \
- CurrWidth(w) = width; CurrHeight(w) = height
-
-#define MakePixmap(b,wd,ht) \
- XCreatePixmapFromBitmapData(XtDisplay(w),RootWindowOfScreen(XtScreen(w)), \
- (char*)(b), (wd), (ht), Foreground(w), BackgroundPixel(w), \
- DefaultDepthOfScreen(XtScreen(w)))
-
-static void ClassInitialize();
-static void Initialize();
-static void Redisplay();
-static void Resize();
-static void Destroy();
-static Boolean SetValues();
-static XtGeometryResult QueryGeometry();
-
-static void bark_dog();
-static void end_bark();
-static void start_wag();
-static void stop_wag();
-static void do_wag();
-
-static char defaultTranslations[] =
- "<Btn1Down>: Bark()\n\
- ~Shift<Btn2Down>: StartWag()\n\
- Shift<Btn2Down>: StopWag()\n\
- <Key>Return: Bark()\n\
- Ctrl <Key>Return: Bark()\n\
- <Key>osfActivate: Bark()\n\
- <Key>space: Bark()\n\
- Ctrl <Key>space: Bark()\n\
- <Key>osfSelect: Bark()\n\
- <Key>W: StartWag()\n\
- <Key>S: StopWag()\n\
- <Key>osfHelp: PrimitiveHelp()";
-
-static XtActionsRec actionsList[] = {
- { "Bark", (XtActionProc) bark_dog},
- { "StartWag", (XtActionProc) start_wag},
- { "StopWag", (XtActionProc) stop_wag}
-};
-
-static XmPartResource resources[] = {
- {DogNwagTime, DogCWagTime, XtRInt, sizeof(int),
- XmPartOffset(Dog,wag_time), XmRImmediate, (XtPointer)100},
- {DogNbarkTime, DogCBarkTime, XtRInt, sizeof(int),
- XmPartOffset(Dog,bark_time), XmRImmediate, (XtPointer)1000},
- {DogNbarkCallback, XtCCallback, XtRCallback, sizeof(XtPointer),
- XmPartOffset(Dog,bark_callback), XtRCallback, NULL}
-};
-
-DogClassRec dogClassRec = {
- { /* core_class fields */
- (WidgetClass) &xmPrimitiveClassRec, /* superclass */
- "Dog", /* class_name */
- sizeof(DogPart), /* widget_size */
- ClassInitialize, /* class_initialize */
- NULL, /* class_part_initialize*/
- False, /* class_inited */
- Initialize, /* initialize */
- NULL, /* initialize_notify */
- XtInheritRealize, /* realize */
- actionsList, /* actions */
- XtNumber(actionsList), /* num_actions */
- (XtResourceList)resources, /* resources */
- XtNumber(resources), /* num_resources */
- NULLQUARK, /* xrm_class */
- True, /* compress_motion */
- True, /* compress_exposure */
- True, /* compress_enterleave */
- False, /* visible_interest */
- Destroy, /* destroy */
- Resize, /* resize */
- Redisplay, /* expose */
- SetValues, /* set_values */
- NULL, /* set_values_hook */
- XtInheritSetValuesAlmost, /* set_values_almost */
- NULL, /* get_values_hook */
- NULL, /* accept_focus */
- XtVersionDontCheck, /* version */
- NULL, /* callback_private */
- defaultTranslations, /* tm_table */
- QueryGeometry, /* query_geometry */
- NULL, /* disp accelerator */
- NULL /* extension */
- },
- { /* primitive_class record */
- XmInheritWidgetProc, /* border_highlight */
- XmInheritWidgetProc, /* border_unhighlight */
- XtInheritTranslations, /* translations */
- bark_dog, /* arm_and_activate */
- NULL, /* syn resources */
- 0, /* num syn_resources */
- NULL, /* extension */
- },
- { /* dog_class record */
- NULL, /* extension */
- }
-};
-
-externaldef(dogwidgetclass) WidgetClass dogWidgetClass =
- (WidgetClass) &dogClassRec;
-
-static XmOffsetPtr offsets; /* Part Offset table for XmResolvePartOffsets */
-
-/**********************************************************************
- *
- * DogCreate - Convenience routine, used by Uil/Mrm.
- *
- *********************************************************************/
-
-Widget DogCreate(parent, name, arglist, nargs)
- Widget parent;
- char *name;
- Arg *arglist;
- int nargs;
-{
- return(XtCreateWidget (name, dogWidgetClass, parent, arglist, nargs));
-}
-
-/**********************************************************************
- *
- * DogMrmInitialize - register Dog widget class with Mrm
- *
- *********************************************************************/
-
-int DogMrmInitialize()
-{
- return(MrmRegisterClass (MrmwcUnknown, "Dog" , "DogCreate", DogCreate,
- (WidgetClass)&dogClassRec));
-}
-
-/**********************************************************************
- *
- * _DogDrawPixmap - draw the current pixmap
- *
- *********************************************************************/
-
-void _DogDrawPixmap(w)
- DogWidget w;
-{
- if (XtIsRealized(w)) {
- XCopyArea(XtDisplay(w),CurrPixmap(w),
- XtWindow(w),DrawGC(w),
- PixmapX(w), PixmapY(w),
- DrawWidth(w), DrawHeight(w),
- DrawX(w), DrawY(w));
- }
-}
-
-/**********************************************************************
- *
- * _DogPosition(w) - position the current pixmap
- *
- *********************************************************************/
-
-void _DogPosition(w)
- DogWidget w;
-{
- Dimension margin = ShadowThickness(w) + HighlightThickness(w);
-
- if (CurrWidth(w) < MAX(Width(w) - 2u * margin,0)) {
- PixmapX(w) = 0;
- DrawX(w) = Width(w)/2 - CurrWidth(w)/2;
- DrawWidth(w) = CurrWidth(w);
- }
- else {
- PixmapX(w) = (CurrWidth(w) - (Width(w) - 2 * margin))/2u;
- DrawX(w) = margin;
- DrawWidth(w) = Width(w) - 2 * margin;
- }
-
- if (CurrHeight(w) < MAX(Height(w) - 2u * margin,0)) {
- PixmapY(w)= 0;
- DrawY(w) = Height(w)/2 - CurrHeight(w)/2;
- DrawHeight(w) = CurrHeight(w);
- }
- else {
- PixmapY(w) = (CurrHeight(w) - (Height(w) - 2 * margin))/2u;
- DrawY(w) = margin;
- DrawHeight(w) = Height(w) - 2 * margin;
- }
-}
-
-/**********************************************************************
- *
- * Class methods
- *
- *********************************************************************/
-
-static void ClassInitialize()
-{
- XmResolvePartOffsets(dogWidgetClass, &offsets);
-}
-
-
-static create_GC(w)
- DogWidget w;
-{
- XGCValues values;
- XtGCMask valueMask;
-
- valueMask = GCForeground | GCBackground | GCGraphicsExposures;
- values.foreground = Foreground(w);
- values.background = BackgroundPixel(w);
- values.graphics_exposures = False;
- DrawGC(w) = XtGetGC((Widget)w,valueMask,&values);
-}
-
-static create_pixmaps(w)
- DogWidget w;
-{
- UpPixmap(w) = MakePixmap(up_bits, up_width, up_height);
- DownPixmap(w) = MakePixmap(down_bits, down_width, down_height);
- BarkPixmap(w) = MakePixmap(bark_bits, bark_width, bark_height);
-}
-
-static void Initialize(request, new)
- DogWidget request;
- DogWidget new;
-{
- if (Width(request) == 0)
- Width(new) = MAX(MAX(up_width, down_width),bark_width) +
- 2*(ShadowThickness(new)+HighlightThickness(new));
- if (Height(request) == 0)
- Height(new) = MAX(MAX(up_height, down_height),bark_height) +
- 2*(ShadowThickness(new)+HighlightThickness(new));
- create_GC(new);
- create_pixmaps(new);
- SetPixmap(new, DownPx, DownPixmap(new), down_width, down_height);
- Wagging(new) = False;
- Barking(new) = False;
- Resize(new);
-}
-
-static destroy_pixmaps(w)
- DogWidget w;
-{
- XFreePixmap (XtDisplay(w), UpPixmap(w));
- XFreePixmap (XtDisplay(w), DownPixmap(w));
- XFreePixmap (XtDisplay(w), BarkPixmap(w));
-}
-
-
-static void Destroy(w)
- DogWidget w;
-{
- XtReleaseGC ((Widget)w, DrawGC(w));
- destroy_pixmaps(w);
- XtRemoveAllCallbacks ((Widget)w, DogNbarkCallback);
-}
-
-static void Resize(w)
- DogWidget w;
-{
- _DogPosition(w);
-}
-
-static Boolean DifferentBackground(w, p)
- Widget w;
- Widget p;
-{
- if (XmIsPrimitive(w) && XmIsManager(p))
- {
- Pixel w_bg, p_bg;
- Pixmap w_px, p_px;
-
- XtVaGetValues(w, XmNbackground, &w_bg, XmNbackgroundPixmap, &w_px, NULL);
- XtVaGetValues(p, XmNbackground, &p_bg, XmNbackgroundPixmap, &p_px, NULL);
-
- return ((w_bg == p_bg) && (w_px == p_px));
- }
-
- return (False);
-}
-
-static void Redisplay(w, event, region)
- DogWidget w;
- XEvent *event;
- Region region;
-{
- if (XtIsRealized(w)) {
- XmeDrawShadows (XtDisplay (w), XtWindow (w),
- TopShadowGC(w), BottomShadowGC(w),
- HighlightThickness(w), HighlightThickness(w),
- Width(w) - 2 * HighlightThickness(w),
- Height(w) - 2 * HighlightThickness(w),
- ShadowThickness(w),
- XmSHADOW_OUT);
-
- if (Highlighted(w))
- (*((DogWidgetClass)XtClass(w)) ->
- primitive_class.border_highlight)((Widget)w);
- else if (DifferentBackground ((Widget)w, XtParent (w)))
- (*((DogWidgetClass)XtClass(w)) ->
- primitive_class.border_unhighlight)((Widget)w);
-
- _DogDrawPixmap(w);
- }
-}
-
-static Boolean SetValues(current, request, new)
- DogWidget current;
- DogWidget request;
- DogWidget new;
-
-{
- Boolean redraw = False;
-
- if (ShadowThickness(new) != ShadowThickness(current) ||
- HighlightThickness(new) != HighlightThickness(current)) {
- _DogPosition(new);
- redraw = True;
- }
- if (Foreground(new) != Foreground(current) ||
- BackgroundPixel(new) != BackgroundPixel(current)) {
- XtReleaseGC ((Widget)current, DrawGC(current));
- create_GC(new);
- destroy_pixmaps(new);
- create_pixmaps(new);
- switch (CurrPx(new)) {
- case(UpPx) :
- SetPixmap(new,UpPx,UpPixmap(new),up_width,up_height);
- break;
- case(DownPx) :
- SetPixmap(new,DownPx,DownPixmap(new),down_width,down_height);
- break;
- case(BarkPx) :
- SetPixmap(new,BarkPx,BarkPixmap(new),bark_width,bark_height);
- break;
- }
- redraw = True;
- }
- return (redraw);
-}
-
-static XtGeometryResult QueryGeometry (w, intended, reply)
- DogWidget w;
- XtWidgetGeometry *intended;
- XtWidgetGeometry *reply;
-{
- reply->request_mode = 0;
-
- if (intended->request_mode & (~(CWWidth | CWHeight)) != 0)
- return (XtGeometryNo);
-
- reply->request_mode = (CWWidth | CWHeight);
- reply->width = MAX(MAX(down_width,up_width),bark_width) +
- 2*(ShadowThickness(w)+HighlightThickness(w));
- reply->height = MAX(MAX(down_height,up_height),bark_height) +
- 2*(ShadowThickness(w)+HighlightThickness(w));
-
- if (reply->width != intended->width ||
- reply->height != intended->height ||
- intended->request_mode != reply->request_mode)
- return (XtGeometryAlmost);
- else {
- reply->request_mode = 0;
- return (XtGeometryYes);
- }
-}
-/**********************************************************************
- *
- * Widget actions
- *
- *********************************************************************/
-
-static void bark_dog(w, event)
- DogWidget w;
- XEvent *event;
-{
- XmProcessTraversal((Widget)w, XmTRAVERSE_CURRENT);
- XtCallCallbacks ((Widget)w, DogNbarkCallback, NULL);
- if (Barking(w) == True) return;
- Barking(w) = True;
- SetPixmap(w,BarkPx,BarkPixmap(w),bark_width,bark_height);
- _DogPosition(w);
- _DogDrawPixmap(w);
- XtAppAddTimeOut (XtWidgetToApplicationContext((Widget)w),
- BarkTime((Widget)w), end_bark, w);
-}
-
-static void end_bark(w, t)
- DogWidget w;
- XtIntervalId *t;
-{
- SetPixmap(w,DownPx,DownPixmap(w),down_width,down_height);
- _DogPosition(w);
- _DogDrawPixmap(w);
- Barking(w) = False;
- if (Wagging(w) == True)
- XtAppAddTimeOut(XtWidgetToApplicationContext((Widget)w),
- WagTime(w), do_wag, w);
-}
-
-static void start_wag(w, event)
- DogWidget w;
- XEvent *event;
-{
- XmProcessTraversal((Widget)w, XmTRAVERSE_CURRENT);
- if (Wagging(w) == True) return;
- Wagging(w) = True;
- if (Barking(w) == True) return;
- XtAppAddTimeOut (XtWidgetToApplicationContext((Widget)w),
- WagTime(w), do_wag, w);
-}
-
-static void stop_wag(w, event)
- DogWidget w;
- XEvent *event;
-{
- XmProcessTraversal((Widget)w, XmTRAVERSE_CURRENT);
- Wagging(w) = False;
-}
-
-static void do_wag(cd, t)
- XtPointer cd;
- XtIntervalId *t;
-{
- DogWidget w = (DogWidget)cd;
-
- if (Barking(w) == True) return;
- if (Wagging(w) == False) return;
- switch(CurrPx(w)) {
- case(UpPx):
- SetPixmap(w,DownPx,DownPixmap(w),down_width,down_height);
- break;
- case(DownPx):
- SetPixmap(w,UpPx,UpPixmap(w),up_width,up_height);
- break;
- }
- _DogPosition(w);
- _DogDrawPixmap(w);
- XtAppAddTimeOut (XtWidgetToApplicationContext((Widget)w),
- WagTime(w), do_wag, (XtPointer)w);
-}
-
+++ /dev/null
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-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 libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/*
- * (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC.
- * ALL RIGHTS RESERVED
-*/
-/*
- * Motif Release 1.2
-*/
-/* $XConsortium: Dog.h /main/3 1995/10/27 10:42:01 rswiston $ */
-
-/*****************************************************************************
-*
-* Dog.h - widget public header file
-*
-******************************************************************************/
-
-#ifndef _Dog_h
-#define _Dog_h
-
-externalref WidgetClass dogWidgetClass;
-
-typedef struct _DogClassRec *DogWidgetClass;
-typedef struct _DogRec *DogWidget;
-
-#define DogNbarkCallback "barkCallback"
-#define DogNwagTime "wagTime"
-#define DogNbarkTime "barkTime"
-
-#define DogCWagTime "WagTime"
-#define DogCBarkTime "BarkTime"
-
-#define IsDog(w) XtIsSubclass((w), dogWidgetClass)
-
-extern Widget DogCreate();
-extern int DogMrmInitialize();
-
-#endif /* _Dog_h */
-/* DON'T ADD ANYTHING AFTER THIS #endif */
+++ /dev/null
-!
-! (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC.
-! ALL RIGHTS RESERVED
-!
-!
-! Motif Release 1.2
-!
-! $XConsortium: Dog.uil /main/3 1995/10/27 10:42:11 rswiston $
-!******************************************************************************
-
-!****************************************************************************
-!*
-!* Dog.uil - Dog widget UIL header file
-!*
-!****************************************************************************
-
-! resources
-
-value
- DogNwagTime : private argument ('wagTime', integer);
- DogNbarkTime : private argument ('barkTime', integer);
- DogNbarkCallback : reason ('barkCallback');
-
-! widget create procedure
-
-procedure DogCreate();
+++ /dev/null
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-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 libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/*
- * (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC.
- * ALL RIGHTS RESERVED
-*/
-/*
- * Motif Release 1.2
-*/
-/* $XConsortium: DogP.h /main/3 1995/10/27 10:42:18 rswiston $ */
-
-/*****************************************************************************
-*
-* DogP.H - widget private header file
-*
-******************************************************************************/
-
-#ifndef _DogP_h
-#define _DogP_h
-
-#include "Dog.h"
-#include <Xm/XmP.h>
-#include <Xm/PrimitiveP.h>
-
-void _DogDrawPixmap();
-void _DogPosition();
-
-#define DogIndex (XmPrimitiveIndex + 1)
-
-typedef struct _DogClassPart {
- int reserved;
-} DogClassPart;
-
-typedef struct _DogClassRec {
- CoreClassPart core_class;
- XmPrimitiveClassPart primitive_class;
- DogClassPart dog_class;
-} DogClassRec;
-
-extern DogClassRec dogClassRec;
-
-typedef struct _DogPart {
- int wag_time;
- int bark_time;
- XtCallbackList bark_callback;
-
- Boolean wagging;
- Boolean barking;
- GC draw_GC;
- Pixmap up_pixmap;
- Pixmap down_pixmap;
- Pixmap bark_pixmap;
- Position pixmap_x;
- Position pixmap_y;
- Position draw_x;
- Position draw_y;
- Dimension draw_width;
- Dimension draw_height;
- int curr_px;
- Pixmap curr_pixmap;
- Dimension curr_width;
- Dimension curr_height;
-} DogPart;
-
-typedef struct _DogRec {
- CorePart core;
- XmPrimitivePart primitive;
- DogPart dog;
-} DogRec;
-
-#define UpPx 0
-#define DownPx 1
-#define BarkPx 2
-
-#endif /* _DogP_h */
-/* DON'T ADD ANYTHING AFTER THIS #endif */
+++ /dev/null
-# $XConsortium: Makefile.hp /main/2 1996/05/13 11:56:33 drk $
-##########################################################################
-#
-# Makefile for Motif dog widget demo (HP)
-#
-# (c) Copyright 1993, 1994 Hewlett-Packard Company
-# (c) Copyright 1993, 1994 International Business Machines Corp.
-# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
-# (c) Copyright 1993, 1994 Novell, Inc.
-#
-##########################################################################
-
-CC = cc
-RM = rm -f
-UIL = /usr/dt/bin/uil
-
-PROGRAM = dogs
-SOURCES = dogs.c Dog.c Square.c
-OBJECTS = dogs.o Dog.o Square.o
-UID = dogs.uid
-UILSOURCE = dogs.uil
-
-DEFINES =
-CDEBUGFLAGS = -O
-CFLAGS = -Aa -z $(DEFINES) $(CDEBUGFLAGS)
-
-DTINCLUDE = -I/usr/dt/include
-X11INCLUDE = -I/usr/include/X11R5
-
-INCLUDES = $(DTINCLUDE) $(X11INCLUDE)
-
-DTLIBS = -L/usr/dt/lib -lMrm -lXm
-X11LIBS = -L/usr/lib/X11R5 -lXt -lX11
-SYSLIBS =
-
-LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS)
-LDFLAGS =
-
-.c.o:
- ${CC} -c $(CFLAGS) $(INCLUDES) $<
-
-all:: $(PROGRAM) $(UID)
-
-$(PROGRAM):: $(OBJECTS)
- $(CC) -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
-
-$(UID):: $(UILSOURCE)
- $(UIL) -o $(UID) $(UILSOURCE)
-
-clean::
- $(RM) $(PROGRAM) $(OBJECTS) $(UID)
-
+++ /dev/null
-# $XConsortium: Makefile.ibm /main/2 1996/05/13 11:56:51 drk $
-##########################################################################
-#
-# Makefile for Motif dog widget demo (IBM)
-#
-# (c) Copyright 1993, 1994 Hewlett-Packard Company
-# (c) Copyright 1993, 1994 International Business Machines Corp.
-# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
-# (c) Copyright 1993, 1994 Novell, Inc.
-#
-##########################################################################
-
-CC = cc
-RM = rm -f
-UIL = /usr/dt/bin/uil
-
-PROGRAM = dogs
-SOURCES = dogs.c Dog.c Square.c
-OBJECTS = dogs.o Dog.o Square.o
-UID = dogs.uid
-UILSOURCE = dogs.uil
-
-DEFINES =
-CDEBUGFLAGS = -O
-CFLAGS = $(DEFINES) $(CDEBUGFLAGS)
-
-DTINCLUDE = -I/usr/dt/include
-X11INCLUDE = -I/usr/include
-
-INCLUDES = $(DTINCLUDE) $(X11INCLUDE)
-
-DTLIBS = -L/usr/dt/lib -lMrm -lXm
-X11LIBS = -L/usr/lib -lXt -lX11
-SYSLIBS =
-
-LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS)
-LDFLAGS =
-
-.c.o:
- $(CC) -c $(CFLAGS) $(INCLUDES) $<
-
-all:: $(PROGRAM) $(UID)
-
-$(PROGRAM):: $(OBJECTS)
- $(CC) -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
-
-$(UID):: $(UILSOURCE)
- $(UIL) -o $(UID) $(UILSOURCE)
-
-clean::
- $(RM) $(PROGRAM) $(OBJECTS) $(UID)
+++ /dev/null
-# $XConsortium: Makefile.novell /main/2 1996/05/13 11:57:07 drk $
-##########################################################################
-#
-# Makefile for Motif dog widget demo (Novell)
-#
-# (c) Copyright 1993, 1994 Hewlett-Packard Company
-# (c) Copyright 1993, 1994 International Business Machines Corp.
-# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
-# (c) Copyright 1993, 1994 Novell, Inc.
-#
-##########################################################################
-
-CC = cc
-RM = rm -f
-UIL = /usr/dt/bin/uil
-
-PROGRAM = dogs
-SOURCES = dogs.c Dog.c Square.c
-OBJECTS = dogs.o Dog.o Square.o
-UID = dogs.uid
-UILSOURCE = dogs.uil
-
-DEFINES =
-CDEBUGFLAGS = -O
-CFLAGS = -Xc $(DEFINES) $(CDEBUGFLAGS)
-
-DTINCLUDE = -I/usr/dt/include
-X11INCLUDE = -I/usr/X/include
-
-INCLUDES = $(DTINCLUDE) $(X11INCLUDE)
-
-DTLIBS = -L/usr/dt/lib -lMrm -lXm
-X11LIBS = -L/usr/X/lib -lXt -lX11
-SYSLIBS = -lw -lgen -lnsl -lresolv -lsocket -lXIM
-
-LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS)
-LDFLAGS =
-
-.c.o:
- $(CC) -c $(CFLAGS) $(INCLUDES) $<
-
-all:: $(PROGRAM) $(UID)
-
-$(PROGRAM):: $(OBJECTS)
- $(CC) -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
-
-$(UID):: $(UILSOURCE)
- $(UIL) -o $(UID) $(UILSOURCE)
-
-clean::
- $(RM) $(PROGRAM) $(OBJECTS) $(UID)
-
+++ /dev/null
-# $XConsortium: Makefile.sun /main/2 1996/05/13 11:57:24 drk $
-##########################################################################
-#
-# Makefile for Motif dog widget demo (SUN)
-#
-# (c) Copyright 1993, 1994 Hewlett-Packard Company
-# (c) Copyright 1993, 1994 International Business Machines Corp.
-# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
-# (c) Copyright 1993, 1994 Novell, Inc.
-#
-##########################################################################
-
-CC = cc
-RM = rm -f
-UIL = /usr/dt/bin/uil
-
-PROGRAM = dogs
-SOURCES = dogs.c Dog.c Square.c
-OBJECTS = dogs.o Dog.o Square.o
-UID = dogs.uid
-UILSOURCE = dogs.uil
-
-DEFINES =
-CDEBUGFLAGS = -O
-CFLAGS = $(DEFINES) $(CDEBUGFLAGS)
-
-DTINCLUDE = -I/usr/dt/include
-X11INCLUDE = -I/usr/openwin/include
-
-INCLUDES = $(DTINCLUDE) $(X11INCLUDE)
-
-DTLIBS = -L/usr/dt/lib -lMrm -lXm
-X11LIBS = -L/usr/openwin/lib -lXt -lX11
-SYSLIBS = -ldl -lw -lgen
-
-LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS)
-LDFLAGS = -R/usr/dt/lib:/usr/openwin/lib
-
-.c.o:
- $(CC) -c $(CFLAGS) $(INCLUDES) $<
-
-all:: $(PROGRAM) $(UID)
-
-$(PROGRAM):: $(OBJECTS)
- $(CC) -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
-
-$(UID):: $(UILSOURCE)
- $(UIL) -o $(UID) $(UILSOURCE)
-
-clean::
- $(RM) $(PROGRAM) $(OBJECTS) $(UID)
+++ /dev/null
-# $XConsortium: Makefile.uxp /main/2 1996/05/13 11:57:42 drk $
-##########################################################################
-#
-# Makefile for Motif dog widget demo (UXP)
-#
-# (Fujitsu.patch applied)
-#
-# (c) Copyright 1993, 1994 Hewlett-Packard Company
-# (c) Copyright 1993, 1994 International Business Machines Corp.
-# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
-# (c) Copyright 1993, 1994 Novell, Inc.
-#
-##########################################################################
-
-CC = cc
-RM = rm -f
-UIL = /usr/dt/bin/uil
-
-PROGRAM = dogs
-SOURCES = dogs.c Dog.c Square.c
-OBJECTS = dogs.o Dog.o Square.o
-UID = dogs.uid
-UILSOURCE = dogs.uil
-
-DEFINES =
-CDEBUGFLAGS = -O
-CFLAGS = -Xc $(DEFINES) $(CDEBUGFLAGS)
-
-DTINCLUDE = -I/usr/dt/include
-
-INCLUDES = $(DTINCLUDE)
-
-DTLIBS = -L/usr/dt/lib -lMrm -lXm
-X11LIBS = -lXt -lX11
-SYSLIBS = -lw -lgen -lnsl -lresolv -lsocket
-
-LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS)
-LDFLAGS =
-
-.c.o:
- $(CC) -c $(CFLAGS) $(INCLUDES) $<
-
-all:: $(PROGRAM) $(UID)
-
-$(PROGRAM):: $(OBJECTS)
- $(CC) -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
-
-$(UID):: $(UILSOURCE)
- $(UIL) -o $(UID) $(UILSOURCE)
-
-clean::
- $(RM) $(PROGRAM) $(OBJECTS) $(UID)
+++ /dev/null
-/* $XConsortium: README /main/2 1996/07/15 14:04:15 drk $ */
-
-This directory contains the sources of the Dog widget, the Square widget,
-and the dogs demo.
-
-DOG WIDGET
-----------
-The Dog widget demonstrates how to subclass a primitive widget which
-will remain binary compatible with future versions of Motif. It uses
-XmResolvePartOffsets(), and associated macros, and implements all
-the recommendations in the XmResolvePartOffsets manpage.
-
-The Dog widget is a subclass of XmPrimitive. It can bark and wag its
-tail. If you want more exotic tricks - feel free to subclass it, or
-replace up.bm, down.bm and bark.bm with more interesting bitmaps.
-
-It has the following resources:
-
- DogNwagTime - time in milliseconds between each wag.
- DogNbarkTime - time in milliseconds the bark graphic is displayed.
- DogNbarkCallback - callback called by the bark action.
-
-It has the following translations:
-
- osfActivate/Return/Space/MB1 = Bark
- W/MB2 = Wag tail.
- S/Shift-MB2 = Stop wagging tail.
- osfHelp = Help
-
-SQUARE WIDGET
--------------
-The Square widget demonstrates how to subclass a constraint widget which
-will remain binary compatible with future versions of Motif. It uses
-XmResolveAllPartOffsets(), and associated macros, and implements all
-the recommendations in the XmResolveAllPartOffsets manpage.
-
-The Square Widget is a subclass of XmBulletinBoard. It forces its children
-to be square using a constraint resource.
-
-It has one resource:
-
- SquareNmajorDimension - determines which dimension will be used
- for the new size of the child. Values are
- SquareWIDTH or SquareHEIGHT.
-
-It has one constraint resource:
-
- SquareNmakeSquare - determines whether the child is forced
- to be square or set to its preferred size.
-
-
-DOGS DEMO
----------
-The dogs demo uses the Dog and Square widgets. It illustrates how
-to incorporate new widgets into UIL source, using the user_defined
-function.
-
-It allows you to dynamically change the DogNwagTime and SquareNmakeSquare
-resources.
-
-If you have a machine with any sound generation features at all, you may
-want to change the bark callback to something better than XBell().
-
-
-ADDITIONAL INFORMATION ON THE MOTIF BINARY COMPATIBILITY MECHANISM
-------------------------------------------------------------------
-
-Why is it needed?:
- Motif custom widget subclasses compiled against Motif 1.2 may
- not be binary compatible with future major releases of Motif, and
- will cause fatal errors when used. To fix the problem the widget will
- need to be recompiled against the new version of Motif.
-
- The incompatibility will occur because a subclass must contain
- compiled-in references to its instance fields which will be
- specified relative to the start address of the widget instance.
- When a new Motif library is installed in which the widget's
- superclass instance structures have been extended, the compiled-in
- references will point to the wrong memory location, and general
- chaos will ensue.
-
-The solution:
- Motif provides a solution to this problem in the form of a new
- mechanism for defining resources and accessing widget fields.
-
- The mechanism allows all references to fields in the instance and
- constraint structures to be specified relative to the start of the
- widget *part* structure instead of the overall widget structures
- (which include the superclass part structures.) The mechanism resolves
- these relative references at runtime when the widget class is
- first initialized. This involves factoring in the true size of
- the widget's superclass instance structures read from the currently-
- linked Motif library.
-
-Converting a Widget To Use The Motif Widget Binary Compatibility Mechanism
---------------------------------------------------------------------------
-
-The guidelines for converting a widget to use the mechanism illustrate
-each stage with examples from a hypothetical widget named 'XmpNew'.
-
-The mechanism requires changes only to the widget's source file and
-not to any public header file.
-
-For additional information, see the Motif 1.2 man pages for
-XmResolvePartOffsets() and XmResolveAllPartOffsets().
-
-Edit your widget source file and proceed through the file, implementing
-these guidelines:
-
-1) Provide a clear indication that the widget uses the Motif widget
- binary compatibility mechanism. The Motif changes are not part of the
- standard Xt widget-writing specification, and may be confusing
- to the future maintainers of the widget. Add the following comment
- near the start of the file and tag each change in the file with
- a brief comment:
-
- /*
- * The XmpNew widget is rigged with the Motif widget binary compatibility
- * mechanism. All Motif-specific changes for this mechanism are preceded
- * by a comment including the string "MotifBc".
- *
- * For a description of the Motif widget binary compatibility mechanism,
- * see the reference manual entry on XmResolveAllPartOffsets().
- *
- */
-
-2) Define an index value for your class. The value should be one
- greater than the predefined index for your widget's superclass:
-
- For a subclass of XmPrimitive:
-
- #define XmpNewIndex (XmPrimitiveIndex + 1)
-
- For a subclass of XmManager:
-
- #define XmpNewIndex (XmManagerIndex + 1)
-
-3) Define variables to hold the dynamic offset tables. They
- should be statically defined, but global to the widget source
- file:
-
- static XmOffsetPtr ipot; /* Instance part offset table */
-
- For subclasses of XmManager, you also need:
-
- static XmOffsetPtr cpot; /* Constraint part offset table */
-
-4) Define macros to provide access to your widget's fields:
-
- For all widget instance fields:
-
- #define MarginWidth(w) XmField(w,ipot,XmpNew,margin_width,Dimension)
-
- For all widget constraint fields:
-
- #define ChildType(w) \
- XmConstraintField(w,cpot,XmpNew,child_type,unsigned char)
-
- (The last parameter is the data type of the instance or constraint field.)
-
-5) Modify the definition of all widget resources, synthetic resources,
- constraint resources and synthetic constraint resources to use dynamic
- offset calculation macros:
-
- Change the type of widget resource lists and constraint resource
- lists from:
- XtResource foo[] = { };
- to:
- XmPartResource foo[] = { };
-
- Change all widget resource and synthetic resource offset entries from:
- XtOffsetOf( struct _XmpNewRec, new.margin_width)
- to:
- XmPartOffset(XmpNew,margin_width)
-
- Change all widget constraint resource and synthetic constraint resource
- offset entries from:
- XtOffsetOf( struct _XmpNewConstraintRec, new.child_type),
- to:
- XmConstraintPartOffset(XmpNew,child_type)
-
-6) In the widget class record change the widget 'size' and 'constraint_size'
- fields to be the size of the widget part structure, not the size
- of the entire widget structure:
-
- Change the Core class 'size' field from:
- sizeof(XmpNewWidgetRec) /* widget size */
- to:
- sizeof(XmpNewWidgetPart), /* widget size */
-
- Change the Constraint class 'constraint_size' field from:
- sizeof(XmpNewConstraintRec), /* constraint_size */
- to:
- sizeof(XmpNewConstraintPart), /* constraint_size */
-
-7) Change the Core class 'version' field to disable version checking:
- XtVersion, /* version */
- becomes:
- XtVersionDontCheck /* version */
-
-8) In the widget's ClassInitialize method, add the call which will
- resolve the part-relative references:
-
- For a subclass of XmPrimitive:
- XmResolvePartOffsets(xmpNewWidgetClass, &ipot);
-
- For a subclass of XmManager:
- XmResolveAllPartOffsets(xmpNewWidgetClass, &ipot, &cpot);
-
-9) Ensure that references to all instance and constraint fields in the
- widget source use the macros defined in (4) above. There must be no direct
- access to these fields.
-
- Superclass instance and constraint fields can still be accessed normally,
- however, to keep the widget source readable and consistent it is
- recommended that macros are also defined and used for those fields. e.g
-
- #define Width(w) ((w)->core.width)
- #define NumChildren(w) ((w)->composite.num_children)
- #define ShadowThickness(w) ((w)->manager.shadow_thickness)
-
-10) Test the results. The easiest way to do this is go to the lib/Xm
- directory, add some new fields to PrimitiveP.h and ManagerP.h, and rebuild
- the libXm library. Test your widget with this new library (without
- recompiling the widget source!)
-
-
-
------ End Included Message -----
-
-
+++ /dev/null
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-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 libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/*
- * (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC.
- * ALL RIGHTS RESERVED
-*/
-/*
- * Motif Release 1.2
-*/
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = "$XConsortium: Square.c /main/3 1995/10/27 10:42:28 rswiston $"
-#endif
-#endif
-
-/*****************************************************************************
-*
-* Square.c - widget source file
-*
-******************************************************************************/
-
-#include <stdio.h>
-#include <Xm/Xm.h>
-#include <Mrm/MrmPublic.h>
-#include <Xm/BulletinBP.h>
-#include "SquareP.h"
-
-#define Width(w) XmField((w),square_offsets,Core,width,Dimension)
-#define Height(w) XmField((w),square_offsets,Core,height,Dimension)
-#define BorderWidth(w) XmField((w),square_offsets,Core,border_width,Dimension)
-#define MajorDimension(w) XmField((w),square_offsets,Square,major_dimension,int)
-
-#define MakeSquare(w) XmConstraintField((w),square_constraint_offsets, \
- Square,make_square, Boolean)
-
-static void ClassInitialize();
-static void Initialize();
-static Boolean SetValues();
-static void ConstraintInitialize();
-static Boolean ConstraintSetValues();
-
-static XmPartResource resources[] = {
- {
- SquareNmajorDimension, SquareCMajorDimension, XmRInt, sizeof(int),
- XmPartOffset(Square,major_dimension), XmRImmediate, (XtPointer)SquareWIDTH
- }
-};
-
-static XmPartResource constraints[] = {
- {
- SquareNmakeSquare, SquareCMakeSquare, XmRBoolean, sizeof(Boolean),
- XmConstraintPartOffset(Square,make_square),
- XmRImmediate, (XtPointer)False
- }
-};
-
-
-externaldef(squareclassrec) SquareClassRec squareClassRec =
-{
- { /* core_class fields */
- (WidgetClass) &xmBulletinBoardClassRec, /* superclass */
- "Square", /* class_name */
- sizeof(SquarePart), /* widget_size */
- ClassInitialize, /* class_initialize */
- NULL, /* class init part proc */
- False, /* class_inited */
- Initialize, /* initialize */
- NULL, /* initialize_notify */
- XtInheritRealize, /* realize */
- NULL, /* actions */
- 0, /* num_actions */
- (XtResourceList)resources,/* resources */
- XtNumber(resources), /* num_resources */
- NULLQUARK, /* xrm_class */
- False, /* compress_motion */
- XtExposeCompressMaximal, /* compress_exposure */
- False, /* compress_enterleave */
- False, /* visible_interest */
- NULL, /* destroy */
- XtInheritResize, /* resize */
- XtInheritExpose, /* expose */
- SetValues, /* set_values */
- NULL, /* set_values_hook */
- XtInheritSetValuesAlmost, /* set_values_almost */
- NULL, /* get_values_hook */
- NULL, /* accept_focus */
- XtVersionDontCheck, /* version */
- NULL, /* callback_private */
- XtInheritTranslations, /* tm_table */
- XtInheritQueryGeometry, /* Query Geometry proc */
- NULL, /* disp accelerator */
- NULL, /* extension */
- },
-
- { /* composite_class fields */
- XtInheritGeometryManager, /* geometry_manager */
- XtInheritChangeManaged, /* change_managed */
- XtInheritInsertChild, /* insert_child */
- XtInheritDeleteChild, /* delete_child */
- NULL, /* extension */
- },
-
- { /* constraint_class fields */
- (XtResourceList)constraints, /* constraint resource */
- XtNumber(constraints), /* number of constraints */
- sizeof(SquareConstraintPart), /* size of constraint */
- ConstraintInitialize, /* initialization */
- NULL, /* destroy proc */
- ConstraintSetValues, /* set_values proc */
- NULL, /* extension */
- },
-
- { /* manager_class fields */
- XtInheritTranslations, /* translations */
- NULL, /* syn_resources */
- 0, /* num_syn_resources */
- NULL, /* syn_cont_resources */
- 0, /* num_syn_cont_resources */
- XmInheritParentProcess, /* parent_process */
- NULL, /* extension */
- },
-
- { /* bulletin_board_class fields */
- FALSE, /* always_install_accelerators */
- NULL, /* geo_matrix_create */
- XtInheritFocusMovedProc, /* focus_moved_proc */
- NULL, /* extension */
- },
-
- { /* square_class fields */
- NULL, /* extension */
- }
-};
-
-externaldef(squarewidgetclass) WidgetClass
- squareWidgetClass = (WidgetClass) &squareClassRec;
-
-static XmOffsetPtr square_offsets; /* Part offsets table */
-static XmOffsetPtr square_constraint_offsets; /* Constraint offsets table */
-
-/**********************************************************************
- *
- * SquareCreate - Convenience routine, used by Uil/Mrm.
- *
- *********************************************************************/
-
-Widget SquareCreate(parent, name, arglist, nargs)
- Widget parent;
- char *name;
- Arg *arglist;
- int nargs;
-{
- return(XtCreateWidget (name, squareWidgetClass, parent, arglist, nargs));
-}
-
-/**********************************************************************
- *
- * SquareMrmInitialize - register Square widget class with Mrm
- *
- *********************************************************************/
-
-int SquareMrmInitialize()
-{
- return(MrmRegisterClass (MrmwcUnknown, "Square", "SquareCreate",
- SquareCreate, (WidgetClass)&squareClassRec));
-}
-
-/**********************************************************************
- *
- * Class methods
- *
- *********************************************************************/
-
-static void ClassInitialize()
-{
- XmResolveAllPartOffsets(squareWidgetClass, &square_offsets,
- &square_constraint_offsets);
-}
-
-static void Initialize(req, new)
- SquareWidget req;
- SquareWidget new;
-{
- if (MajorDimension(new) != SquareWIDTH &&
- MajorDimension(new) != SquareHEIGHT) {
- XtWarning("Square: invalid majorDimension");
- MajorDimension(new) = SquareWIDTH;
- }
-}
-
-static Boolean SetValues(curr, req, new)
- SquareWidget curr;
- SquareWidget req;
- SquareWidget new;
-{
- if (MajorDimension(new) != SquareWIDTH &&
- MajorDimension(new) != SquareHEIGHT) {
- XtWarning("Square: invalid majorDimension");
- MajorDimension(new) = MajorDimension(curr);
- }
- return (False);
-}
-
-static void ConstraintInitialize (req, new)
- Widget req;
- Widget new;
-{
- Dimension m;
-
- if(MakeSquare(new) == True) {
- if (MajorDimension(XtParent(new))==SquareWIDTH)
- m = Width(new);
- else
- m = Height(new);
-
- XtResizeWidget(new, m, m, BorderWidth(new));
- }
-}
-
-static Boolean ConstraintSetValues (old, ref, new)
- Widget old;
- Widget ref;
- Widget new;
-{
- Boolean redraw = False;
-
- if (MakeSquare(new) != MakeSquare(old)) {
- if(MakeSquare(new)==True) {
- if (MajorDimension(XtParent(new))==SquareWIDTH)
- Height(new) = Width(new);
- else
- Width(new) = Height(new);
- }
- else {
- XtWidgetGeometry gi;
- XtWidgetGeometry gp;
-
- if (MajorDimension(XtParent(new))==SquareWIDTH)
- Height(new) = Height(new)/2;
- else
- Width(new) = Width(new)/2;
-
- gi.request_mode = CWWidth | CWHeight;
- gi.width = Width(new);
- gi.height = Height(new);
- if (XtQueryGeometry(new, &gi, &gp) == XtGeometryAlmost) {
- if (gp.request_mode && CWWidth != 0) Width(new) = gp.width;
- if (gp.request_mode && CWHeight != 0) Height(new) = gp.height;
- }
- }
- redraw = True;
- }
- return (redraw);
-}
-
+++ /dev/null
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-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 libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/*
- * (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC.
- * ALL RIGHTS RESERVED
-*/
-/*
- * Motif Release 1.2
-*/
-/* $XConsortium: Square.h /main/3 1995/10/27 10:42:37 rswiston $ */
-
-/*****************************************************************************
-*
-* Square.h - widget public header file
-*
-******************************************************************************/
-
-#ifndef _Square_h
-#define _Square_h
-
-#include <Xm/BulletinB.h>
-
-externalref WidgetClass squareWidgetClass;
-
-typedef struct _SquareClassRec *SquareWidgetClass;
-typedef struct _SquareRec *SquareWidget;
-
-extern Widget SquareCreate();
-extern int SquareMrmInitialize();
-
-#define IsSquare(w) XtIsSubclass((w), squareWidgetClass)
-
-#define SquareWIDTH 0
-#define SquareHEIGHT 1
-
-#define SquareNmajorDimension "majorDimension"
-#define SquareCMajorDimension "MajorDimension"
-
-#define SquareNmakeSquare "makeSquare"
-#define SquareCMakeSquare "MakeSquare"
-
-#endif /* _Square_h */
-/* DON'T ADD ANYTHING AFTER THIS #endif */
+++ /dev/null
-!
-! (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC.
-! ALL RIGHTS RESERVED
-!
-!
-! Motif Release 1.2
-!
-! $XConsortium: Square.uil /main/3 1995/10/27 10:42:46 rswiston $
-!******************************************************************************
-
-!****************************************************************************
-!*
-!* Square.uil - Square widget UIL header file
-!*
-!****************************************************************************
-
-! resources
-
-value
- SquareNmajorDimension : private argument ('majorDimension', integer);
- SquareNmakeSquare : private argument ('makeSquare', boolean);
-
-! resource values
-
-value
- SquareWIDTH : 0;
- SquareHEIGHT : 1;
-
-! widget create procedure
-
-procedure SquareCreate();
+++ /dev/null
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-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 libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/*
- * (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC.
- * ALL RIGHTS RESERVED
-*/
-/*
- * Motif Release 1.2
-*/
-/* $XConsortium: SquareP.h /main/3 1995/10/27 10:42:55 rswiston $ */
-
-
-#ifndef _SquareP_h
-#define _SquareP_h
-
-#include "Square.h"
-#include <Xm/BulletinBP.h>
-
-#define SquareIndex (XmBulletinBIndex + 1)
-
-typedef struct _SquareClassPart
-{
- int reserved;
-} SquareClassPart;
-
-
-typedef struct _SquareClassRec
-{
- CoreClassPart core_class;
- CompositeClassPart composite_class;
- ConstraintClassPart constraint_class;
- XmManagerClassPart manager_class;
- XmBulletinBoardClassPart bulletin_board_class;
- SquareClassPart square_class;
-} SquareClassRec;
-
-externalref SquareClassRec squareClassRec;
-
-typedef struct _SquarePart
-{
- int major_dimension;
-} SquarePart;
-
-
-/* Full instance record declaration */
-
-typedef struct _SquareRec
-{
- CorePart core;
- CompositePart composite;
- ConstraintPart constraint;
- XmManagerPart manager;
- XmBulletinBoardPart bulletin_board;
- SquarePart square;
-} SquareRec;
-
-typedef struct _SquareConstraintPart
-{
- Boolean make_square;
-} SquareConstraintPart;
-
-typedef struct _SquareConstraintRec
-{
- XmManagerConstraintPart manager;
- SquareConstraintPart square;
-} SquareConstraintRec, *SquareConstraint;
-
-
-#endif /* _SquareP_h */
-/* DON'T ADD ANYTHING AFTER THIS #endif */
+++ /dev/null
-/* $XConsortium: bark.bm /main/2 1995/07/17 18:03:47 drk $ */
-#define bark_width 152
-#define bark_height 91
-#define bark_x_hot 0
-#define bark_y_hot 0
-static unsigned char bark_bits[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
- 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x80, 0xfb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xfd,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xd5, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x80, 0xeb, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xe0, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x80, 0xeb, 0x07, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x3f, 0x00, 0x00,
- 0x00, 0x00, 0x80, 0x57, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x7f, 0x55, 0xfd, 0x00, 0x00, 0x00, 0x00, 0x80, 0x57, 0x07,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x55, 0xfd,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xae, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0xc0, 0xea, 0xba, 0xea, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xae, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xea,
- 0xba, 0xea, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x1d, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x7d, 0x7d, 0xd5, 0x07, 0x00, 0x00,
- 0x00, 0x00, 0x56, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x78, 0x7d, 0x7d, 0xd5, 0x07, 0x00, 0x00, 0x00, 0x00, 0xbe, 0x1a, 0x00,
- 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xae, 0xab, 0xae, 0xbe, 0x07,
- 0x00, 0x00, 0x00, 0x00, 0xbe, 0x1a, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
- 0x00, 0x00, 0xae, 0xab, 0xae, 0xbe, 0x07, 0x00, 0x00, 0x00, 0x00, 0x78,
- 0xf5, 0x80, 0xff, 0x57, 0x55, 0x55, 0x55, 0xff, 0xc1, 0xd5, 0xd7, 0x5f,
- 0x7f, 0xff, 0x03, 0x00, 0x00, 0x00, 0x78, 0xf5, 0x80, 0xff, 0x57, 0x55,
- 0x55, 0x55, 0xff, 0xc1, 0xd5, 0xd7, 0x5f, 0x7f, 0xff, 0x03, 0x00, 0x00,
- 0x00, 0xf8, 0xea, 0xff, 0xab, 0xaa, 0xaa, 0xaa, 0xaa, 0xfe, 0xff, 0xab,
- 0xeb, 0xab, 0xaa, 0xea, 0x7f, 0x00, 0x00, 0x00, 0xc0, 0xaa, 0xaa, 0xaa,
- 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xea, 0xaf, 0xff, 0xaa, 0xaa, 0xaa, 0x73,
- 0x00, 0x00, 0x00, 0xc0, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
- 0xd5, 0x57, 0x7f, 0x55, 0x55, 0xd5, 0x73, 0x00, 0x00, 0x00, 0xc0, 0x57,
- 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x7f, 0x55, 0x55, 0xfd,
- 0xd5, 0x7f, 0x00, 0x00, 0x00, 0xc0, 0xaf, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
- 0xaa, 0xaa, 0xaa, 0xbe, 0xaa, 0xaa, 0xba, 0xaa, 0x3f, 0x00, 0x00, 0x00,
- 0x00, 0xbf, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xfe, 0xaa,
- 0xaa, 0x2a, 0xbf, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x55, 0x55, 0x55,
- 0x55, 0x55, 0x55, 0x55, 0x55, 0xff, 0x55, 0x55, 0x75, 0xde, 0x0f, 0x00,
- 0x00, 0x00, 0x00, 0xe0, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
- 0xfd, 0x55, 0xd5, 0xd7, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xaa,
- 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xfa, 0xaa, 0xea, 0xaf, 0x30,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
- 0xaa, 0xaa, 0xea, 0xab, 0xea, 0xfd, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xe0, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0xd5, 0x57, 0xd5,
- 0xf0, 0x01, 0x1f, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x55, 0x55, 0x55, 0x55,
- 0x55, 0x55, 0x55, 0x55, 0xd5, 0x57, 0x7d, 0x00, 0x00, 0xf0, 0x01, 0x00,
- 0x00, 0x00, 0xe0, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
- 0xbf, 0x0f, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xaa, 0xaa,
- 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xbf, 0x0f, 0x00, 0x00, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0xf8, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
- 0x55, 0x55, 0xff, 0x03, 0x00, 0x10, 0x06, 0x00, 0x00, 0x00, 0x00, 0xf8,
- 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0xff, 0x03, 0x00,
- 0x10, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xb8, 0xaa, 0xae, 0xaa, 0xaa, 0xaa,
- 0xaa, 0xaa, 0xaa, 0xaa, 0x1f, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x00,
- 0x00, 0xb8, 0xaa, 0xae, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x1f,
- 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0xd5, 0x5f, 0x55,
- 0x55, 0x55, 0xf5, 0xff, 0x55, 0xd5, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x5f, 0xd5, 0x5f, 0x55, 0x55, 0x55, 0xf5, 0xff, 0x55,
- 0xd5, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaf, 0xaa,
- 0xfb, 0xea, 0xea, 0xff, 0xff, 0xeb, 0xab, 0x3a, 0x00, 0x00, 0x00, 0x20,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xaf, 0xaa, 0xfb, 0xea, 0xea, 0xff, 0xff,
- 0xeb, 0xab, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
- 0x57, 0xf5, 0xd5, 0xff, 0x1f, 0x00, 0x00, 0x7f, 0x55, 0x3f, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x57, 0xf5, 0xd5, 0xff, 0x1f,
- 0x00, 0x00, 0x7f, 0x55, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0xf8, 0xaa, 0xfe, 0xaa, 0x07, 0x00, 0x00, 0x00, 0xfc, 0xea, 0x07,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb8, 0xaa, 0xfe, 0xab,
- 0x07, 0x00, 0x00, 0x00, 0xbc, 0xfa, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x78, 0x55, 0xfd, 0x55, 0x07, 0x00, 0x00, 0x00, 0x5c,
- 0xf5, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xf5,
- 0x83, 0x55, 0x07, 0x00, 0x00, 0x00, 0x57, 0x7f, 0x3f, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xbe, 0xea, 0x83, 0xab, 0x07, 0x00, 0x00,
- 0x00, 0xab, 0xbe, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
- 0xaf, 0xfa, 0x80, 0xaf, 0x1f, 0x00, 0x00, 0xe0, 0xab, 0xae, 0x3a, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x57, 0xfd, 0x80, 0x5f, 0x1f,
- 0x00, 0x00, 0xe0, 0x57, 0x5f, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0xf0, 0x57, 0x1f, 0x00, 0x7e, 0xfd, 0x00, 0x00, 0xf8, 0xf5, 0x7f,
- 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xaf, 0x1f, 0x00,
- 0xbe, 0xfa, 0x00, 0x00, 0xf8, 0xea, 0xbf, 0x3a, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0xf0, 0xaa, 0x07, 0x00, 0xf0, 0xef, 0x00, 0x00, 0xbe,
- 0x7e, 0xb0, 0xfa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x55,
- 0x07, 0x00, 0xf0, 0xf7, 0x00, 0x00, 0x5e, 0x7d, 0x70, 0xfd, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x55, 0x1f, 0x00, 0x00, 0xff, 0x00,
- 0x00, 0x56, 0x1d, 0xf0, 0xd7, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xf0, 0xab, 0x1f, 0x00, 0x00, 0xff, 0x00, 0x00, 0xae, 0x1e, 0xf0, 0xef,
- 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbe, 0xfa, 0x00, 0x00,
- 0x00, 0x00, 0xc0, 0xaf, 0x03, 0x00, 0xbe, 0x1f, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x7f,
- 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x1f,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x7f, 0x00, 0xf8, 0x1f, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xe0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xc0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1f, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00};
+++ /dev/null
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-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 libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/*
- * (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC.
- * ALL RIGHTS RESERVED
-*/
-/*
- * Motif Release 1.2
-*/
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = "$XConsortium: dogs.c /main/3 1995/10/27 10:43:03 rswiston $"
-#endif
-#endif
-
-/*****************************************************************************
-*
-* dogs.c - Square & Dog widget demo source file.
-*
-******************************************************************************/
-
-#include <stdio.h>
-#include <Xm/Xm.h>
-#include <Mrm/MrmPublic.h>
-#include "Square.h"
-#include "Dog.h"
-
-XtAppContext app_context;
-
-#define k_dog1_id 1
-#define k_dog2_id 2
-#define k_dog3_id 3
-#define k_help_id 4
-
-static void create_cb();
-static void bark_cb();
-static void tb_cb();
-static void scale_cb();
-static void help_cb();
-static void exit_cb();
-
-static MrmHierarchy mrm_id = 0;
-static char *mrm_vec[]={"dogs.uid", NULL};
-static MrmCode mrm_class;
-static MRMRegisterArg mrm_names[] = {
- {"create_cb", (XtPointer)create_cb },
- {"bark_cb", (XtPointer)bark_cb },
- {"tb_cb", (XtPointer)tb_cb },
- {"scale_cb", (XtPointer)scale_cb },
- {"help_cb", (XtPointer)help_cb },
- {"exit_cb", (XtPointer)exit_cb }
-};
-
-static Widget dog1_id;
-static Widget dog2_id;
-static Widget dog3_id;
-static Widget help_id;
-
-main(argc, argv)
- int argc;
- char **argv;
-{
- Widget shell;
- Display *display;
- Widget app_main = NULL;
- Arg args[3];
-
- MrmInitialize ();
- SquareMrmInitialize();
- DogMrmInitialize();
-
- XtToolkitInitialize();
- app_context = XtCreateApplicationContext();
- display = XtOpenDisplay(app_context, NULL, argv[0], "Dogs",
- NULL, 0, &argc, argv);
-
- if (display == NULL) {
- fprintf(stderr, "%s: Can't open display\n", argv[0]);
- exit(1);
- }
-
- XtSetArg (args[0], XtNallowShellResize, True);
- XtSetArg (args[1], XtNminWidth, 620);
- XtSetArg (args[2], XtNminHeight, 370);
- shell = XtAppCreateShell(argv[0], NULL, applicationShellWidgetClass,
- display, args, 3);
-
- if (MrmOpenHierarchy(1, mrm_vec, NULL, &mrm_id) != MrmSUCCESS) exit(0);
- MrmRegisterNames(mrm_names, XtNumber(mrm_names));
- MrmFetchWidget (mrm_id, "app_main", shell, &app_main, &mrm_class);
-
- XtManageChild(app_main);
- XtRealizeWidget(shell);
- XtAppMainLoop(app_context);
-}
-
-static void create_cb(w, id, reason)
- Widget w;
- int *id;
- unsigned long *reason;
-{
- switch (*id) {
- case k_dog1_id: dog1_id = w; break;
- case k_dog2_id: dog2_id = w; break;
- case k_dog3_id: dog3_id = w; break;
- case k_help_id:
- help_id = w;
- XtUnmanageChild((Widget)XmMessageBoxGetChild(help_id,
- XmDIALOG_CANCEL_BUTTON));
- XtUnmanageChild((Widget)XmMessageBoxGetChild(help_id,
- XmDIALOG_HELP_BUTTON));
- break;
- }
-}
-
-static void bark_cb (w, volume, cb)
- Widget w;
- int *volume;
- XtPointer cb;
-{
- XBell(XtDisplay(w), *volume);
-}
-
-static void tb_cb (w, tag, cb)
- Widget w;
- int *tag;
- XmToggleButtonCallbackStruct *cb;
-{
- Arg args[1];
- Widget dog;
-
- switch (*tag) {
- case(1) : dog = dog1_id; break;
- case(2) : dog = dog2_id; break;
- case(3) : dog = dog3_id; break;
- }
- XtSetArg(args[0], SquareNmakeSquare, cb->set);
- XtSetValues(dog, args, 1);
-}
-
-static void scale_cb(w, tag, cb)
- Widget w;
- int *tag;
- XmScaleCallbackStruct *cb;
-{
- Arg args[1];
- Widget dog;
-
- switch (*tag) {
- case(1) : dog = dog1_id; break;
- case(2) : dog = dog2_id; break;
- case(3) : dog = dog3_id; break;
- }
- XtSetArg(args[0], DogNwagTime, cb->value);
- XtSetValues(dog, args, 1);
-}
-
-static void help_cb (w, name, cb)
- Widget w;
- XmString name;
- XtPointer cb;
-{
- Arg args[1];
-
- if (name == NULL) return;
- XtSetArg (args[0], XmNmessageString, name);
- XtSetValues(help_id, args, 1);
- XtManageChild(help_id);
-}
-
-static void exit_cb (w, name, cb)
- Widget w;
- XmString name;
- XtPointer cb;
-{
- exit(0);
-}
-
+++ /dev/null
-!
-! (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC.
-! ALL RIGHTS RESERVED
-!
-!
-! Motif Release 1.2
-!
-! $XConsortium: dogs.uil /main/3 1995/10/27 10:43:12 rswiston $
-!******************************************************************************
-
-!******************************************************************************
-!*
-!* dogs.uil - Square & Dog widget demo, application UIL file.
-!*
-!******************************************************************************
-
-module squares
- version = 'v1.0'
- names = case_sensitive
- character_set=iso_latin1
- objects = { XmPushButton = gadget; XmToggleButton = gadget; }
-
-include file 'Square.uil';
-include file 'Dog.uil';
-
-procedure
- create_cb(integer);
- bark_cb(integer);
- tb_cb(integer);
- scale_cb(integer);
- help_cb(compound_string);
- exit_cb();
-
-value
- k_dog1_id : 1;
- k_dog2_id : 2;
- k_dog3_id : 3;
- k_help_id : 4;
-
-value
- dog1_bark_volume : 90;
- dog1_bark_time : 1100;
- dog1_wag_time : 100;
- dog1_square : false;
-
- dog2_bark_volume : 40;
- dog2_bark_time : 400;
- dog2_wag_time : 100;
- dog2_square : false;
-
- dog3_bark_volume : 70;
- dog3_bark_time : 700;
- dog3_wag_time : 100;
- dog3_square : false;
-
-value help_text :
- compound_string(" ", separate=true) &
- compound_string(" ", separate=true) &
- compound_string("osfActivate/MB1 = Bark.", separate=true) &
- compound_string("W/MB2 = Wag tail.", separate=true) &
- compound_string("S/Shift-MB2 = Stop.", separate=true) &
- compound_string("osfHelp = Help.", separate=true) &
- compound_string("");
-
-
-object app_main : XmMainWindow {
- controls {
- XmMenuBar bar;
- XmForm work;
- unmanaged XmInformationDialog help_box;
- };
- callbacks {
- XmNhelpCallback=procedure help_cb(compound_string("Dogs") & help_text);
- };
-};
-
-object help_box : XmInformationDialog {
- arguments {
- XmNmessageAlignment = XmALIGNMENT_BEGINNING;
- XmNdialogTitle = "Help";
- XmNokLabelString = "Dismiss";
- };
- callbacks {
- MrmNcreateCallback = procedure create_cb(k_help_id);
- };
-};
-
-object bar : XmMenuBar {
- arguments {
- XmNmenuHelpWidget = XmCascadeButton help;
- };
- controls {
- XmCascadeButton file;
- XmCascadeButton help;
- };
-};
-
-object file : XmCascadeButton {
- arguments { XmNlabelString = "File"; XmNmnemonic = keysym('F'); };
- controls { XmPulldownMenu file_pd; };
-};
-object file_pd : XmPulldownMenu {
- controls {
- XmPushButton exit_pb;
- };
-};
-object exit_pb : XmPushButton {
- arguments { XmNlabelString = "Exit"; XmNmnemonic = keysym('E');};
- callbacks { XmNactivateCallback = procedure exit_cb(); };
-};
-
-object help : XmCascadeButton {
- arguments { XmNlabelString = "Help"; XmNmnemonic = keysym('H'); };
- controls { XmPulldownMenu help_pd; };
-};
-object help_pd : XmPulldownMenu {
- arguments { XmNtearOffModel = XmTEAR_OFF_ENABLED; };
- controls {
- XmPushButton help_pb;
- };
-};
-object help_pb : XmPushButton {
- arguments { XmNlabelString = "On Dogs"; XmNmnemonic = keysym('D');};
- callbacks { XmNactivateCallback = procedure help_cb
- (compound_string("Dogs") & help_text); };
-};
-
-
-object work : XmForm {
- controls {
- XmFrame frame;
- XmScale scale1;
- XmScale scale2;
- XmScale scale3;
- XmSeparator sep;
- XmToggleButton tb1;
- XmToggleButton tb2;
- XmToggleButton tb3;
- };
-};
-
-object frame : XmFrame {
- arguments {
- XmNrightAttachment = XmATTACH_FORM; XmNrightOffset = 5;
- XmNleftAttachment = XmATTACH_FORM; XmNleftOffset = 5;
- XmNtopAttachment = XmATTACH_FORM; XmNtopOffset = 5;
- XmNbottomAttachment = XmATTACH_WIDGET; XmNbottomOffset = 10;
- XmNbottomWidget = XmScale scale1;
- };
- controls {
- user_defined square;
- };
-};
-
-object square : user_defined procedure SquareCreate {
- arguments {
- XmNwidth = 600;
- XmNheight = 220;
- XmNresizePolicy = XmRESIZE_GROW;
- SquareNmajorDimension = SquareWIDTH;
- };
- controls {
- user_defined dog1;
- user_defined dog2;
- user_defined dog3;
- };
-};
-
-object dog1 : user_defined procedure DogCreate {
- arguments {
- SquareNmakeSquare = dog1_square;
- XmNx = 20;
- XmNy = 20;
- XmNforeground = color('red', foreground);
- XmNbackground = color('lightblue', background);
- XmNshadowThickness = 12;
- DogNwagTime = dog1_wag_time;
- DogNbarkTime = dog1_bark_time;
- };
- callbacks {
- MrmNcreateCallback = procedure create_cb(k_dog1_id);
- DogNbarkCallback = procedure bark_cb(dog1_bark_volume);
- XmNhelpCallback = procedure help_cb
- (compound_string("Rover") & help_text);
- };
-};
-
-object dog2 : user_defined procedure DogCreate {
- arguments {
- SquareNmakeSquare = dog2_square;
- XmNx = 220;
- XmNy = 20;
- XmNforeground = color('black', foreground);
- XmNbackground = color('lightblue', background);
- XmNshadowThickness = 4;
- DogNwagTime = dog2_wag_time;
- DogNbarkTime = dog2_bark_time;
- };
- callbacks {
- MrmNcreateCallback = procedure create_cb(k_dog2_id);
- DogNbarkCallback = procedure bark_cb(dog2_bark_volume);
- XmNhelpCallback = procedure help_cb
- (compound_string("Spot") & help_text);
- };
-};
-
-object dog3 : user_defined procedure DogCreate {
- arguments {
- SquareNmakeSquare = dog3_square;
- XmNx = 420;
- XmNy = 20;
- XmNforeground = color('Brown', foreground);
- XmNbackground = color('lightblue', background);
- XmNshadowThickness = 10;
- DogNwagTime = dog3_wag_time;
- DogNbarkTime = dog3_bark_time;
- };
- callbacks {
- MrmNcreateCallback = procedure create_cb(k_dog3_id);
- DogNbarkCallback = procedure bark_cb(dog3_bark_volume);
- XmNhelpCallback = procedure help_cb
- (compound_string("Fido") & help_text);
- };
-};
-
-object scale1 : XmScale {
- arguments {
- XmNleftAttachment = XmATTACH_FORM; XmNleftOffset = 5;
- XmNrightAttachment = XmATTACH_POSITION; XmNrightPosition = 30;
- XmNbottomAttachment = XmATTACH_WIDGET; XmNbottomOffset = 5;
- XmNbottomWidget = XmSeparator sep;
- XmNminimum = 1;
- XmNmaximum = 200;
- XmNtitleString = 'Wag Rate';
- XmNorientation = XmHORIZONTAL;
- XmNprocessingDirection = XmMAX_ON_LEFT;
- XmNvalue = dog1_wag_time;
- };
- callbacks {
- XmNvalueChangedCallback = procedure scale_cb(1);
- XmNdragCallback = procedure scale_cb(1);
- };
-};
-
-object scale2 : XmScale {
- arguments {
- XmNleftAttachment = XmATTACH_POSITION; XmNleftPosition = 36;
- XmNrightAttachment = XmATTACH_POSITION; XmNrightPosition = 63;
- XmNbottomAttachment = XmATTACH_WIDGET; XmNbottomOffset = 5;
- XmNbottomWidget = XmSeparator sep;
- XmNminimum = 1;
- XmNmaximum = 200;
- XmNtitleString = 'Wag Rate';
- XmNorientation = XmHORIZONTAL;
- XmNprocessingDirection = XmMAX_ON_LEFT;
- XmNvalue = dog2_wag_time;
- };
- callbacks {
- XmNvalueChangedCallback = procedure scale_cb(2);
- XmNdragCallback = procedure scale_cb(2);
- };
-};
-
-object scale3 : XmScale {
- arguments {
- XmNleftAttachment = XmATTACH_POSITION; XmNleftPosition = 69;
- XmNrightAttachment = XmATTACH_FORM; XmNrightOffset = 5;
- XmNbottomAttachment = XmATTACH_WIDGET; XmNbottomOffset = 5;
- XmNbottomWidget = XmSeparator sep;
- XmNminimum = 1;
- XmNmaximum = 200;
- XmNtitleString = 'Wag Rate';
- XmNorientation = XmHORIZONTAL;
- XmNprocessingDirection = XmMAX_ON_LEFT;
- XmNvalue = dog3_wag_time;
- };
- callbacks {
- XmNvalueChangedCallback = procedure scale_cb(3);
- XmNdragCallback = procedure scale_cb(3);
- };
-};
-
-object sep : XmSeparator {
- arguments {
- XmNleftAttachment = XmATTACH_FORM;
- XmNrightAttachment = XmATTACH_FORM;
- XmNbottomAttachment = XmATTACH_WIDGET; XmNbottomOffset = 5;
- XmNbottomWidget = XmToggleButton tb1;
- };
-};
-
-object tb1 : XmToggleButton {
- arguments {
- XmNleftAttachment = XmATTACH_FORM; XmNleftOffset = 5;
- XmNbottomAttachment = XmATTACH_FORM; XmNbottomOffset = 5;
-
- XmNset = dog1_square;
- XmNlabelString = 'Make Square';
- };
- callbacks {
- XmNvalueChangedCallback = procedure tb_cb(1);
- };
-};
-
-object tb2 : XmToggleButton {
- arguments {
- XmNleftAttachment = XmATTACH_POSITION; XmNleftPosition = 36;
- XmNbottomAttachment = XmATTACH_FORM; XmNbottomOffset = 5;
-
- XmNset = dog2_square;
- XmNlabelString = 'Make Square';
- };
- callbacks {
- XmNvalueChangedCallback = procedure tb_cb(2);
- };
-};
-
-object tb3 : XmToggleButton {
- arguments {
- XmNleftAttachment = XmATTACH_POSITION; XmNleftPosition = 69;
- XmNbottomAttachment = XmATTACH_FORM; XmNbottomOffset = 5;
-
- XmNset = dog3_square;
- XmNlabelString = 'Make Square';
- };
- callbacks {
- XmNvalueChangedCallback = procedure tb_cb(3);
- };
-};
-
-end module;
-
+++ /dev/null
-/* $XConsortium: down.bm /main/2 1995/07/17 18:03:57 drk $ */
-#define down_width 152
-#define down_height 91
-#define down_x_hot 0
-#define down_y_hot 0
-static unsigned char down_bits[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xe0, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x3f, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x7f, 0x55, 0xfd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x55, 0xfd,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0xc0, 0xea, 0xba, 0xea, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xea,
- 0xba, 0xea, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x7d, 0x7d, 0xd5, 0x07, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x78, 0x7d, 0x7d, 0xd5, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xae, 0xab, 0xae, 0xbe, 0x07,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
- 0x00, 0x00, 0xae, 0xab, 0xae, 0xbe, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x80, 0xff, 0x57, 0x55, 0x55, 0x55, 0xff, 0xc1, 0xd5, 0xd7, 0x5f,
- 0x7f, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x57, 0x55,
- 0x55, 0x55, 0xff, 0xc1, 0xd5, 0xd7, 0x5f, 0x7f, 0xff, 0x03, 0x00, 0x00,
- 0x00, 0x00, 0xc0, 0xff, 0xab, 0xaa, 0xaa, 0xaa, 0xaa, 0xfe, 0xff, 0xab,
- 0xeb, 0xab, 0xaa, 0xea, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xaa, 0xaa,
- 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xea, 0xaf, 0xff, 0xaa, 0xaa, 0xaa, 0x73,
- 0x00, 0x00, 0x00, 0x00, 0x7e, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
- 0xd5, 0x57, 0x7f, 0x55, 0x55, 0xd5, 0x73, 0x00, 0x00, 0x00, 0x80, 0x5f,
- 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x7f, 0x55, 0x55, 0xfd,
- 0xd5, 0x7f, 0x00, 0x00, 0x00, 0xe0, 0xab, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
- 0xaa, 0xaa, 0xaa, 0xbe, 0xaa, 0xaa, 0xfa, 0xaa, 0x7f, 0x00, 0x00, 0x00,
- 0xf8, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xfe, 0xaa,
- 0xaa, 0xea, 0xbf, 0x0f, 0x00, 0x00, 0x00, 0x7c, 0x55, 0x55, 0x55, 0x55,
- 0x55, 0x55, 0x55, 0x55, 0x55, 0xff, 0x55, 0x55, 0xd5, 0xdf, 0x0f, 0x00,
- 0x00, 0x00, 0x5e, 0xf5, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
- 0xfd, 0x55, 0xd5, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x80, 0xaf, 0xfe, 0xaa,
- 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xfa, 0xaa, 0xea, 0xff, 0x7f,
- 0x00, 0x00, 0x00, 0xc0, 0xab, 0xef, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
- 0xaa, 0xaa, 0xea, 0xab, 0xea, 0x01, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xf5,
- 0xe3, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0xd5, 0x57, 0xd5,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xfd, 0xe0, 0x55, 0x55, 0x55, 0x55,
- 0x55, 0x55, 0x55, 0x55, 0xd5, 0x57, 0xfd, 0x01, 0x00, 0x00, 0x00, 0x00,
- 0xf8, 0x3e, 0xe0, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
- 0xbf, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb8, 0x1e, 0xe0, 0xaa, 0xaa,
- 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xbf, 0x0f, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x58, 0x07, 0xf8, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
- 0x55, 0x55, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x01, 0xf8,
- 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0xff, 0x03, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0xb8, 0xaa, 0xae, 0xaa, 0xaa, 0xaa,
- 0xaa, 0xaa, 0xaa, 0xaa, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38,
- 0x00, 0xb8, 0xaa, 0xae, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x1f,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0xd5, 0x5f, 0x55,
- 0x55, 0x55, 0xf5, 0xff, 0x55, 0xd5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x5f, 0xd5, 0x5f, 0x55, 0x55, 0x55, 0xf5, 0xff, 0x55,
- 0xd5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaf, 0xaa,
- 0xfb, 0xea, 0xea, 0xff, 0xff, 0xeb, 0xab, 0x3a, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xaf, 0xaa, 0xfb, 0xea, 0xea, 0xff, 0xff,
- 0xeb, 0xab, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
- 0x57, 0xf5, 0xd5, 0xff, 0x1f, 0x00, 0x00, 0x7f, 0x55, 0x3f, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x57, 0xf5, 0xd5, 0xff, 0x1f,
- 0x00, 0x00, 0x7f, 0x55, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0xf8, 0xaa, 0xfe, 0xaa, 0x07, 0x00, 0x00, 0x00, 0xfc, 0xea, 0x07,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb8, 0xaa, 0xfe, 0xab,
- 0x07, 0x00, 0x00, 0x00, 0xbc, 0xfa, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x78, 0x55, 0xfd, 0x55, 0x07, 0x00, 0x00, 0x00, 0x5c,
- 0xf5, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xf5,
- 0x83, 0x55, 0x07, 0x00, 0x00, 0x00, 0x57, 0x7f, 0x3f, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xbe, 0xea, 0x83, 0xab, 0x07, 0x00, 0x00,
- 0x00, 0xab, 0xbe, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
- 0xaf, 0xfa, 0x80, 0xaf, 0x1f, 0x00, 0x00, 0xe0, 0xab, 0xae, 0x3a, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x57, 0xfd, 0x80, 0x5f, 0x1f,
- 0x00, 0x00, 0xe0, 0x57, 0x5f, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0xf0, 0x57, 0x1f, 0x00, 0x7e, 0xfd, 0x00, 0x00, 0xf8, 0xf5, 0x7f,
- 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xaf, 0x1f, 0x00,
- 0xbe, 0xfa, 0x00, 0x00, 0xf8, 0xea, 0xbf, 0x3a, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0xf0, 0xaa, 0x07, 0x00, 0xf0, 0xef, 0x00, 0x00, 0xbe,
- 0x7e, 0xb0, 0xfa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x55,
- 0x07, 0x00, 0xf0, 0xf7, 0x00, 0x00, 0x5e, 0x7d, 0x70, 0xfd, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x55, 0x1f, 0x00, 0x00, 0xff, 0x00,
- 0x00, 0x56, 0x1d, 0xf0, 0xd7, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xf0, 0xab, 0x1f, 0x00, 0x00, 0xff, 0x00, 0x00, 0xae, 0x1e, 0xf0, 0xef,
- 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbe, 0xfa, 0x00, 0x00,
- 0x00, 0x00, 0xc0, 0xaf, 0x03, 0x00, 0xbe, 0x1f, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x7f,
- 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x1f,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x7f, 0x00, 0xf8, 0x1f, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xe0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xc0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1f, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00};
+++ /dev/null
-/* $XConsortium: up.bm /main/2 1995/07/17 18:04:05 drk $ */
-#define up_width 152
-#define up_height 91
-#define up_x_hot 0
-#define up_y_hot 0
-static unsigned char up_bits[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
- 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x80, 0xfb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xfd,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xd5, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x80, 0xeb, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xe0, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x80, 0xeb, 0x07, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x3f, 0x00, 0x00,
- 0x00, 0x00, 0x80, 0x57, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x7f, 0x55, 0xfd, 0x00, 0x00, 0x00, 0x00, 0x80, 0x57, 0x07,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x55, 0xfd,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xae, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0xc0, 0xea, 0xba, 0xea, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xae, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xea,
- 0xba, 0xea, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x1d, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x7d, 0x7d, 0xd5, 0x07, 0x00, 0x00,
- 0x00, 0x00, 0x56, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x78, 0x7d, 0x7d, 0xd5, 0x07, 0x00, 0x00, 0x00, 0x00, 0xbe, 0x1a, 0x00,
- 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xae, 0xab, 0xae, 0xbe, 0x07,
- 0x00, 0x00, 0x00, 0x00, 0xbe, 0x1a, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
- 0x00, 0x00, 0xae, 0xab, 0xae, 0xbe, 0x07, 0x00, 0x00, 0x00, 0x00, 0x78,
- 0xf5, 0x80, 0xff, 0x57, 0x55, 0x55, 0x55, 0xff, 0xc1, 0xd5, 0xd7, 0x5f,
- 0x7f, 0xff, 0x03, 0x00, 0x00, 0x00, 0x78, 0xf5, 0x80, 0xff, 0x57, 0x55,
- 0x55, 0x55, 0xff, 0xc1, 0xd5, 0xd7, 0x5f, 0x7f, 0xff, 0x03, 0x00, 0x00,
- 0x00, 0xf8, 0xea, 0xff, 0xab, 0xaa, 0xaa, 0xaa, 0xaa, 0xfe, 0xff, 0xab,
- 0xeb, 0xab, 0xaa, 0xea, 0x7f, 0x00, 0x00, 0x00, 0xc0, 0xaa, 0xaa, 0xaa,
- 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xea, 0xaf, 0xff, 0xaa, 0xaa, 0xaa, 0x73,
- 0x00, 0x00, 0x00, 0xc0, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
- 0xd5, 0x57, 0x7f, 0x55, 0x55, 0xd5, 0x73, 0x00, 0x00, 0x00, 0xc0, 0x57,
- 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x7f, 0x55, 0x55, 0xfd,
- 0xd5, 0x7f, 0x00, 0x00, 0x00, 0xc0, 0xaf, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
- 0xaa, 0xaa, 0xaa, 0xbe, 0xaa, 0xaa, 0xfa, 0xaa, 0x7f, 0x00, 0x00, 0x00,
- 0x00, 0xbf, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xfe, 0xaa,
- 0xaa, 0xea, 0xbf, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x55, 0x55, 0x55,
- 0x55, 0x55, 0x55, 0x55, 0x55, 0xff, 0x55, 0x55, 0xd5, 0xdf, 0x0f, 0x00,
- 0x00, 0x00, 0x00, 0xe0, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
- 0xfd, 0x55, 0xd5, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xaa,
- 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xfa, 0xaa, 0xea, 0xff, 0x7f,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
- 0xaa, 0xaa, 0xea, 0xab, 0xea, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xe0, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0xd5, 0x57, 0xd5,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x55, 0x55, 0x55, 0x55,
- 0x55, 0x55, 0x55, 0x55, 0xd5, 0x57, 0xfd, 0x01, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0xe0, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
- 0xbf, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xaa, 0xaa,
- 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xbf, 0x0f, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0xf8, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
- 0x55, 0x55, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8,
- 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0xff, 0x03, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb8, 0xaa, 0xae, 0xaa, 0xaa, 0xaa,
- 0xaa, 0xaa, 0xaa, 0xaa, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0xb8, 0xaa, 0xae, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x1f,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0xd5, 0x5f, 0x55,
- 0x55, 0x55, 0xf5, 0xff, 0x55, 0xd5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x5f, 0xd5, 0x5f, 0x55, 0x55, 0x55, 0xf5, 0xff, 0x55,
- 0xd5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaf, 0xaa,
- 0xfb, 0xea, 0xea, 0xff, 0xff, 0xeb, 0xab, 0x3a, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xaf, 0xaa, 0xfb, 0xea, 0xea, 0xff, 0xff,
- 0xeb, 0xab, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
- 0x57, 0xf5, 0xd5, 0xff, 0x1f, 0x00, 0x00, 0x7f, 0x55, 0x3f, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x57, 0xf5, 0xd5, 0xff, 0x1f,
- 0x00, 0x00, 0x7f, 0x55, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0xf8, 0xaa, 0xfe, 0xaa, 0x07, 0x00, 0x00, 0x00, 0xfc, 0xea, 0x07,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb8, 0xaa, 0xfe, 0xab,
- 0x07, 0x00, 0x00, 0x00, 0xbc, 0xfa, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x78, 0x55, 0xfd, 0x55, 0x07, 0x00, 0x00, 0x00, 0x5c,
- 0xf5, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xf5,
- 0x83, 0x55, 0x07, 0x00, 0x00, 0x00, 0x57, 0x7f, 0x3f, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xbe, 0xea, 0x83, 0xab, 0x07, 0x00, 0x00,
- 0x00, 0xab, 0xbe, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
- 0xaf, 0xfa, 0x80, 0xaf, 0x1f, 0x00, 0x00, 0xe0, 0xab, 0xae, 0x3a, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x57, 0xfd, 0x80, 0x5f, 0x1f,
- 0x00, 0x00, 0xe0, 0x57, 0x5f, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0xf0, 0x57, 0x1f, 0x00, 0x7e, 0xfd, 0x00, 0x00, 0xf8, 0xf5, 0x7f,
- 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xaf, 0x1f, 0x00,
- 0xbe, 0xfa, 0x00, 0x00, 0xf8, 0xea, 0xbf, 0x3a, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0xf0, 0xaa, 0x07, 0x00, 0xf0, 0xef, 0x00, 0x00, 0xbe,
- 0x7e, 0xb0, 0xfa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x55,
- 0x07, 0x00, 0xf0, 0xf7, 0x00, 0x00, 0x5e, 0x7d, 0x70, 0xfd, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x55, 0x1f, 0x00, 0x00, 0xff, 0x00,
- 0x00, 0x56, 0x1d, 0xf0, 0xd7, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xf0, 0xab, 0x1f, 0x00, 0x00, 0xff, 0x00, 0x00, 0xae, 0x1e, 0xf0, 0xef,
- 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbe, 0xfa, 0x00, 0x00,
- 0x00, 0x00, 0xc0, 0xaf, 0x03, 0x00, 0xbe, 0x1f, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x7f,
- 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x1f,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x7f, 0x00, 0xf8, 0x1f, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xe0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0xc0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1f, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00};
+++ /dev/null
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-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 libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/*
- * (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC.
- * ALL RIGHTS RESERVED
-*/
-/*
- * Motif Release 1.2
-*/
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = "$XConsortium: DNDDemo.c /main/4 1995/10/27 10:43:34 rswiston $"
-#endif
-#endif
-/*
-* (c) Copyright 1987, 1988, 1989 HEWLETT-PACKARD COMPANY */
-/*
- * file: DNDDemo.c
- *
- * A demo program showing the basic Drag And Drop operations.
- */
-
-#include "DNDDemo.h"
-
-
-/*
- * The following character arrays are for use with the drop help
- * dialogs. For internationalization, message catalogs should
- * replace these static declarations.
- */
-char HELP_MSG1[] =
-"This drop action will change the color\n\
-of the rectangle that the paint palette\n\
-icon is dropped on. To accept this drop\n\
-press the o.k. button, otherwise press\n\
-cancel";
-
-char HELP_MSG2[] =
-"This drop action will move the rectangle\n\
-to the new position. To accept this drop\n\
-press the o.k. button, otherwise press\n\
-cancel";
-
-char HELP_MSG3[] =
-"This drop action will copy the rectangle\n\
-to the new position. To accept this drop\n\
-press the o.k. button, otherwise press\n\
-cancel";
-
-char HELP_MSG4[] =
-"This drop action can either copy or\n\
-move the rectangle to the new position.\n\
-Select the operation that you desire.\n\
-In the future, use Ctrl with Btn2 to\n\
-perform copy operations. The default\n\
-operation is move. To accept this drop\n\
-press the o.k. button, otherwise press\n\
-cancel";
-
-char HELP_MSG5[] =
-"This drop action is at an Invalid drop\n\
-position. Please cancel this drop \n\
-by pressing the cancel button.";
-
-
-/* Globals variables */
-Widget topLevel;
-Widget drawingArea;
-Widget helpDialog = NULL;
-Widget helpLabel, helpMenu;
-Widget myDC;
-XtAppContext appContext;
-
-
-/* This function creates the Drag Icon. */
-static Widget
-GetDragIcon(Widget w, Pixmap icon, Pixmap iconMask, Dimension width,
-Dimension height, Pixel background, Pixel foreground)
-{
-
- Widget dragIcon;
- Arg args[10];
- int n = 0;
-
- XtSetArg(args[n], XmNhotX, ICON_X_HOT); n++;
- XtSetArg(args[n], XmNhotY, ICON_Y_HOT); n++;
- XtSetArg(args[n], XmNwidth, width); n++;
- XtSetArg(args[n], XmNheight, height); n++;
- XtSetArg(args[n], XmNmaxWidth, appInfo->maxCursorWidth); n++;
- XtSetArg(args[n], XmNmaxHeight, appInfo->maxCursorHeight); n++;
- XtSetArg(args[n], XmNbackground, background); n++;
- XtSetArg(args[n], XmNforeground, foreground); n++;
- XtSetArg(args[n], XmNpixmap, icon); n++;
- XtSetArg(args[n], XmNmask, iconMask); n++;
- dragIcon = XmCreateDragIcon(w, "dragIcon", args, n);
-
- return(dragIcon);
-
-}
-
-
-/* This function creates the bitmaps for the icon and the mask
- * and then calls GetDragIcon() to create the drag icon.
- */
-static Widget
-GetDragIconFromBits(Widget w, char *bits, char *mask, Dimension width,
- Dimension height, Pixel background, Pixel foreground)
-{
-
- Pixmap icon, iconMask;
- Display *display = XtDisplay(w);
-
- icon = XCreateBitmapFromData(display, DefaultRootWindow(display), bits,
- width, height);
-
- iconMask = XCreateBitmapFromData(display, DefaultRootWindow(display),
- mask, width, height);
-
- return(GetDragIcon(w, icon, iconMask, width, height,
- background, foreground));
-
-}
-
-
-/* This function creates the rectangle bitmaps for the icon and
- * the mask based on the maximum server allowable cursor size
- * and then calls GetDragIcon() to create the drag icon.
- */
-static Widget
-GetDragIconFromRect(Widget w, RectPtr rect, Pixel background)
-{
-
- Pixmap icon, icon_mask;
- Pixel foreground = RectGetColor(rect);
- Dimension width, height;
-
- /* Create a depth 1 pixmap (bitmap) for use with the drag icon */
- icon = icon_mask = GetBitmapFromRect(w, rect, background, foreground,
- &width, &height);
-
- /* use bitmap for both the bitmap and mask */
- return(GetDragIcon(w, icon, icon_mask, width, height,
- background, foreground));
-
-}
-
-
-/* This is a selection conversion function that is used in
- * converting drag/drop export background color targets.
- * The return types follow ICCC statndards.
- */
-/* ARGSUSED */
-Boolean
-ColorConvert(Widget w, Atom *selection, Atom *target, Atom *type,
-XtPointer *value, unsigned long *length, int *format)
-{
-
- Display *display = XtDisplay(w);
- Atom BACKGROUND = XmInternAtom(display, "BACKGROUND", False);
- Atom PIXEL = XmInternAtom(display, "PIXEL", False);
- Atom TARGETS = XmInternAtom(display, "TARGETS", False);
- Atom MULTIPLE = XmInternAtom(display, "MULTIPLE", False);
- Atom TIMESTAMP = XmInternAtom(display, "TIMESTAMP", False);
- int MAX_TARGS = 5;
- Widget widget;
- XtPointer client;
- Arg args[1];
-
- /* get the widget that initiated the drag */
- XtSetArg(args[0], XmNclientData, &client);
- XtGetValues(w, args, 1);
- widget = (Widget) client;
-
- /* Make sure we are doing a motif drag by checking if the widget that
- * is passed in is a drag context. Make sure the widget in the client
- * data is not NULL.
- */
- if (!XmIsDragContext(w) || widget == NULL)
- return False;
-
- if (*target == BACKGROUND) {
-
- /* Get widget's background */
- Pixel *background;
-
- background = (Pixel *) XtMalloc(sizeof(Pixel));
- XtSetArg(args[0], XmNbackground, background);
- XtGetValues(widget, args, 1);
-
- /* value, type, length, and format must be set */
- *value = (XtPointer) background;
- *type = PIXEL;
- *length = sizeof(Pixel);
- *format = 32;
-
- }
- else if (*target == TARGETS) {
-
- /* This target is required by ICCC */
- Atom *targs = (Atom *)XtMalloc((unsigned) (MAX_TARGS * sizeof(Atom)));
- int target_count = 0;
-
- *value = (XtPointer) targs;
- *targs++ = BACKGROUND;
- target_count++;
- *targs++ = TARGETS;
- target_count++;
- *targs++ = MULTIPLE;
- target_count++; /* supported in the Intrinsics */
- *targs++ = TIMESTAMP;
- target_count++; /* supported in the Intrinsics */
- *type = XA_ATOM;
- *length = (target_count * sizeof(Atom)) >> 2;
- *format = 32;
-
- }
- else
- return False;
-
- return True;
-
-}
-
-
-/* This callback procedure resets the drag icon cursor to show
- * when the drag is in a valid region . It cause the
- * state icon to become visible when a drop is at a valid
- * position for drag over effects.
- */
-static void
-DragMotionCallback(Widget w, XtPointer client, XtPointer call)
-{
-
- XmDragMotionCallback cb = (XmDragMotionCallback) call;
- Arg args[2];
- Widget stateIcon, invalidIcon;
-
- if (cb->dropSiteStatus == XmVALID_DROP_SITE) {
-
- stateIcon = (Widget) client;
-
- XtSetArg(args[0], XmNblendModel, XmBLEND_STATE_SOURCE);
- XtSetArg(args[1], XmNstateCursorIcon, stateIcon);
- XtSetValues(w, args, 2);
-
- }
- else if (cb->dropSiteStatus == XmINVALID_DROP_SITE) {
-
- XtSetArg(args[0], XmNdefaultInvalidCursorIcon, &invalidIcon);
- XtGetValues(XmGetXmScreen(XtScreen(w)), args, 1);
- XtSetArg(args[0], XmNblendModel, XmBLEND_STATE_SOURCE);
- XtSetArg(args[1], XmNstateCursorIcon, invalidIcon);
- XtSetValues(w, args, 2);
-
- }
- else {
- XtSetArg(args[0], XmNblendModel, XmBLEND_JUST_SOURCE);
- XtSetValues(w, args, 1);
- }
-
-}
-
-
-/* This callback procedure resets the drag icon cursor to show
- * when the drag is in a valid region . It cause the
- * state icon to become visible when a drop is at a valid
- * position for drag over effects.
- */
-/* ARGSUSED */
-static void
-DropSiteLeaveCallback(Widget w, XtPointer client, XtPointer call)
-{
-
- Arg args[1];
-
- XtSetArg(args[0], XmNblendModel, XmBLEND_JUST_SOURCE);
- XtSetValues(w, args, 1);
-
-}
-
-
-/* This callback procedure removes the icons when the drop is complete */
-/* ARGSUSED */
-static void
-ColorDragDropFinishCB(Widget w, XtPointer client, XtPointer call)
-{
-
- Widget sourceIcon;
- Widget stateIcon = (Widget) client;
- Arg args[1];
-
- XtSetArg(args[0], XmNsourceCursorIcon, &sourceIcon);
- XtGetValues(w, args, 1);
-
- XtDestroyWidget(sourceIcon);
- XtDestroyWidget(stateIcon);
-
-}
-
-
-/* This action procedure sets up the drag data and begins the drag operation */
-/* ARGSUSED */
-void
-ColorRect(Widget w, XEvent *event, String *params, Cardinal *num_params)
-{
-
- static XtCallbackRec dragDropFinishCB[] = {
- {ColorDragDropFinishCB, NULL},
- {NULL, NULL}
- };
-
- static XtCallbackRec dragMotionCB[] = {
- {DragMotionCallback, NULL},
- {NULL, NULL}
- };
-
- static XtCallbackRec dropSiteLeaveCB[] = {
- {DropSiteLeaveCallback, NULL},
- {NULL, NULL}
- };
-
- Atom targets[1];
- Widget sourceIcon, stateIcon;
- Pixel background, foreground;
- char *source_bits, *source_mask;
- char *state_bits, *state_mask;
- Dimension width, height;
- Arg args[16];
- int n = 0;
-
- n = 0;
- XtSetArg(args[n], XmNbackground, &background); n++;
- XtSetArg(args[n], XmNforeground, &foreground); n++;
- XtGetValues(w, args, n);
-
- /* If the server will handle a large icon, create one */
- if (appInfo->maxCursorWidth >= ICON_WIDTH &&
- appInfo->maxCursorHeight >= ICON_HEIGHT) {
-
- source_bits = (char*)SOURCE_ICON_BITS;
- source_mask = (char*)SOURCE_ICON_MASK;
- state_bits = (char*)STATE_ICON_BITS;
- state_mask = (char*)STATE_ICON_MASK;
- width = ICON_WIDTH;
- height = ICON_HEIGHT;
-
- }
- else {
-
- /* If the server will handle a small icon, create one */
- source_bits = (char*)SMALL_SOURCE_ICON_BITS;
- source_mask = (char*)SMALL_SOURCE_ICON_MASK;
- state_bits = (char*)SMALL_STATE_ICON_BITS;
- state_mask = (char*)SMALL_STATE_ICON_MASK;
- width = SMALL_ICON_WIDTH;
- height = SMALL_ICON_HEIGHT;
-
- }
-
- /* Create the drag cursor icons */
- sourceIcon = GetDragIconFromBits(w, source_bits, source_mask, width,
- height, background, foreground);
-
- stateIcon = GetDragIconFromBits(w, state_bits, state_mask, width,
- height, background, foreground);
-
- /* Setup the arglist for the drag context that is created at drag start */
- n = 0;
- /* initially only show the source icon */
- XtSetArg(args[n], XmNblendModel, XmBLEND_JUST_SOURCE); n++;
-
- /* set cursor colors for the drag states */
- XtSetArg(args[n], XmNvalidCursorForeground,
- GetColor(VALID_CURSOR_FG_COLOR)); n++;
- XtSetArg(args[n], XmNinvalidCursorForeground,
- GetColor(INVALID_CURSOR_FG_COLOR)); n++;
- XtSetArg(args[n], XmNnoneCursorForeground,
- GetColor(NONE_CURSOR_FG_COLOR)); n++;
-
- /* set args for the drag cursor icons */
- XtSetArg(args[n], XmNcursorBackground, background); n++;
- XtSetArg(args[n], XmNcursorForeground, foreground); n++;
- XtSetArg(args[n], XmNsourceCursorIcon, sourceIcon); n++;
- XtSetArg(args[n], XmNstateCursorIcon, stateIcon); n++;
-
- /*
- * set up the available export targets. These are targets that we
- * wish to provide data on
- */
- targets[0] = XmInternAtom(XtDisplay(w), "BACKGROUND", False);
- XtSetArg(args[n], XmNexportTargets, targets); n++;
- XtSetArg(args[n], XmNnumExportTargets, 1); n++;
-
- /*
- * identify the conversion procedure and
- * the client data passed to the procedure
- */
- XtSetArg(args[n], XmNclientData, w); n++;
- XtSetArg(args[n], XmNconvertProc, ColorConvert); n++;
-
- /* identify the necessary callbacks */
- dragDropFinishCB[0].closure = (XtPointer) stateIcon;
- XtSetArg(args[n], XmNdragDropFinishCallback, dragDropFinishCB); n++;
- dragMotionCB[0].closure = (XtPointer) stateIcon;
- XtSetArg(args[n], XmNdragMotionCallback, dragMotionCB); n++;
- XtSetArg(args[n], XmNdropSiteLeaveCallback, dragMotionCB); n++;
-
- /* set the drag operations that are supported */
- XtSetArg(args[n], XmNdragOperations, XmDROP_COPY); n++;
-
- /* start the drag. This creates a drag context. */
- myDC = XmDragStart(w, event, args, n);
-
-}
-
-
-/*
- * This is a selection conversion function that is used in
- * converting requests for rectangle targets. The return types follow
- * ICCC statndards.
- */
-/* ARGSUSED */
-Boolean
-RectConvert(Widget w, Atom *selection, Atom *target, Atom *type,
-XtPointer *value, unsigned long *length, int *format)
-{
-
- Display *display = XtDisplay(w);
- Atom MY_RECT = XmInternAtom(display, "_MY_RECTANGLE", False);
- Atom RECT_INFO = XmInternAtom(display, "RECT_INFO", False);
- Atom DELETE = XmInternAtom(display, "DELETE", False);
- Atom TARGETS = XmInternAtom(display, "TARGETS", False);
- Atom MULTIPLE = XmInternAtom(display, "MULTIPLE", False);
- Atom TIMESTAMP = XmInternAtom(display, "TIMESTAMP", False);
- Atom *targs;
- int MAX_TARGS = 6;
- int target_count;
- DragConvertPtr conv;
- Widget widget;
- Arg args[1];
- RectPtr rect, oldRect;
-
- /* get the widget that initiated the drag */
- XtSetArg(args[0], XmNclientData, &conv);
- XtGetValues(w, args, 1);
- widget = (Widget) conv->widget;
-
- /* Make sure we are doing a motif drag by checking if the widget that
- * is passed in is a drag context. Make sure the widget in the client
- * data is not NULL.
- */
- if (!XmIsDragContext(w) || widget == NULL)
- return False;
-
- if (*target == MY_RECT) {
-
- /* Create a new rectangle using information from the old retangle */
- oldRect = conv->rect;
-
- /* We create create a new rectangle and wait for a delete target on the
- * old rectangle instead of just moving the old rectangle because
- * the rectangle movement might be an interclient move.
- */
- rect = RectCreate(oldRect->x, oldRect->y, oldRect->width,
- oldRect->height, oldRect->color, oldRect->pixmap);
- /* value, type, length, and format must be assigned values */
- *value = (XtPointer) rect;
- *type = RECT_INFO;
- *length = sizeof(Pixel);
- *format = 32;
-
- }
- else if (*target == DELETE) {
-
- /* delete the old rectangle */
- RectHide(XtDisplay(widget), XtWindow(widget), conv->rect);
- RectFree(conv->rect);
-
- conv->rect = NULL;
- /*
- * DELETE target return parameters MUST be assigned as follows to
- * ICCC compliant.
- */
- *value = NULL;
- *type = XmInternAtom(XtDisplay(w), "NULL", False);
- *length = 0;
- *format = 8;
-
- }
- else if (*target == TARGETS) {
-
- /* This target is required by ICCC */
- targs = (Atom *)XtMalloc((unsigned) (MAX_TARGS * sizeof(Atom)));
- target_count = 0;
-
- *value = (XtPointer) targs;
- *targs++ = MY_RECT;
- target_count++;
- *targs++ = DELETE;
- target_count++;
- *targs++ = TARGETS;
- target_count++;
- *targs++ = MULTIPLE;
- target_count++; /* supported in the Intrinsics */
- *targs++ = TIMESTAMP;
- target_count++; /* supported in the Intrinsics */
- *type = XA_ATOM;
- *length = (target_count * sizeof(Atom)) >> 2;
- *format = 32;
-
- }
- else
- return False;
-
- return True;
-
-}
-
-
-/* This callback procedure removes the old cursor icon */
-/* ARGSUSED */
-static void
-RectDragDropFinishCB(Widget w, XtPointer client, XtPointer call)
-{
-
- DragConvertPtr conv = (DragConvertPtr) client;
- Widget sourceCursorIcon;
- Arg args[1];
-
- XtSetArg(args[0], XmNsourceCursorIcon, &sourceCursorIcon);
- XtGetValues(w, args, 1);
-
- XtFree((char *) conv);
-
- XtDestroyWidget(sourceCursorIcon);
-
-}
-
-
-/* This callback procedure redraws the rectangles once the drop is completed */
-/* ARGSUSED */
-static void
-RectDropFinishCB(Widget w, XtPointer client, XtPointer call)
-{
-
- DragConvertPtr conv = (DragConvertPtr) client;
-
- appInfo->clearRect = NULL;
- appInfo->doMove = True;
- RedrawRectangles(conv->widget);
-
-}
-
-
-/* This callback procedure handle the drawing of the target
- * rectangle depending of the dropSiteStatus for drag over
- * effects.
- */
-/* ARGSUSED */
-static void
-RectDragMotionCB(Widget w, XtPointer client, XtPointer call)
-{
-
- XmDragMotionCallback cb = (XmDragMotionCallback) call;
- DragConvertPtr conv = (DragConvertPtr) client;
- Display *display;
- Window window;
- RectPtr rect;
-
- if (cb->dropSiteStatus == XmVALID_DROP_SITE) {
-
- /* re-stipple the rectangle when the poitner is inside the drop site */
- if ( appInfo->clearRect == NULL && appInfo->doMove) {
-
- display = XtDisplay(conv->widget);
- window = XtWindow(conv->widget);
- rect = conv->rect;
-
- RectHide(display, window, rect);
- RectDrawStippled(display, window, rect);
-
- }
-
- }
- else {
-
- /* re-fill the rectangle when the poitner is outside the drop site */
- if (appInfo->clearRect != NULL && appInfo->doMove) {
- appInfo->clearRect = NULL;
- RedrawRectangles(conv->widget);
- }
-
- }
-
-}
-
-
-/* This callback procedure handle the drawing of the target
- * rectangle When the operation changes.
- */
-/* ARGSUSED */
-static void
-RectOperationChangedCB(Widget w, XtPointer client, XtPointer call)
-{
-
- XmDragMotionCallback cb = (XmDragMotionCallback) call;
- DragConvertPtr conv = (DragConvertPtr) client;
- Display *display;
- Window window;
- RectPtr rect;
-
- /* re-stipple the rectangle when the poitner is inside the drop site */
- if ( appInfo->clearRect == NULL && appInfo->doMove) {
-
- display = XtDisplay(conv->widget);
- window = XtWindow(conv->widget);
- rect = conv->rect;
-
- RectHide(display, window, rect);
- RectDrawStippled(display, window, rect);
-
- }
-
- /* re-fill the rectangle when the operation changes to copy */
- if (appInfo->clearRect != NULL && !appInfo->doMove) {
- appInfo->clearRect = NULL;
- RedrawRectangles(conv->widget);
- }
-
-}
-
-
-/* This action procedure sets up the drag data and begins the drag operation */
-/* ARGSUSED */
-static void
-StartMove(Widget w, XEvent *event, String *params, Cardinal *num_params)
-{
-
- RectPtr rect;
- Position x = event->xbutton.x;
- Position y = event->xbutton.y;
- static XtCallbackRec dragDropFinishCB[] = {
- {RectDragDropFinishCB, NULL},
- {NULL, NULL}
- };
-
- static XtCallbackRec dropFinishCB[] = {
- {RectDropFinishCB, NULL},
- {NULL, NULL}
- };
-
- static XtCallbackRec dragMotionCB[] = {
- {RectDragMotionCB, NULL},
- {NULL, NULL}
- };
-
- static XtCallbackRec operationChangedCB[] = {
- {RectOperationChangedCB, NULL},
- {NULL, NULL}
- };
-
- Atom targets[1];
- Display *display = XtDisplay(w);
- Widget sourceCursorIcon;
- DragConvertPtr conv;
- Pixel background, foreground;
- Arg args[16];
- int n = 0;
-
- /* find a rectangle at the given x,y position */
- rect = RectFind(x, y);
-
- /* start move only if it begins on a rectangle */
- if (rect) {
-
- XtSetArg(args[0], XmNbackground, &background);
- XtGetValues(w, args, 1);
-
- foreground = RectGetColor(rect);
- sourceCursorIcon = GetDragIconFromRect(w, rect, background);
-
- /*
- * Set up information to pass to the convert
- * function and callback procs.
- */
- conv = (DragConvertPtr) XtMalloc(sizeof(DragConvertRec));
- conv->widget = w;
- conv->rect = rect;
-
- /* On a move operation, draw the current
- * rectangle as a stippled outline.
- */
- if (!(event->xbutton.state & ControlMask)) {
- RectHide(display, XtWindow(w), rect);
- RectDrawStippled(display, XtWindow(w), rect);
- }
- else
- appInfo->doMove = False;
-
- /* Setup arglist for the drag context that is created at drag start */
- n = 0;
- /* initially only show the source icon */
- XtSetArg(args[n], XmNblendModel, XmBLEND_JUST_SOURCE); n++;
-
- /* set args for the drag cursor icons */
- XtSetArg(args[n], XmNcursorBackground, background); n++;
- XtSetArg(args[n], XmNcursorForeground, foreground); n++;
- XtSetArg(args[n], XmNsourceCursorIcon, sourceCursorIcon); n++;
-
- /*
- * set up the available export targets. These are targets that we
- * wish to provide data on
- */
- targets[0] = XmInternAtom(display, "_MY_RECTANGLE", False);
- XtSetArg(args[n], XmNexportTargets, targets); n++;
- XtSetArg(args[n], XmNnumExportTargets, 1); n++;
-
- /*
- * identify the conversion procedure and
- * the client data passed to the procedure
- */
- XtSetArg(args[n], XmNclientData, conv); n++;
- XtSetArg(args[n], XmNconvertProc, RectConvert); n++;
-
- /* identify the necessary callbacks and the client data to be passed */
- dragDropFinishCB[0].closure = (XtPointer) conv;
- XtSetArg(args[n], XmNdragDropFinishCallback, dragDropFinishCB); n++;
- dropFinishCB[0].closure = (XtPointer) conv;
- XtSetArg(args[n], XmNdropFinishCallback, dropFinishCB); n++;
- dragMotionCB[0].closure = (XtPointer) conv;
- XtSetArg(args[n], XmNdragMotionCallback, dragMotionCB); n++;
- operationChangedCB[0].closure = (XtPointer) conv;
- XtSetArg(args[n], XmNoperationChangedCallback, operationChangedCB); n++;
-
- /* set the drag operations that are supported */
- XtSetArg(args[n], XmNdragOperations, XmDROP_COPY | XmDROP_MOVE); n++;
-
- /* start the drag. This creates a drag context. */
- myDC = XmDragStart(w, event, args, n);
-
- }
-
-}
-
-
-/* This procedure searches through the export targets and
- * returns flags to indicate which targets were found
- */
-/* ARGSUSED */
-static void
-CheckTargets(Widget w, Display *display, Boolean *rectFound,
-Boolean *bgFound, Boolean *pixFound)
-{
-
- Atom MY_RECT = XmInternAtom(display, "_MY_RECTANGLE", False);
- Atom BACKGROUND = XmInternAtom(display, "BACKGROUND", False);
- Atom PIXMAP = XmInternAtom(display, "PIXMAP", False);
- Atom *exportTargets;
- Cardinal numExportTargets;
- Arg args[2];
- int n;
-
- /* Get list of transfer targets */
- n = 0;
- XtSetArg(args[0], XmNexportTargets, &exportTargets);
- XtSetArg(args[1], XmNnumExportTargets, &numExportTargets);
- XtGetValues(w, args, 2);
-
- /* initialize targets found flags */
- *rectFound = *bgFound = *pixFound = False;
-
- /* search through the export targets */
- for (n = 0; n < numExportTargets; n++) {
-
- if (exportTargets[n] == MY_RECT)
- *rectFound = True;
- else if (exportTargets[n] == BACKGROUND)
- *bgFound = True;
- else if (exportTargets[n] == PIXMAP)
- *pixFound = True;
-
- }
-
-}
-
-
-/* This procedure handles drop site messages and performs the
- * appropriate drag under effects.
- */
-/* ARGSUSED */
-static void
-DragProcCallback(Widget w, XtPointer client, XtPointer call)
-{
-
- XmDragProcCallbackStruct *cb = (XmDragProcCallbackStruct *) call;
- Display *display = XtDisplay(w);
- Boolean rectFound, bgFound, pixFound;
- static unsigned char initial_operations;
- static unsigned char initial_operation;
- RectPtr rect;
-
- CheckTargets(cb->dragContext, display, &rectFound, &bgFound, &pixFound);
-
- switch(cb->reason) {
-
- case XmCR_DROP_SITE_ENTER_MESSAGE:
-
- /* save the value of the operations and operation fields */
- initial_operations = cb->operations;
- initial_operation = cb->operation;
-
- rect = RectFind(cb->x, cb->y);
-
- /* Remove any operations for the operations field which do not
- * apply to the simulated drop site.
- */
- if (rect) {
-
- if (bgFound || pixFound) {
- cb->operations = XmDROP_COPY;
- RectHighlight(w, rect);
- }
- else if (rectFound) {
- cb->operations = cb->operations &
- (XmDROP_COPY | XmDROP_MOVE);
- RectUnhighlight(w);
- }
-
- }
- else {
- cb->operations = initial_operations &
- (XmDROP_COPY | XmDROP_MOVE);
- RectUnhighlight(w);
- }
-
- /* Set operation to the valid operation preferred by the simulated
- * drop site or to XmDROP_NOOP if the operations list does not
- * contain the preferred operation.
- */
- if (rect) {
-
- if (bgFound || pixFound) {
-
- if (cb->operations & XmDROP_COPY)
- cb->operation = XmDROP_COPY;
- else
- cb->operation = XmDROP_NOOP;
-
- }
- else if (rectFound) {
-
- if (cb->operations & XmDROP_MOVE)
- cb->operation = XmDROP_MOVE;
- else if (cb->operations & XmDROP_COPY)
- cb->operation = XmDROP_COPY;
- else
- cb->operation = XmDROP_NOOP;
-
- }
-
- }
- else {
-
- if (rectFound) {
-
- if (cb->operations & XmDROP_MOVE)
- cb->operation = XmDROP_MOVE;
- else if (cb->operations & XmDROP_COPY)
- cb->operation = XmDROP_COPY;
- else
- cb->operation = XmDROP_NOOP;
-
- }
- else
- cb->operation = initial_operation;
-
- }
-
- /*
- * Set dropSiteStatus to XmDROP_SITE_INVALID if the operation
- * field is XmDROP_NOOP, or if there are no common targets
- * between the source and the nested drop site. Otherwise, set
- * dropSiteStatus to XmDROP_SITE_VALID.
- */
- if (cb->operation == XmDROP_NOOP ||
- (rect && (!rectFound && !bgFound && !pixFound)) ||
- (!rect && !rectFound))
- cb->dropSiteStatus = XmINVALID_DROP_SITE;
- else
- cb->dropSiteStatus = XmVALID_DROP_SITE;
-
- /*
- * Display appropriate drag under visuals. Only highlight
- * the rectangle if we are changing rectangle attributes.
- */
- if (rect && bgFound || pixFound &&
- cb->dropSiteStatus == XmVALID_DROP_SITE)
- RectHighlight(w, rect);
- break;
-
- case XmCR_DROP_SITE_LEAVE_MESSAGE:
-
- /* Only unhighlight the rectangle if previously highlighted */
- if (appInfo->highlightRect != NULL)
- RectUnhighlight(w);
- break;
-
- case XmCR_DROP_SITE_MOTION_MESSAGE:
-
- rect = RectFind(cb->x, cb->y);
-
- /*
- * Remove any operations for the operations field which do not
- * apply to the simulated drop site.
- */
- if (rect) {
-
- if (bgFound || pixFound) {
- cb->operations = XmDROP_COPY;
- RectHighlight(w, rect);
- }
- else if (rectFound) {
- cb->operations = cb->operations &
- (XmDROP_COPY | XmDROP_MOVE);
- RectUnhighlight(w);
- }
-
- }
- else {
- cb->operations = initial_operations &
- (XmDROP_COPY | XmDROP_MOVE);
- RectUnhighlight(w);
- }
-
- /*
- * Set operation to the valid operation preferred by the simulated
- * drop site or to XmDROP_NOOP if the operations list does not
- * contain the preferred operation.
- */
- if (rect) {
-
- if (bgFound || pixFound) {
-
- if (cb->operations & XmDROP_COPY)
- cb->operation = XmDROP_COPY;
- else
- cb->operation = XmDROP_NOOP;
-
- }
- else if (rectFound) {
-
- if (cb->operations & XmDROP_MOVE)
- cb->operation = XmDROP_MOVE;
- else if (cb->operations & XmDROP_COPY)
- cb->operation = XmDROP_COPY;
- else
- cb->operation = XmDROP_NOOP;
-
- }
- }
- else {
-
- if (rectFound) {
- if (cb->operations & XmDROP_MOVE)
- cb->operation = XmDROP_MOVE;
- else if (cb->operations & XmDROP_COPY)
- cb->operation = XmDROP_COPY;
- else
- cb->operation = XmDROP_NOOP;
-
- }
- else
- cb->operation = initial_operation;
-
- }
-
- /*
- * Set dropSiteStatus to XmDROP_SITE_INVALID if the operation
- * field is XmDROP_NOOP, or if there are no common targets
- * between the source and the nested drop site. Otherwise,
- * set dropSiteStatus to XmDROP_SITE_VALID.
- */
- if (cb->operation == XmDROP_NOOP ||
- (rect && (!rectFound && !bgFound && !pixFound)) ||
- (!rect && !rectFound))
- cb->dropSiteStatus = XmINVALID_DROP_SITE;
- else
- cb->dropSiteStatus = XmVALID_DROP_SITE;
-
- /*
- * Display appropriate drag under visuals. Only highlight
- * the rectangle if we are changing rectangle attributes.
- */
- if (rect && bgFound || pixFound &&
- cb->dropSiteStatus == XmVALID_DROP_SITE)
- RectHighlight(w, rect);
- break;
-
- case XmCR_OPERATION_CHANGED:
-
- if (rectFound) {
-
- if (cb->operation == XmDROP_MOVE)
- appInfo->doMove = True;
- else
- appInfo->doMove = False;
-
- }
- break;
-
- default:
-
- /* other messages we consider invalid */
- cb->dropSiteStatus = XmINVALID_DROP_SITE;
- break;
-
- }
-
- /* allow animation to be performed */
- cb->animate = True;
-
-}
-
-
-/* This procedure handles the data that is being transfer */
-/* ARGSUSED */
-static void
-TransferProcCallback(Widget w, XtPointer closure, Atom *seltype, Atom *type,
-XtPointer value, unsigned long *length, int *format)
-{
-
- DropTransfer transferRec = (DropTransfer) closure;
- Widget wid = transferRec->widget;
- Display *display = XtDisplay(wid);
- Atom RECT_INFO = XmInternAtom(display, "RECT_INFO", False);
- Atom PIXEL = XmInternAtom(display, "PIXEL", False);
- Atom NULL_ATOM = XmInternAtom(display, "NULL", False);
- Arg args[10];
- RectPtr rect;
- int n;
-
- /*
- * The delete target returns a NULL_ATOM type and value equal to NULL
- * so it isn't a failure. Otherwise, check for NULL value or targets
- * that wee don't support and set transfer failure.
- */
- if (*type != NULL_ATOM && (!value ||
- (*type != RECT_INFO && *type != PIXEL && *type != XA_DRAWABLE))) {
-
- n = 0;
- /*
- * On failures set both transferStatus to XmTRANSFER_FAILURE and
- * numDropTransfers to 0.
- */
- XtSetArg(args[n], XmNtransferStatus, XmTRANSFER_FAILURE); n++;
- XtSetArg(args[n], XmNnumDropTransfers, 0); n++;
- XtSetValues(w, args, n);
- /* Free the value if there is one, or we would have a memory leak */
- if (value)
- XtFree(value);
-
- return;
-
- }
-
- /* Handle pixel type (i.e. change in background) */
- if (*type == PIXEL) {
- rect = RectFind(transferRec->x, transferRec->y);
- RectSetColor(rect, display, XtWindow(wid), *((Pixel*)value));
- }
- /* Handle drawable type (i.e. change in pixmap) */
- else if (*type == XA_DRAWABLE) {
- rect = RectFind(transferRec->x, transferRec->y);
- RectSetPixmap(rect, display, XtWindow(wid), *((Pixmap *)value));
- }
- /* Handle rect_info type (i.e. new rectangle) */
- else if (*type == RECT_INFO) {
- rect = (RectPtr) value;
- RectRegister(rect, transferRec->x, transferRec->y);
- value = NULL; /* No need to free, it is being stored in RecTable */
- }
-
- /* Free the value if there is one, or we would have a memory leak */
- if (value)
- XtFree(value);
-
-}
-
-
-/* This procedure frees the data used the data transfer proc that
- * was passed from the drop procedure.
- */
-/* ARGSUSED */
-static void
-DropDestroyCB(Widget w, XtPointer clientData, XtPointer callData)
-{
- XtFree((char *)clientData);
-}
-
-
-/* This procedure initiates the drop transfer. */
-/* ARGSUSED */
-static void
-HandleDrop(Widget w, XtPointer call)
-{
- static XtCallbackRec dropDestroyCB[] = {
- {DropDestroyCB, NULL},
- {NULL, NULL}
- };
-
- XmDropProcCallbackStruct *cb = (XmDropProcCallbackStruct *)call;
- Display *display = XtDisplay(w);
- Arg args[10];
- int n;
- Boolean rectFound, bgFound, pixFound;
- DropTransfer transferRec;
- XmDropTransferEntryRec transferEntries[2];
- XmDropTransferEntryRec *transferList = NULL;
- Cardinal numTransfers = 0;
- Boolean transferValid = False;
- RectPtr rect;
-
- /* Cancel the drop on invalid drop operations */
- if (!(cb->operations & XmDROP_MOVE || cb->operations & XmDROP_COPY)) {
-
- n = 0;
- cb->operation = XmDROP_NOOP;
- cb->dropSiteStatus = XmINVALID_DROP_SITE;
- XtSetArg(args[n], XmNtransferStatus, XmTRANSFER_FAILURE); n++;
- XtSetArg(args[n], XmNnumDropTransfers, 0); n++;
- }
- else {
-
- /* Find out which nested dropsite contains the pointer */
- rect = RectFind(cb->x, cb->y);
-
- CheckTargets(cb->dragContext, display, &rectFound, &bgFound, &pixFound);
-
- /* rect !NULL indicates we are within a nested dropsite */
- if (rect) {
-
- /* MY_RECT is a possible target, we'll support it first */
- if (rectFound)
- transferValid = True;
- else if (bgFound || pixFound) {
- /* support only copy with the BACKGROUND and PIXMAP targets */
- if (cb->operation != XmDROP_COPY)
- cb->operation = XmDROP_COPY;
- transferValid = True;
- }
-
- }
- else {
- if (rectFound)
- transferValid = True;
- }
-
- if (transferValid) {
-
- /* intialize data to send to drop transfer callback */
- transferRec = (DropTransfer) XtMalloc(sizeof(DropTransferRec));
- transferRec->widget = w;
- transferRec->x = cb->x;
- transferRec->y = cb->y;
-
- /* order of support is MY_RECT, then BACKGROUND, then PIXMAP */
- if (rectFound)
- transferEntries[0].target = XmInternAtom(display,
- "_MY_RECTANGLE",
- False);
- else if (bgFound)
- transferEntries[0].target = XmInternAtom(display,
- "BACKGROUND",
- False);
- else if (pixFound)
- transferEntries[0].target = XmInternAtom(display,
- "PIXMAP",
- False);
-
- transferEntries[0].client_data = (XtPointer) transferRec;
-
- /* Set up move targets */
- if (cb->operation == XmDROP_MOVE) {
-
- transferEntries[1].client_data = (XtPointer) transferRec;
- transferEntries[1].target = XmInternAtom(display,
- "DELETE", False);
- numTransfers = 2;
-
- }
- else if (cb->operation == XmDROP_COPY)
- numTransfers = 1;
-
- transferList = transferEntries;
-
- /* Setup transfer list */
- n = 0;
- cb->dropSiteStatus = XmVALID_DROP_SITE;
- XtSetArg(args[n], XmNdropTransfers, transferList); n++;
- XtSetArg(args[n], XmNnumDropTransfers, numTransfers); n++;
-
- /* Setup destroy callback to free transferRec */
- dropDestroyCB[0].closure = (XtPointer) transferRec;
- XtSetArg(args[n], XmNdestroyCallback, dropDestroyCB); n++;
-
- /* Setup transfer proc to accept the drop transfer data */
- XtSetArg(args[n], XmNtransferProc, TransferProcCallback); n++;
-
- }
- else {
-
- n = 0;
- cb->operation = XmDROP_NOOP;
- cb->dropSiteStatus = XmINVALID_DROP_SITE;
- XtSetArg(args[n], XmNtransferStatus, XmTRANSFER_FAILURE); n++;
- XtSetArg(args[n], XmNnumDropTransfers, 0); n++;
-
- }
-
- }
-
- XmDropTransferStart(cb->dragContext, args, n);
-
-}
-
-
-/* This procedure is used with the drop help dialog to continue with the drop */
-/* ARGSUSED */
-static void
-HandleOK(Widget w, XtPointer client, XtPointer call)
-{
-
- XmDropProcCallbackStruct *cb = (XmDropProcCallbackStruct *)client;
-
- cb->operation = appInfo->operation;
- HandleDrop(w, (XtPointer) cb);
-
-}
-
-
-/* This procedure is used with the drop help dialog to cancel the drop */
-/* ARGSUSED */
-static void
-CancelDrop(Widget w, XtPointer client, XtPointer call)
-{
-
- XmDropProcCallbackStruct *cb = (XmDropProcCallbackStruct *)client;
- Arg args[2];
-
- /* On help, we need to cancel the drop transfer */
- XtSetArg(args[0], XmNtransferStatus, XmTRANSFER_FAILURE);
- XtSetArg(args[1], XmNnumDropTransfers, 0);
-
- /* we need to start the drop transfer to cancel the transfer */
- XmDropTransferStart(cb->dragContext, args, 2);
-
-}
-
-
-XtCallbackProc ChangeOperation(Widget widget, XtPointer client_data,
-XmAnyCallbackStruct *call_data)
-{
-
- if (client_data == 0)
- appInfo->operation = XmDROP_MOVE;
- else
- appInfo->operation = XmDROP_COPY;
-
-}
-
-
-/* This procedure manages the help dialog and determines which
- * message is displayed in the dialog depending on the position
- * and the type of drop.
- */
-/* ARGSUSED */
-static void
-HandleHelp(Widget w, XtPointer call)
-{
-
- XmDropProcCallbackStruct *cb = (XmDropProcCallbackStruct *)call;
- static XmDropProcCallbackStruct client;
- Boolean rectFound, bgFound, pixFound;
- XmString helpStr;
- RectPtr rect;
- Arg args[5];
- XmString tempStr, buttonArray[2];
- int n = 0;
-
- /* the drop is valid until it is determined invalid */
- cb->dropSiteStatus = XmVALID_DROP_SITE;
-
- /* if we haven't created a help dialog, create one now */
- if (helpDialog == NULL) {
-
- XtSetArg(args[n], XmNdialogStyle, XmDIALOG_FULL_APPLICATION_MODAL); n++;
- XtSetArg(args[n], XmNtitle, "Drop Help"); n++;
- helpDialog = XmCreateMessageDialog(topLevel, "Help", args, n);
-
- n = 0;
- buttonArray[0] = XmStringCreateSimple("Move");
- buttonArray[1] = XmStringCreateSimple("Copy");
- XtSetArg(args[n], XmNbuttons, buttonArray); n++;
- XtSetArg(args[n], XmNbuttonCount, 2); n++;
- XtSetArg(args[n], XmNbuttonSet, 0); n++;
- XtSetArg(args[n], XmNsimpleCallback, ChangeOperation); n++;
- tempStr = XmStringCreateSimple("Operations:");
- XtSetArg(args[n], XmNoptionLabel, tempStr); n++;
- helpMenu = XmCreateSimpleOptionMenu(helpDialog, "helpMenu", args, n);
- XmStringFree(tempStr);
- XmStringFree(buttonArray[0]);
- XmStringFree(buttonArray[1]);
-
- XtAddCallback(helpDialog, XmNokCallback,
- (XtCallbackProc) HandleOK, (XtPointer) &client);
- XtAddCallback(helpDialog, XmNcancelCallback,
- (XtCallbackProc) CancelDrop, (XtPointer) &client);
-
- XtUnmanageChild(XmMessageBoxGetChild(helpDialog, XmDIALOG_HELP_BUTTON));
-
- XtRealizeWidget(helpDialog);
-
- }
-
- /* pass the necessary callback information along */
- client.dragContext = cb->dragContext;
- client.x = cb->x;
- client.y = cb->y;
- client.dropSiteStatus = cb->dropSiteStatus;
- client.operation = cb->operation;
- client.operations = cb->operations;
-
- /* find the valid targets */
- CheckTargets(cb->dragContext, XtDisplay(w), &rectFound,
- &bgFound, &pixFound);
-
- /* determine the appropriate help message */
- if (rectFound) {
-
- if (cb->operations == XmDROP_MOVE | XmDROP_COPY) {
- XtManageChild(helpMenu);
- helpStr = XmStringCreateLtoR(HELP_MSG4, XmFONTLIST_DEFAULT_TAG);
- XtManageChild(XmMessageBoxGetChild(helpDialog, XmDIALOG_OK_BUTTON));
- }
- else if (cb->operation == XmDROP_MOVE) {
- XtUnmanageChild(helpMenu);
- helpStr = XmStringCreateLtoR(HELP_MSG2, XmFONTLIST_DEFAULT_TAG);
- XtManageChild(XmMessageBoxGetChild(helpDialog, XmDIALOG_OK_BUTTON));
- }
- else if (cb->operation == XmDROP_COPY) {
- XtUnmanageChild(helpMenu);
- helpStr = XmStringCreateLtoR(HELP_MSG3, XmFONTLIST_DEFAULT_TAG);
- XtManageChild(XmMessageBoxGetChild(helpDialog, XmDIALOG_OK_BUTTON));
- }
-
- }
- else if (bgFound || pixFound && cb->operation == XmDROP_COPY) {
-
- XtUnmanageChild(helpMenu);
- rect = RectFind(cb->x, cb->y);
- if (rect) {
- helpStr = XmStringCreateLtoR(HELP_MSG1, XmFONTLIST_DEFAULT_TAG);
- XtManageChild(XmMessageBoxGetChild(helpDialog, XmDIALOG_OK_BUTTON));
- }
- else {
- helpStr = XmStringCreateLtoR(HELP_MSG5, XmFONTLIST_DEFAULT_TAG);
- XtUnmanageChild(XmMessageBoxGetChild(helpDialog,
- XmDIALOG_OK_BUTTON));
- }
-
- }
- else {
- XtUnmanageChild(helpMenu);
- helpStr = XmStringCreateLtoR(HELP_MSG5, XmFONTLIST_DEFAULT_TAG);
- XtUnmanageChild(XmMessageBoxGetChild(helpDialog, XmDIALOG_OK_BUTTON));
- }
-
- /* set the help message into the dialog */
- XtSetArg(args[0], XmNmessageString, helpStr);
- XtSetValues(helpDialog, args, 1);
-
- /* Free the XmString */
- XmStringFree(helpStr);
-
- /* map the help dialog */
- XtManageChild(helpDialog);
-
-}
-
-
-/* The procedure either begins the drop of initiates the help dialog
- * depending on the dropAction.
- */
-/* ARGSUSED */
-static void
-DropProcCallback(Widget w, XtPointer client, XtPointer call)
-{
-
- XmDropProcCallbackStruct *cb = (XmDropProcCallbackStruct *)call;
-
- if (appInfo->highlightRect != NULL)
- RectUnhighlight(w);
-
- if (cb->dropAction != XmDROP_HELP)
- HandleDrop(w, call);
- else
- HandleHelp(w, call);
-
-}
-
-
-/* This procedure registers the drop taragets and the drop site */
-static void
-RegisterDropSite(Widget w)
-{
-
- Display *display = XtDisplay(w);
- Atom targets[3];
- Arg args[5];
- int n = 0;
-
- /* Only accept moves or copies */
- XtSetArg(args[n], XmNdragOperations, XmDROP_COPY | XmDROP_MOVE); n++;
-
- /* set all possible targets for any of the nested drop sites */
- targets[0] = XmInternAtom(display, "_MY_RECTANGLE", False);
- targets[1] = XmInternAtom(display, "BACKGROUND", False);
- targets[2] = XmInternAtom(display, "PIXMAP", False);
- XtSetArg(args[n], XmNimportTargets, targets); n++;
- XtSetArg(args[n], XmNnumImportTargets, 3); n++;
-
- /* register a dragProc - necessary for simulating nested drop sites */
- XtSetArg(args[n], XmNdragProc, DragProcCallback); n++;
-
- /* register a dropProc */
- XtSetArg(args[n], XmNdropProc, DropProcCallback); n++;
- XmDropSiteRegister(w, args, n);
-
-}
-
-
-static void
-SetInvalidIcon(Widget w)
-{
-
- Widget invalidIcon;
- char *invalid_bits;
- Dimension width, height;
- Arg args[1];
-
- if (appInfo->maxCursorWidth >= ICON_WIDTH &&
- appInfo->maxCursorHeight >= ICON_HEIGHT) {
- invalid_bits = (char *)INVALID_ICON_BITS;
- width = ICON_WIDTH;
- height = ICON_HEIGHT;
- } else {
- /* If the server will handle a small icon, create one */
- invalid_bits = (char *)SMALL_INVALID_ICON_BITS;
- width = SMALL_ICON_WIDTH;
- height = SMALL_ICON_HEIGHT;
- }
-
- invalidIcon = GetDragIconFromBits(w, invalid_bits, invalid_bits, width,
- height, GetColor(DRAW_AREA_FG_COLOR),
- GetColor(DRAW_AREA_BG_COLOR));
-
- XtSetArg(args[0], XmNdefaultInvalidCursorIcon, invalidIcon);
- XtSetValues(XmGetXmScreen(XtScreen(w)), args, 1);
-
-}
-
-
-/* This procedure initalizes the toolkit and other application information */
-static void
-InitializeApplication(int *argc, String *argv)
-{
-
- static XtActionsRec new_actions[] = {
- {"StartRect", StartRect},
- {"ExtendRect", ExtendRect},
- {"EndRect", EndRect},
- {"StartMove", StartMove},
- {"ColorRect", ColorRect},
- };
- Arg args[5];
- Cardinal n = 0;
-
- /* Ininialize struct that hold global information */
- InitializeAppInfo();
-
- /* Initialize Toolkit and create shell */
- XtSetArg(args[n], XmNwidth, 295); n++;
- XtSetArg(args[n], XmNheight, 270); n++;
- topLevel = XtAppInitialize(&appContext, "DNDDemo", NULL, 0,
- argc, argv, NULL, args, n);
-
- /* Set drag protocol styles */
- n = 0;
- XtSetArg(args[n], XmNdragInitiatorProtocolStyle,
- XmDRAG_PREFER_RECEIVER); n++;
- XtSetArg(args[n], XmNdragReceiverProtocolStyle, XmDRAG_DYNAMIC); n++;
- XtSetValues(XmGetXmDisplay(XtDisplay(topLevel)), args, n);
-
- /* Initialize tables for holding rectangle information */
- InitializeRectDpyTable();
-
- /* Add new actions for use with translation tables */
- XtAppAddActions(appContext, new_actions, 5);
-
- /* Get the display server's best cursor size */
- XQueryBestCursor(XtDisplay(topLevel),
- RootWindowOfScreen(XtScreen(topLevel)), 64, 64,
- &appInfo->maxCursorWidth, &appInfo->maxCursorHeight);
-
-}
-
-
-/* This the program start procedure */
-void
-main (int argc, String *argv)
-{
-
- /* Initialize toolkit and application global values */
- InitializeApplication(&argc, argv);
-
- /* Create main window, drawing area, and color labels */
- CreateLayout();
-
- /* Register the drawing area as a drop site */
- RegisterDropSite(drawingArea);
-
- SetInvalidIcon(drawingArea);
-
- /* Realize and map widget hiearchy */
- XtRealizeWidget(topLevel);
-
- /* Create GC for drawing rectangles */
- CreateRectGC();
-
- /* Begin event loop processing */
- XtAppMainLoop(appContext);
-
-}
+++ /dev/null
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-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 libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/*
- * (c) Copyright 1989, 1990, 1991, 1992, 1993 OPEN SOFTWARE FOUNDATION, INC.
- * ALL RIGHTS RESERVED
-*/
-/*
- * Motif Release 1.2.2
-*/
-/* $XConsortium: DNDDemo.h /main/4 1995/10/27 10:43:48 rswiston $ */
-/*
-* (c) Copyright 1987, 1988, 1989 HEWLETT-PACKARD COMPANY */
-/*
- * file: DNDDemo.h
- *
- * Header file for the program DNDDemo.
- */
-
-#include <stdio.h>
-#include <X11/Xatom.h>
-#include <X11/Intrinsic.h>
-#include <Xm/Xm.h>
-#include <Xm/AtomMgr.h>
-#include <Xm/MainW.h>
-#include <Xm/DrawingA.h>
-#include <Xm/SeparatoG.h>
-#include <Xm/Form.h>
-#include <Xm/RowColumn.h>
-#include <Xm/PushB.h>
-#include <Xm/MessageB.h>
-#include <Xm/DragDrop.h>
-#include <Xm/Screen.h>
-
-
-/* The following is used to layout the color labels */
-#define BOX_WIDTH 85
-#define BOX_HEIGHT 25
-#define BOX_X_OFFSET 95
-#define BOX_Y_OFFSET 35
-#define BOX_X_MARGIN 10
-#define BOX_Y_MARGIN 10
-
-/* The following are used in setting up the drag icons */
-#define ICON_WIDTH 32
-#define ICON_HEIGHT 32
-#define SMALL_ICON_WIDTH 16
-#define SMALL_ICON_HEIGHT 16
-#define ICON_X_HOT 0
-#define ICON_Y_HOT 0
-
-/* Some scales or text entry field could be added to change this value */
-#define RECT_WIDTH 20
-#define RECT_HEIGHT 50
-
-/* The following defines could be setup as application resources */
-#define RECT_START_COLOR "black"
-#define HIGHLIGHT_THICKNESS 3
-#define HIGHLIGHT_COLOR "Black" /* this is equivalent to gray60
- in the R5 rgb.txt */
-#define DRAW_AREA_BG_COLOR "white"
-#define DRAW_AREA_FG_COLOR "black" /* 5127 fix */
-#define LABEL1_COLOR "#ff5026" /* a slight softer shade of red,
- red was too dark */
-#define LABEL2_COLOR "orange"
-#define LABEL3_COLOR "yellow"
-#define LABEL4_COLOR "violet"
-#define LABEL5_COLOR "#00C3ff" /* a blue green color,
- blue was too dark */
-#define LABEL6_COLOR "green"
-
-#define VALID_CURSOR_FG_COLOR "black"
-#define INVALID_CURSOR_FG_COLOR "maroon"
-#define NONE_CURSOR_FG_COLOR "maroon"
-
-
-/*
- * This struct is used to contain information about each rectangle
- * to use in the dislay routines
- */
-typedef struct _RectStruct {
- Position x;
- Position y;
- Dimension width;
- Dimension height;
- Pixel color;
- Pixmap pixmap; /* currently not in use */
-} RectStruct, *RectPtr;
-
-/* This struct is used to hold global application information */
-typedef struct _AppInfoRec {
- GC rectGC; /* graphic context used to draw the rectangles */
- Pixel currentColor; /* color that is currently in the GC */
- RectPtr *rectDpyTable; /* the rectangle display table */
- int rectsAllocd; /* keeps track of how much the above
- table has been alloc'd */
- int numRects; /* the number of rects that are visible */
- RectPtr highlightRect; /* the current highlighted rectangle */
- RectPtr clearRect; /* the rectangle that is being moved */
- Boolean doMove; /* indicates that a move is being performed */
- Boolean creatingRect; /* indicates that a rect create is being
- performed */
- unsigned char operation;/* indicates the drop help operation */
- unsigned int maxCursorWidth; /* the maximum allowable cursor width */
- unsigned int maxCursorHeight; /* the maximum allowable cursor height */
- Position rectX;
- Position rectY;
- Position rectX2;
- Position rectY2;
-} AppInfoRec, *AppInfo;
-
-/*
- * This struct is used to pass information
- * from the dropProc to the transferProc
- */
-typedef struct _DropTransferRec {
- Widget widget;
- Position x;
- Position y;
-} DropTransferRec, *DropTransfer;
-
-/*
- * This struct is used to pass information
- * from the rectangle dragStart proc to it's associated
- * callback procs.
- */
-typedef struct _DragConvertRec {
- Widget widget;
- RectPtr rect;
-} DragConvertRec, *DragConvertPtr;
-
-
-
-extern void InitializeAppInfo(void );
-extern void StartRect(Widget , XEvent *, String *, Cardinal *);
-extern void ExtendRect(Widget , XEvent *, String *, Cardinal *);
-extern void EndRect(Widget , XEvent *, String *, Cardinal *);
-extern RectPtr RectCreate(Position , Position , Dimension ,
- Dimension , Pixel , Pixmap );
-extern RectPtr RectFind(Position , Position );
-extern void RectSetColor(RectPtr , Display *, Window , Pixel );
-extern Pixel RectGetColor(RectPtr );
-extern Pixmap GetBitmapFromRect(Widget , RectPtr , Pixel , Pixel ,
- Dimension *, Dimension *);
-extern void RectHide(Display *, Window , RectPtr );
-extern void RectFree(RectPtr );
-extern void RedrawRectangles(Widget );
-extern void RectDrawStippled(Display *, Window , RectPtr );
-extern void RectHighlight(Widget , RectPtr );
-extern void RectUnhighlight(Widget );
-extern void RectSetPixmap(RectPtr , Display *, Window , Pixmap );
-extern void RectRegister(RectPtr , Position , Position );
-extern void InitializeRectDpyTable(void );
-extern void CreateLayout(void );
-extern void CreateRectGC(void );
-extern Pixel GetColor(char *);
-extern void ColorRect(Widget , XEvent *, String *, Cardinal *);
-
-
-
-/* The following character arrays hold the bits for
- * the source and state icons for both 32x32 and 16x16 drag icons.
- * The source is a color palatte icon and the state is a paint brush icon.
- */
-extern unsigned char SOURCE_ICON_BITS[];
-extern unsigned char SOURCE_ICON_MASK[];
-extern unsigned char STATE_ICON_BITS[];
-extern unsigned char STATE_ICON_MASK[];
-extern unsigned char INVALID_ICON_BITS[];
-extern unsigned char SMALL_SOURCE_ICON_BITS[];
-extern unsigned char SMALL_SOURCE_ICON_MASK[];
-extern unsigned char SMALL_STATE_ICON_BITS[];
-extern unsigned char SMALL_STATE_ICON_MASK[];
-extern unsigned char SMALL_INVALID_ICON_BITS[];
-
-/* The following character arrays are for use with the drop help
- * dialogs. For internationalization, message catalogs should
- * replace these static declarations.
- */
-extern char HELP_MSG1[];
-extern char HELP_MSG2[];
-extern char HELP_MSG3[];
-extern char HELP_MSG4[];
-extern char HELP_MSG5[];
-
-
-/* Globals variables */
-extern AppInfo appInfo;
-extern Widget topLevel;
-extern Widget drawingArea;
-extern Widget helpDialog;
-extern Widget helpLabel, helpMenu;
-extern XtAppContext appContext;
-
+++ /dev/null
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-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 libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/*
- * (c) Copyright 1989, 1990, 1991, 1992, 1993 OPEN SOFTWARE FOUNDATION, INC.
- * ALL RIGHTS RESERVED
-*/
-/*
- * Motif Release 1.2.2
-*/
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = "$XConsortium: DNDDraw.c /main/4 1995/10/27 10:43:57 rswiston $"
-#endif
-#endif
-/*
-* (c) Copyright 1987, 1988, 1989 HEWLETT-PACKARD COMPANY */
-/*
- * file: DNDDraw.c
- *
- * File containing all the drawing routines needed to run DNDDemo
- * program.
- *
- */
-
-#include "DNDDemo.h"
-
-
-/* The following character arrays hold the bits for
- * the source and state icons for both 32x32 and 16x16 drag icons.
- * The source is a color palette icon and the state is a paint brush icon.
- */
-unsigned char SOURCE_ICON_BITS[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0xaa, 0x02,
- 0x00, 0x50, 0x55, 0x07, 0x00, 0x28, 0x00, 0x0c, 0x00, 0x94, 0x42, 0x19,
- 0x00, 0xca, 0xe5, 0x33, 0x00, 0x85, 0xc6, 0x33, 0x80, 0x42, 0xe7, 0x33,
- 0x40, 0x81, 0xc3, 0x31, 0xa0, 0x00, 0x00, 0x38, 0x50, 0x00, 0x00, 0x1c,
- 0x28, 0x00, 0x00, 0x0e, 0x90, 0x02, 0x00, 0x07, 0xc8, 0x05, 0x80, 0x03,
- 0x90, 0x07, 0xc0, 0x01, 0x48, 0x05, 0xe0, 0x00, 0x90, 0x03, 0x70, 0x00,
- 0x08, 0x00, 0x30, 0x00, 0x10, 0x14, 0x30, 0x00, 0x08, 0x2a, 0x30, 0x00,
- 0x10, 0x34, 0x30, 0x00, 0x28, 0x2a, 0x60, 0x00, 0x50, 0x9c, 0xe2, 0x00,
- 0xa0, 0x40, 0xc4, 0x01, 0x40, 0x01, 0x84, 0x01, 0x80, 0x42, 0x84, 0x03,
- 0x00, 0x85, 0x03, 0x03, 0x00, 0x0a, 0x00, 0x03, 0x00, 0xf4, 0xff, 0x03,
- 0x00, 0xf8, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00};
-
-unsigned char SOURCE_ICON_MASK[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x07, 0x00, 0xf8, 0xff, 0x0f,
- 0x00, 0xfc, 0xff, 0x1f, 0x00, 0xfe, 0xff, 0x3f, 0x00, 0xff, 0xff, 0x7f,
- 0x80, 0xff, 0xff, 0x7f, 0xc0, 0xff, 0xff, 0x7f, 0xe0, 0xff, 0xff, 0x7f,
- 0xf0, 0xff, 0xff, 0x7f, 0xf8, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0x7f,
- 0xfc, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x1f, 0xfc, 0xff, 0xff, 0x0f,
- 0xfc, 0xff, 0xff, 0x07, 0xfc, 0xff, 0xff, 0x03, 0xfc, 0xff, 0xff, 0x01,
- 0xfc, 0xff, 0xff, 0x00, 0xfc, 0xff, 0x7f, 0x00, 0xfc, 0xff, 0x7f, 0x00,
- 0xfc, 0xff, 0xff, 0x00, 0xfc, 0xff, 0xff, 0x01, 0xfc, 0xff, 0xff, 0x03,
- 0xf8, 0xff, 0xff, 0x03, 0xf0, 0xff, 0xff, 0x07, 0xe0, 0xff, 0xff, 0x07,
- 0xc0, 0xff, 0xff, 0x07, 0x80, 0xff, 0xff, 0x07, 0x00, 0xff, 0xff, 0x07,
- 0x00, 0xfe, 0xff, 0x07, 0x00, 0xfc, 0xff, 0x03};
-
-unsigned char STATE_ICON_BITS[] = {
- 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00,
- 0xf8, 0x01, 0x00, 0x00, 0xf8, 0x01, 0x00, 0x00, 0xf8, 0x03, 0x00, 0x00,
- 0xf0, 0x03, 0x00, 0x00, 0xf0, 0x07, 0x00, 0x00, 0xc0, 0x0d, 0x00, 0x00,
- 0x00, 0x1b, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00,
- 0x00, 0xfc, 0x00, 0x00, 0x00, 0xf8, 0x01, 0x00, 0x00, 0xf0, 0x03, 0x00,
- 0x00, 0xe0, 0x07, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0x00, 0x80, 0x1f, 0x00,
- 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0xfc, 0x00,
- 0x00, 0x00, 0xf8, 0x01, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0xe0, 0x03,
- 0x00, 0x00, 0xc0, 0x07, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x00, 0x00, 0x1f,
- 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x38,
- 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xc0};
-
-unsigned char STATE_ICON_MASK[] = {
- 0x3f, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00,
- 0xfc, 0x03, 0x00, 0x00, 0xfc, 0x07, 0x00, 0x00, 0xfc, 0x07, 0x00, 0x00,
- 0xfc, 0x07, 0x00, 0x00, 0xf8, 0x07, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00,
- 0xe0, 0x1f, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00,
- 0x00, 0xfc, 0x00, 0x00, 0x00, 0xf8, 0x01, 0x00, 0x00, 0xf0, 0x03, 0x00,
- 0x00, 0xe0, 0x07, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0x00, 0x80, 0x1f, 0x00,
- 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0x00, 0xfc, 0x03,
- 0x00, 0x00, 0xf8, 0x03, 0x00, 0x00, 0xf0, 0x07, 0x00, 0x00, 0xe0, 0x0f,
- 0x00, 0x00, 0xc0, 0x1f, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x7f,
- 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0xfe,
- 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xf0};
-
-unsigned char INVALID_ICON_BITS[] = {
- 0x00, 0xe0, 0x0f, 0x00, 0x00, 0xfc, 0x7f, 0x00, 0x00, 0xff, 0xff, 0x01,
- 0x80, 0xff, 0xff, 0x03, 0xc0, 0x1f, 0xf0, 0x07, 0xe0, 0x07, 0xc0, 0x0f,
- 0xf0, 0x07, 0x00, 0x1f, 0xf8, 0x0f, 0x00, 0x3e, 0xf8, 0x1f, 0x00, 0x3c,
- 0xfc, 0x3f, 0x00, 0x7c, 0x3c, 0x7f, 0x00, 0x78, 0x3c, 0xfe, 0x00, 0x78,
- 0x1e, 0xfc, 0x01, 0xf0, 0x1e, 0xf8, 0x03, 0xf0, 0x1e, 0xf0, 0x07, 0xf0,
- 0x1e, 0xe0, 0x0f, 0xf0, 0x1e, 0xc0, 0x1f, 0xf0, 0x1e, 0x80, 0x3f, 0xf0,
- 0x1e, 0x00, 0x7f, 0xf0, 0x3c, 0x00, 0xfe, 0x78, 0x3c, 0x00, 0xfc, 0x79,
- 0x7c, 0x00, 0xf8, 0x7f, 0x78, 0x00, 0xf0, 0x3f, 0xf8, 0x00, 0xe0, 0x3f,
- 0xf0, 0x01, 0xc0, 0x1f, 0xe0, 0x07, 0xc0, 0x0f, 0xc0, 0x1f, 0xf0, 0x07,
- 0x80, 0xff, 0xff, 0x03, 0x00, 0xff, 0xff, 0x01, 0x00, 0xfc, 0x7f, 0x00,
- 0x00, 0xe0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00};
-
-unsigned char SMALL_SOURCE_ICON_BITS[] = {
- 0x80, 0x1f, 0x40, 0x60, 0x20, 0x91, 0x90, 0xaa, 0x08, 0x91, 0x08, 0x40,
- 0x08, 0x20, 0x08, 0x10, 0x28, 0x10, 0x78, 0x10, 0x28, 0x20, 0x08, 0x41,
- 0x90, 0x43, 0x20, 0x21, 0x40, 0x10, 0x80, 0x0f};
-
-unsigned char SMALL_SOURCE_ICON_MASK[] = {
- 0x80, 0x1f, 0xc0, 0x7f, 0xe0, 0xff, 0xf0, 0xff, 0xf8, 0xff, 0xf8, 0x7f,
- 0xf8, 0x3f, 0xf8, 0x1f, 0xf8, 0x1f, 0xf8, 0x1f, 0xf8, 0x3f, 0xf8, 0x7f,
- 0xf0, 0x7f, 0xe0, 0x3f, 0xc0, 0x1f, 0x80, 0x0f};
-
-unsigned char SMALL_STATE_ICON_BITS[] = {
- 0x0f, 0x00, 0x1e, 0x00, 0x1e, 0x00, 0x3c, 0x00, 0x50, 0x00, 0xe0, 0x00,
- 0xc0, 0x01, 0x80, 0x03, 0x00, 0x07, 0x00, 0x0e, 0x00, 0x1c, 0x00, 0x18,
- 0x00, 0x20, 0x00, 0x40, 0x00, 0x80, 0x00, 0x00};
-
-unsigned char SMALL_STATE_ICON_MASK[] = {
- 0x0f, 0x00, 0x1e, 0x00, 0x1e, 0x00, 0x3c, 0x00, 0x70, 0x00, 0xe0, 0x00,
- 0xc0, 0x01, 0x80, 0x03, 0x00, 0x07, 0x00, 0x0e, 0x00, 0x1c, 0x00, 0x18,
- 0x00, 0x20, 0x00, 0x40, 0x00, 0x80, 0x00, 0x00};
-
-unsigned char SMALL_INVALID_ICON_BITS[] = {
- 0xe0, 0x03, 0xf8, 0x0f, 0x1c, 0x1c, 0x1e, 0x30, 0x3e, 0x30, 0x73, 0x60,
- 0xe3, 0x60, 0xc3, 0x61, 0x83, 0x63, 0x03, 0x67, 0x06, 0x3e, 0x06, 0x3c,
- 0x1c, 0x1c, 0xf8, 0x0f, 0xe0, 0x03, 0x00, 0x00};
-
-
-/* Globals variables */
-AppInfo appInfo;
-
-
-/* This is a string to pixel conversion function. */
-Pixel
-GetColor(char *colorstr)
-{
-
- XrmValue from, to;
-
- from.size = strlen(colorstr) +1;
- if (from.size < sizeof(String))
- from.size = sizeof(String);
- from.addr = colorstr;
- to.addr = NULL;
- XtConvert(topLevel, XmRString, &from, XmRPixel, &to);
-
- if (to.addr != NULL)
- return ((Pixel) *((Pixel *) to.addr));
- else
- return ( (XtArgVal) NULL);
-
-}
-
-
-/* This procedure is used to initalize the application information structure */
-void
-InitializeAppInfo(void)
-{
-
- if (!appInfo) {
-
- appInfo = (AppInfo) XtMalloc(sizeof(AppInfoRec));
- appInfo->rectGC = NULL;
- appInfo->currentColor = 0;
- appInfo->rectDpyTable = NULL;
- appInfo->rectsAllocd = 0;
- appInfo->numRects = 0;
- appInfo->highlightRect = NULL;
- appInfo->clearRect = NULL;
- appInfo->doMove = True;
- appInfo->creatingRect = True;
- appInfo->operation = XmDROP_MOVE;
- appInfo->maxCursorWidth = 64;
- appInfo->maxCursorHeight = 64;
- appInfo->rectX = 0;
- appInfo->rectY = 0;
- appInfo->rectX2 = 0;
- appInfo->rectY2 = 0;
-
- }
-
-}
-
-
-/* This procedure sets the color in the GC for drawing the rectangles
- * in a new color.
- */
-void
-SetColor(Display *display, Pixel color)
-{
-
- /*
- * if the GC already has a foreground of this color,
- * it would be wasteful to reset the color
- */
- if (color != appInfo->currentColor) {
- XSetForeground(display, appInfo->rectGC, (unsigned long) color);
- appInfo->currentColor = color;
- }
-
-}
-
-
-/* This function draws the rectangle in the color provided */
-static int
-RectDraw(Display *display, Window window, RectPtr rect)
-{
-
- SetColor(display, rect->color);
- XFillRectangle(display, window, appInfo->rectGC, rect->x,
- rect->y, rect->width, rect->height);
-
-}
-
-
-/* This procedure draws the rectangle highlight in a specified color*/
-static void
-RectDrawHighlight( Widget w, RectPtr rect, Pixel color )
-{
-
- Display *display = XtDisplay(w);
- Window window = XtWindow(w);
- Pixel currentColor = rect->color;
- XGCValues values;
-
- values.foreground = color;
- XChangeGC(display, appInfo->rectGC, GCForeground, &values);
-
- XDrawRectangle(display, window, appInfo->rectGC,
- rect->x + 1, rect->y + 1,
- rect->width - HIGHLIGHT_THICKNESS,
- rect->height - HIGHLIGHT_THICKNESS);
-
- /* Return the GC to it's previous state */
- values.foreground = appInfo->currentColor = currentColor;
- XChangeGC(display, appInfo->rectGC, GCForeground, &values);
-
-}
-
-
-/* This procedure handles redrawing the rectangles. It draws
- * them according to the order in the rectangle display table.
- * The rectangles at the top of the table are drawn first.
- */
-void
-RedrawRectangles(Widget w)
-{
-
- Display *display = XtDisplay(w);
- RectPtr rect;
- Window window = XtWindow(w);
- int i;
-
- for (i = 0; i < appInfo->numRects; i++) {
-
- rect = appInfo->rectDpyTable[i];
- /* Only draw the rectangles that haven't been cleared */
- if (rect != appInfo->clearRect) {
- RectDraw(display, window, rect);
- }
- /* Draw the rectangle highlight of the highlight rectangle */
- if (rect == appInfo->highlightRect) {
- RectDrawHighlight(w, rect, GetColor(HIGHLIGHT_COLOR));
- }
-
- }
-
-}
-
-
-/* This procedure will clear the current rectangle and redraw any rectangles
- * that were partially cleared by the rectangle that was deleted.
- */
-/* ARGSUSED */
-void
-RectHide(Display *display, Window window, RectPtr rect)
-{
-
- Pixel background, oldColor;
- Arg args[1];
-
- /* Get the background of the drawing area. */
- XtSetArg(args[0], XmNbackground, &background);
- XtGetValues(drawingArea, args, 1);
-
- /* Save the old color for restoration purposes. */
- oldColor = rect->color;
-
- /* Clear the rectangle */
- rect->color = background;
- RectDraw(display, window, rect);
- appInfo->clearRect = rect;
-
- /* redraw the rest of the rectangles */
- RedrawRectangles(drawingArea);
-
- /* restore the rectangle color */
- rect->color = oldColor;
-
-}
-
-/* This procedure draws the stipple rectangle that is used in marking
- * the old rectangle position during a rectangle move operation.
- */
-/* ARGSUSED */
-void
-RectDrawStippled(Display *display, Window window, RectPtr rect)
-{
-
- register int x = rect->x;
- register int y = rect->y;
- register Dimension width = rect->width;
- register Dimension height = rect->height;
- XGCValues values;
- XSegment segments[4];
-
- /* Set the rectangle color */
- values.foreground = appInfo->currentColor = rect->color;
- XChangeGC(display, appInfo->rectGC, GCForeground , &values);
-
- /* Create the segments for drawing the stippled rectangle */
- segments[0].x1 = segments[2].x1 = x;
- segments[0].y1 = segments[0].y2 = y;
- segments[0].x2 = x + width - 1;
- segments[1].x1 = segments[1].x2 = x + width - 1;
- segments[1].y1 = segments[3].y1 = y;
- segments[3].y2 = y + height;
- segments[2].y1 = segments[2].y2 = y + height - 1;
- segments[3].x1 = segments[3].x2 = x;
- segments[2].x2 = x + width;
- segments[1].y2 = y + height;
-
- /* Set the line attributes and draw */
- XSetLineAttributes(display, appInfo->rectGC, 1, LineOnOffDash,
- CapButt, JoinMiter);
- XDrawSegments (display, window, appInfo->rectGC, segments, 4);
-
- /* restore the default line settings */
- values.line_width = HIGHLIGHT_THICKNESS;
- values.line_style = LineSolid;
- XChangeGC(display, appInfo->rectGC, GCLineWidth | GCLineStyle, &values);
-
-}
-
-
-/* This procedure sets the highlight rectangle and
- * redraws the rectangles. The expose routine will draw
- * the highlight around the highlighted rectangle.
- */
-/* ARGSUSED */
-void
-RectHighlight(Widget w, RectPtr rect)
-{
-
- if (appInfo->highlightRect != rect) {
- appInfo->highlightRect = rect;
- RedrawRectangles(w);
- }
-
-}
-
-/* This procedure sets the highlight rectangle to NULL and
- * redraws the rectangles. The expose routine will clear
- * the highlight around the highlighted rectangle.
- */
-/* ARGSUSED */
-void
-RectUnhighlight(Widget w)
-{
-
- if (appInfo->highlightRect) {
- appInfo->highlightRect = NULL;
- RedrawRectangles(w);
- }
-
-}
-
-/* This function creates and initialized a new rectangle */
-RectPtr
-RectCreate(Position x, Position y, Dimension width,
-Dimension height, Pixel color, Pixmap pixmap)
-{
-
- RectPtr rect;
-
- rect = (RectPtr) XtMalloc(sizeof(RectStruct));
-
- rect->x = x;
- rect->y = y;
- rect->width = width;
- rect->height = height;
- rect->color = color;
- rect->pixmap = pixmap;
-
- return(rect);
-
-}
-
-
-/* This procedure will move the rectangle to the end of the rectangle
- * display table (effectively raising it to top of the displayed
- * rectangles).
- */
-static void
-RectToTop(RectPtr rect)
-{
-
- int i, j;
-
-
- if (rect) {
-
- /* Get the index to the target rectangle */
- for (i = 0; i < appInfo->numRects; i++) {
- if (appInfo->rectDpyTable[i] == rect)
- break;
- }
-
- /* Shift the other rectangles downward */
- for (j = i; j < appInfo->numRects - 1; j++)
- appInfo->rectDpyTable[j] = appInfo->rectDpyTable[j + 1];
-
- /* Place the target rectangle at the end */
- appInfo->rectDpyTable[j] = rect;
-
- }
-
-}
-
-
-/* This procedure raises the rectangle to the top of the drawing area */
-/* ARGSUSED */
-static void
-RectRaise(Widget w, RectPtr rect)
-{
-
- RectToTop(rect);
- RedrawRectangles(w);
-
-}
-
-
-/* This procedure moves the rectangle the the end of the display stack,
- * decrements the number of rectangles, and then frees the rectangle.
- */
-void
-RectFree(RectPtr rect)
-{
-
- /* if the rectangle is registered */
- if (rect) {
-
- RectToTop(rect);
- appInfo->numRects--;
- XtFree((char *)rect);
-
- }
-
-}
-
-
-/* This procedure added the rectangle to the rectangle display table
- * (reallocing the table if necessary).
- */
-void
-RectRegister(RectPtr rect, Position x, Position y)
-{
-
- appInfo->numRects++;
-
- /* rectangles can have their x and y values reset at registration time */
- rect->x = x;
- rect->y = y;
-
- /* realloc the table if it is too small */
- if (appInfo->numRects > appInfo->rectsAllocd) {
-
- /* grow geometrically */
- appInfo->rectsAllocd *= 2;
- appInfo->rectDpyTable = (RectPtr *)
- XtRealloc((char *) appInfo->rectDpyTable,
- (unsigned) (sizeof(RectPtr) *
- appInfo->rectsAllocd));
-
- }
-
- /* Add to end of display table */
- appInfo->rectDpyTable[appInfo->numRects - 1] = rect;
-
-}
-
-
-/* This function find the top most rectangle at the given x,y position */
-RectPtr
-RectFind(Position x, Position y)
-{
-
- RectPtr rect;
- int i;
-
- /*
- * Search from the end of the rectangle display table
- * to find the top most rectangle.
- */
- for (i = appInfo->numRects - 1; i >= 0; i--) {
-
- rect = appInfo->rectDpyTable[i];
- if (rect->x <= x && rect->x + (int)rect->width >= x &&
- rect->y <= y && rect->y + (int)rect->height >= y) {
- return(rect);
- }
-
- }
-
- /* If a rectangle is not found return NULL */
- return(NULL);
-
-}
-
-
-/* This procedure sets the retangle's color */
-void
-RectSetColor(RectPtr rect, Display *display, Window window, Pixel color)
-{
-
- rect->color = color;
- RectDraw(display, window, rect);
-
-}
-
-
-/* This function gets the retangle's color */
-Pixel
-RectGetColor(RectPtr rect)
-{
- return(rect->color);
-}
-
-
-/* This procedure sets the retangle's pixmap. The pixmap portion of the
- * rectangle is not currently being used.
- */
-/* ARGSUSED */
-void
-RectSetPixmap(RectPtr rect, Display *display, Window window, Pixmap pixmap)
-{
-
- rect->pixmap = pixmap; /* not currently being looked at */
- RectDraw(display, window, rect);
-
-}
-
-
-/* This function gets the retangle's pixmap. The pixmap portion of the
- * rectangle is not currently being used.
- */
-/* ARGSUSED */
-static Pixmap
-RectGetPixmap(RectPtr rect)
-{
- return (rect->pixmap);
-}
-
-
-/* This procedure gets the retangle's height and width. */
-/* ARGSUSED */
-static void
-RectGetDimensions(RectPtr rect, Dimension *width, Dimension *height)
-{
-
- *width = rect->width;
- *height = rect->height;
-
-}
-
-
-/* This function creates the rectangle bitmaps for the icon. */
-Pixmap
-GetBitmapFromRect(Widget w, RectPtr rect, Pixel background, Pixel foreground,
-Dimension *widthRtn, Dimension *heightRtn)
-{
-
- Dimension width, height, maxHeight, maxWidth;
- GC fillGC;
- Pixmap icon_pixmap;
- Display *display = XtDisplay(w);
- XGCValues values;
-
- RectGetDimensions(rect, &width, &height);
-
- /* Get the maximum allowable width and height allowed by the cursor */
- maxWidth = appInfo->maxCursorWidth;
- maxHeight = appInfo->maxCursorHeight;
-
- /* if the dimensions aren't within the allowable dimensions resize
- * then proportionally
- */
- if (maxWidth < width || maxHeight < height) {
-
- if (width > height) {
- height = (Dimension)(height * maxWidth) / (Dimension)width;
- width = appInfo->maxCursorWidth;
- } else {
- width = (Dimension)(width * maxHeight) / (Dimension)height;
- height = appInfo->maxCursorHeight;
- }
-
- }
-
- /* Create a depth 1 pixmap (bitmap) for use with the drag icon */
- icon_pixmap = XCreatePixmap(display, XtWindow(w), width, height, 1);
-
- /* create a GC for drawing into the bitmap */
- fillGC = XCreateGC(display, icon_pixmap, 0, (XGCValues *)NULL);
-
- /* fill the bitmap with 0's as a starting point */
- XFillRectangle(display, icon_pixmap, fillGC, 0, 0, width, height);
-
- /* Change GC to be able to create the rectangle with 1's on the bitmap */
- values.foreground = 1;
- XChangeGC(display, fillGC, GCForeground, &values);
-
- /*
- * This draw a filled rectangle. If only a outline is desired
- * use the XDrawRectangle() call. Note: the outline does not
- * produce very effect icon melting.
- */
- XFillRectangle(display, icon_pixmap, fillGC, 0, 0, width, height);
-
- /* Free the fill GC */
- XFreeGC(display, fillGC);
-
- *widthRtn = width;
- *heightRtn = height;
-
- return(icon_pixmap);
-
-}
-
-
-/***************************************************************************
- ***************************************************************************
- Functions used in Drawing Outlines:
- ***************************************************************************
- ***************************************************************************/
-
-/*
- * This procedure changes the GC to do rubberband
- * drawing of a rectangle frame .
- */
-static void
-SetXorGC(Widget w)
-{
-
- unsigned long valueMask = GCFunction | GCForeground | GCLineWidth;
- XGCValues values;
- Pixel bg, fg;
-
-
- XtVaGetValues (w, XmNbackground, &bg, XmNforeground, &fg, NULL);
-
- values.function = GXxor;
- values.foreground = fg^bg; /* fix 5127 */
- values.line_width = 1;
- XChangeGC(XtDisplay(w), appInfo->rectGC, valueMask, &values);
-
-}
-
-
-/* This procedure returns the GC to it's initial state. */
-static void
-SetNormGC(Widget w)
-{
-
- unsigned long valueMask = GCFunction | GCLineWidth | GCForeground;
- XGCValues values;
-
- values.function = GXcopy;
- values.foreground = appInfo->currentColor;
- values.line_width = HIGHLIGHT_THICKNESS;
- XChangeGC(XtDisplay(w), appInfo->rectGC, valueMask, &values);
-
-}
-
-
-/* This procedure returns the values of the current rectangle outline */
-static void
-OutlineGetDimensions(Position *x, Position *y, Dimension *width,
-Dimension *height)
-{
-
- if (appInfo->rectX < appInfo->rectX2) {
- *x = appInfo->rectX;
- *width = appInfo->rectX2 - *x;
- } else {
- *x = appInfo->rectX2;
- *width = appInfo->rectX - *x;
- }
-
- if (appInfo->rectY < appInfo->rectY2) {
- *y = appInfo->rectY;
- *height = appInfo->rectY2 - *y;
- } else {
- *y = appInfo->rectY2;
- *height = appInfo->rectY - *y;
- }
-
-}
-
-
-static void
-OutlineDraw(Widget w)
-{
-
- Position x, y;
- Dimension width, height;
-
- OutlineGetDimensions(&x, &y, &width, &height);
-
- XDrawRectangle(XtDisplay(w), XtWindow(w), appInfo->rectGC,
- x, y, width, height);
-
-}
-
-
-/* This procedure sets intializes the drawing positions */
-static void
-OutlineSetPosition(Position x, Position y)
-{
-
- appInfo->rectX = appInfo->rectX2 = x;
- appInfo->rectY = appInfo->rectY2 = y;
-
-}
-
-
-/* This procedure resets outline end position */
-static void
-OutlineResetPosition(Position x, Position y)
-{
-
- appInfo->rectX2 = x;
- appInfo->rectY2 = y;
-
-}
-
-
-/* This action procedure begins creating a rectangle at the x,y position
- * of the button event if a rectangle doesn't already exist at
- * that position. Otherwise is raises the rectangle to the top
- * of the drawing area.
- */
-/* ARGSUSED */
-void
-StartRect(Widget w, XEvent *event, String *params, Cardinal *num_params)
-{
-
- Display *display = XtDisplay(w);
- RectPtr rect;
- Position x = event->xbutton.x;
- Position y = event->xbutton.y;
-
- rect = RectFind(x, y);
-
- /* if there isn't a rectangle at this position, begin creating one */
- if (!rect) {
-
- appInfo->creatingRect = True;
- /* set gc for drawing rubberband outline for rectangles */
- SetXorGC(w);
- /* set the initial outline positions */
- OutlineSetPosition(x, y);
- /* Draw the rectangle */
- OutlineDraw(w);
-
- }
- else
- RectRaise(w, rect);
-
-}
-
-
-/* This action procedure extends the drawing of the outline
- * for the rectangle to be created.
- */
-/* ARGSUSED */
-void
-ExtendRect(Widget w, XEvent *event, String *params, Cardinal *num_params)
-{
-
- if (appInfo->creatingRect) {
-
- /* erase the old outline */
- OutlineDraw(w);
- /* set the new outline end positions */
- OutlineResetPosition(event->xbutton.x, event->xbutton.y);
- /* redraw the outline */
- OutlineDraw(w);
-
- }
-
-}
-
-
-/* This action procedure creates a rectangle depending on the
- * dimensions set in the StartRect and ExtendRect action procs.
- */
-/* ARGSUSED */
-void
-EndRect(Widget w, XEvent *event, String *params, Cardinal *num_params)
-{
-
- Position x, y;
- Dimension width, height;
- RectPtr rect;
-
-
- if (appInfo->creatingRect) {
-
- /* erase the last outline */
- OutlineDraw(w);
- /* return GC to original state */
- SetNormGC(w);
-
- /* Get the outline dimensions for creating the rectangle */
- OutlineGetDimensions(&x, &y, &width, &height);
-
- /* we don't want to create zero width or height rectangles */
- if (width == 0 || height == 0){
- appInfo->creatingRect = False;
- return;
- }
-
- rect = RectCreate(x, y, width, height,
- GetColor(RECT_START_COLOR), XmUNSPECIFIED_PIXMAP);
-
- RectDraw(XtDisplay(w), XtWindow(w), rect);
- RectRegister(rect, x, y);
- appInfo->creatingRect = False;
-
- }
-
-}
-
-
-/* The procedure assigns new translations the the given widget */
-static void
-SetupTranslations(Widget widget, char *new_translations)
-{
-
- XtTranslations new_table;
-
- new_table = XtParseTranslationTable(new_translations);
- XtOverrideTranslations(widget, new_table);
-
-}
-
-
-/* This procedure handles exposure events and makes a call to
- * RedrawRectangles() to redraw the rectangles
- * The rectangles at the top of the table are drawn first.
- */
-/* ARGSUSED */
-static void
-HandleExpose(Widget w, XtPointer closure, XtPointer call_data)
-{
- RedrawRectangles(w);
-}
-
-
-/* This procedure sets up the drawing area */
-static void
-CreateDrawingArea(Widget parent)
-{
-
- static char da_translations[] =
- "#replace <Btn2Down>: StartMove() \n\
- <Btn1Down>: StartRect() \n\
- <Btn1Motion>: ExtendRect() \n\
- <Btn1Up>: EndRect() \n\
- c <Key>t: XtDisplayTranslations()";
-
- Arg args[10];
- int n = 0;
- XtTranslations new_table;
-
- new_table = XtParseTranslationTable(da_translations);
-
- /* create drawing area at the top of the form */
- n = 0;
- XtSetArg(args[n], XmNtranslations, new_table); n++;
- XtSetArg(args[n], XmNtopAttachment, XmATTACH_FORM); n++;
- XtSetArg(args[n], XmNleftAttachment, XmATTACH_FORM); n++;
- XtSetArg(args[n], XmNrightAttachment, XmATTACH_FORM); n++;
- XtSetArg(args[n], XmNwidth, 295); n++;
- XtSetArg(args[n], XmNheight, 180); n++;
- XtSetArg(args[n], XmNresizePolicy, XmRESIZE_NONE); n++;
- XtSetArg(args[n], XmNbackground, GetColor(DRAW_AREA_BG_COLOR)); n++;
- XtSetArg(args[n], XmNforeground, GetColor(DRAW_AREA_FG_COLOR)); n++;
- drawingArea = XmCreateDrawingArea(parent, "drawingArea", args, n);
- XtManageChild(drawingArea);
-
- /* add expose callback to redisplay rectangles */
- XtAddCallback(drawingArea, XmNexposeCallback, HandleExpose,
- (XtPointer) NULL);
-
-}
-
-
-/* This procedure sets up the area for obtaining rectangle colors */
-static void
-CreateColorPushButtons(Widget parent, Widget separator)
-{
-
- static char label_translations[] = "<Btn2Down>: ColorRect()";
- Widget bulletinBoard;
- Widget children[6];
- XmString csString;
- Arg args[10];
- int n = 0;
-
- /* Creating an empty compound string so the labels will have no text. */
- csString = XmStringCreateSimple("");
-
- /* Creating 6 color labels */
- n = 0;
- XtSetArg(args[n], XmNtopAttachment, XmATTACH_WIDGET); n++;
- XtSetArg(args[n], XmNtopWidget, separator); n++;
- XtSetArg(args[n], XmNtopOffset, 2); n++;
- XtSetArg(args[n], XmNleftAttachment, XmATTACH_FORM); n++;
- XtSetArg(args[n], XmNrightAttachment, XmATTACH_FORM); n++;
- XtSetArg(args[n], XmNwidth, 295); n++;
- bulletinBoard = XmCreateBulletinBoard(parent, "buletinBoard", args, n);
- XtManageChild(bulletinBoard);
-
- n = 0;
- XtSetArg(args[n], XmNx, BOX_X_MARGIN); n++;
- XtSetArg(args[n], XmNy, BOX_Y_MARGIN); n++;
- XtSetArg(args[n], XmNwidth, BOX_WIDTH); n++;
- XtSetArg(args[n], XmNheight, BOX_HEIGHT); n++;
- XtSetArg(args[n], XmNlabelString, csString); n++;
- XtSetArg(args[n], XmNbackground, GetColor(LABEL1_COLOR)); n++;
- XtSetArg(args[n], XmNborderWidth, 1); n++;
- children[0] = XmCreatePushButton(bulletinBoard, "PushButton1", args, n);
-
- /* add translations for manipulating rectangles */
- SetupTranslations(children[0], label_translations);
-
- n = 0;
- XtSetArg(args[n], XmNx, BOX_X_MARGIN + BOX_X_OFFSET); n++;
- XtSetArg(args[n], XmNy, BOX_Y_MARGIN); n++;
- XtSetArg(args[n], XmNwidth, BOX_WIDTH); n++;
- XtSetArg(args[n], XmNheight, BOX_HEIGHT); n++;
- XtSetArg(args[n], XmNlabelString, csString); n++;
- XtSetArg(args[n], XmNbackground, GetColor(LABEL2_COLOR)); n++;
- XtSetArg(args[n], XmNborderWidth, 1); n++;
- children[1] = XmCreatePushButton(bulletinBoard, "PushButton1", args, n);
-
- /* add translations for manipulating rectangles */
- SetupTranslations(children[1], label_translations);
-
- n = 0;
- XtSetArg(args[n], XmNx, BOX_X_MARGIN + (2 * BOX_X_OFFSET)); n++;
- XtSetArg(args[n], XmNy, BOX_Y_MARGIN); n++;
- XtSetArg(args[n], XmNwidth, BOX_WIDTH); n++;
- XtSetArg(args[n], XmNheight, BOX_HEIGHT); n++;
- XtSetArg(args[n], XmNlabelString, csString); n++;
- XtSetArg(args[n], XmNbackground, GetColor(LABEL3_COLOR)); n++;
- XtSetArg(args[n], XmNborderWidth, 1); n++;
- children[2] = XmCreatePushButton(bulletinBoard, "PushButton3", args, n);
-
- /* add translations for manipulating rectangles */
- SetupTranslations(children[2], label_translations);
-
- n = 0;
- XtSetArg(args[n], XmNx, BOX_X_MARGIN); n++;
- XtSetArg(args[n], XmNy, BOX_Y_MARGIN + BOX_Y_OFFSET); n++;
- XtSetArg(args[n], XmNwidth, BOX_WIDTH); n++;
- XtSetArg(args[n], XmNheight, BOX_HEIGHT); n++;
- XtSetArg(args[n], XmNlabelString, csString); n++;
- XtSetArg(args[n], XmNbackground, GetColor(LABEL4_COLOR)); n++;
- XtSetArg(args[n], XmNborderWidth, 1); n++;
- children[3] = XmCreatePushButton(bulletinBoard, "PushButton4", args, n);
-
- /* add translations for manipulating rectangles */
- SetupTranslations(children[3], label_translations);
-
- n = 0;
- XtSetArg(args[n], XmNx, BOX_X_MARGIN + BOX_X_OFFSET); n++;
- XtSetArg(args[n], XmNy, BOX_Y_MARGIN + BOX_Y_OFFSET); n++;
- XtSetArg(args[n], XmNwidth, BOX_WIDTH); n++;
- XtSetArg(args[n], XmNheight, BOX_HEIGHT); n++;
- XtSetArg(args[n], XmNtopWidget, children[0]); n++;
- XtSetArg(args[n], XmNlabelString, csString); n++;
- XtSetArg(args[n], XmNbackground, GetColor(LABEL5_COLOR)); n++;
- XtSetArg(args[n], XmNborderWidth, 1); n++;
- children[4] = XmCreatePushButton(bulletinBoard, "PushButton5", args, n);
-
- /* add translations for manipulating rectangles */
- SetupTranslations(children[4], label_translations);
-
- n = 0;
- XtSetArg(args[n], XmNx, BOX_X_MARGIN + (2 * BOX_X_OFFSET)); n++;
- XtSetArg(args[n], XmNy, BOX_Y_MARGIN + BOX_Y_OFFSET); n++;
- XtSetArg(args[n], XmNwidth, BOX_WIDTH); n++;
- XtSetArg(args[n], XmNheight, BOX_HEIGHT); n++;
- XtSetArg(args[n], XmNlabelString, csString); n++;
- XtSetArg(args[n], XmNbackground, GetColor(LABEL6_COLOR)); n++;
- XtSetArg(args[n], XmNborderWidth, 1); n++;
- children[5] = XmCreatePushButton(bulletinBoard, "PushButton6", args, n);
-
- /* add translations for manipulating rectangles */
- SetupTranslations(children[5], label_translations);
-
- /* Managing the children all at once helps performance */
- XtManageChildren(children, 6);
-
- /* Freeing compound string. It is no longer necessary. */
- XmStringFree(csString);
-
-}
-
-
-/* This procedure initalizes the rectangle display table */
-void
-InitializeRectDpyTable(void)
-{
- /*
- * Initialize display table. This is used to maintain the
- * order in which the rectangles are displayed
- */
- appInfo->rectDpyTable = (RectPtr *) XtMalloc((unsigned)sizeof(RectPtr));
-
- /* Initialize rectangle counter. This is used in reallocing the tables */
- appInfo->rectsAllocd = 1;
-
-}
-
-
-/* This procedure creates the components to be displayed */
-void
-CreateLayout(void)
-{
-
- Widget mainWindow, form, separator;
- Arg args[10];
- int n = 0;
-
- /* Create main window */
- mainWindow = XmCreateMainWindow(topLevel, "mainWindow", args, n);
- XtManageChild(mainWindow);
-
- /* Create form for hold drawing area, separator, and color labels */
- n = 0;
- XtSetArg(args[n], XmNwidth, 300); n++;
- form = XmCreateForm(mainWindow, "form", args, n);
- XtManageChild(form);
-
- /* Create area for drawing rectangles */
- CreateDrawingArea(form);
-
- /* Create separator to separate drawing area from color labels */
- n = 0;
- XtSetArg(args[n], XmNtopAttachment, XmATTACH_WIDGET); n++;
- XtSetArg(args[n], XmNtopWidget, drawingArea); n++;
- XtSetArg(args[n], XmNtopOffset, 5); n++;
- XtSetArg(args[n], XmNleftAttachment, XmATTACH_FORM); n++;
- XtSetArg(args[n], XmNrightAttachment, XmATTACH_FORM); n++;
- XtSetArg(args[n], XmNwidth, 300); n++;
- separator = XmCreateSeparatorGadget(form, "separator", args, n);
- XtManageChild(separator);
-
- /* Create color labels for changing colors of buttons */
- CreateColorPushButtons(form, separator);
-
- /* Make form the work window of the main window */
- n = 0;
- XtSetArg(args[n], XmNworkWindow, form); n++;
- XtSetValues(mainWindow, args, n);
-
-}
-
-
-/* This procedure initializes the GC for drawing rectangles */
-void
-CreateRectGC(void)
-{
-
- XGCValues values;
-
- values.line_style = LineSolid;
- values.line_width = HIGHLIGHT_THICKNESS;
- values.foreground = appInfo->currentColor = GetColor(RECT_START_COLOR);
- appInfo->rectGC = XCreateGC(XtDisplay(topLevel), XtWindow(drawingArea),
- GCLineStyle | GCLineWidth | GCForeground, &values);
-
-}
+++ /dev/null
-# $XConsortium: Makefile.hp /main/2 1996/05/13 11:58:02 drk $
-##########################################################################
-#
-# Makefile for motif drag and drop examples (HP)
-#
-# (c) Copyright 1993, 1994 Hewlett-Packard Company
-# (c) Copyright 1993, 1994 International Business Machines Corp.
-# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
-# (c) Copyright 1993, 1994 Novell, Inc.
-#
-##########################################################################
-
-CC = cc
-RM = rm -f
-
-PROGRAM = DNDDemo
-SOURCES = DNDDemo.c DNDDraw.c
-OBJECTS = DNDDemo.o DNDDraw.o
-
-DEFINES =
-CDEBUGFLAGS = -O
-CFLAGS = -Aa -z $(DEFINES) $(CDEBUGFLAGS)
-
-DTINCLUDE = -I/usr/dt/include
-X11INCLUDE = -I/usr/include/X11R5
-
-INCLUDES = $(DTINCLUDE) $(X11INCLUDE)
-
-DTLIBS = -L/usr/dt/lib -lDtWidget -lXm
-X11LIBS = -L/usr/lib/X11R5 -lXt -lX11
-SYSLIBS =
-
-LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS)
-LDFLAGS =
-
-.c.o:
- ${CC} -c $(CFLAGS) $(INCLUDES) $<
-
-all:: $(PROGRAM)
-
-$(PROGRAM):: $(OBJECTS)
- ${CC} -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
-
-clean::
- ${RM} $(PROGRAM) $(OBJECTS)
+++ /dev/null
-# $XConsortium: Makefile.ibm /main/2 1996/05/13 11:58:19 drk $
-##########################################################################
-#
-# Makefile for motif drag and drop examples (IBM)
-#
-# (c) Copyright 1993, 1994 Hewlett-Packard Company
-# (c) Copyright 1993, 1994 International Business Machines Corp.
-# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
-# (c) Copyright 1993, 1994 Novell, Inc.
-#
-##########################################################################
-
-CC = cc
-RM = rm -f
-
-PROGRAM = DNDDemo
-SOURCES = DNDDemo.c DNDDraw.c
-OBJECTS = DNDDemo.o DNDDraw.o
-
-DEFINES =
-CDEBUGFLAGS = -O
-CFLAGS = $(DEFINES) $(CDEBUGFLAGS)
-
-DTINCLUDE = -I/usr/dt/include
-X11INCLUDE = -I/usr/include
-
-INCLUDES = $(DTINCLUDE) $(X11INCLUDE)
-
-DTLIBS = -L/usr/dt/lib -lDtWidget -lXm
-X11LIBS = -L/usr/lib -lXt -lX11
-SYSLIBS =
-
-LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS)
-LDFLAGS =
-
-.c.o:
- $(CC) -c $(CFLAGS) $(INCLUDES) $<
-
-all:: $(PROGRAM)
-
-$(PROGRAM):: $(OBJECTS)
- $(CC) -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
-
-clean::
- $(RM) $(PROGRAM) $(OBJECTS)
+++ /dev/null
-# $XConsortium: Makefile.novell /main/2 1996/05/13 11:58:35 drk $
-##########################################################################
-#
-# Makefile for motif drag and drop examples (Novell)
-#
-# (c) Copyright 1993, 1994 Hewlett-Packard Company
-# (c) Copyright 1993, 1994 International Business Machines Corp.
-# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
-# (c) Copyright 1993, 1994 Novell, Inc.
-#
-##########################################################################
-
-CC = cc
-RM = rm -f
-
-PROGRAM = DNDDemo
-SOURCES = DNDDemo.c DNDDraw.c
-OBJECTS = DNDDemo.o DNDDraw.o
-
-DEFINES =
-CDEBUGFLAGS = -O
-CFLAGS = -Xc $(DEFINES) $(CDEBUGFLAGS)
-
-DTINCLUDE = -I/usr/dt/include
-X11INCLUDE = -I/usr/X/include
-
-INCLUDES = $(DTINCLUDE) $(X11INCLUDE)
-
-DTLIBS = -L/usr/dt/lib -lDtWidget -lXm
-X11LIBS = -L/usr/X/lib -lXt -lX11
-SYSLIBS = -lw -lgen -lnsl -lresolv -lsocket -lXIM
-
-LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS)
-LDFLAGS =
-
-.c.o:
- $(CC) -c $(CFLAGS) $(INCLUDES) $<
-
-all:: $(PROGRAM)
-
-$(PROGRAM):: $(OBJECTS)
- $(CC) -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
-
-clean::
- $(RM) $(PROGRAM) $(OBJECTS)
+++ /dev/null
-# $XConsortium: Makefile.sun /main/2 1996/05/13 11:58:52 drk $
-##########################################################################
-#
-# Makefile for motif drag and drop examples (SUN)
-#
-# (c) Copyright 1993, 1994 Hewlett-Packard Company
-# (c) Copyright 1993, 1994 International Business Machines Corp.
-# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
-# (c) Copyright 1993, 1994 Novell, Inc.
-#
-##########################################################################
-
-CC = cc
-RM = rm -f
-
-PROGRAM = DNDDemo
-SOURCES = DNDDemo.c DNDDraw.c
-OBJECTS = DNDDemo.o DNDDraw.o
-
-DEFINES =
-CDEBUGFLAGS = -O
-CFLAGS = $(DEFINES) $(CDEBUGFLAGS)
-
-DTINCLUDE = -I/usr/dt/include
-X11INCLUDE = -I/usr/openwin/include
-
-INCLUDES = $(DTINCLUDE) $(X11INCLUDE)
-
-DTLIBS = -L/usr/dt/lib -lDtWidget -lXm
-X11LIBS = -L/usr/openwin/lib -lXt -lX11
-SYSLIBS = -ldl -lw -lgen
-
-LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS)
-LDFLAGS = -R/usr/dt/lib:/usr/openwin/lib
-
-.c.o:
- $(CC) -c $(CFLAGS) $(INCLUDES) $<
-
-all:: $(PROGRAM)
-
-$(PROGRAM):: $(OBJECTS)
- $(CC) -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
-
-clean::
- $(RM) $(PROGRAM) $(OBJECTS)
+++ /dev/null
-# $XConsortium: Makefile.uxp /main/2 1996/05/13 11:59:16 drk $
-##########################################################################
-#
-# Makefile for motif drag and drop examples (UXP)
-#
-# (Fujitsu.patch applied)
-#
-# (c) Copyright 1993, 1994 Hewlett-Packard Company
-# (c) Copyright 1993, 1994 International Business Machines Corp.
-# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
-# (c) Copyright 1993, 1994 Novell, Inc.
-#
-##########################################################################
-
-CC = cc
-RM = rm -f
-
-PROGRAM = DNDDemo
-SOURCES = DNDDemo.c DNDDraw.c
-OBJECTS = DNDDemo.o DNDDraw.o
-
-DEFINES =
-CDEBUGFLAGS = -O
-CFLAGS = -Xc $(DEFINES) $(CDEBUGFLAGS)
-
-DTINCLUDE = -I/usr/dt/include
-
-INCLUDES = $(DTINCLUDE)
-
-DTLIBS = -L/usr/dt/lib -lDtWidget -lDtSvc -ltt -lXm
-X11LIBS = -lXt -lX11
-SYSLIBS = -lw -lgen -lnsl -lresolv -lsocket
-
-LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS)
-LDFLAGS =
-
-.c.o:
- $(CC) -c $(CFLAGS) $(INCLUDES) $<
-
-all:: $(PROGRAM)
-
-$(PROGRAM):: $(OBJECTS)
- $(CC) -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
-
-clean::
- $(RM) $(PROGRAM) $(OBJECTS)
+++ /dev/null
-/* $XConsortium: README /main/2 1996/07/15 14:04:42 drk $ */
-
- This directory contains an example illustrating a typical use of
- the Motif DragAndDrop feature.
-
- When the demo comes up, it does not have any valid drop sites. It
- comes up with different color rectangles which act as drag sources
- for dragging the colors around. You can create the drop sites as
- follows:
- Move the pointer into the drawing area (with white background).
- Press MouseBtn1 and drag. You will see the rubberbanding effect.
- Release MouseBtn1 after dragging some distance. A rectangle
- will appear with one of its corners corresponding to the point
- of MouseBtn1 press, and the diagonally opposite corner
- corresponding to the point of MouseBtn1 release. The rectangle
- comes up filled with black by default. You can create any number
- of rectangles like this.
-
- To initiate a drag, you move the pointer over to the drag source,
- press BTransfer (which is MouseBtn2 by default), and start dragging.
- Immediately, you will notice that the cursor changes to a painter's
- palette in the same color as the color rectangle from which the
- drag is initiated.
-
- The rectanlges inside the drawing area that you created will act
- as valid drop sites for colors. You can test this by, for example,
- initiating the drag from the yellow color rectangle, dragging over
- to one of the rectangles inside the drawing area, and releasing
- BTransfer.
-
- While you are dragging, you will notice several things.
- When you are dragging over root window, the dragicon consists of
- only the painter's palette. When you drag over parts of the
- drawing area where there are no rectangles, you will notice that
- the dragicon changes to include a "DO NOT ENTER!" sign on top of
- the painter's palette; when you are dragging over any of the
- rectangles inside the drawing area, you will see that the
- "DO NOT ENTER!" sign gets replaced with a painter's brush.
-
- To attempt a drop, you will release BTransfer. If you release
- BTranfer with the pointer over any part of drawing area outside
- of the rectangles, or anywhere on the root window, you will see
- that the dragicon snaps back to the point of drag initiation,
- and disappears. This is an indication that the drop you
- attempted was a failure. On the other hand, if you release
- BTransfer with the pointer over any of the rectangles inside
- the drawing area, you will see that the dragicon melts into
- the background and disappears; this indicates that the drop
- you attempted was a success. Also, when the rectangle on which
- the drop was attempted, gets filled with the color that was
- being dragged around (yellow, in our example).
-
- The rectangles inside the drawing area themselves act as drag
- sources. You can initiate the drag with the pointer on any
- rectangle, and you will notice that the cursor changes to
- a rectangle (either of the same size or a smaller size depending
- on X cursor size constraints). You can drag a rectangle from
- one place and drop it onto a new place inside the drawing area.
- The rectangle gets physically moved to the new position. If,
- on the other hand, you want to copy the rectangle to a new
- position, you can use the appropriate modifier key while dragging,
- and/or at the time you attempt the drop (<Ctrl> is the modifier
- key for copy in the current implementation). When you drag
- a rectangle with no modifier key pressed or with <Shift>
- pressed, you will notice that the solid rectangle from where
- you initiated the drag gets replaced by a hollow rectangle with
- dotted-line borders. It will continue to be this way, for
- the duration of the drag or until you press the <Ctrl> key,
- which will change the operation to Copy; at which time it will
- regain its original solid form.
-
- A couple of other things to note. Anytime during dragging, you
- can cancel that drag by hitting the Cancel key. Also, during
- dragging, anytime you hit the Help key, you will get a dialog
- giving you some information about whether the drop will
- succeed, what are the drop operations possible, etc.
+++ /dev/null
-# $XConsortium: Makefile.hp /main/2 1996/05/13 11:59:34 drk $
-##########################################################################
-#
-# Makefile for Motif periodic table of widgets (HP)
-#
-# (c) Copyright 1993, 1994 Hewlett-Packard Company
-# (c) Copyright 1993, 1994 International Business Machines Corp.
-# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
-# (c) Copyright 1993, 1994 Novell, Inc.
-#
-##########################################################################
-
-CC = cc
-RM = rm -f
-UIL = /usr/dt/bin/uil
-
-PROGRAM = periodic
-SOURCES = periodic.c
-OBJECTS = periodic.o
-UID = periodic.uid
-UILSOURCE = periodic.uil
-
-DEFINES =
-CDEBUGFLAGS = -O
-CFLAGS = -Aa -z $(DEFINES) $(CDEBUGFLAGS)
-
-DTINCLUDE = -I/usr/dt/include
-X11INCLUDE = -I/usr/include/X11R5
-
-INCLUDES = $(DTINCLUDE) $(X11INCLUDE)
-
-DTLIBS = -L/usr/dt/lib -lMrm -lXm
-X11LIBS = -L/usr/lib/X11R5 -lXt -lX11
-SYSLIBS =
-
-LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS)
-LDFLAGS =
-
-.c.o:
- ${CC} -c $(CFLAGS) $(INCLUDES) $<
-
-all:: $(PROGRAM) $(UID)
-
-$(PROGRAM):: $(OBJECTS)
- $(CC) -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
-
-$(UID):: $(UILSOURCE)
- $(UIL) -o $(UID) $(UILSOURCE)
-
-clean::
- $(RM) $(PROGRAM) $(OBJECTS) $(UID)
-
+++ /dev/null
-# $XConsortium: Makefile.ibm /main/2 1996/05/13 11:59:52 drk $
-##########################################################################
-#
-# Makefile for Motif periodic table of widgets (IBM)
-#
-# (c) Copyright 1993, 1994 Hewlett-Packard Company
-# (c) Copyright 1993, 1994 International Business Machines Corp.
-# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
-# (c) Copyright 1993, 1994 Novell, Inc.
-#
-##########################################################################
-
-CC = cc
-RM = rm -f
-UIL = /usr/dt/bin/uil
-
-PROGRAM = periodic
-SOURCES = periodic.c
-OBJECTS = periodic.o
-UID = periodic.uid
-UILSOURCE = periodic.uil
-
-DEFINES =
-CDEBUGFLAGS = -O
-CFLAGS = $(DEFINES) $(CDEBUGFLAGS)
-
-DTINCLUDE = -I/usr/dt/include
-X11INCLUDE = -I/usr/include
-
-INCLUDES = $(DTINCLUDE) $(X11INCLUDE)
-
-DTLIBS = -L/usr/dt/lib -lMrm -lXm
-X11LIBS = -L/usr/lib -lXt -lX11
-SYSLIBS =
-
-LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS)
-LDFLAGS =
-
-.c.o:
- $(CC) -c $(CFLAGS) $(INCLUDES) $<
-
-all:: $(PROGRAM) $(UID)
-
-$(PROGRAM):: $(OBJECTS)
- $(CC) -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
-
-$(UID):: $(UILSOURCE)
- $(UIL) -o $(UID) $(UILSOURCE)
-
-clean::
- $(RM) $(PROGRAM) $(OBJECTS) $(UID)
+++ /dev/null
-# $XConsortium: Makefile.novell /main/2 1996/05/13 12:00:12 drk $
-##########################################################################
-#
-# Makefile for Motif periodic table of widgets (Novell)
-#
-# (c) Copyright 1993, 1994 Hewlett-Packard Company
-# (c) Copyright 1993, 1994 International Business Machines Corp.
-# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
-# (c) Copyright 1993, 1994 Novell, Inc.
-#
-##########################################################################
-
-CC = cc
-RM = rm -f
-UIL = /usr/dt/bin/uil
-
-PROGRAM = periodic
-SOURCES = periodic.c
-OBJECTS = periodic.o
-UID = periodic.uid
-UILSOURCE = periodic.uil
-
-DEFINES =
-CDEBUGFLAGS = -O
-CFLAGS = -Xc $(DEFINES) $(CDEBUGFLAGS)
-
-DTINCLUDE = -I/usr/dt/include
-X11INCLUDE = -I/usr/X/include
-
-INCLUDES = $(DTINCLUDE) $(X11INCLUDE)
-
-DTLIBS = -L/usr/dt/lib -lMrm -lXm
-X11LIBS = -L/usr/X/lib -lXt -lX11
-SYSLIBS = -lw -lgen -lnsl -lresolv -lsocket -lXIM
-
-LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS)
-LDFLAGS =
-
-.c.o:
- $(CC) -c $(CFLAGS) $(INCLUDES) $<
-
-all:: $(PROGRAM) $(UID)
-
-$(PROGRAM):: $(OBJECTS)
- $(CC) -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
-
-$(UID):: $(UILSOURCE)
- $(UIL) -o $(UID) $(UILSOURCE)
-
-clean::
- $(RM) $(PROGRAM) $(OBJECTS) $(UID)
-
+++ /dev/null
-# $XConsortium: Makefile.sun /main/2 1996/05/13 12:00:27 drk $
-##########################################################################
-#
-# Makefile for Motif periodic table of widgets (SUN)
-#
-# (c) Copyright 1993, 1994 Hewlett-Packard Company
-# (c) Copyright 1993, 1994 International Business Machines Corp.
-# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
-# (c) Copyright 1993, 1994 Novell, Inc.
-#
-##########################################################################
-
-CC = cc
-RM = rm -f
-UIL = /usr/dt/bin/uil
-
-PROGRAM = periodic
-SOURCES = periodic.c
-OBJECTS = periodic.o
-UID = periodic.uid
-UILSOURCE = periodic.uil
-
-DEFINES =
-CDEBUGFLAGS = -O
-CFLAGS = $(DEFINES) $(CDEBUGFLAGS)
-
-DTINCLUDE = -I/usr/dt/include
-X11INCLUDE = -I/usr/openwin/include
-
-INCLUDES = $(DTINCLUDE) $(X11INCLUDE)
-
-DTLIBS = -L/usr/dt/lib -lMrm -lXm
-X11LIBS = -L/usr/openwin/lib -lXt -lX11
-SYSLIBS = -ldl -lw -lgen
-
-LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS)
-LDFLAGS = -R/usr/dt/lib:/usr/openwin/lib
-
-.c.o:
- $(CC) -c $(CFLAGS) $(INCLUDES) $<
-
-all:: $(PROGRAM) $(UID)
-
-$(PROGRAM):: $(OBJECTS)
- $(CC) -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
-
-$(UID):: $(UILSOURCE)
- $(UIL) -o $(UID) $(UILSOURCE)
-
-clean::
- $(RM) $(PROGRAM) $(OBJECTS) $(UID)
+++ /dev/null
-# $XConsortium: Makefile.uxp /main/2 1996/05/13 12:00:43 drk $
-##########################################################################
-#
-# Makefile for Motif periodic table of widgets (UXP)
-#
-# (Fujitsu.patch applied)
-#
-# (c) Copyright 1993, 1994 Hewlett-Packard Company
-# (c) Copyright 1993, 1994 International Business Machines Corp.
-# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
-# (c) Copyright 1993, 1994 Novell, Inc.
-#
-##########################################################################
-
-CC = cc
-RM = rm -f
-UIL = /usr/dt/bin/uil
-
-PROGRAM = periodic
-SOURCES = periodic.c
-OBJECTS = periodic.o
-UID = periodic.uid
-UILSOURCE = periodic.uil
-
-DEFINES =
-CDEBUGFLAGS = -O
-CFLAGS = -Xc $(DEFINES) $(CDEBUGFLAGS)
-
-DTINCLUDE = -I/usr/dt/include
-
-INCLUDES = $(DTINCLUDE)
-
-DTLIBS = -L/usr/dt/lib -lMrm -lXm
-X11LIBS = -lXt -lX11
-SYSLIBS = -lw -lgen -lnsl -lresolv -lsocket
-
-LIBRARIES = $(DTLIBS) $(X11LIBS) $(SYSLIBS)
-LDFLAGS =
-
-.c.o:
- $(CC) -c $(CFLAGS) $(INCLUDES) $<
-
-all:: $(PROGRAM) $(UID)
-
-$(PROGRAM):: $(OBJECTS)
- $(CC) -o $(PROGRAM) $(LDFLAGS) $(OBJECTS) $(LIBRARIES)
-
-$(UID):: $(UILSOURCE)
- $(UIL) -o $(UID) $(UILSOURCE)
-
-clean::
- $(RM) $(PROGRAM) $(OBJECTS) $(UID)
-
+++ /dev/null
-! $XConsortium: Periodic.ad /main/2 1995/07/17 18:52:14 drk $
-periodic*XmText.columns: 10
-periodic*XmTextField.columns: 10
-periodic*scaleFrame*XmScale.width: 50
-periodic*scrollFrame*XmScrollBar.width: 50
-
-periodic*fontList: *-*-Helvetica-medium-r-*-*-*-100-*-*-p-*-*-*
-
-periodic*titleLabel.fontList: *-*-Helvetica-bold-r-*-*-*-180-*-*-p-*-*-*
-periodic*subtitleLabel.fontList: *-*-Helvetica-bold-r-*-*-*-140-*-*-p-*-*-*
-periodic*labelLabel.fontList: *-*-Helvetica-bold-r-*-*-*-180-*-*-p-*-*-*
-periodic*menuBar*fontList: *-*-Helvetica-medium-r-*-*-*-120-*-*-p-*-*-*
-periodic*popupMenu*fontList: *-*-Helvetica-medium-r-*-*-*-120-*-*-p-*-*-*
-periodic*XmMessageBox*fontList: *-*-Helvetica-medium-r-*-*-*-120-*-*-p-*-*-*
-periodic*fileDialog*fontList: *-*-Helvetica-medium-r-*-*-*-120-*-*-p-*-*-*
-periodic*selectDialog*fontList: *-*-Helvetica-medium-r-*-*-*-120-*-*-p-*-*-*
-periodic*promptDialog*fontList: *-*-Helvetica-medium-r-*-*-*-120-*-*-p-*-*-*
-
-!periodic*background: gray
-!periodic*XmFrame.XmLabel.foreground: yellow
-!periodic*drawArea.background: mediumaquamarine
-!periodic*drawnButton.foreground: red
-!periodic*highlightColor: red
-
-periodic*listFrame*selectionPolicy: XmEXTENDED_SELECT
-
+++ /dev/null
-/* $XConsortium: README /main/2 1996/07/15 14:05:10 drk $ */
-
-README for The Periodic Table of Motif Widgets
-
-
- PERIODIC v1.2
- -------------
-
- This directory contains the sources for periodic. Periodic is a
- demo of the displayable widgets in Motif. Periodic presents many
- Motif widgets for your visual and sensual enjoyment.
-
- The resources in the file Periodic.ad should be used. Either
- merge the file with your .Xdefaults, or copy it to your
- home directory and rename it to 'Periodic' - it will then be
- used as the application defaults file.
-
- Ignore the color resources if you are displaying on a monochrome
- server. If the fonts do not exist on your server, change the
- resource to use a font of similar size.
-
+++ /dev/null
-/*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-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 libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
-/*
- * (c) Copyright 1989, 1990, 1991, 1992, 1993 OPEN SOFTWARE FOUNDATION, INC.
- * ALL RIGHTS RESERVED
-*/
-/*
- * Motif Release 1.2.2
-*/
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = "$XConsortium: periodic.c /main/4 1995/10/27 10:44:10 rswiston $"
-#endif
-#endif
-
-/******************************************************************************
- * periodic.c
- *
- * Copy and rename the file periodic.ad to Periodic in your home directory
- * or app-defaults directory, or merge it with your .Xdefaults file.
- *
- * It provides useful default values for Periodic fonts and colors
- *
- *****************************************************************************/
-
-#include <stdio.h>
-#include <Xm/Xm.h>
-#include <Xm/Scale.h>
-#include <Xm/ToggleB.h>
-#include <Mrm/MrmPublic.h>
-
-
-typedef struct _DrawData {
- GC gc;
- Position drawX;
- Position drawY;
- Dimension drawWidth;
- Dimension drawHeight;
-} DrawData;
-
-
-static GC GetGC(
- Widget w );
-static void ConfigureDrawData(
- Widget w,
- DrawData *data );
-static void DrawButton(
- Widget w );
-static void DrawArea(
- Widget w );
-static void PopupHandler(
- Widget w,
- Widget pw,
- XEvent *event,
- Boolean *ctd );
-
-static void ManageCb(
- Widget w,
- String id,
- XmToggleButtonCallbackStruct *cb );
-static void UnmapCb(
- Widget w,
- XtPointer cd,
- XtPointer cb );
-static void UnmanageCb(
- Widget w,
- String id,
- XtPointer cb );
-static void InitPopupCb(
- Widget w,
- String id,
- XtPointer cb );
-static void PopdownCb(
- Widget w,
- XtPointer cd,
- XtPointer cb );
-static void DaExposeCb(
- Widget w,
- XtPointer cd,
- XtPointer cb );
-static void DaResizeCb(
- Widget w,
- XtPointer cd,
- XtPointer cb );
-static void DbExposeCb(
- Widget w,
- XtPointer cd,
- XtPointer cb );
-static void DbResizeCb(
- Widget w,
- XtPointer cd,
- XtPointer cb );
-static void ScaleCb(
- Widget w,
- XtPointer cd,
- XtPointer cb );
-static void SetScaleCb(
- Widget w,
- int *value,
- XmToggleButtonCallbackStruct *cb );
-static void ViewCb(
- Widget w,
- XtPointer cd,
- XmToggleButtonCallbackStruct *cb );
-static void LayoutCb(
- Widget w,
- XtPointer cd,
- XmToggleButtonCallbackStruct *cb );
-static void ToggleLightsCb(
- Widget w,
- XtPointer cd,
- XmToggleButtonCallbackStruct *cb );
-static void ShowCb(
- Widget w,
- String id,
- XtPointer cb );
-static void ExitCb(
- Widget w,
- XtPointer cd,
- XtPointer cb );
-
-static MrmHierarchy mrmId;
-static char *mrmFile[]={"periodic.uid"};
-static MrmCode mrmClass;
-static MRMRegisterArg mrmNames[] = {
- {"InitPopupCb", (XtPointer)InitPopupCb },
- {"PopdownCb", (XtPointer)PopdownCb },
- {"UnmapCb", (XtPointer)UnmapCb },
- {"UnmanageCb", (XtPointer)UnmanageCb },
- {"ManageCb", (XtPointer)ManageCb },
- {"DaExposeCb", (XtPointer)DaExposeCb },
- {"DaResizeCb", (XtPointer)DaResizeCb },
- {"DbExposeCb", (XtPointer)DbExposeCb },
- {"DbResizeCb", (XtPointer)DbResizeCb },
- {"ScaleCb", (XtPointer)ScaleCb },
- {"SetScaleCb", (XtPointer)SetScaleCb },
- {"ViewCb", (XtPointer)ViewCb },
- {"LayoutCb", (XtPointer)LayoutCb },
- {"ToggleLightsCb", (XtPointer)ToggleLightsCb },
- {"ShowCb", (XtPointer)ShowCb },
- {"ExitCb", (XtPointer)ExitCb }
-};
-
-static String fallbackResources[] = {
-"periodic*XmText.columns: 10",
-"periodic*XmTextField.columns: 10",
-"periodic*scaleFrame*XmScale.width: 50",
-"periodic*scrollFrame*XmScrollBar.width: 50",
-
-"periodic*fontList: *-*-*-medium-r-*-*-*-100-*-*-p-*-*-*",
-
-"periodic*titleLabel.fontList: *-*-*-bold-r-*-*-*-180-*-*-p-*-*-*",
-"periodic*subtitleLabel.fontList: *-*-*-bold-r-*-*-*-140-*-*-p-*-*-*",
-"periodic*labelLabel.fontList: *-*-*-bold-r-*-*-*-180-*-*-p-*-*-*",
-"periodic*menuBar*fontList: *-*-*-medium-r-*-*-*-120-*-*-p-*-*-*",
-"periodic*popupMenu*fontList: *-*-*-medium-r-*-*-*-120-*-*-p-*-*-*",
-"periodic*XmMessageBox*fontList: *-*-*-medium-r-*-*-*-120-*-*-p-*-*-*",
-"periodic*fileDialog*fontList: *-*-*-medium-r-*-*-*-120-*-*-p-*-*-*",
-"periodic*selectDialog*fontList: *-*-*-medium-r-*-*-*-120-*-*-p-*-*-*",
-"periodic*promptDialog*fontList: *-*-*-medium-r-*-*-*-120-*-*-p-*-*-*",
-NULL
-};
-
-static XtAppContext appContext;
-static Widget shell;
-
-int
-main(
- int argc,
- char *argv[] )
-{
- Widget appMain;
- Display *display;
- Arg args[2];
-
- XtToolkitInitialize();
- MrmInitialize ();
- appContext = XtCreateApplicationContext();
- XtAppSetFallbackResources (appContext, fallbackResources);
- display = XtOpenDisplay(appContext, NULL, "periodic", "Periodic",
- NULL, 0, &argc, argv);
- if (display == NULL) {
- fprintf(stderr, "%s: Can't open display\n", argv[0]);
- exit(1);
- }
- XtSetArg (args[0], XmNargc, argc);
- XtSetArg (args[1], XmNargv, argv);
- shell = XtAppCreateShell("periodic", "Periodic", applicationShellWidgetClass,
- display, args, 2);
- if (MrmOpenHierarchy (1, mrmFile, NULL, &mrmId) != MrmSUCCESS) exit(0);
- MrmRegisterNames(mrmNames, XtNumber(mrmNames));
- MrmFetchWidget (mrmId, "appMain", shell, &appMain, &mrmClass);
- XtManageChild(appMain);
- XtRealizeWidget(shell);
- XtAppMainLoop(appContext);
-}
-
-static void
-ExitCb(
- Widget w,
- XtPointer cd,
- XtPointer cb )
-{
- exit(0);
-}
-
-
-/*****************************************************************
- *
- * Display selected Dialog widget
- *
- *****************************************************************/
-
-static Widget managedToggle = NULL;
-
-static void
-ManageCb(
- Widget w,
- String id,
- XmToggleButtonCallbackStruct *cb )
-{
- Widget dialog = XtNameToWidget (shell, id);
-
- if (cb->set) {
- if (managedToggle != NULL)
- XmToggleButtonSetState (managedToggle, False, True);
- managedToggle = w;
- XtManageChild (dialog);
- }
- else {
- XtUnmanageChild (dialog);
- managedToggle = NULL;
- }
-}
-
-static void
-UnmapCb(
- Widget w,
- XtPointer cd,
- XtPointer cb )
-{
- XmToggleButtonSetState (managedToggle, False, True);
-}
-
-static void
-UnmanageCb(
- Widget w,
- String id,
- XtPointer cb )
-{
- XtUnmanageChild (XtNameToWidget (shell, id));
-}
-
-static void
-ShowCb(
- Widget w,
- String id,
- XtPointer cb )
-{
- static Widget tb = NULL;
- static Widget sc = NULL;
- int value;
-
- if (tb == NULL) tb = XtNameToWidget (shell, "*toggleButton");
- if (sc == NULL) sc = XtNameToWidget (shell, "*valueScale");
-
- XmScaleGetValue (sc, &value);
- if (XmToggleButtonGetState(tb) == True && value == 1012)
- XtManageChild (XtNameToWidget (shell, id));
-}
-
-
-/*****************************************************************
- *
- * Provide RadioBox behavior inside a PulldownMenu
- *
- *****************************************************************/
-
-static void
-ViewCb(
- Widget w,
- XtPointer cd,
- XmToggleButtonCallbackStruct *cb )
-{
- static Widget viewToggle = NULL;
-
- if (cb->set) {
- if (viewToggle) XmToggleButtonSetState (viewToggle, False, False);
- viewToggle = w;
- }
- else {
- if (w == viewToggle) XmToggleButtonSetState (w, True, False);
- }
-}
-
-static void
-LayoutCb(
- Widget w,
- XtPointer cd,
- XmToggleButtonCallbackStruct *cb )
-{
- static Widget layoutToggle = NULL;
-
- if (cb->set) {
- if (layoutToggle) XmToggleButtonSetState (layoutToggle, False, False);
- layoutToggle = w;
- }
- else {
- if (w == layoutToggle) XmToggleButtonSetState (w, True, False);
- }
-}
-
-
-/*****************************************************************
- *
- * PopupMenu support
- *
- *****************************************************************/
-
-static Time popupLastEventTime = 0;
-
-static void
-InitPopupCb(
- Widget w,
- String id,
- XtPointer cb )
-{
- Widget popupWindow = XtNameToWidget (shell, id);
-
- XtAddEventHandler (popupWindow, ButtonPressMask, False,
- (XtEventHandler)PopupHandler, (XtPointer)w);
-}
-
-static void
-PopupHandler (
- Widget w,
- Widget pw,
- XEvent *event,
- Boolean *ctd )
-{
- if (((XButtonEvent *)event)->button != Button3) return;
- if (((XButtonEvent *)event)->time <= popupLastEventTime) return;
-
- XmMenuPosition((Widget) pw, (XButtonEvent *)event);
- XtManageChild ((Widget) pw);
-}
-
-/* By default, cancelling a popup menu with Button 3 will cause the
- * popup to be reposted at the location of the cancelling click.
- *
- * To switch off this behavior, remember when the menu was popped down.
- * In PopupHandler, don't repost the menu if the posting click just
- * cancelled a popup menu.
- */
-static void
-PopdownCb(
- Widget w,
- XtPointer cd,
- XtPointer cb )
-{
- popupLastEventTime = XtLastTimestampProcessed (XtDisplay(w));
-}
-
-
-/*****************************************************************
- *
- * Draw utilities
- *
- *****************************************************************/
-
-static DrawData *drawData = NULL;
-static DrawData *buttonData = NULL;
-
-static GC
-GetGC(
- Widget w )
-{
- Arg args[2];
- XGCValues gcv;
- Pixel fg;
- Pixel bg;
- GC gc;
-
- XtSetArg (args[0], XmNforeground, &fg);
- XtSetArg (args[1], XmNbackground, &bg);
- XtGetValues (w, args, 2);
- gcv.foreground = fg;
- gcv.background = bg;
- gcv.line_width = 1;
- gc = XtGetGC (w, GCForeground | GCBackground | GCLineWidth, &gcv);
-
- return (gc);
-}
-
-static void
-ConfigureDrawData(
- Widget w,
- DrawData *data )
-{
- Arg args[6];
- Dimension width, height, st, ht, mw, mh;
- Dimension totalMarginWidth;
- Dimension totalMarginHeight;
-
- width = height = st = ht = mw = mh = 0;
- XtSetArg (args[0], XmNwidth, &width);
- XtSetArg (args[1], XmNheight, &height);
- XtSetArg (args[2], XmNshadowThickness, &st);
- XtSetArg (args[3], XmNhighlightThickness, &ht);
- XtSetArg (args[4], XmNmarginWidth, &mw);
- XtSetArg (args[5], XmNmarginHeight, &mh);
- XtGetValues (w, args, 6);
-
- totalMarginWidth = st + ht + mw;
- totalMarginHeight = st + ht + mh;
-
- if (2u * totalMarginWidth < width && 2u * totalMarginHeight < height) {
- data->drawX = totalMarginWidth;
- data->drawY = totalMarginHeight;
- data->drawWidth = width - 2 * totalMarginWidth;
- data->drawHeight = height - 2 * totalMarginHeight;
- }
- else {
- data->drawWidth = 0;
- data->drawHeight = 0;
- }
-}
-
-/*****************************************************************
- *
- * DrawingArea display code
- *
- *****************************************************************/
-
-static void
-DaResizeCb(
- Widget w,
- XtPointer cd,
- XtPointer cb )
-{
- if (drawData == NULL) return;
-
- ConfigureDrawData (w, drawData);
- XClearArea (XtDisplay(w), XtWindow(w),
- drawData->drawX, drawData->drawY,
- drawData->drawWidth, drawData->drawHeight,
- False);
- DrawArea (w);
-}
-
-static void
-DaExposeCb(
- Widget w,
- XtPointer cd,
- XtPointer cb )
-{
- if (drawData == NULL) {
- drawData = (DrawData *)XtMalloc (sizeof(DrawData));
- drawData->gc = GetGC (w);
- ConfigureDrawData (w, drawData);
- }
- DrawArea(w);
-}
-
-#define NPOINTS 40u
-
-static void
-DrawArea(
- Widget w )
-{
- int i, x, y;
- unsigned int m;
-
- XPoint p[NPOINTS];
-
- if (drawData->drawWidth == 0) return;
-
- XClearArea (XtDisplay(w), XtWindow(w),
- drawData->drawX, drawData->drawY,
- drawData->drawWidth, drawData->drawHeight,
- False);
- XDrawRectangle (XtDisplay(w), XtWindow(w), drawData->gc,
- drawData->drawX, drawData->drawY,
- drawData->drawWidth, drawData->drawHeight);
- XDrawLine (XtDisplay(w), XtWindow(w), drawData->gc,
- drawData->drawX, drawData->drawY + drawData->drawHeight/2,
- drawData->drawX + drawData->drawWidth,
- drawData->drawY + drawData->drawHeight/2);
-
- m = 20 * drawData->drawHeight / 100u;
- p[0].x = drawData->drawX;
- p[0].y = drawData->drawY + drawData->drawHeight/2;
- for (i = 1; i < NPOINTS-1; i++) {
- p[i].x = drawData->drawX + (i * drawData->drawWidth)/NPOINTS;
- p[i].y = drawData->drawY + m/2u + (rand() % (drawData->drawHeight - m));
- }
- p[NPOINTS-1].x = drawData->drawX + drawData->drawWidth;
- p[NPOINTS-1].y = drawData->drawY + drawData->drawHeight/2;
-
- XDrawLines (XtDisplay(w), XtWindow(w), drawData->gc,
- p, NPOINTS, CoordModeOrigin);
-}
-
-static void
-ScaleCb(
- Widget w,
- XtPointer cd,
- XtPointer cb )
-{
- static Widget da = NULL;
-
- if (drawData == NULL) return;
-
- if (da == NULL) da = XtNameToWidget (shell, "*drawArea");
-
- DrawArea (da);
-}
-
-static void
-SetScaleCb(
- Widget w,
- int *value,
- XmToggleButtonCallbackStruct *cb )
-{
- static Widget da = NULL;
- static Widget sc = NULL;
-
- if (drawData == NULL) return;
-
- if (da == NULL) da = XtNameToWidget (shell, "*drawArea");
- if (sc == NULL) sc = XtNameToWidget (shell, "*valueScale");
-
- XmScaleSetValue (sc, *value);
-
- DrawArea (da);
-}
-
-/*****************************************************************
- *
- * DrawnButton display code
- *
- *****************************************************************/
-
-static Boolean lightsOn = False;
-
-static void
-DbResizeCb(
- Widget w,
- XtPointer cd,
- XtPointer cb )
-{
- if (buttonData == NULL) return;
-
- ConfigureDrawData (w, buttonData);
- XClearArea (XtDisplay(w), XtWindow(w),
- buttonData->drawX, buttonData->drawY,
- buttonData->drawWidth, buttonData->drawHeight,
- False);
- DrawButton (w);
-}
-
-static void
-DbExposeCb(
- Widget w,
- XtPointer cd,
- XtPointer cb )
-{
- if (buttonData == NULL) {
- buttonData = (DrawData *)XtMalloc (sizeof(DrawData));
- buttonData->gc = GetGC (w);
- ConfigureDrawData (w, buttonData);
- }
- DrawButton(w);
-}
-
-#define NARCS 6u
-
-static void
-DrawButton(
- Widget w )
-{
- int i, x, y, incX, incY;
- XArc a[NARCS];
-
- if (buttonData->drawWidth == 0 || !lightsOn) return;
-
- a[0].x = buttonData->drawX + (buttonData->drawWidth - 1)/2u;
- a[0].y = buttonData->drawY + (buttonData->drawHeight - 1)/2u;
- a[0].width = 1;
- a[0].height = 1;
- a[0].angle1 = 0;
- a[0].angle2 = 360*64;
- incX = (buttonData->drawWidth - 1)/(2u * NARCS);
- incY = (buttonData->drawHeight - 1)/(2u * NARCS);
-
- for (i = 1; i < NARCS; i++) {
- a[i].x = a[i-1].x - incX;
- a[i].y = a[i-1].y - incY;
- a[i].width = a[i-1].width + 2 * incX;
- a[i].height = a[i-1].height + 2 * incY;
-#ifndef BROKEN_SERVER_ARCS
- a[i].angle1 = 0;
- a[i].angle2 = 360 * 64;
-#else
- XDrawRectangle (XtDisplay(w), XtWindow(w), buttonData->gc,
- a[i].x, a[i].y, a[i].width, a[i].height);
-#endif
- }
-
-#ifndef BROKEN_SERVER_ARCS
- XDrawArcs (XtDisplay(w), XtWindow(w), buttonData->gc, a, NARCS);
-#endif
-}
-
-static void
-ToggleLightsCb(
- Widget w,
- XtPointer cd,
- XmToggleButtonCallbackStruct *cb )
-{
- static Widget db = NULL;
-
- if (buttonData == NULL) return;
-
- if (db == NULL) db = XtNameToWidget (shell, "*drawnButton");
-
- lightsOn = cb->set;
-
- if (lightsOn)
- DrawButton (db);
- else
- XClearArea (XtDisplay(db), XtWindow(db),
- buttonData->drawX, buttonData->drawY,
- buttonData->drawWidth, buttonData->drawHeight,
- False);
-}
-
+++ /dev/null
-!
-! (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC.
-! ALL RIGHTS RESERVED
-!
-!
-! Motif Release 1.2
-!
-! $XConsortium: periodic.uil /main/3 1995/10/27 10:44:20 rswiston $
-!******************************************************************************
-
-
-module periodic
- version = 'v1.2'
- names = case_sensitive
- character_set=iso_latin1
- objects = {
- XmLabel = widget;
- XmPushButton = widget;
- XmToggleButton = widget;
- XmCascadeButton = widget;
- XmSeparator = widget;
- }
-
-include file ("periodic_local.uil");
-
-procedure
- ManageCb(string);
- UnmapCb();
- UnmanageCb(string);
- ShowCb(string);
- InitPopupCb(string);
- PopdownCb();
- DaExposeCb();
- DaResizeCb();
- DbExposeCb();
- DbResizeCb();
- ScaleCb();
- SetScaleCb(integer);
- ViewCb();
- LayoutCb();
- ToggleLightsCb();
- ExitCb();
-
-value
- x0 : 0;
- x1 : 5;
- x2 : 10;
- x3 : 15;
- x4 : 20;
- x5 : 25;
- x6 : 30;
- x7 : 35;
- x8 : 40;
-
- y0 : 0;
- y1 : 8;
- y2 : 16;
- y3 : 24;
- y4 : 32;
- y5 : 40;
-
-value
- boxMarginWidth : 5;
- boxMarginHeight : 5;
-
-list formArgs : arguments {
- XmNleftAttachment = XmATTACH_POSITION;
- XmNrightAttachment = XmATTACH_POSITION;
- XmNtopAttachment = XmATTACH_POSITION;
- XmNbottomAttachment = XmATTACH_POSITION;
-};
-
-list titleArgs : arguments {
- XmNchildType = XmFRAME_TITLE_CHILD;
- XmNchildHorizontalSpacing = 4;
- XmNchildVerticalAlignment = XmALIGNMENT_WIDGET_BOTTOM;
-};
-
-list toggleArgs : arguments {
- XmNfillOnSelect = true;
- XmNindicatorOn = false;
- XmNshadowThickness = 1;
-};
-
-
-
-
-!
-! Main window
-!
-object appMain : XmMainWindow {
- arguments {
- XmNmenuBar = XmMenuBar menuBar;
- };
- controls {
- XmMenuBar menuBar;
- XmFrame {
- arguments {
- XmNmarginWidth = 20;
- XmNmarginHeight = 20;
- };
- controls { XmForm workArea; };
- };
- unmanaged XmFileSelectionDialog fileDialog;
- unmanaged XmSelectionDialog selectDialog;
- unmanaged XmTemplateDialog templateDialog;
- unmanaged XmInformationDialog infoDialog;
- unmanaged XmWarningDialog warningDialog;
- unmanaged XmErrorDialog errorDialog;
- unmanaged XmQuestionDialog questionDialog;
- unmanaged XmWorkingDialog workingDialog;
- unmanaged XmPromptDialog promptDialog;
- unmanaged XmInformationDialog showDialog;
- };
-};
-
-
-
-
-!
-! Menu bar and pulldown menus
-!
-
-object menuBar : XmMenuBar {
- arguments {
- XmNmenuHelpWidget = XmCascadeButton helpCascade;
- };
- controls {
- XmCascadeButton fileCascade;
- XmCascadeButton editCascade;
- XmCascadeButton viewCascade;
- XmCascadeButton optionsCascade;
- XmCascadeButton helpCascade;
- };
-};
-
-object fileCascade : XmCascadeButton {
- arguments {
- XmNlabelString = fileCascadeText;
- XmNmnemonic = keysym(fileCascadeMnem);
- };
- controls { XmPulldownMenu {
- arguments { XmNtearOffModel = XmTEAR_OFF_ENABLED; };
- controls {
- XmPushButton newButton;
- XmPushButton openButton;
- XmPushButton saveButton;
- XmPushButton saveAsButton;
- XmPushButton printButton;
- XmPushButton exitButton;
- }; };
- };
-};
-
-object newButton : XmPushButton {
- arguments {
- XmNlabelString = newButtonText;
- XmNmnemonic = keysym(newButtonMnem);
- };
-};
-object openButton : XmPushButton {
- arguments {
- XmNlabelString = openButtonText;
- XmNmnemonic = keysym(openButtonMnem);
- };
-};
-object saveButton : XmPushButton {
- arguments {
- XmNlabelString = saveButtonText;
- XmNmnemonic = keysym(saveButtonMnem);
- };
-};
-object saveAsButton : XmPushButton {
- arguments {
- XmNlabelString = saveAsButtonText;
- XmNmnemonic = keysym(saveAsButtonMnem);
- };
-};
-object printButton : XmPushButton {
- arguments {
- XmNlabelString = printButtonText;
- XmNmnemonic = keysym(printButtonMnem);
- };
-};
-object exitButton : XmPushButton {
- arguments {
- XmNlabelString = exitButtonText;
- XmNmnemonic = keysym(exitButtonMnem);
- };
- callbacks { XmNactivateCallback = procedure ExitCb(); };
-};
-
-object editCascade : XmCascadeButton {
- arguments {
- XmNlabelString = editCascadeText;
- XmNmnemonic = keysym(editCascadeMnem);
- };
- controls { XmPulldownMenu {
- arguments { XmNtearOffModel = XmTEAR_OFF_ENABLED; };
- controls {
- XmPushButton undoButton;
- XmSeparator { };
- XmPushButton cutButton;
- XmPushButton copyButton;
- XmPushButton pasteButton;
- XmSeparator { };
- XmPushButton clearButton;
- XmPushButton deleteButton;
- }; };
- };
-};
-
-object undoButton : XmPushButton {
- arguments {
- XmNlabelString = undoButtonText;
- XmNmnemonic = keysym(undoButtonMnem);
- };
-};
-object cutButton : XmPushButton {
- arguments {
- XmNlabelString = cutButtonText;
- XmNmnemonic = keysym(cutButtonMnem);
- };
-};
-object copyButton : XmPushButton {
- arguments {
- XmNlabelString = copyButtonText;
- XmNmnemonic = keysym(copyButtonMnem);
- };
-};
-object pasteButton : XmPushButton {
- arguments {
- XmNlabelString = pasteButtonText;
- XmNmnemonic = keysym(pasteButtonMnem);
- };
-};
-object clearButton : XmPushButton {
- arguments {
- XmNlabelString = clearButtonText;
- XmNmnemonic = keysym(clearButtonMnem);
- };
-};
-object deleteButton : XmPushButton {
- arguments {
- XmNlabelString = deleteButtonText;
- XmNmnemonic = keysym(deleteButtonMnem);
- };
-};
-
-object viewCascade : XmCascadeButton {
- arguments {
- XmNlabelString = viewCascadeText;
- XmNmnemonic = keysym(viewCascadeMnem);
- };
- controls { XmPulldownMenu {
- arguments { XmNtearOffModel = XmTEAR_OFF_ENABLED; };
- controls {
- XmToggleButton stackButton;
- XmToggleButton tileButton;
- XmSeparator { };
- XmToggleButton dayButton;
- XmToggleButton weekButton;
- XmToggleButton monthButton;
- XmToggleButton yearButton;
- }; };
- };
-};
-
-object stackButton : XmToggleButton {
- arguments {
- XmNlabelString = stackButtonText;
- XmNmnemonic = keysym(stackButtonMnem);
- XmNindicatorType = XmONE_OF_MANY;
- };
- callbacks { XmNvalueChangedCallback = procedure LayoutCb(); };
-};
-object tileButton : XmToggleButton {
- arguments {
- XmNlabelString = tileButtonText;
- XmNmnemonic = keysym(tileButtonMnem);
- XmNindicatorType = XmONE_OF_MANY;
- };
- callbacks { XmNvalueChangedCallback = procedure LayoutCb(); };
-};
-object dayButton : XmToggleButton {
- arguments {
- XmNlabelString = dayButtonText;
- XmNmnemonic = keysym(dayButtonMnem);
- XmNindicatorType = XmONE_OF_MANY;
- };
- callbacks { XmNvalueChangedCallback = procedure ViewCb(); };
-};
-object weekButton : XmToggleButton {
- arguments {
- XmNlabelString = weekButtonText;
- XmNmnemonic = keysym(weekButtonMnem);
- XmNindicatorType = XmONE_OF_MANY;
- };
- callbacks { XmNvalueChangedCallback = procedure ViewCb(); };
-};
-object monthButton : XmToggleButton {
- arguments {
- XmNlabelString = monthButtonText;
- XmNmnemonic = keysym(monthButtonMnem);
- XmNindicatorType = XmONE_OF_MANY;
- };
- callbacks { XmNvalueChangedCallback = procedure ViewCb(); };
-};
-object yearButton : XmToggleButton {
- arguments {
- XmNlabelString = yearButtonText;
- XmNmnemonic = keysym(yearButtonMnem);
- XmNindicatorType = XmONE_OF_MANY;
- };
- callbacks { XmNvalueChangedCallback = procedure ViewCb(); };
-};
-
-object optionsCascade : XmCascadeButton {
- arguments {
- XmNlabelString = optionsCascadeText;
- XmNmnemonic = keysym(optionsCascadeMnem);
- };
- controls { XmPulldownMenu {
- arguments { XmNtearOffModel = XmTEAR_OFF_ENABLED; };
- controls {
- XmCascadeButton fontCascade;
- XmCascadeButton directCascade;
- XmToggleButton caseButton;
- XmToggleButton wrapButton;
- }; };
- };
-};
-
-object fontCascade : XmCascadeButton {
- arguments {
- XmNlabelString = fontCascadeText;
- XmNmnemonic = keysym(fontCascadeMnem);
- };
- controls { XmPulldownMenu {
- arguments { XmNtearOffModel = XmTEAR_OFF_ENABLED; };
- controls {
- XmPushButton smallFontButton;
- XmPushButton mediumFontButton;
- XmPushButton largeFontButton;
- }; };
- };
-};
-
-object smallFontButton : XmPushButton {
- arguments {
- XmNlabelString = smallFontButtonText;
- XmNmnemonic = keysym(smallFontButtonMnem);
- };
-};
-object mediumFontButton : XmPushButton {
- arguments {
- XmNlabelString = mediumFontButtonText;
- XmNmnemonic = keysym(mediumFontButtonMnem);
- };
-};
-object largeFontButton : XmPushButton {
- arguments {
- XmNlabelString = largeFontButtonText;
- XmNmnemonic = keysym(largeFontButtonMnem);
- };
-};
-
-object directCascade : XmCascadeButton {
- arguments {
- XmNlabelString = directCascadeText;
- XmNmnemonic = keysym(directCascadeMnem);
- };
- controls { XmPulldownMenu {
- arguments { XmNtearOffModel = XmTEAR_OFF_ENABLED; };
- controls {
- XmPushButton upDirButton;
- XmPushButton downDirButton;
- XmPushButton leftDirButton;
- XmPushButton rightDirButton;
- }; };
- };
-};
-
-object upDirButton : XmPushButton {
- arguments {
- XmNlabelString = upButtonText;
- XmNmnemonic = keysym(upButtonMnem);
- };
-};
-object downDirButton : XmPushButton {
- arguments {
- XmNlabelString = downButtonText;
- XmNmnemonic = keysym(downButtonMnem);
- };
-};
-object leftDirButton : XmPushButton {
- arguments {
- XmNlabelString = leftButtonText;
- XmNmnemonic = keysym(leftButtonMnem);
- };
-};
-object rightDirButton : XmPushButton {
- arguments {
- XmNlabelString = rightButtonText;
- XmNmnemonic = keysym(rightButtonMnem);
- };
-};
-object caseButton : XmToggleButton {
- arguments {
- XmNlabelString = caseButtonText;
- XmNmnemonic = keysym(caseButtonMnem);
- };
-};
-object wrapButton : XmToggleButton {
- arguments {
- XmNlabelString = wrapButtonText;
- XmNmnemonic = keysym(wrapButtonMnem);
- };
-};
-
-object helpCascade : XmCascadeButton {
- arguments {
- XmNlabelString = helpCascadeText;
- XmNmnemonic = keysym(helpCascadeMnem);
- };
- controls { XmPulldownMenu {
- arguments { XmNtearOffModel = XmTEAR_OFF_ENABLED; };
- controls {
- XmPushButton contextButton;
- XmPushButton windowButton;
- XmPushButton tutorButton;
- XmPushButton versionButton;
- }; };
- };
-};
-
-object contextButton : XmPushButton {
- arguments {
- XmNlabelString = contextButtonText;
- XmNmnemonic = keysym(contextButtonMnem);
- };
-};
-object windowButton : XmPushButton {
- arguments {
- XmNlabelString = windowButtonText;
- XmNmnemonic = keysym(windowButtonMnem);
- };
-};
-object tutorButton : XmPushButton {
- arguments {
- XmNlabelString = tutorButtonText;
- XmNmnemonic = keysym(tutorButtonMnem);
- };
-};
-object versionButton : XmPushButton {
- arguments {
- XmNlabelString = versionButtonText;
- XmNmnemonic = keysym(versionButtonMnem);
- };
-};
-
-
-
-
-!
-! Work area widgets
-!
-
-object workArea : XmForm {
- arguments {
- XmNfractionBase = 40;
- };
- controls {
- XmLabel titleLabel;
- XmLabel subtitleLabel;
- XmFrame separatorFrame;
- XmFrame arrowFrame;
- XmFrame pushFrame;
- XmFrame toggleFrame;
- XmFrame labelFrame;
- XmFrame optionFrame;
- XmFrame scaleFrame;
- XmFrame radioFrame;
- XmFrame textFrame;
- XmFrame commandFrame;
- XmFrame dialogFrame;
- XmFrame scrollFrame;
- XmFrame listFrame;
- XmFrame paneFrame;
- XmFrame popupFrame;
- XmFrame drawFrame;
- XmFrame drawBtnFrame;
- };
-};
-
-object titleLabel : XmLabel {
- arguments {
- XmNleftAttachment = XmATTACH_POSITION;
- XmNrightAttachment = XmATTACH_POSITION;
- XmNleftPosition = x1; XmNrightPosition = x7;
- XmNtopAttachment = XmATTACH_FORM;
- XmNlabelString = titleLabelText;
- };
-};
-object subtitleLabel : XmLabel {
- arguments {
- XmNleftAttachment = XmATTACH_POSITION;
- XmNrightAttachment = XmATTACH_POSITION;
- XmNleftPosition = x1; XmNrightPosition = x7;
- XmNtopAttachment = XmATTACH_WIDGET;
- XmNtopWidget = XmLabel titleLabel;
- XmNlabelString = subtitleLabelText;
- };
-};
-
-object separatorFrame : XmFrame {
- arguments {
- arguments formArgs;
- XmNleftPosition = x0; XmNrightPosition = x1;
- XmNtopPosition = y0; XmNbottomPosition = y1;
- XmNmarginWidth = boxMarginWidth;
- XmNmarginHeight = boxMarginWidth;
- };
- controls {
- XmLabel { arguments {
- arguments titleArgs;
- XmNlabelString = separatorFrameText;
- }; };
- XmSeparator { };
- };
-};
-
-object arrowFrame : XmFrame {
- arguments {
- arguments formArgs;
- XmNleftPosition = x0; XmNrightPosition = x1;
- XmNtopPosition = y1; XmNbottomPosition = y2;
- XmNmarginWidth = boxMarginWidth;
- XmNmarginHeight = boxMarginWidth;
- };
- controls {
- XmLabel { arguments {
- arguments titleArgs;
- XmNlabelString = arrowFrameText;
- }; };
- XmForm {
- arguments {
- XmNfractionBase = 3;
- };
- controls {
- XmArrowButton arrowB1;
- XmArrowButton arrowB2;
- XmArrowButton arrowB3;
- XmArrowButton arrowB4;
- };
- };
- };
-};
-
-object arrowB1 : XmArrowButton {
- arguments {
- arguments formArgs;
- XmNleftPosition = 0; XmNrightPosition = 1;
- XmNtopPosition = 1; XmNbottomPosition = 2;
- XmNarrowDirection = XmARROW_LEFT;
- XmNshadowThickness = 0;
- };
-};
-object arrowB2 : XmArrowButton {
- arguments {
- arguments formArgs;
- XmNleftPosition = 2; XmNrightPosition = 3;
- XmNtopPosition = 1; XmNbottomPosition = 2;
- XmNarrowDirection = XmARROW_RIGHT;
- XmNshadowThickness = 0;
- };
-};
-object arrowB3 : XmArrowButton {
- arguments {
- arguments formArgs;
- XmNleftPosition = 1; XmNrightPosition = 2;
- XmNtopPosition = 0; XmNbottomPosition = 1;
- XmNarrowDirection = XmARROW_UP;
- XmNshadowThickness = 0;
- };
-};
-object arrowB4 : XmArrowButton {
- arguments {
- arguments formArgs;
- XmNleftPosition = 1; XmNrightPosition = 2;
- XmNtopPosition = 2; XmNbottomPosition = 3;
- XmNarrowDirection = XmARROW_DOWN;
- XmNshadowThickness = 0;
- };
-};
-
-object pushFrame : XmFrame {
- arguments {
- arguments formArgs;
- XmNleftPosition = x1; XmNrightPosition = x2;
- XmNtopPosition = y2; XmNbottomPosition = y3;
- XmNmarginWidth = boxMarginWidth;
- XmNmarginHeight = boxMarginWidth;
- };
- controls {
- XmLabel { arguments {
- arguments titleArgs;
- XmNlabelString = pushFrameText;
- }; };
- XmForm {
- controls {
- XmPushButton { arguments {
- XmNleftAttachment = XmATTACH_FORM;
- XmNrightAttachment = XmATTACH_FORM;
- XmNtopAttachment = XmATTACH_POSITION;
- XmNtopPosition = 10;
- XmNbottomAttachment = XmATTACH_POSITION;
- XmNbottomPosition = 90;
- XmNlabelString = pushButtonText;
- }; };
- };
- };
- };
-};
-
-object toggleFrame : XmFrame {
- arguments {
- arguments formArgs;
- XmNleftPosition = x1; XmNrightPosition = x2;
- XmNtopPosition = y1; XmNbottomPosition = y2;
- XmNmarginWidth = boxMarginWidth;
- XmNmarginHeight = boxMarginWidth;
- };
- controls {
- XmLabel { arguments {
- arguments titleArgs;
- XmNlabelString = toggleFrameText;
- }; };
- XmForm { controls { XmToggleButton toggleButton; }; };
- };
-};
-
-object toggleButton : XmToggleButton {
- arguments {
- XmNleftAttachment = XmATTACH_FORM;
- XmNrightAttachment = XmATTACH_FORM;
- XmNtopAttachment = XmATTACH_POSITION;
- XmNtopPosition = 10;
- XmNbottomAttachment = XmATTACH_POSITION;
- XmNbottomPosition = 90;
- XmNlabelString = toggleButtonText;
- };
- callbacks {
- XmNvalueChangedCallback = procedure ToggleLightsCb();
- };
-};
-
-object labelFrame : XmFrame {
- arguments {
- arguments formArgs;
- XmNleftPosition = x0; XmNrightPosition = x1;
- XmNtopPosition = y2; XmNbottomPosition = y3;
- };
- controls {
- XmLabel { arguments {
- arguments titleArgs;
- XmNlabelString = labelFrameText;
- }; };
- XmForm { controls { XmLabel labelLabel; }; };
- };
-};
-
-object labelLabel : XmLabel {
- arguments {
- XmNleftAttachment = XmATTACH_FORM;
- XmNrightAttachment = XmATTACH_FORM;
- XmNtopAttachment = XmATTACH_FORM;
- XmNbottomAttachment = XmATTACH_FORM;
- XmNlabelString = labelText;
- };
-};
-
-object optionFrame : XmFrame {
- arguments {
- arguments formArgs;
- XmNleftPosition = x7; XmNrightPosition = x8;
- XmNtopPosition = y2; XmNbottomPosition = y3;
- };
- controls {
- XmLabel { arguments {
- arguments titleArgs;
- XmNlabelString = optionFrameText;
- }; };
- XmOptionMenu {
- arguments {
- XmNlabelString = optionMenuText;
- XmNorientation = XmVERTICAL;
- XmNmnemonic = keysym(optionMenuMnem);
- };
- controls {
- XmPulldownMenu {
- arguments { XmNtearOffModel = XmTEAR_OFF_ENABLED; };
- controls {
- XmPushButton { arguments {
- XmNlabelString = sundayButtonText;
- XmNmnemonic = keysym(sundayButtonMnem);
- }; };
- XmPushButton { arguments {
- XmNlabelString = mondayButtonText;
- XmNmnemonic = keysym(mondayButtonMnem);
- }; };
- XmPushButton { arguments {
- XmNlabelString = tuesdayButtonText;
- XmNmnemonic = keysym(tuesdayButtonMnem);
- }; };
- XmPushButton { arguments {
- XmNlabelString = wednesdayButtonText;
- XmNmnemonic = keysym(wednesdayButtonMnem);
- }; };
- XmPushButton { arguments {
- XmNlabelString = thursdayButtonText;
- XmNmnemonic = keysym(thursdayButtonMnem);
- }; };
- XmPushButton { arguments {
- XmNlabelString = fridayButtonText;
- XmNmnemonic = keysym(fridayButtonMnem);
- }; };
- XmPushButton { arguments {
- XmNlabelString = saturdayButtonText;
- XmNmnemonic = keysym(saturdayButtonMnem);
- }; };
- };
- };
- };
- };
- };
-};
-
-object scaleFrame : XmFrame {
- arguments {
- arguments formArgs;
- XmNleftPosition = x6; XmNrightPosition = x7;
- XmNtopPosition = y1; XmNbottomPosition = y2;
- XmNmarginWidth = boxMarginWidth;
- XmNmarginHeight = boxMarginHeight;
- };
- controls {
- XmLabel { arguments {
- arguments titleArgs;
- XmNlabelString = scaleFrameText;
- }; };
- XmForm { controls { XmScale valueScale; }; };
- };
-};
-
-object valueScale : XmScale {
- arguments {
- XmNleftAttachment = XmATTACH_FORM;
- XmNrightAttachment = XmATTACH_FORM;
- XmNtopAttachment = XmATTACH_POSITION;
- XmNtopPosition = 15;
- XmNshowValue = true;
- XmNminimum = scaleMinimum;
- XmNmaximum = scaleMaximum;
- XmNvalue = scaleValue;
- XmNdecimalPoints = 1;
- XmNtitleString = scaleTitleText;
- XmNorientation = XmHORIZONTAL;
- };
- callbacks {
- XmNdragCallback = procedure ScaleCb();
- XmNvalueChangedCallback = procedure ScaleCb();
- };
-};
-
-object radioFrame : XmFrame {
- arguments {
- arguments formArgs;
- XmNleftPosition = x7; XmNrightPosition = x8;
- XmNtopPosition = y1; XmNbottomPosition = y2;
- };
- controls {
- XmLabel { arguments {
- arguments titleArgs;
- XmNlabelString = radioFrameText;
- }; };
- XmRadioBox {
- arguments { XmNradioAlwaysOne = true; XmNspacing = 0; };
- controls {
- XmToggleButton {
- arguments {
- XmNlabelString = radio1Text; XmNset = true;
- };
- callbacks { XmNvalueChangedCallback = procedure
- SetScaleCb(radio1Value);
- };
- };
- XmToggleButton {
- arguments { XmNlabelString = radio2Text; };
- callbacks { XmNvalueChangedCallback = procedure
- SetScaleCb(radio2Value);
- };
- };
- XmToggleButton {
- arguments { XmNlabelString = radio3Text; };
- callbacks { XmNvalueChangedCallback = procedure
- SetScaleCb(radio3Value);
- };
- };
- };
- };
- };
-};
-
-object textFrame : XmFrame {
- arguments {
- arguments formArgs;
- XmNleftPosition = x4; XmNrightPosition = x5;
- XmNtopPosition = y2; XmNbottomPosition = y3;
- XmNmarginWidth = boxMarginWidth;
- XmNmarginHeight = boxMarginHeight;
- };
- controls {
- XmLabel { arguments {
- arguments titleArgs;
- XmNlabelString = textFrameText;
- }; };
- XmText { arguments {
- XmNeditMode = XmMULTI_LINE_EDIT;
- }; };
- };
-};
-
-object scrollFrame : XmFrame {
- arguments {
- arguments formArgs;
- XmNleftPosition = x3; XmNrightPosition = x4;
- XmNtopPosition = y2; XmNbottomPosition = y3;
- XmNmarginWidth = boxMarginWidth;
- XmNmarginHeight = boxMarginHeight;
- };
- controls {
- XmLabel { arguments {
- arguments titleArgs;
- XmNlabelString = scrollFrameText;
- }; };
- XmForm {
- controls {
- XmScrollBar { arguments {
- XmNleftAttachment = XmATTACH_FORM;
- XmNrightAttachment = XmATTACH_FORM;
- XmNbottomAttachment = XmATTACH_POSITION;
- XmNbottomPosition = 50;
- XmNtraversalOn = true;
- XmNhighlightThickness = 2;
- XmNorientation = XmHORIZONTAL;
- }; };
- };
- };
- };
-};
-
-object listFrame : XmFrame {
- arguments {
- arguments formArgs;
- XmNleftPosition = x6; XmNrightPosition = x7;
- XmNtopPosition = y2; XmNbottomPosition = y3;
- XmNmarginWidth = boxMarginWidth;
- XmNmarginHeight = boxMarginHeight;
- };
- controls {
- XmLabel { arguments {
- arguments titleArgs;
- XmNlabelString = listFrameText;
- }; };
- XmScrolledList { arguments {
- XmNitems = greekAlphabet;
- }; };
- };
-};
-
-object paneFrame : XmFrame {
- arguments {
- arguments formArgs;
- XmNleftPosition = x6; XmNrightPosition = x8;
- XmNtopPosition = y3; XmNbottomPosition = y5;
- XmNmarginWidth = boxMarginWidth;
- XmNmarginHeight = boxMarginHeight;
- };
- controls {
- XmLabel { arguments {
- arguments titleArgs;
- XmNlabelString = paneFrameText;
- }; };
- XmPanedWindow { controls {
- XmScrolledText { arguments {
- XmNvalue = pane1Text;
- XmNeditMode = XmMULTI_LINE_EDIT;
- }; };
- XmScrolledText { arguments {
- XmNvalue = pane2Text;
- XmNeditMode = XmMULTI_LINE_EDIT;
- }; };
- }; };
- };
-};
-
-object popupFrame : XmFrame {
- arguments {
- arguments formArgs;
- XmNleftPosition = x7; XmNrightPosition = x8;
- XmNtopPosition = y0; XmNbottomPosition = y1;
- XmNmarginWidth = boxMarginWidth;
- XmNmarginHeight = boxMarginHeight;
- };
- controls {
- XmLabel { arguments {
- arguments titleArgs;
- XmNlabelString = popupFrameText;
- }; };
- XmForm { controls { XmLabel popupWindow; }; };
- };
-};
-
-object popupWindow : XmLabel {
- arguments {
- XmNleftAttachment = XmATTACH_FORM;
- XmNrightAttachment = XmATTACH_FORM;
- XmNtopAttachment = XmATTACH_FORM;
- XmNbottomAttachment = XmATTACH_FORM;
- XmNborderWidth = 1;
- XmNlabelString = popupWindowText;
- XmNtraversalOn = true;
- };
- controls { unmanaged XmPopupMenu popupMenu; };
-};
-
-object popupMenu : XmPopupMenu {
- arguments { XmNtearOffModel = XmTEAR_OFF_ENABLED; };
- controls {
- XmLabel { arguments { XmNlabelString = popupTitleText; }; };
- XmSeparator { arguments { XmNseparatorType = XmDOUBLE_LINE; }; };
- XmPushButton {
- arguments {
- XmNlabelString = popupUndoText;
- XmNmnemonic = keysym(popupUndoMnem);
- };
- };
- XmSeparator { };
- XmPushButton {
- arguments {
- XmNlabelString = popupCutText;
- XmNmnemonic = keysym(popupCutMnem);
- };
- };
- XmPushButton {
- arguments {
- XmNlabelString = popupCopyText;
- XmNmnemonic = keysym(popupCopyMnem);
- };
- };
- XmPushButton {
- arguments {
- XmNlabelString = popupPasteText;
- XmNmnemonic = keysym(popupPasteMnem);
- };
- };
- XmSeparator { };
- XmPushButton {
- arguments {
- XmNlabelString = popupClearText;
- XmNmnemonic = keysym(popupClearMnem);
- };
- };
- XmPushButton {
- arguments {
- XmNlabelString = popupDeleteText;
- XmNmnemonic = keysym(popupDeleteMnem);
- };
- };
- };
- callbacks {
- MrmNcreateCallback = procedure InitPopupCb("*popupWindow");
- XmNpopdownCallback = procedure PopdownCb();
- };
-};
-
-object drawFrame : XmFrame {
- arguments {
- arguments formArgs;
- XmNleftPosition = x5; XmNrightPosition = x6;
- XmNtopPosition = y2; XmNbottomPosition = y3;
- XmNmarginWidth = boxMarginWidth;
- XmNmarginHeight = boxMarginHeight;
- };
- controls {
- XmLabel { arguments {
- arguments titleArgs;
- XmNlabelString = drawFrameText;
- }; };
- XmFrame {
- arguments {
- XmNshadowType = XmSHADOW_IN;
- XmNshadowThickness = 2;
- };
- controls { XmDrawingArea drawArea; };
- };
- };
-};
-
-object drawArea : XmDrawingArea {
- arguments {
- XmNtraversalOn = false;
- };
- callbacks {
- XmNexposeCallback = procedure DaExposeCb();
- XmNresizeCallback = procedure DaResizeCb();
- };
-};
-
-object drawBtnFrame : XmFrame {
- arguments {
- arguments formArgs;
- XmNleftPosition = x2; XmNrightPosition = x3;
- XmNtopPosition = y2; XmNbottomPosition = y3;
- XmNmarginWidth = 2 * boxMarginWidth;
- XmNmarginHeight = 2 * boxMarginHeight;
- };
- controls {
- XmLabel { arguments {
- arguments titleArgs;
- XmNlabelString = drawBtnFrameText;
- }; };
- XmDrawnButton drawnButton;
- };
-};
-
-object drawnButton : XmDrawnButton {
- arguments {
- XmNpushButtonEnabled = true;
- };
- callbacks {
- XmNexposeCallback = procedure DbExposeCb();
- XmNresizeCallback = procedure DbResizeCb();
- XmNactivateCallback = procedure ShowCb("*showDialog");
- };
-};
-
-object commandFrame : XmFrame {
- arguments {
- arguments formArgs;
- XmNleftPosition = x0; XmNrightPosition = x2;
- XmNtopPosition = y3; XmNbottomPosition = y5;
- };
- controls {
- XmLabel { arguments {
- arguments titleArgs;
- XmNlabelString = commandFrameText;
- }; };
- XmCommand {
- arguments {
- XmNmarginWidth = 4;
- XmNmarginHeight = 4;
- XmNhistoryMaxItems = 20;
- XmNpromptString = commandPromptText;
- };
- };
- };
-};
-
-object dialogFrame : XmFrame {
- arguments {
- arguments formArgs;
- XmNleftPosition = x2; XmNrightPosition = x6;
- XmNtopPosition = y3; XmNbottomPosition = y5;
- XmNmarginWidth = boxMarginWidth;
- XmNmarginHeight = boxMarginHeight;
- };
- controls {
- XmLabel { arguments {
- arguments titleArgs;
- XmNlabelString = dialogFrameText;
- }; };
- XmForm dialogForm;
- };
-};
-
-object dialogForm : XmForm {
- arguments {
- XmNfractionBase = 3;
- };
- controls {
- XmToggleButton templatePick;
- XmToggleButton infoPick;
- XmToggleButton warningPick;
- XmToggleButton errorPick;
- XmToggleButton questionPick;
- XmToggleButton workingPick;
- XmToggleButton filePick;
- XmToggleButton selectPick;
- XmToggleButton promptPick;
- };
-};
-
-object templatePick : XmToggleButton {
- arguments {
- arguments formArgs;
- XmNleftPosition = 0; XmNrightPosition = 1;
- XmNtopPosition = 1; XmNbottomPosition = 2;
- arguments toggleArgs;
- XmNlabelString = templatePickText;
- };
- callbacks {
- XmNvalueChangedCallback = procedure ManageCb("*templateDialog");
- };
-};
-object infoPick : XmToggleButton {
- arguments {
- arguments formArgs;
- XmNleftPosition = 1; XmNrightPosition = 2;
- XmNtopPosition = 0; XmNbottomPosition = 1;
- arguments toggleArgs;
- XmNlabelString = infoPickText;
- };
- callbacks {
- XmNvalueChangedCallback = procedure ManageCb("*infoDialog");
- };
-};
-object warningPick : XmToggleButton {
- arguments {
- arguments formArgs;
- XmNleftPosition = 1; XmNrightPosition = 2;
- XmNtopPosition = 1; XmNbottomPosition = 2;
- arguments toggleArgs;
- XmNlabelString = warningPickText;
- };
- callbacks {
- XmNvalueChangedCallback = procedure ManageCb("*warningDialog");
- };
-};
-object errorPick : XmToggleButton {
- arguments {
- arguments formArgs;
- XmNleftPosition = 0; XmNrightPosition = 1;
- XmNtopPosition = 0; XmNbottomPosition = 1;
- arguments toggleArgs;
- XmNlabelString = errorPickText;
- };
- callbacks {
- XmNvalueChangedCallback = procedure ManageCb("*errorDialog");
- };
-};
-object questionPick : XmToggleButton {
- arguments {
- arguments formArgs;
- XmNleftPosition = 2; XmNrightPosition = 3;
- XmNtopPosition = 0; XmNbottomPosition = 1;
- arguments toggleArgs;
- XmNlabelString = questionPickText;
- };
- callbacks {
- XmNvalueChangedCallback = procedure ManageCb("*questionDialog");
- };
-};
-object workingPick : XmToggleButton {
- arguments {
- arguments formArgs;
- XmNleftPosition = 2; XmNrightPosition = 3;
- XmNtopPosition = 1; XmNbottomPosition = 2;
- arguments toggleArgs;
- XmNlabelString = workingPickText;
- };
- callbacks {
- XmNvalueChangedCallback = procedure ManageCb("*workingDialog");
- };
-};
-object filePick : XmToggleButton {
- arguments {
- arguments formArgs;
- XmNleftPosition = 0; XmNrightPosition = 1;
- XmNtopPosition = 2; XmNbottomPosition = 3;
- arguments toggleArgs;
- XmNlabelString = filePickText;
- };
- callbacks {
- XmNvalueChangedCallback = procedure ManageCb("*fileDialog");
- };
-};
-object selectPick : XmToggleButton {
- arguments {
- arguments formArgs;
- XmNleftPosition = 2; XmNrightPosition = 3;
- XmNtopPosition = 2; XmNbottomPosition = 3;
- arguments toggleArgs;
- XmNlabelString = selectPickText;
- };
- callbacks {
- XmNvalueChangedCallback = procedure ManageCb("*selectDialog");
- };
-};
-object promptPick : XmToggleButton {
- arguments {
- arguments formArgs;
- XmNleftPosition = 1; XmNrightPosition = 2;
- XmNtopPosition = 2; XmNbottomPosition = 3;
- arguments toggleArgs;
- XmNlabelString = promptPickText;
- };
- callbacks {
- XmNvalueChangedCallback = procedure ManageCb("*promptDialog");
- };
-};
-
-
-
-
-!
-! Dialog widgets
-!
-
-object templateDialog : XmTemplateDialog{
- arguments {
- XmNokLabelString = templateOkText;
- XmNcancelLabelString = templateCancelText;
- XmNdialogTitle = templateTitleText;
- XmNautoUnmanage = false;
- };
- controls {
- XmMenuBar templateMenuBar;
- XmScrolledText { arguments {
- XmNeditMode = XmMULTI_LINE_EDIT;
- XmNrows = 10;
- };};
- XmPushButton { arguments { XmNlabelString = templateIncludeText; }; };
- XmPushButton { arguments { XmNlabelString = templateDraftText; }; };
- XmPushButton { arguments { XmNlabelString = templateSpellText; }; };
- };
- callbacks {
- XmNcancelCallback = procedure UnmanageCb("*templateDialog");
- XmNunmapCallback = procedure UnmapCb();
- };
-};
-
-object templateMenuBar : XmMenuBar {
- arguments { };
- controls { XmCascadeButton templateFileCascade; };
-};
-
-object templateFileCascade : XmCascadeButton {
- arguments {
- XmNlabelString = templateCascadeText;
- XmNmnemonic = keysym(templateCascadeMnem);
- };
- controls { XmPulldownMenu {
- arguments { XmNtearOffModel = XmTEAR_OFF_ENABLED; };
- controls {
- XmPushButton sendButton;
- XmPushButton includeButton;
- XmPushButton draftButton;
- XmPushButton spellButton;
- XmPushButton cancelButton;
- }; };
- };
-};
-
-object sendButton : XmPushButton {
- arguments {
- XmNlabelString = templateOkText;
- XmNmnemonic = keysym(templateOkMnem);
- };
-};
-object includeButton : XmPushButton {
- arguments {
- XmNlabelString = templateIncludeText;
- XmNmnemonic = keysym(templateIncludeMnem);
- };
-};
-object draftButton : XmPushButton {
- arguments {
- XmNlabelString = templateDraftText;
- XmNmnemonic = keysym(templateDraftMnem);
- };
-};
-object spellButton : XmPushButton {
- arguments {
- XmNlabelString = templateSpellText;
- XmNmnemonic = keysym(templateSpellMnem);
- };
-};
-object cancelButton : XmPushButton {
- arguments {
- XmNlabelString = templateCancelText;
- XmNmnemonic = keysym(templateCancelMnem);
- };
- callbacks {
- XmNactivateCallback = procedure UnmanageCb("*templateDialog");
- };
-};
-object showDialog : XmInformationDialog {
- arguments {
- XmNdialogTitle = "OSF/Motif Release 1.2";
- XmNcancelLabelString = "Enjoy!";
- XmNmessageString =
- compound_string("OSF/Motif Release 1.2", separate = true) &
- compound_string("", separate = true) &
- compound_string("May 1992", separate = true) &
- compound_string("", separate = true) &
- compound_string("Dev: Vania, Ellis, Mike C, Mike Y, ") &
- compound_string ("Al, Scott, Daniel, Andrew, Pam") &
- compound_string("", separate = true) &
- compound_string("", separate = true) &
- compound_string("QA: Libby, Carl, Tom, Ramesh, ") &
- compound_string("Susan, Shobana", separate = true) &
- compound_string("", separate = true) &
- compound_string("Doc: Bob M, Ken, Bob C.",separate=true) &
- compound_string("", separate = true) &
- compound_string("Rats: Yakov, Bruce",separate=true) &
- compound_string("", separate = true) &
- compound_string("VTS: Carlos, Roy",separate=true) &
- compound_string("", separate = true) &
- compound_string("Sys: David, Kevin, Chauncy, Ron, ") &
- compound_string("Weidong, Barbara", separate = true) &
- compound_string("", separate = true) &
- compound_string("Ops: Bruce, Cathy", separate = true) &
- compound_string("");
- };
- controls {
- Xm_OK unmanaged { };
- Xm_Help unmanaged { };
- };
-};
-
-object infoDialog : XmInformationDialog {
- arguments {
- XmNdialogTitle = informationTitleText;
- XmNmessageString = infoMessageText;
- XmNcancelLabelString = infoCancelText;
- };
- controls {
- Xm_OK unmanaged { };
- Xm_Help unmanaged { };
- };
- callbacks { XmNunmapCallback = procedure UnmapCb(); };
-};
-
-object warningDialog : XmWarningDialog {
- arguments {
- XmNdialogTitle = warningTitleText;
- XmNmessageString = warningMessageText;
- XmNokLabelString = warningOkText;
- XmNcancelLabelString = warningCancelText;
- };
- controls {
- Xm_Help unmanaged { };
- };
- callbacks { XmNunmapCallback = procedure UnmapCb(); };
-};
-
-object errorDialog : XmErrorDialog {
- arguments {
- XmNdialogTitle = errorTitleText;
- XmNmessageString = errorMessageText;
- XmNokLabelString = errorOkText;
- XmNcancelLabelString = errorCancelText;
- };
- controls {
- Xm_Help unmanaged { };
- };
- callbacks { XmNunmapCallback = procedure UnmapCb(); };
-};
-
-object questionDialog : XmQuestionDialog {
- arguments {
- XmNdialogTitle = questionTitleText;
- XmNmessageString = questionMessageText;
- XmNokLabelString = questionYesText;
- XmNcancelLabelString = questionNoText;
- };
- controls {
- Xm_Help unmanaged { };
- XmPushButton { arguments { XmNlabelString = questionMaybeText; }; };
- };
- callbacks { XmNunmapCallback = procedure UnmapCb(); };
-};
-
-object workingDialog : XmWorkingDialog {
- arguments {
- XmNcancelLabelString = workingCancelText;
- XmNdialogTitle = workingTitleText;
- };
- controls {
- Xm_OK unmanaged { };
- Xm_Help unmanaged { };
- Xm_Message unmanaged { };
- XmScale { arguments {
- XmNorientation = XmHORIZONTAL;
- XmNshowValue = true;
- XmNtitleString = workingScaleText;
- }; };
- };
- callbacks { XmNunmapCallback = procedure UnmapCb(); };
-};
-
-object fileDialog : XmFileSelectionDialog {
- arguments {
- XmNautoUnmanage = true;
- XmNdialogTitle = fileTitleText;
- XmNselectionLabelString = fileSelectText;
- XmNlistLabelString = fileListText;
- XmNdirListLabelString = fileDirListText;
- XmNfileListLabelString = fileFileListText;
- XmNfilterLabelString = fileFilterLabelText;
- XmNnoMatchString = fileNoMatchText;
- XmNokLabelString = fileLoadText;
- XmNapplyLabelString = fileFilterText;
- XmNcancelLabelString = fileCancelText;
- XmNlistVisibleItemCount = 6;
- };
- controls {
- Xm_Help unmanaged { };
- unmanaged XmSeparator { }; ! First, a dummy work area child
- XmMenuBar fileMenuBar;
- XmPushButton { arguments { XmNlabelString = fileMergeText; }; };
- XmPushButton { arguments { XmNlabelString = fileRemoveText; }; };
- };
- callbacks { XmNunmapCallback = procedure UnmapCb(); };
-};
-
-object fileMenuBar : XmMenuBar {
- arguments { };
- controls { XmCascadeButton filterCascade; };
-};
-
-object filterCascade : XmCascadeButton {
- arguments {
- XmNlabelString = formatCascadeText;
- XmNmnemonic = keysym(formatCascadeMnem);
- };
- controls { XmPulldownMenu {
- arguments { XmNtearOffModel = XmTEAR_OFF_ENABLED; };
- controls {
- XmPushButton audioButton;
- XmPushButton graphicsButton;
- XmPushButton textButton;
- }; };
- };
-};
-
-object audioButton : XmPushButton {
- arguments {
- XmNlabelString = audioButtonText;
- XmNmnemonic = keysym(audioButtonMnem);
- };
-};
-object graphicsButton : XmPushButton {
- arguments {
- XmNlabelString = graphicsButtonText;
- XmNmnemonic = keysym(graphicsButtonMnem);
- };
-};
-object textButton : XmPushButton {
- arguments {
- XmNlabelString = textButtonText;
- XmNmnemonic = keysym(textButtonMnem);
- };
-};
-
-object selectDialog : XmSelectionDialog {
- arguments {
- XmNdialogTitle = selectTitleText;
- XmNlistItems = greekAlphabet;
- XmNlistVisibleItemCount = 6;
-
- XmNselectionLabelString = selectSelectionText;
- XmNlistLabelString = selectListText;
- XmNokLabelString = selectOkText;
- XmNapplyLabelString = selectApplyText;
- XmNcancelLabelString = selectCancelText;
- };
- controls {
- Xm_Help unmanaged { };
- };
- callbacks { XmNunmapCallback = procedure UnmapCb(); };
-};
-
-object promptDialog : XmPromptDialog {
- arguments {
- XmNdialogTitle = promptTitleText;
- XmNselectionLabelString = promptMessageText;
- XmNokLabelString = promptOkText;
- XmNcancelLabelString = promptCancelText;
- };
- controls {
- Xm_Help unmanaged { };
- };
- callbacks { XmNunmapCallback = procedure UnmapCb(); };
-};
-
-end module;
+++ /dev/null
-! (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC.
-! ALL RIGHTS RESERVED
-!
-! Motif Release 1.2
-
-
-value
-
-greekAlphabet : string_table (
- "alpha", "beta", "gamma", "delta",
- "epsilon", "zeta", "eta", "theta",
- "iota", "kappa", "lambda", "mu",
- "nu", "xi", "omicron", "pi",
- "rho", "sigma", "tau", "upsilon",
- "phi", "chi", "psi", "omega");
-
-! Main Window
-
-! File menu
-
-fileCascadeText : "File";
-fileCascadeMnem : "F";
-newButtonText : "New";
-newButtonMnem : "N";
-openButtonText : "Open...";
-openButtonMnem : "O";
-saveButtonText : "Save";
-saveButtonMnem : "S";
-saveAsButtonText : "Save As...";
-saveAsButtonMnem : "A";
-printButtonText : "Print";
-printButtonMnem : "P";
-exitButtonText : "Exit";
-exitButtonMnem : "E";
-
-! Edit menu
-
-editCascadeText : "Edit";
-editCascadeMnem : "E";
-undoButtonText : "Undo";
-undoButtonMnem : "U";
-cutButtonText : "Cut";
-cutButtonMnem : "t";
-copyButtonText : "Copy";
-copyButtonMnem : "C";
-pasteButtonText : "Paste";
-pasteButtonMnem : "P";
-clearButtonText : "Clear";
-clearButtonMnem : "e";
-deleteButtonText : "Delete";
-deleteButtonMnem : "D";
-
-! View menu
-
-viewCascadeText : "View";
-viewCascadeMnem : "V";
-stackButtonText : "Stack";
-stackButtonMnem : "S";
-tileButtonText : "Tile";
-tileButtonMnem : "T";
-dayButtonText : "Day";
-dayButtonMnem : "D";
-weekButtonText : "Week";
-weekButtonMnem : "W";
-monthButtonText : "Month";
-monthButtonMnem : "M";
-yearButtonText : "Year";
-yearButtonMnem : "Y";
-
-! Options menu
-
-optionsCascadeText : "Options";
-optionsCascadeMnem : "O";
-fontCascadeText : "Font";
-fontCascadeMnem : "F";
-smallFontButtonText : "Small";
-smallFontButtonMnem : "S";
-mediumFontButtonText : "Medium";
-mediumFontButtonMnem : "M";
-largeFontButtonText : "Large";
-largeFontButtonMnem : "L";
-directCascadeText : "Direction";
-directCascadeMnem : "D";
-upButtonText : "Up";
-upButtonMnem : "U";
-downButtonText : "Down";
-downButtonMnem : "D";
-leftButtonText : "Left";
-leftButtonMnem : "L";
-rightButtonText : "Right";
-rightButtonMnem : "R";
-caseButtonText : "Case Sensitive";
-caseButtonMnem : "C";
-wrapButtonText : "Word Wrap";
-wrapButtonMnem : "W";
-
-! Help menu
-
-helpCascadeText : "Help";
-helpCascadeMnem : "H";
-contextButtonText : "On Context";
-contextButtonMnem : "C";
-windowButtonText : "On Window";
-windowButtonMnem : "W";
-tutorButtonText : "Tutorial";
-tutorButtonMnem : "T";
-versionButtonText : "On Version";
-versionButtonMnem : "V";
-
-! periodic title
-
-titleLabelText : "The Periodic Table of Motif Widgets";
-subtitleLabelText : "Open Software Foundation";
-
-! widget names
-
-separatorFrameText : "Separator";
-arrowFrameText : "ArrowButton";
-pushFrameText : "PushButton";
-toggleFrameText : "ToggleButton";
-labelFrameText : "Label";
-optionFrameText : "OptionMenu";
-scaleFrameText : "Scale";
-radioFrameText : "RadioBox";
-textFrameText : "Text";
-scrollFrameText : "ScrollBar";
-listFrameText : "ScrolledList";
-paneFrameText : "PanedWindow";
-popupFrameText : "PopupMenu";
-drawFrameText : "DrawingArea";
-drawBtnFrameText : "DrawnButton";
-commandFrameText : "Command";
-
-dialogFrameText : "Dialogs";
-templateTitleText : "TemplateDialog";
-warningTitleText : "WarningDialog";
-workingTitleText : "WorkingDialog";
-informationTitleText : "InformationDialog";
-questionTitleText : "QuestionDialog";
-errorTitleText : "ErrorDialog";
-fileTitleText : "FileSelectionDialog";
-selectTitleText : "SelectionDialog";
-promptTitleText : "PromptDialog";
-
-! widget text
-
-pushButtonText : compound_string("Explode", separate = true) &
- compound_string("Building");
-
-toggleButtonText : "Lights";
-
-labelText : compound_string("DON'T", separate = true) &
- compound_string("PANIC");
-
-scaleTitleText : "MHz";
-scaleMinimum : 885;
-scaleMaximum : 1079;
-scaleValue : 1017;
-
-radio1Text : "WFNX";
-radio1Value : 1017;
-radio2Text : "WJUL";
-radio2Value : 915;
-radio3Text : "WGBH";
-radio3Value : 897;
-
-pane1Text : "Open Software Foundation";
-pane2Text : "OSF/Motif Release 1.2\n";
-
-popupWindowText : compound_string ("Press", separate = true) &
- compound_string ("Button 3", separate = true) &
- compound_string ("or", separate = true) &
- compound_string ("Menu");
-
-popupTitleText : "Edit Menu";
-
-popupUndoText : "Undo";
-popupUndoMnem : "U";
-popupCutText : "Cut";
-popupCutMnem : "t";
-popupCopyText : "Copy";
-popupCopyMnem : "C";
-popupPasteText : "Paste";
-popupPasteMnem : "P";
-popupClearText : "Clear";
-popupClearMnem : "e";
-popupDeleteText : "Delete";
-popupDeleteMnem : "D";
-
-commandPromptText : "periodic >";
-
-templatePickText : "Template";
-infoPickText : "Information";
-warningPickText : "Warning";
-errorPickText : "Error";
-questionPickText : "Question";
-workingPickText : "Working";
-filePickText : "FileSelection";
-selectPickText : "Selection";
-promptPickText : "Prompt";
-
-! option menu
-
-optionMenuText : "Day";
-optionMenuMnem : "D";
-sundayButtonText : "Sunday";
-sundayButtonMnem : "S";
-mondayButtonText : "Monday";
-mondayButtonMnem : "M";
-tuesdayButtonText : "Tuesday";
-tuesdayButtonMnem : "T";
-wednesdayButtonText : "Wednesday";
-wednesdayButtonMnem : "W";
-thursdayButtonText : "Thursday";
-thursdayButtonMnem : "h";
-fridayButtonText : "Friday";
-fridayButtonMnem : "F";
-saturdayButtonText : "Saturday";
-saturdayButtonMnem : "a";
-
-! Template dialog
-
-templateCascadeText : "File";
-templateCascadeMnem : "F";
-templateOkText : "Send";
-templateOkMnem : "S";
-templateCancelText : "Cancel";
-templateCancelMnem : "C";
-templateIncludeText : "Include...";
-templateIncludeMnem : "I";
-templateDraftText : "Draft";
-templateDraftMnem : "D";
-templateSpellText : "Spell";
-templateSpellMnem : "p";
-
-! Information dialog
-
-infoCancelText : "Dismiss";
-infoMessageText :
- compound_string("Congratulations!", separate = true) &
- compound_string("Bandwidth grab successful.", separate = true) &
- compound_string("", separate = true) &
- compound_string("Continue oscillation.");
-
-
-! Warning dialog
-
-warningOkText : "Proceed";
-warningCancelText : "Cancel";
-warningMessageText :
- compound_string("Warning, Warning,", separate = true) &
- compound_string("Danger Will Robinson...");
-
-
-! Error dialog
-
-errorOkText : "Retry";
-errorCancelText : "Cancel";
-errorMessageText :
- compound_string("Frontal lobe seek error!", separate = true) &
- compound_string("Intellect not installed.");
-
-! Question dialog
-
-questionYesText : "Yes";
-questionMaybeText : "Maybe";
-questionNoText : "No";
-questionMessageText :
- compound_string("This is Motif 1.2.", separate = true) &
- compound_string("", separate = true) &
- compound_string("Any questions ?");
-
-! Working dialog
-
-workingCancelText : "Abort";
-workingScaleText : "Percent Complete";
-
-! File Selection dialog
-
-fileSelectText : "Selection";
-fileListText : "List";
-fileLoadText : "Load";
-fileDirListText : "Directories";
-fileFileListText : "Files";
-fileFilterLabelText : "Filter";
-fileNoMatchText : " [ ] ";
-fileFilterText : "Filter";
-fileCancelText : "Cancel";
-fileMergeText : "Merge";
-fileRemoveText : "Remove";
-
-formatCascadeText : "Format";
-formatCascadeMnem : "F";
-audioButtonText : "Audio";
-audioButtonMnem : "A";
-graphicsButtonText : "Graphics";
-graphicsButtonMnem : "G";
-textButtonText : "Text";
-textButtonMnem : "T";
-
-! Selection dialog
-
-selectSelectionText : "Selection";
-selectListText : "Items";
-selectOkText : "Ok";
-selectApplyText : "Apply";
-selectCancelText : "Cancel";
-
-! Prompt dialog
-
-promptOkText : "Ok";
-promptCancelText : "Cancel";
-promptMessageText : "Name, please?";
-
-
+/*
+ * CDE - Common Desktop Environment
+ *
+ * Copyright (c) 1993-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 libraries and programs; if not, write
+ * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
+ * Floor, Boston, MA 02110-1301 USA
+ */
/*
* $XConsortium: StringPref.hh /main/3 1996/06/11 16:44:41 cde-hal $
*
+/*
+ * CDE - Common Desktop Environment
+ *
+ * Copyright (c) 1993-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 libraries and programs; if not, write
+ * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
+ * Floor, Boston, MA 02110-1301 USA
+ */
/*
* $XConsortium: UserPreference.hh /main/3 1996/06/11 16:44:56 cde-hal $
*