removed unused files

This commit is contained in:
lancos 2017-04-16 01:44:55 +02:00
parent d20f21228c
commit 363cba2560
312 changed files with 0 additions and 62977 deletions

View File

View File

View File

View File

@ -1,2 +0,0 @@
.directory
*.o

View File

@ -1,2 +0,0 @@
.directory
*.o

View File

@ -1,2 +0,0 @@
.directory
*.o

View File

@ -1,304 +0,0 @@
#===============================================================
# V Make Configuration file - Version 1.24 - 3/3/2000
#
# Copyright (C) 1995-2000 Bruce E. Wampler
# date:
#
# THIS IS THE Config.mk FILE FOR THE X Athena VERSION OF V
#
# To build an X version, set the TOOLKIT variable to Athena
# for the generic Athena version, or to Motif
# for the Lesstif/Motif version. (See comment below)
#
# This file is part of the V C++ GUI Framework, and is covered
# under the terms of the GNU Lesser General Public License,
# Version 2.1. This library has NO WARRANTY. See the source file
# vapp.cxx for more complete information about license terms.
#===============================================================
#---------------------------------------------------------------------
# Version info
#---------------------------------------------------------------------
VV = 1.25
VVW = 125
#---------------------------------------------------------------------
# HOMEV info
#---------------------------------------------------------------------
HOMEV = your_ponyprog_path/software/v
#HOMEV = $(HOME)/Progetti/PonyProg_Sourceforge/software/v
INSTALL_PREFIX = /usr/local
#---------------------------------------------------------------------
# Tools used in the makefile execution
#---------------------------------------------------------------------
CC = gcc
CXX = g++
#CC = gcc-4.1
#CXX = g++-4.1
#---------------------------------------------------------------------
# VPATH for dependencies on header files
#---------------------------------------------------------------------
VPATH=$(HOMEV)/includex/v
#---------------------------------------------------------------------
# Select the architecture of your system.
# These are the architectures that V has been extensively tested with:
# linux, linuelf, sun4, mips, sgi
#
# User contributed definitions are available for:
# hpux, aix, solaris, bsd
#---------------------------------------------------------------------
ARCH = linux
#ARCH = linuxelf
#ARCH = sun4
#ARCH = mips
#ARCH = sgi
#ARCH = hpux
#ARCH = aix
#ARCH = solaris
#ARCH = bsd
Arch = $(ARCH)
#---------------------------------------------------------------------
# Select Athena or Motif TOOLKIT option.
#---------------------------------------------------------------------
TOOLKIT = Athena
#TOOLKIT = Motif
#---------------------------------------------------------------------
# Use this define for NO 3D on Athena Widgets
# For Motif use NO 3D i.e. USE_3D=no.
#---------------------------------------------------------------------
ifeq ($(TOOLKIT),Motif)
USE_3D = no
else
USE_3D = yes
endif
#---------------------------------------------------------------------
# Select X11R-version
#---------------------------------------------------------------------
#X11RV = X11R5
X11RV = X11R6
# where X11 files are
Xdir11 = X11R6
#Xdir11 = X11
#---------------------------------------------------------------------
# Select Debug or no Debug
#---------------------------------------------------------------------
#DEBUG = yes
DEBUG = no
#---------------------------------------------------------------------
# Select Develop or not - used for original development
#---------------------------------------------------------------------
#DEVEL = yes
DEVEL = no
#---------------------------------------------------------------------
# Define filename extensions that are targeted by cleanup's
#---------------------------------------------------------------------
CLEANEXTS= *.bak *~ *.tmp core *.o *.obj
#---------------------------------------------------------------------
# Architecture dependent directory locations
#---------------------------------------------------------------------
VLibDir = $(HOMEV)/lib
ifeq ($(TOOLKIT),Motif)
oDir = $(HOMEV)/obj
endif
ifeq ($(TOOLKIT),Athena)
oDir = $(HOMEV)/objx
endif
LibDir = $(HOMEV)/lib
Bin = $(HOMEV)/bin
#---------------------------------------------------------------------
# Architecture independent
#---------------------------------------------------------------------
INCDIR = -I$(HOMEV)/includex
LIBDIR = -L$(LibDir)
ifeq ($(TOOLKIT),Athena)
LIBNAME = libVx
V1NAME = v1x
LIBS = -lVx -lXaw
endif
ifeq ($(TOOLKIT),Motif)
LIBNAME = libV
V1NAME = v1
LIBS = -lV -lXm -lXp
endif
#---------------------------------------------------------------------
# Linux
#---------------------------------------------------------------------
ifeq ($(Arch),linux)
INCDIR += -I/usr/$(X11RV)/include
LIBDIR += -L/usr/$(X11RV)/lib
LIBS += -lXmu -lXt -lXext -lX11
TARZ = z
RANLIB = ranlib
VGPATH = LINUX
endif
#---------------------------------------------------------------------
# Linux ELF shared library
#---------------------------------------------------------------------
ifeq ($(Arch),linuxelf)
INCDIR += -I/usr/$(X11RV)/include
LIBDIR += -L/usr/$(X11RV)/lib
LIBS += -lXmu -lXt -lXext -lX11
TARZ = z
RANLIB = ranlib
VGPATH = LINUX
endif
#---------------------------------------------------------------------
# Sun4 - unm
#---------------------------------------------------------------------
ifeq ($(TOOLKIT),Athena)
ifeq ($(Arch),sun4)
INCDIR += -I/usr/local/X11/include
LIBDIR += -L/usr/local/X11/lib
LIBS += -lXaw -lXmu -lXt -lXext -lX11
TARZ =
RANLIB = ranlib
VGPATH = UNIX
endif
endif
#----------------------------------------------------------------------
# solaris - shared Motif/CDE libraries
#----------------------------------------------------------------------
ifeq ($(TOOLKIT),Motif)
ifeq ($(Arch),solaris)
INCDIR += -I/usr/openwin/include -I/usr/dt/share/include -I$(HOMEV)/includex
LIBDIR += -R/usr/dt/lib:/usr/openwin/lib -L/usr/dt/lib
LIBS += -lXmu -lXt -lXext -lX11 -lnsl -lsocket
TARZ =
RANLIB = true
VGPATH = UNIX
endif
endif
#---------------------------------------------------------------------
# mips - unm
#---------------------------------------------------------------------
ifeq ($(Arch),mips)
INCDIR += -I/usr/local/X11/include
LIBDIR += -L/usr/local/X11/lib
LIBS += -lXaw -lXmu -lXt -lXext -lX11
TARZ =
RANLIB = ranlib
VGPATH = UNIX
endif
#---------------------------------------------------------------------
# sgi
# - the native compiler on IRIX 5.3 complains ad nauseam
# about parameters that are declared but not referenced
# in virtual functions; the -woff turns that warning off
#---------------------------------------------------------------------
ifeq ($(Arch),sgi)
INCDIR += -I/usr/include
LIBDIR += -L/usr/lib
LIBS += -lXmu -lXt -lXext -lX11 -lm
TARZ =
RANLIB = true
VGPATH = UNIX
ifneq ($(CXX),g++)
CFLAGS += -woff 3262
endif
endif
#---------------------------------------------------------------------
# hpux:
# - /usr/include is included explicitly because on HP-UX 10.20
# mixing of GNU supplied and system supplied includes leads to
# problems
# - X11 is available either in /usr/contrib or /usr/local
# listing both can not hurt
#----------------------------------------------------------------------
ifeq ($(Arch),hpux)
INCDIR += -I/usr/include -I/usr/include/$(X11RV) \
-I/usr/contrib/$(X11RV)/include \
-I/usr/local/$(X11RV)/include
LIBDIR += -L/usr/lib/$(X11RV) -L/usr/contrib/$(X11RV)/lib \
-L/usr/local/$(X11RV)/lib
LIBS += -lXmu -lXt -lSM -lICE -lXext -lX11
TARZ =
RANLIB = true
VGPATH = UNIX
endif
#----------------------------------------------------------------------
# solaris - unm
#----------------------------------------------------------------------
# Note: For Solaris CC Workshop comiplers and OpenWindows linking:
#LIBDIR += -L/usr/openwin/lib -R/usr/openwin/lib
ifeq ($(Arch),solaris)
INCDIR += -I/usr/local/X11/include -I$(HOMEV)/includex
LIBDIR += -L/usr/local/X11/lib
LIBS += -lXmu -lXt -lXext -lX11 -lnsl -lsocket
TARZ =
RANLIB = true
VGPATH = UNIX
endif
#----------------------------------------------------------------------
# FreeBSD with gcc
#----------------------------------------------------------------------
ifeq ($(Arch),bsd)
INCDIR += -I/usr/$(X11RV)/include
LIBDIR += -L/usr/$(X11RV)/lib
LIBS += -lV -lXmu -lXt -lXext -lX11 -lxm
TARZ =
RANLIB = ranlib
VGPATH = UNIX
endif
#---------------------------------------------------------------------
# C/C++ compile options
#---------------------------------------------------------------------
#CFLAGS += -v $(INCDIR)
CFLAGS += $(INCDIR)
ifeq ($(DEBUG),no)
CFLAGS += -O2
endif
ifeq ($(DEBUG),yes)
CFLAGS += -g
CFLAGS += -DvDEBUG
endif
ifeq ($(TOOLKIT),Athena)
CFLAGS += -DAthena
endif
ifeq ($(DEVEL),yes)
CFLAGS += -DDEVEL
endif
#---------------------------------------------------------------------
# LINK/LOAD options
#---------------------------------------------------------------------
LDFLAGS = $(LIBDIR) $(LIBS)

View File

@ -1,24 +0,0 @@
#---------------------------------------------------------------------
# Select Debug or no Debug
#---------------------------------------------------------------------
#DEBUG = yes
DEBUG = no
OSNAME := $(shell uname -s | cut -c 1-5)
ifeq ($(OSNAME),MINGW)
TOOLCHAINPREFIX =
else
#TOOLCHAINPREFIX = i586-mingw32msvc-
TOOLCHAINPREFIX = i686-w64-mingw32-
endif
CC = $(TOOLCHAINPREFIX)gcc
CXX = $(TOOLCHAINPREFIX)g++
RANLIB = $(TOOLCHAINPREFIX)ranlib
WINDRES = $(TOOLCHAINPREFIX)windres
#---------------------------------------------------------------------
# Define filename extensions that are targeted by cleanup's
#---------------------------------------------------------------------
CLEANEXTS= *.bak *~ *.tmp core *.o

View File

@ -1,376 +0,0 @@
#===============================================================
# V Makefile - Version 1.25 - 22Sep00
#
# Copyright (C) 1995-2000 Bruce E. Wampler
#
# This file is part of the V C++ GUI Framework, and is covered
# under the terms of the GNU Library General Public License,
# Version 2. This library has NO WARRANTY. See the source file
# vapp.cxx for more complete information about license terms.
#
# Many thanks to Jan Broeckhove for contributing this
# set of makefiles, which are the standard method of building
# V beginning with Version 1.16.
#
# Support for Win 3.1 removed effective 1.22
#===============================================================
#
# IMPORTANT NOTE:
# This Makefile is the top level makefile used to build V on
# various Unix-like platforms. First and foremost, this Makefile
# requires a version of make compatible with Gnu make. One
# specific requirement is VPATH support, for example. There
# are other incompatibilities with gmake and the old standard
# Unix make.
#
# Also, all the Makefiles in this version are controlled by
# the file Config.mk. It defines various directory locations
# and things needed to make V work correctly. You should only
# have to edit Config.mk to get V compiled correctly.
#
# There are TWO versions of Config.mk - one for the standard
# Athena widget version of V, and one for the Motif version.
# To build the Athena version, copy ConfigX.mk to Config.mk
# and edit for your system. To build the Motif version,
# copy ConfigM.mk to Config.mk and edit for your system.
#
CONFIG = ./Config.mk
include $(CONFIG)
#===============================================================
# Available targets:
#
# all (default): vlib, vtest, utils, examp ...
# vlib: build V library
# vtest: build exhaustive test program v1
# utils: vgen, viconed, vdraw, bmp2vbm
# examples: demos proto, drawex, tutor, icondemo
# clean: general cleanup
# cleanmotif: cleanup motif .o's, etc.
# cleanathena: cleanup Athena .o's, etc.
# cleanobj: cleanup .o's
# cleanbin: cleanup bins's
# cleanall: cleanup all non-source stuff
# tar: X and Windows Distribution
# tarwin: Windows only Distribution"
# tarx: X only distribution
# tarfull: everthing, including .o's, etc.
# getwin: copy MS-Windows source from /dosc
# permissions: make sources readable to world
# installv: run as root to install to /usr/local/v
# installvlinux: run as root to install to /usr/local
# installunm: install to ../pubv (UNM specific)
#
#===============================================================
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#
# composite targets and targets for builds in subdirs
# (with some in-between targets to map target to directory)
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
SRCEXTS = *.cpp *.cxx *.c *.h Make* make* Config* *.tex *.txt
.PHONY: default all vlib vtest utils examples testlib
.PHONY: srcx test appgen iconed draw bmp2vbm tutor examp drawex icons
#default: all
default: vlib
all: vlib vtest utils examples
@echo "Library, test, utils, examples and tutorial made"
vlib: srcx
vtest: test
testlib:
-rm bin/v1
cd srcx ; $(MAKE)
cd test ; $(MAKE)
utils: appgen iconed draw bmp2vbm
examples: examp drawex icons tutor
srcx test appgen iconed draw bmp2vbm tutor examp drawex icons:
cd $@ ; $(MAKE)
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#
# Platform specific MAKES
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
.PHONY: linux linuxelf sun4 sgi hpux aix solaris bsd
linux linuxelf sun4 sgi hpux aix solaris bsd:
$(MAKE) ARCH=$@ vlib
$(MAKE) ARCH=$@ vtest
(cd appgen ; $(MAKE) ARCH=$@)
(cd iconed ; $(MAKE) ARCH=$@)
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#
# targets for cleaning up
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
.PHONY: clean
clean:
# -rm -f $(CLEANEXTS) *.bkh v.tgz
# for i in srcx appgen draw drawex examp iconed icons test tutor; do \
# (cd $$i; $(MAKE) clean); \
# done
# for i in obj contrib vopengl includex/v includew/v srcwin; do \
# (cd $$i; rm -f $(CLEANEXTS)); \
# done
# -rm -f bccide/*.bak bccide/*.tmp bccide/*.csm
# -rm -f bccide/*.dsw bccide/*.obr bccide/*.tr
# -rm -f watcom/*.bak watcom/*.tmp watcom/*/*.exe watcom/*/*.obj
# -rm -f watcom/*/*.map watcom/*/*.lib watcom/*/*.err watcom/*/*.sym
# -rm -f bccide/*.bak bccide/*.tmp bccide/*.\~* bccide/*.csm
rm -f objx/*.o lib/libVx*
.PHONY: cleanathena
cleanathena:
-rm -f objx/* lib/libVx.a bin/v1x
date > objx/ThisIs
.PHONY: cleantestlib
cleantestlib:
-rm bin/v1
.PHONY: cleanbin
cleanbin:
-rm -f bin/*
date > lib/ThisIs
date > bin/ThisIs
.PHONY: cleanobj
cleanobj:
-rm -f obj/* objx/*
-rm -f watcom/*/*.obj
date > obj/ThisIs
date > objx/ThisIs
.PHONY: cleanall
cleanall: clean cleanobj
-rm -f lib/* bin/*
date > lib/ThisIs
date > bin/ThisIs
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#
# targets for making tar files
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
.PHONY: tar
tar: clean
@echo "Making v.tgz - X and Windows Distribution"
@echo " Cleaning up old tar file"
-rm ../v-$(VV).tar$(TARZ)
cd .. ; tar cvf$(TARZ) v-$(VV).tar$(TARZ) v/Make* v/README v/C* \
v/rd* v/vrefman/* v/examp/* v/bmp2vbm/* v/tutor/* v/includex/* \
v/includew/* v/lib/ThisIs v/obj/ThisIs v/objx/ThisIs v/srcx/* \
v/srcwin/* v/test/* v/draw/* v/iconed/* v/drawex/* v/bin/ThisIs \
v/bccide v/icons/* v/watcom/* v/contrib/* v/appgen/* \
v/vopengl/* v/msvc/* v/gnuwin32/* ; cd v
.PHONY: tarwin
tarwin: clean
@echo "Making vwin.tar - Windows Distribution"
@echo " Cleaning up old tar file"
-rm ../vwin$(VVW).tar$(TARZ)
cd .. ; tar cvf$(TARZ) vwin$(VVW).tar$(TARZ) v/Make* v/README v/rd* v/C* \
v/vrefman/* v/examp/* v/bmp2vbm/* v/tutor/* v/include \
v/includew/* v/lib/ThisIs v/obj/ThisIs v/objx/ThisIs \
v/srcwin/* v/test/* v/draw/* v/drawex/* v/bin/ThisIs \
v/bccide v/icons/* v/iconed/* v/contrib/* \
v/appgen/* v/vopengl/* v/msvc/* v/gnuwin32/* ; cd v
.PHONY: tarx
tarx: clean
@echo "Making vx-$(VV).tar - X only distribution"
@echo " Cleaning up old tar file"
-rm ../vx-$(VV).tar$(TARZ)
cd .. ; tar cvf$(TARZ) vx-$(VV).tar$(TARZ) v/Make* v/README v/rd* v/C* \
v/vrefman/* v/examp/* v/bmp2vbm/* v/tutor/* v/includex/* \
v/lib/ThisIs v/obj/ThisIs v/objx/ThisIs v/srcx/* v/icons/* \
v/test/* v/draw/* v/iconed/* v/drawex/* v/bin/ThisIs \
v/contrib/* v/appgen/* v/vopengl/* ; cd v
.PHONY: tarxsrc
tarxsrc: clean
@echo "Making vxsrc-$(VV).tar - X only distribution"
@echo " Cleaning up old tar file"
-rm ../vxsrc-$(VV).tar$(TARZ)
cd .. ; tar cvf$(TARZ) vxsrc-$(VV).tar$(TARZ) v/Make* v/README v/rd* v/C* \
v/examp/* v/bmp2vbm/* v/tutor/* v/includex/* \
v/lib/*/ThisIs v/obj/*/ThisIs v/objm/*/ThisIs v/srcx/* v/icons/* \
v/test/* v/draw/* v/iconed/* v/drawex/* v/bin/ThisIs \
v/contrib/* v/appgen/* v/vopengl/* ; cd v
.PHONY: tarfull
tarfull: clean
@echo "Making vfull.tgz - FULL VERSION"
@echo " Cleaning up old tar file"
-rm ../vfull.tar$(TARZ)
cd .. ; tar cvf$(TARZ) vfull.tar$(TARZ) v/* ; cd v
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#
# target for fixing permissions
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
PERMDIRS = . vrefman examp tutor includex includex/v includew/v lib \
lib/* obj obj/* objm objm/* srcx srcwin test draw drawex iconed bin \
bin/* bmp2vbm icons vopengl appgen contrib bccide watcom msvc gnuwin32
WINDIRS = watcom/win32 watcom/win32db \
msvc/vgen32 msvc/viconed msvc/vmsvc32 msvc/vtstms32 \
msvc/vgen32/release msvc/viconed/release msvc/vmsvc32/release \
msvc/vtstms32/release
PERMFILES = Make* README rd* C* rd* vrefman/* includex/v/* \
includew/v/* lib/* obj/* objx/* srcx/* srcwin/* test/* \
draw/* iconed/* drawex/* examp/* bin/* tutor/* bmp2vbm/* bccide/* \
icons/* watcom/*/* watcom/* contrib/* \
appgen/* vopengl/* gnuwin32/* msvc/*/* msvc/*
EXEFILES = bin/*
.PHONY: permissions
permissions:
-chmod 755 $(PERMDIRS)
-chmod 755 $(WINDIRS)
-chmod 644 $(PERMFILES)
-chmod 755 $(PERMDIRS)
-chmod 755 $(WINDIRS)
-chmod 755 $(EXEFILES)
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#
# installation targets
# These work best for dedicated systems where you can run as
# root.
# IMPORTANT! It will be easier if you make a symbolic link
# in the home directory of root to whereever V is before
# doing the install. E.g.,
#
# [root]# cd
# [root]# ln -s /home/bruce/v v
# [root]# cd v
# [root]# make installLinux
#
# This makefile uses $(LibDir), which is
# set to HOME by default, so adding a link from the root
# directory of root to the real v directory makes this work right.
#
# The Linux version assumes that X11 binaries are at /usr/X11/bin.
# Some versions have /usr/X11R6/bin instead. If that is your case,
# you should also create a symbolic link in /usr: ln -s X11R6 X11
#
#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
.PHONY: installLinux
installLinux:
$(MAKE) ARCH=linux installVLinux
.PHONY: uninstallLinux
uninstallLinux:
$(MAKE) ARCH=linux uninstallVLinux
.PHONY: install
install:
$(MAKE) ARCH=linuxelf installVLinux
echo "#######################################"
echo " You now need to ldconfig from root..."
echo "#######################################"
.PHONY: uninstall
uninstall:
$(MAKE) ARCH=linuxelf uninstallVLinux
.PHONY: installv
installv:
-mkdir $(INSTALL_PREFIX)/v
-mkdir $(INSTALL_PREFIX)/v/lib
-mkdir $(INSTALL_PREFIX)/v/bin
-mkdir $(INSTALL_PREFIX)/v/include
-mkdir $(INSTALL_PREFIX)/v/include/v
-chmod 755 $(INSTALL_PREFIX)/v
-chmod 755 $(INSTALL_PREFIX)/v/lib
-chmod 755 $(INSTALL_PREFIX)/v/bin
-chmod 755 $(INSTALL_PREFIX)/v/include
-chmod 755 $(INSTALL_PREFIX)/v/include/v
cp includex/v/* $(INSTALL_PREFIX)/v/include/v
cp $(LibDir)/*.a $(INSTALL_PREFIX)/v/lib
cp $(Bin)/* $(INSTALL_PREFIX)/v/bin
-chmod 644 $(INSTALL_PREFIX)/v/include/v/*
-chmod 644 $(INSTALL_PREFIX)/v/lib/*
-chmod 755 $(INSTALL_PREFIX)/v/bin/*
.PHONY: installgnuwin32
installgnuwin32:
# -mkdir $(HOMEGNU)/include/v
cp includew/v/*.h $(HOMEGNU)/include/v
cp $(LibDir)/*.a $(HOMEGNU)/lib
cp $(Bin)/* $(HOMEGNU)/bin
.PHONY: installmingw32
installmingw32:
# -mkdir $(HOMEGNU)/include/v
rm -f $(HOMEGNU)/include/v/*
cp ./includew/v/*.h $(HOMEGNU)/include/v
cp $(LibDir)/*.a $(HOMEGNU)/lib
cp $(Bin)/* $(HOMEGNU)/bin
.PHONY: installVLinux
installVLinux:
@echo "You must run this as root"
# -mkdir /usr/include/v
# -chmod 644 includex/v/*
# cp includex/v/* /usr/include/v
ifeq ($(Arch),linuxelf)
chmod 644 $(LibDir)/*.so.$(VV)
cp $(LibDir)/*.so.$(VV) $(INSTALL_PREFIX)/lib
rm -f $(INSTALL_PREFIX)/lib/$(LIBNAME).so.1
ln -s $(INSTALL_PREFIX)/lib/$(LIBNAME).so.$(VV) $(INSTALL_PREFIX)/lib/$(LIBNAME).so.1
rm -f $(INSTALL_PREFIX)/lib/$(LIBNAME).so
ln -s $(INSTALL_PREFIX)/lib/$(LIBNAME).so.$(VV) $(INSTALL_PREFIX)/lib/$(LIBNAME).so
else
-chmod 644 $(LibDir)/*.a
cp $(LibDir)/*.a $(INSTALL_PREFIX)/lib
endif
# -chmod 755 $(Bin)/*
# cp $(Bin)/* /usr/$(Xdir11)/bin
.PHONY: uninstalVlLinux
uninstallVLinux:
@echo "You must run this as root"
# -rm /usr/include/v/*
ifeq ($(Arch),linuxelf)
rm -f $(INSTALL_PREFIX)/lib/$(LIBNAME).so.1
rm -f $(INSTALL_PREFIX)/lib/$(LIBNAME).so
rm -f $(INSTALL_PREFIX)/lib/$(LIBNAME).so.$(VV)
else
rm -f $(INSTALL_PREFIX)/lib/libV.a
rm -f $(INSTALL_PREFIX)/lib/libVgl.a
endif
# -rm /usr/$(Xdir11)/bin/viconed
# -rm /usr/$(Xdir11)/bin/b2v
# -rm /usr/$(Xdir11)/bin/icondemo
# -rm /usr/$(Xdir11)/bin/proto
# -rm /usr/$(Xdir11)/bin/tutapp
# -rm /usr/$(Xdir11)/bin/v1
# -rm /usr/$(Xdir11)/bin/vdraw
# -rm /usr/$(Xdir11)/bin/vdrawex

View File

@ -1,345 +0,0 @@
#=======================================================================
#@V@:Note: File automatically generated by VIDE: (10:28:19 18 Sep 2000) (g++).
# This file regenerated each time you run VIDE, so save under a
# new name if you hand edit, or it will be overwritten.
#=======================================================================
CONFIG=Configwin.mk
include $(CONFIG)
oDir = objwin
Bin = lib
Src = srcwin
libDirs =
incDirs = -Iincludew
C_FLAGS = -D_WINDOWS
ifeq ($(DEBUG),no)
C_FLAGS += -O2
else
C_FLAGS += -DvDEBUG
C_FLAGS += -O0 -g
endif
LIBS =
C_FLAGS += -fpermissive -Wno-write-strings
SRCS =\
$(Src)/vapp.cpp\
$(Src)/vawinfo.cpp\
$(Src)/vbaseitm.cpp\
$(Src)/vbasewin.cpp\
$(Src)/vbglcnv.cpp\
$(Src)/vboxlblc.cpp\
$(Src)/vbrush.cpp\
$(Src)/vbtncmd.cpp\
$(Src)/vcanvas.cpp\
$(Src)/vcbtncmd.cpp\
$(Src)/vchkboxc.cpp\
$(Src)/vclabelc.cpp\
$(Src)/vcmd.cpp\
$(Src)/vcmdpane.cpp\
$(Src)/vcmdprnt.cpp\
$(Src)/vcmdwin.cpp\
$(Src)/vcolor.cpp\
$(Src)/vcomboc.cpp\
$(Src)/vcpdc.cpp\
$(Src)/vdebug.cpp\
$(Src)/vdialog.cpp\
$(Src)/vfilesel.cpp\
$(Src)/vfinddlg.cpp\
$(Src)/vfont.cpp\
$(Src)/vfontsel.cpp\
$(Src)/vframec.cpp\
$(Src)/vicon.cpp\
$(Src)/vlabelc.cpp\
$(Src)/vlistc.cpp\
$(Src)/vmemdc.cpp\
$(Src)/vmenu.cpp\
$(Src)/vmodald.cpp\
$(Src)/vnotice.cpp\
$(Src)/vos.cpp\
$(Src)/vpen.cpp\
$(Src)/vpopmenu.cpp\
$(Src)/vprogrsc.cpp\
$(Src)/vradioc.cpp\
$(Src)/vrepldlg.cpp\
$(Src)/vreply.cpp\
$(Src)/vsliderc.cpp\
$(Src)/vslist.cpp\
$(Src)/vspinc.cpp\
$(Src)/vstartup.cpp\
$(Src)/vtextc.cpp\
$(Src)/vtextcnv.cpp\
$(Src)/vtexted.cpp\
$(Src)/vtextinc.cpp\
$(Src)/vthislst.cpp\
$(Src)/vtimer.cpp\
$(Src)/vwindc.cpp\
$(Src)/vutil.cpp\
$(Src)/vwindow.cpp\
$(Src)/vwinprdc.cpp\
$(Src)/vwinprtr.cpp\
$(Src)/vynreply.cpp
EXOBJS =\
$(oDir)/vapp.o\
$(oDir)/vawinfo.o\
$(oDir)/vbaseitm.o\
$(oDir)/vbasewin.o\
$(oDir)/vbglcnv.o\
$(oDir)/vboxlblc.o\
$(oDir)/vbrush.o\
$(oDir)/vbtncmd.o\
$(oDir)/vcanvas.o\
$(oDir)/vcbtncmd.o\
$(oDir)/vchkboxc.o\
$(oDir)/vclabelc.o\
$(oDir)/vcmd.o\
$(oDir)/vcmdpane.o\
$(oDir)/vcmdprnt.o\
$(oDir)/vcmdwin.o\
$(oDir)/vcolor.o\
$(oDir)/vcomboc.o\
$(oDir)/vcpdc.o\
$(oDir)/vdebug.o\
$(oDir)/vdialog.o\
$(oDir)/vfilesel.o\
$(oDir)/vfinddlg.o\
$(oDir)/vfont.o\
$(oDir)/vfontsel.o\
$(oDir)/vframec.o\
$(oDir)/vicon.o\
$(oDir)/vlabelc.o\
$(oDir)/vlistc.o\
$(oDir)/vmemdc.o\
$(oDir)/vmenu.o\
$(oDir)/vmodald.o\
$(oDir)/vnotice.o\
$(oDir)/vos.o\
$(oDir)/vpen.o\
$(oDir)/vpopmenu.o\
$(oDir)/vprogrsc.o\
$(oDir)/vradioc.o\
$(oDir)/vrepldlg.o\
$(oDir)/vreply.o\
$(oDir)/vsliderc.o\
$(oDir)/vslist.o\
$(oDir)/vspinc.o\
$(oDir)/vstartup.o\
$(oDir)/vtextc.o\
$(oDir)/vtextcnv.o\
$(oDir)/vtexted.o\
$(oDir)/vtextinc.o\
$(oDir)/vthislst.o\
$(oDir)/vtimer.o\
$(oDir)/vwindc.o\
$(oDir)/vutil.o\
$(oDir)/vwindow.o\
$(oDir)/vwinprdc.o\
$(oDir)/vwinprtr.o\
$(oDir)/vynreply.o
ALLOBJS = $(EXOBJS)
ALLBIN = $(Bin)/libV.a
ALLTGT = $(Bin)/libV.a
# User defines:
#@# Targets follow ---------------------------------
all: $(ALLTGT)
objs: $(ALLOBJS)
cleanobjs:
rm -f $(ALLOBJS)
cleanbin:
rm -f $(ALLBIN)
clean: cleanobjs cleanbin
cleanall: cleanobjs cleanbin
#@# User Targets follow ---------------------------------
#@# Dependency rules follow -----------------------------
$(Bin)/libV.a: $(EXOBJS)
rm -f $(Bin)/libV.a
ar cr $(Bin)/libV.a $(EXOBJS)
$(RANLIB) $(Bin)/libV.a
$(oDir)/vapp.o: $(Src)/vapp.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vawinfo.o: $(Src)/vawinfo.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vbaseitm.o: $(Src)/vbaseitm.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vbasewin.o: $(Src)/vbasewin.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vbglcnv.o: $(Src)/vbglcnv.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vboxlblc.o: $(Src)/vboxlblc.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vbrush.o: $(Src)/vbrush.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vbtncmd.o: $(Src)/vbtncmd.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vcanvas.o: $(Src)/vcanvas.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vcbtncmd.o: $(Src)/vcbtncmd.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vchkboxc.o: $(Src)/vchkboxc.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vclabelc.o: $(Src)/vclabelc.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vcmd.o: $(Src)/vcmd.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vcmdpane.o: $(Src)/vcmdpane.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vcmdprnt.o: $(Src)/vcmdprnt.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vcmdwin.o: $(Src)/vcmdwin.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vcolor.o: $(Src)/vcolor.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vcomboc.o: $(Src)/vcomboc.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vcpdc.o: $(Src)/vcpdc.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vdebug.o: $(Src)/vdebug.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vdialog.o: $(Src)/vdialog.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vfilesel.o: $(Src)/vfilesel.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vfinddlg.o: $(Src)/vfinddlg.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vfont.o: $(Src)/vfont.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vfontsel.o: $(Src)/vfontsel.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vframec.o: $(Src)/vframec.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vicon.o: $(Src)/vicon.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vlabelc.o: $(Src)/vlabelc.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vlistc.o: $(Src)/vlistc.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vmemdc.o: $(Src)/vmemdc.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vmenu.o: $(Src)/vmenu.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vmodald.o: $(Src)/vmodald.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vnotice.o: $(Src)/vnotice.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vos.o: $(Src)/vos.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vpen.o: $(Src)/vpen.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vpopmenu.o: $(Src)/vpopmenu.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vprogrsc.o: $(Src)/vprogrsc.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vradioc.o: $(Src)/vradioc.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vrepldlg.o: $(Src)/vrepldlg.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vreply.o: $(Src)/vreply.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vsliderc.o: $(Src)/vsliderc.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vslist.o: $(Src)/vslist.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vspinc.o: $(Src)/vspinc.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vstartup.o: $(Src)/vstartup.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vtextc.o: $(Src)/vtextc.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vtextcnv.o: $(Src)/vtextcnv.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vtexted.o: $(Src)/vtexted.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vtextinc.o: $(Src)/vtextinc.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vthislst.o: $(Src)/vthislst.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vtimer.o: $(Src)/vtimer.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vwindc.o: $(Src)/vwindc.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vutil.o: $(Src)/vutil.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vwindow.o: $(Src)/vwindow.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vwinprdc.o: $(Src)/vwinprdc.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vwinprtr.o: $(Src)/vwinprtr.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(oDir)/vynreply.o: $(Src)/vynreply.cpp
$(CXX) $(C_FLAGS) $(incDirs) -c -o $@ $<
$(shell mkdir -p $(oDir) 2>/dev/null)
$(shell mkdir -p $(Bin) 2>/dev/null)

View File

@ -1,41 +0,0 @@
Welcome to the V FTP site. This site contains the main
distribution for the V, a free, portable C++ GUI Framework.
This file was last updated 26 Sept 2000
--------------------------------------------------------------
--------------------------------------------------------------
The files of interest:
v-1.25.tar.gz -- Gzipped tar file of the Full version - X and Windows.
This includes all source for X and MS-Windows, as well
as full documentation.
vos2-121.zip -- ZIP file with V for OS/2, Version 1.21.
videsrc118.tar.gz -- Gzipped tar file of VIDE source.
videsetup.exe -- VIDE for MS-Windows
vide-linux.tar.gz -- Static Linux executable of VIDE.
winutils.zip -- MS-Windows ZIP file of some essential tools used
by V and VIDE, including gunzip and tar. You will need a
version of ZIP for windows. See http://zipcentral.iscool.net
for a completely free ZIP program. (Virus-free version)
******************* LATEST NEWS ABOUT V ***********************
September 26, 2000
This is the V 1.25 release. See the full V documentation
for a description of what is new in V 1.25 at
http://objectcentral.com/vgui/vrefman/install.htm
----------------
----------------
January 10, 1996
Version 1.0 posted.

339
v/copying
View File

@ -1,339 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

View File

@ -1,504 +0,0 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it 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.
This library is distributed in the hope that it 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 this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!

View File

@ -1,429 +0,0 @@
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
#ifndef V_DEFS_H
#define V_DEFS_H
//
// Windows
//
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
// //
// VV VV VV VV //
// VV VV V - A Portable C++ GUI Framework VV VV //
// VV VV designed and written by VV VV //
// VV VV VV VV //
// VV VV Bruce E. Wampler, Ph.D. VV VV //
// VVV e-mail: bruce@objectcentral.com VVV //
// V V //
// //
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
// //
// v_defs.h - Standard V definitions //
// //
// Copyright (C) 1995-2000 Bruce E. Wampler //
// //
// This file is part of the V C++ GUI Framework. //
// //
// This library is free software; you can redistribute it and/or //
// modify it under the terms of the GNU Lesser General Public //
// License as published by the Free Software Foundation; either //
// version 2.1 of the License, or (at your option) any later version. //
// //
// This library is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //
// Library General Public License for more details. //
// //
// You should have received a copy of the GNU Lesser General Public //
// License along with this library (see COPYING.LIB); if not, write to the //
// Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. //
// //
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
//#ifndef vDEBUG // force DEBUG for now
//#define vDEBUG
//#endif
//#undef vDEBUG
#ifdef WIN32
#undef VWIN16
#endif
#include <windows.h>
#include <windowsx.h>
#include <string.h>
#include <stdio.h>
#define V_VersMajor 1
#define V_VersMinor 25
#define V_Version "V 1.25 - 15 Sep 2000"
#define V_VersionWindows 1
// VCONST can be defined as const, but that will require changes
// to apps. We will wait until V 2.0 for that to happen officially,
// but for now, this is available, at least on some classes.
// The VMUTABLE const is associated with VCONST.
//#define VCONST const
//#define VMUTABLE mutable
#define VCONST
#define VMUTABLE
// V_DLL support - added in 1.22
#include <v/vdll.h>
// system error functions
extern void vSysWarning(VCONST char* msg);
extern void vSysError(VCONST char* msg);
// Define basic types
typedef unsigned int vKey; // Value for a Key
typedef int ItemVal; // Value for an Item (menu,button, etc)
typedef unsigned long CmdAttribute; // Attributes of commands
#define vRGB (v,x,y,z) v.r = x ; v.g = y ; v.z = b;
#define vpRGB (v,x,y,z) v->r = x ; v->g = y ; v->z = b;
const int maxFileNameSize = 262;
typedef struct DebugMask
{
unsigned
System : 1, // System debug messages
CmdEvents : 1, // Show command events (buttons, etc.)
MouseEvents : 1, // Show mouse events
WindowEvents : 1, // Window events (resize, etc.)
Build : 1, // Define/Build window
BadVals: 1, // Error values
Misc : 1, // Misc stuff
Text : 1, // Text events
Constructor : 1, // Show constructors
Destructor : 1, // Show destructors
User: 1, // Debug user events
UserApp1 : 1, // Level 1 User App
UserApp2 : 1, // Level 2 User App
UserApp3 : 1;
} DebugMask;
extern DebugMask DebugState; // allow everyone to see DebugState
// Define some macros to make adding debugging stuff easy
#ifdef vDEBUG
#define UserDebug(u,v) if (DebugState.u && DebugState.User) { FILE *fh=fopen("vdebug.log", "a"); fprintf(fh,v); fclose(fh); }
#define UserDebug1(u,v,w) if (DebugState.u && DebugState.User) { FILE *fh=fopen("vdebug.log", "a"); fprintf(fh,v,w); fclose(fh); }
#define UserDebug2(u,v,w,x) if (DebugState.u && DebugState.User) { FILE *fh=fopen("vdebug.log", "a"); fprintf(fh,v,w,x); fclose(fh); }
#define UserDebug3(u,v,w,x,z) if (DebugState.u && DebugState.User) { FILE *fh=fopen("vdebug.log", "a"); fprintf(fh,v,w,x,z); fclose(fh); }
#define SysDebug(u,v) if (DebugState.u && DebugState.System) fprintf(stderr,v);
#define SysDebug1(u,v,w) if (DebugState.u && DebugState.System) fprintf(stderr,v,w);
#define SysDebug2(u,v,w,x) if (DebugState.u && DebugState.System) fprintf(stderr,v,w,x);
#define SysDebug3(u,v,w,x,z) if (DebugState.u && DebugState.System) fprintf(stderr,v,w,x,z);
#else
#define UserDebug(u,v) // Nothing
#define UserDebug1(u,v,w) // Nothing
#define UserDebug2(u,v,y,x) // Nothing
#define UserDebug3(u,v,y,x,z) // Nothing
#define SysDebug(u,v) // Nothing
#define SysDebug1(u,v,w) // Nothing
#define SysDebug2(u,v,w,x) // Nothing
#define SysDebug3(u,v,w,x,z) // Nothing
#endif
// Define some standard font ids, which will internally correspond
// to both the id and the index of the vApp font array.
enum WindowType { WINDOW, CMDWINDOW, DIALOG }; // Types of windows
// How Items can be set
enum ItemSetType {Checked, Sensitive, Value, Hidden, ChangeList,
ChangeListPtr, Red, Green, Blue, ChangeColor};
enum CmdType // types of dialog commands
{
C_EndOfList, // Used to denote end of command list
C_ArrowButton, // An arrow button
C_Blank, // filler to help RightOfs, Belows work
C_BoxedLabel, // A status bar boxed label (Win only)
C_Button, // Boxed Label
C_CheckBox, // Checked Item
C_ColorButton, // A colored button
C_ColorLabel, // A colored label
C_Custom, // A custom control
C_ComboBox, // Popup combo list
C_Frame, // General purpose frame
C_Icon, // a display only Icon
C_IconButton, // a command button Icon
C_Label, // Regular text label
C_List, // List of items (scrollable)
C_Menu, // Menu item
C_ProgressBar, // Bar to show progress
C_RadioButton, // Radio button
C_SComboBox, // Popup string combo list
C_Slider, // Slider to enter value
C_SList, // String List of items (scrollable)
C_Spinner, // a spinner box
C_TextIn, // Text input field
C_Text, // wrapping text out
C_ToggleButton, // A toggle button
C_ToggleFrame, // A toggle frame
C_ToggleIconButton, // A toggle icon button
C_ZZZ // make my life easy
};
enum PaneType // Kinds of Panes
{
P_Canvas, // Drawing Canvas
P_TextCanvas, // TextCanvas
P_Menu, // Menu
P_Commands, // Commands
P_Icons, // Icon Bar
P_Buttons, // Button Bar
P_Status, // Status Bar
P_Dialog // Dialog
};
const CmdAttribute CA_None = 0; // No special attributes
const CmdAttribute CA_MainMsg = 0x01; // Gets replacement message
const CmdAttribute CA_DefaultButton = 0x02; // Special Default Button
const CmdAttribute CA_Large = 0x04; // Command larger than normal
const CmdAttribute CA_Small = 0x08; // Command smaller than normal
const CmdAttribute CA_Hidden = 0x10; // Starts out hidden
const CmdAttribute CA_Horizontal = 0x20; // Horizontal orentation
const CmdAttribute CA_Vertical = 0x40; // Vertical orentation
const CmdAttribute CA_NoNotify = 0x100; // Don't notify on all events
const CmdAttribute CA_NoLabel = 0x100; // No label (ProgressCmd only)
const CmdAttribute CA_Simple = 0x100; // backward compatible
const CmdAttribute CA_Password = 0x100; // for text in control only
const CmdAttribute CA_Text = 0x200; // A Spin/Text command
const CmdAttribute CA_TextInNotify = 0x200; // Notify when TextIn changes
const CmdAttribute CA_NoBorder = 0x400; // No border (frames, status bar)
const CmdAttribute CA_NoSpace = 0x800; // No space between widgets
const CmdAttribute CA_ListWidth = 0x800; // Special for lists
const CmdAttribute CA_PerControl = 0x1000; // Specific to different controls
const CmdAttribute CA_Percent = 0x1000; // Show % for ProgressCmd
const CmdAttribute CA_Size = 0x1000; // size specified in size element
// New attributes - require 32 bit, so CmdAttribute is now a long!
const CmdAttribute CA_Flat = 0x10000; // flat icon buttons
// These definitions go here because the user app should not need
// to know about menus and buttons - only the static data structures
// needed to define those things - and so shouldn't have to include
// the header file for each menu or command object
// definitions for dialog box command objects
const ItemVal NoList = 0; // no attributes, items is null list;
const ItemVal NoFrame = 0; // no frame used
typedef struct CommandObject
{
CmdType cmdType; // what kind of item is this
ItemVal cmdId; // unique id for the item
ItemVal retVal; // value returned when picked (might be < 0)
VCONST char* title; // string
void* itemList; // a list of stuff to use for the cmd
CmdAttribute attrs; // bit map of attributes
unsigned
Sensitive : 1; // if item is sensitive or not
ItemVal cFrame; // Frame used for an item
ItemVal cRightOf; // Item placed left of this id
ItemVal cBelow; // Item placed below this one
int size; // Used for sizes
VCONST char* tip; // tip string
} CommandObject;
#define DialogCmd CommandObject // for backward compatibility
typedef struct vMenu
{
VCONST char* label; // The label on the menu
ItemVal menuId; // A User assigned unique value
unsigned
sensitive : 1, // If item is sensitive or not
checked : 1; // If item is checked or not
VCONST char* keyLabel; // Label for an accelerator key
vKey accel; // Value of accelerator key
vMenu* SubMenu; // Ptr to a submenu
unsigned int kShift; // Shift state for accel
} vMenu;
#define vStatusPane vCommandPane // stat bars are really command bars
typedef struct vStatus // for status bars
{
VCONST char* label; // label of button
ItemVal statId; // value
CmdAttribute attrs; // bit map of attributes
unsigned
sensitive : 1; // if button is sensitive or not
int width; // if need to specify width (0 => default)
} vStatus;
// symbols for defining menus
const int noKey = 0;
const int noKeyLbl = 0;
const int isSens = 1;
const int notSens = 0;
const int isChk = 1;
const int notChk = 0;
const int noSub = 0;
const int notUsed = 0;
const int noIcon = 0;
// standard menu definitions
const ItemVal M_File = 32000;
const ItemVal M_Edit = 32001;
const ItemVal M_Search = 32002;
const ItemVal M_Help = 32003;
const ItemVal M_Window = 32004;
const ItemVal M_Options = 32005;
const ItemVal M_Tools = 32006;
const ItemVal M_Font = 32007;
const ItemVal M_View = 32008;
const ItemVal M_Format = 32009;
const ItemVal M_Insert = 32010;
const ItemVal M_Test = 32011;
const ItemVal M_Line = 32090;
const ItemVal M_New = 32100;
const ItemVal M_Open = 32101;
const ItemVal M_Close = 32102;
const ItemVal M_Save = 32103;
const ItemVal M_SaveAs = 32104;
const ItemVal M_Print = 32105;
const ItemVal M_PrintPreview = 32106;
const ItemVal M_About = 32107;
const ItemVal M_Exit = 32108;
const ItemVal M_CloseFile = 32109; // V:1.13
const ItemVal M_Cut = 32110;
const ItemVal M_Copy = 32111;
const ItemVal M_Paste = 32112;
const ItemVal M_Delete = 32113;
const ItemVal M_Clear = 32114;
const ItemVal M_UnDo = 32120;
const ItemVal M_SetDebug = 32121;
const ItemVal M_SaveClose = 32122;
const ItemVal M_Abandon = 32123;
const ItemVal M_Find = 32130;
const ItemVal M_FindAgain = 32131;
const ItemVal M_Replace = 32132;
const ItemVal M_Preferences = 32135;
const ItemVal M_FontSelect = 32136;
const ItemVal M_User0 = 32140;
const ItemVal M_User1 = 32141;
const ItemVal M_User2 = 32142;
const ItemVal M_User3 = 32143;
const ItemVal M_User4 = 32144;
const ItemVal M_User5 = 32145;
const ItemVal M_User6 = 32146;
const ItemVal M_User7 = 32147;
const ItemVal M_User8 = 32148;
const ItemVal M_User9 = 32149;
const ItemVal M_Cancel = 32150;
const ItemVal M_Done = 32151;
const ItemVal M_OK = 32152;
const ItemVal M_Yes = 32153;
const ItemVal M_No = 32154;
const ItemVal M_All = 32155;
const ItemVal M_None = 32156;
const ItemVal M_TextInChange = 32158;
const ItemVal M_TextInLeaveFocus = 32159;
const ItemVal M_Cascade = 32160;
const ItemVal M_Tile = 32161;
const ItemVal M_Arrange = 32162;
const ItemVal M_CloseAll = 32163;
const ItemVal M_OpenPath = 32164;
const ItemVal M_WindowsReserved1 = 32170; // mdi frame new
const ItemVal M_WindowsReserved2 = 32171; // mdi frame open
const ItemVal M_WindowsReserved3 = 32172; // mdi frame exit
const ItemVal M_WindowsReserved4 = 32173;
const ItemVal M_WindowsReserved5 = 32174;
#define M_FIRSTCHILD 32200 // higher than everything else
//--------------------------------------------------------------------------
// Definitions for drawing
typedef struct vPoint // a point
{
int x, y; // WIN16 version
} vPoint;
typedef struct vRect
{
int x,y,w,h;
} vRect;
typedef struct vLine
{
int x,y,xend,yend;
} vLine;
// for brushes and pens
const int vSolid = 1;
const int vTransparent = 2;
// for brushes
const int vHorizontalHatch = 3;
const int vVerticleHatch = 4;
const int vVerticalHatch = 4;
const int vLeftDiagonalHatch = 5;
const int vRightDiagonalHatch = 6;
const int vCrossHatch = 7;
const int vDiagonalCrossHatch = 8;
// for pens
const int vDash = 9;
const int vDot = 10;
const int vDashDot = 11;
// for filling
const int vAlternate = 12;
const int vWinding = 13;
//--------------------------------------------------------------------------
// Some messages needed to manage things in Windows
#define vWM_MDIChildDestroy (WM_USER + 0)
// void OnMDIChildDestroy(HWND hwnd)
#define HANDLE_vWM_MDIChildDestroy(hwnd,wParam,lParam, fn) \
((fn)((hwnd)), 0L)
#define FORWARD_vWM_MDIChildDestroy(hwnd, fn) \
(void)(fn)((hwnd), vWM_MDIChildDestroy, (WPARAM)0, (LPARAM)0)
#define vWM_ResizeMDIClient (WM_USER + 1)
// void OnResizeMDIClient(HWND hwnd)
#define HANDLE_vWM_ResizeMDIClient(hwnd,wParam,lParam, fn) \
((fn)((hwnd)), 0L)
#define FORWARD_vWM_ResizeMDIClient(hwnd, fn) \
(void)(fn)((hwnd), vWM_ResizeMDIClient, (WPARAM)0, (LPARAM)0)
#endif

View File

@ -1,213 +0,0 @@
//===============================================================
// vapp.h - the vapp base object - Windows version
//
// Copyright (C) 1995-1998 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VAPP_H
#define VAPP_H
#include <v/vbaseitm.h> // our parent class
#include <v/vfont.h> // our parent class
#include <v/vawinfo.h>
#include <v/vmenu.h>
#include <v/vtimer.h>
#define MaxAppFonts FontIdsUsed
// DLL definitions - beginning with V 1.24 and mingw 2.95.2-1
// These definitions contributed by Franco Bez <franco.bez@gmx.de>
#if defined(USE_V_DLL) && !defined(BUILD_V_DLL)
#if defined (__MINGW32__) || defined(__CYGWIN32__)
// This forces the GNU Linker to include vstartup.o in the executable
// Only needed here for DLL use, it must be in one of the Applications
// object files for the static library -> see vApp.cpp
// bug in mingw32 and cygwin loader
static int (*gnuw32dummy)(HINSTANCE,HINSTANCE,LPSTR,int)=WinMain;
#endif
#endif
class V_EXPORT vWindow;
class V_EXPORT vCmdWindow;
class V_EXPORT vCommandPane;
typedef struct WindList
{
vWindow* window;
vAppWinInfo* info;
WindList* nextWinList;
} WindList;
typedef struct CmdPaneList
{
vCommandPane* commandPane;
CmdPaneList* nextCPList;
} CmdPaneList;
long CALLBACK PMdiFrameProc(HWND, UINT, UINT, LPARAM);
long CALLBACK PMdiWindowProc(HWND, UINT, UINT, LPARAM);
class V_EXPORT _appWorkTimer : public vTimer
{
public: //---------------------------------------- public
_appWorkTimer() {}
~_appWorkTimer() {}
virtual void TimerTick();
private: //--------------------------------------- private
};
class V_EXPORT vApp : public vBaseItem
{
// give friend access to some special things
friend class V_EXPORT vWindow; // Provide access for vWindow class
friend class V_EXPORT vCmdWindow; // Provide access for vWindow class
friend class V_EXPORT vMenuPane; // Menu Pane needs access
friend class V_EXPORT vCommandPane;
friend V_EXPORT int CMain(HANDLE hInstance, HANDLE hPrevInstance,
LPSTR lpszCmdLine, int nCmdShow); // give main access
friend long WINAPI V_EXPORT PMdiFrameProc(HWND, UINT, UINT, LPARAM);
friend long WINAPI V_EXPORT PMdiWindowProc(HWND, UINT, UINT, LPARAM);
friend class _appWorkTimer;
public: //---------------------------------------- public
vApp(VCONST char* appName, int simSDI = 0, int frameHeight = 0, int frameWidth = 0); // constructor
virtual ~vApp(); // destructor
// Methods to override
virtual void AppCommand(vWindow* win, ItemVal id, ItemVal retval,
CmdType ctype);
virtual void CloseLastCmdWindow(vWindow* win, int exitcode);
virtual int CloseAppWin(vWindow* win);
virtual int CloseHelpWin(vWindow* win);
int IsHelpWin(vWindow *Win);
virtual void Exit(void);
virtual void KeyIn(vWindow* win, vKey key, unsigned int shift);
virtual vWindow* NewAppWin(vWindow* win, VCONST char* name,
int w = 0, int h = 0, vAppWinInfo* winInfo = 0);
virtual vWindow* NewHelpWin(vWindow* win, VCONST char* name,
int w, int h);
virtual void DropFile(const char *fn);
// Utlity methods
void showAppWin(bool show);
vFont GetDefaultFont();
void GetVVersion(int& major, int& minor)
{ major = V_VersMajor; minor = V_VersMinor;}
int DefaultHeight() { return _DefaultHeight; }
int DefaultWidth() {return _DefaultWidth; }
int IsRunning() {return _running;} // see if app is running
void SendWindowCommandAll(ItemVal id, int val, CmdType ctype);
void UpdateAllViews(vWindow* sender = NULL, int hint = 0,
void* pHint = NULL);
void SetValueAll(ItemVal id, int val, ItemSetType setType);
void SetAppTitle(VCONST char* title);
void SetStringAll(ItemVal id, VCONST char* str);
int ShowList();
vAppWinInfo *getAppWinInfo(vWindow* Win);
void AppExit(int exitVal);
int InExit() { return _inExit; }
int ClipboardSetText(VCONST char* text) VCONST;
char* ClipboardGetText() VCONST;
int ClipboardCheckText() VCONST;
void ClipboardClear() VCONST;
// Tasking
void CheckEvents();
int EnableWorkSlice(long slice);
virtual void WorkSlice() {} // No op by default
// Windows stuff
HWND winHwnd() VCONST { return _Frame; }
HWND winClientHwnd() VCONST { return _Client; }
int simSDI() VCONST {return _simSDI;}
HMENU AppFrameMenu() {return hFrameMenu;}
HPEN _WhitePen;
HPEN _GrayPen; // for drawing stuff
HPEN _LightPen;
HPEN _ShadowPen;
HBRUSH _BarBrush;
protected: //--------------------------------------- protected
WindList* _WindowList; // List of "top level" windows
CmdPaneList* _CmdPaneList; // List of command panes
int _running; // if we are running
// The following two are called from main.
void initialize(int& argc, char** argv,
HANDLE hInstance, HANDLE hPrevInstance, int nCmdShow);
int doEventLoop();
private: //--------------------------------------- private
int _DefaultHeight;
int _DefaultWidth;
int _frameWidth, _frameHeight;
int _inExit; // If in exit procudure
int _simSDI; // if Simulate SDI interface
WindList* _DeleteList; // List of windows to delete
VMUTABLE char* _clipText;
_appWorkTimer* _workTimer; // timer for work slice
void addToDeleteList(vWindow *Win);
void registerWindow(vWindow* Win, vAppWinInfo* awinfo);
void unregisterWindow(vWindow* Win);
void DispatchWork(void);
void registerCmdPane(vCommandPane* cmdPane);
void unregisterCmdPane(vCommandPane* cmdPane);
void selectCmdPanes(vWindow* parent);
// Windows stuff
long MdiFrameProc(HWND hwnd, UINT message,
UINT wParam, LPARAM lParam);
void OnDnD(HWND hWnd, HDROP wParam);
int OnCreate(HWND hwnd, CREATESTRUCT FAR* lpCreateStruct);
void OnClose(HWND hwnd);
int OnQueryEndSession(HWND hwnd);
void OnDestroy(HWND hwnd);
void OnSysCommand(HWND hwnd, UINT cmd, int x, int y);
void OnSize(HWND hwnd, UINT state, int cx, int cy);
void OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify);
LRESULT Frame_DefProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
void OnResizeMDIClient(HWND hwnd);
HMENU hFrameMenu, hFrameSubMenu; // Default menu
HWND _Frame, _Client ; // Need these for MDI frame
HANDLE hAccel;
vWindow* _curThis; // Needed to fake things out at the start
HICON _appicon, _winicon;
};
// theApp is accessed by a function call.
//
V_EXPORT DWORD vGetApp();
#define theApp ((vApp*)vGetApp())
// extern vApp *theApp; // Pointer to single global instance
#endif

View File

@ -1,35 +0,0 @@
//===============================================================
// vawinfo.h - vAppWinInfo utility class for tracking windows
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VAWINFO_H
#define VAWINFO_H
#include <v/v_defs.h> // include basic defs
class V_EXPORT vAppWinInfo
{
public: //---------------------------------------- public
vAppWinInfo(VCONST char* name = "", VCONST void* ptr = 0);
virtual ~vAppWinInfo();
virtual VCONST char* infoName() {return _infoName;}
virtual VCONST void* getPtr() {return _ptr;}
protected: //--------------------------------------- protected
char* _infoName; // name of item
VCONST void* _ptr;
private: //--------------------------------------- private
};
#endif

View File

@ -1,39 +0,0 @@
//===============================================================
// vbaseitm.h - the base class that holds handle information
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VBASEITEM_H
#define VBASEITEM_H
#include <v/v_defs.h> // include basic defs
class V_EXPORT vBaseItem
{
public: //---------------------------------------- public
vBaseItem(const vBaseItem& b); // Copy constructor
virtual ~vBaseItem(); // needed to free name
const HANDLE vHandle() VCONST { return _vHandle; }
const char* name() VCONST { return (const char*) _name;}
protected: //--------------------------------------- protected
char* _name; // name of item
HANDLE _vHandle; // Window HANDLE widget
int _copied;
vBaseItem(VCONST char* name); // Protected makes this a base class
// prevents instantiation
private: //--------------------------------------- private
};
#endif

View File

@ -1,48 +0,0 @@
//===============================================================
// vbasewin.h - vBaseWindow class definitions - Windows
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VBASEWIN_H
#define VBASEWIN_H
#include <v/vbaseitm.h> // base info class
class V_EXPORT vBaseWindow : public vBaseItem
{
public: //---------------------------------------- public
vBaseWindow(VCONST char* name); // Constructor
vBaseWindow(const vBaseWindow& w); // Copy Constructor
virtual ~vBaseWindow(); // Destructor
virtual void initialize(void) {} // Pure virtual function
virtual void ShowWindow(void) { showBaseWindow(); }
void closeBaseWindow(void); // Kill window
WindowType wType() VCONST {return _wType;} // what kind of window we are
HWND winHwnd() VCONST {return _myHwnd;}
protected: //--------------------------------------- protected
HWND _myHwnd; // my MDI window
WindowType _wType; // what kind of window we are building
void showBaseWindow(void)
{ } // Pop us up
private: //--------------------------------------- private
};
#endif

View File

@ -1,89 +0,0 @@
//===============================================================
// vglcnv.h GL Canvas C++ class .h file - X11R5
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VGLCNV_H
#define VGLCNV_H
#include <v/vcanvas.h>
#ifndef WIN32
#define WIN32
#endif
extern "C"
{
// OpenGL stuff here
#include <GL/gl.h>
#include <GL/glu.h>
}
const unsigned int vGL_Default = 0; // Note for Win32 :
const unsigned int vGL_RGB = 0x0001; // RGBA is used (with alpha)
const unsigned int vGL_Alpha = 0x0002; // No independant alphamode on Win32
// if Alpha is set, RGBA is used
const unsigned int vGL_Indexed = 0x0004;
const unsigned int vGL_DoubleBuffer = 0x0008;
const unsigned int vGL_Stereo = 0x0010;
const unsigned int vGL_Stencil = 0x0020;
const unsigned int vGL_Accum = 0x0040;
const unsigned int vGL_Depth = 0x0080;
class vWindow; // we are part of a window
class vBaseGLCanvasPane : public vCanvasPane
{
public: //---------------------------------------- public
vBaseGLCanvasPane(unsigned int vGLmode = vGL_Default, PaneType pt = P_Canvas);
virtual ~vBaseGLCanvasPane();
// Expose/redraw event
virtual void Resize(int newW, int newH); // Resize event
// OpenGL specific stuff
virtual void graphicsInit(void);
void vglMakeCurrent(void);
virtual void vglFlush();
// Platform dependent
protected: //--------------------------------------- protected
virtual void initialize(vWindow* pWindow, HWND pWidget);
// virtual void CreateDC(void);
// Drawing and OpenGL for Win32
HDC _hDC; // device context
HGLRC _hGLRC; // OpenGL context
HPALETTE _hPalette; // Palette
private: //--------------------------------------- private
// OpenGL initialization of the drawings
void _setUpPixelFormat();
void _setUpPalette();
// OpenGL infos
static int _pixelFormat;
static int _doubleBuffer; // if we have double buffering
static unsigned int _vGLmode;
};
#endif

View File

@ -1,43 +0,0 @@
//===============================================================
// vboxlblc.h - boxed label class - Windows
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VBOXLBLC_H
#define VBOXLBLC_H
#include <v/vcmd.h> // We are derived from vcmd
class V_EXPORT vCmdParent;
class V_EXPORT vBoxedLabelCmd : public vCmd
{
public: //---------------------------------------- public
vBoxedLabelCmd(vCmdParent* dp, CommandObject* co);
virtual ~vBoxedLabelCmd();
virtual void initialize(void);
virtual void SetCmdVal(ItemVal val, ItemSetType st);
virtual void SetCmdStr(VCONST char* str);
virtual void CmdCallback(int id, WORD codeNotify);
virtual int MEASUREITEM(int id, MEASUREITEMSTRUCT* mis);
virtual int DRAWITEM(int id, DRAWITEMSTRUCT* dis);
protected: //--------------------------------------- protected
private: //--------------------------------------- private
char _lbl[80];
};
#endif

View File

@ -1,62 +0,0 @@
//===============================================================
// vbrush.h: brush class header for filling - Windows
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VBRUSH_H
#define VBRUSH_H
#include <v/v_defs.h> // Basic defs
#include <v/vcolor.h>
// Use Windows for brush styles, map to something reasonable for X
class V_EXPORT vBrush
{
public: //---------------------------------------- public
vBrush(unsigned int r = 0, unsigned int g = 0, unsigned int b = 0,
int style = vSolid, int fillMode = vAlternate);
vBrush(const vBrush& p);
vBrush& operator =(const vBrush& p);
int operator ==(const vBrush& b2) VCONST
{ return (brushColor == b2.brushColor && brushFillMode == b2.brushFillMode &&
brushStyle == b2.brushStyle); }
int operator !=(const vBrush& b2) VCONST
{ return (brushColor != b2.brushColor || brushFillMode != b2.brushFillMode ||
brushStyle != b2.brushStyle); }
~vBrush();
void SetStyle(int style);
int GetStyle() VCONST { return brushStyle; }
void SetColor(vColor c);
void SetColor(unsigned int r, unsigned int g, unsigned int b);
vColor GetColor() VCONST { return brushColor; }
void SetFillMode(int fillMode);
int GetFillMode() VCONST { return brushFillMode; }
HBRUSH GetHBRUSH() VCONST;
protected: //--------------------------------------- protected
private: //--------------------------------------- private
int brushFillMode;
int brushStyle;
VMUTABLE HBRUSH _hbrush;
VMUTABLE int _created;
vColor brushColor;
};
#endif

View File

@ -1,49 +0,0 @@
//===============================================================
// vbtncmd.h - Button Command class -- Windows
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VBTNCMD_H
#define VBTNCMD_H
#include <v/vapp.h>
#include <v/vcmd.h> // We are derived from vcmd
class V_EXPORT vCmdParent;
class V_EXPORT vIcon;
class V_EXPORT vButtonCmd : public vCmd
{
public: //---------------------------------------- public
vButtonCmd(vCmdParent* dp, CommandObject* co);
virtual ~vButtonCmd(void);
virtual void initialize(void);
virtual int GetCmdValue(ItemVal id) VCONST;
virtual void ResetItemValue(void);
virtual void SetCmdVal(ItemVal val, ItemSetType st);
virtual void SetCmdStr(VCONST char* str);
virtual int MEASUREITEM(int id, MEASUREITEMSTRUCT* mis);
virtual int DRAWITEM(int id, DRAWITEMSTRUCT* dis);
protected: //--------------------------------------- protected
virtual void CmdCallback(int id, WORD codeNotify);
private: //--------------------------------------- private
void initIconButton(long style);
vIcon* _ip;
};
#endif

View File

@ -1,264 +0,0 @@
//===============================================================
// vcanvas.h Canvas C++ class .h file - Windows
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VCANVAS_H
#define VCANVAS_H
#include <v/v_defs.h> // Basic defs
#include <v/vpane.h> // we are derived from vPane
#include <v/vcpdc.h> // we also derive from vDrawingCanvasDC
#include <v/vfont.h>
/* We do this since some windows header files define CreateDC as CreateDCA,
which is fine, until we don't include that header file */
#undef CreateDC
typedef int VCursor; // For cursors
// Define Cursor stuff
const VCursor VC_None = 0; // No/Default cursor
const VCursor VC_Arrow = 1; // XC_top_left_arrow
const VCursor VC_CenterArrow = 2; // XC_center_ptr
const VCursor VC_CrossHair = 3; // XC_crosshair
const VCursor VC_EWArrows = 4; // XC_sb_h_double_arrow
const VCursor VC_Hand = 5; // XC_hand2
const VCursor VC_IBar = 6; // XC_xterm
const VCursor VC_Icon = 7; // XC_icon
const VCursor VC_NSArrows = 8; // XC_sb_v_double_arrow
const VCursor VC_Pencil = 9; // XC_Pencil
const VCursor VC_Question = 10; // XC_question_arrow
const VCursor VC_Sizer = 11; // XC_sizing
const VCursor VC_Wait = 12; // XC_watch
const VCursor VC_X = 13; // XC_X_cursor
const VCursor VC_LAST = 13;
const int maxCursors = 13;
class V_EXPORT vWindow; // we are part of a window
class V_EXPORT vIcon;
class V_EXPORT vMemoryDC;
class V_EXPORT vColor;
class V_EXPORT vCanvasPane : public vPane
{
friend class vWindow;
public: //---------------------------------------- public
vCanvasPane(PaneType pt = P_Canvas);
virtual ~vCanvasPane();
virtual void ShowPane(int OnOrOff) VCONST;
void SetWidthHeight(int width, int height);
// Cursor
void SetCursor(VCursor id);
VCursor GetCursor() VCONST { return _currentCursor; }
void UnSetCursor(void);
void CompressRedraw(int val) { _compressRedraw = val; }
// Scrolling
virtual void HPage(int Shown, int Top); // Horiz page event
virtual void VPage(int Shown, int Top); // Vert page event
virtual void HScroll(int step); // Horiz scroll event
virtual void VScroll(int step); // Vert scroll event
virtual void SetHScroll(int Shown, int Top); // Set Horiz Scroll bar
virtual void SetVScroll(int Shown, int Top); // Set Vert Scroll bar
virtual int GetVScroll(int& Shown, int& Top) VCONST;
virtual int GetHScroll(int& Shown, int& Top) VCONST;
virtual void ShowHScroll(int OnOff);
virtual void ShowVScroll(int OnOff);
// Change messages
virtual void FontChanged(VCONST vFont& vf);
// Events
virtual void MouseDown(int x, int y, int button); // Mouse Down at x,y
virtual void MouseUp(int x, int y, int button); // Mouse Up at x,y
virtual void MouseMove(int x, int y, int button); // Mouse Moved to x,y
virtual void MouseMotion(int x, int y) {} // No Button Mouse Move
virtual void EnterFocus(void);
virtual void LeaveFocus(void);
// Expose/redraw event
virtual void Redraw(int x, int y, int width , int height);
virtual void Resize(int newW, int newH); // Resize event
// Information
virtual int GetWidth() VCONST { return _width; } // Get width of canvas
virtual int GetHeight() VCONST { return _height; } // Get Height of canvas
// Drawing
void Clear(void)
{ _cpDC->Clear(); }
virtual void ClearRect(int left, int top, int width, int height)
{ _cpDC->ClearRect(left, top, width, height); }
virtual void CopyFromMemoryDC(vMemoryDC* vmemdc, int destX, int destY,
int srcX = 0, int srcY = 0, int srcW = 0, int srcH = 0) // V:1.13
{ _cpDC->CopyFromMemoryDC(vmemdc,destX,destY,srcX,srcY,srcW,srcH);}
#ifdef DRAWARC
virtual void DrawArc(int xx1, int yy1, int xx2, int yy2, int xxc, int yyc)
{ _cpDC->DrawArc(xx1, yy1, xx2, yy2, xxc, yyc); }
#endif
virtual void DrawAttrText(int x, int y, VCONST char* text,
const ChrAttr attr)
{ _cpDC->DrawAttrText(x, y, text, attr); }
virtual void DrawText(int x, int y, VCONST char* text)
{ _cpDC->DrawText(x, y, text); }
virtual void DrawEllipse(int x, int y, int width, int height)
{ _cpDC->DrawEllipse(x, y, width, height); }
virtual void DrawIcon(int x, int y, vIcon& icon)
{ _cpDC->DrawIcon(x,y,icon); }
virtual void DrawLine(int x, int y, int xend , int yend)
{ _cpDC->DrawLine(x, y, xend , yend); }
virtual void DrawLines(vLine* lineList, int count)
{ _cpDC->DrawLines(lineList, count);}
virtual void DrawLines(vPoint* pts, int count)
{ _cpDC->DrawLines(pts, count);}
virtual void DrawColorPoints(int x, int y, int nPoints, vColor* pointList)
{_cpDC->DrawColorPoints(x,y,nPoints,pointList); }
virtual void DrawPoint(int x, int y)
{ _cpDC->DrawPoint(x, y); }
virtual void DrawPoints(vPoint* pointList, int count)
{ _cpDC->DrawPoints(pointList, count); }
virtual void DrawPolygon(int n, vPoint points[], int fillStyle = vAlternate)
{ _cpDC->DrawPolygon(n, points, fillStyle); }
virtual void DrawRectangle(int x, int y, int width, int height)
{ _cpDC->DrawRectangle(x, y, width, height); }
virtual void DrawRectangles(vRect* rectList, int count)
{ _cpDC->DrawRectangles(rectList,count);}
virtual void DrawRoundedRectangle(int x, int y,
int width, int height, int radius = 10)
{ _cpDC->DrawRoundedRectangle(x, y, width, height, radius); }
virtual void DrawRubberLine(int x, int y, int xend, int yend)
{ _cpDC->DrawRubberLine(x, y, xend, yend); }
virtual void DrawRubberEllipse(int x, int y, int width, int height)
{ _cpDC->DrawRubberEllipse(x, y, width, height); }
virtual void DrawRubberRectangle(int x, int y, int width, int height)
{ _cpDC->DrawRubberRectangle(x, y, width, height); }
virtual vBrush GetBrush(void) VCONST
{ return _cpDC->GetBrush(); }
virtual void SetBrush(VCONST vBrush& brush)
{ _cpDC->SetBrush(brush); }
virtual vFont GetFont(void) VCONST
{ return _cpDC->GetFont(); }
virtual void SetFont(VCONST vFont& ft)
{ _cpDC->SetFont(ft); }
virtual int TextWidth(VCONST char* str) VCONST
{ return _cpDC->TextWidth(str);}
virtual int TextHeight(int& asc, int& des) VCONST
{ return _cpDC->TextHeight(asc, des); }
// Appearance
virtual void SetScale(int mult, int div)
{ _cpDC->SetScale(mult,div); }
virtual void GetScale(int& mult, int& div) VCONST
{ _cpDC->GetScale(mult,div); }
virtual void SetBackground(VCONST vColor& color)
{ _cpDC->SetBackground(color); }
virtual void SetPen(VCONST vPen& pen)
{ _cpDC->SetPen(pen); }
void SetTranslate(int x, int y) { _cpDC->SetTranslate(x,y); }
void SetTransX(int x) {_cpDC->SetTransX(x);}
void SetTransY(int y) {_cpDC->SetTransY(y);}
void GetTranslate(int& x, int& y) VCONST {_cpDC->GetTranslate(x,y);}
int GetTransX() VCONST { return _cpDC->GetTransX(); }
int GetTransY() VCONST { return _cpDC->GetTransY(); }
vPen GetPen() VCONST
{ return _cpDC->GetPen(); }
vDC* GetDC() VCONST { return _cpDC; }
// Platform dependent
HWND DrawingWindow() VCONST { return _drawWindow; }
protected: //--------------------------------------- protected
virtual void EnterEV(void);
virtual void LeaveEV(void);
virtual void CreateDC(void);
vDC* _cpDC; // pointer to our drawing canvas
virtual void initialize(vWindow* pWindow, HWND pWidget);
int _height; // height of draw window
int _width; // width of draw window
HWND _drawWindow; // window for drawing
int _hasFocus; // for focus workaround
private: //--------------------------------------- private
// Widgets for the canvas
HWND _drawCanvas; // whole canvas window
int _HOn; // on or off
int _VOn;
int _HScrlShown;
int _HScrlTop;
int _VScrlShown;
int _VScrlTop;
int _compressRedraw;
static VCursor _currentCursor; // for cursor
void HScrollEV(int code, int pos, HWND control);
void VScrollEV(int code, int pos, HWND control);
void ResizeEV(int w, int h);
void ExposeEV(void);
};
#endif

View File

@ -1,36 +0,0 @@
//===============================================================
// vcb2x4.h - defines a 2 row by 8 color button frame
//
// Copyright (C) 1995 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VCB2X4_H
#define VCB2X4_H
#ifndef vC_Size
#define vC_Size 8
#endif
#ifndef vC_Frame
#define vC_Frame NoFrame
#endif
#ifndef vC_RightOf
#define vC_RightOf 0
#endif
#ifndef vC_Below
#define vC_Below 0
#endif
{C_Frame, M_ColorFrame,0,"",NoList,CA_NoSpace,isSens,vC_Frame,vC_RightOf,vC_Below,0},
{C_ColorButton,M_Black, vC_Black,"",&vStdColors[vC_Black],CA_None,isSens,M_ColorFrame,0,0,vC_Size},
{C_ColorButton,M_Red, vC_Red,"",&vStdColors[vC_Red],CA_None,isSens,M_ColorFrame,M_Black,0,vC_Size},
{C_ColorButton,M_Green, vC_Green,"",&vStdColors[vC_Green],CA_None,isSens,M_ColorFrame,M_Red,0,vC_Size},
{C_ColorButton,M_Blue, vC_Blue,"",&vStdColors[vC_Blue],CA_None,isSens,M_ColorFrame,M_Green,0,vC_Size},
{C_ColorButton,M_White, vC_White,"",&vStdColors[vC_White],CA_None,isSens,M_ColorFrame,0,M_Black,vC_Size},
{C_ColorButton,M_Yellow, vC_Yellow,"",&vStdColors[vC_Yellow],CA_None,isSens,M_ColorFrame,M_White,M_Black,vC_Size},
{C_ColorButton,M_Magenta, vC_Magenta,"",&vStdColors[vC_Magenta],CA_None,isSens,M_ColorFrame,M_Yellow,M_Black,vC_Size},
{C_ColorButton,M_Cyan, vC_Cyan,"",&vStdColors[vC_Cyan],CA_None,isSens,M_ColorFrame,M_Magenta,M_Black,vC_Size},
#endif

View File

@ -1,43 +0,0 @@
//===============================================================
// vcb2x8.h - defines a 2 row by 8 color button frame
//
// Copyright (C) 1995 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VCB2X8_H
#define VCB2X8_H
#ifndef vC_Size
#define vC_Size 8
#endif
#ifndef vC_Frame
#define vC_Frame NoFrame
#endif
#ifndef vC_RightOf
#define vC_RightOf 0
#endif
#ifndef vC_Below
#define vC_Below 0
#endif
{C_Frame, M_ColorFrame,0,"",NoList,CA_NoSpace,isSens,vC_Frame,vC_RightOf,vC_Below,0},
{C_ColorButton,M_Black, vC_Black,"",&vStdColors[vC_Black],CA_None,isSens,M_ColorFrame,0,0,vC_Size},
{C_ColorButton,M_White, vC_White,"",&vStdColors[vC_White],CA_None,isSens,M_ColorFrame,M_Black,0,vC_Size},
{C_ColorButton,M_Red, vC_Red,"",&vStdColors[vC_Red],CA_None,isSens,M_ColorFrame,M_White,0,vC_Size},
{C_ColorButton,M_Green, vC_Green,"",&vStdColors[vC_Green],CA_None,isSens,M_ColorFrame,M_Red,0,vC_Size},
{C_ColorButton,M_Blue, vC_Blue,"",&vStdColors[vC_Blue],CA_None,isSens,M_ColorFrame,M_Green,0,vC_Size},
{C_ColorButton,M_Yellow, vC_Yellow,"",&vStdColors[vC_Yellow],CA_None,isSens,M_ColorFrame,M_Blue,0,vC_Size},
{C_ColorButton,M_Magenta, vC_Magenta,"",&vStdColors[vC_Magenta],CA_None,isSens,M_ColorFrame,M_Yellow,0,vC_Size},
{C_ColorButton,M_Cyan, vC_Cyan,"",&vStdColors[vC_Cyan],CA_None,isSens,M_ColorFrame,M_Magenta,0,vC_Size},
{C_ColorButton,M_DarkGray, vC_DarkGray,"",&vStdColors[vC_DarkGray],CA_None,isSens,M_ColorFrame,0,M_Black,vC_Size},
{C_ColorButton,M_MedGray, vC_MedGray,"",&vStdColors[vC_MedGray],CA_None,isSens,M_ColorFrame,M_DarkGray,M_Black,vC_Size},
{C_ColorButton,M_DimRed, vC_DimRed,"",&vStdColors[vC_DimRed],CA_None,isSens,M_ColorFrame,M_MedGray,M_Black,vC_Size},
{C_ColorButton,M_DimGreen, vC_DimGreen,"",&vStdColors[vC_DimGreen],CA_None,isSens,M_ColorFrame,M_DimRed,M_Black,vC_Size},
{C_ColorButton,M_DimBlue, vC_DimBlue,"",&vStdColors[vC_DimBlue],CA_None,isSens,M_ColorFrame,M_DimGreen,M_Black,vC_Size},
{C_ColorButton,M_DimYellow, vC_DimYellow,"",&vStdColors[vC_DimYellow],CA_None,isSens,M_ColorFrame,M_DimBlue,M_Black,vC_Size},
{C_ColorButton,M_DimMagenta, vC_DimMagenta,"",&vStdColors[vC_DimMagenta],CA_None,isSens,M_ColorFrame,M_DimYellow,M_Black,vC_Size},
{C_ColorButton,M_DimCyan, vC_DimCyan,"",&vStdColors[vC_DimCyan],CA_None,isSens,M_ColorFrame,M_DimMagenta,M_Black,vC_Size},
#endif

View File

@ -1,46 +0,0 @@
//===============================================================
// vcbtncmd.h - Color Button Command class - Windows
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VCBTNCMD_H
#define VCBTNCMD_H
#include <v/v_defs.h>
#include <v/vapp.h>
#include <v/vbtncmd.h> // We are derived from vbtncmd
#include <v/vcolor.h>
class V_EXPORT vCmdParent;
class V_EXPORT vColorButtonCmd : public vButtonCmd
{
public: //---------------------------------------- public
vColorButtonCmd(vCmdParent* dp, CommandObject* co);
virtual ~vColorButtonCmd();
virtual void SetCmdVal(ItemVal val, ItemSetType st);
virtual int DRAWITEM(int id, DRAWITEMSTRUCT* dis);
protected: //--------------------------------------- protected
private: //--------------------------------------- private
int _canChange;
vColor _color; // color of this button
vColor* _origColor; // ptr to orig color of this button
void initColor(void);
};
#endif

View File

@ -1,46 +0,0 @@
//===============================================================
// vckboxc.h - CheckBox Command class - Windows
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VCKBOXC_H
#define VCKBOXC_H
#include <v/vcmd.h> // We are derived from vcmd
class V_EXPORT vCmdParent;
class V_EXPORT vCheckBoxCmd : public vCmd
{
public: //---------------------------------------- public
vCheckBoxCmd(vCmdParent* dp, CommandObject* co);
virtual ~vCheckBoxCmd();
virtual void initialize(void);
virtual void ResetItemValue(void);
virtual int GetCmdValue(ItemVal id) VCONST;
virtual void SetCmdVal(ItemVal val, ItemSetType st);
virtual void SetCmdStr(VCONST char* str);
protected: //--------------------------------------- protected
virtual void CmdCallback(int id, WORD codeNotify);
private: //--------------------------------------- private
};
#endif

View File

@ -1,44 +0,0 @@
//===============================================================
// vclabelc.h - Color Label Command class - Windows
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VCLABELC_H
#define VCLABELC_H
#include <v/v_defs.h>
#include <v/vapp.h>
#include <v/vlabelc.h> // We are derived from vbtncmd
#include <v/vcolor.h>
class V_EXPORT vCmdParent;
class V_EXPORT vColorLabelCmd : public vLabelCmd
{
friend class V_EXPORT vDialog;
public: //---------------------------------------- public
vColorLabelCmd(vCmdParent* dp, CommandObject* co);
virtual ~vColorLabelCmd();
virtual void SetCmdVal(ItemVal val, ItemSetType st);
protected: //--------------------------------------- protected
private: //--------------------------------------- private
int _canChange;
vColor _color; // color of this button
vColor* _origColor; // color of this button
void initColor(void);
};
#endif

View File

@ -1,86 +0,0 @@
//===============================================================
// vcmd.h - Base class for Cmds - normally used on Dialogs - Windows
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VCMD_H
#define VCMD_H
#include <v/v_defs.h> // basic definitons
const int StdMargin = 4; // Margin to leave on controls
class V_EXPORT vCmdParent;
class V_EXPORT vDialog;
class V_EXPORT vCmd
{
friend class V_EXPORT vCmdParent;
friend class V_EXPORT vDialog;
friend class V_EXPORT vCommandPane;
public: //---------------------------------------- public
vCmd(vCmdParent* dp, CommandObject* co);
virtual ~vCmd() {}
virtual void initialize(void) {}
void CopyToLocal(void);
// define these to interface with specific Pane's setters
virtual int GetCmdValue(ItemVal iv) VCONST {return 0;}
virtual void ResetItemValue(void) { dlgCmd->retVal = _origVal;}
virtual void SaveItemValue(void) { _origVal = dlgCmd->retVal;}
virtual void SetCmdVal(ItemVal val, ItemSetType st) {}
virtual void SetCmdStr(VCONST char* s) {}
virtual void CmdCallback(int id, WORD codeNotify);
// for OWNERDRAW controls
virtual int MEASUREITEM(int id, MEASUREITEMSTRUCT* mis) {return 0;}
virtual int DRAWITEM(int id, DRAWITEMSTRUCT* dis) {return 0;}
virtual HWND GetMyHwnd(ItemVal id) VCONST;
protected: //--------------------------------------- protected
int LabelWidth(VCONST char* lbl) VCONST;
vCmdParent* _parentWin; // parent window of this object
VCONST char* _title; // current title
void* _itemList;
CommandObject* dlgCmd; // pointer to the static definition
int _Sensitive;
ItemVal _cmdId; // original id
ItemVal _origVal; // original value of object
ItemVal _retVal; // the value we are using
HWND wParent; // parent widget used for this Cmd
HWND wCmd; // main widget for this Cmd
int _x, _y, _h, _w; // size of the object
int _CtrlOffset; // Offset into dialog structure
private: //--------------------------------------- private
};
#endif

View File

@ -1,67 +0,0 @@
//===============================================================
// vcmdpane.h - Command Pane class .h file - Windows
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VCMDPANE_H
#define VCMDPANE_H
#include <v/v_defs.h>
#include <v/vpane.h> // we are derived from a pane
#include <v/vcmdprnt.h> // and from cmdParent
class V_EXPORT vWindow; // we are part-of a vWindow
class V_EXPORT vCommandPane : public vPane, public vCmdParent
{
friend vCommandPane* vGetLowestCmdPane();
friend void vSetShownCmdPane(HWND MdiWindow, int OnOff);
friend class V_EXPORT vApp;
public: //---------------------------------------- public
vCommandPane(CommandObject* cList);
vCommandPane(vStatus* s_bar); // status bar version
virtual ~vCommandPane();
virtual void ProcessCmd(ItemVal id, ItemVal rv, CmdType ct);
virtual void initialize(vWindow* pWin, HWND mdiChildWin);
virtual void ShowPane(int OnOrOff) VCONST;
// Windows utility
int DynamicDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
protected: //--------------------------------------- protected
virtual int GetPaneValue(ItemVal id, int& val) VCONST;
virtual int GetPaneTextIn(ItemVal id, char* val, int maxlen) VCONST;
virtual void SetPaneValue(ItemVal id, int val, ItemSetType setType);
virtual void SetPaneString(ItemVal id, VCONST char* str);
private: //--------------------------------------- private
int OnInitDialog (HWND hwnd, HWND hwndFocus, LPARAM lParam);
void OnEnable (HWND hwnd, BOOL fEnable);
int OnPaint (HWND hwnd);
void OnCommand (HWND hwnd, int id, HWND hwndCtl, WORD codeNotify);
CommandObject* _origList; // handle to list of commands
CommandObject* _cmdObj; // for translated status pane
int _cmdObjCount;
HWND _associatedMdiWindow;
VMUTABLE int _isDisplayed; // If vWindow thinks it is displayed
VMUTABLE int _isShown; // If it has been drawn
};
#endif

View File

@ -1,86 +0,0 @@
//===============================================================
// vcmdpar.h - A parent class for Cmds -- Windows
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
//
// This class is used by vDialog and CmdPane classes to
// allow the vCmd objects to have access to the ProcessCmd
#ifndef VCMDPAR_H
#define VCMDPAR_H
#include <v/v_defs.h>
#include <v/vcmd.h>
enum DialogType { aDialog, aCmdBar,aStatBar };
typedef struct DlgCmdList
{
vCmd* cmdP; // pointer to a command object
DlgCmdList* nextDCL; // next button
} DlgCmdList;
class V_EXPORT vCmdParent
{
public: //---------------------------------------- public
vCmdParent(PaneType pt = P_Dialog);
virtual ~vCmdParent();
virtual void ProcessCmd(ItemVal id, ItemVal rv, CmdType ct) {}
virtual int GetTextIn(ItemVal id, char* strout, int maxlen);
virtual int GetValue(ItemVal id) VCONST;
int HasId(ItemVal id) VCONST;
virtual void SetValue(ItemVal id, ItemVal val, ItemSetType setType);
virtual void SetString(ItemVal id, VCONST char* str);
virtual void SetFrameChildren(ItemVal frameId, int frameVal);
PaneType paneType() { return _pt; }
// These are platform dependent...
vCmd* getThisFromId(ItemVal find_id);
void SetPosition(int& x, int& y, int w, int h, ItemVal frame = 0,
ItemVal rightOf = 0, ItemVal below = 0, int isSpinner = 0);
int CreateDlgTemplate(LONG dtStyle,int dtX, int dtY,
int dtCX, int dtCY, LPSTR dtMenuName, LPSTR dtClassName,
LPSTR dtCaption, short int PointSize, LPSTR szTypeFace);
int AddDlgControl (int dtilX, int dtilY, int dtilCX, int dtilCY,
int dtilID, long dtilStyle, LPSTR dtilClass,
LPCSTR dtilText,BYTE dtilInfo, LPBYTE dtilData);
void DoneAddingControls(void);
HWND getParent(void) VCONST; // to get parent widget
DialogType _dialogType;
HWND HwndDialog() { return _wDialog; }
protected: //--------------------------------------- protected
DlgCmdList* _cmdList; // list of command items for this dialog
HWND _wDialog; // handle of dialog
HGLOBAL _hTemplate; // handle for template
int _callbackID; // index to callback array
int maxX, maxY; // for calculating size of dialog
int _windowH; // height of window
int _windowY; // where a command bar is actually drawn
virtual vCmd* AddCmd(CommandObject* cmd); // Add a Cmd to the dialog
void FixFrame(int cxr, int cyb, int margin, vCmd* frameCmd);
private: //--------------------------------------- private
PaneType _pt;
};
#endif

View File

@ -1,44 +0,0 @@
//===============================================================
// vcmdwin.h - vWin class definitions - Windows
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VCMDWIN_H
#define VCMDWIN_H
#include <v/vwindow.h> // we are derived from vWindow class
class V_EXPORT vCmdWindow : public vWindow
{
friend class V_EXPORT vMenuPane;
public: //---------------------------------------- public
// the constructor
vCmdWindow(VCONST char* name = "+", int width = 0, int height = 0);
virtual ~vCmdWindow(); // Destructor
int NumCmdWindows() VCONST { return _numCmdWindows; }
// virtual methods
virtual void CloseWin(void); // callback for close button
protected: //--------------------------------------- protected
vCmdWindow* GetCmdWinList() VCONST { return CmdWins; }
vCmdWindow* GetNextCmdWin() { return NextCmdWin; }
private: //--------------------------------------- private
static int _numCmdWindows; // how many total cmd windows are up
int destroyed; // prevent multiple destruction
vCmdWindow* NextCmdWin; // link to next window
static vCmdWindow* CmdWins; // list of all command windows
};
#endif

View File

@ -1,117 +0,0 @@
//===============================================================
// vcolor.h: vColor class header for drawing - Windows
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VCOLOR_H
#define VCOLOR_H
#include <windows.h> // V 1.15a
// For use in Color buttons
const int M_Black = 32020;
const int M_Red = 32021;
const int M_DimRed = 32022;
const int M_Green = 32023;
const int M_DimGreen = 32024;
const int M_Blue = 32025;
const int M_DimBlue = 32026;
const int M_Yellow = 32027;
const int M_DimYellow = 32028;
const int M_Magenta = 32029;
const int M_DimMagenta = 32030;
const int M_Cyan = 32031;
const int M_DimCyan = 32032;
const int M_DarkGray = 32033;
const int M_MedGray = 32034;
const int M_White = 32035;
const int M_ColorFrame = 32036;
// Index into array
const int vC_Black = 0;
const int vC_Red = 1;
const int vC_DimRed = 2;
const int vC_Green = 3;
const int vC_DimGreen = 4;
const int vC_Blue = 5;
const int vC_DimBlue = 6;
const int vC_Yellow = 7;
const int vC_DimYellow = 8;
const int vC_Magenta = 9;
const int vC_DimMagenta = 10;
const int vC_Cyan = 11;
const int vC_DimCyan = 12;
const int vC_DarkGray = 13;
const int vC_MedGray = 14;
const int vC_White = 15;
class V_EXPORT vPen;
class V_EXPORT vColor
{
friend class V_EXPORT vPen;
friend class V_EXPORT vBrush;
public: //---------------------------------------- public
vColor(unsigned int rd = 0, unsigned int gr = 0, unsigned int bl = 0);
~vColor() {}
// Default shallow copy constructor and assignment ok.
#ifdef OLD_NON_DLL_CODE
int operator == (const vColor& c2)
{return (_r == c2._r && _g == c2._g && _b == c2._b);}
int operator !=(const vColor& c2)
{return (_r != c2._r || _g != c2._g || _b != c2._b);}
#endif
void ResetColor(unsigned int rd = 0, unsigned int gr = 0,
unsigned int bl = 0);
void ResetColor(VCONST vColor& c);
void Set(unsigned int rd = 0, unsigned int gr = 0, unsigned int bl = 0);
void Set(VCONST vColor& c);
void SetR(unsigned int rd = 0);
void SetG(unsigned int gr = 0);
void SetB(unsigned int bl = 0);
int BitsOfColor() VCONST;
unsigned int r() const { return (unsigned int) _r;}
unsigned int g() const { return (unsigned int) _g;}
unsigned int b() const { return (unsigned int) _b;}
COLORREF pixel() VCONST { return _pixel; }
protected: //--------------------------------------- protected
unsigned char _r;
unsigned char _g;
unsigned char _b;
unsigned char _padtoevenbyte;
private: //--------------------------------------- private
COLORREF _pixel;
};
#ifdef OLD_NON_DLL_CODE
extern vColor vStdColors[16];
extern char* vColorNames[16];
#endif
// global variables vStdColors and vColorNames are replaced by these
// two functionsn DLL version 1.21
//
V_EXPORT vColor* vGetStdColors();
V_EXPORT char** vGetColorNames();
// Global variable name were replaced by function calls.
//
#define vStdColors (vGetStdColors())
#define vColorNames (vGetColorNames())
inline int operator == (const vColor& x, const vColor& y)
{return (x.r() == y.r() && x.g() == y.g() && x.b() == y.b());}
inline int operator != (const vColor& x, const vColor& y)
{return !(x == y);}
#endif

View File

@ -1,47 +0,0 @@
//===============================================================
// vcomboc.h - ComboBox - Windows
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VCOMBOC_H
#define VCOMOBC_H
#include <v/vcmd.h> // We are derived from vcmd
const int MAX_COMBO_LIST = 32; // put 8 items in the list
class V_EXPORT vCmdParent;
class V_EXPORT vComboBoxCmd : public vCmd
{
public: //---------------------------------------- public
vComboBoxCmd(vCmdParent* dp, CommandObject* dc);
virtual ~vComboBoxCmd();
virtual int GetCmdValue(ItemVal id) VCONST;
virtual void SetCmdVal(ItemVal val, ItemSetType st);
protected: //--------------------------------------- protected
private: //--------------------------------------- private
char** _fullList; // alias pointer to full list
int _maxWidth; // max width of any item
int _numItems; // number of items on list
int _curSelection; // index of current selected item
void SetupComboList(void);
virtual void CmdCallback(int id, WORD codeNotify);
};
#endif

View File

@ -1,57 +0,0 @@
//===============================================================
// vcpdc.h: CanvasPaneDC class .h file - Windows
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VCPDC_H
#define VCPDC_H
#include <v/vwindc.h>
class V_EXPORT vWindow; // we are part of a window
class V_EXPORT vCanvasPane;
class V_EXPORT vIcon;
class V_EXPORT vCanvasPaneDC : public vWinDC
{
public: //---------------------------------------- public
vCanvasPaneDC(vCanvasPane* parentPane);
virtual ~vCanvasPaneDC();
// Drawing
virtual void Clear(void);
virtual void ClearRect(int left, int top, int width, int height);
virtual void SetBackground(VCONST vColor& color);
virtual void SetFont(VCONST vFont& vf);
protected: //--------------------------------------- protected
// These methods are to be used only internally and are assumed to
// be used correctly - there is no error checking. The idea is to have
// the canvas use BeginPaint/EndPaint for Redraw, and the drawing
// rotuines to use GetHDC and ReleaseHDC.
virtual void GetHDC() VCONST { if (_hdcPaint != 0) _hdc = _hdcPaint;
else {::HideCaret(_drawWidget); _hdc = ::GetDC(_drawWidget);} }
virtual void BeginPaint() {_hdcPaint = ::BeginPaint(_drawWidget, &_ps);}
virtual void EndPaint() { ::EndPaint(_drawWidget, &_ps); _hdcPaint = 0;}
virtual void ReleaseHDC() VCONST { if (_hdc != _hdcPaint)
{::ShowCaret(_drawWidget); ::ReleaseDC(_drawWidget, _hdc);}}
private: //--------------------------------------- private
vCanvasPane* _parentPane;
HWND _drawWidget;
};
#endif

View File

@ -1,148 +0,0 @@
//===============================================================
// vdc.h: vDC class .h file - Windows
//
// Copyright (C) 1995-1998 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VDC_H
#define VDC_H
#include <v/v_defs.h> // Basic defs
#include <v/vfont.h> // for fonts
#include <v/vpen.h> // for our pen
#include <v/vbrush.h> // for our brush
#include <v/vprinter.h>
class V_EXPORT vIcon;
class V_EXPORT vColor;
typedef unsigned char ChrAttr; // An attribute for a display char
typedef unsigned char Chr; // A character to display
typedef struct dChar // A display Char
{
ChrAttr attr; // The attribute of this char
Chr chr; // the character
} dChar;
const ChrAttr ChNormal = 0;
const ChrAttr ChReverse = 0x01; // True Reverse
const ChrAttr ChHighlight = 0x02; // Contrasting highlight
const ChrAttr ChBlackOnBG = 0x04; // Black on background color
const ChrAttr ChWhiteOnBG = 0x08; // White on background color
const ChrAttr ChDimColor = 0x80; // dim color (half intensity)
const ChrAttr ChRed = 0x40; // various colors
const ChrAttr ChGreen = 0x20;
const ChrAttr ChBlue = 0x10;
const ChrAttr ChYellow = 0x60;
const ChrAttr ChMagenta = 0x50;
const ChrAttr ChCyan = 0x30;
const ChrAttr ChGray = 0xF0;
const ChrAttr ChWhite = 0x70;
class V_EXPORT vMemoryDC;
class V_EXPORT vDC
{
friend class V_EXPORT vWinDC;
public: //---------------------------------------- public
vDC(void) { _Mult = 1; _Div = 1; _hasScale = 0; _tx = 0 ; _ty = 0;
_physHeight = _physWidth = 0;}
virtual ~vDC(void) {}
// Drawing
virtual void Clear(void) = 0;
virtual void ClearRect(int left, int top, int width, int height) = 0;
virtual void CopyFromMemoryDC(vMemoryDC* vmemdc, int destX, int destY,
int srcX = 0, int srcY = 0, int srcW = 0, int srcH = 0) // V:1.13
{}
#ifdef DRAWARC
virtual void DrawArc(int xx1, int yy1, int xx2, int yy2, int xxc, int yyc) = 0;
#endif
virtual void DrawAttrText(int x, int y, VCONST char* text, const ChrAttr attr) = 0;
virtual void DrawText(int x, int y, VCONST char* text) = 0;
virtual void DrawEllipse(int x, int y, int width, int height) = 0;
virtual void DrawIcon(int x, int y, VCONST vIcon& icon) {};
virtual void DrawLine(int x, int y, int xend , int yend) = 0;
virtual void DrawLines(vLine* lineList, int count) = 0;
virtual void DrawLines(vPoint* lineList, int n) = 0;
virtual void DrawColorPoints(int x, int y, int nPoints, vColor* pointList) {}
virtual void DrawPoint (int x, int y) = 0;
virtual void DrawPoints (vPoint* pointList, int count) = 0;
virtual void DrawPolygon (int n, vPoint points[],
int fillStyle = vAlternate) = 0;
virtual void DrawRoundedRectangle(int x, int y,
int width, int height, int radius = 10) = 0;
virtual void DrawRectangle(int x, int y, int width, int height) = 0;
virtual void DrawRectangles(vRect* rectList, int count) = 0;
// Not all DrawingCanvases need Rubber Lines!
virtual void DrawRubberLine(int x, int y, int xend, int yend) {}
virtual void DrawRubberEllipse(int x, int y, int width, int height) {}
virtual void DrawRubberPoint(int x, int y) {}
virtual void DrawRubberRectangle(int x, int y, int width, int height) {}
// Printer
virtual int BeginPrinting() {return 0;}
virtual void EndPrinting() {}
virtual void BeginPage() {}
virtual void EndPage() {}
// virtual void SetPrinter(vPrinter& printer){}
// Misc
virtual int GetPhysHeight() VCONST { return _physHeight; }
virtual int GetPhysWidth() VCONST { return _physWidth; }
virtual void SetBackground(VCONST vColor& color) {}
virtual void SetScale(int mult, int div)
{_Mult = mult ; _Div = div ; _hasScale = (_Mult != 1 || _Div != 1); }
virtual void GetScale(int& m, int& d) VCONST {m = _Mult; d=_Div;}
void SetTranslate(int x, int y) { _tx = x; _ty = y; }
void SetTransX(int x) {_tx = x;}
void SetTransY(int y) {_ty = y;}
void GetTranslate(int& x, int& y) {x = _tx; y = _ty;}
int GetTransX() VCONST { return _tx; }
int GetTransY() VCONST { return _ty; }
virtual void SetFont( VCONST vFont& vf) {}
virtual vFont GetFont() VCONST { return _font; } // Get text font id
virtual void SetPen(VCONST vPen& pen) {}
virtual vPen GetPen() VCONST { return _pen; }
virtual void SetBrush(VCONST vBrush& brush) {}
virtual vBrush GetBrush() VCONST { return _brush; }
virtual int TextHeight(int& asc, int& des) VCONST {return 0;}
virtual int TextWidth(VCONST char* str) VCONST {return 0;}
protected: //--------------------------------------- protected
int _Mult; // scaling factors
int _Div;
int _tx; // translation
int _ty;
int _hasScale; // if have scale
int _physHeight; // maximum height of canvas
int _physWidth; // max width of canvas
vBrush _brush; // the painting brush
VMUTABLE vFont _font; // the current font
vPen _pen; // the drawing pen
virtual int Scale(int x) { return (_hasScale) ? ((x*_Mult)/_Div) : x; }
private: //--------------------------------------- private
};
#endif

View File

@ -1,32 +0,0 @@
//===============================================================
// vdebug.h - set up debug
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VDEBUG_H
#define VDEBUG_H
#include <v/vmodald.h>
class V_EXPORT vDebugDialog : public vModalDialog
{
public: //---------------------------------------- public
vDebugDialog(vBaseWindow* bw,char* title = "Debugging Options") : vModalDialog(bw,title) {};
~vDebugDialog() {};
void SetDebug();
virtual void DialogCommand(ItemVal id, ItemVal val, CmdType ctype);
protected: //--------------------------------------- protected
private: //--------------------------------------- private
};
#endif

View File

@ -1,87 +0,0 @@
//===============================================================
// vdialog.h - general purpose dialog class - Windows
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VDIALOG_H
#define VDIALOG_H
#include <v/vbasewin.h> // We inherit form vBaseWindow
#include <v/vcmdprnt.h> // We also inherit from vCmdParent
class V_EXPORT vCmd; // Dialogs have Cmds
class V_EXPORT vApp;
class V_EXPORT vDialog : public vBaseWindow, public vCmdParent
{
friend int vChkWinDlgMsgs(MSG *msg);
public: //---------------------------------------- public
// One constructor for windows, one for the app
vDialog(VCONST vBaseWindow* creator, int modal = 0,
VCONST char* title = "");
vDialog(VCONST vApp* creator, int modal = 0, VCONST char* title = "");
vDialog(const vDialog&); // Copy constructor
~vDialog();
virtual void AddDialogCmds(CommandObject* cList); // Add a list of Cmds
virtual void AddDialogCmdObj(CommandObject* Cmd, vCmd* CmdInstance);
virtual void CancelDialog(void); // Cancel selected
virtual void CloseDialog(void); // Close dialog
virtual void SetDialogTitle(VCONST char * title);
void GetDialogPosition(int& left, int& top, int& width,
int& height) VCONST;
void SetDialogPosition(int left, int top);
// Dialog action selected
virtual void DialogCommand(ItemVal id, ItemVal retval, CmdType ctype);
virtual void DialogDisplayed();
int IsDisplayed(void) VCONST { return _IsDisplayed; } // If displayed or not
virtual void ShowDialog(VCONST char* msg); // called to invoke dialog
// Windows utility
int DynamicDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
// functions from vCmdParent to override
virtual void ProcessCmd(ItemVal id, ItemVal rv, CmdType ct);
protected: //--------------------------------------- protected
void init(int modal, VCONST char* title);
int _IsDisplayed; // if popped up or not
virtual void showBaseWindow(void) { }; // no-op for dialog
HWND winHwnd() VCONST { return _parentHWND; }
HWND myHwnd() VCONST { return _myHWND; } // V:1.13
// V:1.13
vDialog* _oldModal; // pointer of previous Modal this
static vDialog* _curModal; // this of current modal
private: //--------------------------------------- private
HWND _parentHWND;
HWND _myHWND; // V:1.13
HWND hwndToolTip; // handle to my tip hwnd
int _modal; // if modal or modeless
vCmd* _DefaultButton; // for easy Warp to default button
vCmd* _FirstTextIn; // for SetKeyBoardFocus
};
#endif

View File

@ -1,25 +0,0 @@
//===============================================================
// vdll.h - This file has differences needed for dll/nondll versions
//
// Copyright (C) 1995-2000 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VDLL_H
#define VDLL_H
//#define BUILD_V_DLL
// These definitions contributed by Franco Bez <franco.bez@gmx.de> V 1.24
#if defined (BUILD_V_DLL)
# define V_EXPORT __declspec(dllexport)
# else
# if defined (USE_V_DLL)
# define V_EXPORT __declspec(dllimport)
# else
# define V_EXPORT
# endif
#endif
#endif

View File

@ -1,52 +0,0 @@
//===============================================================
// vfilesel.h - reply modal dialog - Windows
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VFILESEL_H
#define VFILESEL_H
#include <v/v_defs.h>
#include <commdlg.h>
class V_EXPORT vApp;
class V_EXPORT vBaseWindow;
class V_EXPORT vFileSelect
{
public: //---------------------------------------- public
vFileSelect(vBaseWindow* bw, VCONST char* title = "File Select");
vFileSelect(vApp* aw, VCONST char* title = "File Select");
~vFileSelect() {}
int FileSelect(const char* msg, char* filename,
const int maxlen, char** filter, int& filterIndex,
const char* initDir = 0);
int FileSelectSave(const char* msg, char* filename,
const int maxlen, char** filter, int& filterIndex,
const int findDir = 0, const char* initDir = 0);
protected: //--------------------------------------- protected
private: //--------------------------------------- private
HWND _parentHWND;
OPENFILENAME ofn; // Windows struct
void init();
void buildFilter(char* fbuff, char** filter, int& fi);
void strcatEOS(char* to, VCONST char *from);
};
#endif

View File

@ -1,43 +0,0 @@
//===============================================================
// vFind.h - reply modal dialog - common Win/X
//
// Copyright (C) 1995-1999 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef vFind_H
#define vFind_H
#include <v/vmodald.h>
#ifndef V_EXPORT
#define V_EXPORT
#endif
class V_EXPORT vApp;
class V_EXPORT vFindDialog : protected vModalDialog
{
public: //---------------------------------------- public
vFindDialog(vBaseWindow* bw, VCONST char* title = "Find") :
vModalDialog(bw, title)
{ added = 0;}
vFindDialog(vApp *aw, VCONST char* title = "Find") :
vModalDialog(aw, title)
{ added = 0;}
~vFindDialog() {}
int AskFindPat(char* reply, const int maxlen, int& caseSens,
int& Down, int& Wrap);
protected: //--------------------------------------- protected
private: //--------------------------------------- private
int added;
virtual void DialogCommand(ItemVal id, ItemVal val, CmdType ctype);
};
#endif

View File

@ -1,111 +0,0 @@
//===============================================================
// vfont.h - The font class - Windows
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VFONT_H
#define VFONT_H
#include <windows.h>
#include <commdlg.h> // For CHOOSEFONT
class V_EXPORT vCanvasPane; // the vCanvasPane needs to the the X font
class V_EXPORT vApp; // the vApp needs Xfont, too
class V_EXPORT vListCmd;
class V_EXPORT vComboBoxCmd;
enum vFontID // various font related ids
{
vfDefaultSystem, // system default (fixed for Windows)
vfDefaultFixed, // the system default fixed font
vfDefaultVariable, // the system default variable font
vfSerif, // serifed font - TimesRoman
vfSansSerif, // SansSerif - Swiss or Helvetica
vfFixed, // fixed font - Courier
vfDecorative, // decorative - dingbat
vfOtherFont, // for all other fonts
vfNormal, // normal style, weight
vfBold, // boldface
vfItalic, // italic style
vfEndOfList
};
class V_EXPORT vFont // make the font stuff a class to make it portable
{
friend class V_EXPORT vCanvasPane;
friend class V_EXPORT vApp;
public: //---------------------------------------- public
vFont(vFontID fam = vfDefaultFixed, int size = 10,
vFontID sty = vfNormal, vFontID wt = vfNormal,
int und = 0, int ang = 0);
vFont(const vFont &ft); // copy constructor
~vFont();
vFont& operator =(const vFont& ft); // vFont = vFont
int operator ==(const vFont& ft) VCONST
{ return (_family == ft._family && _style == ft._style &&
_weight == ft._weight && _pointSize == ft._pointSize &&
_underlined == ft._underlined && _angle == ft._angle); }
int operator !=(const vFont& ft) VCONST
{ return !(_family == ft._family && _style == ft._style &&
_weight == ft._weight && _pointSize == ft._pointSize &&
_underlined == ft._underlined && _angle == ft._angle); }
vFontID GetFamily() VCONST { return _family; }
int GetPointSize() VCONST { return _pointSize; }
vFontID GetStyle() VCONST { return _style; }
vFontID GetWeight() VCONST { return _weight; }
int GetUnderlined() VCONST { return _underlined; }
int GetAngle() VCONST { return _angle; }
void SetFontValues(vFontID fam = vfDefaultFixed, int size = 10,
vFontID sty = vfNormal, vFontID wt = vfNormal, int und = 0);
void GetNativeFontString(char* fontStr);
void SetNativeFontString(char* fontStr);
void SetWinFontValues(VCONST LOGFONT& lf, int pt, DWORD rgb);
void LoadFont(HDC dc, int isPrinterDC); // make sure font with given id is loaded
HFONT GetHFONT() VCONST { return _hFont; }
LOGFONT GetLOGFONT() VCONST { return _lf; }
COLORREF GetFontColor() VCONST { return _fontColor; }
protected: //--------------------------------------- protected
char* getSubstring(char* str, char* substr);
private: //--------------------------------------- private
vFontID _family; // family - vfSerif, etc.
vFontID _style; // style - nomal, italic, slant
vFontID _weight; // weight - normal, light, bold
int _pointSize; // point size of font
int _underlined; // if underlined or not
int _angle; // angle to print at
int _isStockFont; // if a stock font
COLORREF _fontColor;
HFONT _hFont; // windows handle to font
LOGFONT _lf; // Window full font inf
};
#endif

View File

@ -1,42 +0,0 @@
//===============================================================
// vfontsel.h - font select modal dialog - Windows
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VSELFONT_H
#define VSELFONT_H
#include <v/v_defs.h>
#include <v/vfont.h>
#include <commdlg.h>
class V_EXPORT vApp;
class V_EXPORT vBaseWindow;
class V_EXPORT vFontSelect
{
public: //---------------------------------------- public
vFontSelect(vBaseWindow* bw, VCONST char* title = "Select Font");
vFontSelect(vApp* aw, VCONST char* title = "Select Font");
~vFontSelect() {}
int FontSelect(vFont& font, const char* msg = "Select Font",
int fixedOnly = 0 );
protected: //--------------------------------------- protected
private: //--------------------------------------- private
HWND _parentHWND;
CHOOSEFONT _cf;
LOGFONT _lf;
void init();
};
#endif

View File

@ -1,41 +0,0 @@
//===============================================================
// vframec.h - Frame Command class - Windows
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VFRAMEC_H
#define VFRAMEC_H
#include <v/vcmd.h> // We are derived from vcmd
class V_EXPORT vCmdParent;
class V_EXPORT vFrameCmd : public vCmd
{
public: //---------------------------------------- public
vFrameCmd(vCmdParent* dp, CommandObject* co);
virtual ~vFrameCmd();
virtual void initialize(void);
virtual void SetCmdVal(ItemVal val, ItemSetType st);
virtual void CmdCallback(int id, WORD codeNotify);
virtual int MEASUREITEM(int id, MEASUREITEMSTRUCT* mis);
virtual int DRAWITEM(int id, DRAWITEMSTRUCT* dis);
protected: //--------------------------------------- protected
private: //--------------------------------------- private
};
#endif

View File

@ -1,53 +0,0 @@
//===============================================================
// vicon.h - Icon class - Windows
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VICON_H
#define VICON_H
#include <windows.h>
#include <v/v_defs.h>
enum IconType {Normal, Transparent}; // types of icons
class V_EXPORT vIcon // an icon
{
//friend class vWinDC;
//friend class vLabelCmd;
//friend class vButtonCmd;
public: //---------------------------------------- public
vIcon();
vIcon(unsigned char* ic, int h, int w, int d = 1, IconType it = Normal);
~vIcon();
IconType iType; // type of icon
int height; // height in pixels
int width; // width in pixels
int depth; // bits per pixel
unsigned char* icon; // ptr to icon array
HBITMAP GetIconHBM(HDC iDC) VCONST
{
if (_hbm == 0) vIconToBMP(iDC); return _hbm;
}
HBITMAP GetIconMask(HDC iDC) VCONST
{
if ( _hmsk == 0 && depth > 1 ) vIconToBMP(iDC);
return _hmsk;
}
protected: //--------------------------------------- protected
private: //--------------------------------------- private
int NeedBMPBytes() VCONST;
void vIconToBMP(HDC iDC) VCONST;
VMUTABLE HBITMAP _hbm, _hmsk;
};
#endif

View File

@ -1,92 +0,0 @@
//===============================================================
// vkeys.h - Defintions for V keys - Windows
//
// Copyright (C) 1995 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VKEYS_H
#define VKEYS_H
// Masks for various shift modes
#define VKM_Shift 1
#define VKM_Ctrl 4
#define VKM_Alt 8
#define vk_IsModifier(x) (0) // Windows doesn't give keycodes for modifiers
#define vk_None 0x0 /* no key */
#define vk_BackSpace 0x08
#define vk_Tab 0x09
#define vk_Linefeed 0x0A
#define vk_Return 0x0D
#define vk_Pause 0x13
#define vk_Escape 0x1B
#define vk_Delete 0x7F
#define vk_BackTab 0xFF09
#define vk_Home 0xFF50
#define vk_Left 0xFF51
#define vk_Up 0xFF52
#define vk_Right 0xFF53
#define vk_Down 0xFF54
#define vk_Page_Up 0xFF55
#define vk_Page_Down 0xFF56
#define vk_End 0xFF57
#define vk_Insert 0xFF58
#define vk_KP_Enter 0xFF0D
#define vk_KP_Home 0xFF95
#define vk_KP_Left 0xFF96
#define vk_KP_Up 0xFF97
#define vk_KP_Right 0xFF98
#define vk_KP_Down 0xFF99
#define vk_KP_Page_Up 0xFF9A
#define vk_KP_Page_Down 0xFF9B
#define vk_KP_End 0xFF9C
#define vk_KP_Insert 0xFF9E
#define vk_KP_Delete 0xFF7F
#define vk_KP_Equal 0xFF3D
#define vk_KP_Multiply 0xFF2A
#define vk_KP_Add 0xFF2B
#define vk_KP_Subtract 0xFF2D
#define vk_KP_Decimal 0xFF2E
#define vk_KP_Divide 0xFF2F
#define vk_KP_0 0xFF30
#define vk_KP_1 0xFF31
#define vk_KP_2 0xFF32
#define vk_KP_3 0xFF33
#define vk_KP_4 0xFF34
#define vk_KP_5 0xFF35
#define vk_KP_6 0xFF36
#define vk_KP_7 0xFF37
#define vk_KP_8 0xFF38
#define vk_KP_9 0xFF39
#define vk_F1 0xFFC1
#define vk_F2 0xFFC2
#define vk_F3 0xFFC3
#define vk_F4 0xFFC4
#define vk_F5 0xFFC5
#define vk_F6 0xFFC6
#define vk_F7 0xFFC7
#define vk_F8 0xFFC8
#define vk_F9 0xFFC9
#define vk_F10 0xFFCA
#define vk_F11 0xFFCB
#define vk_F12 0xFFCC
#define vk_F13 0xFFCD
#define vk_F14 0xFFCE
#define vk_F15 0xFFCF
#define vk_F16 0xFFD0
#define vk_space 0x020
#define vk_asciitilde 0x07e
#endif

View File

@ -1,45 +0,0 @@
//===============================================================
// vlablec.h - Lable Command Class - Windows
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VLABELC_H
#define VLABELC_H
#include <v/vapp.h>
#include <v/vcmd.h> // We are derived from vcmd
class V_EXPORT vCmdParent;
class V_EXPORT vIcon;
class V_EXPORT vLabelCmd : public vCmd
{
public: //---------------------------------------- public
vLabelCmd(vCmdParent* dp, CommandObject* co);
virtual ~vLabelCmd();
virtual void initialize(void);
virtual void SetCmdStr(VCONST char* str);
virtual void SetCmdVal(ItemVal val, ItemSetType st);
virtual void CmdCallback(int id, WORD codeNotify);
virtual int MEASUREITEM(int id, MEASUREITEMSTRUCT* mis);
virtual int DRAWITEM(int id, DRAWITEMSTRUCT* dis);
protected: //--------------------------------------- protected
void initIcon(void);
private: //--------------------------------------- private
vIcon* _ip;
};
#endif

View File

@ -1,83 +0,0 @@
//===============================================================
// vlayoutp.h - Layout Pane C++ class .h file - Windows
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VLAYOUTP_H
#define VLAYOUTP_H
#include <v/v_defs.h> // Basic defs
#include <v/vpane.h> // we are derived from vPane
class vWindow; // we are part of a window
class vLayoutPane : public vPane
{
friend vWindow;
public: //---------------------------------------- public
vLayoutPane(PaneType pt = P_Canvas);
virtual ~vLayoutPane();
virtual void ShowPane(int OnOrOff);
void SetWidthHeight(int width, int height);
// Events
virtual void MouseDown(int x, int y, int button) {} // Mouse Down at x,y
virtual void MouseUp(int x, int y, int button) {} // Mouse Up at x,y
virtual void MouseMove(int x, int y, int button) {} // Mouse Moved to x,y
virtual void MouseMotion(int x, int y) {} // No Button Mouse Move
virtual void EnterFocus(void);
virtual void LeaveFocus(void);
// Expose/redraw event
virtual void Redraw(int x, int y, int width , int height);
virtual void Resize(int newW, int newH); // Resize event
// Information
virtual int GetWidth() { return _width; } // Get width of canvas
virtual int GetHeight() { return _height; } // Get Height of canvas
// Appearance
// Platform dependent
protected: //--------------------------------------- protected
virtual void EnterEV(void);
virtual void LeaveEV(void);
virtual void initialize(vWindow* pWindow, HWND pWidget);
int _height; // height of draw window
int _width; // width of draw window
HWND _drawWindow; // window for drawing
int _hasFocus; // for focus workaround
private: //--------------------------------------- private
// Widgets for the canvas
static VCursor _currentCursor; // for cursor
void HScrollEV(int code, int pos, HWND control) {}
void VScrollEV(int code, int pos, HWND control) {}
void ResizeEV(int w, int h);
void ExposeEV(void);
};
#endif

View File

@ -1,46 +0,0 @@
//===============================================================
// vlistc.h - List Command class - Windows
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VLISTC_H
#define VLISTC_H
#include <v/vcmd.h> // We are derived from vcmd
class V_EXPORT vCmdParent;
class V_EXPORT vListCmd : public vCmd
{
public: //---------------------------------------- public
vListCmd(vCmdParent* dp, CommandObject* co);
virtual ~vListCmd();
virtual int GetCmdValue(ItemVal id) VCONST;
virtual void SetCmdVal(ItemVal val, ItemSetType st);
protected: //--------------------------------------- protected
private: //--------------------------------------- private
virtual void CmdCallback(int id, WORD codeNotify);
char** _fullList; // alias pointer to full list
int _maxWidth; // max width of any item
int _numItems; // number of items on list
int _curSelection; // index of current selected item
int _listRows; // how many rows to display
void SetupList(void);
};
#endif

View File

@ -1,46 +0,0 @@
//===============================================================
// vcpdc.h: MemoryDC class .h file - X11R5
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VMEMDC_H
#define VMEMDC_H
#include <v/vwindc.h>
class V_EXPORT vMemory;
class V_EXPORT vMemoryDC : public vWinDC
{
public: //---------------------------------------- public
vMemoryDC(int width = 256, int height = 256);
virtual ~vMemoryDC();
virtual void Clear(void);
virtual void ClearRect(int left, int top, int width, int height);
virtual void SetBackground(VCONST vColor& color);
virtual void SetFont(VCONST vFont& vf);
virtual void GetHDC() VCONST;
virtual void ReleaseHDC() VCONST;
int CreatedOK() VCONST {return _memBM != 0;}
protected: //--------------------------------------- protected
private: //--------------------------------------- private
VMUTABLE HBITMAP _memBM;
VMUTABLE HBITMAP _oldBM;
};
#endif

View File

@ -1,100 +0,0 @@
//===============================================================
// vmenu.h - vmenu class definitions - Windows
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VMENU_H
#define VMENU_H
#include <v/v_defs.h>
#include <v/vpane.h> // we are derived from a pane
// The _menuButton array will point to static arrays of menus.
// The user will allocate these, e.g.:
//
// vMenu EditMenu[] =
// {
// {"Item 1", MENU_1, isSens, notChk, noKeyLbl, noKey, noSub},
// {"Item 2", MENU_2, isSens, notChk, noKeyLbl, noKey, noSub},
// {NULL}
// };
//
// and to define the menu bar
//
// vMenu myMenu[] =
// {
// {"Edit", M_File, isSens, notChk, noKeyLbl, noKey, &EditMenu[0]},
// {NULL}
// };
//
// the _menuButton will be done dynamically. The call back
// will pass the value of an item to a given window.
typedef struct MenuInfo // Implementation dependent stuff
{
int ItemIndex;
int SubMenuIndex;
MenuInfo* NxtInfo;
} MenuInfo;
typedef struct MenuButton
{
VCONST char* label; // Label for button
vMenu* SubMenu; // the menu items associated with this button
MenuInfo* mInfo; // dynamically allocated info list
// System dependent handles
HMENU hPullDown; // handle for the pulldown
} MenuButton;
const int MAX_MENU_BUTTONS = 80; // Up to 20 menu buttons + submenus
// per window
class V_EXPORT vWindow;
class V_EXPORT vCmdWindow; // we are part of a vCmdWindow
class V_EXPORT vMenuPane : public vPane
{
friend class V_EXPORT vWindow;
friend class V_EXPORT vCmdWindow;
public: //---------------------------------------- public
// the constructors
vMenuPane(VCONST vMenu* menu);
vMenuPane(const vMenuPane& m); // Copy constructor
virtual ~vMenuPane(); // Destructor
// non-virtual methods
void initialize(vWindow* pWin, HWND hMenu);
void fixLabel(VCONST char* lbl, VCONST char* key) VCONST;
int CheckAccel(vKey vkey, unsigned int shift, ItemVal& id) VCONST;
protected: //--------------------------------------- protected
virtual int GetPaneValue(ItemVal id, int& val) VCONST;
virtual void SetPaneValue(ItemVal id, int val, ItemSetType setType);
virtual void SetPaneString(ItemVal id, VCONST char* str); // set menu item label
private: //--------------------------------------- private
// data
int _nextMenuButton;
int _nextSubMenu;
MenuButton _mb[MAX_MENU_BUTTONS]; // Up to 10 menu items per window
HMENU _topLevelMenu;
// methods
void doAddMenu(int id, HMENU parent); // build the menu
};
#endif

View File

@ -1,44 +0,0 @@
//===============================================================
// vmodald.h - general purpose modal dialog class - Windows
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VMODALD_H
#define VMODALD_H
#include <v/vdialog.h> // derived from vDialog
class V_EXPORT vApp;
class V_EXPORT vModalDialog : public vDialog
{
public: //---------------------------------------- public
vModalDialog(VCONST vBaseWindow* creator, VCONST char* title = "");
vModalDialog(VCONST vApp* creator, VCONST char* title = "");
virtual ~vModalDialog();
virtual void CloseDialog(void);
// called when command entered
virtual void DialogCommand(ItemVal id, ItemVal retval, CmdType ctype);
virtual ItemVal ShowModalDialog(VCONST char* msg, ItemVal& retval);
protected: //--------------------------------------- protected
private: //--------------------------------------- private
ItemVal _mdItemVal;
ItemVal _mdItemID;
CmdType _mdCmdType;
char* _mdStrVal;
};
#endif

View File

@ -1,78 +0,0 @@
//===============================================================
// vnlprntr.h: null Printer class .h file - X11R5
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VNLPRNTR_H
#define VNLPRNTR_H
#define vPaperLetter 0
#define vPaperLegal 1
#define vPaperTabloid 2
#define vPaperLedger 3
#define vPaperStatement 4
#define vPaperExecutive 5
#define vPaperA3 6
#define vPaperA4 7
#define vPaperA5 8
#define vPaperB4 9
#define vPaperB5 10
#define vPaperFolio 11
#define vPaperQuarto 12
#define vPaper10x14 13
#define vPaperDefault vPaperLetter // Index to default paper
#include <iosfwd>
class V_EXPORT vNullPrinter
{
// class ofstream;
public: //---------------------------------------- public
vNullPrinter(){}
~vNullPrinter(){}
ofstream* OpenPrinter() VCONST {return 0;}
void ClosePrinter() {}
int GetHeight() VCONST {return _height;}
int GetWidth() VCONST {return _width;}
VCONST char* GetDocName() VCONST {return 0;}
int GetPortrait() VCONST {return _portrait;}
void SetPortrait(int p) {_portrait = p;}
int GetUseColors() VCONST {return _useColor;}
void SetUseColors(int c) {_useColor = c;}
int GetPaper() VCONST {return _paperType;}
VCONST char* GetPaperName() VCONST {return 0;}
int GetCopies() VCONST {return _copies;}
void SetCopies(int s) {_copies = s;}
int GetToFile() VCONST {return _toFile;}
int Setup( VCONST char* fn = 0) VCONST {return 0;}
protected: //--------------------------------------- protected
private: //--------------------------------------- private
int _width; // width of printer
int _height; // height of printer
int _portrait; // true if portrait, else landscape
int _useColor; // true if printer supports colors
int _paperType;
int _copies;
int _toFile;
};
#endif

View File

@ -1,38 +0,0 @@
//===============================================================
// vnotice.h - notice modal dialog - Windows
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VNOTICE_H
#define VNOTICE_H
#include <v/vmodald.h>
class V_EXPORT vApp;
class V_EXPORT vNoticeDialog : protected vModalDialog
{
public: //---------------------------------------- public
vNoticeDialog(VCONST vBaseWindow* bw, VCONST char* title = "Notice") :
vModalDialog(bw,title) { _cmdsAdded = 0; }
vNoticeDialog(VCONST vApp* aw, VCONST char* title = "Notice") :
vModalDialog(aw,title) { _cmdsAdded = 0; }
~vNoticeDialog() {}
void Notice(VCONST char* msg);
protected: //--------------------------------------- protected
private: //--------------------------------------- private
int _cmdsAdded;
virtual void DialogCommand(ItemVal id, ItemVal val, CmdType ctype);
virtual void DialogDisplayed(); // TEH Dec97
};
#endif

View File

@ -1,75 +0,0 @@
//===============================================================
// vnulldc.h: a NULL DC class .h file - All platforms
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VNULLDC_H
#define VNULLDC_H
#include <v/vdc.h>
class V_EXPORT vNullDC : public vDC
{
public: //---------------------------------------- public
vNullDC(void) {}
virtual ~vNullDC() {}
// Drawing
virtual void Clear(void) {}
virtual void ClearRect(int left, int top, int width, int height) {}
virtual void DrawAttrText(int x, int y, VCONST char* text, VCONST ChrAttr attr) {}
virtual void DrawText(int x, int y, VCONST char* text) {}
virtual void DrawEllipse(int x, int y, int width, int height) {}
virtual void DrawIcon(int x, int y, VCONST vIcon& icon) {}
virtual void DrawLine(int x, int y, int xend , int yend) {}
virtual void DrawPoint (int x, int y) {}
virtual void DrawPolygon (int n, vPoint points[],
int fillStyle = vAlternate) {}
virtual void DrawRoundedRectangle(int x, int y,
int width, int height, int radius = 10) {}
virtual void DrawRectangle(int x, int y, int width, int height) {}
virtual void DrawLines(vLine* lineList){};
virtual void DrawPoints (vPoint* pointList){};
virtual void DrawRectangles(vRect* rectList){};
// Misc
virtual int GetPhysHeight() VCONST { return 0; }
virtual int GetPhysWidth() VCONST { return 0; }
virtual void SetBackground(VCONST vColor& color) {}
virtual void SetScale(int mult, int div) {}
virtual void GetScale(int& m, int& d) VCONST { m = 1; d = 1; }
void SetTranslate(int x, int y) { }
void SetTransX(int x) {}
void SetTransY(int y) {}
void GetTranslate(int& x, int& y) VCONST {x = 0; y = 0;}
int GetTransX() VCONST { return 0; }
int GetTransY() VCONST { return 0; }
virtual void SetFont(VCONST vFont& vf) {}
virtual vFont GetFont() VCONST { return _vf; }
virtual void SetPen(VCONST vPen& /*pen*/) {}
virtual vPen GetPen() VCONST { return _vp; }
virtual void SetBrush(VCONST vBrush& brush) {};
virtual vBrush GetBrush() VCONST { return _vb; }
virtual int TextHeight(int& asc, int& des) VCONST {asc = des = 0; return 0;}
virtual int TextWidth(VCONST char* str) VCONST {return 0;}
private:
vFont _vf;
vBrush _vb;
vPen _vp;
};
#endif

View File

@ -1,37 +0,0 @@
//===============================================================
// vos. - the OS interface object
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VOS_H
#define VOS_H
#include <v/v_defs.h>
class V_EXPORT vOS
{
public:
vOS();
~vOS();
int vChDrive(int drive);
int vGetEnvVal(char* name, char* val, int maxlen=255);
int vGetUserName( char* s, int len);
void vGetHostName(char* s, int len);
long vGetPid();
int vGetCWD(char* buf, int len);
int vChDir(const char* path);
int vDeleteFile(const char* filename);
int vRenameFile(const char* oldFilename, const char* newFilename);
void vSleep(long MSec);
int vRunProcess(const char* cmd, const char* StdOut = 0,
const char* StdErr = 0, const int Wait = 0, const int minimize = 0);
};
#endif

View File

@ -1,69 +0,0 @@
//===============================================================
// vpane.h - Base class for window panes - Windows
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VPANE_H
#define VPANE_H
// panes will be canvases, menus, and command bars
#include <v/v_defs.h> // basic definitons
// This is a small class, and everything is inline here
// in the .h file.
class V_EXPORT vWindow; // all panes are part-of a vWindow
class V_EXPORT vPane
{
friend class V_EXPORT vWindow;
friend class V_EXPORT vCmdWindow;
public: //---------------------------------------- public
vPane(PaneType pt)
{
SysDebug1(Constructor,"vPane::vPane(type: %d) constructor\n",pt)
_paneType = pt;
}
virtual ~vPane()
{
SysDebug(Destructor,"vPane::~vPane() destructor\n")
}
virtual void initialize(vWindow* pw, HWND bw)
{_parentWin = pw; _baseW = (HWND)bw; }
// define these to interface with specific Pane's setters
virtual int GetPaneValue(ItemVal /* id */, int& /* v */) VCONST {return 0;}
virtual int GetPaneTextIn(ItemVal /* id */, char* /* v */, int /*max*/) VCONST {return 0;}
virtual void SetPaneValue(ItemVal /* id */, int /* v */, ItemSetType /* st */) {}
virtual void SetPaneString(ItemVal /*id */, VCONST char* /* s */) {}
virtual void ShowPane(int /* OnOrOff */) VCONST {}
virtual vWindow* GetPaneParent() {return _parentWin; }
protected: //--------------------------------------- protected
vWindow* _parentWin; // parent window of this object
HWND _baseW; // base widget used for this pane
PaneType _paneType; // type of this pane
private: //--------------------------------------- private
};
#endif

View File

@ -1,67 +0,0 @@
//===============================================================
// vpen.h: pen class header for drawing - Windows
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VPEN_H
#define VPEN_H
#include <v/v_defs.h> // Basic defs
#include <v/vcolor.h>
// Use Windows for line styles, map to something reasonable for X
// Windows:
//enum PenStyle { Solid = PS_SOLID, Dash = PS_DASH, Dot = PS_DOT,
// DashDot = PS_DASHDOT, Transparent = PS_NULL };
class V_EXPORT vPen
{
public: //---------------------------------------- public
vPen(unsigned int r = 0, unsigned int g = 0, unsigned int b = 0,
int width = 1, int style = vSolid);
vPen(const vPen &pen); // copy constructor
~vPen();
vPen& operator =(const vPen& s); // vPen = vPen
int operator ==(const vPen& p2) VCONST
{ return (penColor == p2.penColor && penWidth == p2.penWidth &&
penStyle == p2.penStyle); }
int operator !=(const vPen& p2) VCONST
{ return (penColor != p2.penColor || penWidth != p2.penWidth ||
penStyle != p2.penStyle); }
void SetStyle(int style);
int GetStyle() VCONST { return penStyle; }
void SetWidth(int width);
int GetWidth() VCONST { return penWidth; }
void SetColor(const vColor& c);
void SetColor(unsigned int r, unsigned int g, unsigned int b);
vColor GetColor() VCONST { return penColor; }
HPEN GetHPEN() VCONST ;
protected: //--------------------------------------- protected
private: //--------------------------------------- private
void ReleaseHpen()
{ if (_created) {_created = 0; ::DeleteObject(_hpen); _hpen = 0;}}
vColor penColor;
int penWidth;
int penStyle;
VMUTABLE HPEN _hpen;
VMUTABLE int _created;
};
#endif

View File

@ -1,97 +0,0 @@
//===============================================================
// vmenu.h - vmenu class definitions - Windows
//
// Copyright (C) 1995-1999 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VPOPMENU_H
#define VPOPMENU_H
#include <v/v_defs.h>
// The _menuButton array will point to static arrays of menus.
// The user will allocate these, e.g.:
//
// vMenu EditMenu[] =
// {
// {"Item 1", MENU_1, isSens, notChk, noKeyLbl, noKey, noSub},
// {"Item 2", MENU_2, isSens, notChk, noKeyLbl, noKey, noSub},
// {NULL}
// };
//
// and to define the menu bar
//
// vMenu myMenu[] =
// {
// {"Edit", M_File, isSens, notChk, noKeyLbl, noKey, &EditMenu[0]},
// {NULL}
// };
//
// the _menuButton will be done dynamically. The call back
// will pass the value of an item to a given window.
typedef struct PMenuInfo // Implementation dependent stuff
{
int ItemIndex;
int SubMenuIndex;
PMenuInfo* NxtInfo;
} PMenuInfo;
typedef struct PMenuButton
{
VCONST char* label; // Label for button
vMenu* SubMenu; // the menu items associated with this button
PMenuInfo* mInfo; // dynamically allocated info list
// System dependent handles
HMENU hPullDown; // handle for the pulldown
} PMenuButton;
static const int MAX_PMENU_BUTTONS = 20; // Up to 20 menu buttons + submenus
// per window
class V_EXPORT vWindow;
class V_EXPORT vPopupMenu
{
public: //---------------------------------------- public
// the constructors
vPopupMenu(VCONST vMenu* menu, VCONST vWindow* pWin);
vPopupMenu(const vPopupMenu& m); // Copy constructor
virtual ~vPopupMenu(); // Destructor
// non-virtual methods
void ShowMenu(int x, int y);
int isImplemented() { return 1; }
int GetValue(ItemVal id) VCONST;
void SetValue(ItemVal id, int val, ItemSetType setType);
void SetString(ItemVal id, VCONST char* str); // set menu item label
protected: //--------------------------------------- protected
private: //--------------------------------------- private
// data
vWindow* _pWin;
int _nextMenuButton;
int _nextSubMenu;
PMenuButton _mb[MAX_PMENU_BUTTONS]; // Up to 10 menu items per window
HMENU _topLevelMenu;
// methods
void initialize();
void fixLabel(VCONST char* lbl, VCONST char* key) VCONST;
void doAddMenu(int id, HMENU parent); // build the menu
};
#endif

View File

@ -1,28 +0,0 @@
//===============================================================
// vpsdc.h: Print DC class .h file - X11R5
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VPRINTDC_H
#define VPRINTDC_H
#include <v/vwinprdc.h>
// This is a simple renamimg of the NullDC
class /* V_EXPORT */ vPrintDC : public vWinPrinterDC
{
public: //---------------------------------------- public
vPrintDC(int scale = 0) : vWinPrinterDC(scale) {}
virtual ~vPrintDC() {}
};
#endif

View File

@ -1,31 +0,0 @@
//===============================================================
// vprinter.h: Printer class .h file
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VPRINTER_H
#define VPRINTER_H
#include <v/vwinprtr.h>
// For Windows version, this is a simple renaming of vWinPrinter
class V_EXPORT vPrinter : public vWinPrinter
{
public: //---------------------------------------- public
vPrinter() {}
virtual ~vPrinter() {}
protected: //--------------------------------------- protected
private: //--------------------------------------- private
};
#endif

View File

@ -1,51 +0,0 @@
//===============================================================
// vprogrsc.h - List Command class - Windows
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VPROGRESSC_H
#define VPROGRESSC_H
#include <v/vcmd.h> // We are derived from vcmd
class V_EXPORT vCmdParent;
class V_EXPORT vProgressCmd : public vCmd
{
public: //---------------------------------------- public
vProgressCmd(vCmdParent* dp, CommandObject* co);
virtual ~vProgressCmd();
virtual void initialize();
virtual int GetCmdValue(ItemVal id) VCONST;
virtual void SetCmdVal(ItemVal val, ItemSetType st);
virtual int MEASUREITEM(int id, MEASUREITEMSTRUCT* mis);
virtual int DRAWITEM(int id, DRAWITEMSTRUCT* dis);
protected: //--------------------------------------- protected
private: //--------------------------------------- private
HWND _wLabel; // For a label
int _minVal;
int _maxVal;
int _curVal; // current value
int _isVert;
};
#endif

View File

@ -1,51 +0,0 @@
//===============================================================
// vradioc.h - Radio Button Command class - Windows
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VRADIOC_H
#define VRADIOC_H
#include <v/vcmd.h> // We are derived from vcmd
class V_EXPORT vCmdParent;
class V_EXPORT vRadioButtonCmd : public vCmd
{
public: //---------------------------------------- public
vRadioButtonCmd(vCmdParent* dp, CommandObject* co);
vRadioButtonCmd(const vRadioButtonCmd&); // Copy constructor
virtual ~vRadioButtonCmd();
virtual void initialize(void);
virtual void ResetItemValue(void);
virtual int GetCmdValue(ItemVal id) VCONST;
virtual void SetCmdVal(ItemVal val, ItemSetType st);
virtual void SetCmdStr(VCONST char* str);
protected: //--------------------------------------- protected
virtual void CmdCallback(int id, WORD codeNotify);
private: //--------------------------------------- private
static vRadioButtonCmd* _RBList; // list of all radio buttons
vRadioButtonCmd* _nextRB; // ptr to next rb
int _copied; // For copy constructor
HWND _wLabel; // Widget for button label
};
#endif

View File

@ -1,44 +0,0 @@
//===============================================================
// vrepldlg.h - find/replace modal dialog
//
// Copyright (C) 1995-1999 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef vReplDlg_H
#define vReplDlg_H
#include <v/vmodald.h>
#ifndef V_EXPORT
#define V_EXPORT
#endif
class V_EXPORT vApp;
class V_EXPORT vReplaceDialog : protected vModalDialog
{
public: //---------------------------------------- public
vReplaceDialog(vBaseWindow* bw, VCONST char* title = "Find/Replace") :
vModalDialog(bw, title)
{ added = 0;}
vReplaceDialog(vApp *aw, VCONST char* title = "Find/Replace") :
vModalDialog(aw, title)
{ added = 0;}
~vReplaceDialog() {}
int AskReplacePat(char* findpat, const int maxlen,
char* replpat, const int maxrlen,
int& caseSens, int& Down,
int& Wrap, int& Prompt, int& All);
protected: //--------------------------------------- protected
private: //--------------------------------------- private
int added;
virtual void DialogCommand(ItemVal id, ItemVal val, CmdType ctype);
};
#endif

View File

@ -1,39 +0,0 @@
//===============================================================
// vreply.h - reply modal dialog - Windows
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VREPLY_H
#define VREPLY_H
#include <v/vmodald.h>
class V_EXPORT vApp;
class V_EXPORT vReplyDialog : protected vModalDialog
{
public: //---------------------------------------- public
vReplyDialog(vBaseWindow* bw, VCONST char* title = "Reply") :
vModalDialog(bw, title) { added = 0;}
vReplyDialog(vApp* aw, VCONST char* title = "Reply") :
vModalDialog(aw, title) {added = 0;}
~vReplyDialog() {}
int Reply(VCONST char* msg, char* reply, int maxlen,
VCONST char* dflt = "");
protected: //--------------------------------------- protected
private: //--------------------------------------- private
virtual void DialogCommand(ItemVal id, ItemVal val, CmdType ctype);
int added;
virtual void DialogDisplayed(); // TEH Dec97
};
#endif

View File

@ -1,46 +0,0 @@
//===============================================================
// vslider.h - List Command class - Windows
//
// Copyright (C) 1995-1998 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VSLIDERC_H
#define VSLIDERC_H
#include <v/vcmd.h> // We are derived from vcmd
class V_EXPORT vCmdParent;
class V_EXPORT vSliderCmd : public vCmd
{
public: //---------------------------------------- public
vSliderCmd(vCmdParent* dp, CommandObject* co);
virtual ~vSliderCmd();
virtual void initialize();
virtual int GetCmdValue(ItemVal id) VCONST;
virtual void SetCmdVal(ItemVal val, ItemSetType st);
protected: //--------------------------------------- protected
private: //--------------------------------------- private
int _curVal; // current value
int _minVal; // Can scale to min and val
int _maxVal;
virtual void CmdCallback(int id, WORD codeNotify);
};
#endif

View File

@ -1,44 +0,0 @@
//===============================================================
// vslist.h - The vSList class - Windows
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VSLIST_H
#define VSLIST_H
// define V_EXPORT for X version
#ifndef V_EXPORT
#define V_EXPORT
#endif
class V_EXPORT vSList
{
public: //---------------------------------------- public
vSList(int maxsize = 128);
~vSList();
// vSList& operator =(const vSList& slist);
void init();
void erase();
int size() const;
int insert(int insAt, const char* strn) const;
int replace(int repAt, const char* strn) const;
int deleteItem(int delAt) const;
int max;
char** list;
protected: //--------------------------------------- protected
private: //--------------------------------------- private
};
#endif

View File

@ -1,54 +0,0 @@
//===============================================================
// vspinc.h - spinner- Windows
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VSPINC_H
#define VSPINC_H
#include <v/vcmd.h> // We are derived from vcmd
class V_EXPORT vCmdParent;
class V_EXPORT vSpinnerCmd : public vCmd
{
public: //---------------------------------------- public
vSpinnerCmd(vCmdParent* dp, CommandObject* co);
virtual ~vSpinnerCmd();
virtual void initialize(void);
virtual int GetCmdValue(ItemVal id) VCONST;
virtual void SetCmdVal(ItemVal val, ItemSetType st);
protected: //--------------------------------------- protected
private: //--------------------------------------- private
char** _fullList; // alias pointer to full list
int _maxWidth; // max width of any item
int _numItems; // number of items on list
int _maxVal;
int _minVal;
int _step;
int _curSelection; // index of current selected item
int _TextList;
int _textId; // my text id
static int _textIdPool; // For text portion of spinner
void SetupList(void);
virtual void CmdCallback(int id, WORD codeNotify);
};
#endif

View File

@ -1,17 +0,0 @@
//===============================================================
// vstatusp.h - Status Bar class .h file - Windows
//
// Copyright (C) 1995 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VSTATUSP_H
#define VSTATUSP_H
#include <v/vcmdpane.h>
#endif

View File

@ -1,39 +0,0 @@
//===============================================================
// vtextc.h - Text Output Command Class - Windows
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VTEXTC_H
#define VTEXTC_H
#include <v/vcmd.h> // We are derived from vcmd
class V_EXPORT vCmdParent;
class V_EXPORT vTextCmd : public vCmd
{
public: //---------------------------------------- public
vTextCmd(vCmdParent* dp, CommandObject* co);
virtual ~vTextCmd();
virtual void initialize(void);
virtual void SetCmdVal(ItemVal val, ItemSetType st);
virtual void SetCmdStr(VCONST char* str);
protected: //--------------------------------------- protected
private: //--------------------------------------- private
};
#endif

View File

@ -1,150 +0,0 @@
//===============================================================
// vtextcnv.h - vTextCanvasPane class - Windows
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VTEXTCNV_H
#define VTEXTCNV_H
const int MAX_ROWS = 100;
const int MAX_COLS = 400;
const int MARGIN = 2;
#define ScrChar(r,c) ((screen+(r*colsAllocated)+c)->chr)
#define ScrAttr(r,c) ((screen+(r*colsAllocated)+c)->attr)
#define ScrAddr(r,c) (screen+(r*colsAllocated)+c)
#include <v/vcanvas.h>
class V_EXPORT vTextCanvasPane : public vCanvasPane
{
friend class V_EXPORT vWindow;
public: //---------------------------------------- public
vTextCanvasPane();
vTextCanvasPane(const vTextCanvasPane& t);
virtual ~vTextCanvasPane();
// Window management/drawing
virtual void Clear(void); // Clear text canvas window
virtual void ClearRow(const int r, const int c); // Clear row of text
virtual void ClearToEnd(const int r, const int c); // Clr to end of screen
int GetCols() VCONST { return maxCols; }
int GetRows() VCONST { return maxRows; }
void GetRC(int& r, int& c) VCONST { r = curRow; c = curCol; }
void GotoRC(const int r, const int c);
virtual void DrawAttrText(const char* text, const ChrAttr attr);
virtual void DrawAttrsText(const char* text, const ChrAttr* attr);
virtual void DrawChar(const char chr, const ChrAttr attr);
void DrawText(const char* text);
virtual void DrawAttrText(int x, int y, char* text, const ChrAttr attr)
{ vCanvasPane::DrawAttrText(x, y, text, attr); }
virtual void DrawText(int x, int y, char* text)
{ vCanvasPane::DrawText(x, y, text); }
void HideTextCursor(void) {DrawTextCursor(-1,-1);}
void ShowTextCursor(void) {DrawTextCursor(curRow,curCol);}
void SetTextRowsCols(int rows, int cols);
// Scrolling
void ScrollText(const int lineCount);
// Events
virtual void FontChanged(VCONST vFont& newfont);
virtual void ResizeText(const int rows, const int cols);
virtual void Redraw(int x, int y, int width , int height);
virtual void Resize(int w, int h); // Resize event
virtual void TextMouseDown(int row, int col, int button)
{
SysDebug3(MouseEvents,"TextMouseDown(r:%d,c:%d,btn:%d)\n",row,col,button);
};
virtual void TextMouseUp(int row, int col, int button)
{
SysDebug3(MouseEvents,"TextMouseUp(r:%d,c:%d,btn:%d)\n",row,col,button);
};
virtual void TextMouseMove(int row, int col, int button)
{
SysDebug3(MouseEvents,"TextMouseMove(r:%d,c:%d,btn:%d)\n",row,col,button);
};
virtual void initialize(vWindow* pWindow, HWND pWidget);
int ColToX(int c) // convert col to X coord
{
return (c*cWidth) + textMargin;
}
int RowToY(int r) // convert row to Y coord
{
return (r*cHeight) +cHeight + textMargin;
}
int getMargin() { return textMargin;}
void setMargin(int marg) { textMargin = marg;}
protected: //--------------------------------------- protected
virtual void EnterEV(void);
virtual void LeaveEV(void);
int cHeight; // height of a character
int cAscent; // Ascent of a character
int cDescent; // Descent of a character
int cWidth; // width of a chacter
int maxRows; // # rows that can be displayed
int maxCols; // # columns that can be displayed
int curRow; // Current row
int curCol; // Current col
int caretOn;
int rowsAllocated; // how many rows and columns
int colsAllocated; // actually allocated to
dChar* screen; // array of pointers to dChar rows
// make these protected now
virtual void MouseDown(int x, int y, int button);
virtual void MouseUp(int x, int y, int button);
virtual void MouseMove(int x, int y, int button);
virtual void ResizeText(void);
private: //--------------------------------------- private
int textMargin; // left margin for text
int _cursorSet;
void ClearRowDisplay(const int r, const int c); // Clear screen only
void DoDrawText(const char* text, const ChrAttr attr);
void DrawTextScr(int r, int c, dChar* txt);
void DrawTextCursor(int r, int c);
int YToRow(int y);
int XToCol(int x);
};
#endif

View File

@ -1,471 +0,0 @@
//===============================================================
// vtexted.h - vTextEditor class definitions - based on vTextCanvas
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VTEXTED_H
#define VTEXTED_H
#include <v/vtextcnv.h>
// for X version
#ifndef V_EXPORT
#define V_EXPORT
#endif
class V_EXPORT vCmdWindow;
class V_EXPORT vTextEdCmdInterp;
// These values may be used a the id paramater of the
// EditCommand method, which will then carry out the
// specfied command. The val parameter is used to
// pass a count when necessary, and can usually be
// a positive or negative value. Thus edCharRight with
// a positive val moves right; with a negative val, left.
enum // editor commands
{
edBalMatch = 10000, // find matching paren (if > 1, up to val lines away)
edBufferBottom, // move to bottom of file (no val)
edCenterScreen, // center cursor in display window
edCharDelete, // delete +/- val chars
edCharFoldCase, // swap case of +/- val letters
edCharInsert, // insert char val
edCharRight, // move +/- val chars right
edCut, // Cut
edCopy, // Copy
edPaste, // Paste
edFill, // fill current line
edFind, // invoke TextEd's find dialog (no val)
edFindNext, // find next occurrence of prev (no val)
edHelp, // show help screen
edIndent, // autoindent if on
edLineBeginning, // move to line beginning (no val)
edLineDown, // move down +/- val lines in column
edLineDownBeg, // move down +/- val lines
edLineDelete, // delete +/- val lines
edLineDeleteFront, // delete to beginning of line (no val)
edLineDeleteToEnd, // delete to end of line (no val)
edLineEnd, // move to end of line (no val)
edLineGoto, // move cursor to line val
edLineOpen, // open val new blank lines
edFormatC, // format a C Line
edNoteLocation, // note which line we are on
edNoteGoto, // goto noted locateion
edScrollDown, // scroll val lines without changing cursor
edReplace, // Find/Replace
edUndo, // UnDo the last edit
edUnDoMove, // UnDo the last move
edVerify, // force repaint of screen (no val)
edWordRight, // move cursor +/- val words right
edNoOp
};
enum FileType
{
Text,
CPP,
HTML,
Java,
TeX,
gccError,
bccError,
javaError,
Perl,
Fortran,
Lisp,
XML,
Python,
Tcl,
Makefile,
Shellscript
};
enum ReplaceConfirm
{
YesRepl = 800, // Replace this instance
YesReplNext, // Replace, go to next
NoRepl, // Don't replace
NoReplNext, // Don't replace, goto next
QuitR, // Quit replacing
RepAll // Quit confirming, replace all
};
const int MAX_LINE = 500; // Max line length we will handle
const int MAX_UNDO = 4094;
typedef char* BUFFPTR;
typedef struct MARK_RANGE
{
long beg_lin; /* first line of marked range */
long end_lin; /* last line of marked range */
int beg_col; /* col where first line begins */
int end_col; /* col where last line ends */
BUFFPTR beg_chr; /* first chr */
BUFFPTR end_chr;
} MARK_RANGE;
typedef struct edState
{
long changes; // count of changes
FileType ftype; // what kind of file type
int
autoIndent, // autoindent flag
counter, // counter for + insert
echof, // whether or not to echo action
ins_mode, // true if insert mode
delOnInsert, // true if delete selection on insert
readOnly; // true if read only
} edState;
typedef struct globalState
{
int
findAtBeginning, // leave find at beginning of pattern
fixed_scroll, // flag if using fixed scroll
delOnInsert, // true if delete selection on insert
tabspc, // tab spacing
wraplm, // right limit
braceIndent; // indenting for {}'s
} globalState;
#include <v/vmodald.h>
class V_EXPORT vTEConfirm : protected vModalDialog
{
public:
vTEConfirm(VCONST vCmdWindow *bw, VCONST char* title = "Replace?"):
vModalDialog((vBaseWindow*)bw,title) {added = 0;}
~vTEConfirm() {}
int ConfirmRep();
protected:
static DialogCmd ConfirmCmds[];
private:
virtual void DialogCommand(ItemVal id, ItemVal val,
CmdType ctype);
int added;
};
class V_EXPORT vTextEditor : public vTextCanvasPane // The main way to deal with a file
{
public: //---------------------------------------- public
vTextEditor(VCONST vCmdWindow* parent);
~vTextEditor(); // Destructor
virtual void resetBuff(); // open the buffer
virtual int addLine(char* line); // add a line to end of buffer
virtual int getFirstLine(char* line, int maxChars); // first line in buffer
virtual int getNextLine(char* line, int maxChars); // next line in buffer, -1 = END
virtual int getLine(char* line, int maxChars, long lineNum); // retrieve given line
virtual void displayBuff(long lineNum = 1, int paintIt = 1);
// finished with buffer
virtual int insertLine(char* line, long before, bool doUndo = true);
virtual void adjustLines(long line_1, int by);
// Editor command interpreter
virtual int EditCommand(int id, long val);
virtual int EditKeyIn(vKey key, unsigned int shift);
void ChangeCmdInterp(vTextEdCmdInterp* newCI);
vTextEdCmdInterp* GetCmdInterp() VCONST { return _teCInt; }
// State Notification
virtual void ChangeLoc(long line, int col) {} // just state change
virtual void ChangeInsMode(int IsInsMode, char* msg = 0) {}
virtual void StatusMessage(char *msg) {}
virtual void ErrorMsg(char *str) {};
globalState GetGlobalState() VCONST { return gState; }
void SetGlobalState(globalState setGState) { gState = setGState; }
edState GetEdState() VCONST { return state; }
void SetEdState(edState setState) { state = setState; }
void SetRdOnly(int ro) {state.readOnly = ro;}
void SetInsMode(int ins) {state.ins_mode = ins;}
void SetEchoF(int e) {state.echof = e;}
void SetAutoIndent(int ai) {state.autoIndent = ai;}
FileType GetFileType() VCONST { return state.ftype; }
void SetFileType(FileType ft) {state.ftype = ft; }
long JLine() VCONST {return b_lastln; }
void SetJLine(long j) {b_lastln = j;}
void SetFindPat(char* newpat)
{if (strlen(newpat) < MAX_LINE) strcpy(theFindPat,newpat); }
char* GetFindPat() VCONST { return theFindPat; }
long GetLines() VCONST { return lastLine; }
long GetCurLine() VCONST { return curlin; }
int getColPos() {return col_pos(curchr);}
int OldLen() VCONST { return oldlen; }
void SetOldLen(int val) {oldlen = val; }
int Changed() VCONST { return state.changes > 0; }
void IncChanges() { ++state.changes; };
void Verify(void); // repaint screen
// ******* Methods used by command interpreters ************
// Character oriented methods
int charDelete(long cnt, bool doUndo = true,
bool removeRange = true); // delete next cnt chars
int charFoldCase(long cnt); // swap case of letter
int charInsert(int ival, bool doUndo = true); // forced insert
int charRight(long cnt, int clear_mark = 1); // move char right
// line oriented methods
void lineAutoFill(void); // automatic filling
void lineBeginning(); // move to line beginning
int lineDown(long cnt, int clrRange = 1);// move down cnt lines
int lineDownBeg(long cnt, int notify = 1,
int clrRange = 1); // move down cnt lines
void lineDelete(long cnt, bool doUndo = true); // delete cnt lines
int lineDeleteFront(bool doUndo = true); // delete to beginning of line
int lineDeleteToEnd(bool doUndo = true); // delete to end of line
void lineEnd(int clrRange = 1); // move to end of line
int lineFill(long count); // fill count lines
int lineGoto(long cnt); // move cursor to line cnt
int lineOpen(long cnt); // open new blank line
int formatC(long count);
// misc
int autoIndent();
int BalMatch(long val); // find matching paren
void CenterScreen();
int wordRight(long cnt);
void scrollDown(long delta);
int getSelection(char* sel, int max);
void setSelection(int howmuch);
int EditCut();
int EditCopy();
int EditPaste();
int Find(char* pat, int caseSensitive = 0, int Down = 1, int Wrap = 0);
int FindNext(int caseSensitive = 0, int Down = 1, int Wrap = 0);
int Replace(const char* pat, const char* repl, int caseSensitive = 0,
int Down = 1, int Wrap = 0, int Confirm = 0, int replaceAll = 0);
int undoEdit(void);
void bufferBottom(void); // move to bottom of file
void newscr(void);
void ClearMarkRange(void);
int RemoveMarkRange(bool doUndo = true);
int insertToRange(char* atFront, char* atEnd);
void addToRange(long rows, long cols); // add to mark range
void highLightCurLine();
virtual int defaultKeyIn(vKey key, unsigned int shift);
virtual void TextMouseDown(int row, int col, int button);
virtual void TextMouseUp(int row, int col, int button);
virtual void TextMouseMove(int row, int col, int button);
int mint(int v1, int v2);
int maxt(int v1, int v2);
long minl(long v1,long v2);
long maxl(long v1, long v2);
int clower(int ch);
int cupper(int ch);
protected: //--------------------------------------- protected
virtual void initBuff(); // create buffers
virtual BUFFPTR GLine(long lineNum);
virtual int GCh(BUFFPTR charNum) VCONST { return *(charNum); }
virtual BUFFPTR deleteCharBF(BUFFPTR charNum, long lineNum);
virtual long deleteLinesBF(long start, long end);
virtual int insertCharBF(int chr, BUFFPTR& curchr, long& curlin);
virtual int lineLenBF(long lineNum);
virtual long lastLineBF() VCONST { return _nextLine - 1; } // last line in buff
// Scrolling
virtual void HPage(int, int);
virtual void VPage(int, int);
virtual void HScroll(int);
virtual void VScroll(int);
// Events
virtual void FontChanged(VCONST vFont& newFont);
virtual void ResizeText(const int rows, const int cols);
virtual void Redraw(int x, int y, int width , int height);
// utilities for formatC
int has_key(char *buff_ptr, char *key);
int is_key_word(char *bf, int case_def);
long get_prev(char *prev_buff, long start);
// misc methods
int SelectionLen(); // get len of marked range
void AddToRangeRow(long cnt); // add to mark range
void AddToRangeCol(int col); // add to mark range
int CopySelection(char* buff, int max, int unmark);
void setHighlight(ChrAttr hl) {_highlighter = hl;}
ChrAttr getHighlight() {return _highlighter;}
virtual void paintLine(char* linout, int lineStart,
int hiStart, int hiLast, long lineNum);
vCmdWindow* _parent;
edState state; // state stuff for outside
static globalState gState;
static int findCaseSensitive;
static char theFindPat[MAX_LINE + 2]; // one static find pattern
static char theReplPat[MAX_LINE + 2]; // one static repl pattern
static int findDown;
static int findWrap;
static int replaceConfirm;
static int replaceAll;
private: //--------------------------------------- private
int IsEndLine(int chr) VCONST { return (chr == '\n' || chr == '\r'); }
void tvhdln(void);
void setScrollBar();
void checkIfScrolled();
void FindDispLine(long& ibeg, int& cnt);
int CombineLines(void);
int findX(void);
int line_can_fit(long l);
int Fill1(int dir, int val);
void range(long cnt,long *lbeg, long *lend);
void updateScroll(long change);
void updateNoScroll(long change);
void getCurLineFront(char* buff, long start);
bool isSpecial(char* curline);
BUFFPTR lastBX(long line);
void newScrollScreen(long ibeg);
bool SaveKillLine(long cnt, bool partialLine = false);
void tvtyln(long lineNum,BUFFPTR chrptr, int whole_line);
int IsWordChar(int chr);
void update(long change);
void MouseMoveTo(int row, int col);
int reallocLines();
void retypeCurlin(int eraseLine=0);
void undoOn(const char* msg);
void undoOff(const char* msg);
// Screen manip
void tvxy(int ix, int iy);
void tvplin(long lineNum, BUFFPTR chrptr, int whole_line, int hibeg, int hiend);
void type_lines(long ibeg, int icnt, int wholeLine = 0);
void tvbotb(int n);
void tvclr(void);
void tvelin(void);
void tvescr(void);
void tvtopb(int n);
// Utils
int col_pos(BUFFPTR chr_pos, int do_shift = 0 );
BUFFPTR appendToBuff(char* line);
// Operating state - type of scrolling, etc.
// variables -------------------------------------------
int
ddline, // default display line
dsplin, // the default display line
last_col_out, // last column output
leftmg, // left margin of display
linptr, // used to build output lines
mouseCol, // where mouse is (on down)
mouseRow,
mouseMoveCol,
mouseMoveRow,
oldcol, // beginning column for dwncol
oldlen, // length for '=' command
setCursor, // if need to reset cursor after resize
tvdlin, // the "active" display line
tvx, // current x cursor position
tvy, // current y cursor position
use_wild, // use wild cards in match
wasColCmd, // if last command was a column
xoutcm; // used for 240 col virtual screen
long
b_lastln, // last line for JUMP
curlin, // pointer to current line
noteloc[26], // note locations 0-25 (or a-z)
lastLine, // last line in file
scroll_lin; // for scrolling commands
BUFFPTR
curchr, // pointer to current character
scroll_chr; // for scroll commands
MARK_RANGE mark; // marked portion of this
BUFFPTR* _lines;
long _nextLine; // index into line array
long _curLineBF; // current line for getXLine
long _maxLines; // size of line array
ChrAttr _highlighter;
// UnDo stuff
char* undoBuff; // one line of unkill
int undoCurcol; // column of current character
long undoCurlin;
bool undoPartialLine; // if a partial line saved
bool undoKillLast;
// objects used by editor
vTextEdCmdInterp* _teCInt;
vTEConfirm* myConfirm;
};
class V_EXPORT vTextEdCmdInterp // easy class to override
{
public:
vTextEdCmdInterp(VCONST vTextEditor* textEd, VCONST vCmdWindow* cw);
virtual ~vTextEdCmdInterp();
virtual int ProcessKey(vKey key, unsigned int shift);
virtual vTextEditor* te() VCONST { return _textEd; }
virtual vCmdWindow* cmdWin() VCONST { return _myCmdWindow; }
virtual void InitCmdInterp();
virtual void CmdInterpHelp();
virtual void MouseJump(int row, int col) { /* no-op by default */ }
protected:
long cmdCount; // how many times to repeat command
int
countWait, // if building a count
metaChar, // the meta char for commands
metaWait; // if waiting on a meta command
private:
vTextEditor* _textEd;
vCmdWindow* _myCmdWindow;
};
#endif
/* ************************************************************************ */

View File

@ -1,46 +0,0 @@
//===============================================================
// vtextinc.h - Button Command class - Windows
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VTEXTIN_H
#define VTEXTIN_H
#include <v/vcmd.h> // We are derived from vcmd
class V_EXPORT vCmdParent;
class V_EXPORT vTextInCmd : public vCmd
{
public: //---------------------------------------- public
vTextInCmd(vCmdParent* dp, CommandObject* co);
virtual ~vTextInCmd();
virtual void initialize(void);
int GetTextIn(ItemVal id, char* str, int maxlen) VCONST; // to get the text back
virtual void SetCmdVal(ItemVal val, ItemSetType st);
virtual void SetCmdStr(VCONST char* str);
virtual void CmdCallback(int id, WORD codeNotify);
protected: //--------------------------------------- protected
private: //--------------------------------------- private
char _msg[132];
};
#endif

View File

@ -1,40 +0,0 @@
//===============================================================
// vThislst.h - vTimer class functions - Windows
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VTHISLST_H
#define VTHISLST_H
#include <v/v_defs.h>
typedef unsigned long ThisId;
typedef struct thisList
{
ThisId id;
void* thisPtr;
thisList* next;
} thisList;
class V_EXPORT vThisList
{
public: //---------------------------------------- public
vThisList();
~vThisList();
void Add(ThisId id, void* This);
void* GetThis(ThisId id) VCONST;
void Delete(ThisId id);
void* GetFirstThis() VCONST;
void* GetNextThis() VCONST;
protected: //--------------------------------------- protected
private: //--------------------------------------- private
thisList* _list;
VMUTABLE thisList* _cur;
};
#endif

View File

@ -1,41 +0,0 @@
//===============================================================
// vtimer.h - a timer class - Windows
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VTIMER_H
#define VTIMER_H
#include <windows.h>
class V_EXPORT vTimer
{
friend void CALLBACK vTimerProc(HWND hwnd, UINT msg, UINT idTimer, DWORD dwTime);
public: //---------------------------------------- public
vTimer(); // constructor
virtual ~vTimer(); // destructor
virtual int TimerSet(long interval);
virtual void TimerStop(void);
virtual void TimerTick(void);
protected: //--------------------------------------- protected
private: //--------------------------------------- private
void tick(void); // internal tick routine
long _interval; // approx. how long in milliseconds between ticks
HWND _id;
};
#endif

View File

@ -1,26 +0,0 @@
//===============================================================
// vutil.h - V utility funcitons
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VUTIL_H
#define VUTIL_H
#include <v/v_defs.h>
extern V_EXPORT void LongToStr(long intg, char* str); // prototype
extern V_EXPORT void IntToStr(int intg, char* str);
extern V_EXPORT int vLblLen(const char *str);
extern V_EXPORT int vTextLen(const char *str, int& numLines);
extern V_EXPORT void vGetLocalTime(char* tm);
extern V_EXPORT void vGetLocalDate(char* tm);
extern V_EXPORT void ByteToStr(unsigned char byteval, char* str);
extern V_EXPORT long StrToLong(VCONST char* str);
extern V_EXPORT void vBeep();
extern V_EXPORT int vGetcmdIdIndex(ItemVal cmdId, CommandObject *cmdObj);
extern V_EXPORT int vGetMenuIdIndex(ItemVal cmdId, vMenu *cmdObj);
#endif

View File

@ -1,44 +0,0 @@
//===============================================================
// vwin32.h - Special defs for Win32 - Windows version
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VWIN32_H
#define VWIN32_H
#ifdef __WATCOMC__
#ifdef __I86__
#define NEED_VXCRACKERS
#endif
#endif
#ifndef GET_WM_COMMAND_ID
#define NEED_VXCRACKERS
#endif
#ifndef VWIN16
#define MoveTo(a,b,c) MoveToEx(a,b,c,0)
#define SetWindowExt(a,b,c) SetWindowExtEx(a,b,c,0)
#define SetViewportExt(a,b,c) SetViewportExtEx(a,b,c,0)
#else
#ifdef NEED_VXCRACKERS
// For some reason, Watcom doesn't define these in windowsx.h
// on the 16 bit version - they are there for 32 bit.
// Neither does VCC 1.52!
#define GET_WM_COMMAND_ID(wp, lp) (wp)
#define GET_WM_HSCROLL_CODE(wp, lp) (wp)
#define GET_WM_HSCROLL_POS(wp, lp) LOWORD(lp)
#define GET_WM_HSCROLL_HWND(wp, lp) (HWND)HIWORD(lp)
#define GET_WM_VSCROLL_CODE(wp, lp) (wp)
#define GET_WM_VSCROLL_POS(wp, lp) LOWORD(lp)
#define GET_WM_VSCROLL_HWND(wp, lp) (HWND)HIWORD(lp)
#define GET_WM_COMMAND_CMD(wp, lp) HIWORD(lp)
#endif
#endif
#endif

View File

@ -1,110 +0,0 @@
//===============================================================
// vwindc.h: vWinDC class .h file - Windows
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VWINDC_H
#define VWINDC_H
#include <v/vdc.h>
class V_EXPORT vIcon;
class V_EXPORT vColor;
class V_EXPORT vWinDC : public vDC
{
public: //---------------------------------------- public
vWinDC();
virtual ~vWinDC();
// Drawing
virtual void Clear(void){}
virtual void ClearRect(int left, int top, int width, int height){}
virtual void CopyFromMemoryDC(vMemoryDC* vmemdc, int destX, int destY,
int srcX = 0, int srcY = 0, int srcW = 0, int srcH = 0); // V:1.13
#ifdef DRAWARC
virtual void DrawArc(int xx1, int yy1, int xx2, int yy2, int xxc, int yyc);
#endif
virtual void DrawAttrText(int x, int y, VCONST char* text,
const ChrAttr attr);
virtual void DrawText(int x, int y, VCONST char* text);
virtual void DrawEllipse(int x, int y, int width, int height);
virtual void DrawIcon(int x, int y, VCONST vIcon& icon);
virtual void DrawLine(int x, int y, int xend , int yend);
virtual void DrawColorPoints(int x, int y, int nPoints, vColor* pointList);
virtual void DrawLines(vLine* lineList, int count);
virtual void DrawLines(vPoint* points, int n);
virtual void DrawPoints (vPoint* pointList, int count);
virtual void DrawRectangles(vRect* rectList,int count);
virtual void DrawPoint(int x, int y);
virtual void DrawPolygon(int n, vPoint points[], int fillStyle);
virtual void DrawRectangle(int x, int y, int width, int height);
virtual void DrawRoundedRectangle(int x, int y,
int width, int height, int radius);
virtual void DrawRubberLine(int x, int y, int xend, int yend);
virtual void DrawRubberEllipse(int x, int y, int width, int height);
virtual void DrawRubberPoint(int x, int y);
virtual void DrawRubberRectangle(int x, int y, int width, int height);
virtual void SetFont(VCONST vFont& vf){}
// Appearance
virtual void SetBackground(VCONST vColor& color){}
virtual void SetPen(VCONST vPen& pen);
virtual void SetBrush(VCONST vBrush& brush);
virtual int TextHeight(int& asc, int& des) VCONST;
virtual int TextWidth(VCONST char* str) VCONST;
virtual int BeginPrinting(){return 0;}
virtual void EndPrinting(){}
virtual void BeginPage(){}
virtual void EndPage(){}
virtual void SetPrinter(vPrinter& printer){}
protected: //--------------------------------------- protected
unsigned long _canvasFG; // the foreground color
unsigned long _canvasBG; // the background color
int _isPrinterDC;
// These methods are to be used only internally and are assumed to
// be used correctly - there is no error checking. The idea is to have
// the canvas use BeginPaint/EndPaint for Redraw, and the drawing
// rotuines to use GetHDC and ReleaseHDC.
virtual void GetHDC() VCONST {}
virtual void BeginPaint(){}
virtual void EndPaint(){}
virtual void ReleaseHDC() VCONST {}
virtual int Scale(int x) { return (_hasScale) ? ((x*_Mult)/_Div) : x; }
VMUTABLE HDC _hdc; // HDC to USE for draws
HDC _hdcPaint; // HDC set by begin paint
PAINTSTRUCT _ps; // paint struct used by begin paint
HPEN _hpen; // Handle for pen
HBRUSH _hbrush; // Handle for brush
private: //--------------------------------------- private
int _isWin32s;
};
#endif

View File

@ -1,124 +0,0 @@
//===============================================================
// vWindow.h - vWin class definitions - Windows
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VWINDOW_H
#define VWINDOW_H
#include <v/v_defs.h>
#include <v/vbasewin.h> // we are derived from vBaseWindow
#include <v/vapp.h> // we are a friend of the app class
#include <v/vcanvas.h> // need for SetWinCursor
//#include <v/vmenu.h> // so we can get to GetMenuThis
// We will allow a Button Bar and a Status Bar in Windows
class V_EXPORT vPane;
typedef struct PaneList
{
vPane* pane; // pointer to the pane object
PaneList *nextPL; // next pane
} PaneList;
class V_EXPORT vWindow : public vBaseWindow
{
friend class V_EXPORT vPane;
friend class V_EXPORT vMenuPane;
friend class V_EXPORT vCanvasPane;
public: //---------------------------------------- public
vWindow(VCONST char *name = "+", int width = 0, int height = 0,
WindowType wintype = WINDOW); // Constructor
vWindow(const vWindow&); // Copy Constructor
virtual ~vWindow(); // Destructor
// Methods to Override
virtual void KeyIn(vKey keysym, unsigned int shift); // KeyIn method
virtual void MenuCommand(ItemVal id);
virtual void WindowCommand(ItemVal id, ItemVal retval, CmdType ctype);
virtual void WorkSlice(void) {}; // Work - default: no op
// Utility Methods
virtual void AddPane(vPane* add_pane); // add a pane to the window
int CreatedOK() { return _createdOK;}
virtual int GetValue(ItemVal id) VCONST;
virtual int GetTextIn(ItemVal id, char* val, int maxlen) VCONST;
virtual void RaiseWindow(void); // raise this window
virtual void SetValue(ItemVal id, int val, ItemSetType setType);
virtual void SetString(ItemVal id, VCONST char* str);
virtual void SetValueAll(ItemVal id, int val, ItemSetType setType);
virtual void SetStringAll(ItemVal id, VCONST char* str);
virtual void SetTitle(VCONST char* title);
void ShowPane(vPane* wpane, int OnOrOff) VCONST;
virtual void UpdateView(vWindow* sender, int hint, void* pHint);
virtual void GetPosition(int& left, int& top, int& right,
int& bottom) VCONST;
virtual void SetPosition(int left, int top);
// Other Methods
virtual void CloseWin(void); // callback for close button
// Internal Methods
long MdiWindowProc(HWND hWnd, UINT message,
WPARAM wParam, LPARAM lParam);
int getWinHeight() VCONST { return _WinHeight; }
int getWinWidth() VCONST { return _WinWidth; }
void setWinHeight(const int h) { _WinHeight = h; }
void setWinWidth(const int w) { _WinWidth = w; }
protected: //--------------------------------------- protected
int _WinHeight; // height of draw window
int _WinWidth; // width of draw window
private: //--------------------------------------- private
virtual void initialize(void);
void SetWinCursor(VCursor vcursor);
PaneList* _paneList; // panes for this window
vPane* _menuPane; // our menu pane
vCanvasPane* _canvasPane; // our one canvas pane
vWindow* _NextWin; // link to next window
void KeyInEV(unsigned int keycode, int map, int extended);
int _shiftKeyDown;
int _ctrlKeyDown;
int _createdOK;
HMENU _menuBar;
int _WindowMenuIndex; // number of the Windows menu
int _justActivated; // for mouse control
int _mouseDown; // to track mouse up/down
HCURSOR _cursor; // mouse cursor
static int _numWindows; // how many total windows are up
static vWindow* _WinList; // all windows
static HWND _curWin;
static HWND _prevWin;
};
#endif

View File

@ -1,56 +0,0 @@
//===============================================================
// vwinprdc.h: WinPrinterDC class .h file - Windows
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VWINPRDC_H
#define VWINPRDC_H
#include <v/vwindc.h>
#include <v/vprinter.h>
class V_EXPORT vWinPrinterDC : public vWinDC
{
public: //---------------------------------------- public
vWinPrinterDC(const int scalePrinting = 0);
virtual ~vWinPrinterDC();
// Drawing
virtual void SetBackground(VCONST vColor& color);
virtual void SetFont(VCONST vFont& vf);
virtual int BeginPrinting();
virtual void EndPrinting();
virtual void BeginPage();
virtual void EndPage();
virtual void SetPrinter(vPrinter& printer);
protected: //--------------------------------------- protected
// These methods are to be used only internally and are assumed to
// be used correctly - there is no error checking. The idea is to have
// the canvas use BeginPaint/EndPaint for Redraw, and the drawing
// rotuines to use GetHDC and ReleaseHDC.
virtual void GetHDC() VCONST { _hdc = _printer.GetHDC(); }
virtual void BeginPaint() {}
virtual void EndPaint() {}
virtual void ReleaseHDC() VCONST { }
int _scalePrinting;
private: //--------------------------------------- private
int _pages;
vPrinter _printer; // the printer
};
#endif

View File

@ -1,87 +0,0 @@
//===============================================================
// vwinprtr.h: Windows Printer class .h file - Windows
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VWINPRTR_H
#define VWINPRTR_H
#include <v/v_defs.h>
#include <v/vmodald.h>
#define vPaperLetter 0
#define vPaperLegal 1
#define vPaperTabloid 2
#define vPaperLedger 3
#define vPaperStatement 4
#define vPaperExecutive 5
#define vPaperA3 6
#define vPaperA4 7
#define vPaperA5 8
#define vPaperB4 9
#define vPaperB5 10
#define vPaperFolio 11
#define vPaperQuarto 12
#define vPaper10x14 13
#define vPaperDefault vPaperLetter // Index to default paper
class V_EXPORT vWinPrinter
{
public: //---------------------------------------- public
vWinPrinter();
virtual ~vWinPrinter();
vWinPrinter(const vWinPrinter& pr);
vWinPrinter& operator =(const vWinPrinter& pr);
int GetHeight() VCONST {return _height;}
int GetWidth() VCONST {return _width;}
VCONST char* GetDocName() VCONST {return _name;}
int GetPortrait() VCONST {return _portrait;}
void SetPortrait(int p) {_portrait = p;}
int GetUseColors() VCONST {return _useColor;}
void SetUseColors(int c) {_useColor = c;}
int GetPaper() VCONST {return _paperType;}
char* GetPaperName();
int GetCopies() VCONST {return _copies;}
void SetCopies(int s) {_copies = s;}
int GetToFile() VCONST {return _toFile;}
int Setup(VCONST char* fn = 0);
HDC GetHDC() VCONST { return _printhDC; }
protected: //--------------------------------------- protected
private: //--------------------------------------- private
static int _instances;
HDC _printhDC;
// Printer attributes
char* _name; // name of stream
int _width; // width of printer
int _height; // height of printer
int _portrait; // true if portrait, else landscape
int _useColor; // true if printer supports colors
int _paperType;
int _copies;
int _toFile;
};
#endif

View File

@ -1,39 +0,0 @@
//===============================================================
// vynreply.h - yes no dialog - Windows
//
// Copyright (C) 1995,1996 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VYNREPLY_H
#define VYNREPLY_H
#include <v/vmodald.h>
class V_EXPORT vApp;
class V_EXPORT vYNReplyDialog : protected vModalDialog
{
public: //---------------------------------------- public
vYNReplyDialog(VCONST vBaseWindow* bw, VCONST char* title = "Yes or No") :
vModalDialog(bw,title) {added = 0;}
vYNReplyDialog(VCONST vApp* aw, VCONST char* title = "Yes or No") :
vModalDialog(aw,title) { added = 0; }
~vYNReplyDialog() {}
int AskYN(VCONST char* msg);
protected: //--------------------------------------- protected
static CommandObject YNDialog[]; // dialog elements
private: //--------------------------------------- private
virtual void DialogCommand(ItemVal id, ItemVal val, CmdType ctype);
int added;
virtual void DialogDisplayed(); // TEH Dec97
};
#endif

View File

@ -1,108 +0,0 @@
/*
* $KK: ThreeD.h,v 0.3 92/11/04 xx:xx:xx keithley Exp $
*/
/***********************************************************
Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts,
and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
Copyright 1992 by Kaleb Keithley
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the names of Digital, MIT, or Kaleb
Keithley not be used in advertising or publicity pertaining to distribution
of the software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
/******************************************************************
This code was taken directly from the Xaw3d distribution.
Several classes were used to make V look better.
The names of the classes have been changed to allow
standard Athena widgets to be used as well.
I've not marked any of the changes specifically.
Bruce Wampler - March 1, 1996
******************************************************************/
#ifndef _XawThreeD_h
#define _XawThreeD_h
/***********************************************************************
*
* ThreeD Widget
*
***********************************************************************/
#include <X11/Xmu/Converters.h>
/* Parameters:
Name Class RepType Default Value
---- ----- ------- -------------
shadowWidth ShadowWidth Dimension 2
topShadowPixel TopShadowPixel Pixel dynamic
bottomShadowPixel BottomShadowPixel Pixel dynamic
topShadowContrast TopShadowContrast Int 20
bottomShadowContrast BottomShadowContrast Int 40
userData UserData XtPointer NULL
beNiceToColormap BeNiceToColormap Boolean False
invertBorder InvertBorder Boolean False
*/
#define XtNshadowWidth "shadowWidth"
#define XtCShadowWidth "ShadowWidth"
#define XtNtopShadowPixel "topShadowPixel"
#define XtCTopShadowPixel "TopShadowPixel"
#define XtNbottomShadowPixel "bottomShadowPixel"
#define XtCBottomShadowPixel "BottomShadowPixel"
#define XtNtopShadowContrast "topShadowContrast"
#define XtCTopShadowContrast "TopShadowContrast"
#define XtNbottomShadowContrast "bottomShadowContrast"
#define XtCBottomShadowContrast "BottomShadowContrast"
#define XtNbeNiceToColormap "beNiceToColormap"
#define XtCBeNiceToColormap "BeNiceToColormap"
#define XtNbeNiceToColourmap "beNiceToColormap"
#define XtCBeNiceToColourmap "BeNiceToColormap"
#define XtNinvertBorder "invertBorder"
#define XtCInvertBorder "InvertBorder"
#define XtNuserData "userData"
#define XtCUserData "UserData"
typedef struct _ThreeDRec *ThreeDWidget;
typedef struct _ThreeDClassRec *ThreeDWidgetClass;
extern WidgetClass threeDWidgetClass;
_XFUNCPROTOBEGIN
extern void Xaw3dComputeTopShadowRGB (
#if NeedFunctionPrototypes
Widget /* new */,
XColor* /* xcol_out */
#endif
);
extern void Xaw3dComputeBottomShadowRGB (
#if NeedFunctionPrototypes
Widget /* new */,
XColor* /* xcol_out */
#endif
);
_XFUNCPROTOEND
#endif /* _XawThreeD_h */

View File

@ -1,86 +0,0 @@
/*
* $KK: ThreeDP.h,v 0.3 92/11/04 xx:xx:xx keithley Exp $
*/
/***********************************************************
Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts,
and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
Copyright 1992 by Kaleb Keithley
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the names of Digital, MIT, or Kaleb
Keithley not be used in advertising or publicity pertaining to distribution
of the software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
/******************************************************************
This code was taken directly from the Xaw3d distribution.
Several classes were used to make V look better.
The names of the classes have been changed to allow
standard Athena widgets to be used as well.
I've not marked any of the changes specifically.
Bruce Wampler - March 1, 1996
******************************************************************/
#ifndef _ThreeDP_h
#define _ThreeDP_h
#include <v/aw3d.h>
#include <v/awsim3dp.h>
typedef struct {
Dimension shadow_width;
Pixel top_shadow_pixel;
Pixel bot_shadow_pixel;
Pixmap top_shadow_pxmap;
Pixmap bot_shadow_pxmap;
int top_shadow_contrast;
int bot_shadow_contrast;
GC top_shadow_GC;
GC bot_shadow_GC;
XtPointer user_data;
Boolean be_nice_to_cmap;
Boolean invert_border;
} ThreeDPart;
/* Full instance record declaration */
typedef struct _ThreeDRec {
CorePart core;
Simple3dPart simple3d;
ThreeDPart threeD;
} ThreeDRec;
typedef struct {
void (*shadowdraw)();
} ThreeDClassPart;
#define XtInheritXaw3dShadowDraw ((void (*)())_XtInherit)
#define XtInheritXaw3dShadowBoxDraw ((void (*)())_XtInherit)
/* Full class record declaration. */
typedef struct _ThreeDClassRec {
CoreClassPart core_class;
Simple3dClassPart simple3d_class;
ThreeDClassPart threeD_class;
} ThreeDClassRec;
/* Class pointer. */
extern ThreeDClassRec threeDClassRec;
#endif /* _ThreeDP_h */

View File

@ -1,129 +0,0 @@
/* $XConsortium: Command.h,v 1.29 94/04/17 20:11:59 kaleb Exp $ */
/***********************************************************
Copyright (c) 1987, 1988, 1994 X Consortium
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of the X Consortium shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from the X Consortium.
Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
/******************************************************************
This code was taken directly from the Xaw3d distribution.
Several classes were used to make V look better.
The names of the classes have been changed to allow
standard Athena widgets to be used as well.
I've not marked any of the changes specifically.
Bruce Wampler - March 1, 1996
******************************************************************/
#ifndef _XawCommand3d_h
#define _XawCommand3d_h
#include <v/awlbl3d.h>
/* Command3d widget resources:
Name Class RepType Default Value
---- ----- ------- -------------
accelerators Accelerators AcceleratorTable NULL
ancestorSensitive AncestorSensitive Boolean True
background Background Pixel XtDefaultBackground
backgroundPixmap Pixmap Pixmap XtUnspecifiedPixmap
bitmap Pixmap Pixmap None
borderColor BorderColor Pixel XtDefaultForeground
borderPixmap Pixmap Pixmap XtUnspecifiedPixmap
borderWidth BorderWidth Dimension 1
callback Callback XtCallbackList NULL
colormap Colormap Colormap parent's colormap
cornerRoundPercent CornerRoundPercent Dimension 25
cursor Cursor Cursor None
cursorName Cursor String NULL
depth Depth int parent's depth
destroyCallback Callback XtCallbackList NULL
encoding Encoding UnsignedChar XawTextEncoding8bit
font Font XFontStruct* XtDefaultFont
foreground Foreground Pixel XtDefaultForeground
height Height Dimension text height
highlightThickness Thickness Dimension 0 if shaped, else 2
insensitiveBorder Insensitive Pixmap Gray
internalHeight Height Dimension 2
internalWidth Width Dimension 4
justify Justify XtJustify XtJustifyCenter
label Label String NULL
leftBitmap LeftBitmap Pixmap None
mappedWhenManaged MappedWhenManaged Boolean True
pointerColor Foreground Pixel XtDefaultForeground
pointerColorBackground Background Pixel XtDefaultBackground
resize Resize Boolean True
screen Screen Screen parent's Screen
sensitive Sensitive Boolean True
shapeStyle ShapeStyle ShapeStyle Rectangle
translations Translations TranslationTable see doc or source
width Width Dimension text width
x Position Position 0
y Position Position 0
*/
#define XtNhighlightThickness "highlightThickness"
#define XtNshapeStyle "shapeStyle"
#define XtCShapeStyle "ShapeStyle"
#define XtRShapeStyle "ShapeStyle"
#define XtNcornerRoundPercent "cornerRoundPercent"
#define XtCCornerRoundPercent "CornerRoundPercent"
#define XawShapeRectangle XmuShapeRectangle
#define XawShapeOval XmuShapeOval
#define XawShapeEllipse XmuShapeEllipse
#define XawShapeRoundedRectangle XmuShapeRoundedRectangle
extern WidgetClass command3dWidgetClass;
typedef struct _Command3dClassRec *Command3dWidgetClass;
typedef struct _Command3dRec *Command3dWidget;
#endif /* _XawCommand3d_h */

View File

@ -1,151 +0,0 @@
/*
* $XConsortium: CommandP.h,v 1.31 94/04/17 20:12:01 rws Exp $
*/
/***********************************************************
Copyright (c) 1987, 1988 X Consortium
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of the X Consortium shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from the X Consortium.
Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
/******************************************************************
This code was taken directly from the Xaw3d distribution.
Several classes were used to make V look better.
The names of the classes have been changed to allow
standard Athena widgets to be used as well.
I've not marked any of the changes specifically.
Bruce Wampler - March 1, 1996
******************************************************************/
/*
* CommandP.h - Private definitions for Command widget
*
*/
#ifndef _XawCommandP3d_h
#define _XawCommandP3d_h
#include <v/awcmd3d.h>
#include <v/awlbl3dp.h>
/***********************************************************************
*
* Command Widget Private Data
*
***********************************************************************/
typedef enum {
HighlightNone, /* Do not highlight. */
HighlightWhenUnset, /* Highlight only when unset, this is
to preserve current command3d widget
functionality. */
HighlightAlways /* Always highlight, lets the toggle widget
and other subclasses do the right thing. */
} XtCommand3dHighlight;
/************************************
*
* Class structure
*
***********************************/
/* New fields for the Command3d widget class record */
typedef struct _Command3dClass
{
int makes_compiler_happy; /* not used */
} Command3dClassPart;
/* Full class record declaration */
typedef struct _Command3dClassRec {
CoreClassPart core_class;
Simple3dClassPart simple3d_class;
ThreeDClassPart threeD_class;
Label3dClassPart label3d_class;
Command3dClassPart command3d_class;
} Command3dClassRec;
extern Command3dClassRec command3dClassRec;
/***************************************
*
* Instance (widget) structure
*
**************************************/
/* New fields for the Command3d widget record */
typedef struct {
/* resources */
Dimension highlight_thickness;
XtCallbackList callbacks;
/* private state */
Pixmap gray_pixmap;
GC normal_GC;
GC inverse_GC;
Boolean set;
XtCommand3dHighlight highlighted;
/* more resources */
int shape_style;
Dimension corner_round;
} Command3dPart;
/* XtEventsPtr eventTable;*/
/* Full widget declaration */
typedef struct _Command3dRec {
CorePart core;
Simple3dPart simple3d;
ThreeDPart threeD;
Label3dPart label3d;
Command3dPart command3d;
} Command3dRec;
#endif /* _XawCommand3dP_h */

View File

@ -1,139 +0,0 @@
/* $XConsortium: Label.h,v 1.34 94/04/17 20:12:13 rws Exp $ */
/***********************************************************
Copyright (c) 1987, 1988, 1994 X Consortium
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of the X Consortium shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from the X Consortium.
Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
/******************************************************************
This code was taken directly from the Xaw3d distribution.
Several classes were used to make V look better.
The names of the classes have been changed to allow
standard Athena widgets to be used as well.
I've not marked any of the changes specifically.
Bruce Wampler - March 1, 1996
******************************************************************/
#ifndef _XawLabel3d_h
#define _XawLabel3d_h
/***********************************************************************
*
* Label Widget
*
***********************************************************************/
#include <v/awsim3d.h>
/* Resources:
Name Class RepType Default Value
---- ----- ------- -------------
background Background Pixel XtDefaultBackground
bitmap Pixmap Pixmap None
border BorderColor Pixel XtDefaultForeground
borderWidth BorderWidth Dimension 1
cursor Cursor Cursor None
cursorName Cursor String NULL
destroyCallback Callback XtCallbackList NULL
encoding Encoding unsigned char XawTextEncoding8bit
font Font XFontStruct* XtDefaultFont
foreground Foreground Pixel XtDefaultForeground
height Height Dimension text height
insensitiveBorder Insensitive Pixmap Gray
internalHeight Height Dimension 2
internalWidth Width Dimension 4
justify Justify XtJustify XtJustifyCenter
label3d Label3d String NULL
leftBitmap LeftBitmap Pixmap None
mappedWhenManaged MappedWhenManaged Boolean True
pointerColor Foreground Pixel XtDefaultForeground
pointerColorBackground Background Pixel XtDefaultBackground
resize Resize Boolean True
sensitive Sensitive Boolean True
width Width Dimension text width
x Position Position 0
y Position Position 0
*/
#define XawTextEncoding8bit 0
#define XawTextEncodingChar2b 1
#define XtNleftBitmap "leftBitmap"
#define XtCLeftBitmap "LeftBitmap"
#define XtNencoding "encoding"
#define XtCEncoding "Encoding"
#ifndef XtNfontSet
#define XtNfontSet "fontSet"
#endif
#ifndef XtCFontSet
#define XtCFontSet "FontSet"
#endif
#ifndef _XtStringDefs_h_
#define XtNbitmap "bitmap"
#define XtNforeground "foreground"
#define XtNlabel3d "label3d"
#define XtNfont "font"
#define XtNinternalWidth "internalWidth"
#define XtNinternalHeight "internalHeight"
#define XtNresize "resize"
#define XtCResize "Resize"
#define XtCBitmap "Bitmap"
#endif
/* Class record constants */
extern WidgetClass label3dWidgetClass;
typedef struct _Label3dClassRec *Label3dWidgetClass;
typedef struct _Label3dRec *Label3dWidget;
#endif /* _XawLabel3d_h */

View File

@ -1,141 +0,0 @@
/*
* $XConsortium: LabelP.h,v 1.29 94/04/17 20:12:14 kaleb Exp $
*/
/***********************************************************
Copyright (c) 1987, 1988, 1994 X Consortium
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of the X Consortium shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from the X Consortium.
Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
/******************************************************************
This code was taken directly from the Xaw3d distribution.
Several classes were used to make V look better.
The names of the classes have been changed to allow
standard Athena widgets to be used as well.
I've not marked any of the changes specifically.
Bruce Wampler - March 1, 1996
******************************************************************/
/*
* LabelP.h - Private definitions for Label widget
*
*/
#ifndef _XawLabelP3d_h
#define _XawLabelP3d_h
/***********************************************************************
*
* Label Widget Private Data
*
***********************************************************************/
#include <v/awlbl3d.h>
#include <v/aw3dp.h>
/* New fields for the Label widget class record */
typedef struct {int foo;} Label3dClassPart;
/* Full class record declaration */
typedef struct _Label3dClassRec {
CoreClassPart core_class;
Simple3dClassPart simple3d_class;
ThreeDClassPart threeD_class;
Label3dClassPart label3d_class;
} Label3dClassRec;
extern Label3dClassRec label3dClassRec;
/* New fields for the Label3d widget record */
typedef struct {
/* resources */
Pixel foreground;
XFontStruct *font;
XFontSet fontset;
char *label3d;
XtJustify justify;
Dimension internal_width;
Dimension internal_height;
Pixmap pixmap;
Boolean resize;
unsigned char encoding;
Pixmap left_bitmap;
/* private state */
GC normal_GC;
GC gray_GC;
Pixmap stipple;
Position label3d_x;
Position label3d_y;
Dimension label3d_width;
Dimension label3d_height;
Dimension label3d_len;
int lbm_y; /* where in label3d */
unsigned int lbm_width, lbm_height; /* size of pixmap */
} Label3dPart;
/****************************************************************
*
* Full instance record declaration
*
****************************************************************/
typedef struct _Label3dRec {
CorePart core;
Simple3dPart simple3d;
ThreeDPart threeD;
Label3dPart label3d;
} Label3dRec;
#define LEFT_OFFSET(lw) ((lw)->label3d.left_bitmap \
? (lw)->label3d.lbm_width + (lw)->label3d.internal_width \
: 0)
#endif /* _XawLabel3dP_h */

View File

@ -1,163 +0,0 @@
/* $XConsortium: Scrollbar.h,v 1.8 94/04/17 20:12:41 converse Exp $ */
/***********************************************************
Copyright (c) 1987, 1988 X Consortium
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of the X Consortium shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from the X Consortium.
Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
/******************************************************************
This code was taken directly from the Xaw3d distribution.
Several classes were used to make V look better.
The names of the classes have been changed to allow
standard Athena widgets to be used as well.
I've not marked any of the changes specifically.
Bruce Wampler - March 1, 1996
******************************************************************/
#ifndef _Scrollbar3d_h
#define _Scrollbar3d_h
/****************************************************************
*
* Scrollbar3d Widget
*
****************************************************************/
#include <X11/Xmu/Converters.h>
#include <X11/Xfuncproto.h>
/* Scrollbar3d resources:
Name Class RepType Default Value
---- ----- ------- -------------
accelerators Accelerators AcceleratorTable NULL
ancestorSensitive AncestorSensitive Boolean True
background Background Pixel XtDefaultBackground
backgroundPixmap Pixmap Pixmap XtUnspecifiedPixmap
borderColor BorderColor Pixel XtDefaultForeground
borderPixmap Pixmap Pixmap XtUnspecifiedPixmap
borderWidth BorderWidth Dimension 1
colormap Colormap Colormap parent's colormap
cursor Cursor Cursor None
cursorName Cursor String NULL
depth Depth int parent's depth
destroyCallback Callback XtCallbackList NULL
foreground Foreground Pixel XtDefaultForeground
height Height Dimension length or thickness
insensitiveBorder Insensitive Pixmap GreyPixmap
jumpProc Callback XtCallbackList NULL
length Length Dimension 1
mappedWhenManaged MappedWhenManaged Boolean True
minimumThumb MinimumThumb Dimension 7
orientation Orientation XtOrientation XtorientVertical
pointerColor Foreground Pixel XtDefaultForeground
pointerColorBackground Background Pixel XtDefaultBackground
screen Screen Screen parent's screen
scrollDCursor Cursor Cursor XC_sb_down_arrow
scrollHCursor Cursor Cursor XC_sb_h_double_arrow
scrollLCursor Cursor Cursor XC_sb_left_arrow
scrollProc Callback XtCallbackList NULL
scrollRCursor Cursor Cursor XC_sb_right_arrow
scrollUCursor Cursor Cursor XC_sb_up_arrow
scrollVCursor Cursor Cursor XC_sb_v_double_arrow
scrollbar3dBackground Scrollbar3dBackground Pixel XtDefaultForeground
sensitive Sensitive Boolean True
shown Shown Float 0.0
thickness Thickness Dimension 14
thumb Thumb Bitmap GreyPixmap
thumbProc Callback XtCallbackList NULL
topOfThumb TopOfThumb Float 0.0
pickTop PickTop Boolean False
pushThumb PushThumb Boolean True
translations Translations TranslationTable see source or doc
width Width Dimension thickness or length
x Position Position 0
y Position Position 0
*/
/*
* Most things we need are in StringDefs.h
*/
#define XtCMinimumThumb "MinimumThumb"
#define XtCShown "Shown"
#define XtCTopOfThumb "TopOfThumb"
#define XtCScrollbar3dBackground "Scrollbar3dBackground"
#define XtCPickTop "PickTop"
#define XtCPushThumb "PushThumb"
#define XtNminimumThumb "minimumThumb"
#define XtNtopOfThumb "topOfThumb"
#define XtNscrollbar3dBackground "scrollbar3dBackground"
#define XtNpickTop "pickTop"
#define XtNpushThumb "pushThumb"
typedef struct _Scrollbar3dRec *Scrollbar3dWidget;
typedef struct _Scrollbar3dClassRec *Scrollbar3dWidgetClass;
extern WidgetClass scrollbar3dWidgetClass;
_XFUNCPROTOBEGIN
extern void XawScrollbar3dSetThumb(
#if NeedFunctionPrototypes
Widget /* scrollbar3d */,
#if NeedWidePrototypes
/* float */ double /* top */,
/* float */ double /* shown */
#else
float /* top */,
float /* shown */
#endif
#endif
);
_XFUNCPROTOEND
#endif /* _Scrollbar3d_h */

View File

@ -1,125 +0,0 @@
/* MODIFIED ATHENA SCROLLBAR (USING ARROWHEADS AT ENDS OF TRAVEL) */
/* Modifications Copyright 1992 by Mitch Trachtenberg */
/* Rights, permissions, and disclaimer of warranty are as in the */
/* DEC and MIT notice below. See usage warning in .c file. */
/*
* $XConsortium: ScrollbarP.h,v 1.3 94/04/17 20:12:42 jim Exp $
*/
/***********************************************************
Copyright (c) 1987, 1988 X Consortium
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of the X Consortium shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from the X Consortium.
Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
/******************************************************************
This code was taken directly from the Xaw3d distribution.
Several classes were used to make V look better.
The names of the classes have been changed to allow
standard Athena widgets to be used as well.
I've not marked any of the changes specifically.
Bruce Wampler - March 1, 1996
******************************************************************/
#ifndef _Scrollbar3dP_h
#define _Scrollbar3dP_h
#include <v/awscl3d.h>
#include <v/aw3dp.h>
typedef struct {
/* public */
Pixel foreground; /* thumb foreground color */
XtOrientation orientation; /* horizontal or vertical */
XtCallbackList scrollProc; /* proportional scroll */
XtCallbackList thumbProc; /* jump (to position) scroll */
XtCallbackList jumpProc; /* same as thumbProc but pass data by ref */
Pixmap thumb; /* thumb color */
Pixel background; /* background color */
Cursor verCursor; /* scroll vertical cursor */
Cursor horCursor; /* scroll horizontal cursor */
float top; /* What percent is above the win's top */
float shown; /* What percent is shown in the win */
Dimension length; /* either height or width */
Dimension thickness; /* either width or height */
Dimension min_thumb; /* minium size for the thumb. */
float picked; /* How much of the thumb is picked *
* when scrolling starts */
/* private */
XtIntervalId timer_id; /* autorepeat timer; remove on destruction */
char scroll_mode; /* 0:none 1:up/back 2:track 3:down/forward */
Cursor inactiveCursor; /* the normal cursor for scrollbar3d */
char direction; /* a scroll has started; which direction */
GC gc; /* a (shared) gc for foreground */
GC bgc; /* a (shared) gc for background */
Position topLoc; /* Pixel that corresponds to top */
Dimension shownLength; /* Num pixels corresponding to shown */
Boolean pick_top; /* pick thumb at top or anywhere */
Boolean push_thumb; /* push thumb in or not */
} Scrollbar3dPart;
typedef struct _Scrollbar3dRec {
CorePart core;
Simple3dPart simple3d;
ThreeDPart threeD;
Scrollbar3dPart scrollbar3d;
} Scrollbar3dRec;
typedef struct {int empty;} Scrollbar3dClassPart;
typedef struct _Scrollbar3dClassRec {
CoreClassPart core_class;
Simple3dClassPart simple3d_class;
ThreeDClassPart threeD_class;
Scrollbar3dClassPart scrollbar3d_class;
} Scrollbar3dClassRec;
extern Scrollbar3dClassRec scrollbar3dClassRec;
#endif /* _Scrollbar3dP_h */

View File

@ -1,113 +0,0 @@
/* $XConsortium: Simple.h,v 1.14 94/04/17 20:12:44 rws Exp $ */
/***********************************************************
Copyright (c) 1987, 1988, 1994 X Consortium
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of the X Consortium shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from the X Consortium.
Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
/******************************************************************
This code was taken directly from the Xaw3d distribution.
Several classes were used to make V look better.
The names of the classes have been changed to allow
standard Athena widgets to be used as well.
I've not marked any of the changes specifically.
Bruce Wampler - March 1, 1996
******************************************************************/
#ifndef _Simple3d_h
#define _Simple3d_h
#include <X11/Xmu/Converters.h>
/****************************************************************
*
* Simple3d widgets
*
****************************************************************/
/* Resources:
Name Class RepType Default Value
---- ----- ------- -------------
background Background Pixel XtDefaultBackground
border BorderColor Pixel XtDefaultForeground
borderWidth BorderWidth Dimension 1
cursor Cursor Cursor None
cursorName Cursor String NULL
destroyCallback Callback Pointer NULL
height Height Dimension 0
insensitiveBorder Insensitive Pixmap Gray
mappedWhenManaged MappedWhenManaged Boolean True
pointerColor Foreground Pixel XtDefaultForeground
pointerColorBackground Background Pixel XtDefaultBackground
sensitive Sensitive Boolean True
width Width Dimension 0
x Position Position 0
y Position Position 0
*/
#define XtNcursor "cursor"
#define XtNcursorName "cursorName"
#define XtNinsensitiveBorder "insensitiveBorder"
#define XtCInsensitive "Insensitive"
#ifndef XtCInternational
#define XtCInternational "International"
#endif
#ifndef XtNinternational
#define XtNinternational "international"
#endif
typedef struct _Simple3dClassRec *Simple3dWidgetClass;
typedef struct _Simple3dRec *Simple3dWidget;
extern WidgetClass simple3dWidgetClass;
#endif /* _Simple3d_h */

View File

@ -1,97 +0,0 @@
/***********************************************************
$XConsortium: SimpleP.h,v 1.12 94/04/17 20:12:47 kaleb Exp $
Copyright (c) 1987, 1988, 1994 X Consortium
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of the X Consortium shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from the X Consortium.
Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
/******************************************************************
This code was taken directly from the Xaw3d distribution.
Several classes were used to make V look better.
The names of the classes have been changed to allow
standard Athena widgets to be used as well.
I've not marked any of the changes specifically.
Bruce Wampler - March 1, 1996
******************************************************************/
#ifndef _Simple3dP_h
#define _Simple3dP_h
#include <v/awsim3d.h>
typedef struct {
Boolean (*change_sensitive)(/* widget */);
} Simple3dClassPart;
#define XtInheritChangeSensitive ((Boolean (*)())_XtInherit)
typedef struct _Simple3dClassRec {
CoreClassPart core_class;
Simple3dClassPart simple3d_class;
} Simple3dClassRec;
extern Simple3dClassRec simple3dClassRec;
typedef struct {
/* resources */
Cursor cursor;
Pixmap insensitive_border;
String cursor_name; /* cursor specified by name. */
Pixel pointer_fg, pointer_bg; /* Pointer colors. */
Boolean international;
/* private state */
} Simple3dPart;
typedef struct _Simple3dRec {
CorePart core;
Simple3dPart simple3d;
} Simple3dRec;
#endif /* _Simple3dP_h */

View File

@ -1,167 +0,0 @@
/* $XConsortium: Slider.h,v 1.8 94/04/17 20:12:41 converse Exp $ */
/***********************************************************
Copyright (c) 1987, 1988 X Consortium
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of the X Consortium shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from the X Consortium.
Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
/******************************************************************
This code was taken directly from the Xaw3d distribution.
Several classes were used to make V look better.
The names of the classes have been changed to allow
standard Athena widgets to be used as well.
I've not marked any of the changes specifically.
Bruce Wampler - March 1, 1996
******************************************************************/
#ifndef _Slider3d_h
#define _Slider3d_h
/****************************************************************
*
* Slider3d Widget
*
****************************************************************/
#include <X11/Xmu/Converters.h>
#include <X11/Xfuncproto.h>
/* Slider3d resources:
Name Class RepType Default Value
---- ----- ------- -------------
accelerators Accelerators AcceleratorTable NULL
ancestorSensitive AncestorSensitive Boolean True
background Background Pixel XtDefaultBackground
backgroundPixmap Pixmap Pixmap XtUnspecifiedPixmap
borderColor BorderColor Pixel XtDefaultForeground
borderPixmap Pixmap Pixmap XtUnspecifiedPixmap
borderWidth BorderWidth Dimension 1
colormap Colormap Colormap parent's colormap
cursor Cursor Cursor None
cursorName Cursor String NULL
depth Depth int parent's depth
destroyCallback Callback XtCallbackList NULL
foreground Foreground Pixel XtDefaultForeground
height Height Dimension length or thickness
insensitiveBorder Insensitive Pixmap GreyPixmap
jumpProc Callback XtCallbackList NULL
length Length Dimension 1
mappedWhenManaged MappedWhenManaged Boolean True
minimumThumb MinimumThumb Dimension 7
orientation Orientation XtOrientation XtorientVertical
pointerColor Foreground Pixel XtDefaultForeground
pointerColorBackground Background Pixel XtDefaultBackground
screen Screen Screen parent's screen
scrollDCursor Cursor Cursor XC_sb_down_arrow
scrollHCursor Cursor Cursor XC_sb_h_double_arrow
scrollLCursor Cursor Cursor XC_sb_left_arrow
scrollProc Callback XtCallbackList NULL
scrollRCursor Cursor Cursor XC_sb_right_arrow
scrollUCursor Cursor Cursor XC_sb_up_arrow
scrollVCursor Cursor Cursor XC_sb_v_double_arrow
slider3dBackground Slider3dBackground Pixel XtDefaultForeground
sensitive Sensitive Boolean True
shown Shown Float 0.0
thickness Thickness Dimension 14
thumb Thumb Bitmap GreyPixmap
thumbProc Callback XtCallbackList NULL
topOfThumb TopOfThumb Float 0.0
pickTop PickTop Boolean False
pushThumb PushThumb Boolean True
translations Translations TranslationTable see source or doc
width Width Dimension thickness or length
x Position Position 0
y Position Position 0
*/
/*
* Most things we need are in StringDefs.h
*/
#define XtCMinimumThumb "MinimumThumb"
#define XtCShown "Shown"
#define XtCTopOfThumb "TopOfThumb"
#define XtCSlider3dBackground "Slider3dBackground"
#define XtCIsProgress "IsProgress"
#define XtCProgressVal "ProgressVal"
#define XtCShowProgressVal "ShowProgressVal"
#define XtCUsePercent "UsePercent"
#define XtNminimumThumb "minimumThumb"
#define XtNtopOfThumb "topOfThumb"
#define XtNslider3dBackground "slider3dBackground"
#define XtNisProgress "isProgress"
#define XtNprogressVal "progressVal"
#define XtNshowProgressVal "showProgressVal"
#define XtNusePercent "usePercent"
typedef struct _Slider3dRec *Slider3dWidget;
typedef struct _Slider3dClassRec *Slider3dWidgetClass;
extern WidgetClass slider3dWidgetClass;
_XFUNCPROTOBEGIN
extern void XawSlider3dSetThumb(
#if NeedFunctionPrototypes
Widget /* slider3d */,
#if NeedWidePrototypes
/* float */ double /* top */,
/* float */ double /* shown */
#else
float /* top */,
float /* shown */
#endif
#endif
);
_XFUNCPROTOEND
#endif /* _Slider3d_h */

View File

@ -1,125 +0,0 @@
/* MODIFIED ATHENA SCROLLBAR (USING ARROWHEADS AT ENDS OF TRAVEL) */
/* Modifications Copyright 1992 by Mitch Trachtenberg */
/* Rights, permissions, and disclaimer of warranty are as in the */
/* DEC and MIT notice below. See usage warning in .c file. */
/*
* $XConsortium: SliderP.h,v 1.3 94/04/17 20:12:42 jim Exp $
*/
/***********************************************************
Copyright (c) 1987, 1988 X Consortium
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of the X Consortium shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from the X Consortium.
Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
/******************************************************************
This code was taken directly from the Xaw3d distribution.
Several classes were used to make V look better.
The names of the classes have been changed to allow
standard Athena widgets to be used as well.
I've not marked any of the changes specifically.
Bruce Wampler - March 1, 1996
******************************************************************/
#ifndef _Slider3dP_h
#define _Slider3dP_h
#include <v/awsld3d.h>
#include <v/aw3dp.h>
typedef struct {
/* public */
Pixel foreground; /* thumb foreground color */
XtOrientation orientation; /* horizontal or vertical */
XtCallbackList scrollProc; /* proportional scroll */
XtCallbackList thumbProc; /* jump (to position) scroll */
XtCallbackList jumpProc; /* same as thumbProc but pass data by ref */
Pixmap thumb; /* thumb color */
Pixel background; /* background color */
Cursor verCursor; /* scroll vertical cursor */
Cursor horCursor; /* scroll horizontal cursor */
float top; /* What percent is above the win's top */
float shown; /* What percent is shown in the win */
Dimension length; /* either height or width */
Dimension thickness; /* either width or height */
Dimension min_thumb; /* minium size for the thumb. */
float picked; /* How much of the thumb is picked *
* when scrolling starts */
Dimension progressVal; /* value for progress */
Boolean isProgress; /* if is progress bar */
Boolean usePercent; /* if have percent in progress label */
Boolean showProgressVal; /* if want to show the progress value */
/* private */
Cursor inactiveCursor; /* the normal cursor for slider3d */
char direction; /* a scroll has started; which direction */
GC gc; /* a (shared) gc for foreground */
GC bgc; /* a (shared) gc for background */
Position topLoc; /* Pixel that corresponds to top */
Dimension shownLength; /* Num pixels corresponding to shown */
} Slider3dPart;
typedef struct _Slider3dRec {
CorePart core;
Simple3dPart simple3d;
ThreeDPart threeD;
Slider3dPart slider3d;
} Slider3dRec;
typedef struct {int empty;} Slider3dClassPart;
typedef struct _Slider3dClassRec {
CoreClassPart core_class;
Simple3dClassPart simple3d_class;
ThreeDClassPart threeD_class;
Slider3dClassPart slider3d_class;
} Slider3dClassRec;
extern Slider3dClassRec slider3dClassRec;
#endif /* _Slider3dP_h */

View File

@ -1,101 +0,0 @@
/*
* $XConsortium: Toggle.h,v 1.16 94/04/17 20:13:19 kaleb Exp $
*
Copyright (c) 1989, 1994 X Consortium
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of the X Consortium shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from the X Consortium.
*/
/*
* ToggleP.h - Private definitions for Toggle widget
*
* Author: Chris D. Peterson
* MIT X Consortium
* kit@expo.lcs.mit.edu
*
* Date: January 12, 1989
*/
#ifndef _XawToggle3d_h
#define _XawToggle3d_h
/***********************************************************************
*
* Toggle Widget
*
***********************************************************************/
#include <v/awcmd3d.h>
/* Resources:
Name Class RepType Default Value
---- ----- ------- -------------
state State Boolean Off
background Background Pixel XtDefaultBackground
bitmap Pixmap Pixmap None
border BorderColor Pixel XtDefaultForeground
borderWidth BorderWidth Dimension 1
callback Callback Pointer NULL
cursor Cursor Cursor None
destroyCallback Callback Pointer NULL
font Font XFontStructx* XtDefaultFont
foreground Foreground Pixel XtDefaultForeground
height Height Dimension text height
highlightThickness Thickness Dimension 2
insensitiveBorder Insensitive Pixmap Gray
internalHeight Height Dimension 2
internalWidth Width Dimension 4
justify Justify XtJustify XtJustifyCenter
label Label String NULL
mappedWhenManaged MappedWhenManaged Boolean True
resize Resize Boolean True
sensitive Sensitive Boolean True
width Width Dimension text width
x Position Position 0
y Position Position 0
*/
/*
* These should be in StringDefs.h but aren't so we will define
* them here if they are needed.
*/
#define XtCWidget "Widget"
#define XtCState "State"
#ifndef _XtStringDefs_h_
#define XtRWidget "Widget"
#endif
#define XtNstate "state"
extern WidgetClass toggle3dWidgetClass;
typedef struct _Toggle3dClassRec *Toggle3dWidgetClass;
typedef struct _Toggle3dRec *Toggle3dWidget;
#endif /* _XawToggle3d_h */

View File

@ -1,102 +0,0 @@
/* $XConsortium: ToggleP.h,v 1.9 94/04/17 20:13:19 converse Exp $ */
/*
Copyright (c) 1989 X Consortium
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of the X Consortium shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from the X Consortium.
*/
/*
* ToggleP.h - Private definitions for Toggle widget
*
* Author: Chris D. Peterson
* MIT X Consortium
* kit@expo.lcs.mit.edu
*
* Date: January 12, 1989
*
*/
#ifndef _XawToggleP_h
#define _XawToggleP_h
#include <v/awtog3d.h>
#include <v/awcmd3dp.h>
/***********************************************************************
*
* Toggle Widget Private Data
*
***********************************************************************/
#define streq(a, b) ( strcmp((a), (b)) == 0 )
/************************************
*
* Class structure
*
***********************************/
/* New fields for the Toggle widget class record */
typedef struct _Toggle3dClass {
XtActionProc Set;
XtActionProc Unset;
XtPointer extension;
} Toggle3dClassPart;
/* Full class record declaration */
typedef struct _Toggle3dClassRec {
CoreClassPart core_class;
Simple3dClassPart simple3d_class;
ThreeDClassPart threeD_class;
Label3dClassPart label3d_class;
Command3dClassPart command3d_class;
Toggle3dClassPart toggle3d_class;
} Toggle3dClassRec;
extern Toggle3dClassRec toggle3dClassRec;
/***************************************
*
* Instance (widget) structure
*
**************************************/
/* New fields for the Toggle widget record */
typedef struct {
/* resources */
Widget widget;
} Toggle3dPart;
/* Full widget declaration */
typedef struct _Toggle3dRec {
CorePart core;
Simple3dPart simple3d;
ThreeDPart threeD;
Label3dPart label3d;
Command3dPart command3d;
Toggle3dPart toggle3d;
} Toggle3dRec;
#endif /* _XawToggleP_h */

View File

@ -1,43 +0,0 @@
#ifndef CANVAS_H
#define CANVAS_H
/***********************************************************************
canvas Widget (subclass of CompositeClass)
Copyright (C) 1995 Bruce E. Wampler
This file is part of the V C++ GUI Framework, and is covered
under the terms of the GNU Library General Public License,
Version 2. This library has NO WARRANTY. See the source file
vapp.cxx for more complete information about license terms.
***********************************************************************/
/* Parameters:
Name Class RepType Default Value
---- ----- ------- -------------
background Background Pixel XtDefaultBackground
border BorderColor Pixel XtDefaultForeground
borderWidth BorderWidth Dimension 1
destroyCallback Callback Pointer NULL
hSpace HSpace Dimension 4
height Height Dimension 0
mappedWhenManaged MappedWhenManaged Boolean True
vSpace VSpace Dimension 4
width Width Dimension 0
x Position Position 0
y Position Position 0
*/
/* Class record constants */
typedef struct _CanvasClassRec *CanvasWidgetClass;
typedef struct _CanvasRec *CanvasWidget;
extern WidgetClass canvasWidgetClass;
#endif

View File

@ -1,59 +0,0 @@
/* ===============================================================
canvasp.h - Private definitions for canvas widget
Copyright (C) 1995,1996 Bruce E. Wampler
This file is part of the V C++ GUI Framework, and is covered
under the terms of the GNU Library General Public License,
Version 2. This library has NO WARRANTY. See the source file
vapp.cxx for more complete information about license terms.
=============================================================== */
#ifndef CANVASP_H
#define CANVASP_H
#include <v/canvas.h>
#include <X11/CompositeP.h>
/* New fields for the canvas widget class record */
typedef struct _CanvasClass
{
int empty; /* need something */
} CanvasClassPart;
/* Full class record declaration */
typedef struct _CanvasClassRec
{
CoreClassPart core_class;
CompositeClassPart composite_class;
CanvasClassPart canvas_class;
} CanvasClassRec;
extern CanvasClassRec canvasClassRec;
/* New fields for the canvas widget record */
typedef struct
{
XtCallbackList callback; /* app installed callbacks */
Dimension h_space, v_space;
Dimension preferred_width, preferred_height;
Dimension last_query_width, last_query_height;
XtGeometryMask last_query_mode;
} CanvasPart;
/****************************************************************
Full instance record declaration
****************************************************************/
typedef struct _CanvasRec
{
CorePart core;
CompositePart composite;
CanvasPart canvas;
} CanvasRec;
#endif

View File

@ -1,418 +0,0 @@
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
#ifndef V_DEFS_H
#define V_DEFS_H
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
// //
// VV VV VV VV //
// VV VV V - A Portable C++ GUI Framework VV VV //
// VV VV designed and written by VV VV //
// VV VV VV VV //
// VV VV Bruce E. Wampler, Ph.D. VV VV //
// VVV e-mail: bruce@objectcentral.com VVV //
// V V //
// //
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
// //
// v_defs.h - Standard V definitions -- X Version //
// //
// Copyright (C) 1995-2000 Bruce E. Wampler //
// //
// This file is part of the V C++ GUI Framework. //
// //
// This library is free software; you can redistribute it and/or //
// modify it under the terms of the GNU Lesser General Public //
// License as published by the Free Software Foundation; either //
// version 2.1 of the License, or (at your option) any later version. //
// //
// This library is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //
// Library General Public License for more details. //
// //
// You should have received a copy of the GNU Lesser General Public //
// License along with this library (see COPYING.LIB); if not, write to the //
// Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. //
// //
// The author, Bruce E. Wampler, hereby grants you permission //
// to treat the executable of any application you develop that uses //
// the V library as a "work that uses the library" as long as you include //
// an acknowledgement of V, and a link to V at www.objectcentral.com //
// somewhere in the program or its documentation. You may use the V //
// library with any application, free or commercial, as long as you //
// follow the other terms of the LGPL, excluding Section 6. //
// //
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
// VCONST can be defined as const, but that will require changes
// to apps. We will wait until V 2.0 for that to happen officially,
// but for now, this is available, at least on some classes.
// VMUTABLE is used in conjunction with VCONST.
#define VCONST
#define VMUTABLE
//#define VCONST const
//#define VMUTABLE mutable
//#ifndef vDEBUG // force DEBUG for now
//#define vDEBUG
//#endif
#define Motif // Motif by default!
#ifdef Athena
#undef Motif // undef Motif for Athena
#ifdef NO_V_3D
#undef USE3D
#else
#define USE3D // by default for Athena
#endif
#endif
#ifdef vDEBUG // We are using old C stdio lib for debug info
#include <stdio.h>
#endif
#define V_VersMajor 1
#define V_VersMinor 25
#define V_Version "V 1.25 - 15 Sep 2000"
#define V_VersionX 1
// These should be defined as blanks for some C++ compilers
#define BEGIN_EXTERN_C extern "C" {
#define END_EXTERN_C }
#ifdef __GNUC__
#if (__GNUC_MINOR__==7)
#undef BEGIN_EXTERN_C
#undef END_EXTERN_C
#define BEGIN_EXTERN_C
#define END_EXTERN_C
#endif
#endif
BEGIN_EXTERN_C
#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
END_EXTERN_C
// system error functions
extern void vSysWarning(VCONST char* msg);
extern void vSysError(VCONST char* msg);
// Define basic types
typedef unsigned int vKey; // Value for a Key
typedef int ItemVal; // Value for an Item (menu,button, etc)
// typedef unsigned int CmdAttribute; // Attributes of commands
typedef unsigned long CmdAttribute; // Attributes of commands (1.24)
typedef int FontId; // Id for a font
#define vRGB (v,x,y,z) v.r = x ; v.g = y ; v.z = b;
#define vpRGB (v,x,y,z) v->r = x ; v->g = y ; v->z = b;
const int maxFileNameSize = 256;
typedef struct DebugMask
{
unsigned
System : 1, // System debug messages
CmdEvents : 1, // Show command events (buttons, etc.)
MouseEvents : 1, // Show mouse events
WindowEvents : 1, // Window events (resize, etc.)
Build : 1, // Define/Build window
BadVals: 1, // Error values
Misc : 1, // Misc stuff
Text : 1, // Text events
Constructor : 1, // Show constructors
Destructor : 1, // Show destructors
User: 1, // Debug user events
UserApp1 : 1, // Level 1 User App
UserApp2 : 1, // Level 2 User App
UserApp3 : 1;
} DebugMask;
extern DebugMask DebugState; // allow everyone to see DebugState
// Define some macros to make adding debugging stuff easy
#ifdef vDEBUG
#define UserDebug(u,v) if (DebugState.u && DebugState.User) fprintf(stderr,v);
#define UserDebug1(u,v,w) if (DebugState.u && DebugState.User) fprintf(stderr,v,w);
#define UserDebug2(u,v,w,x) if (DebugState.u && DebugState.User) fprintf(stderr,v,w,x);
#define UserDebug3(u,v,w,x,z) if (DebugState.u && DebugState.User) fprintf(stderr,v,w,x,z);
#define SysDebug(u,v) if (DebugState.u && DebugState.System) fprintf(stderr,v);
#define SysDebug1(u,v,w) if (DebugState.u && DebugState.System) fprintf(stderr,v,w);
#define SysDebug2(u,v,w,x) if (DebugState.u && DebugState.System) fprintf(stderr,v,w,x);
#define SysDebug3(u,v,w,x,z) if (DebugState.u && DebugState.System) fprintf(stderr,v,w,x,z);
#else
#define UserDebug(u,v) // Nothing
#define UserDebug1(u,v,w) // Nothing
#define UserDebug2(u,v,y,x) // Nothing
#define UserDebug3(u,v,y,x,z) // Nothing
#define SysDebug(u,v) // Nothing
#define SysDebug1(u,v,w) // Nothing
#define SysDebug2(u,v,w,x) // Nothing
#define SysDebug3(u,v,w,x,z) // Nothing
#endif
enum WindowType { WINDOW, CMDWINDOW, DIALOG }; // Types of windows
// How Items can be set
enum ItemSetType {Checked, Sensitive, Value, Hidden, ChangeList,
ChangeListPtr, Red, Green, Blue, ChangeColor, SetToFirst};
enum CmdType // types of dialog commands
{
C_EndOfList, // Used to denote end of command list
C_ArrowButton, // An arrow button
C_Blank, // filler to help RightOfs, Belows work
C_BoxedLabel, // Boxed label
C_Button, // Button
C_CheckBox, // Checked Item
C_ColorButton, // A colored button
C_ColorLabel, // A colored label
C_Custom, // A custom control
C_ComboBox, // Popup combo list
C_Frame, // General purpose frame
C_Icon, // a display only Icon
C_IconButton, // a command button Icon
C_Label, // Regular text label
C_List, // List of items (scrollable)
C_Menu, // Menu item
C_ProgressBar, // Bar to show progress
C_RadioButton, // Radio button
C_Slider, // Slider to enter value
C_Spinner, // a spinner box
C_TextEdit, // Text edit box
C_TextIn, // Text input field
C_Text, // wrapping text out
C_ToggleButton, // A toggle button
C_ToggleFrame, // A toggle frame
C_ToggleIconButton, // a toggle command button Icon
C_ZZZ // make my life easy
};
enum PaneType // Kinds of Panes
{
P_Canvas, // Drawing Canvas
P_TextCanvas, // TextCanvas
P_Menu, // Menu
P_Commands, // Commands
P_Icons, // Icon Bar
P_Buttons, // Button Bar
P_Status // Status Bar
};
const CmdAttribute CA_None = 0; // No special attributes
const CmdAttribute CA_MainMsg = 0x01; // Gets replacement message
const CmdAttribute CA_DefaultButton = 0x02; // Special Default Button
const CmdAttribute CA_Large = 0x04; // Command larger than normal
const CmdAttribute CA_Small = 0x08; // Command smaller than normal
const CmdAttribute CA_Hidden = 0x10; // Starts out hidden
const CmdAttribute CA_Horizontal = 0x20; // Horizontal orentation
const CmdAttribute CA_Vertical = 0x40; // Vertical orentation
const CmdAttribute CA_NoNotify = 0x100; // Don't notify on all events
const CmdAttribute CA_NoLabel = 0x100; // No label (ProgressCmd only)
const CmdAttribute CA_Simple = 0x100; // backward compatible
const CmdAttribute CA_Password = 0x100; // for text in control only
const CmdAttribute CA_Text = 0x200; // A Spin/Text command
const CmdAttribute CA_TextInNotify = 0x200; // Notify when TextIn changes
const CmdAttribute CA_NoBorder = 0x400; // No border (frames, status bar)
const CmdAttribute CA_NoSpace = 0x800; // No space between widgets
const CmdAttribute CA_ListWidth = 0x800; // Special for lists
const CmdAttribute CA_PerControl = 0x1000; // Specific to different controls
const CmdAttribute CA_Percent = 0x1000; // Show % for ProgressCmd
const CmdAttribute CA_Size = 0x1000; // size specified in size element
// New attributes - require 32 bit, so CmdAttribute is now a long!
const CmdAttribute CA_Flat = 0x10000; // flat icon buttons
// These definitions go here because the user app should not need
// to know about menus and buttons - only the static data structures
// needed to define those things - and so shouldn't have to include
// the header file for each menu or command object
// definitions for dialog box command objects
const ItemVal NoList = 0; // no attributes, items is null list;
const ItemVal NoFrame = 0; // no frame used
typedef struct CommandObject
{
CmdType cmdType; // what kind of item is this
ItemVal cmdId; // unique id for the item
ItemVal retVal; // value returned when picked (might be < 0)
VCONST char* title; // string
void* itemList; // a list of stuff to use for the cmd
CmdAttribute attrs; // bit map of attributes
unsigned
Sensitive : 1; // if item is sensitive or not
ItemVal cFrame; // Frame used for an item
ItemVal cRightOf; // Item placed left of this id
ItemVal cBelow; // Item placed below this one
int size; // Used for sizes
VCONST char* tip; // tip string
} CommandObject;
#define DialogCmd CommandObject // for backward compatibility
typedef struct vMenu
{
VCONST char* label; // The label on the menu
ItemVal menuId; // A User assigned unique value
unsigned
sensitive : 1, // If item is sensitive or not
checked : 1; // If item is checked or not
VCONST char* keyLabel; // Label for an accelerator key
vKey accel; // Value of accelerator key
vMenu* SubMenu; // Ptr to a submenu
unsigned int kShift; // Shift state of accel key
} vMenu;
typedef struct vStatus // for status bars
{
VCONST char* label; // label of button
ItemVal statId; // value
CmdAttribute attrs; // bit map of attributes
unsigned
sensitive : 1; // if button is sensitive or not
int width; // if need to specify width (0 => default)
} vStatus;
// symbols for defining menus
const int noKey = 0;
const int noKeyLbl = 0;
const int isSens = 1;
const int notSens = 0;
const int isChk = 1;
const int notChk = 0;
const int noSub = 0;
const int notUsed = 0;
const int noIcon = 0;
// standard menu definitions
const ItemVal M_File = 32000;
const ItemVal M_Edit = 32001;
const ItemVal M_Search = 32002;
const ItemVal M_Help = 32003;
const ItemVal M_Window = 32004;
const ItemVal M_Options = 32005;
const ItemVal M_Tools = 32006;
const ItemVal M_Font = 32007;
const ItemVal M_View = 32008;
const ItemVal M_Format = 32009;
const ItemVal M_Insert = 32010;
const ItemVal M_Test = 32011;
const ItemVal M_Line = 32090;
const ItemVal M_New = 32100;
const ItemVal M_Open = 32101;
const ItemVal M_Close = 32102;
const ItemVal M_Save = 32103;
const ItemVal M_SaveAs = 32104;
const ItemVal M_Print = 32105;
const ItemVal M_PrintPreview = 32106;
const ItemVal M_About = 32107;
const ItemVal M_Exit = 32108;
const ItemVal M_CloseFile = 32109; // V:1.13
const ItemVal M_Cut = 32110;
const ItemVal M_Copy = 32111;
const ItemVal M_Paste = 32112;
const ItemVal M_Delete = 32113;
const ItemVal M_Clear = 32114;
const ItemVal M_UnDo = 32120;
const ItemVal M_SetDebug = 32121;
const ItemVal M_SaveClose = 32122;
const ItemVal M_Abandon = 32123;
const ItemVal M_Find = 32130;
const ItemVal M_FindAgain = 32131;
const ItemVal M_Replace = 32132;
const ItemVal M_Preferences = 32135;
const ItemVal M_FontSelect = 32136;
const ItemVal M_User0 = 32140;
const ItemVal M_User1 = 32141;
const ItemVal M_User2 = 32142;
const ItemVal M_User3 = 32143;
const ItemVal M_User4 = 32144;
const ItemVal M_User5 = 32145;
const ItemVal M_User6 = 32146;
const ItemVal M_User7 = 32147;
const ItemVal M_User8 = 32148;
const ItemVal M_User9 = 32149;
const ItemVal M_Cancel = 32150;
const ItemVal M_Done = 32151;
const ItemVal M_OK = 32152;
const ItemVal M_Yes = 32153;
const ItemVal M_No = 32154;
const ItemVal M_All = 32155;
const ItemVal M_None = 32156;
const ItemVal M_TextInChange = 32158;
const ItemVal M_TextInLeaveFocus = 32159;
// Definitions for drawing
typedef struct vPoint // a point
{
short x, y; // X version
} vPoint;
typedef struct vRect
{
short x,y,w,h;
} vRect;
typedef struct vLine
{
short x,y,xend,yend;
} vLine;
// for brushes and pens
const int vSolid = 1;
const int vTransparent = 2;
// for brushes
const int vHorizontalHatch = 3;
const int vVerticleHatch = 4;
const int vVerticalHatch = 4;
const int vLeftDiagonalHatch = 5;
const int vRightDiagonalHatch = 6;
const int vCrossHatch = 7;
const int vDiagonalCrossHatch = 8;
// for pens
const int vDash = 9;
const int vDot = 10;
const int vDashDot = 11;
// for filling
const int vAlternate = 12;
const int vWinding = 13;
#endif

View File

@ -1,200 +0,0 @@
//================================================================
// vapp.h - the vapp base object - X11R5 version
//
// Copyright (C) 1995-1998 Bruce E. Wampler
//
// This file is part of the V C++ GUI Framework, and is covered
// under the terms of the GNU Library General Public License,
// Version 2. This library has NO WARRANTY. See the source file
// vapp.cxx for more complete information about license terms.
//===============================================================
#ifndef VAPP_H
#define VAPP_H
#include <v/vbaseitm.h> // our parent class
#include <v/vfont.h> // our parent class
#include <v/vawinfo.h>
#include <v/vmenu.h>
#include <v/vtimer.h>
extern "C" // wrap in "C"
{
#include <X11/Core.h>
#include <X11/Shell.h>
#include <X11/StringDefs.h>
}
extern int AppMain(int, char**);
class vWindow;
typedef struct WindList
{
vWindow* window;
vAppWinInfo* info;
WindList* nextWinList;
} WindList;
#ifndef Athena
typedef struct TaskList
{
vWindow* window;
ItemVal cmd;
TaskList* nextTask;
} TaskList;
#endif
class _appWorkTimer : public vTimer
{
public: //---------------------------------------- public
_appWorkTimer() {}
~_appWorkTimer() {}
virtual void TimerTick();
private: //--------------------------------------- private
};
class vApp : public vBaseItem
{
// give friend access to some special things
friend class vWindow; // Provide access for vWindow class
friend int main(int, char**); // give main access
friend class _appWorkTimer;
public: //---------------------------------------- public
vApp(VCONST char* appName, int simSDI = 0, int fh = 0, int fw = 0); // constructor
virtual ~vApp() // destructor
{
SysDebug(Destructor,"vApp::~vApp destructor\n")
if (theClipboard != 0)
delete [] theClipboard; // free last chunk
}
// Methods to override
virtual void AppCommand(vWindow* win, ItemVal id, ItemVal retval, CmdType ctype);
virtual void CloseLastCmdWindow(vWindow* win, int exitcode);
virtual int CloseAppWin(vWindow* win);
virtual int CloseHelpWin(vWindow* win);
int IsHelpWin(vWindow *Win);
virtual void Exit(void);
virtual void KeyIn(vWindow* win, vKey key, unsigned int shift);
virtual vWindow* NewAppWin(vWindow* win, VCONST char* name, int w, int h,
vAppWinInfo* winInfo = 0);
virtual vWindow* NewHelpWin(vWindow* win, VCONST char* name, int w, int h);
virtual void DropFile(const char* fn) {}
int ClipboardSetText(VCONST char* text, int DoXOwn = 1) VCONST;
char* ClipboardGetText() VCONST;
int ClipboardCheckText() VCONST;
void ClipboardClear() VCONST;
// Tasking
void CheckEvents();
int EnableWorkSlice(long slice);
virtual void WorkSlice() {} // No op by default
// Utlity methods
void showAppWin(bool show) {} // No op in X
void GetVVersion(int& major, int& minor)
{ major = V_VersMajor; minor = V_VersMinor; }
int DefaultHeight() { return _DefaultHeight; }
int DefaultWidth() {return _DefaultWidth; }
int ScreenHeight() { return _DisplayHeight; }
int ScreenWidth() {return _DisplayWidth; }
int IsRunning() {return _running;} // see if app is running
vFont GetDefaultFont();
void SendWindowCommandAll(ItemVal id, int val, CmdType ctype);
void UpdateAllViews(vWindow* sender = NULL, int hint = 0,
void* pHint = NULL);
void SetValueAll(ItemVal id, int val, ItemSetType setType) VCONST;
void SetAppTitle(VCONST char* title);
void SetStringAll(ItemVal id, VCONST char* str);
int ShowList();
vAppWinInfo *getAppWinInfo(vWindow* Win);
// Required internally
// These need to be global, sorry...
#ifndef Athena
Boolean MotifIdleWork(XtPointer client_data);
int MotifSetTask(vWindow* vw, ItemVal id);
#endif
int XCheckSelection();
void XWaitUntilMapped(Widget w);
Atom vx_wm_protocols; // Stuff for X protocols
Atom vx_wm_delete_window;
vMenuPane* GetMenuThis(Widget w); // needed for submenus
int simSDI() { return _simSDI;}
// X stuff
Display* display() // To get the X display
{ return _display; }
Window xWindow();
XtAppContext appContext() // To get the context
{ return _appContext; }
int Xdepth() {return _depth;}
Pixel Xfg() {return _foregroundPix;}
Pixel Xbg() {return _backgroundPix;}
Colormap Xcolormap() {return _colormap;}
XFontStruct* _XDefaultFont; // set by default or -fn switch
void doXEventLoop();
protected: //--------------------------------------- protected
WindList* _WindowList; // List of "top level" windows
int _running; // if we are running
void registerWindow(vWindow* Win, vAppWinInfo* awinfo);
void unregisterWindow(vWindow* Win);
// The following is called from main.
void initialize(int& argc, char** argv);
private: //--------------------------------------- private
int _frameWidth, _frameHeight;
int _DefaultHeight;
int _DefaultWidth;
int _simSDI; // not used in X, but in windows
XtWorkProcId work_id;
#ifndef Athena
TaskList* _taskList;
#endif
_appWorkTimer* _workTimer; // timer for work slice
void DispatchWork(void);
// X stuff
Display* _display; // Needed by X sometimes
Window _xwindow; // Window of root window
XtAppContext _appContext; // Main app context
Colormap _colormap;
Pixel _foregroundPix; // foreground pixel value
Pixel _backgroundPix; // background pixel value
int _depth; // depth
int _DisplayHeight; // height of display
int _DisplayWidth; // width of display
static const int ClipAllocUnit = 1024;
VMUTABLE int ClipMax;
VMUTABLE char* theClipboard;
};
extern vApp *theApp; // Pointer to single global instance
#endif

Some files were not shown because too many files have changed in this diff Show More