migrate glyphs/text-editor to stand-alone ivtext
[email protected] Sat, 2 Nov 2002 14:31:58 -0800
| Newsgroups | gmane.comp.lib.ivtools.patches |
|---|---|
| Message-ID | <a04320413b9ea02c59ff1@[12.236.206.76]> |
Patch: ivtools-020926-johnston-068 For: ivtools-1.0.6 Author: [email protected] Subject: migrate glyphs/text-editor to stand-alone ivtext Requires: This is an intermediate patch to ivtools-1.0.6. To apply, cd to the top-level directory of the ivtools source tree (the directory with src and config subdirs), and apply like this: patch -p0 <ThisFile Summary of Changes: - migrate glyphs/text-editor to stand-alone ivtext. - add Quit option under File menu. - first step in adding SVG support to export dialog box Index: glyphs_ivtools/Imakefile diff -c glyphs_ivtools/Imakefile:1.1 glyphs_ivtools/Imakefile:1.2 *** glyphs_ivtools/Imakefile:1.1 Fri Sep 13 09:49:03 2002 --- src/glyphs/Imakefile Thu Sep 26 17:56:19 2002 *************** *** 14,20 **** scrollable \ scrollfield \ strchooser \ - text-editor \ timestamp \ examples3.1 --- 14,19 ---- Index: IVGlyph/exportchooser.c diff -c IVGlyph/exportchooser.c:1.1 IVGlyph/exportchooser.c:1.2 *** IVGlyph/exportchooser.c:1.1 Fri Sep 13 09:48:56 2002 --- src/IVGlyph/exportchooser.c Thu Sep 26 17:56:16 2002 *************** *** 93,98 **** --- 93,104 ---- : false; } + boolean ExportChooser::svg_format() { + return ((ExportChooserImpl*)impl_)->_obse + ? strncmp(((ExportChooserImpl*)impl_)->_obse->labelvalue().string(), "XSVG", 3) == 0 + : false; + } + boolean ExportChooser::execute_flag() { return ((ExportChooserImpl*)impl_)->_execute_flag; } Index: IVGlyph/exportchooser.h diff -c IVGlyph/exportchooser.h:1.1 IVGlyph/exportchooser.h:1.2 *** IVGlyph/exportchooser.h:1.1 Fri Sep 13 09:48:56 2002 --- src/IVGlyph/exportchooser.h Thu Sep 26 17:56:16 2002 *************** *** 55,60 **** --- 55,61 ---- virtual const char* format(); virtual boolean idraw_format(); virtual boolean postscript_format(); + virtual boolean svg_format(); virtual boolean by_pathname_flag(); virtual boolean execute_flag(); virtual boolean by_pathname_flag_button(); Index: IVGlyph/textedit.c diff -c IVGlyph/textedit.c:1.1 IVGlyph/textedit.c:1.2 *** IVGlyph/textedit.c:1.1 Fri Sep 13 09:48:58 2002 --- src/IVGlyph/textedit.c Thu Sep 26 17:56:16 2002 *************** *** 210,215 **** --- 210,221 ---- te_view_->load_popup(); } + void EivTextEditor::quit() + { + // quit without error check; Bug Alert! + te_view_->quit(); + } + int EivTextEditor::dot() { return te_view_->text_editor()->Dot(); Index: IVGlyph/textedit.h diff -c IVGlyph/textedit.h:1.1 IVGlyph/textedit.h:1.2 *** IVGlyph/textedit.h:1.1 Fri Sep 13 09:48:58 2002 --- src/IVGlyph/textedit.h Thu Sep 26 17:56:16 2002 *************** *** 52,57 **** --- 52,60 ---- void load_popup(); void save_popup(); + // before quitting invoke save or save-as as needed + void quit(); + // Selections // get dot and mark indices Index: IVGlyph/textview.c diff -c IVGlyph/textview.c:1.1 IVGlyph/textview.c:1.2 *** IVGlyph/textview.c:1.1 Fri Sep 13 09:48:58 2002 --- src/IVGlyph/textview.c Thu Sep 26 17:56:16 2002 *************** *** 94,99 **** --- 94,100 ---- { "Load...", &TE_View::load_popup, nil }, { "Save", &TE_View::save, nil }, { "Save As..", &TE_View::save_popup, nil }, + { "Quit", &TE_View::quit, nil }, { nil } }; *************** *** 288,293 **** --- 289,300 ---- { // save without error check; Bug Alert! (void) te_buffer_->save(); + } + + void TE_View::quit() + { + // save without error check; Bug Alert! + Session::instance()->quit(); } void TE_View::make_visible(const boolean scroll_page) Index: IVGlyph/textview.h diff -c IVGlyph/textview.h:1.1 IVGlyph/textview.h:1.2 *** IVGlyph/textview.h:1.1 Fri Sep 13 09:48:59 2002 --- src/IVGlyph/textview.h Thu Sep 26 17:56:16 2002 *************** *** 63,68 **** --- 63,69 ---- int save_as(const char* path); int save_current(); void save(); + void quit(); // InputHandler virtual void press(const Event&); Index: OverlayUnidraw/ovexport.c diff -c OverlayUnidraw/ovexport.c:1.1 OverlayUnidraw/ovexport.c:1.2 *** OverlayUnidraw/ovexport.c:1.1 Fri Sep 13 09:51:22 2002 --- src/OverlayUnidraw/ovexport.c Thu Sep 26 17:56:41 2002 *************** *** 1,4 **** --- 1,5 ---- /* + * Copyright (c) 2002 Scott E. Johnston * Copyright (c) 1994, 1995, 1998 Vectaport Inc. * Copyright (c) 1990, 1991 Stanford University * *************** *** 110,117 **** style = new Style(Session::instance()->style()); style->attribute("subcaption", "Export selected graphics to file:"); style->attribute("open", "Export"); ! const char *formats[] = {"EPS", "idraw EPS", "drawtool"}; ! const char *commands[] = {"ghostview %s", "idraw %s", "drawtool %s"}; chooser_ = new ExportChooser(".", WidgetKit::instance(), style, formats, sizeof(formats)/sizeof(char*), commands, nil, true); Resource::ref(chooser_); --- 111,118 ---- style = new Style(Session::instance()->style()); style->attribute("subcaption", "Export selected graphics to file:"); style->attribute("open", "Export"); ! const char *formats[] = {"EPS", "idraw EPS", "drawtool", "SVG"}; ! const char *commands[] = {"ghostview %s", "idraw %s", "drawtool %s", "netscape %s"}; chooser_ = new ExportChooser(".", WidgetKit::instance(), style, formats, sizeof(formats)/sizeof(char*), commands, nil, true); Resource::ref(chooser_); Index: src_ivtools/Imakefile diff -c src_ivtools/Imakefile:1.1 src_ivtools/Imakefile:1.2 *** src_ivtools/Imakefile:1.1 Fri Sep 13 09:47:30 2002 --- src/Imakefile Thu Sep 26 17:56:04 2002 *************** *** 46,51 **** --- 46,52 ---- \ Time \ IVGlyph \ + ivtext \ glyphs \ \ AttrGlyph \ Index: top_ivtools/MANIFEST diff -c top_ivtools/MANIFEST:1.1 top_ivtools/MANIFEST:1.2 *** top_ivtools/MANIFEST:1.1 Fri Sep 13 09:47:27 2002 --- ./MANIFEST Thu Sep 26 17:56:01 2002 *************** *** 1094,1103 **** ivtools-1.0/src/glyphs/strchooser/Imakefile ivtools-1.0/src/glyphs/strchooser/Makefile ivtools-1.0/src/glyphs/strchooser/main.c - ivtools-1.0/src/glyphs/text-editor/Imakefile - ivtools-1.0/src/glyphs/text-editor/Makefile - ivtools-1.0/src/glyphs/text-editor/README - ivtools-1.0/src/glyphs/text-editor/main.c ivtools-1.0/src/glyphs/timestamp/Imakefile ivtools-1.0/src/glyphs/timestamp/Makefile ivtools-1.0/src/glyphs/timestamp/main.c --- 1094,1099 ---- *************** *** 1560,1565 **** --- 1556,1565 ---- ivtools-1.0/src/iueserv_/Makefile ivtools-1.0/src/iueserv_/README ivtools-1.0/src/iueserv_/main.c + ivtools-1.0/src/ivtext/Imakefile + ivtools-1.0/src/ivtext/Makefile + ivtools-1.0/src/ivtext/README + ivtools-1.0/src/ivtext/main.c ivtools-1.0/src/ivxt/Imakefile ivtools-1.0/src/ivxt/Xd.h ivtools-1.0/src/ivxt/Xud.h Index: top_ivtools/README diff -c top_ivtools/README:1.1 top_ivtools/README:1.2 *** top_ivtools/README:1.1 Fri Sep 13 09:47:27 2002 --- ./README Thu Sep 26 17:56:02 2002 *************** *** 59,67 **** scrollable 2d scrollable glyph scrollfield 2d scrollable field-editor strchooser string chooser - text-editor emacs-like text editor timestamp editable time glyph Also all the glyph example programs from InterViews 3.1 have been added in an examples3.1 directory under the glyphs directory. --- 59,70 ---- scrollable 2d scrollable glyph scrollfield 2d scrollable field-editor strchooser string chooser timestamp editable time glyph + Plus a generally useful text display and editing program: + + ivtext emacs-like text editor + Also all the glyph example programs from InterViews 3.1 have been added in an examples3.1 directory under the glyphs directory. *************** *** 118,128 **** * More ivtools details ! ivtools is known to build with many versions of gcc (<= gcc-2.7.2, >= ! gcc-2.8.1, >= egcs-1.0.1, gcc-3.0.1) and on a variety of Unix'es: SunOS 4.1 (MIT's X11R5), Solaris 2.6 (X11R6), Irix 5.2 (SGI's X11R5), Linux 1.2 (Slackware 3.0, XFree86 3.1), Linux 2.* (RedHat 4.0 thru ! 6.0, Debian 2.*), NetBSD, FreeBSD, and Darwin (Mac OS X). There are contributed configs that are out of date for HPUX and Dec Alpha (though the HPUX contrib might almost have it right). It has been built on Windows NT 4.0 using Cygwin from Cygnus Solutions (see README.cygwin). --- 121,131 ---- * More ivtools details ! ivtools is known to build with many versions of gcc (>= gcc-2.8.1, ! >= egcs-1.0.1, gcc-3.0.*, gcc-3.1.*) and on a variety of Unix'es: SunOS 4.1 (MIT's X11R5), Solaris 2.6 (X11R6), Irix 5.2 (SGI's X11R5), Linux 1.2 (Slackware 3.0, XFree86 3.1), Linux 2.* (RedHat 4.0 thru ! 7.0, Debian 2.* and 3.*), NetBSD, FreeBSD, and Darwin (Mac OS X). There are contributed configs that are out of date for HPUX and Dec Alpha (though the HPUX contrib might almost have it right). It has been built on Windows NT 4.0 using Cygwin from Cygnus Solutions (see README.cygwin). *** /dev/null Thu Sep 26 17:05:02 2002 --- src/ivtext/README Thu Sep 26 17:45:49 2002 *************** *** 0 **** --- 1,44 ---- + + Simple InterViews Text Editor + ----------------------------- + + This is my first version of an InterViews 3.1 texteditor class. I have tried + to implement a simple text editor that can be used in IV 3.1 applications. + The goal was _not_ to implement a full-featured editor (we have emacs, don't + we (-; ). + + It uses the 2.6 TextEditor/TextBuffer classes and was inspired by some code + posted by Frank Zenner ([email protected]) a few month ago. Even if I + have not used any of his code directly it was very useful as an introduction + of how 2.6 classes can be used. + + Some features are: + + - loads/saves buffer from/to files + - dynamically allocates memory when buffer expands + - supports selectons (both primary and clipboard) from the editor + - have emacs-style (and Sun keyboard) key mappings + - popup-menu to load/save files + - Somewhat similar to Sun's Text Editor (left mouse button selects, + middle mouse button expand selection, right mouse button gives a + popup-menu) + - double-click selects word, tripple-click selects line + + I do not consider my work as completed, but I believe the editor is usable. + I have never used 2.6 classes before and I'm sure it could have been + structured in a better way. Comments are welcome! + + Things plan to do (if I could find the time): + + - add text search popup + - add at least one level of undo + - enable definition of menus and key mappings from resources + - add popup to enable specification of find patterns + - I bet there are bugs, but not currently known by me... + - add many more edit functions to the EivTextEditor class + + (the list could be much longer, but this is what I plan to implement) + + Have Fun! + + /Janne ([email protected]) *** /dev/null Thu Sep 26 17:05:02 2002 --- src/ivtext/Makefile Thu Sep 26 17:46:24 2002 *************** *** 0 **** --- 1,439 ---- + # Makefile generated by imake - do not edit! + # $Xorg: imake.c,v 1.6 2001/02/09 02:03:15 xorgcvs Exp $ + + # Read "template" to understand how this Makefile was generated. + # Edit <arch.def> to add support for a new platform. + # Edit <InterViews/iv-darwin.cf> to change platform-specific parameters. + # Edit <local.def> to change site-specific parameters. + # Edit <ivtext/Imakefile> to change actions that make should perform. + + # architecture: DARWIN + + # ------------------------------------------------------------------------- + # from <local.def>: + + GPLUSPLUS_INCLUDE_DIR = /usr/include/gcc/darwin/2.95.2/g++/ + TOOL_INCLUDE_DIR = /usr/local/include + + NORM_CCINCLUDES = -I$(CURRENT_DIR)/.. -I$(CURRENT_DIR)/../.. -I$(IVTOOLSSRC) $(BACKWARD_CCINCLUDES) -I$(IVTOOLSSRC)/include -I$(IVTOOLSSRC)/include/ivstd $(X_CCINCLUDES) + + APP_CCINCLUDES = $(NORM_CCINCLUDES) + + IVTOOLSSRC = /Users/scott/src/ivtools-1.0/src + + LIBUNIDRAWCOMMON = -L$(IVTOOLSSRC)/Unidraw-common/$(CPU) -lUnidraw-common + LIBIVCOMMON = -L$(IVTOOLSSRC)/IV-common/$(CPU) -lIV-common + LIBTIME = -L$(IVTOOLSSRC)/Time/$(CPU) -lTime + LIBATTRIBUTE = -L$(IVTOOLSSRC)/Attribute/$(CPU) -lAttribute + LIBCOMUTIL = -L$(IVTOOLSSRC)/ComUtil/$(CPU) -lComUtil + LIBCOMTERP = -L$(IVTOOLSSRC)/ComTerp/$(CPU) -lComTerp + LIBIVGLYPH = -L$(IVTOOLSSRC)/IVGlyph/$(CPU) -lIVGlyph + LIBATTRGLYPH = -L$(IVTOOLSSRC)/AttrGlyph/$(CPU) -lAttrGlyph + LIBCOMGLYPH = -L$(IVTOOLSSRC)/ComGlyph/$(CPU) -lComGlyph + LIBGLYPHTERP = -L$(IVTOOLSSRC)/GlyphTerp/$(CPU) -lGlyphTerp + LIBUNIIDRAW = -L$(IVTOOLSSRC)/UniIdraw/$(CPU) -lUniIdraw + LIBTOPOFACE = -L$(IVTOOLSSRC)/TopoFace/$(CPU) -lTopoFace + LIBOVERLAYUNIDRAW = -L$(IVTOOLSSRC)/OverlayUnidraw/$(CPU) -lOverlayUnidraw + + LIBACEDISPATCH = + + LIBCOMUNIDRAW = -L$(IVTOOLSSRC)/ComUnidraw/$(CPU) -lComUnidraw + LIBFRAMEUNIDRAW = -L$(IVTOOLSSRC)/FrameUnidraw/$(CPU) -lFrameUnidraw + LIBGRAPHUNIDRAW = -L$(IVTOOLSSRC)/GraphUnidraw/$(CPU) -lGraphUnidraw + LIBDRAWSERV = -L$(IVTOOLSSRC)/DrawServ/$(CPU) -lDrawServ + + DEPUNIDRAWCOMMON = $(IVTOOLSSRC)/Unidraw-common/$(CPU)/libUnidraw-common.$(VERSION).dylib + DEPIVCOMMON = $(IVTOOLSSRC)/IV-common/$(CPU)/libIV-common.$(VERSION).dylib + DEPTIME = $(IVTOOLSSRC)/Time/$(CPU)/libTime.$(VERSION).dylib + DEPATTRIBUTE = $(IVTOOLSSRC)/Attribute/$(CPU)/libAttribute.$(VERSION).dylib + DEPCOMUTIL = $(IVTOOLSSRC)/ComUtil/$(CPU)/libComUtil.$(VERSION).dylib + DEPCOMTERP = $(IVTOOLSSRC)/ComTerp/$(CPU)/libComTerp.$(VERSION).dylib + DEPIVGLYPH = $(IVTOOLSSRC)/IVGlyph/$(CPU)/libIVGlyph.$(VERSION).dylib + DEPATTRGLYPH = $(IVTOOLSSRC)/AttrGlyph/$(CPU)/libAttrGlyph.$(VERSION).dylib + DEPCOMGLYPH = $(IVTOOLSSRC)/ComGlyph/$(CPU)/libComGlyph.$(VERSION).dylib + DEPGLYPHTERP = $(IVTOOLSSRC)/GlyphTerp/$(CPU)/libGlyphTerp.$(VERSION).dylib + DEPUNIIDRAW = $(IVTOOLSSRC)/UniIdraw/$(CPU)/libUniIdraw.$(VERSION).dylib + DEPTOPOFACE = $(IVTOOLSSRC)/TopoFace/$(CPU)/libTopoFace.$(VERSION).dylib + DEPOVERLAYUNIDRAW = $(IVTOOLSSRC)/OverlayUnidraw/$(CPU)/libOverlayUnidraw.$(VERSION).dylib + + DEPACEDISPATCH = + + DEPCOMUNIDRAW = $(IVTOOLSSRC)/ComUnidraw/$(CPU)/libComUnidraw.$(VERSION).dylib + DEPFRAMEUNIDRAW = $(IVTOOLSSRC)/FrameUnidraw/$(CPU)/libFrameUnidraw.$(VERSION).dylib + DEPGRAPHUNIDRAW = $(IVTOOLSSRC)/GraphUnidraw/$(CPU)/libGraphUnidraw.$(VERSION).dylib + DEPDRAWSERV = $(IVTOOLSSRC)/DrawServ/$(CPU)/libDrawServ.$(VERSION).dylib + + # ------------------------------------------------------------------------- + + PROJECTDIR = /proj + + RELEASE = ivtools-1.0.6 + + VERSION = 1.0.6 + + REPOSITORY_FILES = *.c *.cc *.cxx *.C *.h Imakefile *.def template README INSTALL VERSION MANIFEST COPYRIGHT ANNOUNCE README.ivmkcm *.patch *.bugfix.? *.script *.sed comutil.arg comterp.err comutil.ci comterp.arg comterp.ci site.def.SUN4 site.def.LINUX site.def.SGI site.def.HP800 site.def.ALPHA site.def.CYGWIN site.def.NETBSD site.def.FREEBSD WishList *.defaults *.cf HOWTO Copyright *.sh CHANGES CHANGES-0.? *.cpp ivmkmf *.bash *.1 *.3 config.guess config.sub configure configure.in MANIFEST.perceps MANIFEST.comterp *.mk config.mk.in *.tmpl *.flt *.m4 config.defs.in + + SHELL = /bin/sh + + IMAKE = imake + IMAKEFLAGS = \ + -T "template"\ + -I$(ABSTOP)/config -I$(CONFIGDIR) -I$(CONFIGDIR)/.. -I$(XCONFIGDIR) -I$(IVTOOLSSRC)/../config\ + $(SPECIAL_IMAKEFLAGS) + SPECIAL_IMAKEFLAGS = + DEPEND = c++ -M + DEPEND_CCFLAGS = -w -DMAKEDEPEND $(CCDEFINES) $(CCINCLUDES) -I$(GPLUSPLUS_INCLUDE_DIR) -I$(TOOL_INCLUDE_DIR) -UHAVE_ACE + MAKE = make + PASSARCH = ARCH="$(ARCH)" SPECIAL_IMAKEFLAGS="$(SPECIAL_IMAKEFLAGS)" CMFLAGS="$(CMFLAGS)" CMMSG="$(CMMSG)" + ARCHORCPU = $(CPU) + ARCH = $(ARCHORCPU)$(SPECIAL_ARCH) + SPECIAL_ARCH = + + CCDRIVER = c++ + CCSUFFIX = c + CDRIVER = cc + CSUFFIX = c + SRC = /Users/scott/src/ivtools-1.0/src/ivtext/. + SLASH = / + SRCS = $(SRC)$(SLASH)*.$(CCSUFFIX) + OBJS = *.o + AOUT = a.out + + CCFLAGS = $(APP_CCFLAGS) $(IV_CCFLAGS) $(OTHER_CCFLAGS) $(EXTRA_CCFLAGS) + IV_CCFLAGS = \ + $(DEBUG_CCFLAGS)\ + $(OPTIMIZE_CCFLAGS)\ + $(SHARED_CCFLAGS)\ + $(CCDEFINES)\ + $(CCINCLUDES) + DEBUG_CCFLAGS = -g + OPTIMIZE_CCFLAGS = -O2 + SHARED_CCFLAGS = + EXTRA_CCFLAGS = + + CCDEFINES = $(APP_CCDEFINES) $(IV_CCDEFINES) $(OTHER_CCDEFINES) $(EXTRA_CCDEFINES) + IV_CCDEFINES = $(LANGUAGE_CCDEFINES) $(BACKWARD_CCDEFINES) + LANGUAGE_CCDEFINES = -Dcplusplus_2_1 + BACKWARD_CCDEFINES = + EXTRA_CCDEFINES = + + CLIPPOLY_CCDEFINES = + ACE_CCDEFINES = + IUE_CCDEFINES = + + CCINCLUDES = $(APP_CCINCLUDES) $(OTHER_CCINCLUDES) $(EXTRA_CCINCLUDES) + IV_CCINCLUDES = IvCCIncludes + BACKWARD_CCINCLUDES = + TOP_CCINCLUDES = -I$(INCSRC) + X_CCINCLUDES = -I$(XINCDIR) + EXTRA_CCINCLUDES = + + CLIPPOLY_CCINCLUDES = + ACE_CCINCLUDES = + IUE_CCINCLUDES = + + CFLAGS = $(APP_CCFLAGS) $(IV_CCFLAGS) $(OTHER_CCFLAGS) $(EXTRA_CCFLAGS) + + CCLDFLAGS = $(APP_CCLDFLAGS) $(IV_CCLDFLAGS) $(OTHER_CCLDFLAGS) $(EXTRA_CCLDFLAGS) + IV_CCLDFLAGS = \ + $(DEBUG_CCFLAGS)\ + $(OPTIMIZE_CCFLAGS)\ + $(NONSHARED_CCLDFLAGS) + NONSHARED_CCLDFLAGS = + SHARED_CCLDFLAGS = + EXTRA_CCLDFLAGS = + + CCDEPLIBS = $(APP_CCDEPLIBS) $(IV_CCDEPLIBS) $(OTHER_CCDEPLIBS) $(EXTRA_CCDEPLIBS) $(_CCDEPLIBS) + IV_CCDEPLIBS = \ + $(DEPLIBUNIDRAW)\ + $(DEPLIBGRAPHIC)\ + $(DEPLIBIV)\ + $(DEPLIBXEXT)\ + $(DEPLIBX11)\ + $(DEPLIBM) + EXTRA_CCDEPLIBS = + + CCLDLIBS = $(APP_CCLDLIBS) $(IV_CCLDLIBS) $(OTHER_CCLDLIBS) $(EXTRA_CCLDLIBS) + IV_CCLDLIBS = \ + $(LIBDIRPATH)\ + $(LDLIBUNIDRAW)\ + $(LDLIBGRAPHIC)\ + $(LDLIBIV)\ + $(XLIBDIRPATH)\ + $(LDLIBXEXT)\ + $(LDLIBX11)\ + $(ABSLIBDIRPATH) + SHARED_CCLDLIBS = + EXTRA_CCLDLIBS = -lstdc++ -lm + + CLIPPOLY_CCLDLIBS = + CLIPPOLYLIBDIR = + CLIPPOLYLIBBASE = libclippoly.so + ACE_CCLDLIBS = + ACELIBDIR = + ACELIBBASE = libACE.so + IUE_CCLDLIBS = + IUELIBDIR = + IUELIBBASE = libIUE.so + + INSTALL = install + INSTPGMFLAGS = -s + INSTBINFLAGS = -m 0755 + INSTUIDFLAGS = -m 4755 + INSTLIBFLAGS = -m 0644 + INSTINCFLAGS = -m 0444 + INSTMANFLAGS = -m 0444 + INSTDATFLAGS = -m 0444 + INSTKMEMFLAGS = -m 4755 + + AR = ar clq + AS = as + CP = cp + CPP = /lib/cpp $(EXTRA_CCDEFINES) $(OTHER_CCDEFINES) + PREPROCESSCMD = $(CCDRIVER) -E $(EXTRA_CCDEFINES) $(OTHER_CCDEFINES) + LD = ld + LN = ln -s + MKDIRHIER = $(SHELL) $(SCRIPTSRC)/mkdirhier.sh + MV = mv + RANLIB = ranlib + RANLIBINSTFLAGS = + RM = rm -f + RMDIR = rm -rf + RM_CMD = $(RM) ,* .emacs_* *..c *.BAK *.CKP *.a *.bak *.ln *.o a.out core errs make.log make.out tags TAGS + TROFF = groff + + TOP = /Users/scott/src/ivtools-1.0 + RELTOP = ../../. + CURRENT_DIR = /Users/scott/src/ivtools-1.0/src/ivtext + + IVSRC = /Users/scott/src/ivtools-1.0/src + BINSRC = $(IVSRC)/bin + CONFIGSRC = $(RELTOP)/config + INCSRC = $(IVSRC)/include + LIBSRC = $(IVSRC) + MANSRC = $(IVSRC)/man + SCRIPTSRC = $(RELTOP)/src/scripts + + BINDIR = /usr/local/bin + CONFIGDIR = /usr/local/lib/ivtools/config + INCDIR = /usr/local/include + LIBDIR = /usr/local/lib + LIBABSDIR = /usr/local/lib + LIBALLDIR = /usr/local/lib/ivtools + MANDIR = /usr/local/man + + ABSCONFIGDIR = /usr/local/lib/ivtools/config + ABSLIBDIR = /usr/local/lib + ABSLIBALLDIR = /usr/local/lib/ivtools + RELLIBALLDIR = $(TOP)/lib/ivtools + XCONFIGDIR = /usr/X11R6/lib/X11/config + XINCDIR = /usr/X11R6/include + XLIBDIR = /usr/X11R6/lib + PSFONTDIR = /usr/lib/ps + + SOCKLEN_T_DEFINED = 0 + + include $(RELTOP)/config/config.mk + + all:: + + Makefile:: + -@if [ -f Makefile ]; then \ + $(RM) Makefile.bak; \ + $(MV) Makefile Makefile.bak; \ + else exit 0; fi + -@echo "Making Makefile" + -@if [ $(TOP) = $(CURRENT_DIR) ]; then \ + echo >.toplevel-make-makefile; else \ + echo >.not-toplevel-make-makefile; fi + -@if [ -f .toplevel-make-makefile ]; then \ + echo;\ + echo "remaking top-level Makefile using:";\ + echo " top-level directory -- $(ABSTOP)";\ + echo " ivtools config directory -- $(CONFIGSRC)";\ + echo " X11 config directory -- $(XCONFIGDIR)";\ + echo;\ + $(IMAKE) $(IMAKEFLAGS) -I$(ABSTOP)/config \ + -DTOPDIR=$(ABSTOP) -DRELTOPDIR=$(RELTOP) -DCURDIR=$(ABSTOP); fi + -@if [ -f .not-toplevel-make-makefile ]; then \ + $(IMAKE) $(IMAKEFLAGS) -DTOPDIR=$(TOP) \ + -DRELTOPDIR=$(RELTOP) -DCURDIR=$(CURRENT_DIR); fi + -@if [ $(TOP) = $(CURRENT_DIR) ]; then \ + $(RM) .toplevel-make-makefile; else \ + $(RM) .not-toplevel-make-makefile; fi + Makefiles:: + depend:: + install:: + uninstall:: + + clean:: + @$(RM_CMD) "#"* + + # ------------------------------------------------------------------------- + + # + # InterViews text-editor application + # + + PACKAGE = ivtext + + Makefiles:: + @echo "Making Makefiles" \ + "for $(ARCH) in $(CURRENT_DIR)/$(ARCH)" + -@if [ ! -d $(ARCH) ]; then \ + mkdir $(ARCH); \ + chmod g+w $(ARCH); \ + fi; \ + if [ -f $(ARCH)/Makefile ]; then \ + $(RM) $(ARCH)/Makefile.bak; \ + $(MV) $(ARCH)/Makefile $(ARCH)/Makefile.bak; \ + fi; \ + if [ ! -f $(ARCH)/Makefile ]; then \ + touch $(ARCH)/Makefile.depend; \ + fi; \ + $(IMAKE) $(IMAKEFLAGS) \ + -DTOPDIR=$(TOP) -DRELTOPDIR=../$(RELTOP) \ + -DCURDIR=$(CURRENT_DIR)/$(ARCH) \ + -DInObjectCodeDir -s $(ARCH)/Makefile + + depend:: + -@for i in $(ARCH); \ + do \ + if [ -d $$i ]; then ( \ + echo "depending" \ + "for $(ARCH) in $(CURRENT_DIR)/$$i"; \ + cd $$i; \ + $(MAKE) $(PASSARCH) depend; \ + ) else continue; fi; \ + done + + all:: + -@for i in $(ARCH); \ + do \ + if [ -d $$i ]; then ( \ + echo "making all" \ + "for $(ARCH) in $(CURRENT_DIR)/$$i"; \ + cd $$i; \ + $(MAKE) $(PASSARCH) all; \ + ) else continue; fi; \ + done + + install:: + -@for i in $(ARCH); \ + do \ + if [ -d $$i ]; then ( \ + echo "installing" \ + "for $(ARCH) in $(CURRENT_DIR)/$$i"; \ + cd $$i; \ + $(MAKE) $(PASSARCH) install; \ + ) else continue; fi; \ + done + + uninstall:: + -@for i in $(ARCH); \ + do \ + if [ -d $$i ]; then ( \ + echo "uninstalling" \ + "for $(ARCH) in $(CURRENT_DIR)/$$i"; \ + cd $$i; \ + $(MAKE) $(PASSARCH) uninstall; \ + ) else continue; fi; \ + done + + clean:: + -@for i in $(ARCH); \ + do \ + if [ -d $$i ]; then ( \ + echo "cleaning" \ + "for $(ARCH) in $(CURRENT_DIR)/$$i"; \ + cd $$i; \ + $(MAKE) $(PASSARCH) clean; \ + ) else continue; fi; \ + done + + Makefiles.debug: + @$(MAKE) ARCH="$(ARCH).debug" \ + SPECIAL_IMAKEFLAGS="$(SPECIAL_IMAKEFLAGS) -DUseDebug" \ + Makefiles + depend.debug: + @$(MAKE) ARCH="$(ARCH).debug" \ + SPECIAL_IMAKEFLAGS="$(SPECIAL_IMAKEFLAGS) -DUseDebug" \ + depend + all.debug: + @$(MAKE) ARCH="$(ARCH).debug" \ + SPECIAL_IMAKEFLAGS="$(SPECIAL_IMAKEFLAGS) -DUseDebug" \ + all + install.debug: + @$(MAKE) ARCH="$(ARCH).debug" \ + SPECIAL_IMAKEFLAGS="$(SPECIAL_IMAKEFLAGS) -DUseDebug" \ + install + clean.debug: + @$(MAKE) ARCH="$(ARCH).debug" \ + SPECIAL_IMAKEFLAGS="$(SPECIAL_IMAKEFLAGS) -DUseDebug" \ + clean + + Makefiles.noshared: + @$(MAKE) ARCH="$(ARCH).noshared" \ + SPECIAL_IMAKEFLAGS="$(SPECIAL_IMAKEFLAGS) -DUseNonShared" \ + Makefiles + depend.noshared: + @$(MAKE) ARCH="$(ARCH).noshared" \ + SPECIAL_IMAKEFLAGS="$(SPECIAL_IMAKEFLAGS) -DUseNonShared" \ + depend + all.noshared: + @$(MAKE) ARCH="$(ARCH).noshared" \ + SPECIAL_IMAKEFLAGS="$(SPECIAL_IMAKEFLAGS) -DUseNonShared" \ + all + install.noshared: + @$(MAKE) ARCH="$(ARCH).noshared" \ + SPECIAL_IMAKEFLAGS="$(SPECIAL_IMAKEFLAGS) -DUseNonShared" \ + install + clean.noshared: + @$(MAKE) ARCH="$(ARCH).noshared" \ + SPECIAL_IMAKEFLAGS="$(SPECIAL_IMAKEFLAGS) -DUseNonShared" \ + clean + + cmchkin:: + -@if [ $(NO_IVMKCM) ]; then exit 0; else \ + if [ ! -d $(TOP)/cm ]; then \ + (cd $(TOP); cminstall); fi; fi + -@if [ $(NO_IVMKCM) ]; then exit 0; else \ + csh -c '(setenv REPOSITORY_FILES "$(REPOSITORY_FILES)"; \ + cmchkin $(PACKAGE) $(TOP)/cm $(TOP) $(CURRENT_DIR))'; fi + + cmtag:: + -@if [ $(NO_IVMKCM) ]; then exit 0; else \ + if [ ! -d $(TOP)/cm ]; then \ + (echo "Build repository first with cmchkin"; exit 0;); fi; \ + if [ ! -d $(CURRENT_DIR)/CVS ]; then \ + (echo "Build repository first with cmchkin"; exit 0;); fi; fi + -@if [ $(NO_IVMKCM) ]; then exit 0; else \ + cmtag $(CMFLAGS) $(CMARGS); fi + + cmadd:: + -@if [ $(NO_IVMKCM) ]; then exit 0; else \ + if [ ! -d $(TOP)/cm ]; then \ + (echo "Build repository first with cmchkin"; exit 0;); fi; \ + if [ ! -d $(CURRENT_DIR)/CVS ]; then \ + (echo "Build repository first with cmchkin"; exit 0;); fi; fi + -@if [ $(NO_IVMKCM) ]; then exit 0; else \ + csh -c '(setenv REPOSITORY_FILES "$(REPOSITORY_FILES)"; cmadd -m null_message)'; fi + + cmupdate:: + -@if [ $(NO_IVMKCM) ]; then exit 0; else \ + if [ ! -d $(TOP)/cm ]; then \ + (echo "Build repository first with cmchkin"; exit 0;); fi; \ + if [ ! -d $(CURRENT_DIR)/CVS ]; then \ + (echo "Build repository first with cmchkin"; exit 0;); fi; fi + -@if [ $(NO_IVMKCM) ]; then exit 0; else cmupdate; fi + + cmcommit:: + -@if [ $(NO_IVMKCM) ]; then exit 0; else \ + if [ ! -d $(TOP)/cm ]; then \ + (echo "Build repository first with cmchkin"; exit 0;); fi; \ + if [ ! -d $(CURRENT_DIR)/CVS ]; then \ + (echo "Build repository first with cmchkin"; exit 0;); fi; fi + -@if [ $(NO_IVMKCM) ]; then exit 0; else \ + if [ -z "$(CMMSG)" ]; then cmcommit $(CMFLAGS); \ + else cmcommit $(CMFLAGS) -m "$(CMMSG)"; fi; fi + *** /dev/null Thu Sep 26 17:05:02 2002 --- src/ivtext/Imakefile Thu Sep 26 17:45:33 2002 *************** *** 0 **** --- 1,27 ---- + XCOMM + XCOMM InterViews text-editor application + XCOMM + + PACKAGE = ivtext + + #ifdef InObjectCodeDir + + CLIPPOLY_CCLDLIBS = + + APP_CCLDLIBS = $(LIBIVGLYPH) + #if HasDynamicSharedLibraries + APP_CCDEPLIBS = $(DEPIVGLYPH) + #endif + + Use_libInterViews() + ComplexProgramTarget(ivtext) + + MakeObjectFromSrcFlags(main,) + + IncludeDependencies() + + #else + + MakeInObjectCodeDir() + + #endif *** /dev/null Thu Sep 26 17:05:02 2002 --- src/ivtext/main.c Thu Sep 26 17:45:49 2002 *************** *** 0 **** --- 1,78 ---- + // + // Simple Text Editor Buffer Implementation + // + // Copyright (C) 1993 Ellemtel Telecommunication Systems Labratories + // + // Permission is granted to any individual or institution to use, copy, + // modify, and distribute this software, provided that this complete + // copyright and permission notice is maintained, intact, in all copies + // and supporting documentation. + // + // Ellemtel Telecommunication Systems Labratories make no representation + // of the suitability of this software for any purpose. It is provided + // "as is" without any expressed or implied warranty. + // + // Jan Andersson, Torpa Konsult AB + // [email protected] - 1993-08-29 + + #include <stdio.h> + + #include <IV-look/kit.h> + #include <InterViews/display.h> + #include <InterViews/layout.h> + #include <InterViews/session.h> + + #include <IVGlyph/textedit.h> + #include <IVGlyph/textwindow.h> + + class App { + public: + App(int, char**); + int run(); + private: + Session* session_; + EivTextEditor* text_edit_; + TextEditAppWindow* base_; + }; + + static PropertyData props[] = { + { "TextEdit*iconName", "Text Editor" }, + { "TextEdit*title", "InterViews Text Editor" }, + { "TextEdit*TextEditor*rows", "30" }, + { "TextEdit*TextEditor*columns", "80" }, + // { "TextEdit*TextEditor*textFont", "lucidasanstypewriter-14" }, + { "TextEdit*TextEditor*FileChooser*rows", "10" }, + { nil } + }; + + static OptionDesc options[] = { + { "-rows", "TextEdit*TextEditor*rows", OptionValueNext }, + { nil } + }; + + + int main(int argc, char** argv) { + App* a = new App(argc, argv); + return a->run(); + } + + App::App(int argc, char** argv) + { + session_ = new Session("TextEdit", argc, argv, options, props); + Display* display = session_->default_display(); + WidgetKit& kit = *WidgetKit::instance(); + const LayoutKit& layout = *LayoutKit::instance(); + + text_edit_ = new EivTextEditor(kit.style()); + + if (argc > 1) + text_edit_->load(argv[argc-1]); + + base_ = new TextEditAppWindow(text_edit_); + } + + int App::run() + { + return session_->run_window(base_); + } + *** /dev/null Thu Sep 26 17:57:08 PDT 2002 --- patches/ivtools-020926-johnston-068 *************** patches/ivtools-020926-johnston-068 *** 0 **** --- 1 ---- + ivtools-020926-johnston-068 ------------------------------------------------------- This sf.net email is sponsored by: See the NEW Palm Tungsten T handheld. Power & Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en