home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-07-30 | 37.0 KB | 1,045 lines |
- Newsgroups: comp.sources.misc
- From: sbo@vlsi.polymtl.ca (Stephane Boucher)
- Subject: v31i057: bam - [OpenLook|Athena] menu system for [GNU|Epoch|Lucid] Emacs, Part01/07
- Message-ID: <csm-v31i057=bam.232156@sparky.IMD.Sterling.COM>
- X-Md4-Signature: 67cf01552da1d8877fb9feb93d9c959c
- Date: Fri, 31 Jul 1992 04:22:40 GMT
- Approved: kent@sparky.imd.sterling.com
-
- Submitted-by: sbo@vlsi.polymtl.ca (Stephane Boucher)
- Posting-number: Volume 31, Issue 57
- Archive-name: bam/part01
- Environment: Lex, Yacc, SunOS 4.x with XView or BSD Unix with Athena Widget
- Supersedes: bam: Volume 27, Issue 68-69
-
- Overview
- ********
-
- (For those who already know bam, the main changes are: added
- support for athena, highly, improved elisp interface, new
- and improved menus)
-
- This is BAM (Born Again Menus) a menu system for GNU
- Emacs. It provides a GUI front-end to GNU Emacs. In it's
- current state, it is not a full fledge GUI, but it is easilly
- customizable and extensible. Note however that this package
- does not provide direct mouse support in the Emacs window (i.e.
- no scrollbar, no cut-and-paste, no pop-up menu, ...).
-
- It is most useful to ease the transition from other
- text-editors to GNU Emacs, since basic commands are mouse
- selectable. First-timers won't be overwhelmed by GNU Emacs
- apparent complexity and system administrator will spend less
- time repeating all the time "Press `C-h i m emacs RET' and
- RTFM" (Dream on... :-)
-
- Note that it is still used, despite the availability of
- Lucid Emacs because, among other things, it is currently the
- only menu system (to the authors knowledge) for emacs that
- has pushpin so you can keep your menus open (only available
- with the Xview version).
-
- Also, if you stay with the standard Emacs (GNU Emacs 18.58)
- you have the hability to have the base menu as part of the
- Emacs window (only available with Athena).
-
- None of the above require any changes to Emacs' sources.
-
- Enjoy.
- -Stephane, Hans and the other contributors.
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 1 (of 7)."
- # Contents: bam-2.0 bam-2.0/FindWindow.h bam-2.0/GrabAndManage.h
- # bam-2.0/GrabAndManageP.h bam-2.0/athena.h
- # bam-2.0/bam-defaults.el-dist bam-2.0/bemacs-dist bam-2.0/config.h
- # bam-2.0/emacs_init-dist bam-2.0/frame.c bam-2.0/menu.icon
- # bam-2.0/menus bam-2.0/menus bam-2.0/menus.c bam-2.0/menus/ex1
- # bam-2.0/menus/ex1.el bam-2.0/menus/latex.el bam-2.0/menusxv.c
- # bam-2.0/paths.h-dist bam-2.0/send.c bam-2.0/strstore.h
- # bam-2.0/trial.el bam-2.0/utils bam-2.0/utils
- # bam-2.0/utils/strdup.c
- # Wrapped by sbo@froh on Mon Jul 27 20:11:47 1992
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test ! -d 'bam-2.0' ; then
- echo shar: Creating directory \"'bam-2.0'\"
- mkdir 'bam-2.0'
- fi
- if test -f 'bam-2.0/FindWindow.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bam-2.0/FindWindow.h'\"
- else
- echo shar: Extracting \"'bam-2.0/FindWindow.h'\" \(1072 characters\)
- sed "s/^X//" >'bam-2.0/FindWindow.h' <<'END_OF_FILE'
- X/* bam - the Born Again Menus for GNU Emacs.
- X Copyright (C) 1992 Hans Olsson.
- X
- X This program is free software; you can redistribute it and/or modify
- X it under the terms of the GNU General Public License as published by
- X the Free Software Foundation; either version 1, or (at your option)
- X any later version.
- X
- X This program is distributed in the hope that it will be useful,
- X but WITHOUT ANY WARRANTY; without even the implied warranty of
- X MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X GNU General Public License for more details.
- X
- X You should have received a copy of the GNU General Public License
- X along with this program; if not, write to the Free Software
- X Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X
- X In other words, you are welcome to use, share and improve this program.
- X You are forbidden to forbid anyone else to use, share and improve
- X what you give them. Help stamp out software-hoarding!
- X*/
- X/* $Id: FindWindow.h,v 1.1 1992/07/02 00:59:46 sbo Exp $ */
- X
- Xextern Window Window_With_Name();
- X
- END_OF_FILE
- if test 1072 -ne `wc -c <'bam-2.0/FindWindow.h'`; then
- echo shar: \"'bam-2.0/FindWindow.h'\" unpacked with wrong size!
- fi
- # end of 'bam-2.0/FindWindow.h'
- fi
- if test -f 'bam-2.0/GrabAndManage.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bam-2.0/GrabAndManage.h'\"
- else
- echo shar: Extracting \"'bam-2.0/GrabAndManage.h'\" \(1964 characters\)
- sed "s/^X//" >'bam-2.0/GrabAndManage.h' <<'END_OF_FILE'
- X/*
- X Public header file for the GrabAndManage Widget
- X
- X The GrabAndManage Widget finds another applications window
- X and reparents it so it will become its own window.
- X*/
- X
- X
- X#ifndef _GrabAndManage_h
- X#define _GrabAndManage_h
- X
- X/****************************************************************
- X *
- X * GrabAndManage widget
- X *
- X ****************************************************************/
- X
- X/* Core Resources:
- X
- X Name Class RepType Default Value
- X ---- ----- ------- -------------
- X background Background Pixel XtDefaultBackground
- X border BorderColor Pixel XtDefaultForeground
- X borderWidth BorderWidth Dimension 1
- X destroyCallback Callback Pointer NULL
- X height Height Dimension window height
- X mappedWhenManaged MappedWhenManaged Boolean True
- X sensitive Sensitive Boolean True
- X width Width Dimension window widht
- X x Position Position 0
- X y Position Position 0
- X GrabAndManage specific resources:
- X
- X windowName WindowName String NULL
- X winSelectString WinSelectString String "click on window to manage"
- X winX Position Position 0
- X winY Position Position 0
- X winWidth Width Dimension 0
- X winHeight Height Dimension 0
- X
- X*/
- X
- Xtypedef struct _GrabAndManageClassRec *GrabAndManageWidgetClass;
- Xtypedef struct _GrabAndManageRec *GrabAndManageWidget;
- X
- X/* Resource names, special for the GrabAndManageWidget */
- X
- X#define XtNwindowName "windowName"
- X#define XtCWindowName "WindowName"
- X#define XtNwinSelectString "winSelectString"
- X#define XtCWinSelectString "WinSelectString"
- X#define XtNwinX "winX"
- X#define XtNwinY "winY"
- X#define XtNwinWidth "winWidth"
- X#define XtNwinHeight "winHeight"
- X
- X/* declare the class constant */
- X
- Xextern WidgetClass grabAndManageWidgetClass;
- X
- X#endif /* _GrabAndManage_h */
- END_OF_FILE
- if test 1964 -ne `wc -c <'bam-2.0/GrabAndManage.h'`; then
- echo shar: \"'bam-2.0/GrabAndManage.h'\" unpacked with wrong size!
- fi
- # end of 'bam-2.0/GrabAndManage.h'
- fi
- if test -f 'bam-2.0/GrabAndManageP.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bam-2.0/GrabAndManageP.h'\"
- else
- echo shar: Extracting \"'bam-2.0/GrabAndManageP.h'\" \(927 characters\)
- sed "s/^X//" >'bam-2.0/GrabAndManageP.h' <<'END_OF_FILE'
- X/*
- X Private header file for the GrabAndManageWidget
- X*/
- X
- X#ifndef _GrabAndManageP_h
- X#define _GrabAndManageP_h
- X#include "GrabAndManage.h"
- X#include <X11/CoreP.h>
- X
- Xtypedef struct {
- X int empty;
- X} GrabAndManageClassPart;
- X
- Xtypedef struct _GrabAndManageClassRec {
- X CoreClassPart core_class;
- X GrabAndManageClassPart GrabAndManage_class;
- X} GrabAndManageClassRec;
- X
- Xextern GrabAndManageClassRec grabAndManageClassRec;
- X
- Xtypedef struct _GrabAndManagePart {
- X /* resources */
- X String window_name; /* name of the window to grab */
- X String select_string; /* prompt for window selection */
- X /* private state */
- X Window app_window;
- X Dimension app_border_width;
- X /* public state */
- X Position winX,winY;
- X Dimension winWidth,winHeight;
- X} GrabAndManagePart;
- X
- Xtypedef struct _GrabAndManageRec {
- X CorePart core;
- X GrabAndManagePart grabAndManage;
- X} GrabAndManageRec;
- X
- X#endif /* _GrabAndManageP_h */
- X
- END_OF_FILE
- if test 927 -ne `wc -c <'bam-2.0/GrabAndManageP.h'`; then
- echo shar: \"'bam-2.0/GrabAndManageP.h'\" unpacked with wrong size!
- fi
- # end of 'bam-2.0/GrabAndManageP.h'
- fi
- if test -f 'bam-2.0/athena.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bam-2.0/athena.h'\"
- else
- echo shar: Extracting \"'bam-2.0/athena.h'\" \(1086 characters\)
- sed "s/^X//" >'bam-2.0/athena.h' <<'END_OF_FILE'
- X/* bam - the Born Again Menus for GNU Emacs.
- X Copyright (C) 1992 Hans Olsson.
- X
- X This program is free software; you can redistribute it and/or modify
- X it under the terms of the GNU General Public License as published by
- X the Free Software Foundation; either version 1, or (at your option)
- X any later version.
- X
- X This program is distributed in the hope that it will be useful,
- X but WITHOUT ANY WARRANTY; without even the implied warranty of
- X MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X GNU General Public License for more details.
- X
- X You should have received a copy of the GNU General Public License
- X along with this program; if not, write to the Free Software
- X Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X
- X In other words, you are welcome to use, share and improve this program.
- X You are forbidden to forbid anyone else to use, share and improve
- X what you give them. Help stamp out software-hoarding!
- X*/
- X/* $Id: athena.h,v 1.1 1992/07/02 01:00:58 sbo Exp $ */
- X
- Xextern int window_main_loop();
- Xextern int do_init();
- END_OF_FILE
- if test 1086 -ne `wc -c <'bam-2.0/athena.h'`; then
- echo shar: \"'bam-2.0/athena.h'\" unpacked with wrong size!
- fi
- # end of 'bam-2.0/athena.h'
- fi
- if test -f 'bam-2.0/bam-defaults.el-dist' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bam-2.0/bam-defaults.el-dist'\"
- else
- echo shar: Extracting \"'bam-2.0/bam-defaults.el-dist'\" \(1528 characters\)
- sed "s/^X//" >'bam-2.0/bam-defaults.el-dist' <<'END_OF_FILE'
- X; bam - the Born Again Menus for GNU Emacs.
- X; Copyright (C) 1992 Stephane Boucher, Hans Olsson.
- X;
- X; This program is free software; you can redistribute it and/or modify
- X; it under the terms of the GNU General Public License as published by
- X; the Free Software Foundation; either version 1, or (at your option)
- X; any later version.
- X;
- X; This program is distributed in the hope that it will be useful,
- X; but WITHOUT ANY WARRANTY; without even the implied warranty of
- X; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X; GNU General Public License for more details.
- X;
- X; You should have received a copy of the GNU General Public License
- X; along with this program; if not, write to the Free Software
- X; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X;
- X; In other words, you are welcome to use, share and improve this program.
- X; You are forbidden to forbid anyone else to use, share and improve
- X; what you give them. Help stamp out software-hoarding!
- X
- X;-*-emacs-lisp-*-
- X(defvar bam-exec-dir "/usr/local/bin"
- X "*Directory where the bam executable resides.")
- X
- X(defvar bam-menus-path (list "/usr/local/lib/bam")
- X "*List of directories where the menus reside.")
- X
- X(defvar bam-bitmaps-path (list "/usr/lib/X11/bitmaps")
- X "*List of directories where the system's bitmaps reside.
- XIf there's more than one directory, each directory should be
- Xseperated by a ':' with no spaces.")
- X
- X(defvar bam-version "%%VERSION%%")
- X
- X(setq bam-widget "%%WIDGET_KIT%%")
- X
- X(provide 'bam-defaults)
- END_OF_FILE
- if test 1528 -ne `wc -c <'bam-2.0/bam-defaults.el-dist'`; then
- echo shar: \"'bam-2.0/bam-defaults.el-dist'\" unpacked with wrong size!
- fi
- # end of 'bam-2.0/bam-defaults.el-dist'
- fi
- if test -f 'bam-2.0/bemacs-dist' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bam-2.0/bemacs-dist'\"
- else
- echo shar: Extracting \"'bam-2.0/bemacs-dist'\" \(129 characters\)
- sed "s/^X//" >'bam-2.0/bemacs-dist' <<'END_OF_FILE'
- X#!/bin/sh
- X# $Id: bemacs-dist,v 1.1 1992/07/27 23:06:26 sbo Exp $
- X
- Xemacs -l /usr/local/elisp/emacs_init -wn "Emacs `date +%T`" $*
- END_OF_FILE
- if test 129 -ne `wc -c <'bam-2.0/bemacs-dist'`; then
- echo shar: \"'bam-2.0/bemacs-dist'\" unpacked with wrong size!
- fi
- # end of 'bam-2.0/bemacs-dist'
- fi
- if test -f 'bam-2.0/config.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bam-2.0/config.h'\"
- else
- echo shar: Extracting \"'bam-2.0/config.h'\" \(1158 characters\)
- sed "s/^X//" >'bam-2.0/config.h' <<'END_OF_FILE'
- X/* bam - the Born Again Menus for GNU Emacs.
- X Copyright (C) 1992 Stephane Boucher.
- X
- X This program is free software; you can redistribute it and/or modify
- X it under the terms of the GNU General Public License as published by
- X the Free Software Foundation; either version 1, or (at your option)
- X any later version.
- X
- X This program is distributed in the hope that it will be useful,
- X but WITHOUT ANY WARRANTY; without even the implied warranty of
- X MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X GNU General Public License for more details.
- X
- X You should have received a copy of the GNU General Public License
- X along with this program; if not, write to the Free Software
- X Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X
- X In other words, you are welcome to use, share and improve this program.
- X You are forbidden to forbid anyone else to use, share and improve
- X what you give them. Help stamp out software-hoarding!
- X*/
- X#ifndef _CONFIG_H_
- X#define _CONFIG_H_
- X
- X#include <limits.h>
- X
- X#ifdef _POSIX_PATH_MAX
- X#define MAX_FILE_NAME_LEN _POSIX_PATH_MAX
- X#else
- X#define MAX_FILE_NAME_LEN 128
- X#endif
- X
- X#endif
- END_OF_FILE
- if test 1158 -ne `wc -c <'bam-2.0/config.h'`; then
- echo shar: \"'bam-2.0/config.h'\" unpacked with wrong size!
- fi
- # end of 'bam-2.0/config.h'
- fi
- if test -f 'bam-2.0/emacs_init-dist' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bam-2.0/emacs_init-dist'\"
- else
- echo shar: Extracting \"'bam-2.0/emacs_init-dist'\" \(1180 characters\)
- sed "s/^X//" >'bam-2.0/emacs_init-dist' <<'END_OF_FILE'
- X;-*-emacs-lisp-*-
- X
- X(if (eq window-system 'x)
- X (progn
- X (setq load-path (cons "/usr/local/elisp" load-path))
- X
- X ;; get ready to load various menus
- X (require 'bam)
- X
- X ;; In certain case, you might want to tell where the
- X ;; executable file "bam" is located.
- X ;; To do this, use (setq *bam-exec-dir* "/some/where")
- X ;; Note however that under normal conditions you should
- X ;; not have to modify this.
- X
- X ;; If you add your custom menus, you should add the path
- X ;; of these menus to *bam-menus-path*.
- X ;; e.g.
- X ;; (setq bam-menus-path
- X ;; (cons "/your/custom/menu/path" bam-menus-path))
- X
- X ;; If you use custom bitmaps, you should add the path
- X ;; of these bitmaps to bam-bitmaps-path.
- X ;; e.g.
- X ;; (setq bam-bitmaps-path
- X ;; (cons "/your/custom/bitmaps/path" bam-bitmaps-path))
- X
- X ;; Load various menus
- X (bam-load-menu "emacs-base-ol")
- X (bam-load-menu "ex1")
- X (bam-load-menu "latex")
- X
- X ;; Pop various menus
- X (bam-open-menu "emacs-base-ol")
- X ;; Add the following if you need them
- X ;;(bam-open-menu "ex1")
- X ;;(bam-open-menu "latex")
- X))
- END_OF_FILE
- if test 1180 -ne `wc -c <'bam-2.0/emacs_init-dist'`; then
- echo shar: \"'bam-2.0/emacs_init-dist'\" unpacked with wrong size!
- fi
- # end of 'bam-2.0/emacs_init-dist'
- fi
- if test -f 'bam-2.0/frame.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bam-2.0/frame.c'\"
- else
- echo shar: Extracting \"'bam-2.0/frame.c'\" \(1540 characters\)
- sed "s/^X//" >'bam-2.0/frame.c' <<'END_OF_FILE'
- X/* bam - the Born Again Menus for GNU Emacs.
- X Copyright (C) 1992 Stephane Boucher.
- X
- X This program is free software; you can redistribute it and/or modify
- X it under the terms of the GNU General Public License as published by
- X the Free Software Foundation; either version 1, or (at your option)
- X any later version.
- X
- X This program is distributed in the hope that it will be useful,
- X but WITHOUT ANY WARRANTY; without even the implied warranty of
- X MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X GNU General Public License for more details.
- X
- X You should have received a copy of the GNU General Public License
- X along with this program; if not, write to the Free Software
- X Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X
- X In other words, you are welcome to use, share and improve this program.
- X You are forbidden to forbid anyone else to use, share and improve
- X what you give them. Help stamp out software-hoarding!
- X*/
- X/* $Id: frame.c,v 1.2 1992/03/30 20:50:26 sbo Exp $ */
- X
- X#include "bam.h"
- X
- XNotify_value baseFrameInterposer(frame, event, arg, type)
- X Frame frame;
- X Event *event;
- X Notify_arg arg;
- X Notify_event_type type;
- X{
- X Notify_value value;
- X Panel panel;
- X
- X if (event_action(event)==WIN_RESIZE) {
- X printf("Resizing...");
- X panel=(Panel)xv_get(frame, FRAME_NTH_SUBWINDOW, 1, NULL);
- X window_fit(panel);
- X frame_fit_all(frame);
- X printf("done.\n");
- X }
- X else {
- X value=notify_next_event_func(frame, event, arg, type);
- X }
- X
- X return(value);
- X}
- END_OF_FILE
- if test 1540 -ne `wc -c <'bam-2.0/frame.c'`; then
- echo shar: \"'bam-2.0/frame.c'\" unpacked with wrong size!
- fi
- # end of 'bam-2.0/frame.c'
- fi
- if test -f 'bam-2.0/menu.icon' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bam-2.0/menu.icon'\"
- else
- echo shar: Extracting \"'bam-2.0/menu.icon'\" \(263 characters\)
- sed "s/^X//" >'bam-2.0/menu.icon' <<'END_OF_FILE'
- X#define menu_width 13
- X#define menu_height 15
- Xstatic char menu_bits[] = {
- X 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x1a, 0x00, 0x62, 0x00, 0x82, 0x01,
- X 0x02, 0x06, 0x82, 0x01, 0x62, 0x00, 0x1a, 0x00, 0x06, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
- END_OF_FILE
- if test 263 -ne `wc -c <'bam-2.0/menu.icon'`; then
- echo shar: \"'bam-2.0/menu.icon'\" unpacked with wrong size!
- fi
- # end of 'bam-2.0/menu.icon'
- fi
- if test ! -d 'bam-2.0/menus' ; then
- echo shar: Creating directory \"'bam-2.0/menus'\"
- mkdir 'bam-2.0/menus'
- fi
- if test ! -d 'bam-2.0/menus' ; then
- echo shar: Creating directory \"'bam-2.0/menus'\"
- mkdir 'bam-2.0/menus'
- fi
- if test -f 'bam-2.0/menus.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bam-2.0/menus.c'\"
- else
- echo shar: Extracting \"'bam-2.0/menus.c'\" \(1862 characters\)
- sed "s/^X//" >'bam-2.0/menus.c' <<'END_OF_FILE'
- X/* bam - the Born Again Menus for GNU Emacs.
- X Copyright (C) 1992 Stephane Boucher.
- X
- X This program is free software; you can redistribute it and/or modify
- X it under the terms of the GNU General Public License as published by
- X the Free Software Foundation; either version 1, or (at your option)
- X any later version.
- X
- X This program is distributed in the hope that it will be useful,
- X but WITHOUT ANY WARRANTY; without even the implied warranty of
- X MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X GNU General Public License for more details.
- X
- X You should have received a copy of the GNU General Public License
- X along with this program; if not, write to the Free Software
- X Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X
- X In other words, you are welcome to use, share and improve this program.
- X You are forbidden to forbid anyone else to use, share and improve
- X what you give them. Help stamp out software-hoarding!
- X*/
- X/* $Id: menus.c,v 1.6 1992/07/02 00:57:44 sbo Exp $ */
- X
- X#include "bam.h"
- X
- X
- Xvoid printMenuDataStruct(prefixString, PmenuData, suffixString)
- X char *prefixString;
- X MenuData *PmenuData;
- X char *suffixString;
- X{
- X fprintf(debugFp, "%s\n", prefixString);
- X fprintf(debugFp, "attr.pushpin: %d\n", PmenuData->attr.pushpin);
- X fprintf(debugFp, "attr.title: \"%s\"\n", PmenuData->attr.title);
- X fprintf(debugFp, "defaultChoice: %d\n", PmenuData->defaultChoice);
- X fprintf(debugFp, "curItem: %d\n", PmenuData->curItem);
- X fprintf(debugFp, "id: %lX\n", (long)(PmenuData->id));
- X fprintf(debugFp, "prevCur: %lX\n", (long)(PmenuData->prevCur));
- X fprintf(debugFp, "%s\n", suffixString);
- X}
- X
- X
- Xvoid initMenuData(PmenuData)
- X MenuData *PmenuData;
- X{
- X PmenuData->attr.pushpin = TRUE;
- X PmenuData->attr.title = NULL;
- X PmenuData->curItem = 1;
- X PmenuData->defaultChoice = 1;
- X}
- X
- END_OF_FILE
- if test 1862 -ne `wc -c <'bam-2.0/menus.c'`; then
- echo shar: \"'bam-2.0/menus.c'\" unpacked with wrong size!
- fi
- # end of 'bam-2.0/menus.c'
- fi
- if test -f 'bam-2.0/menus/ex1' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bam-2.0/menus/ex1'\"
- else
- echo shar: Extracting \"'bam-2.0/menus/ex1'\" \(834 characters\)
- sed "s/^X//" >'bam-2.0/menus/ex1' <<'END_OF_FILE'
- X# $Id: ex1,v 1.6 1992/03/31 16:56:50 sbo Exp $
- X
- XFRAME
- XTITLE "Emacs Menu example 1"
- XICON_LABEL "Ex1"
- X PANEL
- X BUTTON "Menu button 1" "(message \"button action 1\")"
- X MENU
- X TITLE "Menu 1"
- X BITMAP "c10pinin" "(message \"This is a bitmap item\")"
- X TEXT "Text item" "(message \"This is a text item\")"
- X BITMAP "stones" "(message \"action bitmap\")"
- X END
- X BUTTON "Menu Button 2" "(message \"button action 2\")"
- X MENU
- X TITLE "Menu 2"
- X TEXT "text item 2" "(message \"text item action\")"
- X MENU
- X TEXT "item 3" "(message \"action\")"
- X TEXT "item 4" "(message \"action\")"
- X END
- X BITMAP "grune" "(message \"action bitmap\")"
- X MENU PUSHPIN FALSE
- X TITLE "Menu 3"
- X TEXT "item 5" "(message \"action\")"
- X TEXT "item 6" "(message \"action\")"
- X END
- X BITMAP "nights" "(message \"action bitmap\")"
- X END
- X END
- XEND
- END_OF_FILE
- if test 834 -ne `wc -c <'bam-2.0/menus/ex1'`; then
- echo shar: \"'bam-2.0/menus/ex1'\" unpacked with wrong size!
- fi
- # end of 'bam-2.0/menus/ex1'
- fi
- if test -f 'bam-2.0/menus/ex1.el' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bam-2.0/menus/ex1.el'\"
- else
- echo shar: Extracting \"'bam-2.0/menus/ex1.el'\" \(1107 characters\)
- sed "s/^X//" >'bam-2.0/menus/ex1.el' <<'END_OF_FILE'
- X; bam - the Born Again Menus for GNU Emacs.
- X; Copyright (C) 1992 Stephane Boucher.
- X;
- X; This program is free software; you can redistribute it and/or modify
- X; it under the terms of the GNU General Public License as published by
- X; the Free Software Foundation; either version 1, or (at your option)
- X; any later version.
- X;
- X; This program is distributed in the hope that it will be useful,
- X; but WITHOUT ANY WARRANTY; without even the implied warranty of
- X; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X; GNU General Public License for more details.
- X;
- X; You should have received a copy of the GNU General Public License
- X; along with this program; if not, write to the Free Software
- X; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X;
- X; In other words, you are welcome to use, share and improve this program.
- X; You are forbidden to forbid anyone else to use, share and improve
- X; what you give them. Help stamp out software-hoarding!
- X
- X; $Id: ex1.el,v 1.8 1992/04/01 16:56:49 sbo Exp $
- X
- X(bam-set-menu-args "ex1" '(-Wp 0 0 -Wt 7x14 -Ws 1000 300))
- END_OF_FILE
- if test 1107 -ne `wc -c <'bam-2.0/menus/ex1.el'`; then
- echo shar: \"'bam-2.0/menus/ex1.el'\" unpacked with wrong size!
- fi
- # end of 'bam-2.0/menus/ex1.el'
- fi
- if test -f 'bam-2.0/menus/latex.el' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bam-2.0/menus/latex.el'\"
- else
- echo shar: Extracting \"'bam-2.0/menus/latex.el'\" \(1729 characters\)
- sed "s/^X//" >'bam-2.0/menus/latex.el' <<'END_OF_FILE'
- X; bam - the Born Again Menus for GNU Emacs.
- X; Copyright (C) 1992 Stephane Boucher.
- X;
- X; This program is free software; you can redistribute it and/or modify
- X; it under the terms of the GNU General Public License as published by
- X; the Free Software Foundation; either version 1, or (at your option)
- X; any later version.
- X;
- X; This program is distributed in the hope that it will be useful,
- X; but WITHOUT ANY WARRANTY; without even the implied warranty of
- X; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X; GNU General Public License for more details.
- X;
- X; You should have received a copy of the GNU General Public License
- X; along with this program; if not, write to the Free Software
- X; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X;
- X; In other words, you are welcome to use, share and improve this program.
- X; You are forbidden to forbid anyone else to use, share and improve
- X; what you give them. Help stamp out software-hoarding!
- X
- X; $Id: latex.el,v 1.10 1992/07/27 22:56:24 sbo Exp $
- X
- X(bam-set-menu-args "latex" (append (bam-font-option "7x14")
- X (bam-geometry-option 0 0 1000 300)))
- X(bam-set-mode-hook "latex" 'LaTeX-mode-hook)
- X
- X(defun latex-env-insrt (environment)
- X "*Insert a LaTeX '\\begin{...}' '\\end{...}'environment, leaving the point in
- X the middle."
- X (interactive "sEnter the environment name:")
- X (strings-to-buffer
- X (concat "\\begin{" environment "}\n")
- X (concat "\n\\end{" environment "}\n")))
- X
- X(defun latex-env-and-item-insrt (environment)
- X "*Insert a LaTeX '\\begin{...}' '\\end{...}'environment, plus '\\item'."
- X (interactive "sEnter the environment name:")
- X (latex-env-insrt environment)
- X (strings-to-buffer "\\item " "\n"))
- END_OF_FILE
- if test 1729 -ne `wc -c <'bam-2.0/menus/latex.el'`; then
- echo shar: \"'bam-2.0/menus/latex.el'\" unpacked with wrong size!
- fi
- # end of 'bam-2.0/menus/latex.el'
- fi
- if test -f 'bam-2.0/menusxv.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bam-2.0/menusxv.c'\"
- else
- echo shar: Extracting \"'bam-2.0/menusxv.c'\" \(1965 characters\)
- sed "s/^X//" >'bam-2.0/menusxv.c' <<'END_OF_FILE'
- X/* bam - the Born Again Menus for GNU Emacs.
- X Copyright (C) 1992 Stephane Boucher.
- X
- X This program is free software; you can redistribute it and/or modify
- X it under the terms of the GNU General Public License as published by
- X the Free Software Foundation; either version 1, or (at your option)
- X any later version.
- X
- X This program is distributed in the hope that it will be useful,
- X but WITHOUT ANY WARRANTY; without even the implied warranty of
- X MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X GNU General Public License for more details.
- X
- X You should have received a copy of the GNU General Public License
- X along with this program; if not, write to the Free Software
- X Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X
- X In other words, you are welcome to use, share and improve this program.
- X You are forbidden to forbid anyone else to use, share and improve
- X what you give them. Help stamp out software-hoarding!
- X*/
- X/* $Id: menusxv.c,v 1.1 1992/07/01 21:41:20 sbo Exp $ */
- X
- X#include "bam.h"
- X
- Xint setMenu(parentFrame, PmenuData, defaultTitle)
- X Frame parentFrame;
- X MenuData *PmenuData;
- X char *defaultTitle;
- X{
- X int retVal=0; /* No error by default */
- X char *pinUpMenuTitle=NULL;
- X char *title;
- X
- X /* Set the title of the menu */
- X
- X if (PmenuData->attr.title!=NULL)
- X /* Use the value to override the default title
- X given in parameter */
- X title=PmenuData->attr.title;
- X
- X else if (title!=NULL)
- X /* Use the default value given in parameter */
- X title=defaultTitle;
- X
- X else
- X title="";
- X
- X xv_set(PmenuData->id, MENU_TITLE_ITEM, title, NULL);
- X
- X /* Generate a pushpin if needed */
- X if (PmenuData->attr.pushpin==TRUE) {
- X
- X xv_set(PmenuData->id,
- X MENU_GEN_PIN_WINDOW,
- X parentFrame,
- X title,
- X NULL);
- X }
- X else if (PmenuData->attr.pushpin==FALSE) {
- X }
- X else {
- X /* an invalid value for pushpin */
- X retVal=-1;
- X }
- X
- X return(retVal);
- X}
- END_OF_FILE
- if test 1965 -ne `wc -c <'bam-2.0/menusxv.c'`; then
- echo shar: \"'bam-2.0/menusxv.c'\" unpacked with wrong size!
- fi
- # end of 'bam-2.0/menusxv.c'
- fi
- if test -f 'bam-2.0/paths.h-dist' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bam-2.0/paths.h-dist'\"
- else
- echo shar: Extracting \"'bam-2.0/paths.h-dist'\" \(1153 characters\)
- sed "s/^X//" >'bam-2.0/paths.h-dist' <<'END_OF_FILE'
- X/* bam - the Born Again Menus for GNU Emacs.
- X Copyright (C) 1992 Stephane Boucher.
- X
- X This program is free software; you can redistribute it and/or modify
- X it under the terms of the GNU General Public License as published by
- X the Free Software Foundation; either version 1, or (at your option)
- X any later version.
- X
- X This program is distributed in the hope that it will be useful,
- X but WITHOUT ANY WARRANTY; without even the implied warranty of
- X MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X GNU General Public License for more details.
- X
- X You should have received a copy of the GNU General Public License
- X along with this program; if not, write to the Free Software
- X Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X
- X In other words, you are welcome to use, share and improve this program.
- X You are forbidden to forbid anyone else to use, share and improve
- X what you give them. Help stamp out software-hoarding!
- X*/
- X/* -*-c-*- */
- X/* $Id: paths.h-dist,v 1.3 1992/07/02 00:57:44 sbo Exp $ */
- X
- X#ifndef _PATHS_H_
- X#define _PATHS_H_
- X
- X#define DEFAULT_BITMAPS_PATH "/usr/lib/X11/bitmaps"
- X
- X#endif
- END_OF_FILE
- if test 1153 -ne `wc -c <'bam-2.0/paths.h-dist'`; then
- echo shar: \"'bam-2.0/paths.h-dist'\" unpacked with wrong size!
- fi
- # end of 'bam-2.0/paths.h-dist'
- fi
- if test -f 'bam-2.0/send.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bam-2.0/send.c'\"
- else
- echo shar: Extracting \"'bam-2.0/send.c'\" \(1649 characters\)
- sed "s/^X//" >'bam-2.0/send.c' <<'END_OF_FILE'
- X/* bam - the Born Again Menus for GNU Emacs.
- X Copyright (C) 1992 Stephane Boucher.
- X
- X This program is free software; you can redistribute it and/or modify
- X it under the terms of the GNU General Public License as published by
- X the Free Software Foundation; either version 1, or (at your option)
- X any later version.
- X
- X This program is distributed in the hope that it will be useful,
- X but WITHOUT ANY WARRANTY; without even the implied warranty of
- X MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X GNU General Public License for more details.
- X
- X You should have received a copy of the GNU General Public License
- X along with this program; if not, write to the Free Software
- X Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X
- X In other words, you are welcome to use, share and improve this program.
- X You are forbidden to forbid anyone else to use, share and improve
- X what you give them. Help stamp out software-hoarding!
- X*/
- X/* $Id: send.c,v 1.9 1992/03/31 16:40:16 sbo Exp $ */
- X
- X#include <stdio.h>
- X#include <varargs.h>
- X
- X#include "bam.h"
- X
- X
- Xvoid sendToEmacs(stringIndex)
- X int stringIndex;
- X{
- X fprintf(stdout, "%s", strStoreGet(stringIndex));
- X fflush(stdout);
- X}
- X
- Xvoid sendErrorToEmacs(va_alist)
- Xva_dcl
- X{
- X char tmpStr[4096+1]; /* Temporary string to
- X construct the error
- X string to send to emacs */
- X va_list pvar;
- X char *format;
- X
- X sprintf(tmpStr, "Menu \\\"%s\\\"\n\t", menuFile);
- X
- X va_start(pvar);
- X format=va_arg(pvar, char *);
- X vsprintf(&(tmpStr[strlen(tmpStr)]), format, pvar);
- X va_end(pvar);
- X
- X fprintf(stdout, errorFormat, tmpStr);
- X
- X fflush(stdout);
- X}
- X
- X
- X
- END_OF_FILE
- if test 1649 -ne `wc -c <'bam-2.0/send.c'`; then
- echo shar: \"'bam-2.0/send.c'\" unpacked with wrong size!
- fi
- # end of 'bam-2.0/send.c'
- fi
- if test -f 'bam-2.0/strstore.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bam-2.0/strstore.h'\"
- else
- echo shar: Extracting \"'bam-2.0/strstore.h'\" \(1313 characters\)
- sed "s/^X//" >'bam-2.0/strstore.h' <<'END_OF_FILE'
- X/* bam - the Born Again Menus for GNU Emacs.
- X Copyright (C) 1992 Stephane Boucher.
- X
- X This program is free software; you can redistribute it and/or modify
- X it under the terms of the GNU General Public License as published by
- X the Free Software Foundation; either version 1, or (at your option)
- X any later version.
- X
- X This program is distributed in the hope that it will be useful,
- X but WITHOUT ANY WARRANTY; without even the implied warranty of
- X MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X GNU General Public License for more details.
- X
- X You should have received a copy of the GNU General Public License
- X along with this program; if not, write to the Free Software
- X Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X
- X In other words, you are welcome to use, share and improve this program.
- X You are forbidden to forbid anyone else to use, share and improve
- X what you give them. Help stamp out software-hoarding!
- X*/
- X/* $Id: strstore.h,v 1.3 1992/03/30 20:50:13 sbo Exp $ */
- X
- X#include <malloc.h>
- X#include <stdio.h>
- X
- X#define STR_STORE_ERR -1
- X#define STR_STORE_OK 0
- X#define INITIAL_STR_STORE_VECTOR_SIZE 1024
- X#define TRUE (1)
- X#define FALSE (0)
- X
- Xint strStorePut();
- Xchar *strStoreGet();
- Xint strStoreFree();
- Xint strStoreOpen();
- Xint strStoreClose();
- X
- X
- END_OF_FILE
- if test 1313 -ne `wc -c <'bam-2.0/strstore.h'`; then
- echo shar: \"'bam-2.0/strstore.h'\" unpacked with wrong size!
- fi
- # end of 'bam-2.0/strstore.h'
- fi
- if test -f 'bam-2.0/trial.el' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bam-2.0/trial.el'\"
- else
- echo shar: Extracting \"'bam-2.0/trial.el'\" \(1114 characters\)
- sed "s/^X//" >'bam-2.0/trial.el' <<'END_OF_FILE'
- X; bam - the Born Again Menus for GNU Emacs.
- X; Copyright (C) 1992 Stephane Boucher.
- X;
- X; This program is free software; you can redistribute it and/or modify
- X; it under the terms of the GNU General Public License as published by
- X; the Free Software Foundation; either version 1, or (at your option)
- X; any later version.
- X;
- X; This program is distributed in the hope that it will be useful,
- X; but WITHOUT ANY WARRANTY; without even the implied warranty of
- X; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X; GNU General Public License for more details.
- X;
- X; You should have received a copy of the GNU General Public License
- X; along with this program; if not, write to the Free Software
- X; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X;
- X; In other words, you are welcome to use, share and improve this program.
- X; You are forbidden to forbid anyone else to use, share and improve
- X; what you give them. Help stamp out software-hoarding!
- X
- X; $Id: trial.el,v 1.2 1992/07/02 00:57:44 sbo Exp $
- X
- X(bam-load-menu "emacs-base-ol")
- X(bam-open-menu "emacs-base-ol")
- END_OF_FILE
- if test 1114 -ne `wc -c <'bam-2.0/trial.el'`; then
- echo shar: \"'bam-2.0/trial.el'\" unpacked with wrong size!
- fi
- # end of 'bam-2.0/trial.el'
- fi
- if test ! -d 'bam-2.0/utils' ; then
- echo shar: Creating directory \"'bam-2.0/utils'\"
- mkdir 'bam-2.0/utils'
- fi
- if test ! -d 'bam-2.0/utils' ; then
- echo shar: Creating directory \"'bam-2.0/utils'\"
- mkdir 'bam-2.0/utils'
- fi
- if test -f 'bam-2.0/utils/strdup.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'bam-2.0/utils/strdup.c'\"
- else
- echo shar: Extracting \"'bam-2.0/utils/strdup.c'\" \(1181 characters\)
- sed "s/^X//" >'bam-2.0/utils/strdup.c' <<'END_OF_FILE'
- X/* bam - the Born Again Menus for GNU Emacs.
- X Copyright (C) 1992 Stephane Boucher.
- X
- X This program is free software; you can redistribute it and/or modify
- X it under the terms of the GNU General Public License as published by
- X the Free Software Foundation; either version 1, or (at your option)
- X any later version.
- X
- X This program is distributed in the hope that it will be useful,
- X but WITHOUT ANY WARRANTY; without even the implied warranty of
- X MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X GNU General Public License for more details.
- X
- X You should have received a copy of the GNU General Public License
- X along with this program; if not, write to the Free Software
- X Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X
- X In other words, you are welcome to use, share and improve this program.
- X You are forbidden to forbid anyone else to use, share and improve
- X what you give them. Help stamp out software-hoarding!
- X*/
- X#include <string.h>
- X
- Xchar *strdup(str)
- Xchar *str;
- X{
- X char *newStr;
- X
- X if ((newStr=(char *)
- X malloc(sizeof(char)*strlen(str))) != NULL) {
- X strcpy(newStr, str);
- X }
- X return(newStr);
- X}
- END_OF_FILE
- if test 1181 -ne `wc -c <'bam-2.0/utils/strdup.c'`; then
- echo shar: \"'bam-2.0/utils/strdup.c'\" unpacked with wrong size!
- fi
- # end of 'bam-2.0/utils/strdup.c'
- fi
- echo shar: End of archive 1 \(of 7\).
- cp /dev/null ark1isdone
- MISSING=""
- for I in 1 2 3 4 5 6 7 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 7 archives.
- rm -f ark[1-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
-
- exit 0 # Just in case...
-