Filewatcher File Search
FTP Search
  
Directory 
  
Content Search 
   
pkg://xvisual-1.0.1-1.src.rpm:1058159/xvisual-1.0.1.tar.gz  info  downloads

xvisual/ 40755    765    144           0  6165752612  11221 5ustar  steveusersxvisual/Makefile100600    765    144         670  6145631712  12724 0ustar  steveusersCC=g++
AR=ar
LD=ld
RANLIB=ranlib
CFLAGS= -O 
INCLUDES= -I.
LIBS=-L.
XLIBS= -lXaw3d -lXmu -lXt -lSM -lICE -lXext -lX11 
VLIBS= -lxv

static::	dummy
	make -C ./xv -f Makefile.static all

shared::	dummy
	make -C ./xv -f Makefile.shared all

xvis::	dummy
	make -C ./xvis all

all::	xv xvis 

clean:
	cd ./xv; make -f Makefile.shared distclean; make -f Makefile.static distclean; cd ..
	cd ./xvis; make clean; cd ..

remake:: clean all

dummy:

xvisual/README100644    765    144        1777  6164231407  12203 0ustar  steveusersXVisual Interface Builder.

Distribution 1.0.0
---------------------

System Requirements:-

	Linux 1.2.13 or higher (ELF)
	X11R6
	Athena Xaw3D Widget Set (supplied).

System last tested on the following:-
	
	Linux pre 2.0.4
	X11R6
	Xaw3D.6.0
	libc.so.5.2.18
	binutils 2.6.0.14
	
This system consists of three parts:-
		
	1. Athena Xaw3D widget set. This is supplied since this distribution will not work with
		the standard Athena widget set (Xaw3d.tar.gz).

	2. The xvisual class library. This is a set of C++ class 'wrappers' for the Xaw3D
		widgets. (xv) (static or shared).

	3. The xvisual interface builder itself (xvis).

Thanks for taking the time to have a look at this BETA release. Please mail any 
comments, suggestions, bugs reports, etc to..

	steve@phoenix.bim.napier.ac.uk

Check for further updates at...

	ftp://phoenix.bim.napier.ac.uk/pub/xvisual

Xvisual Homepage is at...

	http://mail.bim.napier.ac.uk/~xvisual

-------------------------------------------------------------------------
Steve Carrie
xvisual/install.xvis100700    765    144         117  6141622101  13626 0ustar  steveusers#!/bin/sh
#

cp ./xvis/xvis /usr/local/bin/xvis
chmod 755 /usr/local/bin/xvis

xvisual/xv/ 40755    765    144           0  6165756504  11662 5ustar  steveusersxvisual/xv/template100644    765    144        1766  6164234401  13511 0ustar  steveusers
/*     *******************************************************************************
	XVisual GUI Development System for Linux/X-Window
	Copyright (C) 1996 Steve Carrie.

        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.
        ******************************************************************************* */

xvisual/xv/X11/ 40700    765    144           0  6141622131  12177 5ustar  steveusersxvisual/xv/X11/xv/ 40700    765    144           0  6141622142  12636 5ustar  steveusersxvisual/xv/X11/xv/xvDropDown.h100644    765    144        2526  6141622146  15241 0ustar  steveusers#ifndef _VxvDropDown_h
#define _VxvDropDown_h


class xvDropDown: public xvCore
{
	
	public:
		xvDropDown();
		xvDropDown(String name, xvCore & parent, int numargs, char **argdata,
				XtCallbackProc button_callback, XtCallbackProc select_callback,
				int vdepth=5, int currentindex=0);
		~xvDropDown();

		void init(String name, xvCore & parent, int numargs,  char **argdata,
			XtCallbackProc button_callback, XtCallbackProc select_callback,
			int vdepth=5, int currentindex=0);

		Widget ID();
		void DropDownOpen();
		int DropDownClose(XtPointer calldata);
		void SetCurrent(int xcur);
		void SetButtonResource(String rname, XtArgVal resource);
		void SetListResource(String rname, XtArgVal resource);
		void SetLabelResource(String rname, XtArgVal resource);
		void SetAllResource(String rname, XtArgVal resource);
		void SetNewList(int numargs, char *argdata[], int currentindex=0);
		void ChangeFont(String name);
		void ChangeWidth(Dimension wid);
		void SetBackground(String name);
		void SetForeground(String name);
		void SetSensitive(Boolean sense);
		
	private:
		void CalcHeights();
 
		xvForm dropform;
		xvLabel droplabel;
		xvButton dropbutton;
		xvPopupShell dropshell;
		xvView dropview;
		xvList droplist;
	
		int bwidth, miscwidth;
		int numlist;
		int ddepth;
		int current;
		int labelwidth;
		char* *copydata;
};


#endif // _VxvDropDown_h
xvisual/xv/X11/xv/xvButton.h100644    765    144        1212  6142402056  14744 0ustar  steveusers#ifndef _VxvButton_h
#define _VxvButton_h

#define XVCENTREBITMAP	0
#define XVLEFTBITMAP		1

class xvButton: public xvCore
{
	
	public:
		xvButton();
		xvButton(char *name, xvCore & parent, XtCallbackProc callback, 
			String client=NULL);
		~xvButton();

		void init(char *name, xvCore & parent, XtCallbackProc callback, 
			String client=NULL);
		void init(char *name, Widget parent, XtCallbackProc callback, 
			String client=NULL);

		void ChangeFont(String fontname);
		int ChangeBitmap(String name, int pixtype=XVBITMAP, int position=XVCENTREBITMAP);

	private:
		xvFont bfont;
		xvBasicBitmap bmap;
		Boolean alloc;
};

#endif // _VxvButton_h
xvisual/xv/X11/xv/xvRepeater.h100644    765    144        1232  6142413703  15243 0ustar  steveusers#ifndef _VxvRepeater_h
#define _VxvRepeater_h

#define XVCENTREBITMAP	0
#define XVLEFTBITMAP	1

class xvRepeater: public xvCore
{
	public:
	  xvRepeater();
	  xvRepeater(String name, xvCore & parent, XtCallbackProc callback, String client,
		XtCallbackProc startcall, XtCallbackProc stopcall);
	  ~xvRepeater();

	  void init(char *name, xvCore & parent, XtCallbackProc callback, String client,
		XtCallbackProc startcall, XtCallbackProc stopcall);
	  void ChangeFont(String fontname);
	  int ChangeBitmap(String name, int pixtype=XVBITMAP, int position=XVCENTREBITMAP);

	private:
		Boolean alloc;
		xvFont bfont;
		xvBasicBitmap bmap;
};

#endif // _VxvRepeater_h
xvisual/xv/X11/xv/xvCore.h100644    765    144       11575  6141622146  14421 0ustar  steveusers#ifndef _VxvCore_h
#define _VxvCore_h

#include <X11/Xaw3d/Form.h>
#include <X11/Xaw3d/Label.h>
#include <X11/Xaw3d/Tree.h>

class xvCore
{
	public:
		~xvCore();

// ************************
//              xvCore Resource methods
//************************
		
		virtual void Hide();
		virtual void Show();
		virtual void Map();
		virtual void Unmap();

		virtual void SetAccelerators(XtAccelerators atable);
		virtual void SetAncestorSensitive(Boolean sense);
		virtual void SetBackground(Pixel b);
		virtual void SetBackground(String colour);
		virtual void SetBackgroundPixmap(Pixmap p);
		virtual void SetBorderColor(Pixel b);
		virtual void SetBorderColor(String colour);
		virtual void SetBorderPixmap(Pixmap p);
		virtual void SetBorderWidth(Dimension b);
		virtual Dimension GetBorderWidth();
		virtual void SetColormap(Colormap c);
		virtual void SetDepth(int d);
		virtual int GetDepth();
		virtual void SetDestroyCallback(XtCallbackProc d);
		virtual void SetHeight(Dimension h);
		virtual Dimension GetHeight();
		virtual void SetMappedWhenManaged(Boolean m);
		virtual void SetSensitive(Boolean s);
		virtual void SetTranslations(XtTranslations trans);
		virtual void OverrideTranslations(XtTranslations trans);
		virtual void AugmentTranslations(XtTranslations trans);
		virtual void SetWidth(Dimension xw);
		virtual Dimension GetWidth();
		virtual void SetX(Position x);
		virtual Position GetX();
		virtual void SetY(Position y);
		virtual Position GetY();
		virtual void SetXY(Position x, Position y);
		virtual void GetXY(Position *x, Position *y);
		virtual void SetGeometry(Position x, Position y, Dimension wid, Dimension h);
		virtual void GetGeometry(Position*x, Position *y, Dimension *wid, Dimension *h);
		virtual void SetSize(Dimension wid, Dimension h);
		virtual void GetSize(Dimension *wid, Dimension *h);

		virtual void SetResource(String rname, XtArgVal val);
		virtual void GetResource(String rname, XtArgVal *val);

		virtual void AddEvent(EventMask eventmask, XtEventHandler hander, XtPointer cdata);
		virtual void RemoveEvent(EventMask eventmask, XtEventHandler hander, XtPointer cdata);
		virtual void AddGrab(Boolean exclusive, Boolean sprung);
		virtual void RemoveGrab();


// ********************************
//		Widget-Specific Resources
// ********************************

		virtual void SetLabel(String lab);
		virtual void SetFont(XFontStruct *xfs);
		virtual void SetForeground(Pixel fg);
		virtual void SetForeground(String colour);
		virtual void SetFontSet(XFontSet xfnt);
		virtual void SetJustify(XtJustify xj);
		virtual void SetCallback(XtCallbackProc callback);
		virtual void SetInternalHeight(Dimension ih);
		virtual Dimension GetInternalHeight();
		virtual void SetInternalWidth(Dimension iw);
		virtual Dimension GetInternalWidth();
		virtual void SetCursorName(String cname);
		virtual void SetCursor(Cursor curs);
	
// ********************************
//		Constraint Resources
// ********************************

		virtual void SetIcon(Pixmap ico);
		virtual void SetHSpace(Dimension hs);
		virtual void SetVSpace(Dimension vs);
		virtual void SetBottomEdge(XawEdgeType bedge);
		virtual void SetLeftEdge(XawEdgeType ledge);
		virtual void SetRightEdge(XawEdgeType redge);
		virtual void SetTopEdge(XawEdgeType tedge);
		virtual void SetRelHorizontal(xvCore & wg);
		virtual void SetRelVertical(xvCore & wg);
		virtual void SetRelative(xvCore & hg, xvCore & vg);
		virtual void SetResizable(Boolean srz);
		virtual void SetVertDistance(int vd);
		virtual int GetVertDistance();
		virtual void SetHorizDistance(int hd);
		virtual int GetHorizDistance();
		virtual void SetDistance(int hd, int vd);
		virtual void GetDistance(int *hd, int *vd);
		virtual void SetDefaultDistance(int dd);
		virtual void SetTreeGC(GC ngc);
		virtual void SetTreeParent(Widget parent);
		virtual void SetTreeParent(xvCore & parent);
		virtual void SetFixedPosition(Boolean fix);

// ***********************
//              ThreeD Methods
// ***********************

		virtual void SetShadowWidth(Dimension sw);
		virtual void SetTopShadowPixel(Pixel tsp);
		virtual void SetTopShadowPixel(String colour);
		virtual void SetBottomShadowPixel(Pixel bsp);
		virtual void SetBottomShadowPixel(String colour);
		virtual void SetTopShadowContrast(int tsc);
		virtual void SetBottomShadowContrast(int bsc);
		virtual void SetUserData(XtPointer ud);
		virtual void SetBeNiceToColormap(Boolean bntc);

		virtual Pixel stringToPixel(String colname);

// *********************
//              Other methods
// *********************

		virtual Pixmap SetBitmapInfo(char *bits, unsigned int sw, unsigned int sh, 
			String resource=NULL);	
		virtual Pixmap SetBitmapInfo(unsigned char *bits, unsigned int sw, unsigned int sh, 
			String resource=NULL);	
		virtual Pixmap SetPixmapInfo(char **bits, String resource=NULL);

		virtual void SetBitmap(Pixmap pix);
		virtual Widget ID();

	protected:
		Widget w;
		Pixmap icon, iconmask;
};

#endif // _VxvCore_hxvisual/xv/X11/xv/xvLabel.h100644    765    144         757  6142410463  14506 0ustar  steveusers#ifndef _VxvLabel_h
#define _VxvLabel_h

#define XVCENTREBITMAP	0
#define XVLEFTBITMAP	1

class xvLabel: public xvCore
{
	public:
		xvLabel();
		xvLabel(String name, xvCore & parent);
		~xvLabel();

		void init(String name, xvCore & parent);
		void init(String name, Widget parent);
		void ChangeFont(String fontname);
		int ChangeBitmap(String name, int pixtype=XVBITMAP, int position=XVCENTREBITMAP);

	protected:
		Boolean alloc;
		xvFont bfont;
		xvBasicBitmap bmap;
};


#endif _VxvLabel_h
xvisual/xv/X11/xv/xvList.h100644    765    144        1337  6141622146  14417 0ustar  steveusers#ifndef _VxvList_h
#define _VxvList_h

#include <X11/Xaw3d/List.h>

class xvList: public xvCore
{
	public:
		xvList();
		xvList(String name, xvCore & parent, XtCallbackProc callback, 
			int numdata, char **listdata, int columns);
		~xvList();

		void init(String name, xvCore & parent, XtCallbackProc callback, 
			int numdata, char **listdata, int columns);

		void init(String name, Widget parent, XtCallbackProc callback, 
			int numdata, char **listdata, int columns);

 		void SetList(int numdata, char **listdata);
		void Highlight(int item);
		void Unhighlight();
		XawListReturnStruct *ShowCurrent();
		int GetLongest();
		void ChangeFont(String fontname);

	private:
		Boolean alloc;
		xvFont bfont;
};

#endif // _VxvList_h
xvisual/xv/X11/xv/xvContext.h100644    765    144        1637  6146562647  15151 0ustar  steveusers#ifndef _VxvContext_h
#define _VxvContext_h

#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>

class xvContext: public xvCore
{
	public:
		xvContext();
		xvContext(String name, int argc, char **argv);
		~xvContext();

		void init(String name, int argc, char **argv);
		XtAppContext GetContext();
		void ServiceEvent(); 

		void RegisterWorkProc(XtWorkProc proc, XtPointer cdata);
		void UnregisterWorkProc();

		void AddAction(String acname, XtActionProc proc);
		
		XtActionHookId AddActionHook(XtActionHookProc proc, XtPointer clientdata);
		void RemoveActionHook();	

		void Error(String message);
		void ErrorMsg(String name, String etype, String eclass, String edefault, String *params,
			Cardinal *numpar);

	private:
		Display *ContextDisplay;
		XtAppContext ContextContext;
		XEvent ContextEvent;
		XtWorkProcId wproc;
		XtActionHookId waction;
		Boolean actionset;
		int flushcount;
};

#endif // _VxvContext_h
xvisual/xv/X11/xv/xvMenuBar.h100644    765    144        1332  6141622146  15030 0ustar  steveusers#ifndef _VxvMenuBar_h
#define _VxvMenuBar_h

class xvMenuBar: public xvCore
{
	public:
	  xvMenuBar();
	  xvMenuBar(String name, xvCore & parent, int num, char **menuinfo, Boolean manage=TRUE);	 
	  ~xvMenuBar();

	  void init(String name, xvCore & parent, int num, char **menuinfo, Boolean manage=TRUE);	 

	  Widget GetButton(char *name);
	  void SetResource(String name, String resource, XtArgVal val);
	  void SetAllResource(String resource, XtArgVal val);
	  void ManageChildren(Boolean manage=TRUE);
	  void ChangeFont(String fontname);

	private:
	  void setupMenu(int num, char **menuinfo);

	  int numbuttons;
	  Widget MenuButtons[30];
	  char *menulist[30];	
	  Boolean alloc;
	  xvFont bfont;
};

#endif _VxvMenuBar_h
xvisual/xv/X11/xv/xvPanner.h100644    765    144        1257  6141622146  14730 0ustar  steveusers#ifndef _VxvPanner_h
#define _VxvPanner_h

class xvPanner: public xvCore
{
	public:
		xvPanner();
		xvPanner(String name, xvCore & parent, XtCallbackProc callback,
			Dimension sizeH, Dimension sizeW, Position InitX, Position InitY);
		~xvPanner();

		void init(String name, xvCore & parent, XtCallbackProc callback,
			Dimension sizeH, Dimension sizeW, Position InitX, Position InitY); 		

		void SetSliderPosition(Position XPos, Position YPos);
		void SetSliderSize(Dimension sx, Dimension sy);
		void SetCanvasSize(Dimension sx, Dimension sy);
		void SetdefaultScale(Dimension sca);
		void Where(Position *XPos, Position *YPos);

	private:
		Boolean alloc;
};

#endif // _VxvPanner_h
xvisual/xv/X11/xv/xvPopupMenu.h100644    765    144        1576  6141622146  15441 0ustar  steveusers#ifndef _VxvPopupMenu_h
#define _VxvPopupMenu_h

class xvPopupMenu: public xvPopupShell
{
	public:
		xvPopupMenu();
		xvPopupMenu(char *name, char *header, int argc, char **argv, 
			XtCallbackProc proclist[], xvCore & parent);
		~xvPopupMenu();
	  
		void init(char *name, char *header, int argc, char **argv, 
			XtCallbackProc proclist[], xvCore & parent);

		void MenuEntry(String name, String newname);
		void EntryResource(String name, String resname, XtArgVal res);

		void CheckEntry(char *name);
		void UnCheckEntry(char *name);
		
		Widget GetWidget(char *name);
		void AllResource(String resname, XtArgVal res);
		void ChangeFont(String fontname);
		
	private:
		int findentry(char *name);

		int numentries;
		Widget Sep;
		Widget WidgetList[20];
		Widget MyParent;
		char *listentry[20];
		Pixmap mark;
		XtTranslations mtranslations;
		xvFont bfont;
};

#endif // _VxvPopupMenu_h
xvisual/xv/X11/xv/xvFileList.h100644    765    144        3107  6141622146  15214 0ustar  steveusers#ifndef _VxvFileList_h
#define _VxvFileList_h

#define XVFILELIST	0
#define XVDIRLIST	1
#define XVALLLIST	2

#define XVRELATIVEPATH	0
#define XVABSOLUTEPATH	1

class xvFileList: public xvView, public xvList
{
	public:
		xvFileList();
		xvFileList(String name, xvCore & parent, String path, int mode, Boolean hidden,
				XtCallbackProc filelist_callback, Boolean manage=TRUE);
		~xvFileList();

		void init(String name, xvCore & parent, String path, int mode, Boolean hidden,
				XtCallbackProc filelist_callback, Boolean manage=TRUE);

		int SetNewPath(String pathname, int mode, Boolean hidden);

		void GetResource(String resname, XtArgVal *val);
		void SetResource(String resname, XtArgVal val);
		void SetFixedPosition(Boolean val);

		char *GetSelectedItem(XtPointer call, int pathmode);
		char *Directory(String path);

		void SetForeground(String name);
		void SetForeground(Pixel fg);
		void SetBackground(String name);
		void SetBackground(Pixel bg);

		void Map();
		void Unmap();
		void SetSensitive(Boolean sense);
		void SetMappedWhenManaged(Boolean man);
		
		void AddEvent(EventMask eventmask, XtEventHandler handler, XtPointer cdata);
		void RemoveEvent(EventMask eventmask, XtEventHandler handler, XtPointer cdata);

	private:

		int NewPath(String pathname, int mode, Boolean hidden);
		int GetNumEntries(String pathname);
		int ParseFileTree(String pathname);
		
		char currentpath[180];
		char workingbuffer[180];
		char dirbuffer[180];

		char* *filelist;
		struct dirent *superlist;

		int numfiles, numentries, datamode;
		Boolean allocflag, hiddenflag;

};

#endif // _VxvFileList_h
xvisual/xv/X11/xv/xvToggle.h100644    765    144        1405  6142410715  14717 0ustar  steveusers#ifndef _VxvToggle_h
#define _VxvToggle_h

#define XVCENTREBITMAP	0
#define XVLEFTBITMAP	1

class xvToggle: public xvCore
{
	public:
		xvToggle();
		xvToggle(String name, xvCore & parent, XtCallbackProc callback,
				String radiodata=NULL);
		~xvToggle();

		void init(String name, xvCore & parent, XtCallbackProc callback,
				String radiodata=NULL);
				
		void ChangeGroup(xvCore & group);
		void ChangeCurrent(String rdata);
		void UnSetGroup();
		XtPointer GetCurrent();
		void ChangeFont(String fontname);
		int ChangeBitmap(String name, int pixtype=XVBITMAP, int position=XVCENTREBITMAP);
	
		void On();
		void Off();
		void State(Boolean statex);
		Boolean GetState();

	private:
		Boolean alloc;	  
		xvFont bfont;
		xvBasicBitmap bmap;
};

#endif // _VxvToggle_h
xvisual/xv/X11/xv/xv.h100644    765    144        4545  6141622146  13567 0ustar  steveusers// Basic XT Includes

#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/Shell.h>
#include <X11/Xcms.h>
#include <X11/xpm.h>

// Athena Includes

#include <X11/Xaw3d/ThreeD.h>
#include <X11/Xaw3d/SmeThreeD.h>
#include <X11/Xaw3d/AsciiSink.h>
#include <X11/Xaw3d/AsciiSrc.h>
#include <X11/Xaw3d/AsciiText.h>
#include <X11/Xaw3d/Box.h>
#include <X11/Xaw3d/Cardinals.h>
#include <X11/Xaw3d/Command.h>
#include <X11/Xaw3d/Dialog.h>
#include <X11/Xaw3d/Form.h>
#include <X11/Xaw3d/Grip.h>
#include <X11/Xaw3d/Label.h>
#include <X11/Xaw3d/List.h>
#include <X11/Xaw3d/MenuButton.h>
#include <X11/Xaw3d/MultiSink.h>
#include <X11/Xaw3d/MultiSrc.h>
#include <X11/Xaw3d/Panner.h>
#include <X11/Xaw3d/Porthole.h>
#include <X11/Xaw3d/Repeater.h>
#include <X11/Xaw3d/Reports.h>
#include <X11/Xaw3d/Scrollbar.h>
#include <X11/Xaw3d/Simple.h>
#include <X11/Xaw3d/SimpleMenu.h>
#include <X11/Xaw3d/Sme.h>
#include <X11/Xaw3d/SmeBSB.h>
#include <X11/Xaw3d/SmeLine.h>
#include <X11/Xaw3d/StripChart.h>
#include <X11/Xaw3d/Text.h>
#include <X11/Xaw3d/TextSink.h>
#include <X11/Xaw3d/TextSrc.h>
#include <X11/Xaw3d/Toggle.h>
#include <X11/Xaw3d/Tree.h>
#include <X11/Xaw3d/Viewport.h>

// xv Includes

#include <X11/xv/xvCore.h>
#include <X11/xv/xvRegion.h>
#include <X11/xv/xvGC.h>
#include <X11/xv/xvFont.h>
#include <X11/xv/xvBasicBitmap.h>
#include <X11/xv/xvFontList.h>
#include <X11/xv/xvGraphic.h>
#include <X11/xv/xvCursor.h>

#include <X11/xv/xvGrip.h>
#include <X11/xv/xvBox.h>
#include <X11/xv/xvContext.h>
#include <X11/xv/xvForm.h>
#include <X11/xv/xvWindow.h>
#include <X11/xv/xvButton.h>
#include <X11/xv/xvRepeater.h>
#include <X11/xv/xvDialog.h>
#include <X11/xv/xvEditField.h>
#include <X11/xv/xvLabel.h>
#include <X11/xv/xvList.h>
#include <X11/xv/xvMenuBar.h>
#include <X11/xv/xvPanner.h>
#include <X11/xv/xvPopupShell.h>
#include <X11/xv/xvPopupTransientShell.h>
#include <X11/xv/xvPulldownMenu.h>
#include <X11/xv/xvScrollbar.h>
#include <X11/xv/xvToggle.h>
#include <X11/xv/xvTree.h>
#include <X11/xv/xvView.h>
#include <X11/xv/xvVisualForm.h>
#include <X11/xv/xvVisualList.h>
#include <X11/xv/xvPopupMenu.h>
#include <X11/xv/xvPopupDialog.h>
#include <X11/xv/xvDropDown.h>
#include <X11/xv/xvMsgBox.h>
#include <X11/xv/xvFileDialog.h>
#include <X11/xv/xvSizer.h>
#include <X11/xv/xvBitmap.h>
#include <X11/xv/xvTimer.h>
#include <X11/xv/xvFileList.h>
#include <X11/xv/xvEditWindow.h>xvisual/xv/X11/xv/xvView.h100644    765    144        1060  6141622146  14407 0ustar  steveusers#ifndef _VxvView_h
#define _VxvView_h

class xvView: public xvCore
{
	public:
		xvView();
		xvView(String name, xvCore & parent, Boolean manage=TRUE, 
			Boolean HScrollbar=FALSE, Boolean VScrollbar=FALSE);
		~xvView();

		void init(String name, xvCore & parent, Boolean manage=TRUE, 
			Boolean HScrollbar=FALSE, Boolean VScrollbar=FALSE);

		void init(String name, Widget parent, Boolean manage=TRUE, 
			Boolean HScrollbar=FALSE, Boolean VScrollbar=FALSE);

		void ManageChildren(Boolean manage=TRUE);		

	private:
		Boolean alloc;
};

#endif // _VxvView_h
xvisual/xv/X11/xv/xvFileDialog.h100644    765    144        3453  6165755240  15514 0ustar  steveusers#ifndef _VxvFileDialog_h
#define _VxvFileDialog_h

class xvFileDialog:public xvCore
{
	public:
		xvFileDialog();
		xvFileDialog(String name, xvCore & parent, String pathname,
				XtCallbackProc filelist_callback, XtCallbackProc dirlist_callback,
				XtCallbackProc ok_callback, XtCallbackProc cancel_callback,
				XtCallbackProc err_callback, XtActionProc edit_callback,
				xvContext & appcontext, String mask, Boolean maskActive=FALSE,
				Boolean allowDirchange=TRUE);
		~xvFileDialog();

		void init(String name, xvCore & parent, String pathname,
				XtCallbackProc filelist_callback, XtCallbackProc dirlist_callback,
				XtCallbackProc ok_callback, XtCallbackProc cancel_callback,
				XtCallbackProc err_callback, XtActionProc edit_callback,
				xvContext & appcontext, String mask, Boolean maskActive=FALSE,
				Boolean allowDirchange=TRUE);

		void ClearError(XtPointer calldata);
		void NewPath(String pathname);
		void EditEntry();
		
		String File(XtPointer call);
		String Directory(XtPointer call);

		String SelectedFile(String returnpathname);
		void UpdateFileBox(String newstr);

	private:
		
		void UpdateFileList();
		void UpdateDirList();
		int GetNumEntries(String pathname);
		int ParseFileTree(String pathname, int entries);
		void ToggleClick(Widget wd, XtPointer cl, XtPointer ca);

		xvForm tform;
		xvLabel tflabel, tdlabel, tfblabel, pathlabel;
		xvView tfbview, tdview;
		xvList tdlist, tfblist;
		xvButton ok, cancel;
		xvLabel rspacer, bspacer;
		xvEditField tfedit;
		xvToggle ttoggle;
		xvMsgBox tmsg;

		char currentpath[180];
		char currentfile[40];
		char currentnum[30];
		char filemask[80];
		char* *filelist;
		char* *dirlist;
		struct dirent *superlist;
		struct stat *statlist;

		int numfiles, numdirs, numentries;
		Boolean usemask;
		int allocflag, hiddenflag;
};

#endif // _VxvFileDialog_h
xvisual/xv/X11/xv/xvWindow.h100644    765    144        1347  6141622146  14754 0ustar  steveusers#ifndef _VxvWindow_h
#define _VxvWindow_h


class xvWindow: public xvGraphic
{
	public:
		xvWindow();
		xvWindow(String name, String classname, xvCore &TopLevel);
		~xvWindow();

		void init(String name, String classname, xvCore &TopLevel);
		void Open();
		void Close();
		void MovePointer(int x, int y);
		void SetWindowResource(String resname, XtArgVal res);
		void GetWindowResource(String resname, XtArgVal *res);
	
		Widget GetParent();
		int LoadNewIcon(String name, int pixtype=XVBITMAP);
		void ReleaseBorder();
		void FixBorder(Dimension width, Dimension height);
		void SetWindowLocation(Position x, Position y);

	private:
	  Widget BParent;
	  Boolean BOpen;
	  Boolean alloc;
	  xvBasicBitmap iconmap;
};

#endif // _VxvWindow_h
xvisual/xv/X11/xv/stop.xbm100600    765    144        5732  6141622146  14445 0ustar  steveusers#ifndef _Vstop_xbm
#define _Vstop_xbm

#define stop_width 58
#define stop_height 59
static char stop_bits[] = {
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff,
  0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00,
  0x00, 0x80, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff,
  0xff, 0x1f, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00,
  0x00, 0xf0, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff,
  0xff, 0xff, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00,
  0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0xff,
  0xff, 0xff, 0x07, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00,
  0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0xe0, 0xff, 0xff, 0xff,
  0xff, 0xff, 0x3f, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00,
  0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, 0xff,
  0xff, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
  0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, 0xff,
  0xff, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
  0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf8, 0x7f, 0x10, 0xe0,
  0x70, 0xe0, 0xff, 0x00, 0xf8, 0x3f, 0xd3, 0x6c, 0xe6, 0xcc, 0xff, 0x00,
  0xf8, 0x3f, 0xd7, 0x2c, 0xcf, 0xcc, 0xff, 0x00, 0xf8, 0x3f, 0xfe, 0x3c,
  0xcf, 0xcc, 0xff, 0x00, 0xf8, 0x7f, 0xf8, 0x3c, 0xcf, 0xe0, 0xff, 0x00,
  0xf8, 0xff, 0xf1, 0x3c, 0xcf, 0xfc, 0xff, 0x00, 0xf8, 0xbf, 0xf3, 0x3c,
  0xcf, 0xfc, 0xff, 0x00, 0xf8, 0x3f, 0xf3, 0x7c, 0xe6, 0xfc, 0xff, 0x00,
  0xf8, 0x3f, 0x78, 0xf8, 0x70, 0xf8, 0xff, 0x00, 0xf8, 0xff, 0xff, 0xff,
  0xff, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
  0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, 0xff,
  0xff, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
  0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, 0xff,
  0xff, 0xff, 0xff, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00,
  0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xc0, 0xff, 0xff, 0xff,
  0xff, 0xff, 0x1f, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00,
  0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0xfe, 0xff, 0xff,
  0xff, 0xff, 0x03, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00,
  0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff,
  0xff, 0x7f, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00,
  0x00, 0xc0, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff,
  0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00,
  0x00, 0x00, 0xfe, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, };

#endifxvisual/xv/X11/xv/xlogo11100644    765    144         431  6141622146  14144 0ustar  steveusers#ifndef _Vxlogo11_
#define _Vxlogo11_


#define xlogo11_width 11
#define xlogo11_height 11

static char xlogo11_bits[] = {
 0x0f, 0x04, 0x0f, 0x02, 0x1e, 0x01, 0x3c, 0x01, 0xb8, 0x00, 0x58, 0x00,
 0xe8, 0x00, 0xe4, 0x01, 0xc4, 0x03, 0xc2, 0x03, 0x81, 0x07 };

#endif // _Vxlogo11_
xvisual/xv/X11/xv/xvPopupShell.h100644    765    144        1010  6141622146  15563 0ustar  steveusers#ifndef _VxvPopupShell_h
#define _VxvPopupShell_h


class xvPopupShell: public xvCore
{
	public:
		xvPopupShell();
		xvPopupShell(String name, xvCore & parent);
		~xvPopupShell();
	  
		void init(String name, xvCore & parent);
		void Open();
		void Open(Position x, Position y);
		void Close();
		
	protected:
		void init(String name, xvCore & parent, WidgetClass wid, String header, XtTranslations mt);	
		void PlaceShell();
		Widget shell;
		Widget MyParent;

	private:
		Boolean alloc;
};

#endif // _VxvPopupShell_h
xvisual/xv/X11/xv/xvForm.h100644    765    144         731  6141622146  14364 0ustar  steveusers#ifndef _VxvForm_h
#define _VxvForm_h


class xvForm: public xvCore
{
	public:
		xvForm();
		xvForm(String name, xvCore & parent, Boolean show=TRUE, Boolean doit=TRUE);
		~xvForm();

		void init(String name, xvCore & parent, Boolean show=TRUE, Boolean doit=TRUE);
		void init(String name, Widget parent, Boolean show=TRUE, Boolean doit=TRUE);	

		void DoLayout(Boolean doit);
		void ManageChildren(Boolean manage=TRUE);
	private:
		Boolean alloc;
};


#endif // _VxvForm_h
xvisual/xv/X11/xv/xvDialog.h100644    765    144        1074  6141622146  14701 0ustar  steveusers#ifndef _VxvDialog_h
#define _VxvDialog_h

class xvDialog: public xvCore
{
	public:
		xvDialog();
		xvDialog(String name, xvCore &  parent, String header, String defaultdata);
		~xvDialog();

		void init(String name, xvCore &  parent, String header, String defaultdata);
	
		String GetDialog();
		void AddButton(String name, XtCallbackProc callback, XtPointer client_data);
		void ChangeFont(String fontname);

	protected:
		void init(String name, Widget parent, String header, String defaultdata);

	private:
		Boolean alloc;
		xvFont bfont;	
};


#endif // _VxvDialog_h
xvisual/xv/X11/xv/xvPulldownMenu.h100644    765    144        1465  6141622146  16137 0ustar  steveusers#ifndef _VxvPulldownMenu_h
#define _VxvPulldownMenu_h


class xvPulldownMenu: public xvCore
{
	public:
		xvPulldownMenu();
		xvPulldownMenu(char *name, int argc, char **argv, XtCallbackProc proclist[], Widget parent);
		~xvPulldownMenu();
	  
		void init(char *name, int argc, char **argv, XtCallbackProc proclist[], Widget parent);
	 
		void MenuEntry(String name, String newname);
		void CheckEntry(char *name);
		void UnCheckEntry(char *name);
		void EntryResource(String name, String resname, XtArgVal res);
		void AllResource(String resname, XtArgVal res);
		Widget GetWidget(char *name);
		void ChangeFont(String name);

	private:
	  int findentry(char *name);

	  int numentries;
	  Widget WidgetList[20];
	  char *listentry[20];
	  Pixmap mark;
	  Boolean alloc;
	  xvFont bfont;
};

#endif // _VxvPulldownMenu_h
xvisual/xv/X11/xv/xvMsgBox.h100644    765    144        1323  6141622146  14676 0ustar  steveusers#ifndef _VxvMsgBox_h
#define _VxvMsgBox_h

#define XVMSGSIMPLEWARN 0
#define XVMSGSIMPLEFATAL 1
#define XVMSGSIMPLECHOICE 2

class xvMsgBox: public xvPopupShell
{
	public:
		xvMsgBox();
		xvMsgBox(String name, xvCore & parent, String message, 
			int type, String back,
			XtCallbackProc b1_call, XtCallbackProc b2_call = (XtCallbackProc) NULL);

		~xvMsgBox();

		void init(String name, xvCore & parent, String message, 
			int type, String back,
			XtCallbackProc b1_call, XtCallbackProc b2_call=(XtCallbackProc) NULL);

		int Result();

		void ChangeFont(String name);

	private:

		xvForm msgform;
		xvLabel msgicon, msglabel, spr, spb;
		xvButton b1, b2;	
		int result;	
		char *backcolor;
};


#endif // _VxvMsgBox_h
xvisual/xv/X11/xv/downptr100600    765    144         531  6141622146  14340 0ustar  steveusers#ifndef _Vdownptr_
#define _Vdownptr_

#define downptr_width 16
#define downptr_height 16
static char downptr_bits[] = {
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff,
   0xfe, 0x7f, 0xfc, 0x3f, 0xf8, 0x1f, 0xf0, 0x0f, 0xe0, 0x07, 0xc0, 0x03,
   0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};


#endif // _Vdownptr_xvisual/xv/X11/xv/warn.xbm100644    765    144        5654  6141622146  14442 0ustar  steveusers#define warn_width 58
#define warn_height 59
static char warn_bits[] = {
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xce,
  0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x01, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x87, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
  0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x07, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x80, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01,
  0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x0c, 0x00, 0x00, 0x00,
  0x00, 0x00, 0xe0, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00,
  0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x38, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x30, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00,
  0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x60, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x1c, 0x30, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x78,
  0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x78, 0xc0, 0x01, 0x00, 0x00,
  0x00, 0x00, 0x06, 0x78, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x07, 0x78,
  0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x03, 0x78, 0x00, 0x03, 0x00, 0x00,
  0x00, 0x80, 0x03, 0x30, 0x00, 0x07, 0x00, 0x00, 0x00, 0x80, 0x01, 0x30,
  0x00, 0x06, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x30, 0x00, 0x0e, 0x00, 0x00,
  0x00, 0xc0, 0x00, 0x30, 0x00, 0x0c, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x30,
  0x00, 0x1c, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00,
  0x00, 0x70, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x30, 0x00, 0x30,
  0x00, 0x30, 0x00, 0x00, 0x00, 0x38, 0x00, 0x78, 0x00, 0x70, 0x00, 0x00,
  0x00, 0x18, 0x00, 0x78, 0x00, 0x60, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x30,
  0x00, 0xe0, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00,
  0x00, 0x0e, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x06, 0x00, 0x00,
  0x00, 0x80, 0x01, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00,
  0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x80, 0x03, 0x00, 0x00,
  0x00, 0x00, 0x07, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00,
  0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0xc0, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x0c, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00,
  0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x60, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x18, 0x00, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00,
  0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, };
xvisual/xv/X11/xv/query.xbm100644    765    144        5657  6141622146  14643 0ustar  steveusers#define query_width 58
#define query_height 59
static char query_bits[] = {
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff,
  0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x0f, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00,
  0x00, 0x0f, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00,
  0x00, 0x38, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00,
  0x00, 0xa0, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x40, 0x01, 0x00,
  0x00, 0x05, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x80, 0x02, 0x00, 0x00,
  0x00, 0x00, 0x05, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00,
  0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0xa0, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x14, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00,
  0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x30, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x30, 0x00, 0x30, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x30, 0x00,
  0x18, 0x00, 0x00, 0xc6, 0x03, 0x00, 0x60, 0x00, 0x18, 0x00, 0x00, 0x8f,
  0x07, 0x00, 0x60, 0x00, 0x18, 0x00, 0x00, 0x8f, 0x07, 0x00, 0x60, 0x00,
  0x0c, 0x00, 0x00, 0x86, 0x07, 0x00, 0xc0, 0x00, 0x0c, 0x00, 0x00, 0x80,
  0x07, 0x00, 0xc0, 0x00, 0x0c, 0x00, 0x00, 0x80, 0x03, 0x00, 0xc0, 0x00,
  0x0c, 0x00, 0x00, 0xc0, 0x01, 0x00, 0xc0, 0x00, 0x0c, 0x00, 0x00, 0xe0,
  0x00, 0x00, 0xc0, 0x00, 0x0c, 0x00, 0x00, 0x30, 0x00, 0x00, 0xc0, 0x00,
  0x0c, 0x00, 0x00, 0x18, 0x00, 0x00, 0xc0, 0x00, 0x0c, 0x00, 0x00, 0x18,
  0x00, 0x00, 0xc0, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
  0x0c, 0x00, 0x00, 0x38, 0x00, 0x00, 0xc0, 0x00, 0x18, 0x00, 0x00, 0x7c,
  0x00, 0x00, 0x60, 0x00, 0x18, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x60, 0x00,
  0x18, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x60, 0x00, 0x30, 0x00, 0x00, 0x38,
  0x00, 0x00, 0x30, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00,
  0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x60, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x18, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00,
  0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x80, 0x01, 0x00, 0x00,
  0x00, 0x00, 0x06, 0x00, 0x80, 0x02, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,
  0x00, 0x05, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x0a, 0x00, 0x00,
  0x00, 0x40, 0x01, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00,
  0x00, 0x38, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00,
  0x00, 0x1c, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x0f, 0x00, 0x00,
  0x00, 0x00, 0x0f, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00,
  0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x3f, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, };
xvisual/xv/X11/xv/xvBox.h100644    765    144         354  6141622146  14212 0ustar  steveusers#ifndef _VxvBox_h
#define _VxvBox_h

class xvBox: public xvCore
{
	public:
		xvBox();
		xvBox(String name, xvCore & parent);
		~xvBox();

		void init(String name, xvCore & parent);

	private:
		Boolean alloc;		
};


#endif // _VxvBox_h
xvisual/xv/X11/xv/xvGC.h100644    765    144        4102  6141622146  13766 0ustar  steveusers#ifndef _VxvGC_h
#define _VxvGC_h

#define XVDEFAULTGC		1
#define XVAUXGC1			2
#define XVAUXGC2			3

class xvGC: public xvCore
{
	public:
		xvGC();
		xvGC(xvCore & object);
		~xvGC();

		// ** init Methods		
		void init(xvCore & object);
		void init(Widget gcw);

		// ** GC Methods
		void GCFlush();
		void GCSetState(Pixel foreground, Pixel background, int func, Pixel plane_mask);
		void GCSetForeground(Pixel foreground);
		void GCSetBackground(Pixel background);
		void GCSetFunction(int func);
		void GCSetPlaneMask(Pixel plane_mask);
		void GCSetLineAttributes(unsigned int line_width, int line_style, 
					int cap_style, int join_style);
		void GCSetDashes(int dash_offset, char dash_list[], int num_elements);
		void GCSetFillStyle(int fill_style);
		void GCSetFillRule(int fill_rule);
		void GCSetTile(Pixmap tile);
		void GCSetStipple(Pixmap stipple);
		void GCSetTSOrigin(int tso_x, int tso_y);
		void GCSetFont(Font font);
		void GCSetClipOrigin(int clip_ox, int clip_oy);
		void GCSetClipMask(Pixmap pix);
		void GCSetClipRectangles(int clip_ox, int clip_oy, XRectangle rect[], 
					int numrec, int xorder);
		void GCSetArcMode(int arc_mode);
		void GCSetSubMode(int sub_mode);
		void GCSetGraphicsExposures(Boolean gexpose);
		
		Status GCQueryBestSize(int vclass, unsigned int width, unsigned int height, 
					unsigned int *width_ret, unsigned int *height_ret);
		Status GCQueryBestTile(unsigned int width, unsigned int height, 
					unsigned int *width_ret, unsigned int *height_ret);
		Status GCQueryBestStipple(unsigned int width, unsigned int height, 
					unsigned int *width_ret, unsigned int *height_ret);

		Window WinID();
		GC GCGetGC();
		void GCSwitchGC(int which);
		void GCRegion(xvRegion & r);
		void GCPointerXY(int *x, int *y, int *rx, int *ry, unsigned int *btn);
		void GCWin2Root(int x, int y, int *tx, int *ty);
		void GCRoot2Win(int x, int y, int *tx, int *ty);

	protected:
		Widget xvwidget;
		GC xvcontext;
		GC maincontext, backupcontext1, backupcontext2;
		Display *xvdisplay;
		Screen *xvscreen;
		Window xvwindow;
		
	private:
		Boolean alloc;
};

#endif // _VxvGC_hxvisual/xv/X11/xv/xvEditField.h100644    765    144        5125  6141622146  15334 0ustar  steveusers#ifndef _VxvEditField_h
#define _VxvEditField_h


class xvEditField: public xvCore
{
	public:
		xvEditField();
		xvEditField(String name, xvCore & parent, XawTextEditType mode, 
			Dimension sizeH, Dimension sizeL,
			XawAsciiType etype=XawAsciiString, String datasrc=NULL, 
			Boolean resizable=TRUE, XtCallbackProc callback=NULL, 
			String clientdata=NULL);
		~xvEditField();

		void init(String name, xvCore & parent, XawTextEditType mode, 
			Dimension sizeH, Dimension sizeL,
			XawAsciiType etype=XawAsciiString, String datasrc=NULL,
			Boolean resizable=TRUE, XtCallbackProc callback=NULL,
			String clientdata=NULL);

		void init(String name, Widget parent, XawTextEditType mode, 
			Dimension sizeH, Dimension sizeL,
			XawAsciiType etype=XawAsciiString, String datasrc=NULL,			
			Boolean resizable=TRUE, XtCallbackProc callback=NULL,
			String clientdata=NULL);

		void ChangeFont(String fontname);
		void SetSelection(XawTextPosition left, XawTextPosition right);
		void UnsetSelection();
		void Position(XawTextPosition *tbegin, XawTextPosition *tend);
		int Replace(XawTextPosition start, XawTextPosition end, XawTextBlock *text);
		XawTextPosition Search(XawTextScanDirection dir, XawTextBlock *text);
		void Invalidate(XawTextPosition from, XawTextPosition to);
		void EnableRedisplay();
		void DisableRedisplay();
		void TextDisplay();
		XawTextPosition TopPosition();
		void SelectionArray(XawTextSelectType *sarray);
		void InsertionPoint(XawTextPosition pos);
		XawTextPosition GetInsertionPoint();
		void SetSource(Widget source, XawTextPosition pos);
		Widget GetSource();
		void DisplayCaret(Boolean visable);
		char *ReturnString(char *ptr);

		Boolean Save();
		Boolean SaveAs(String name);
		Boolean SourceChanged();

		XawTextPosition SourceRead(XawTextPosition pos, XawTextBlock *block,
			int length);
		XawTextPosition SourceReplace(XawTextPosition start, XawTextPosition end, 
			XawTextBlock *text);
		XawTextPosition SourceScan(XawTextPosition pos, XawTextScanType stype,
			XawTextScanDirection dir, int count, Boolean include);
		XawTextPosition SourceSearch(XawTextPosition pos, 
			XawTextScanDirection dir, XawTextBlock *block);

		void Echo(Boolean echo);
		void Wrap(XawTextWrapMode wrap);
		void Callback(XtCallbackProc callback, String clientdata);
		void AutoWrap(Boolean autowrap);
		void DisplayChars(Boolean ctrl);
		void ResizeMode(XawTextResizeMode rmode);
		void HorizontalScrollBar(XawTextScrollMode hsc);
		void VerticalScrollBar(XawTextScrollMode hsc);
		void SetString(String str);

	private:
		xvFont bfont;
		Widget Source;						
		Widget Sink;
		Boolean alloc;
};

#endif _VxvEditField_h
xvisual/xv/X11/xv/xvPopupDialog.h100600    765    144         563  6141622146  15677 0ustar  steveusers#ifndef _VxvPopupDialog_h
#define _VxvPopupDialog_h


class xvPopupDialog: public xvPopupTransientShell, public xvDialog
{
	public:
		xvPopupDialog();
		xvPopupDialog(String name, xvCore & parent, String header, String defaultdata);
		~xvPopupDialog();
	  
		void init(String name, xvCore & parent, String header, String defaultdata);
			
};

#endif // _VxvPopupDialog_h
xvisual/xv/X11/xv/xvScrollbar.h100644    765    144        1070  6141622146  15421 0ustar  steveusers#ifndef _VXvScrollbar_h
#define _VXvScrollbar_h

class xvScrollbar: public xvCore
{
	public:
	  xvScrollbar();
	  xvScrollbar(String name, xvCore & parent, XtOrientation orient, Dimension sizeL, 
		XtCallbackProc scrollProc, XtCallbackProc thumbProc, XtCallbackProc jumpProc);
	  ~xvScrollbar();

	  void init(String name, xvCore & parent, XtOrientation orient, Dimension sizeL, 
		XtCallbackProc scrollProc, XtCallbackProc thumbProc, XtCallbackProc jumpProc);

	  void SetThumb(float t_pos, float t_size);
	  
	private:
		Boolean alloc;
};

#endif // _VXvScrollbar_h
xvisual/xv/X11/xv/xvGraphic.h100644    765    144        3664  6141622146  15066 0ustar  steveusers#ifndef _VxvGraphic_h
#define _VxvGraphic_h

class xvGraphic: public xvGC
{
	public:
		xvGraphic();
		~xvGraphic();

		void init(xvCore & object);
		void init(Widget wid);

		void GClearArea(int x, int y, unsigned int width, unsigned int height, Boolean exposures);
		void GClearWindow();
		void GCopyArea(xvGC & dest, int sx, int sy, unsigned int width, unsigned int height,
					int dx, int dy);
		void GCopyPlane(xvGC & dest, int sx, int sy, unsigned int width, unsigned int height,
					int dx, int dy, unsigned long plane);
		void GDrawPoint(int x, int y);
		void GDrawPoints(XPoint *points, int npoints, int mode);
		void GDrawLine(int x1, int y1, int x2, int y2);
		void GDrawLines(XPoint *points, int npoints, int mode);
		void GDrawSegments(XSegment *segments, int nseg);		
		void GDrawRectangle(int x, int y, unsigned int width, unsigned int height);
		void GDrawRectangles(XRectangle rectangles[], int nrect);
		void GDrawArc(int x, int y, unsigned int width, unsigned int height,
					int angle1, int angle2);
		void GDrawArcs(XArc *arcs, int narcs);
		void GFillRectangle(int x, int y, unsigned int width, unsigned int height);
		void GFillRectangles(XRectangle *rectangles, int nrect);
		void GFillPolygon(XPoint *points, int npoints, int shape, int mode);
		void GFillArc(int x, int y, unsigned int width, unsigned int height, 
					int angle1, int angle2);
		void GFillArcs(XArc *arcs, int narcs);

		void GPrint(int x, int y, String message);
		void GPrintImage(int x, int y, String message);				

		XImage *GGetImage(int x, int y, unsigned int width, unsigned int height,
					unsigned long plane_mask, int format);

		XImage *GGetSubImage(int x, int y, unsigned int width, unsigned int height,
					unsigned long plane_mask, int format, 
					int dx, int dy, XImage *image=NULL);

		void GPutImage(int sx, int sy, int dx, int sy, unsigned int width, unsigned int height,
					XImage *image=NULL);

	private:
		XImage *gimage;
};

#endif // _VxvGraphic_hxvisual/xv/X11/xv/xvFont.h100644    765    144        1246  6141622146  14411 0ustar  steveusers#ifndef _VxvFont_h
#define _VxvFont_h

class xvFont
{
	public:
		xvFont();
		xvFont(xvCore & object, String fontname);
		~xvFont();

		// ** init Methods		
		void init(xvCore & object, String fontname);
		void init(Widget gcw, String fontname);

		void FLoadFont(String fontname);
		void FUnloadFont();
		int FGetTextWidth(String str);
		XCharStruct *FTextExtents(String string, int *dir, int *ascent, int *descent);
		XFontStruct *FontRef();
		Font FontID();

	protected:
		Widget xvwidget;
		Display *xvdisplay;
		Screen *xvscreen;
		Window xvwindow;

		Font xvfont;
		XFontStruct *xvfontstruct;
		XCharStruct xvcharstruct;

	private:
		Boolean alloc;
};

#endif // _VxvFont_hxvisual/xv/X11/xv/xvFontList.h100644    765    144        1026  6141622146  15241 0ustar  steveusers#ifndef _VxvFontList_h
#define _VxvFontList_h

class xvFontList
{
	public:
		xvFontList();
		xvFontList(xvCore & object, String pattern, int numfonts);
		~xvFontList();

		// ** init Methods		
		void  init(xvCore & object, String pattern, int numfonts);
		void init(Widget gcw, String pattern, int numfonts);

		char **GetList();
		int FontsInList();

	protected:
		Widget xvwidget;
		Display *xvdisplay;
		
		int numreq, numret;
		char* *fontlist;
		XFontStruct *xvfontstruct;

	private:
		Boolean alloc;
};

#endif // _VxvFontList_hxvisual/xv/X11/xv/xvTree.h100644    765    144         564  6141622146  14364 0ustar  steveusers#ifndef _VxvTree_h
#define _VxvTree_h

class xvTree: public xvCore
{
	public:
		xvTree();
		xvTree(String name, xvCore & parent);
		~xvTree();

		void init(String name, xvCore & parent);
		void AutoConfig(Boolean conf);
		void ForceLayout();
		void SetGravity(XtGravity gr);
		void SetSpace(Dimension hs, Dimension vs);

	private:
		Boolean alloc;
};

#endif // _VxvTree_hxvisual/xv/X11/xv/xvRegion.h100644    765    144         771  6141622146  14710 0ustar  steveusers#ifndef _VxvRegion_h
#define _VxvRegion_h

class xvRegion
{
	public:
		xvRegion();
		xvRegion(XPoint points[], int n, int fill_rule);
		~xvRegion();

		void init(XPoint points[], int n, int fill_rule);				
		Region GetRegion();
		void Offset(int dx, int dy);
		void Shrink(int dx, int dy);
		void ClipBox(XRectangle *rect);
		Boolean Empty();
		Boolean PointIn(int x, int y);
		int RectIn(int x, int y, unsigned int width, unsigned int height);		

	private:
		Region myregion;

};


#endif // _VxvRegion_hxvisual/xv/X11/xv/xvBitmap.h100644    765    144         721  6141622146  14674 0ustar  steveusers#ifndef _VxvBitmap_h
#define _VxvBitmap_h

class xvBitmap: public xvLabel, public xvBasicBitmap
{
	public:
		xvBitmap();
		xvBitmap(String name, xvCore & object, Boolean visual=TRUE, int pixtype=XVBITMAP);
		~xvBitmap();

		void init(String name, xvCore & object, Boolean visual=TRUE, int pixtype=XVBITMAP);
		void init(String name, Widget wid, Boolean visual=TRUE, int pixtype=XVBITMAP);

		Pixmap GetPixmap();

	private:
		Boolean vis;
};


#endif // _VxvBitmap_hxvisual/xv/X11/xv/xvGrip.h100644    765    144         600  6141622146  14355 0ustar  steveusers#ifndef _VxvGrip_h
#define _VxvGrip_h

class xvGrip: public xvCore
{
	public:
		xvGrip();
		xvGrip(String name, xvCore & parent, XtCallbackProc callback);
		~xvGrip();

		void init(String name, xvCore & parent, XtCallbackProc callback);
		void init(String name, Widget parent, XtCallbackProc callback);
		
	private:
		XtTranslations gtrans;
		Boolean alloc;
};


#endif // _VxvGrip_h
xvisual/xv/X11/xv/xvTimer.h100644    765    144        1141  6141622146  14555 0ustar  steveusers#ifndef _VxvTimer_h
#define _VxvTimer_h


#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>

class xvTimer: public xvLabel
{
	public:
		xvTimer();
		xvTimer(String name, xvCore & parent, unsigned long timed, 
				XtTimerCallbackProc tcall, Boolean visible=TRUE);
		~xvTimer();
		void init(String name, xvCore & parent, unsigned long timed, 
				XtTimerCallbackProc tcall, Boolean visible=TRUE);
		void Reset();		
		void Reset(unsigned long timed);

	private:
		XtAppContext app_cxt;
		unsigned long interval;
		XtTimerCallbackProc proc;
		XtPointer cdata;
		XtIntervalId intid;
};

#endif // _VxvTimer_h
xvisual/xv/X11/xv/xvSizer.h100644    765    144        2721  6155527206  14604 0ustar  steveusers#ifndef _VxvSizer_h
#define _VxvSizer_h

#define MINWIDTH 26;
#define MINHEIGHT 17;

#define XVSIZEMOVE 0
#define XVSIZEONLY 1
#define XVMOVEONLY 2

class xvSizer: public xvCore
{

	public:
		xvSizer();
		xvSizer(xvWindow & wparent, int x, int y, int wid, int hgt, int mode, int gripsize,
				XtCallbackProc size_callback, XtCallbackProc move_callback,
				XtEventHandler motion_callback, XtEventHandler stop_callback);
		~xvSizer();

		void init(xvWindow & wparent, int x, int y, int wid, int hgt, int mode, int gripsize,
				XtCallbackProc size_callback, XtCallbackProc move_callback,
				XtEventHandler motion_callback, XtEventHandler stop_callback);

		void SizerShow(xvWindow & wparent);
		void SizerHide(xvWindow & wparent);
		void SizerMove(xvWindow & wparent, XtPointer client);
		void SizerSize(xvWindow & wparent, XtPointer client);
		void SizerMotion(xvWindow & wparent);
		void SizerStop(xvWindow & wparent);
		void SizerUnhook(xvWindow & wparent);
		void SizerInfo(int *x, int *y, int *wid, int *hgt);
		void SizerWarp(xvWindow & wparent, int wpx, int wpy, int wid, int hgt);
		Boolean SizerIsVisible();

	private:
	
		xvGrip tl, tm, tr;
		xvGrip bl, bm, br;
		void setColours(xvWindow & wparent);
		XtCallbackProc size_call, move_call;
		XtEventHandler motion_call, stop_call;

		int wide, high;
		int px, py;
		int lx, ly;
		int pivotpoint;
		int sizermode;
		int gsize, minheight, minwidth; 
		int maxx, maxy;

		Boolean Sizing, Moving, Visible;
};


#endif // _VxvSizer_h
xvisual/xv/X11/xv/xvCursor.h100644    765    144         567  6141622146  14745 0ustar  steveusers#ifndef _VxvCursor_h
#define _VxvCursor_h

class xvCursor
{
	public:
		xvCursor();
		xvCursor(xvCore & object, unsigned int curs);
		~xvCursor();

		void init(xvCore & object, unsigned int curs);
		void init(Widget wid, unsigned int curs);

		Cursor GetCursor();

	private:	
		Cursor xvcursor;
		int alloc;
		Display *xvdisplay;
		Window xvwindow;
};


#endif // _VxvCursor_hxvisual/xv/X11/xv/xvVisualForm.h100644    765    144         435  6141622146  15551 0ustar  steveusers#ifndef _VxvVisualForm_h
#define _VxvVisualForm_h


class xvVisualForm: public xvForm
{
	public:
		xvVisualForm();
		xvVisualForm(String name, xvCore & parent);
		~xvVisualForm();

		void init(String name, xvCore & parent);

	private:
		xvLabel formlabel;
};


#endif _VxvVisualForm_h
xvisual/xv/X11/xv/timer.xbm100644    765    144        1413  6141622146  14600 0ustar  steveusers#define timer_width 28
#define timer_height 28
static char timer_bits[] = {
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00,
   0x00, 0xaf, 0x07, 0x00, 0x80, 0x21, 0x0c, 0x00, 0x60, 0x21, 0x34, 0x00,
   0x10, 0x22, 0x42, 0x00, 0x10, 0x20, 0x40, 0x00, 0x08, 0x20, 0x80, 0x00,
   0x1c, 0x20, 0xc0, 0x01, 0x24, 0x20, 0x20, 0x01, 0x04, 0x20, 0x00, 0x01,
   0x06, 0x20, 0x00, 0x03, 0x02, 0x20, 0x00, 0x02, 0x1e, 0x60, 0xc0, 0x03,
   0x02, 0xc0, 0x00, 0x02, 0x06, 0x80, 0x01, 0x03, 0x04, 0x00, 0x03, 0x01,
   0x04, 0x00, 0x22, 0x01, 0x2c, 0x00, 0xc0, 0x01, 0x18, 0x00, 0xc0, 0x00,
   0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x48, 0x00, 0x60, 0x22, 0x30, 0x00,
   0x80, 0x21, 0x0c, 0x00, 0x00, 0xaf, 0x07, 0x00, 0x00, 0xf8, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00};
xvisual/xv/X11/xv/xvVisualList.h100644    765    144        1755  6141622146  15607 0ustar  steveusers#ifndef _VxvVisualList_h
#define _VxvVisualList_h

class xvVisualList: public xvView, public xvList
{
	public:
		xvVisualList();
		xvVisualList(String name, xvCore & parent, XtCallbackProc callback,
			int numdata, char *listdata[], int columns=1, Boolean design=TRUE);

		~xvVisualList();

		void init(String name, xvCore & parent, XtCallbackProc callback,
			int numdata, char *listdata[], int columns=1, Boolean design=TRUE);

		void GetResource(String resname, XtArgVal *val);
		void SetResource(String resname, XtArgVal val);
		void SetFixedPosition(Boolean val);

		void SetForeground(String name);
		void SetForeground(Pixel fg);
		void SetBackground(String name);
		void SetBackground(Pixel bg);
		void Map();
		void Unmap();
		void SetSensitive(Boolean sense);
		void SetMappedWhenManaged(Boolean man);
		void AddEvent(EventMask eventmask, XtEventHandler handler, XtPointer cdata);
		void RemoveEvent(EventMask eventmask, XtEventHandler handler, XtPointer cdata);

};

#endif // _VxvVisualList_h
xvisual/xv/X11/xv/xvEditWindow.h100644    765    144        1216  6141622146  15555 0ustar  steveusers#ifndef _VxvEditWindow_h
#define _VxvEditWindow_h

class xvEditWindow: public xvWindow, public xvEditField
{
	
	public:
		xvEditWindow();
		xvEditWindow(xvCore & parent, String header, XawTextEditType mode, 
			String datasource, Dimension xsize, Dimension ysize, 
			XtCallbackProc ok_call, XtCallbackProc cancel_call, String client=NULL);
		~xvEditWindow();

		void init(xvCore & parent, String header, XawTextEditType mode, 
			String datasource, Dimension xsize, Dimension ysize, 
			XtCallbackProc ok_call, XtCallbackProc cancel_call, String client=NULL);


	private:
		xvButton editok, editcancel;
		xvForm editform;
};

#endif // _VxvEditWindow_h
xvisual/xv/X11/xv/xvBasicBitmap.h100644    765    144        1142  6141622146  15654 0ustar  steveusers#ifndef _VxvBasicBitmap_h
#define _VxvBasicBitmap_h

#define XVBITMAP		0
#define XVPIXMAP		1

class xvBasicBitmap
{
	public:
		xvBasicBitmap();
		xvBasicBitmap(String name, xvCore & object, int pixtype=XVBITMAP);
		~xvBasicBitmap();

		void init(String name, xvCore & object, int pixtype=XVBITMAP);
		void init(String name, Widget wid, int pixtype=XVBITMAP);

		int ReadFile(String name, int pixtype=XVBITMAP);
		Pixmap GetPixmap();

	protected:	
		Pixmap xvpixmap;
		Pixmap dxvpixmap;

		Display *xvdisplay;
		Window xvwindow;
		unsigned int width, height;
		int hotx, hoty;	

};


#endif // _VxvBasicBitmap_hxvisual/xv/X11/xv/xvPopupTransientShell.h100644    765    144        1107  6141622146  17462 0ustar  steveusers#ifndef _VxvPopupTransientShell_h
#define _VxvPopupTransientShell_h


class xvPopupTransientShell: public xvCore
{
	public:
		xvPopupTransientShell();
		xvPopupTransientShell(String name, xvCore & parent);
		~xvPopupTransientShell();
	  
		void init(String name, xvCore & parent);
		void Open();
		void Open(Position x, Position y);
		void Close();
		
	protected:
		void init(String name, xvCore & parent, WidgetClass wid, String header, XtTranslations mt);	
		void PlaceShell();
		Widget shell;
		Widget MyParent;

	private:
		Boolean alloc;
};

#endif // _VxvPopupTransientShell_h
xvisual/xv/xvBasicBitmap.cc100644    765    144        4542  6164234412  15013 0ustar  steveusers
/*     *******************************************************************************
	XVisual GUI Development System for Linux/X-Window
	Copyright (C) 1996 Steve Carrie.

        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.
        ******************************************************************************* */

#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/xpm.h>
#include <string.h>
#include <X11/xv/xvCore.h>
#include <X11/xv/xvBasicBitmap.h>

// ---------------------------------------------

xvBasicBitmap::xvBasicBitmap()
{ 
}

// ---------------------------------------------

xvBasicBitmap::xvBasicBitmap(String name, xvCore & object, int ptype)
{
	init(name, object, ptype);
}

// ---------------------------------------------

xvBasicBitmap::~xvBasicBitmap()
{
}

// ---------------------------------------------

void xvBasicBitmap::init(String name, xvCore & object, int pixtype)
{
	init(name, object.ID(), pixtype);
}

// ---------------------------------------------

void xvBasicBitmap::init(String name, Widget wid, int pixtype)
{ 
	xvdisplay=XtDisplay(wid);
	xvwindow=RootWindowOfScreen(XtScreen(wid));
	if (name != NULL) 
		ReadFile(name, pixtype);
}		

// ---------------------------------------------

int xvBasicBitmap::ReadFile(String name, int pixtype)
{
	int bmr=0;
	if (pixtype==XVBITMAP)
		bmr=XReadBitmapFile(xvdisplay, xvwindow, name, &width, &height,
			&xvpixmap, &hotx, &hoty);
	else
		bmr=XpmReadFileToPixmap(xvdisplay, xvwindow, name, &xvpixmap, &dxvpixmap,
			NULL);

	return(bmr);
}

// ---------------------------------------------

Pixmap xvBasicBitmap::GetPixmap()
{
	return(xvpixmap);
}

// ----------------------------------------------
xvisual/xv/xvBitmap.cc100644    765    144        4334  6164234423  14052 0ustar  steveusers
/*     *******************************************************************************
	XVisual GUI Development System for Linux/X-Window
	Copyright (C) 1996 Steve Carrie.

        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.
        ******************************************************************************* */

#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <string.h>
#include <X11/xv/xvCore.h>
#include <X11/xv/xvFont.h>
#include <X11/xv/xvBasicBitmap.h>
#include <X11/xv/xvLabel.h>
#include <X11/xv/xvBitmap.h>

// ---------------------------------------------

xvBitmap::xvBitmap()
{ 
}

// ---------------------------------------------

xvBitmap::xvBitmap(String name, xvCore & object, Boolean visual, int pixtype)
{
	init(name, object, visual, pixtype);
}

// ---------------------------------------------

xvBitmap::~xvBitmap()
{
}

// ---------------------------------------------

void xvBitmap::init(String name, xvCore & object, Boolean visual, int pixtype)
{
	init(name, object.ID(),visual, pixtype);
}

// ---------------------------------------------

void xvBitmap::init(String name, Widget wid, Boolean visual, int pixtype)
{ 
	int ok=0;
	vis=visual;

	if (visual) {
		xvLabel::init(name, wid);
		xvLabel::SetBorderWidth(1);
		xvLabel::SetLabel(name);
	}
	else
		xvBasicBitmap::init(NULL, wid, pixtype);
}

// ---------------------------------------------

Pixmap xvBitmap::GetPixmap()
{
	if (vis)
		return(xvLabel::bmap.GetPixmap());
	else
		return(xvBasicBitmap::GetPixmap());
}

// ----------------------------------------------
xvisual/xv/xvBox.cc100600    765    144        3236  6164234434  13360 0ustar  steveusers
/*     *******************************************************************************
	XVisual GUI Development System for Linux/X-Window
	Copyright (C) 1996 Steve Carrie.

        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.
        ******************************************************************************* */

#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/Xaw3d/Box.h>
#include <X11/xv/xvCore.h>
#include <X11/xv/xvBox.h>

// ---------------------------------------------

xvBox::xvBox()
{
	alloc=FALSE;
}

// ---------------------------------------------

xvBox::xvBox(String name, xvCore & parent)
{
	init(name, parent);
}

// ---------------------------------------------

xvBox::~xvBox()
{
	if (alloc) XtDestroyWidget(w);
}

// ---------------------------------------------

void xvBox::init(String name, xvCore & parent)
{
	w=XtVaCreateManagedWidget(name, boxWidgetClass, parent.ID(),
			NULL);
	alloc=TRUE;
}

// ---------------------------------------------

	xvisual/xv/xvButton.cc100600    765    144        5562  6164234447  14113 0ustar  steveusers
/*     *******************************************************************************
	XVisual GUI Development System for Linux/X-Window
	Copyright (C) 1996 Steve Carrie.

        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.
        ******************************************************************************* */

#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/Xaw3d/Command.h>
#include <X11/xv/xvCore.h>
#include <X11/xv/xvFont.h>
#include <X11/xv/xvBasicBitmap.h>
#include <X11/xv/xvButton.h>

// -----------------------------------------------------------------

xvButton::xvButton()
{
	alloc=FALSE;
}

// -----------------------------------------------------------------

xvButton::xvButton(char *name, xvCore & parent, XtCallbackProc callback, String client)
{
	init(name, parent, callback, client);
}

// =================================================================

xvButton::~xvButton()
{
	if (alloc) XtDestroyWidget(w);
}

// -----------------------------------------------------------------

void  xvButton::init(char *name, xvCore & parent, XtCallbackProc callback, String client)
{
	init(name, parent.ID(), callback, client);
}

// -----------------------------------------------------------------
void  xvButton::init(char *name, Widget parent, XtCallbackProc callback, String client)
{
	w=XtVaCreateManagedWidget(name, commandWidgetClass, parent, 
	    NULL);
	alloc=TRUE;          
	XtAddCallback(w, XtNcallback, callback, (XtPointer) client);
	bfont.init(w, NULL);
	bmap.init(NULL, w);
}

// -----------------------------------------------------------------

void xvButton::ChangeFont(String fontname)
{
	if (fontname != NULL) {
		bfont.FLoadFont(fontname);
		XtVaSetValues(w, XtNfont, (XtArgVal) bfont.FontRef(), NULL);
	}
}

// -----------------------------------------------------------------

int xvButton::ChangeBitmap(String name, int pixtype, int position)
{
	int err;

	if ((err=bmap.ReadFile(name, pixtype)) == 0)
		if (position==XVCENTREBITMAP)
			XtVaSetValues(w, XtNbitmap, (XtArgVal) bmap.GetPixmap(), NULL);
		else
			XtVaSetValues(w, XtNleftBitmap, (XtArgVal) bmap.GetPixmap(), NULL);
	return(err);
}

// -----------------------------------------------------------------
	xvisual/xv/xvContext.cc100600    765    144        6736  6164234457  14271 0ustar  steveusers
/*     *******************************************************************************
	XVisual GUI Development System for Linux/X-Window
	Copyright (C) 1996 Steve Carrie.

        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.
        ******************************************************************************* */

#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/xv/xvCore.h>
#include <X11/xv/xvContext.h>

#define MAXCOUNT	50

// ---------------------------------------------

xvContext::xvContext()
{
	actionset=FALSE;
}

// ---------------------------------------------

xvContext::xvContext(String name, int argc, char **argv)
{
	init(name, argc, argv);
}

// ---------------------------------------------

xvContext::~xvContext()
{
}

// ---------------------------------------------

XtAppContext xvContext::GetContext()
{
	return(ContextContext);
}

// ---------------------------------------------

void xvContext::init(String name, int argc, char **argv)
{

	w=XtVaAppInitialize(&ContextContext, name, NULL, 0, &argc, argv, 
		NULL, NULL);
	actionset=FALSE;
	ContextDisplay=XtDisplay(w);
	flushcount=0;
}

// ---------------------------------------------

void xvContext::ServiceEvent()
{
	if (XtAppPending(ContextContext) != 0) {
		XtAppNextEvent(ContextContext, &ContextEvent);
		XtDispatchEvent(&ContextEvent);
		flushcount++;
		if (flushcount > MAXCOUNT) {
			flushcount=0;
			XFlush(ContextDisplay);
		}
	}
}

// -------------------------------------------

void xvContext::RegisterWorkProc(XtWorkProc proc, XtPointer cdata)
{
	wproc=XtAppAddWorkProc(ContextContext, proc, cdata);
}

// -------------------------------------------

void xvContext::UnregisterWorkProc()
{
	XtRemoveWorkProc(wproc);
}

// -------------------------------------------

void xvContext::AddAction(String acname, XtActionProc proc)
{
	XtActionsRec thisaction[]= {
		{acname, proc },
	};

	XtAppAddActions(ContextContext, thisaction, XtNumber(thisaction));
}

// -------------------------------------------

XtActionHookId xvContext::AddActionHook(XtActionHookProc proc, XtPointer clientdata)
{
	if (!actionset) {
		waction=XtAppAddActionHook(ContextContext, proc, clientdata);
		actionset=TRUE;
		return(waction);
	}
	else
		return((XtActionHookId) NULL);
}

// -------------------------------------------

void xvContext::RemoveActionHook()
{
	if (actionset) XtRemoveActionHook(waction);
	actionset=FALSE;
}

// -------------------------------------------

void xvContext::Error(String message)
{
	XtAppError(ContextContext, message);
}

// -------------------------------------------

void xvContext::ErrorMsg(String name, String etype, String eclass, String edefault, String *params,
			Cardinal *numpar)
{
	XtAppErrorMsg(ContextContext, name, etype, eclass, edefault, params, numpar);
}

// -------------------------------------------

xvisual/xv/xvCore.cc100600    765    144       37713  6164234472  13551 0ustar  steveusers
/*     *******************************************************************************
	XVisual GUI Development System for Linux/X-Window
	Copyright (C) 1996 Steve Carrie.

        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.
        ******************************************************************************* */

#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/xpm.h>
#include <X11/Xaw3d/ThreeD.h>
#include <X11/xv/xvCore.h>
#include <string.h>

// ---------------------------------

xvCore::~xvCore()
{
}

// ---------------------------------

inline void xvCore::Hide() 
{
	XtUnrealizeWidget(w);
}

// ---------------------------------

inline void xvCore::Show()
{
	XtRealizeWidget(w);
	XtMapWidget(w);
}

// ---------------------------------

inline void xvCore::Unmap() 
{
	XtUnmapWidget(w);
}

// ---------------------------------

inline void xvCore::Map()
{
	XtMapWidget(w);
}

// ---------------------------------

inline void xvCore::SetAccelerators(XtAccelerators atable)
{
	XtVaSetValues(w, XtNaccelerators, (XtArgVal) atable, NULL);
}

//----------------------------------

inline void xvCore::SetAncestorSensitive(Boolean sense)
{
	XtVaSetValues(w, XtNancestorSensitive, (XtArgVal) sense, NULL);
}

// ---------------------------------

inline void xvCore::SetBackground(Pixel b)
{
	if (b!=-1)
		XtVaSetValues(w, XtNbackground, (XtArgVal) b, NULL);
}

// ----------------------------------

inline void xvCore::SetBackground(String colour)
{	
	XtVaSetValues(w, XtVaTypedArg, XtNbackground, XtRString, 
				colour, strlen(colour), NULL);
}

// ----------------------------------

inline void xvCore::SetBackgroundPixmap(Pixmap p)
{
	if (p != -1) 
		XtVaSetValues(w, XtNbackgroundPixmap, (XtArgVal) p, NULL);
}

// ---------------------------------

inline void xvCore::SetBorderColor(Pixel b)
{
	if (b != -1)
		XtVaSetValues(w, XtNborderColor, (XtArgVal) b, NULL);
}

// ----------------------------------

inline void xvCore::SetBorderColor(String colour)
{	
	XtVaSetValues(w, XtVaTypedArg, XtNborderColor, XtRString, 
				colour, strlen(colour), NULL);
}

// ----------------------------------

inline void xvCore::SetBorderPixmap(Pixmap p)
{
	if (p != -1) 
		XtVaSetValues(w, XtNborderPixmap, (XtArgVal) p, NULL);
}

// ---------------------------------

inline void xvCore::SetBorderWidth(Dimension b)
{
	XtVaSetValues(w, XtNborderWidth, (XtArgVal) b, NULL);
}

// ---------------------------------

inline Dimension xvCore::GetBorderWidth()
{
	Dimension bw;
	XtVaGetValues(w, XtNborderWidth, &bw, NULL);
	return(bw);
}

// ---------------------------------

inline void xvCore::SetColormap(Colormap c)
{
	XtVaSetValues(w, XtNcolormap, (XtArgVal) c, NULL);
}

// ---------------------------------

inline void xvCore::SetDepth(int d)
{
	XtVaSetValues(w, XtNdepth, (XtArgVal) d, NULL);
}

// ----------------------------------

inline int xvCore::GetDepth()
{
	int d;
	XtVaGetValues(w, XtNdepth, &d, NULL);
	return(d);
}

// ----------------------------------

inline void xvCore::SetDestroyCallback(XtCallbackProc d)
{
	XtAddCallback(w, XtNdestroyCallback, d, 0);
}

// ----------------------------------

inline void xvCore::SetHeight(Dimension h)
{
	XtVaSetValues(w, XtNheight, (XtArgVal) h, NULL);
}

// ----------------------------------

inline Dimension xvCore::GetHeight()
{
	Dimension h;
	XtVaGetValues(w, XtNheight, &h, NULL);
	return(h);
}

// ----------------------------------

inline void xvCore::SetMappedWhenManaged(Boolean m)
{
	XtVaSetValues(w, XtNmappedWhenManaged, (XtArgVal) m, NULL);
}

// ----------------------------------

inline void xvCore::SetSensitive(Boolean s)
{
	XtVaSetValues(w, XtNsensitive, (XtArgVal) s, NULL);
}

// ----------------------------------

inline void xvCore::SetTranslations(XtTranslations trans)
{
	XtVaSetValues(w, XtNtranslations, (XtArgVal) trans, NULL);
}

// ----------------------------------

inline void xvCore::OverrideTranslations(XtTranslations trans)
{
	XtOverrideTranslations(w, trans);
}

// ----------------------------------

inline void xvCore::AugmentTranslations(XtTranslations trans)
{
	XtAugmentTranslations(w, trans);
}

// ----------------------------------

inline void xvCore::SetWidth(Dimension xw)
{
	XtVaSetValues(w, XtNwidth, (XtArgVal) xw, NULL);
}

// ----------------------------------

inline Dimension xvCore::GetWidth()
{
	Dimension xw;
	XtVaGetValues(w, XtNwidth, &xw, NULL);
	return(xw);
}

// ----------------------------------

inline void xvCore::SetX(Position x)
{
	XtVaSetValues(w, XtNx, (XtArgVal) x, NULL);
}

// ----------------------------------

inline Position xvCore::GetX()
{
	Position x;
	XtVaGetValues(w, XtNx, &x, NULL);
	return(x);
}

// ----------------------------------

inline void xvCore::SetY(Position y)
{
	XtVaSetValues(w, XtNy, (XtArgVal) y, NULL);
}

// ---------------------------------

inline Position xvCore::GetY()
{
	Position y;
	XtVaGetValues(w, XtNy, &y, NULL);
	return(y);
}

// ----------------------------------

inline void xvCore::SetXY(Position x, Position y)
{
	XtVaSetValues(w, XtNx, (XtArgVal) x, XtNy, (XtArgVal) y, NULL);
}

// ---------------------------------

inline void xvCore::GetXY(Position *x, Position *y)
{
	XtVaGetValues(w, XtNx, x, XtNy, y, NULL);
}

// ---------------------------------

inline void xvCore::SetResource(String rname, XtArgVal val)
{
	XtVaSetValues(w, rname, (XtArgVal) val, NULL);
}

// ---------------------------------

inline void xvCore::GetResource(String rname, XtArgVal *val)
{
	XtVaGetValues(w, rname, val, NULL);
}

// ---------------------------------

inline void xvCore::SetShadowWidth(Dimension sw)
{
	XtVaSetValues(w, XtNshadowWidth, (XtArgVal) sw, NULL);
}

// ---------------------------------

inline void xvCore::SetTopShadowPixel(Pixel tsp)
{
	if (tsp != -1)
		XtVaSetValues(w, XtNtopShadowPixel, (XtArgVal) tsp, NULL);
}

// ---------------------------------

inline void xvCore::SetTopShadowPixel(String colour)
{	
	XtVaSetValues(w, XtVaTypedArg, XtNtopShadowPixel, XtRString, 
				colour, strlen(colour), NULL);
}

// ---------------------------------

inline void xvCore::SetBottomShadowPixel(Pixel bsp)
{
	if (bsp != -1)
		XtVaSetValues(w, XtNbottomShadowPixel, (XtArgVal) bsp, NULL);
}

// ---------------------------------

inline void xvCore::SetBottomShadowPixel(String colour)
{	
	XtVaSetValues(w, XtVaTypedArg, XtNbottomShadowPixel, XtRString, 
				colour, strlen(colour), NULL);
}

// ---------------------------------

inline void xvCore::SetTopShadowContrast(int tsc)
{
	XtVaSetValues(w, XtNtopShadowContrast, (XtArgVal) tsc, NULL);
}

// ---------------------------------

inline void xvCore::SetBottomShadowContrast(int bsc)
{
	XtVaSetValues(w, XtNbottomShadowContrast, (XtArgVal) bsc, NULL);
}

// ---------------------------------

inline void xvCore::SetUserData(XtPointer ud)
{
	XtVaSetValues(w, XtNuserData, (XtArgVal) ud, NULL);
}

// ---------------------------------

inline void xvCore::SetBeNiceToColormap(Boolean bntc)
{
	XtVaSetValues(w, XtNbeNiceToColormap, (XtArgVal) bntc, NULL);
}

// ---------------------------------

inline Widget xvCore::ID()
{
	return(w);
}

// ---------------------------------

inline void xvCore::SetLabel(String lab)
{
	XtVaSetValues(w, XtNlabel, (XtArgVal) lab, NULL);
}

// ---------------------------------	

inline void xvCore::SetFont(XFontStruct *xfs)
{
	XtVaSetValues(w, XtNfont, (XtArgVal) xfs, NULL);
}

// --------------------------------

inline void xvCore::SetForeground(Pixel fg)
{
	if (fg != -1)
		XtVaSetValues(w, XtNforeground, (XtArgVal) fg, NULL);
}

// --------------------------------

inline void xvCore::SetForeground(String colour)
{	
	XtVaSetValues(w, XtVaTypedArg, XtNforeground, XtRString, 
				colour, strlen(colour), NULL);
}

// --------------------------------

inline void xvCore::SetFontSet(XFontSet xfnt)
{
	XtVaSetValues(w, XtNfontSet, (XtArgVal) xfnt, NULL);
}

// --------------------------------

inline void xvCore::SetJustify(XtJustify xj)
{
	XtVaSetValues(w, XtNjustify, (XtArgVal) xj, NULL);
}

// --------------------------------

inline void xvCore::SetCallback(XtCallbackProc callback)
{
	XtVaSetValues(w, XtNcallback, (XtArgVal) callback, NULL);
}

// --------------------------------

inline void xvCore::SetHSpace(Dimension hs)
{
	XtVaSetValues(w, XtNhSpace, (XtArgVal) hs, NULL);
}

// --------------------------------

inline void xvCore::SetVSpace(Dimension vs)
{
	XtVaSetValues(w, XtNvSpace, (XtArgVal) vs, NULL);
}

// --------------------------------

inline void xvCore::SetBottomEdge(XawEdgeType bedge)
{
	XtVaSetValues(w, XtNbottom, (XtArgVal) bedge, NULL);
}

// --------------------------------

inline void xvCore::SetLeftEdge(XawEdgeType ledge)
{
	XtVaSetValues(w, XtNleft, (XtArgVal) ledge, NULL);
}

// --------------------------------

inline void xvCore::SetRightEdge(XawEdgeType redge)
{
	XtVaSetValues(w, XtNright, (XtArgVal) redge, NULL);
}

// --------------------------------

inline void xvCore::SetTopEdge(XawEdgeType tedge)
{
	XtVaSetValues(w, XtNtop, (XtArgVal) tedge, NULL);
}

// --------------------------------

inline void xvCore::SetRelHorizontal(xvCore & wg)
{
	XtVaSetValues(w, XtNfromHoriz, (XtArgVal) wg.ID(), NULL);
}

// -------------------------------

inline void xvCore::SetRelVertical(xvCore &  wg)
{
	XtVaSetValues(w, XtNfromVert, (XtArgVal) wg.ID(), NULL);
}

// -------------------------------

inline void xvCore::SetRelative(xvCore & hg, xvCore & vg)
{
	XtVaSetValues(w, XtNfromHoriz, (XtArgVal) hg.ID(), XtNfromVert, (XtArgVal) vg.ID(), NULL);
}

// -------------------------------

inline void xvCore::SetResizable(Boolean srz)
{
	XtVaSetValues(w, XtNresizable, (XtArgVal) srz, NULL);
}

// -------------------------------

inline void xvCore::SetVertDistance(int vd)
{
	XtVaSetValues(w, XtNvertDistance, (XtArgVal) vd, NULL);
}

// -------------------------------

inline int xvCore::GetVertDistance()
{
	int vd;

	XtVaGetValues(w, XtNvertDistance, &vd, NULL);
	return(vd);
}

// -------------------------------

inline void xvCore::SetHorizDistance(int hd)
{
	XtVaSetValues(w, XtNhorizDistance, (XtArgVal) hd, NULL);
}

// -------------------------------

inline int xvCore::GetHorizDistance()
{
	int vd;

	XtVaGetValues(w, XtNhorizDistance, &vd, NULL);
	return(vd);
}

// -------------------------------

inline void xvCore::SetDistance(int hd, int vd)
{
	XtVaSetValues(w, XtNhorizDistance, hd, XtNvertDistance, vd, NULL);
}

// -------------------------------

inline void xvCore::GetDistance(int *hd, int *vd)
{
	XtVaGetValues(w, XtNhorizDistance, hd, XtNvertDistance, vd, NULL);
}

// -------------------------------

inline void xvCore::SetDefaultDistance(int dd)
{
	XtVaSetValues(w, XtNdefaultDistance, (XtArgVal) dd, NULL);
}

// -------------------------------

inline void xvCore::SetIcon(Pixmap ico)
{
	XtVaSetValues(w, "icon", (XtArgVal) ico, NULL);
}

// -------------------------------

inline Pixmap xvCore::SetBitmapInfo(unsigned char *bits, unsigned int sw, unsigned int sh,
			String resource)
{
	icon=XCreateBitmapFromData(XtDisplay(w), 
		RootWindowOfScreen(XtScreen(w)),
		(char *)bits, sw, sh);

	if (resource != NULL)
		XtVaSetValues(w, resource, (XtArgVal) icon, NULL);

	return(icon);
}

// -------------------------------

inline Pixmap xvCore::SetBitmapInfo(char *bits, unsigned int sw, unsigned int sh,
			String resource)
{
	icon=XCreateBitmapFromData(XtDisplay(w), 
		RootWindowOfScreen(XtScreen(w)),
		bits, sw, sh);

	if (resource != NULL)
		XtVaSetValues(w, resource, (XtArgVal) icon, NULL);

	return(icon);
}

// -------------------------------

inline Pixmap xvCore::SetPixmapInfo(char **bits, String resource)
{
	int ret=XpmCreatePixmapFromData(XtDisplay(w), 
		RootWindowOfScreen(XtScreen(w)),
		bits, &icon, &iconmask, NULL);

	if (ret==0)
		if (resource != NULL)
			XtVaSetValues(w, resource, (XtArgVal) icon, NULL);

	return(icon);
}

// -------------------------------

inline void xvCore::SetInternalWidth(Dimension iw)
{
	XtVaSetValues(w, XtNinternalWidth, (XtArgVal) iw, NULL);
}

// -------------------------------

inline Dimension xvCore::GetInternalWidth()
{
	Dimension iw;
	XtVaGetValues(w, XtNinternalWidth, &iw, NULL);
	return(iw);
}

// -------------------------------

inline void xvCore::SetInternalHeight(Dimension ih)
{
	XtVaSetValues(w, XtNinternalHeight, (XtArgVal) ih, NULL);
}

// -------------------------------

inline Dimension xvCore::GetInternalHeight()
{
	Dimension ih;
	XtVaGetValues(w, XtNinternalHeight, &ih, NULL);
	return(ih);
}

// -------------------------------

inline void xvCore::SetGeometry(Position x, Position y, Dimension wid, Dimension h)
{
	XtVaSetValues(w, XtNx, (XtArgVal) x, 
					XtNy, (XtArgVal) y, 
					XtNwidth, (XtArgVal) wid, 
					XtNheight, (XtArgVal) h, 	
					NULL);
}

// -------------------------------

inline void xvCore::GetGeometry(Position *x, Position *y, Dimension *wid, Dimension *h)
{
	XtVaGetValues(w, XtNx, x, XtNy, y, XtNwidth, wid, XtNheight, h, NULL);
}

// --------------------------------

inline void xvCore::SetSize(Dimension wid, Dimension h)
{
	XtVaSetValues(w, XtNwidth, (XtArgVal) wid, 
					XtNheight, (XtArgVal) h, 	
					NULL);
}

// -------------------------------

inline void xvCore::GetSize(Dimension *wid, Dimension *h)
{
	XtVaGetValues(w, XtNwidth, wid, XtNheight, h, NULL);
}

// --------------------------------

inline void xvCore::AddEvent(EventMask eventmask, XtEventHandler handler, XtPointer cdata)
{
	XtAddEventHandler(w, eventmask, FALSE, handler, cdata);
}

// --------------------------------

inline void xvCore::RemoveEvent(EventMask eventmask, XtEventHandler handler, XtPointer cdata)
{
	XtRemoveEventHandler(w, eventmask, FALSE, handler, cdata);
}

// --------------------------------

inline void xvCore::SetTreeGC(GC ngc)
{
	XtVaSetValues(w, XtNtreeGC, (XtArgVal) ngc, NULL);
}

// --------------------------------

inline void xvCore::SetTreeParent(Widget parent)
{
	XtVaSetValues(w, XtNtreeParent, (XtArgVal) parent, NULL);
}

// ---------------------------------

inline void xvCore::SetTreeParent(xvCore & parent)
{
	XtVaSetValues(w, XtNtreeParent, (XtArgVal) parent.ID(), NULL);
}

// ---------------------------------

inline void xvCore::SetBitmap(Pixmap pix)
{
	XtVaSetValues(w, XtNbitmap, (XtArgVal) pix, NULL);
}

// ---------------------------------

inline void xvCore::SetFixedPosition(Boolean fix)
{
	if (fix) 
		XtVaSetValues(w, XtNleft, XawChainLeft, XtNright, XawChainLeft,
					XtNtop, XawChainTop, XtNbottom, XawChainTop, NULL);
	else
		XtVaSetValues(w, XtNleft, XawRubber, XtNright, XawRubber, 
					XtNtop, XawRubber, XtNbottom, XawRubber, NULL);
}

// -----------------------------------

inline void xvCore::SetCursorName(String cname)
{
	XtVaSetValues(w, XtNcursor, None, XtNcursorName, (XtArgVal) NULL, NULL);
	XtVaSetValues(w, XtNcursorName, (XtArgVal) cname, NULL);
}

// ------------------------------------

inline void xvCore::SetCursor(Cursor curs)
{
	XtVaSetValues(w, XtNcursor, (XtArgVal) curs, NULL);
}

// ------------------------------------

inline void xvCore::AddGrab(Boolean exclusive, Boolean sprung)
{
	XtAddGrab(w, exclusive, sprung);
}

// ------------------------------------

inline void xvCore::RemoveGrab()
{
	XtRemoveGrab(w);
}

// ------------------------------------

inline Pixel xvCore::stringToPixel(String colname)
{
	XrmValue from, to;
	Pixel output;
	Boolean testx;

	from.addr=colname;
	from.size=strlen(colname);

	to.addr=(char *) &output;
	to.size=sizeof(Pixel);

	testx=XtConvertAndStore(w, XtRString, &from, XtRPixel, &to);

	if (testx) 
		return(output);	
	else
		return((Pixel) -1);
}

// ----------------------------------------------------
xvisual/xv/xvCursor.cc100644    765    144        3670  6164234506  14117 0ustar  steveusers
/*     *******************************************************************************
	XVisual GUI Development System for Linux/X-Window
	Copyright (C) 1996 Steve Carrie.

        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.
        ******************************************************************************* */

#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/xv/xvCore.h>
#include <X11/xv/xvCursor.h>

// ---------------------------------------------

xvCursor::xvCursor()
{ 
	alloc=TRUE;
}

// ---------------------------------------------

xvCursor::xvCursor(xvCore & object, unsigned int curs)
{
	init(object, curs);
}

// ---------------------------------------------

xvCursor::~xvCursor()
{
	if (alloc) XFreeCursor(xvdisplay, xvcursor);
}

// ---------------------------------------------

void xvCursor::init(xvCore & object, unsigned int curs)
{
	init(object.ID(), curs);
}

// ---------------------------------------------

void xvCursor::init(Widget wid, unsigned int curs)
{
	xvdisplay=XtDisplay(wid);
	xvwindow=XtWindow(wid);
	xvcursor=XCreateFontCursor(xvdisplay, curs);
	alloc=TRUE;
}

// ---------------------------------------------

Cursor xvCursor::GetCursor()
{
	return(xvcursor);
}

// ----------------------------------------------xvisual/xv/xvDialog.cc100600    765    144        5123  6164234521  14021 0ustar  steveusers
/*     *******************************************************************************
	XVisual GUI Development System for Linux/X-Window
	Copyright (C) 1996 Steve Carrie.

        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.
        ******************************************************************************* */

#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/Xaw3d/Dialog.h>
#include <X11/xv/xvCore.h>
#include <X11/xv/xvFont.h>
#include <X11/xv/xvDialog.h>

// ---------------------------------------------

xvDialog::xvDialog()
{
	alloc=FALSE;
}

// ---------------------------------------------

xvDialog::xvDialog(String name, xvCore &  parent, String header, String defaultdata)
{
	init(name, parent, header, defaultdata);
}

// ---------------------------------------------

xvDialog::~xvDialog()
{
	if (alloc) XtDestroyWidget(w);
}

// ---------------------------------------------

void xvDialog::init(String name, xvCore & parent, String defaultdata, String header)
{
	init(name, parent.ID(), defaultdata, header);
}

// ---------------------------------------------

void xvDialog::init(String name, Widget parent, String defaultdata, String header)
{
	w=XtVaCreateManagedWidget(name, dialogWidgetClass, parent,
			"value", defaultdata,
			"label", header,
			NULL);
	alloc=TRUE;
	bfont.init(w, NULL);
}

// ---------------------------------------------

void xvDialog::ChangeFont(String fontname)
{
	if (fontname != NULL) {
		bfont.FLoadFont(fontname);
		XtVaSetValues(w, XtNfont, (XtArgVal) bfont.FontRef(), NULL);
	}
}

// -----------------------------------------------------------------

String xvDialog::GetDialog()
{
	return(XawDialogGetValueString(w));
}

// ---------------------------------------------

void xvDialog::AddButton(String name, XtCallbackProc callback, XtPointer client_data)
{
	XawDialogAddButton(w, name, callback, client_data);
}

// ----------------------------------------------
	xvisual/xv/xvDropDown.cc100644    765    144       14351  6164234534  14415 0ustar  steveusers
/*     *******************************************************************************
	XVisual GUI Development System for Linux/X-Window
	Copyright (C) 1996 Steve Carrie.

        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.
        ******************************************************************************* */

#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/xv/xvCore.h>
#include <X11/xv/xvBasicBitmap.h>
#include <X11/xv/xvFont.h>
#include <X11/xv/xvForm.h>
#include <X11/xv/xvLabel.h>
#include <X11/xv/xvButton.h>
#include <X11/xv/xvPopupShell.h>
#include <X11/xv/xvView.h>
#include <X11/xv/xvList.h>

#include <X11/xv/xvDropDown.h>

#include <X11/xv/downptr>
#include <stdio.h>

// ------------------------------------

xvDropDown::xvDropDown()
{
}

// ------------------------------------

xvDropDown::xvDropDown(String name, xvCore & parent, int numargs, char **argdata,
				XtCallbackProc button_callback, XtCallbackProc select_callback,
				int vdepth, int currentindex)
{
	init(name, parent, numargs, argdata, button_callback, select_callback, vdepth, currentindex);
}

// ------------------------------------

xvDropDown::~xvDropDown()
{	
	delete copydata;
}

// ------------------------------------

Widget xvDropDown::ID()
{
	return(dropform.ID());
}

// ------------------------------------

void xvDropDown::init(String name, xvCore & parent, int numargs, char **argdata,
				XtCallbackProc button_callback, XtCallbackProc select_callback,
				int vdepth, int currentindex)
{
	
	current=currentindex;
	numlist=numargs;
	ddepth=vdepth;
	
	copydata= new char*[numargs];
	dropform.init(name, parent, FALSE, TRUE);
	dropform.SetDefaultDistance(1);
	w=dropform.ID();

	droplabel.init("droplabel", dropform);
	droplabel.SetLabel(argdata[current]);
	droplabel.SetJustify(XtJustifyLeft);
	droplabel.SetFixedPosition(TRUE);
	droplabel.SetBorderWidth(0);
	droplabel.SetShadowWidth(3);
	droplabel.SetBeNiceToColormap(FALSE);
			
	dropbutton.init("dropbutton", dropform,  button_callback);
	dropbutton.SetRelHorizontal(droplabel);
	dropbutton.SetBorderWidth(0);
	dropbutton.SetShadowWidth(3);
	dropbutton.SetLabel(NULL);
	dropbutton.SetBitmapInfo(downptr_bits, downptr_width, downptr_height, XtNbitmap);
	dropbutton.SetFixedPosition(TRUE);
	dropbutton.SetBeNiceToColormap(FALSE);

	dropshell.init("dropshell", droplabel);
	dropview.init("dropview", dropshell, FALSE, FALSE, TRUE);

	droplist.init("droplist", dropview, select_callback, numargs, argdata, 1);
	droplist.Highlight(current);
	dropview.ManageChildren(TRUE);

	labelwidth=droplist.GetLongest()+20;

	CalcHeights();

	for (int j=0; j<numargs; j++)
		copydata[j]=argdata[j];	
	
	dropform.ManageChildren(TRUE);
	bwidth=dropbutton.GetWidth();

}

// -------------------------------------

void xvDropDown::ChangeWidth(Dimension wid)
{
	int lw=wid-(bwidth+7);
	dropbutton.SetWidth(bwidth);
	labelwidth=lw;
	CalcHeights();
}

// -------------------------------------

void xvDropDown::ChangeFont(String name)
{
	if (name != NULL) {
		droplabel.ChangeFont(name);
		droplist.ChangeFont(name);
	}
}

// -------------------------------------

void xvDropDown::DropDownOpen()
{
	dropshell.Open();
}

// ------------------------------------

int xvDropDown::DropDownClose(XtPointer calldata)
{
	XawListReturnStruct *lr = (XawListReturnStruct *) calldata;
	current=lr->list_index;
	droplabel.SetLabel(copydata[current]);
	dropshell.Close();
	return(current);
}

// ------------------------------------

void xvDropDown::CalcHeights()
{
	Dimension ht=dropbutton.GetHeight();
	if (droplabel.GetHeight() > ht)
		ht=droplabel.GetHeight();

	droplabel.SetHeight(ht);
	dropbutton.SetHeight(ht);
	droplabel.SetWidth(labelwidth);
	droplist.SetWidth(labelwidth);

	int listh=droplist.GetHeight()/numlist;
		
	if (numlist > ddepth)
		dropview.SetHeight(ddepth*listh);		
}

// ------------------------------------

void xvDropDown::SetCurrent(int xcur)
{
	current=xcur;
	droplabel.SetLabel(copydata[current]);
	droplist.Highlight(current);
	CalcHeights();
}

// ------------------------------------

void xvDropDown::SetButtonResource(String rname, XtArgVal resource)
{
	XtVaSetValues(dropbutton.ID(), rname, resource, NULL);
}

// ------------------------------------

void xvDropDown::SetListResource(String rname, XtArgVal resource)
{
	XtVaSetValues(droplist.ID(), rname, resource, NULL);
}

// ------------------------------------

void xvDropDown::SetLabelResource(String rname, XtArgVal resource)
{
	XtVaSetValues(droplabel.ID(), rname, resource, NULL);
}

// ------------------------------------

void xvDropDown::SetAllResource(String rname, XtArgVal resource)
{
	SetLabelResource(rname, resource);
	SetButtonResource(rname, resource);
	SetListResource(rname, resource);
}

// ------------------------------------

void xvDropDown::SetBackground(String name)
{
	dropform.SetBackground(name);
	droplabel.SetBackground(name);
	dropbutton.SetBackground(name);
	droplist.SetBackground(name);
}

// ------------------------------------

void xvDropDown::SetForeground(String name)
{
	droplabel.SetForeground(name);
	dropbutton.SetForeground(name);
	droplist.SetForeground(name);
}

// ------------------------------------

void xvDropDown::SetSensitive(Boolean sense)
{
	droplabel.SetSensitive(sense);
	dropbutton.SetSensitive(sense);
}

// ------------------------------------

void xvDropDown::SetNewList(int numargs, char **argdata, int currentindex)
{
	delete copydata;

	numlist=numargs;
	current=currentindex;
	copydata= new char*[numargs];

	for (int j=0; j<numargs; j++)
		copydata[j]=argdata[j];

	droplist.SetList(numargs, argdata);
	SetCurrent(current);
}

// -------------------------------------

	xvisual/xv/xvEditField.cc100600    765    144       20601  6164234546  14500 0ustar  steveusers
/*     *******************************************************************************
	XVisual GUI Development System for Linux/X-Window
	Copyright (C) 1996 Steve Carrie.

        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.
        ******************************************************************************* */

#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/Xaw3d/Text.h>
#include <X11/Xaw3d/AsciiText.h>
#include <X11/Xaw3d/AsciiSrc.h>
#include <X11/xv/xvCore.h>
#include <X11/xv/xvFont.h>
#include <X11/xv/xvEditField.h>

// *************************************************************************

xvEditField::xvEditField()
{
	alloc=FALSE;
}

// ----------------------------------------------------------------

xvEditField::xvEditField(String name, xvCore & parent, XawTextEditType mode, 
			Dimension sizeH, Dimension sizeL,
			XawAsciiType etype, String datasrc, 
			Boolean resizable, XtCallbackProc callback, String clientdata)
{
	init(name, parent, mode, sizeH, sizeL, etype, datasrc, resizable, callback, clientdata);
}

// *************************************************************************

xvEditField::~xvEditField()
{
	if (alloc) XtDestroyWidget(w);
}

// *************************************************************************

void xvEditField::init(String name, xvCore & parent, XawTextEditType mode, 
	Dimension  sizeH, Dimension sizeL,
	XawAsciiType etype, String datasrc, Boolean resizable, XtCallbackProc callback,
	String clientdata)
{
	init(name, parent.ID(), mode, sizeH, sizeL, etype, datasrc, resizable, callback, clientdata);
}

// ----------------------------------------

void xvEditField::init(String name, Widget parent, XawTextEditType mode, 
	Dimension  sizeH, Dimension sizeL,
	XawAsciiType etype, String datasrc, Boolean resizable, XtCallbackProc callback,
	String clientdata)
{
	Boolean scroll_horiz=! resizable;
	w=XtVaCreateManagedWidget(name, asciiTextWidgetClass, 
		parent, 
		"editType", mode, 
		"resizable", resizable,
		XtNscrollVertical, XawtextScrollWhenNeeded, 
		XtNscrollHorizontal, scroll_horiz, 
		XtNheight, sizeH, XtNwidth, sizeL, 
		NULL); 	
	alloc=TRUE;	
	Source=GetSource();
	XtVaSetValues(Source, XtNtype, etype, XtNstring, datasrc, NULL);
	XtVaGetValues(w, XtNtextSink, &Sink, NULL);
	if (callback!=NULL) XtAddCallback(Source, XtNcallback, callback, (XtPointer) clientdata);
	bfont.init(w, NULL);
}

// ----------------------------------------

void xvEditField::ChangeFont(String fontname)
{
	if (fontname != NULL) {
		bfont.FLoadFont(fontname);
		XtVaSetValues(w, XtNfont, (XtArgVal) bfont.FontRef(), NULL);
	}
}

// -----------------------------------------------------------------

char *xvEditField::ReturnString(char *ptr)
{
	XtVaGetValues(w, XtNstring, &ptr, NULL);
	return(ptr);
}

// ----------------------------------------

void xvEditField::SetSelection(XawTextPosition left, XawTextPosition right)
{
	XawTextSetSelection(w, left, right);
}

// -----------------------------------------

void xvEditField::UnsetSelection()
{
	XawTextUnsetSelection(w);
}

// -----------------------------------------

void xvEditField::Position(XawTextPosition *tbegin, XawTextPosition *tend)
{
	XawTextGetSelectionPos(w, tbegin, tend);
}

// -----------------------------------------

int xvEditField::Replace(XawTextPosition start, XawTextPosition end, XawTextBlock *text)
{
	return(XawTextReplace(w, start, end, text));
}

//------------------------------------------

XawTextPosition xvEditField::Search(XawTextScanDirection dir, XawTextBlock *text)
{
	return(XawTextSearch(w, dir, text));
}

// ------------------------------------------

void xvEditField::Invalidate(XawTextPosition from, XawTextPosition to)
{
	XawTextInvalidate(w, from, to);
}

// ------------------------------------------

void xvEditField::EnableRedisplay()
{
	XawTextEnableRedisplay(w);
}

// ------------------------------------------

void xvEditField::DisableRedisplay()
{
	XawTextDisableRedisplay(w);
}

// ------------------------------------------

void xvEditField::TextDisplay()
{
	XawTextDisplay(w);
}

// ------------------------------------------

XawTextPosition xvEditField::TopPosition()
{
	return(XawTextTopPosition(w));
}

// ------------------------------------------

void xvEditField::SelectionArray(XawTextSelectType *sarray)
{
	XawTextSetSelectionArray(w, sarray);
}

// -------------------------------------------

void xvEditField::InsertionPoint(XawTextPosition pos)
{
	XawTextSetInsertionPoint(w, pos);
}

// -------------------------------------------

XawTextPosition xvEditField::GetInsertionPoint()
{
	return(XawTextGetInsertionPoint(w));
}

// -------------------------------------------

void xvEditField::SetSource(Widget source, XawTextPosition pos)
{
	XawTextSetSource(w, source, pos);
	Source=source;
}

// -------------------------------------------

Widget xvEditField::GetSource()
{
	return(XawTextGetSource(w));
}

// ---------------------------------------------

void xvEditField::DisplayCaret(Boolean visable)
{
	XawTextDisplayCaret(w, visable);
}

// ---------------------------------------------

Boolean xvEditField::Save()
{
	XawAsciiSave(GetSource());
}

// ---------------------------------------------

Boolean xvEditField::SaveAs(String name)
{
	XawAsciiSaveAsFile(GetSource(), name);
}

// ---------------------------------------------

Boolean xvEditField::SourceChanged()
{
	XawAsciiSourceChanged(GetSource());
}

// ---------------------------------------------

XawTextPosition xvEditField::SourceRead(XawTextPosition pos, XawTextBlock *block,
			int length)
{
	return(XawTextSourceRead(Source, pos, block, length));
}

// ---------------------------------------------

XawTextPosition xvEditField::SourceReplace(XawTextPosition start, XawTextPosition end, 
			XawTextBlock *text)
{
	return(XawTextSourceReplace(Source, start, end, text));
}

// ---------------------------------------------

XawTextPosition xvEditField::SourceScan(XawTextPosition pos, XawTextScanType stype,
			XawTextScanDirection dir, int count, Boolean include)
{
	return(XawTextSourceScan(Source, pos, stype, dir, count, include));
}

// ---------------------------------------------

XawTextPosition xvEditField::SourceSearch(XawTextPosition pos, 
			XawTextScanDirection dir, XawTextBlock *block)
{
	return(XawTextSourceSearch(Source, pos, dir, block));
}

// ---------------------------------------------

void xvEditField::Echo(Boolean echo)
{
	XtVaSetValues(w, XtNecho, (XtArgVal) echo, NULL);
}

// ---------------------------------------------

void xvEditField::Wrap(XawTextWrapMode wrap)
{
	XtVaSetValues(w, XtNwrap, (XtArgVal) wrap, NULL);
}

// ---------------------------------------------

void xvEditField::Callback(XtCallbackProc callback, String clientdata)
{
	XtAddCallback(w, XtNcallback, callback, (XtPointer) clientdata);
}

// ---------------------------------------------

void xvEditField::AutoWrap(Boolean autowrap)
{
	XtVaSetValues(w, XtNautoFill, (XtArgVal) autowrap, NULL);
}

// ---------------------------------------------

void xvEditField::DisplayChars(Boolean ctrl)
{
	XtVaSetValues(w, XtNdisplayNonprinting, (XtArgVal) ctrl, NULL);
}

// ---------------------------------------------

void xvEditField::ResizeMode(XawTextResizeMode rmode)
{
	XtVaSetValues(w, XtNresize, (XtArgVal) rmode, NULL);
}

// ---------------------------------------------

void xvEditField::HorizontalScrollBar(XawTextScrollMode hsc)
{
	XtVaSetValues(w, XtNscrollHorizontal, (XtArgVal) hsc, NULL);
}

// ---------------------------------------------

void xvEditField::VerticalScrollBar(XawTextScrollMode hsc)
{
	XtVaSetValues(w, XtNscrollVertical, (XtArgVal) hsc, NULL);
}

// ---------------------------------------------

void xvEditField::SetString(String str)
{
	XtVaSetValues(w, XtNstring, (XtArgVal) str, NULL);
}

// ---------------------------------------------
xvisual/xv/xvEditWindow.cc100644    765    144        6222  6164234561  14714 0ustar  steveusers
/*     *******************************************************************************
	XVisual GUI Development System for Linux/X-Window
	Copyright (C) 1996 Steve Carrie.

        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.
        ******************************************************************************* */

#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/Xaw3d/Command.h>
#include <X11/Xaw3d/Text.h>
#include <X11/Xaw3d/Form.h>
#include <X11/Xaw3d/AsciiText.h>
#include <X11/Xaw3d/AsciiSrc.h>
#include <X11/Shell.h>
#include <X11/xv/xvCore.h>
#include <X11/xv/xvBasicBitmap.h>
#include <X11/xv/xvFont.h>
#include <X11/xv/xvRegion.h>
#include <X11/xv/xvGC.h>
#include <X11/xv/xvGraphic.h>
#include <X11/xv/xvForm.h>
#include <X11/xv/xvWindow.h>
#include <X11/xv/xvButton.h>
#include <X11/xv/xvEditField.h>
#include <X11/xv/xvEditWindow.h>

// -----------------------------------------------------------------

xvEditWindow::xvEditWindow()
{
}
 
// -----------------------------------------------------------------

xvEditWindow::xvEditWindow(xvCore & parent, String header, XawTextEditType mode, 
		String datasource,Dimension xsize, Dimension ysize,
		XtCallbackProc ok_call, XtCallbackProc cancel_call, String client)
{
	init(parent, header, mode, datasource, xsize, ysize, ok_call, cancel_call, client);
}

// =================================================================

xvEditWindow::~xvEditWindow()
{
}
 
// -----------------------------------------------------------------

void xvEditWindow::init(xvCore & parent, String header, XawTextEditType mode, 
		String datasource, Dimension xsize, Dimension ysize,
		XtCallbackProc ok_call, XtCallbackProc cancel_call, String client)
{
	xvWindow::init(header, "xvEditWindow", parent);
	xvWindow::SetBackground("gray70");

	editform.init("editform", xvWindow::ID());
	editform.SetBackground("gray70");
	
	xvEditField::init("editarea", editform, mode, ysize, xsize,
		XawAsciiString, datasource, FALSE, NULL, NULL);
	xvEditField::Wrap(XawtextWrapLine);
	xvEditField::AutoWrap(TRUE);
	
	editok.init("OK", editform, ok_call, client);
	editok.SetWidth(80);
	editok.SetShadowWidth(4);
	editok.SetDistance(xsize/2-100, ysize+20);
	editok.SetBeNiceToColormap(FALSE);

	editcancel.init("Cancel", editform, cancel_call, client);
	editcancel.SetWidth(80);
	editcancel.SetShadowWidth(4);
	editcancel.SetDistance(xsize/2+20, ysize+20);
	editcancel.SetBeNiceToColormap(FALSE);
}

// -----------------------------------------------------------------
	xvisual/xv/xvFileDialog.cc100644    765    144       25121  6165755451  14664 0ustar  steveusers
/*     *******************************************************************************
	XVisual GUI Development System for Linux/X-Window
	Copyright (C) 1996 Steve Carrie.

        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.
        ******************************************************************************* */

#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <dirent.h>
#include <sys/stat.h>
#include <string.h>
#include <stdio.h>

#include <X11/Xaw/Text.h>
#include <X11/xv/xvCore.h>
#include <X11/xv/xvBasicBitmap.h>
#include <X11/xv/xvFont.h>
#include <X11/xv/xvContext.h>
#include <X11/xv/xvForm.h>
#include <X11/xv/xvLabel.h>
#include <X11/xv/xvButton.h>
#include <X11/xv/xvView.h>
#include <X11/xv/xvList.h>
#include <X11/xv/xvToggle.h>
#include <X11/xv/xvEditField.h>
#include <X11/xv/xvPopupShell.h>
#include <X11/xv/xvMsgBox.h>
#include <X11/xv/xvFileDialog.h>

// ------------------------------------------

xvFileDialog::xvFileDialog()
{
	numfiles=0;
	numdirs=0;
	currentpath[0]='\0';
	currentfile[0]='\0';
	allocflag=0;	
	hiddenflag=0;
}

// ------------------------------------------

xvFileDialog::xvFileDialog(String name, xvCore & parent, String pathname,
				XtCallbackProc filelist_callback, XtCallbackProc dirlist_callback,
				XtCallbackProc ok_callback, XtCallbackProc cancel_callback,
				XtCallbackProc err_callback, XtActionProc edit_callback,
				xvContext & appcontext, String mask, Boolean maskActive,
				Boolean allowDirchange)
{
	init(name, parent, pathname, filelist_callback, dirlist_callback, ok_callback,
		cancel_callback, err_callback, edit_callback, appcontext, mask, maskActive,
		allowDirchange);
}

// ------------------------------------------

xvFileDialog::~xvFileDialog()
{
	if (allocflag != 0) {
		delete filelist;
		delete dirlist;
		delete superlist;
		delete statlist;
		allocflag=0;
	}
}

// ------------------------------------------

void xvFileDialog::init(String name, xvCore & parent, String pathname,
				XtCallbackProc filelist_callback, XtCallbackProc dirlist_callback,
				XtCallbackProc ok_callback, XtCallbackProc cancel_callback,
				XtCallbackProc err_callback, XtActionProc edit_callback,
				xvContext & appcontext, String mask,  Boolean maskActive,
				Boolean allowDirchange)
{
	numfiles=0;
	numdirs=0;
	currentpath[0]='\0';
	currentfile[0]='\0';
	allocflag=0;	
	hiddenflag=0;

	usemask=maskActive;
	tform.init(name, parent, TRUE, TRUE);
	w=tform.ID();

//      ** Fileeditbox label
	tflabel.init("Filename", tform);
	tflabel.SetBorderWidth(0);
	tflabel.SetHorizDistance(25);
	tflabel.SetVertDistance(25);

//     ** file edit box
	tfedit.init("edit", tform, XawtextEdit, 20, 150);
	tfedit.SetRelVertical(tflabel);
	tfedit.SetHorizDistance(25);	
	tfedit.SetVertDistance(3);
	XtTranslations trans=XtParseTranslationTable(
		"<Key>Return: select-all() fddataentry() \n\
		!Meta<Key> i: no-op()");
	tfedit.OverrideTranslations(trans);
	appcontext.AddAction("fddataentry", edit_callback);
	UpdateFileBox(mask);
	strcpy(filemask, mask);

//      ** file list label
	tfblabel.init("Files           ", tform);
	tfblabel.SetBorderWidth(0);
	tfblabel.SetRelVertical(tfedit);
	tfblabel.SetHorizDistance(25);
	tfblabel.SetVertDistance(25);
	tfblabel.SetWidth(150);

//     ** file list view
	tfbview.init("fileview", tform, TRUE, FALSE, TRUE);
	tfbview.SetRelVertical(tfblabel);
	tfbview.SetHorizDistance(25);
	tfbview.SetVertDistance(3);

//	** file list	
	tfblist.init("filelist", tfbview, filelist_callback,  numfiles, filelist, 1);
	tfblist.SetWidth(150);
	
	tfbview.SetHeight(183);
	tfbview.SetWidth(150);	

//     ** dir list label
	tdlabel.init("Directories", tform);
	tdlabel.SetBorderWidth(0);
	tdlabel.SetRelHorizontal(tfbview);
	tdlabel.SetHorizDistance(25);
	tdlabel.SetVertDistance(25);

//     ** dir path
	pathlabel.init("  ", tform);
	pathlabel.SetBorderWidth(0);
	pathlabel.SetRelVertical(tdlabel);
	pathlabel.SetRelHorizontal(tfbview);
	pathlabel.SetHorizDistance(25);
	pathlabel.SetVertDistance(15);
	pathlabel.SetJustify(XtJustifyLeft);

//     ** dir view
	tdview.init("fileview", tform, TRUE, FALSE, TRUE);
	tdview.SetRelVertical(pathlabel);
	tdview.SetRelHorizontal(tfbview);
	tdview.SetHorizDistance(25);
	tdview.SetVertDistance(15);
	if (! allowDirchange)
		tdview.SetSensitive(FALSE);

//      ** dirlist	
	tdlist.init("dirlist", tdview, dirlist_callback, numdirs, dirlist, 1);
	tdlist.SetWidth(150);

	tdview.SetHeight(205);
	tdview.SetWidth(150);

//     ** OK button
	ok.init("OK", tform, ok_callback);
	ok.SetRelHorizontal(tdview);
	ok.SetVertDistance(50);
	ok.SetHorizDistance(25);
	ok.SetWidth(100);
	ok.SetBeNiceToColormap(FALSE);

//     ** Cancel Button
	cancel.init("Cancel", tform, cancel_callback);
	cancel.SetRelVertical(ok);
	cancel.SetRelHorizontal(tdview);
	cancel.SetVertDistance(25);
	cancel.SetHorizDistance(25);
	cancel.SetWidth(100);
	cancel.SetBeNiceToColormap(FALSE);

//     ** Toggle
	ttoggle.init("Show Hidden Dirs/Files", tform, (XtCallbackProc) ToggleClick, NULL);
	ttoggle.SetRelVertical(tfbview);
	ttoggle.SetVertDistance(25);
	ttoggle.SetHorizDistance(25);
	ttoggle.SetBeNiceToColormap(FALSE);

//     ** rightside & bottomside spacers
	rspacer.init(" ", tform);
	rspacer.SetRelHorizontal(ok);
	rspacer.SetHorizDistance(5);
	rspacer.SetBorderWidth(0);
	bspacer.init(" ", tform);
	bspacer.SetRelVertical(ttoggle);
	bspacer.SetVertDistance(5);
	bspacer.SetBorderWidth(0);

	tmsg.init("Protected", pathlabel,
			"DIRECTORY ACCESS ERROR\n\nAccess Denied.",
			XVMSGSIMPLEWARN, "SkyBlue",
			err_callback);

	NewPath(pathname);
}

// ---------------------------------------------

void xvFileDialog::ToggleClick(Widget wd, XtPointer cl, XtPointer ca)
{

}

// ---------------------------------------------

String xvFileDialog::File(XtPointer call)
{
		
	XawListReturnStruct *xr=(XawListReturnStruct *) call;
	
	UpdateFileBox(filelist[xr->list_index]);
	return(currentfile);
}

// --------------------------------------------

String xvFileDialog::Directory(XtPointer call)
{
	char buf[180];

	XawListReturnStruct *xr=(XawListReturnStruct *) call;
	
	if (strcmp(xr->string, "..")==0) {
		strcpy(buf, currentpath);
		int i=strlen(buf);
		if (i>=2) {
			i--;
			while ((buf[i]!='/') && (i>0))
				i--;		
			buf[i]='\0';
		}
		if (i<2)
			if (buf[0]!='/') 
				strcpy(buf, "/");
	}
	else {
		strcpy(buf, currentpath);
		if (buf[strlen(buf)-1]!='/')
			strcat(buf, "/");
		strcat(buf, xr->string);
	}
	NewPath(buf);
}

// --------------------------------------------

void xvFileDialog::UpdateFileBox(String newstr)
{
	struct XawTextBlock textdata;

	int l=strlen(currentfile);
	textdata.firstPos=0;
	textdata.length=strlen(newstr);
	textdata.ptr=newstr;
	textdata.format=FMT8BIT;
	tfedit.Replace(0, l, &textdata);
	strcpy(currentfile, newstr);
}

// ---------------------------------------------

String xvFileDialog::SelectedFile(String returnpathname)
{
	char *s;
	XtVaGetValues(tfedit.ID(), XtNstring, &s, NULL);
	strcpy(currentfile, s);
	strcpy(returnpathname, currentpath);
	strcat(returnpathname, "/");
	strcat(returnpathname, currentfile);

	return(currentfile);
}

// ----------------------------------------------

void xvFileDialog::NewPath(String pathname)
{
	int numentries=GetNumEntries(pathname);
	if (numentries >=0 ) {
		if (allocflag != 0) {
			delete filelist;
			delete dirlist;
			delete superlist;
			delete statlist;
			allocflag=0;
		}

		ParseFileTree(pathname, numentries);
		UpdateFileList();
		UpdateDirList();
//		UpdateFileBox(" ");
		strcpy(currentpath, pathname);
	
		sprintf(currentnum, "Files: %d    ", numfiles);
		tfblabel.SetLabel(currentnum);	
		pathlabel.SetLabel(currentpath);
		pathlabel.SetWidth(150);
	}
	else {
		Position npx=0, npy=0;
		Position vx=tform.GetWidth()/4;
		Position vy=tform.GetHeight()/4;
		XtTranslateCoords(tform.ID(), vx, vy, &npx, &npy); 
		tmsg.Open(npx,npy);
	}
}

// ----------------------------------------------

void xvFileDialog::ClearError(XtPointer calldata)
{
	tmsg.Close();
}

// ----------------------------------------------

void xvFileDialog::UpdateFileList()
{
	tfblist.SetList(numfiles, filelist);
}

// ----------------------------------------------

void xvFileDialog::UpdateDirList()
{
	tdlist.SetList(numdirs, dirlist);
}

// --------------------------------------

int xvFileDialog::GetNumEntries(String pathname)
{
	DIR *dp;
	struct dirent *d;
	int cnt=0;

	dp=opendir(pathname);
	if (dp!=NULL) { 
		while ((d=readdir(dp)) !=NULL) 
			cnt++;
		closedir(dp);
	}
	else
		cnt=-1;

	return(cnt);
}

// ------------------------------------

int xvFileDialog::ParseFileTree(String pathname, int entries)
{
	DIR *dp;
	int listed=0;
	char buf[180];
	struct dirent *d;
	hiddenflag=(int) ttoggle.GetState();
	
	dp=opendir(pathname);
	if (dp!=NULL) {
		allocflag=1;
		superlist= new struct dirent[entries];
		statlist=new struct stat[entries];
		dirlist=new char*[entries];
		filelist=new char*[entries];
		for (int i=0; i<entries; i++) {
			dirlist[i]=NULL;
			filelist[i]=NULL;
		}
			
		numfiles=0;
		numdirs=0;
		
		while ((d=readdir(dp)) != NULL) {
			strcpy(superlist[listed].d_name,d->d_name);
			strcpy(buf, pathname);
			strcat(buf, "/");
			strcat(buf, superlist[listed].d_name);
			stat(buf, &statlist[listed]);
	
			if (S_ISDIR(statlist[listed].st_mode)!=0) {
				if (strcmp(superlist[listed].d_name, ".")!=0) 
					if ((hiddenflag != 0) || (superlist[listed].d_name[0] != '.') || (superlist[listed].d_name[1] =='.'))
						dirlist[numdirs++]=superlist[listed].d_name;
			}
			else	
				if ((hiddenflag != 0) || (superlist[listed].d_name[0] != '.'))
					if ((! usemask) || ((usemask) && (strstr(superlist[listed].d_name, filemask) != NULL)))
						filelist[numfiles++]=superlist[listed].d_name;
				
			listed++;
			
		}					
		closedir(dp);
		
	}
	
	return(listed);
}

// ---------------------------------------

void xvFileDialog::EditEntry()
{
	XawTextPosition start, end;
	XawTextBlock block;

	tfedit.Position(&start, &end);
	tfedit.SourceRead(0, &block, 40);
	strncpy(currentfile, block.ptr, end);
	currentfile[end]='\0';
	tfedit.UnsetSelection();
}
	
// ------------------------------------------------------------
xvisual/xv/xvFileList.cc100644    765    144       16672  6164234606  14404 0ustar  steveusers
/*     *******************************************************************************
	XVisual GUI Development System for Linux/X-Window
	Copyright (C) 1996 Steve Carrie.

        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.
        ******************************************************************************* */

#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>

#include <dirent.h>
#include <sys/stat.h>
#include <string.h>
#include <stdio.h>

#include <X11/Xaw3d/Viewport.h>
#include <X11/Xaw3d/List.h>
#include <X11/xv/xvCore.h>
#include <X11/xv/xvFont.h>
#include <X11/xv/xvView.h>
#include <X11/xv/xvList.h>
#include <X11/xv/xvVisualList.h>
#include <X11/xv/xvFileList.h>

// -------------------------------------------

xvFileList::xvFileList()
{
	numfiles=0;
	allocflag=FALSE;
	hiddenflag=FALSE;
}

// -------------------------------------------

xvFileList::xvFileList(String name, xvCore & parent, String path, int mode, Boolean hidden,
				XtCallbackProc filelist_callback, Boolean manage)
{
	numfiles=0;
	allocflag=FALSE;
	hiddenflag=FALSE;
	init(name, parent, path, mode, hidden, filelist_callback, manage);
}

// -------------------------------------------

xvFileList::~xvFileList()
{
	if (allocflag) {
		delete filelist;	
		delete superlist;
		allocflag=FALSE;
	}
}

// -------------------------------------------

void xvFileList::init(String name, xvCore & parent, String path, int mode, Boolean hidden,
				XtCallbackProc filelist_callback, Boolean manage)
{
	allocflag=FALSE;

	numfiles=0;
	numentries=0;

	NewPath(path, mode, hidden);

	xvView::init(name, parent.ID(), FALSE, FALSE, TRUE);
	xvList::init("xvFileList", xvView::ID(), filelist_callback, numfiles, filelist, 1);

	if (!manage) {
		XtTranslations trans=XtParseTranslationTable(" ");
		xvList::SetResource(XtNtranslations, (XtArgVal) trans);
	}
	xvList::SetWidth(150);
	xvList::SetHeight(180);	

	if (manage) xvView::ManageChildren();
}

// --------------------------------------------

int xvFileList::SetNewPath(String pathname, int mode, Boolean hidden)
{
	Dimension oldw=xvList::GetWidth();
	Dimension oldh=xvList::GetHeight();
	int vt=NewPath(pathname, mode, hidden);
	xvList::SetList(numfiles, filelist);
	xvView::SetWidth(oldw);
	xvView::SetHeight(oldh);

	return(vt);
}
	
// --------------------------------------------

int xvFileList::NewPath(String pathname, int mode, Boolean hidden)
{
	numentries=GetNumEntries(pathname);
	if (numentries >= 0) {
		datamode=mode;
		hiddenflag=hidden;
		strcpy(currentpath, pathname);
		if (allocflag==TRUE) {
			delete filelist;
			delete superlist;	
			allocflag=FALSE;
		}
		ParseFileTree(pathname);
	}
	return(numentries);
}

// ---------------------------------------------

int xvFileList::GetNumEntries(String pathname)
{
	DIR *dp;
	struct dirent *d;
	int cnt=0;

	dp=opendir(pathname);
	if (dp!=NULL) {
		while ((d=readdir(dp)) != NULL)
			cnt++;
		closedir(dp);
	}
	else
		cnt=-1;

	return(cnt);
}

// ------------------------------------------

int xvFileList::ParseFileTree(String pathname)
{
	DIR *dp;
	struct dirent *d;
	struct stat s;

	int listed=0;
	char buf[180];

	dp=opendir(pathname);
	if (dp!=NULL) {
		allocflag=TRUE;
		superlist=new struct dirent[numentries];
		filelist=new char*[numentries];

		for (int i=0; i<numentries; i++) 
			filelist[i]=NULL;
  
		numfiles=0;

		while ((d=readdir(dp)) != NULL) {
			strcpy(superlist[listed].d_name, d->d_name);
			strcpy(buf, pathname);
			strcat(buf, "/");
			strcat(buf, superlist[listed].d_name);
			stat(buf, &s);

			if ((datamode==XVFILELIST) || (datamode==XVALLLIST))
				if (S_ISDIR(s.st_mode) == 0) 
					if ((hiddenflag != 0) || (superlist[listed].d_name[0]!='.'))
						filelist[numfiles++]=superlist[listed].d_name;

			if ((datamode==XVDIRLIST) || (datamode==XVALLLIST))
				if (S_ISDIR(s.st_mode) != 0)
					if ((hiddenflag!=0) || (superlist[listed].d_name[0] != '.') || (superlist[listed].d_name[1]=='.')) {
						strcat(superlist[listed].d_name, "/");
						filelist[numfiles++]=superlist[listed].d_name;
					}
			listed++;
		}
		closedir(dp);
	}
	return(listed);
}

// --------------------------------------------------------					

void xvFileList::GetResource(String resname, XtArgVal *val)
{
	XtVaGetValues(xvList::ID(), resname, val, NULL);
}

// ------------------------------------------	

void xvFileList::SetResource(String resname, XtArgVal val)
{
	XtVaSetValues(xvList::ID(), resname, val, NULL);
}

// ------------------------------------------	

void xvFileList::SetFixedPosition(Boolean val)
{
	xvView::SetFixedPosition(val);
}

// ------------------------------------------

char *xvFileList::GetSelectedItem(XtPointer call, int pathmode)
{
	XawListReturnStruct *item=(XawListReturnStruct *) call;

	switch(pathmode) {
		case XVRELATIVEPATH:
			strcpy(workingbuffer, item->string);
			break;
		case XVABSOLUTEPATH:
			strcpy(workingbuffer, currentpath);
			strcat(workingbuffer, item->string);
			break;
		default:
			workingbuffer[0]='\0';
			break;
	}

	return(workingbuffer);
}

// ---------------------------------------------

char *xvFileList::Directory(String path)
{
	if (strcmp(path, "../")==0) {
		strcpy(dirbuffer, currentpath);
		int i=strlen(dirbuffer);
		if (i>=2) {
			i-=2;
			while ((dirbuffer[i]!='/') && (i>0)) i--;
			dirbuffer[i]='\0';
		}
		if (i<2)
			if (dirbuffer[0] !='/') strcpy(dirbuffer, "/");
	}
	else {
		strcpy(dirbuffer, currentpath);
		if (dirbuffer[strlen(dirbuffer)-1]!='/') strcat(dirbuffer, "/");
		strcat(dirbuffer, path);
	}
	return(dirbuffer);
}

// --------------------------------------------

void xvFileList::SetBackground(String name)
{
	xvList::SetBackground(name);
}

// --------------------------------------------

void xvFileList::SetBackground(Pixel bg)
{
	xvList::SetBackground(bg);
}

// --------------------------------------------

void xvFileList::SetForeground(String name)
{
	xvList::SetForeground(name);
}

// --------------------------------------------

void xvFileList::SetForeground(Pixel fg)
{
	xvList::SetForeground(fg);
}

// --------------------------------------------

void xvFileList::Map()
{
	xvView::Map();
}

// --------------------------------------------

void xvFileList::Unmap()
{
	xvView::Unmap();
}

// --------------------------------------------

void xvFileList::SetSensitive(Boolean sense)
{
	xvList::SetSensitive(sense);
}

// --------------------------------------------

void xvFileList::SetMappedWhenManaged(Boolean man)
{
	xvView::SetMappedWhenManaged(man);
}

// --------------------------------------------

void xvFileList::AddEvent(EventMask eventmask, XtEventHandler handler, XtPointer cdata)
{
	xvList::AddEvent(eventmask, handler, cdata);
}

// --------------------------------------------

void xvFileList::RemoveEvent(EventMask eventmask, XtEventHandler handler, XtPointer cdata)
{
	xvList::RemoveEvent(eventmask, handler, cdata);
}

// --------------------------------------------
xvisual/xv/xvFont.cc100644    765    144        5251  6164234621  13543 0ustar  steveusers
/*     *******************************************************************************
	XVisual GUI Development System for Linux/X-Window
	Copyright (C) 1996 Steve Carrie.

        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.
        ******************************************************************************* */

#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <string.h>

#include <X11/xv/xvCore.h>
#include <X11/xv/xvFont.h>

// -----------------------------------

xvFont::xvFont()
{
	alloc=FALSE;
}

// -----------------------------------

xvFont::xvFont(xvCore & object, String fontname)
{
	init(object, fontname);
}

// -----------------------------------

xvFont::~xvFont()
{
	if (alloc) FUnloadFont();
}

// -----------------------------------

void xvFont::init(xvCore & object, String fontname)
{
	init(object.ID(), fontname);

}
// -----------------------------------

void xvFont::init(Widget gcw, String fontname)
{
	xvwidget=gcw;
	xvwindow=XtWindow(gcw);
	xvdisplay=XtDisplay(gcw);
	xvscreen=XtScreen(gcw);

	if (fontname != NULL) {
		FLoadFont(fontname);
		alloc=TRUE;
	}
}

// -----------------------------------

void xvFont::FLoadFont(String fontname)
{
	xvfont=XLoadFont(xvdisplay, fontname);
	
	xvfontstruct=XQueryFont(xvdisplay, xvfont);
}

// -----------------------------------

void xvFont::FUnloadFont()
{
	XFreeFont(xvdisplay, xvfontstruct);
//	XUnloadFont(xvdisplay, xvfont);
}

// -----------------------------------

int xvFont::FGetTextWidth(String str)
{
	return(XTextWidth(xvfontstruct, str, strlen(str)));
}

// -----------------------------------

XCharStruct *xvFont::FTextExtents(String string, int *dir, int *ascent, int *descent)
{
	XTextExtents(xvfontstruct, string, strlen(string), dir, ascent, descent, &xvcharstruct);
	return(&xvcharstruct);
}

// ------------------------------------

XFontStruct *xvFont::FontRef()
{
	return(xvfontstruct);
}

// ------------------------------------

Font xvFont::FontID()
{
	return(xvfont);
}

// ------------------------------------
xvisual/xv/xvFontList.cc100644    765    144        4176  6164234635  14411 0ustar  steveusers
/*     *******************************************************************************
	XVisual GUI Development System for Linux/X-Window
	Copyright (C) 1996 Steve Carrie.

        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.
        ******************************************************************************* */

#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <string.h>

#include <X11/xv/xvCore.h>
#include <X11/xv/xvFontList.h>

// -----------------------------------

xvFontList::xvFontList()
{
	alloc=FALSE;
}

// -----------------------------------

xvFontList::xvFontList(xvCore & object,  String pattern, int numfonts)
{
	init(object, pattern, numfonts);
}

// -----------------------------------

xvFontList::~xvFontList()
{
	if (alloc) {
		XFreeFontNames(fontlist);
		delete fontlist;	
	}
}

// -----------------------------------

void xvFontList::init(xvCore & object,  String pattern, int numfonts)
{
	init(object.ID(), pattern, numfonts);

}

// -----------------------------------

void xvFontList::init(Widget gcw, String pattern, int numfonts)
{
	numreq=numfonts;
	fontlist = new char*[numfonts];
	xvwidget=gcw;
	xvdisplay=XtDisplay(gcw);
	fontlist=XListFonts(xvdisplay, pattern, numfonts, &numret);
	alloc=TRUE;
}

// -----------------------------------

char **xvFontList::GetList()
{
	return(fontlist);
}

// -----------------------------------

int xvFontList::FontsInList()
{
	return(numret);
}

// -----------------------------------
xvisual/xv/xvForm.cc100600    765    144        4511  6164234651  13531 0ustar  steveusers
/*     *******************************************************************************
	XVisual GUI Development System for Linux/X-Window
	Copyright (C) 1996 Steve Carrie.

        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.
        ******************************************************************************* */

#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/Xaw3d/Form.h>
#include <X11/xv/xvCore.h>
#include <X11/xv/xvForm.h>

// ---------------------------------------------

xvForm::xvForm()
{
	alloc=FALSE;
}

// ---------------------------------------------

xvForm::xvForm(String name, xvCore & parent, Boolean show, Boolean doit)
{
	init(name, parent, show, doit);
}

// ---------------------------------------------

xvForm::~xvForm()
{
	if (alloc) XtDestroyWidget(w);
}

// ---------------------------------------------

void xvForm::init(String name, xvCore & parent, Boolean show, Boolean doit)
{
	w=XtVaCreateWidget(name, formWidgetClass, parent.ID(),
			"resizable", TRUE, NULL);
	DoLayout(doit);
	if (show) ManageChildren();
	alloc=TRUE;
}

// ---------------------------------------------

void xvForm::init(String name, Widget parent, Boolean show, Boolean doit)
{
	w=XtVaCreateWidget(name, formWidgetClass, parent,
			"resizable", TRUE, NULL);
	DoLayout(doit);
	if (show) ManageChildren();
	alloc=TRUE;
}

// ---------------------------------------------

void xvForm::DoLayout(Boolean doit)
{
	XawFormDoLayout(w, doit);
}

// ----------------------------------------------

void xvForm::ManageChildren(Boolean manage)
{
	if (manage)
		XtManageChild(w);
	else
		XtUnmanageChild(w);
}

// ----------------------------------------------
	xvisual/xv/xvGC.cc100644    765    144       16040  6164234665  13154 0ustar  steveusers
/*     *******************************************************************************
	XVisual GUI Development System for Linux/X-Window
	Copyright (C) 1996 Steve Carrie.

        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.
        ******************************************************************************* */

#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>

#include <X11/xv/xvCore.h>
#include <X11/xv/xvRegion.h>
#include <X11/xv/xvGC.h>

// -----------------------------------

xvGC::xvGC()
{
	alloc=FALSE;
}

// -----------------------------------

xvGC::xvGC(xvCore & object)
{
	init(object);
}

// -----------------------------------

xvGC::~xvGC()
{
	if (alloc) {
		XFreeGC(xvdisplay, maincontext);
		XFreeGC(xvdisplay, backupcontext1);
		XFreeGC(xvdisplay, backupcontext2);
	}
}

// -----------------------------------

void xvGC::init(xvCore & object)
{
	init(object.ID());

}
// -----------------------------------

void xvGC::init(Widget gcw)
{
	xvwidget=gcw;
	xvwindow=XtWindow(gcw);
	xvdisplay=XtDisplay(gcw);
	xvscreen=XtScreen(gcw);

	maincontext=XCreateGC(xvdisplay, xvwindow, 0, NULL);
	backupcontext1=XCreateGC(xvdisplay, xvwindow, 0, NULL);
	backupcontext2=XCreateGC(xvdisplay, xvwindow, 0, NULL);
	xvcontext=maincontext;
	alloc=TRUE;
}

// -----------------------------------

void xvGC::GCFlush()
{
	XFlushGC(xvdisplay, xvcontext);
}

// -----------------------------------

void xvGC::GCSetState(Pixel foreground, Pixel background, int func, Pixel plane_mask)
{
	XSetState(xvdisplay, xvcontext, foreground, background, func, plane_mask);
}

// -----------------------------------

void xvGC::GCSetForeground(Pixel foreground)
{
	if (foreground != -1)
		XSetForeground(xvdisplay, xvcontext, foreground);
}

// ----------------------------------

void xvGC::GCSetBackground(Pixel background)
{
	if (background != -1)
		XSetBackground(xvdisplay, xvcontext, background);
}

// ----------------------------------

void xvGC::GCSetFunction(int func)
{
	XSetFunction(xvdisplay, xvcontext, func);
}

// ----------------------------------

void xvGC::GCSetPlaneMask(Pixel plane_mask)
{
	if (plane_mask != -1)
		XSetPlaneMask(xvdisplay, xvcontext, plane_mask);
}

// ----------------------------------

void xvGC::GCSetLineAttributes(unsigned int line_width, int line_style, int cap_style,
			int join_style)
{
	XSetLineAttributes(xvdisplay, xvcontext, line_width, line_style,
			cap_style, join_style);
}

// ----------------------------------

void xvGC::GCSetDashes(int dash_offset, char dash_list[], int num_elements)
{
	XSetDashes(xvdisplay, xvcontext, dash_offset, dash_list, num_elements);
}

// ----------------------------------

void xvGC::GCSetFillStyle(int fill_style)
{
	XSetFillStyle(xvdisplay, xvcontext, fill_style);
}

// -----------------------------------

void xvGC::GCSetFillRule(int fill_rule)
{
	XSetFillRule(xvdisplay, xvcontext, fill_rule);
}

// -----------------------------------

void xvGC::GCSetTile(Pixmap tile)
{
	XSetTile(xvdisplay, xvcontext, tile);
}

// ------------------------------------

void xvGC::GCSetStipple(Pixmap stipple)
{
	XSetStipple(xvdisplay, xvcontext, stipple);
}

// -------------------------------------

void xvGC::GCSetTSOrigin(int tso_x, int tso_y)
{
	XSetTSOrigin(xvdisplay, xvcontext, tso_x, tso_y);
}

// -------------------------------------

void xvGC::GCSetFont(Font font)
{
	XSetFont(xvdisplay, xvcontext, font);
}

// -------------------------------------

void xvGC::GCSetClipOrigin(int clip_ox, int clip_oy)
{
	XSetClipOrigin(xvdisplay, xvcontext, clip_ox, clip_oy);
}

//  -------------------------------------

void xvGC::GCSetClipMask(Pixmap pix)
{
	XSetClipMask(xvdisplay, xvcontext, pix);
}

// --------------------------------------

void xvGC::GCSetClipRectangles(int clip_ox, int clip_oy, XRectangle rect[],
				int numrec, int xorder)
{
	XSetClipRectangles(xvdisplay, xvcontext, clip_ox, clip_oy, rect, numrec, xorder);
}

// ---------------------------------------

void xvGC::GCSetArcMode(int arc_mode)
{
	XSetArcMode(xvdisplay, xvcontext, arc_mode);
}

// ---------------------------------------

void xvGC::GCSetSubMode(int sub_mode)
{
	XSetSubwindowMode(xvdisplay, xvcontext, sub_mode);
}

// ---------------------------------------

void xvGC::GCSetGraphicsExposures(Boolean gexpose)
{
	XSetGraphicsExposures(xvdisplay, xvcontext, gexpose);
}

// ----------------------------------------

Status xvGC::GCQueryBestSize(int vclass, unsigned int width, unsigned int height, 
					unsigned int  *width_ret, unsigned int *height_ret)
{
	return (XQueryBestSize(xvdisplay, vclass, xvwindow, width, height,
				width_ret, height_ret));
}

// ----------------------------------------

Status xvGC::GCQueryBestTile(unsigned int width, unsigned int height, 
					unsigned int *width_ret, unsigned int *height_ret)

{
	return (XQueryBestTile(xvdisplay, xvwindow, width, height,
				width_ret, height_ret));
}


// ----------------------------------------

Status xvGC::GCQueryBestStipple(unsigned int width, unsigned int height, 
					unsigned int *width_ret, unsigned int *height_ret)
{
	return (XQueryBestStipple(xvdisplay,  xvwindow, width, height,
				width_ret, height_ret));
}

// ----------------------------------------

Window xvGC::WinID()
{
	return(xvwindow);
}

// ----------------------------------------

GC xvGC::GCGetGC()
{
	return(xvcontext);
}

// ----------------------------------------

void xvGC::GCSwitchGC(int which)
{
	switch(which) {
		case XVDEFAULTGC:
			xvcontext=maincontext;
			break;
		case XVAUXGC1:
			xvcontext=backupcontext1;
			break;
		case XVAUXGC2:
			xvcontext=backupcontext2;
			break;
		default:
			xvcontext=maincontext;
	}
}

// -----------------------------------------

void xvGC::GCRegion(xvRegion & r)
{
	XSetRegion(xvdisplay, xvcontext,r.GetRegion());
}

// ------------------------------------------

void xvGC::GCPointerXY(int *x, int *y, int *rx, int *ry, unsigned int *btn)
{
	Window rw, cw;

	XQueryPointer(xvdisplay, xvwindow, &rw, &cw, rx, ry, x, y, btn);
}

//--------------------------------------------  

void xvGC::GCWin2Root(int x, int y, int *tx, int *ty)
{
	Window cw;

	XTranslateCoordinates(xvdisplay, xvwindow, RootWindowOfScreen(xvscreen),
					x, y, tx, ty, &cw);
}

// --------------------------------------------
 
void xvGC::GCRoot2Win(int x, int y, int *tx, int *ty)
{
	Window cw;
	XTranslateCoordinates(xvdisplay, RootWindowOfScreen(xvscreen), xvwindow,
					x, y, tx, ty, &cw);
}

// ---------------------------------------------
xvisual/xv/xvGraphic.cc100644    765    144       14443  6164234700  14233 0ustar  steveusers
/*     *******************************************************************************
	XVisual GUI Development System for Linux/X-Window
	Copyright (C) 1996 Steve Carrie.

        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.
        ******************************************************************************* */

#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <string.h>

#include <X11/xv/xvCore.h>
#include <X11/xv/xvRegion.h>
#include <X11/xv/xvGC.h>
#include <X11/xv/xvGraphic.h>

// -----------------------------------

xvGraphic::xvGraphic()
{
}

// -----------------------------------

xvGraphic::~xvGraphic()
{
}

// -----------------------------------

void xvGraphic::init(xvCore & object)
{
	xvGC::init(object);
}

// -----------------------------------

void xvGraphic::init(Widget wid)
{
	xvGC::init(wid);
}

// -----------------------------------

void xvGraphic::GClearArea(int x, int y, unsigned int width, unsigned int height, Boolean exposures)
{
	XClearArea(xvdisplay, xvwindow, x, y, width, height, exposures);
}

// ------------------------------------

void xvGraphic::GClearWindow()
{
	XClearWindow(xvdisplay, xvwindow);
}

// -------------------------------------

void xvGraphic::GCopyArea(xvGC & dest, int sx, int sy, unsigned int width, unsigned int height,
				int dx, int dy)

{
	XCopyArea(xvdisplay, xvwindow, dest.WinID(), xvcontext, sx, sy, width, height, 
				dx, dy);
}

// --------------------------------------

void xvGraphic::GCopyPlane(xvGC & dest, int sx, int sy, unsigned int width, unsigned int height,
				int dx, int dy, unsigned long plane)
{
	XCopyPlane(xvdisplay, xvwindow, dest.WinID(), xvcontext, sx, sy, width, height, 
				dx, dy, plane);
}

// ----------------------------------------

void xvGraphic::GDrawPoint(int x, int y)
{
	XDrawPoint(xvdisplay, xvwindow, xvcontext, x, y);
}

// ----------------------------------------

void xvGraphic::GDrawPoints(XPoint *points, int npoints, int mode)
{
	XDrawPoints(xvdisplay, xvwindow, xvcontext, points, npoints, mode);
}

// -----------------------------------------

void xvGraphic::GDrawLine(int x1, int y1, int x2, int y2)
{
	XDrawLine(xvdisplay, xvwindow, xvcontext, x1, y1, x2, y2);
}

// -----------------------------------------

void xvGraphic::GDrawLines(XPoint *points, int npoints, int mode)
{
	XDrawLines(xvdisplay, xvwindow, xvcontext, points, npoints, mode);
}

// -----------------------------------------

void xvGraphic::GDrawSegments(XSegment *segments, int nseg)
{
	XDrawSegments(xvdisplay, xvwindow, xvcontext, segments, nseg);
}
		
// -----------------------------------

void xvGraphic::GDrawRectangle(int x, int y, unsigned int width, unsigned int height)
{
	XDrawRectangle(xvdisplay, xvwindow, xvcontext, x, y, width, height);
}

// ------------------------------------

void xvGraphic::GDrawRectangles(XRectangle rectangles[], int nrect)
{
	XDrawRectangles(xvdisplay, xvwindow, xvcontext, rectangles, nrect);
}

// -------------------------------------
	
void xvGraphic::GDrawArc(int x, int y, unsigned int width, unsigned int height,
					int angle1, int angle2)
{
	XDrawArc(xvdisplay, xvwindow, xvcontext, x, y, width, height, angle1, angle2);
}

// -------------------------------------

void xvGraphic::GDrawArcs(XArc *arcs, int narcs)
{
	XDrawArcs(xvdisplay, xvwindow, xvcontext, arcs, narcs);
}

// --------------------------------------

void xvGraphic::GFillRectangle(int x, int y, unsigned int width, unsigned int height)
{
	XFillRectangle(xvdisplay, xvwindow, xvcontext, x, y, width, height);
}

// --------------------------------------

void xvGraphic::GFillRectangles(XRectangle *rectangles, int nrect)
{
	XFillRectangles(xvdisplay, xvwindow, xvcontext, rectangles, nrect);
}

// ---------------------------------------

void xvGraphic::GFillPolygon(XPoint *points, int npoints, int shape, int mode)
{
	XFillPolygon(xvdisplay, xvwindow, xvcontext, points, npoints, shape, mode);
}

// ----------------------------------------

void xvGraphic::GFillArc(int x, int y, unsigned int width, unsigned int height, 
					int angle1, int angle2)
{
	XFillArc(xvdisplay, xvwindow, xvcontext, x, y, width, height, angle1, angle2);
}

// ------------------------------------------

void xvGraphic::GFillArcs(XArc *arcs, int narcs)
{
	XFillArcs(xvdisplay, xvwindow, xvcontext, arcs, narcs);
}

// ------------------------------------------

void xvGraphic::GPrint(int x, int y, String message)
{
	XDrawString(xvdisplay, xvwindow, xvcontext, x, y, message, strlen(message));
}

// ------------------------------------------

void xvGraphic::GPrintImage(int x, int y, String message)
{
	XDrawImageString(xvdisplay, xvwindow, xvcontext, x, y, message, strlen(message));
}

// ------------------------------------------

XImage *xvGraphic::GGetImage(int x, int y, unsigned int width, unsigned int height,
				unsigned long plane_mask, int format)
{
	gimage=XGetImage(xvdisplay, xvwindow, x, y, width, height, plane_mask, format);	
	return(gimage);
}

// -------------------------------------------

XImage *xvGraphic::GGetSubImage(int x, int y, unsigned int width, unsigned int height,
					unsigned long plane_mask, int format, 
					int dx, int dy, XImage *image=NULL)
{
	XImage *temp=image;
	if (temp==NULL)
		temp=gimage;
	temp=XGetSubImage(xvdisplay, xvwindow, x, y, width, height, plane_mask, format,
					temp, dx, dy);
	return(temp);
}

// -------------------------------------------

void xvGraphic::GPutImage(int sx, int sy, int dx, int dy, unsigned int width, unsigned int height,
				XImage *image)
{
	XImage *temp=image;
	if (temp==NULL)
		temp=gimage;
	XPutImage(xvdisplay, xvwindow, xvcontext, temp, sx, sy, dx, dy, width, height);
}

// --------------------------------------------

xvisual/xv/xvGrip.cc100644    765    144        4207  6164234712  13537 0ustar  steveusers
/*     *******************************************************************************
	XVisual GUI Development System for Linux/X-Window
	Copyright (C) 1996 Steve Carrie.

        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.
        ******************************************************************************* */

#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/Xaw3d/Grip.h>
#include <X11/xv/xvCore.h>
#include <X11/xv/xvGrip.h>

// ---------------------------------------------

xvGrip::xvGrip()
{
	alloc=FALSE;
}

// ---------------------------------------------

xvGrip::xvGrip(String name, xvCore & parent, XtCallbackProc callback)
{
	init(name, parent, callback);
}

// ---------------------------------------------

xvGrip::~xvGrip()
{
	if (alloc) XtDestroyWidget(w);
}

// ---------------------------------------------

void xvGrip::init(String name, xvCore & parent,XtCallbackProc callback)
{
	init(name, parent.ID(), callback);
}

// ---------------------------------------------

void xvGrip::init(String name, Widget parent, XtCallbackProc callback)
{
	char buf[]="#augment\n\
			<Btn1Down>:	GripAction(press)\n\
			<Btn1Motion>:	GripAction(move)\n\
			<Btn1Up>:	GripAction(release)";

	gtrans=XtParseTranslationTable(buf);

	w=XtVaCreateManagedWidget(name, gripWidgetClass, parent,
			XtNtranslations, gtrans,
			NULL);
	XtAddCallback(w, XtNcallback, callback, (XtPointer) name);

	alloc=TRUE;
}
	
// ---------------------------------------------

	xvisual/xv/xvLabel.cc100600    765    144        5123  6164234724  13646 0ustar  steveusers
/*     *******************************************************************************
	XVisual GUI Development System for Linux/X-Window
	Copyright (C) 1996 Steve Carrie.

        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.
        ******************************************************************************* */

#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/Xaw3d/Label.h>
#include <X11/xv/xvCore.h>
#include <X11/xv/xvFont.h>
#include <X11/xv/xvBasicBitmap.h>
#include <X11/xv/xvLabel.h>

// ----------------------------------------------------------

xvLabel::xvLabel()
{
	alloc=FALSE;
}

// ----------------------------------------------------------

xvLabel::xvLabel(String name, xvCore & parent)
{
	init(name, parent);
}

// ----------------------------------------------------------

xvLabel::~xvLabel()
{
	if (alloc) XtDestroyWidget(w);
}

// ----------------------------------------------------------

void xvLabel::init(String name, xvCore & parent)
{
	init(name, parent.ID());
}

// ---------------------------------------------------

void xvLabel::init(String name, Widget parent)
{
	w=XtVaCreateManagedWidget(name, labelWidgetClass,
		parent, NULL);
	alloc=TRUE;
	bfont.init(w, NULL);
	bmap.init(NULL, w);
}

// -----------------------------------------------------------------

int xvLabel::ChangeBitmap(String name, int pixtype, int position)
{
	int err;

	if ((err=bmap.ReadFile(name, pixtype)) == 0)
		if (position==XVCENTREBITMAP)
			XtVaSetValues(w, XtNbitmap, (XtArgVal) bmap.GetPixmap(), NULL);
		else
			XtVaSetValues(w, XtNleftBitmap, (XtArgVal) bmap.GetPixmap(), NULL);

	return(err);
}

// -----------------------------------------------------------------

void xvLabel::ChangeFont(String fontname)
{
	if (fontname != NULL) {
		bfont.FLoadFont(fontname);
		XtVaSetValues(w, XtNfont, (XtArgVal) bfont.FontRef(), NULL);
	}
}

// -----------------------------------------------------------------
xvisual/xv/xvList.cc100600    765    144        6104  6164234736  13545 0ustar  steveusers
/*     *******************************************************************************
	XVisual GUI Development System for Linux/X-Window
	Copyright (C) 1996 Steve Carrie.

        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.
        ******************************************************************************* */

#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/Xaw3d/List.h>
#include <X11/xv/xvCore.h>
#include <X11/xv/xvFont.h>
#include <X11/xv/xvList.h>

// -------------------------------------------

xvList::xvList()
{
	alloc=FALSE;
}

// -------------------------------------------

xvList::xvList(String name, xvCore & parent, XtCallbackProc callback, 
			int numdata, char **listdata, int columns)
{
	init(name, parent, callback, numdata, listdata, columns);
}

// -------------------------------------------

xvList::~xvList()
{
	if (alloc) XtDestroyWidget(w);
}

// -------------------------------------------

void xvList::init(String name, xvCore & parent, XtCallbackProc callback, 
				int numdata, char **listdata, int columns)
{
	init(name, parent.ID(), callback, numdata, listdata, columns);

}

// ------------------------------------------

void xvList::init(String name, Widget parent, XtCallbackProc callback, 
				int numdata, char **listdata, int columns)
{
	w=XtVaCreateManagedWidget(name, listWidgetClass, parent,
		"defaultColumns", columns,
		"forceColumns", TRUE,
		"list", listdata,
		"numberStrings", numdata,
		NULL);
	XtAddCallback(w, XtNcallback, callback, 0);
	alloc=TRUE;
	bfont.init(w, NULL);

}

// ------------------------------------------

void xvList::ChangeFont(String fontname)
{
	bfont.FLoadFont(fontname);
	XtVaSetValues(w, XtNfont, (XtArgVal) bfont.FontRef(), NULL);
}

// -----------------------------------------------------------------

void xvList::SetList(int numdata, char **listdata)
{
	XawListChange(w, listdata, numdata, 0, TRUE);

}

// ------------------------------------------

void xvList::Highlight(int item)
{
	XawListHighlight(w, item);
}

// ------------------------------------------

void xvList::Unhighlight()
{
	XawListUnhighlight(w);
}

// ------------------------------------------

XawListReturnStruct *xvList::ShowCurrent()
{
	return(XawListShowCurrent(w));
}

// -------------------------------------------

int xvList::GetLongest()
{
	int l;
	XtVaGetValues(w, XtNlongest, &l, NULL);
	return(l);
}

// -------------------------------------------
xvisual/xv/xvMenuBar.cc100600    765    144        7000  6164234753  14156 0ustar  steveusers
/*     *******************************************************************************
	XVisual GUI Development System for Linux/X-Window
	Copyright (C) 1996 Steve Carrie.

        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.
        ******************************************************************************* */

#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/Xaw3d/Form.h>
#include <X11/Xaw3d/MenuButton.h>
#include <X11/xv/xvCore.h>
#include <X11/xv/xvFont.h>
#include <X11/xv/xvMenuBar.h>
#include <string.h>

// ********************************

xvMenuBar::xvMenuBar()
{
	alloc=FALSE;
}

// ---------------------------

xvMenuBar::xvMenuBar(String name, xvCore & parent, int num, char **menuinfo, Boolean manage)
{
	init(name, parent, num, menuinfo, manage);
}

// ---------------------------

xvMenuBar::~xvMenuBar()
{
	if (alloc) XtDestroyWidget(w);
}

// ---------------------------

void xvMenuBar::init(char *name, xvCore & parent, int num, char **menuinfo, Boolean manage)
{
	w=XtVaCreateWidget(name, formWidgetClass, 
	  parent.ID(), NULL);

	setupMenu(num, menuinfo);
	alloc=TRUE;
	bfont.init(w, NULL);
	ManageChildren(manage);
}

// -----------------------------------------------------------------

void xvMenuBar::ChangeFont(String fontname)
{
	if (fontname != NULL) {
		bfont.FLoadFont(fontname);
		SetAllResource(XtNfont, (XtArgVal) bfont.FontRef());
	}
}


// ---------------------------

void xvMenuBar::ManageChildren(Boolean manage)
{
	if (manage)
		XtManageChild(w);
	else
		XtUnmanageChild(w);
}

// ---------------------------

void xvMenuBar::setupMenu(int num, char **menuinfo) 
{
	numbuttons=num;

	for (int i=0; i<num; i++) {
	  if (i==0)
	    MenuButtons[i]=XtVaCreateManagedWidget(menuinfo[i], 
	      menuButtonWidgetClass, w, 
	      "menuName", menuinfo[i], NULL);
	  else
	    MenuButtons[i]=XtVaCreateManagedWidget(menuinfo[i], 
	      menuButtonWidgetClass, w, 
	      "menuName", menuinfo[i],
	      "fromHoriz", MenuButtons[i-1],		
	      NULL);

	  menulist[i]= strdup(menuinfo[i]);
        }
}

// ----------------------------

Widget xvMenuBar::GetButton(char *name)
{
	int thisone=-1;

	for(int i=0; i<numbuttons; i++)
	  if (strcmp(name, menulist[i]) == 0) {
	    thisone=i;
	    break;
	  }
          
	if (thisone != -1)
	  return(MenuButtons[thisone]);
	else
	  return(NULL);
}

// ------------------------------------

void xvMenuBar::SetAllResource(String resource, XtArgVal val)
{

	for(int i=0; i<numbuttons; i++)  
		XtVaSetValues(MenuButtons[i], resource, val, NULL);
	
}

// ------------------------------------

void xvMenuBar::SetResource(String name, String resource, XtArgVal val)
{
	int thisone=-1;

	for(int i=0; i<numbuttons; i++)
	  if (strcmp(name, menulist[i]) == 0) {
	    thisone=i;
	    break;
	  }
          
	if (thisone != -1) 
	  XtVaSetValues(MenuButtons[thisone], resource, val, NULL);
	
}xvisual/xv/xvMsgBox.cc100644    765    144       11304  6164234767  14063 0ustar  steveusers
/*     *******************************************************************************
	XVisual GUI Development System for Linux/X-Window
	Copyright (C) 1996 Steve Carrie.

        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.
        ******************************************************************************* */

#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/Xaw/Command.h>

#include <X11/xv/xvCore.h>
#include <X11/xv/xvBasicBitmap.h>
#include <X11/xv/xvFont.h>
#include <X11/xv/xvPopupShell.h>
#include <X11/xv/xvForm.h>
#include <X11/xv/xvLabel.h>
#include <X11/xv/xvButton.h>
#include <X11/xv/xvMsgBox.h>
#include <X11/xv/stop.xbm>
#include <X11/xv/warn.xbm>
#include <X11/xv/query.xbm>

// ---------------------------------------------

xvMsgBox::xvMsgBox()
{
	result=0;
}

// ---------------------------------------------

xvMsgBox::xvMsgBox(String name, xvCore & parent, String message, 
			int type, String back,
			XtCallbackProc b1_call, XtCallbackProc b2_call)
{
	result=0;
	init(name, parent, message, type, back, b1_call, b2_call);
}

// ---------------------------------------------

xvMsgBox::~xvMsgBox()
{
}

// ---------------------------------------------

void xvMsgBox::init(String name, xvCore & parent, String message, 
			int type, String back,
			XtCallbackProc b1_call, XtCallbackProc b2_call)
{
	backcolor=back;
	xvPopupShell::init(name, parent);
	
	msgform.init(name, xvPopupShell::ID(), FALSE, TRUE);
	msgform.SetBackground(backcolor);

	msgicon.init(" ", msgform);
	msgicon.SetVertDistance(25);
	msgicon.SetHorizDistance(25);
	msgicon.SetBorderWidth(0);
	msgicon.SetShadowWidth(4);
	msgicon.SetBeNiceToColormap(FALSE);
	msgicon.SetBackground(backcolor);

	msglabel.init(message, msgform);
	msglabel.SetRelHorizontal(msgicon);
	msglabel.SetVertDistance(50);
	msglabel.SetHorizDistance(15);
	msglabel.SetBorderWidth(0);
	msglabel.SetJustify(XtJustifyCenter);
	msglabel.SetBackground(backcolor);
	msglabel.ChangeFont("*times-*-r-*-140*");

	switch(type) {
		case XVMSGSIMPLEWARN:
			msgicon.SetBitmapInfo(warn_bits, warn_width, warn_height, XtNbitmap);

			b1.init("OK", msgform, b1_call);
			b1.SetRelVertical(msgicon);
			b1.SetVertDistance(25);
			b1.SetWidth(b1.GetWidth()*2);
			b1.SetHeight(b1.GetHeight()*2);
			b1.SetResource(XtNshapeStyle, XmuShapeRoundedRectangle);
			b1.ChangeFont("*times-*-r-*-140*");
			b1.SetBeNiceToColormap(FALSE);
			break;
		case XVMSGSIMPLEFATAL:
			msgicon.SetBitmapInfo(stop_bits, stop_width, stop_height, XtNbitmap);

			b1.init("OK", msgform, b1_call);
			b1.SetRelVertical(msgicon);
			b1.SetVertDistance(25);
			b1.SetWidth(b1.GetWidth()*2);
			b1.SetHeight(b1.GetHeight()*2);
			b1.SetResource(XtNshapeStyle, XmuShapeRoundedRectangle);
			b1.ChangeFont("*times-*-r-*-140*");
			b1.SetBeNiceToColormap(FALSE);
			break;
		case XVMSGSIMPLECHOICE:
			msgicon.SetBitmapInfo(query_bits, query_width, query_height, XtNbitmap);
			
			b1.init("YES", msgform, b1_call);
			b1.SetRelVertical(msgicon);
			b1.SetVertDistance(25);
			b1.SetResource(XtNshapeStyle, XmuShapeRoundedRectangle);
			b1.ChangeFont("*times-*-r-*-140*");
			b1.SetBeNiceToColormap(FALSE);

			b2.init("NO", msgform, b2_call);
			b2.SetRelVertical(msgicon);
			b2.SetVertDistance(25);
			b2.SetResource(XtNshapeStyle, XmuShapeRoundedRectangle);
			b2.ChangeFont("*times-*-r-*-140*");
			b2.SetBeNiceToColormap(FALSE);
			break;
	}

	spr.init(" ", msgform);
	spr.SetRelHorizontal(msglabel);
	spr.SetBorderWidth(0);
	spr.SetHorizDistance(5);
	spr.SetVertDistance(25);
	spr.SetBackground(backcolor);

	switch(type) {
		case XVMSGSIMPLEFATAL:
		case XVMSGSIMPLEWARN:
			b1.SetHorizDistance(msgform.GetWidth()/2-b1.GetWidth()/2);
			break;
		case XVMSGSIMPLECHOICE:
			b1.SetHorizDistance((int) msgform.GetWidth()/3);
			b2.SetHorizDistance((int) msgform.GetWidth()/3*2);
			break;
	}
	msgform.ManageChildren(TRUE);
}

// ---------------------------------------------

void xvMsgBox::ChangeFont(String fontname)
{
	msglabel.ChangeFont(fontname);
	b1.ChangeFont(fontname);
	b2.ChangeFont(fontname);
}

// ----------------------------------------------
	xvisual/xv/xvPanner.cc100600    765    144        5660  6164235004  14050 0ustar  steveusers
/*     *******************************************************************************
	XVisual GUI Development System for Linux/X-Window
	Copyright (C) 1996 Steve Carrie.

        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.
        ******************************************************************************* */

#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/Xaw3d/Panner.h>
#include <X11/xv/xvCore.h>
#include <X11/xv/xvPanner.h>

// -------------------------------------------

xvPanner::xvPanner()
{
	alloc=FALSE;
}

// -------------------------------------------

xvPanner::xvPanner(String name, xvCore & parent, XtCallbackProc callback,
			Dimension sizeH, Dimension sizeW, Position InitX, Position InitY)
{
	init(name, parent, callback, sizeH, sizeW, InitX, InitY);
}

// -------------------------------------------

xvPanner::~xvPanner()
{
	if (alloc) XtDestroyWidget(w);
}

// -------------------------------------------

void xvPanner::init(String name, xvCore & parent, XtCallbackProc callback,
			Dimension sizeH, Dimension sizeW, Position InitX, Position InitY)
{
	w=XtVaCreateManagedWidget(name, pannerWidgetClass, parent.ID(),
		"canvasHeight", sizeH, "canvasWidth", sizeW,
		"sliderHeight", sizeH/10, "sliderWidth", sizeW/10,
		"sliderX", InitX, "sliderY", InitY,
		NULL);

	XtAddCallback(w, XtNreportCallback, callback, 0);
	alloc=TRUE;
}

// ------------------------------------------

void xvPanner::Where(Position *XPos, Position *YPos)
{
	XtVaGetValues(w, XtNsliderX, XPos, NULL);
	XtVaGetValues(w, XtNsliderY, YPos, NULL);
}

// -------------------------------------------

void xvPanner::SetSliderPosition(Position XPos, Position YPos)
{
	XtVaSetValues(w, XtNsliderX, XPos, XtNsliderY, YPos, NULL);
}

// -------------------------------------------

void xvPanner::SetSliderSize(Dimension sx, Dimension sy)
{
	XtVaSetValues(w, XtNsliderHeight, sy, XtNsliderWidth, sx, NULL);
}

// -------------------------------------------

void xvPanner::SetCanvasSize(Dimension sx, Dimension sy)
{
	XtVaSetValues(w, XtNcanvasWidth, sx, XtNcanvasHeight, sy, NULL);
}

// -------------------------------------------

void xvPanner::SetdefaultScale(Dimension sca)
{
	XtVaSetValues(w, XtNdefaultScale, sca, NULL);
}

// -------------------------------------------xvisual/xv/xvPopupDialog.cc100600    765    144        3657  6164235016  15057 0ustar  steveusers
/*     *******************************************************************************
	XVisual GUI Development System for Linux/X-Window
	Copyright (C) 1996 Steve Carrie.

        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.
        ******************************************************************************* */

#include <stdio.h>
#include <string.h>
#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/Shell.h>

#include <X11/Xaw3d/Dialog.h>
#include <X11/xv/xvCore.h>
#include <X11/xv/xvFont.h>
#include <X11/xv/xvPopupTransientShell.h>
#include <X11/xv/xvDialog.h>
#include <X11/xv/xvPopupDialog.h>



// ******************************************************

xvPopupDialog::xvPopupDialog()
{
}

// -----------------------------------------------

xvPopupDialog::xvPopupDialog(String name, xvCore & parent, String header, String defaultdata)
{
	init(name, parent, header, defaultdata);
}

// -----------------------------------------------

xvPopupDialog::~xvPopupDialog()
{
}

// -----------------------------------------------

void xvPopupDialog::init(String name,  xvCore & parent,  String header, String defaultdata)
{
	xvPopupTransientShell::init(name, parent);

	xvDialog::init(name, xvPopupTransientShell::ID(), header, defaultdata);

}xvisual/xv/xvPopupMenu.cc100600    765    144       11042  6164235033  14566 0ustar  steveusers
/*     *******************************************************************************
	XVisual GUI Development System for Linux/X-Window
	Copyright (C) 1996 Steve Carrie.

        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.
        ******************************************************************************* */

#include <stdio.h>
#include <string.h>
#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/Shell.h>
#include <X11/xv/xlogo11>
#include <X11/xv/xvCore.h>
#include <X11/xv/xvFont.h>
#include <X11/xv/xvPopupShell.h>
#include <X11/xv/xvPopupMenu.h>
#include <X11/Xaw3d/SimpleMenu.h>
#include <X11/Xaw3d/SmeBSB.h>
#include <X11/Xaw3d/SmeLine.h>

// ******************************************************

xvPopupMenu::xvPopupMenu()
{
}

// -----------------------------------------------

xvPopupMenu::xvPopupMenu(char *name, char *header, int argc, char **argv, 
			XtCallbackProc proclist[], xvCore & parent)
{
	init(name, header, argc, argv, proclist, parent);
}

// -----------------------------------------------

xvPopupMenu::~xvPopupMenu()
{
}

// -----------------------------------------------

int xvPopupMenu::findentry(char *name)
{
	int i=-1;
	for(int j=0; j<numentries; j++)
		if (strcmp(listentry[j], name)==0) {
			i=j;
			break;
		}

	return(i);
}

// -----------------------------------------------

void xvPopupMenu::EntryResource(String name, String resname, XtArgVal res)
{
	Widget xw=GetWidget(name);
	if (xw !=NULL)
		XtVaSetValues(xw, resname, res, NULL);
}

// -----------------------------------------------

void xvPopupMenu::MenuEntry(String name, String newname)
{
	Widget xw=GetWidget(name);
	if (xw != NULL)
		XtVaSetValues(xw, XtNlabel, (XtArgVal) newname, NULL);
}

// -----------------------------------------------

void xvPopupMenu::CheckEntry(char *name)
{
	Widget xw=GetWidget(name);
	if (xw != NULL)
		XtVaSetValues(xw, XtNleftBitmap, mark, NULL);
				
}

// -----------------------------------------------

void xvPopupMenu::UnCheckEntry(char *name)
{
	Widget xw=GetWidget(name);
	if (xw != NULL)
		XtVaSetValues(xw, XtNleftBitmap, None, NULL);
}

// -----------------------------------------------

Widget xvPopupMenu::GetWidget(char *name)
{

	int i=findentry(name);

	if (i ==-1)
		return(NULL);
	else
		return(WidgetList[i]);
		
}

// -----------------------------------------------

void xvPopupMenu::init(char *name, char *header, int argc, char **argv, 
				XtCallbackProc proclist[],  xvCore & parent)
{
	char mtran[]="#augment\n\
				<Motion>: highlight()";

	mtranslations=XtParseTranslationTable(mtran);

	xvPopupShell::init(name, parent, simpleMenuWidgetClass, header, mtranslations);

	Sep=XtVaCreateManagedWidget(NULL, smeLineObjectClass, ID(),
		"label", NULL, "leftMargin", 20, NULL);

        numentries=argc;
	MyParent=parent.ID();
	bfont.init(MyParent, NULL);

	for (int i=0; i<argc; i++) { 
	  listentry[i]=argv[i];
          if (strcmp(argv[i],"---") == 0) 
            WidgetList[i]=XtVaCreateManagedWidget(NULL, smeLineObjectClass,
	      ID(), "label", NULL, "leftMargin", 20, NULL);
          else
            WidgetList[i]=XtVaCreateManagedWidget(NULL, smeBSBObjectClass,
	      ID(), "label", argv[i], "leftMargin", 20, NULL);

	  XtAddCallback(WidgetList[i], XtNcallback, proclist[i], argv[i]);
        }
	mark=XCreateBitmapFromData(XtDisplay(parent.ID()),
		RootWindowOfScreen(XtScreen(parent.ID())),
		xlogo11_bits, xlogo11_width, xlogo11_height);

}  	

// ******************************************************

void xvPopupMenu::AllResource(String resname, XtArgVal res)
{
	for (int i=0; i<numentries; i++)
		XtVaSetValues(WidgetList[i], resname, res, NULL);
}

// -----------------------------------------------

void xvPopupMenu::ChangeFont(String fontname)
{
	if (fontname != NULL) {
		bfont.FLoadFont(fontname);
		AllResource(XtNfont, (XtArgVal) bfont.FontRef());
	}
}

// -----------------------------------------------------------------
xvisual/xv/xvPopupShell.cc100644    765    144        5451  6164235047  14735 0ustar  steveusers
/*     *******************************************************************************
	XVisual GUI Development System for Linux/X-Window
	Copyright (C) 1996 Steve Carrie.

        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.
        ******************************************************************************* */

#include <stdio.h>
#include <string.h>
#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/Shell.h>

#include <X11/xv/xvCore.h>
#include <X11/xv/xvPopupShell.h>


// ******************************************************

xvPopupShell::xvPopupShell()
{
	alloc=FALSE;
}

// -----------------------------------------------

xvPopupShell::xvPopupShell(String name, xvCore & parent)
{
	init(name, parent);
}

// -----------------------------------------------

xvPopupShell::~xvPopupShell()
{
	if (alloc) XtDestroyWidget(w);
}

// -----------------------------------------------

void xvPopupShell::PlaceShell()
{
	Position x, y;
	Dimension height;

	XtTranslateCoords(MyParent, 
		(Position) 0, (Position) 0,
		&x, &y);

	XtVaGetValues(MyParent, XtNheight, &height, NULL);

	XtVaSetValues(w, XtNx, x-1, XtNy, y+height, NULL);
}

// -----------------------------------------------

void xvPopupShell::Open()
{

	PlaceShell();
	XtPopup(w, XtGrabExclusive);
}

// ------------------------------------------------
 
void xvPopupShell::Open(Position x, Position y)
{
	XtVaSetValues(w, XtNx, x, XtNy, y, NULL);
	XtPopup(w, XtGrabExclusive);
}

// ----------------------------------------------=

void xvPopupShell::Close()
{
	XtPopdown(w);
}

// -----------------------------------------------

void xvPopupShell::init(String name,  xvCore & parent)
{

	w=XtVaCreatePopupShell(name, overrideShellWidgetClass, parent.ID(), 
		NULL);

	MyParent=parent.ID();
	alloc=TRUE;
}  	

// ------------------------------------------------

void xvPopupShell::init(String name,  xvCore & parent, WidgetClass wid,
				String header, XtTranslations mt)
{

	w=XtVaCreatePopupShell(name, wid, parent.ID(), 
		"label", header,
		"translations", mt,
		NULL);

	MyParent=parent.ID();
	alloc=TRUE;
}  	

// ------------------------------------------------
xvisual/xv/xvPopupTransientShell.cc100644    765    144        5637  6164235062  16630 0ustar  steveusers
/*     *******************************************************************************
	XVisual GUI Development System for Linux/X-Window
	Copyright (C) 1996 Steve Carrie.

        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.
        ******************************************************************************* */

#include <stdio.h>
#include <string.h>
#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/Shell.h>

#include <X11/xv/xvCore.h>
#include <X11/xv/xvPopupTransientShell.h>


// ******************************************************

xvPopupTransientShell::xvPopupTransientShell()
{
	alloc=FALSE;
}

// -----------------------------------------------

xvPopupTransientShell::xvPopupTransientShell(String name, xvCore & parent)
{
	init(name, parent);
}

// -----------------------------------------------

xvPopupTransientShell::~xvPopupTransientShell()
{
	if (alloc) XtDestroyWidget(w);
}

// -----------------------------------------------

void xvPopupTransientShell::PlaceShell()
{
	Position x, y;
	Dimension height;

	XtTranslateCoords(MyParent, 
		(Position) 0, (Position) 0,
		&x, &y);

	XtVaGetValues(MyParent, XtNheight, &height, NULL);

	XtVaSetValues(w, XtNx, x-1, XtNy, y+height, NULL);
}

// -----------------------------------------------

void xvPopupTransientShell::Open()
{

	PlaceShell();
	XtPopup(w, XtGrabExclusive);
}

// ------------------------------------------------
 
void xvPopupTransientShell::Open(Position x, Position y)
{
	XtVaSetValues(w, XtNx, x, XtNy, y, NULL);
	XtPopup(w, XtGrabExclusive);
}

// ----------------------------------------------=

void xvPopupTransientShell::Close()
{
	XtPopdown(w);
}

// -----------------------------------------------

void xvPopupTransientShell::init(String name,  xvCore & parent)
{

	w=XtVaCreatePopupShell(name, transientShellWidgetClass, parent.ID(), 
		NULL);

	MyParent=parent.ID();
	alloc=TRUE;
}  	

// ------------------------------------------------

void xvPopupTransientShell::init(String name,  xvCore & parent, WidgetClass wid,
				String header, XtTranslations mt)
{

	w=XtVaCreatePopupShell(name, wid, parent.ID(), 
		"label", header,
		"translations", mt,
		NULL);

	MyParent=parent.ID();
	alloc=TRUE;
}  	

// ------------------------------------------------
xvisual/xv/xvPulldownMenu.cc100600    765    144       10422  6164235075  15276 0ustar  steveusers
/*     *******************************************************************************
	XVisual GUI Development System for Linux/X-Window
	Copyright (C) 1996 Steve Carrie.

        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.
        ******************************************************************************* */

#include <string.h>
#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/xv/xlogo11>

#include <X11/Xaw3d/SimpleMenu.h>
#include <X11/Xaw3d/SmeBSB.h>
#include <X11/Xaw3d/SmeLine.h>

#include <X11/xv/xvCore.h>
#include <X11/xv/xvFont.h>
#include <X11/xv/xvPulldownMenu.h>


// ******************************************************

xvPulldownMenu::xvPulldownMenu()
{
	alloc=FALSE;
}

// ------------------------------------------------

xvPulldownMenu::xvPulldownMenu(char *name, int argc, char **argv, XtCallbackProc proclist[], Widget parent)
{
	init(name, argc, argv, proclist, parent);
}

// -----------------------------------------------

xvPulldownMenu::~xvPulldownMenu()
{
	if (alloc) XtDestroyWidget(w);
}

// -----------------------------------------------

int xvPulldownMenu::findentry(char *name)
{
	int i=-1;
	for(int j=0; j<numentries; j++)
		if (strcmp(listentry[j], name)==0) {
			i=j;
			break;
		}

	return(i);
}

// -----------------------------------------------

void xvPulldownMenu::EntryResource(String name, String resname, XtArgVal res)
{
	Widget xw=GetWidget(name);
	if (xw !=NULL)
		XtVaSetValues(xw, resname, res, NULL);
}

// -----------------------------------------------

void xvPulldownMenu::MenuEntry(String name, String newname)
{
	Widget xw=GetWidget(name);
	if (xw != NULL)
		XtVaSetValues(xw, XtNlabel, (XtArgVal) newname, NULL);
}

// -----------------------------------------------

void xvPulldownMenu::CheckEntry(char *name)
{
	Widget xw=GetWidget(name);
	if (xw != NULL)
		XtVaSetValues(xw, XtNleftBitmap, mark, NULL);
				
}

// -----------------------------------------------

void xvPulldownMenu::UnCheckEntry(char *name)
{
	Widget xw=GetWidget(name);
	if (xw != NULL)
		XtVaSetValues(xw, XtNleftBitmap, None, NULL);
}

// -----------------------------------------------

Widget xvPulldownMenu::GetWidget(char *name)
{

	int i=findentry(name);

	if (i ==-1)
		return(NULL);
	else
		return(WidgetList[i]);
		
}

// -----------------------------------------------

void xvPulldownMenu::init(char *name, int argc, char **argv, 
			XtCallbackProc proclist[], Widget parent)
{
	w=XtVaCreatePopupShell(name, simpleMenuWidgetClass, 
	  parent, NULL);

        numentries=argc;

	bfont.init(w, NULL);

	for (int i=0; i<argc; i++) { 
	  listentry[i]=argv[i];
          if (strcmp(argv[i],"---") == 0) 
            WidgetList[i]=XtVaCreateManagedWidget(NULL, smeLineObjectClass,
	      w, "label", NULL, "leftMargin", 20, NULL);
          else
            WidgetList[i]=XtVaCreateManagedWidget(NULL, smeBSBObjectClass,
	      w, "label", argv[i], "leftMargin", 20, NULL);

	  XtAddCallback(WidgetList[i], XtNcallback, proclist[i], argv[i]);
        }
	mark=XCreateBitmapFromData(XtDisplay(parent),
		RootWindowOfScreen(XtScreen(parent)),
		xlogo11_bits, xlogo11_width, xlogo11_height);

	alloc=TRUE;
}  	

// ******************************************************

void xvPulldownMenu::AllResource(String resname, XtArgVal res)
{
	for (int i=0; i<numentries; i++)
		XtVaSetValues(WidgetList[i], resname, res, NULL);
}

// -----------------------------------------------

void xvPulldownMenu::ChangeFont(String fontname)
{
	if (fontname != NULL) {
		bfont.FLoadFont(fontname);
		AllResource(XtNfont, (XtArgVal) bfont.FontRef());
	}
}

// -----------------------------------------------------------------
xvisual/xv/xvRegion.cc100644    765    144        5060  6164235110  14050 0ustar  steveusers
/*     *******************************************************************************
	XVisual GUI Development System for Linux/X-Window
	Copyright (C) 1996 Steve Carrie.

        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.
        ******************************************************************************* */

#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/xv/xvRegion.h>

// ---------------------------------------------

xvRegion::xvRegion()
{
	myregion=XCreateRegion();
}

// ---------------------------------------------

xvRegion::~xvRegion()
{
	XDestroyRegion(myregion);
}

// ---------------------------------------------

xvRegion::xvRegion(XPoint points[], int n, int fill_rule)
{
	myregion=XCreateRegion();		
	XPolygonRegion(points, n, fill_rule);
}

// ---------------------------------------------

void xvRegion::init(XPoint points[], int n, int fill_rule)
{
	XPolygonRegion(points,n, fill_rule);
}

// ---------------------------------------------

Region xvRegion::GetRegion()
{
	return(myregion);
}

// ---------------------------------------------

void xvRegion::Offset(int dx, int dy)
{
	XOffsetRegion(myregion, dx, dy);
}

// ---------------------------------------------

void xvRegion::Shrink(int dx, int dy)
{
	XShrinkRegion(myregion, dx, dy);
}

// ---------------------------------------------

void xvRegion::ClipBox(XRectangle *rect)
{
	XClipBox(myregion, rect);
}

// ---------------------------------------------

Boolean xvRegion::Empty()
{
	return(XEmptyRegion(myregion));
}

// ---------------------------------------------

Boolean xvRegion::PointIn(int x, int y)
{
	return(XPointInRegion(myregion, x, y));
}

// ----------------------------------------------

int xvRegion::RectIn(int x, int y, unsigned int width, unsigned int height)
{
	return(XRectInRegion(myregion, x, y, width, height));
}

// -----------------------------------------------
	xvisual/xv/xvRepeater.cc100600    765    144        5673  6164235122  14401 0ustar  steveusers
/*     *******************************************************************************
	XVisual GUI Development System for Linux/X-Window
	Copyright (C) 1996 Steve Carrie.

        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.
        ******************************************************************************* */

#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/Xaw3d/Repeater.h>
#include <X11/xv/xvCore.h>
#include <X11/xv/xvFont.h>
#include <X11/xv/xvBasicBitmap.h>
#include <X11/xv/xvRepeater.h>

// -----------------------------------------------------------------

xvRepeater::xvRepeater()
{
	alloc=FALSE;
}

// -----------------------------------------------------------------

xvRepeater::xvRepeater(String name, xvCore & parent, XtCallbackProc callback,
	String client, XtCallbackProc startcall, XtCallbackProc stopcall)
{
	init(name, parent, callback, client, startcall, stopcall);
}

// =================================================================

xvRepeater::~xvRepeater()
{
	if (alloc) XtDestroyWidget(w);
}

// -----------------------------------------------------------------

void xvRepeater::init(char *name, xvCore & parent, XtCallbackProc callback,
	String client, XtCallbackProc startcall, XtCallbackProc stopcall)
{
	w=XtVaCreateManagedWidget(name, repeaterWidgetClass, parent.ID(), 
		"flash", TRUE, 
		NULL);
          
	XtAddCallback(w, XtNcallback, callback, (XtPointer) client);
	XtAddCallback(w, XtNstartCallback, startcall, (XtPointer) client);
	XtAddCallback(w, XtNstopCallback, stopcall, (XtPointer) client);
	alloc=TRUE;

	bfont.init(w, NULL);
	bmap.init(NULL, w);
}

// ------------------------------------------

void xvRepeater::ChangeFont(String fontname)
{
	if (fontname != NULL) {
		bfont.FLoadFont(fontname);
		XtVaSetValues(w, XtNfont, (XtArgVal) bfont.FontRef(), NULL);
	}
}

// -----------------------------------------------------------------

int xvRepeater::ChangeBitmap(String name, int pixtype, int position)
{
	int err;

	if ((err=bmap.ReadFile(name, pixtype)) == 0)
		if (position==XVCENTREBITMAP)
			XtVaSetValues(w, XtNbitmap, (XtArgVal) bmap.GetPixmap(), NULL);
		else
			XtVaSetValues(w, XtNleftBitmap, (XtArgVal) bmap.GetPixmap(), NULL);

	return(err);
}

// -----------------------------------------------------------------xvisual/xv/xvScrollbar.cc100600    765    144        5154  6164235135  14553 0ustar  steveusers
/*     *******************************************************************************
	XVisual GUI Development System for Linux/X-Window
	Copyright (C) 1996 Steve Carrie.

        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.
        ******************************************************************************* */

#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/Xaw3d/Scrollbar.h>
#include <X11/xv/xvCore.h>
#include <X11/xv/xvScrollbar.h>


// ------------------------------------------

xvScrollbar::xvScrollbar()
{
	alloc=FALSE;
}

// ------------------------------------------

xvScrollbar::xvScrollbar(String name, xvCore & parent, XtOrientation orient, Dimension sizeL, 
		XtCallbackProc scrollProc, XtCallbackProc thumbProc, XtCallbackProc jumpProc)
{
	init(name, parent, orient, sizeL, scrollProc, thumbProc, jumpProc);
}

// ------------------------------------------

xvScrollbar::~xvScrollbar()
{
	if (alloc) XtDestroyWidget(w);
}

// ------------------------------------------

void xvScrollbar::init(String name, xvCore & parent, XtOrientation orient, Dimension sizeL,
		XtCallbackProc scrollProc, XtCallbackProc thumbProc, XtCallbackProc jumpProc)
{
	w=XtVaCreateManagedWidget(name, scrollbarWidgetClass, parent.ID(), 
		"orientation", orient,
		"length", sizeL,
		NULL);

	XtAddCallback(w, XtNscrollProc, scrollProc, 0);
	XtAddCallback(w, XtNthumbProc, thumbProc, 0);
	XtAddCallback(w, XtNjumpProc, jumpProc, 0);
	alloc=TRUE;
}

// -------------------------------------------

void xvScrollbar::SetThumb(float t_pos, float t_size)
{
	if (sizeof(float) > sizeof(XtArgVal)) {
		XtVaSetValues(w, XtNtopOfThumb, (XtArgVal) t_pos, NULL);
		XtVaSetValues(w, XtNshown, (XtArgVal) t_size, NULL);
	}
	else {
		XtArgVal * l_pos = (XtArgVal *) &t_pos;
		XtArgVal * l_size = (XtArgVal *) &t_size;
		XtVaSetValues(w, XtNtopOfThumb, *l_pos, NULL);
		XtVaSetValues(w, XtNshown, *l_size, NULL);
	}		
}

// ------------------------------------------xvisual/xv/xvSizer.cc100644    765    144       20651  6164235146  13755 0ustar  steveusers
/*     *******************************************************************************
	XVisual GUI Development System for Linux/X-Window
	Copyright (C) 1996 Steve Carrie.

        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.
        ******************************************************************************* */

#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>

#include <X11/xv/xvCore.h>
#include <X11/xv/xvRegion.h>
#include <X11/xv/xvGC.h>
#include <X11/xv/xvGraphic.h>
#include <X11/xv/xvBasicBitmap.h>
#include <X11/xv/xvWindow.h>
#include <X11/xv/xvGrip.h>
#include <X11/xv/xvSizer.h>


// ---------------------------------------------

xvSizer::xvSizer()
{
}

// ---------------------------------------------

xvSizer::xvSizer(xvWindow & wparent, int x, int y, int wid, int hgt, int mode, int gripsize,
			XtCallbackProc size_callback, XtCallbackProc move_callback,
			XtEventHandler motion_callback, XtEventHandler stop_callback)
{
	init(wparent, x, y, wid, hgt, mode, gripsize, 
		size_callback, move_callback, motion_callback, stop_callback);
}

// ---------------------------------------------

xvSizer::~xvSizer()
{
}

// ---------------------------------------------

void xvSizer::init(xvWindow & wparent, int x, int y, int wid, int hgt, int mode, int gripsize,
			XtCallbackProc size_callback, XtCallbackProc move_callback,
			XtEventHandler motion_callback, XtEventHandler stop_callback)
{
	Visible=FALSE;
	Sizing=FALSE;
	Moving=FALSE;
	wide=wid; high=hgt;
	sizermode=mode;
	gsize=gripsize;
	minwidth=3*gsize+2;
	minheight=2*gsize+1;

	if (wide<minwidth) wide=minwidth;
	if (high<minheight) high=minheight;
	px=x; py=y;
	size_call=size_callback;
	move_call=move_callback;
	motion_call=motion_callback;
	stop_call=stop_callback;

	wparent.AddEvent(Button1MotionMask, motion_callback, (XtPointer) "move");
	wparent.AddEvent(ButtonReleaseMask, stop_callback, (XtPointer) "up");
}

// ---------------------------------------------

void xvSizer::setColours(xvWindow & wparent)
{
	wparent.GCSetForeground(wparent.stringToPixel("navy"));
	wparent.GCSetBackground(wparent.stringToPixel("grey20"));
}

// ---------------------------------------------

void xvSizer::SizerUnhook(xvWindow & wparent)
{
	wparent.RemoveEvent(Button1MotionMask, motion_call, (XtPointer) "move");
	wparent.RemoveEvent(ButtonReleaseMask, stop_call, (XtPointer) "up");
}

// ---------------------------------------------

void xvSizer::SizerShow(xvWindow & wparent)
{
	int iw=(wide-3*gsize)/2;
	int ih=(high-2*gsize);

	tl.init("topleft", wparent, size_call);
		tl.SetVertDistance(py);
		tl.SetHorizDistance(px);	
		tl.SetShadowWidth(0);
		tl.SetSize(gsize, gsize);	
	tm.init("topmid", wparent, move_call);
		tm.SetHorizDistance(px+gsize+iw);
		tm.SetVertDistance(py);
		tm.SetShadowWidth(0);
		tm.SetSize(gsize, gsize);
	tr.init("topright", wparent, size_call);
		tr.SetHorizDistance(px+2*gsize+2*iw);
		tr.SetVertDistance(py);
		tr.SetShadowWidth(0);
		tr.SetSize(gsize, gsize);
	bl.init("bottomleft", wparent, size_call);
		bl.SetVertDistance(py+gsize+ih);
		bl.SetHorizDistance(px);
		bl.SetShadowWidth(0);
		bl.SetSize(gsize, gsize);
	bm.init("bottommid", wparent, move_call);
		bm.SetHorizDistance(px+gsize+iw);
		bm.SetVertDistance(py+gsize+ih);
		bm.SetShadowWidth(0);
		bm.SetSize(gsize, gsize);
	br.init("bottomright", wparent, size_call);
		br.SetHorizDistance(px+2*gsize+2*iw);
		br.SetVertDistance(py+gsize+ih); 
		br.SetShadowWidth(0);
		br.SetSize(gsize, gsize);

	setColours(wparent);

	wparent.GCSetFunction(GXxor);	
	wparent.GDrawRectangle(px,py, wide, high);		
	Visible=TRUE;
	maxx=wparent.GetWidth();
	maxy=wparent.GetHeight();
}

// -------------------------------------

void xvSizer::SizerHide(xvWindow & wparent)
{
	setColours(wparent);
	wparent.GCSetFunction(GXxor);	
	wparent.GDrawRectangle(px, py, wide, high);		

	wparent.GCSetFunction(GXcopy);	
	tl.Hide();
	tm.Hide();
	tr.Hide();
	bl.Hide();
	bm.Hide();
	br.Hide();
	Visible=FALSE;
}

// ------------------------------------

Boolean xvSizer::SizerIsVisible()
{
	return (Visible);
}

// ------------------------------------

void xvSizer::SizerMove(xvWindow & wparent, XtPointer client)
{
	if (sizermode==XVSIZEONLY) return;

	setColours(wparent);

	char * which=(char *) client;
	Moving=FALSE;
	if (strcmp(which, "topmid")==0) {
		pivotpoint=1;
		Moving=TRUE;
	}
	if (strcmp(which, "bottommid"	)==0) {
		pivotpoint=2;
		Moving=TRUE;
	}
	if (Moving) {
		SizerHide(wparent);
		wparent.GCSetFunction(GXxor);
		lx=wide;	
		ly=high;	
		wparent.GDrawRectangle(px, py, lx, ly); 	
	}
}

// -------------------------------------

void xvSizer::SizerSize(xvWindow & wparent, XtPointer client)
{
	if (sizermode==XVMOVEONLY) return;

	setColours(wparent);

	char *which=(char *) client;
	
	Sizing=FALSE;
	if (strcmp(which, "bottomright")==0) {
		pivotpoint=4;
		Sizing=TRUE;
	}
	if (strcmp(which, "bottomleft")==0) {
		pivotpoint=3;
		Sizing=TRUE;
	}
	if (strcmp(which, "topright")==0) {
		pivotpoint=2;
		Sizing=TRUE;
	}
	if (strcmp(which, "topleft")==0) {
		pivotpoint=1;
		Sizing=TRUE;
	}
			
	if (Sizing) {
		SizerHide(wparent);
		wparent.GCSetFunction(GXxor);
		lx=wide;	
		ly=high;	
		wparent.GDrawRectangle(px, py, lx, ly); 	
	}
}

// -------------------------------------

void xvSizer::SizerMotion(xvWindow & wparent)
{
	int dx, dy; 
	int vx, vy;
	int rx, ry; 
	int ax, ay;
	int provx, provy;
	unsigned int b;

	setColours(wparent);

	if (Moving) {
		wparent.GCSetFunction(GXxor);
		wparent.GDrawRectangle(px, py, lx, ly);
		wparent.GCPointerXY(&ax, &ay, &rx, &ry, &b);	
		switch(pivotpoint) {
			case 1:
				provx=ax-lx/2;
				provy=ay;
				break;
			case 2:
				provx=ax-lx/2;
				provy=ay-ly;
				break;
			default:
				break;
		}	
		Boolean rangeflag=FALSE;
		if ((provx >=0) && (provx+lx <maxx)) 
			px=provx;
		else
			rangeflag=TRUE;
		if ((provy>=0) && (provy+ly <maxy-1)) 
			py=provy;
		else
			rangeflag=TRUE;
		if (rangeflag) 
			switch(pivotpoint) {
				case 1:
					wparent.MovePointer(px+lx/2, py);
					break;
				case 2:
					wparent.MovePointer(px+lx/2, py+ly);
					break;
			}
		wparent.GDrawRectangle(px, py, lx, ly);
	}

	if (Sizing) {
		wparent.GCSetFunction(GXxor);
		wparent.GDrawRectangle(px, py, lx, ly);

		wparent.GCPointerXY(&ax, &ay, &rx, &ry, &b);	
		Boolean rangeflag=FALSE;

		if (ax < 0) { ax=0; rangeflag=TRUE; }
		if (ax > maxx-1) { ax=maxx-1; rangeflag=TRUE; }
		if (ay < 0) { ay=0; rangeflag=TRUE; }
		if (ay > maxy-1) { ay=maxy-1; rangeflag=TRUE; }

		if (rangeflag) wparent.MovePointer(ax, ay);

		switch(pivotpoint) {
			case 4:
				dx=ax-px;
				dy=ay-py;
				if (dx<minwidth) dx=minwidth;
				if (dy<minheight) dy=minheight;
				break;
			case 3:
				vx=px+lx;
				dx=lx-(ax-px);
				if (dx<minwidth) dx=minwidth;
				px=vx-dx;
				dy=ay-py;
				if (dy<minheight) dy=minheight;
				break;
			case 2:
				dx=ax-px;
				if (dx<minwidth) dx=minwidth;
				vy=py+ly;
				dy=ly-(ay-py);
				if (dy<minheight) dy=minheight;
				py=vy-dy;
				break;
			case 1:
				vy=py+ly;
				dy=ly-(ay-py);
				if (dy<minheight) dy=minheight;
				py=vy-dy;
				vx=px+lx;
				dx=lx-(ax-px);
				if (dx<minwidth) dx=minwidth;
				px=vx-dx;
				break;				
			default:
				break;
		}

		wparent.GDrawRectangle(px, py, dx, dy);
	
		lx=dx;
		ly=dy;	
	}
}

// ------------------------------------

void xvSizer::SizerStop(xvWindow & wparent) 
{
	if (Sizing || Moving) {
		setColours(wparent);
		wparent.GCSetFunction(GXxor);

		wparent.GDrawRectangle(px, py, lx, ly);
		wide=lx;
		high=ly;
		SizerShow(wparent);
		Sizing=FALSE;	
		Moving=FALSE;
	}
}

// --------------------------------------

void xvSizer::SizerInfo(int *x, int *y, int *wid, int *hgt)
{
	*x=px; *y=py;
	*wid=wide; *hgt=high;
}

// --------------------------------------

void xvSizer::SizerWarp(xvWindow & wparent, int wpx, int wpy, int wid, int hgt)
{
	if (Visible) SizerHide(wparent);
	px=wpx;
	py=wpy;
	wide=wid;
	high=hgt;
	if (Visible) SizerShow(wparent);
}	xvisual/xv/xvTimer.cc100644    765    144        4501  6164235162  13713 0ustar  steveusers
/*     *******************************************************************************
	XVisual GUI Development System for Linux/X-Window
	Copyright (C) 1996 Steve Carrie.

        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.
        ******************************************************************************* */

#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/xv/xvCore.h>
#include <X11/xv/xvFont.h>
#include <X11/xv/xvBasicBitmap.h>
#include <X11/xv/xvLabel.h>
#include <X11/xv/xvTimer.h>
#include <X11/xv/timer.xbm>

// ---------------------------------------------

xvTimer::xvTimer()
{
}

// ---------------------------------------------

xvTimer::xvTimer(String name, xvCore & parent, unsigned long timed, 
				XtTimerCallbackProc tcall, Boolean visible)
{
	init(name, parent, timed, tcall);
}

// ---------------------------------------------

xvTimer::~xvTimer()
{
}

// ---------------------------------------------

void xvTimer::init(String name, xvCore & parent, unsigned long timed, XtTimerCallbackProc tcall, Boolean visible)
{
	cdata=(XtPointer) name;
	app_cxt=XtWidgetToApplicationContext(parent.ID());
	proc=tcall;
	interval=timed;

	if (visible) {
		xvLabel::init(name, parent.ID());
		xvLabel::SetBitmapInfo(timer_bits, timer_width, timer_height, XtNbitmap);
	}
	if (timed != 0L) Reset();
}

// ---------------------------------------

void xvTimer::Reset()
{
	intid=XtAppAddTimeOut(app_cxt, interval, proc, cdata);
}

// ----------------------------------------

void xvTimer::Reset(unsigned long timed)
{
	interval=timed;
	intid=XtAppAddTimeOut(app_cxt, interval, proc, cdata);
}

// ----------------------------------------
	xvisual/xv/xvToggle.cc100600    765    144        7162  6164235177  14060 0ustar  steveusers
/*     *******************************************************************************
	XVisual GUI Development System for Linux/X-Window
	Copyright (C) 1996 Steve Carrie.

        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.
        ******************************************************************************* */

#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/Xaw3d/Toggle.h>
#include <X11/xv/xvCore.h>
#include <X11/xv/xvFont.h>
#include <X11/xv/xvBasicBitmap.h>
#include <X11/xv/xvToggle.h>

// ------------------------------------------

xvToggle::xvToggle()
{	
	alloc=FALSE;
}

// ------------------------------------------

xvToggle::xvToggle(String name, xvCore & parent, XtCallbackProc callback,
				String radiodata)
{
	init(name, parent, callback, radiodata);
}

// ------------------------------------------

xvToggle::~xvToggle()
{
	if (alloc) XtDestroyWidget(w);
}

// ------------------------------------------

void xvToggle::init(String name, xvCore & parent, XtCallbackProc callback, 
			String radiodata)
{
	String rdata=name;
	if (radiodata!=NULL)
		rdata=radiodata;

	w=XtVaCreateManagedWidget(name, toggleWidgetClass, parent.ID(),
		"radioData", (XtPointer) rdata,
		NULL);

	XtAddCallback(w, XtNcallback, callback, 0);
	alloc=TRUE;

	bfont.init(w, NULL);

}

// ------------------------------------------

void xvToggle::ChangeFont(String fontname)
{
	if (fontname != NULL) {
		bfont.FLoadFont(fontname);
		XtVaSetValues(w, XtNfont, (XtArgVal) bfont.FontRef(), NULL);
	}
}

// -----------------------------------------------------------------

int xvToggle::ChangeBitmap(String name, int pixtype, int position)
{
	int err;

	if ((err=bmap.ReadFile(name, pixtype)) == 0)
		if (position==XVCENTREBITMAP)
			XtVaSetValues(w, XtNbitmap, (XtArgVal) bmap.GetPixmap(), NULL);
		else
			XtVaSetValues(w, XtNleftBitmap, (XtArgVal) bmap.GetPixmap(), NULL);
	return(err);
}

// -----------------------------------------------------------------


Boolean xvToggle::GetState()
{
	Boolean statex;

	XtVaGetValues(w, XtNstate, &statex, NULL);

	return(statex);
}

// -------------------------------------------

void xvToggle::ChangeGroup(xvCore & group)
{
	XawToggleChangeRadioGroup(w, group.ID());
}

// -------------------------------------------

void xvToggle::ChangeCurrent(String rdata)
{
	XawToggleSetCurrent(w, rdata);
}

// -------------------------------------------

void xvToggle::UnSetGroup()
{
	XawToggleUnsetCurrent(w);
}

// -------------------------------------------

XtPointer xvToggle::GetCurrent()
{
	return(XawToggleGetCurrent(w));
}

// -------------------------------------------

void xvToggle::On()
{
	XtVaSetValues(w, XtNstate, TRUE, NULL);
}

// -------------------------------------------

void xvToggle::Off()
{
	XtVaSetValues(w, XtNstate, FALSE, NULL);
}

// -------------------------------------------

void xvToggle::State(Boolean statex)
{
	XtVaSetValues(w, XtNstate, statex, NULL);
}

// -------------------------------------------
	xvisual/xv/xvTree.cc100644    765    144        4212  6164235217  13532 0ustar  steveusers
/*     *******************************************************************************
	XVisual GUI Development System for Linux/X-Window
	Copyright (C) 1996 Steve Carrie.

        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.
        ******************************************************************************* */

#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/Xaw3d/Tree.h>
#include <X11/xv/xvCore.h>
#include <X11/xv/xvTree.h>

// ---------------------------------

xvTree::xvTree()
{
	alloc=FALSE;
}

// ---------------------------------

xvTree::xvTree(String name, xvCore & parent)
{
	init(name, parent);
}

// ---------------------------------

xvTree::~xvTree()
{
	if (alloc) XtDestroyWidget(w);
}

// ---------------------------------

void xvTree::init(String name, xvCore & parent)
{
	w=XtVaCreateManagedWidget(name, treeWidgetClass, parent.ID(), NULL);
	alloc=TRUE;
}

// ---------------------------------

void xvTree::AutoConfig(Boolean conf)
{
	XtVaSetValues(w, XtNautoReconfigure, (XtArgVal) conf, NULL);
}

// ----------------------------------

void xvTree::ForceLayout()
{
	XawTreeForceLayout(w);
}

// -----------------------------------

void xvTree::SetGravity(XtGravity gr)
{
	XtVaSetValues(w, XtNgravity, (XtArgVal) gr, NULL);
}

// -----------------------------------

void xvTree::SetSpace(Dimension hs, Dimension vs)
{
	XtVaSetValues(w, XtNhSpace, (XtArgVal) hs, XtNvSpace, (XtArgVal) vs, NULL);
}

// -----------------------------------
xvisual/xv/xvView.cc100600    765    144        4664  6164235232  13545 0ustar  steveusers
/*     *******************************************************************************
	XVisual GUI Development System for Linux/X-Window
	Copyright (C) 1996 Steve Carrie.

        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.
        ******************************************************************************* */

#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/Xaw3d/Viewport.h>
#include <X11/xv/xvCore.h>
#include <X11/xv/xvView.h>

// -------------------------------------------

xvView::xvView()
{
	alloc=FALSE;
}

// -------------------------------------------

xvView::xvView(String name, xvCore & parent, Boolean manage,
			Boolean HScrollbar,  Boolean VScrollbar)
{
	init(name, parent, manage, HScrollbar, VScrollbar);
}

// -------------------------------------------

xvView::~xvView()
{
	if (alloc) XtDestroyWidget(w);
}

// -------------------------------------------

void xvView::init(String name, xvCore & parent, Boolean manage, 
	Boolean HScrollbar, Boolean VScrollbar)
{

	w=XtVaCreateWidget(name, viewportWidgetClass, parent.ID(),
		"allowVert", VScrollbar, "useRight", TRUE,
		"allowHoriz", HScrollbar, "useBottom", TRUE,
		NULL);
	
	if (manage) ManageChildren();
	alloc=TRUE;
}

// ------------------------------------------

void xvView::init(String name, Widget parent, Boolean manage, 
	Boolean HScrollbar, Boolean VScrollbar)
{

	w=XtVaCreateWidget(name, viewportWidgetClass, parent,
		"allowVert", VScrollbar, "useRight", TRUE,
		"allowHoriz", HScrollbar, "useBottom", TRUE,
		NULL);
	
	if (manage) ManageChildren();
	alloc=TRUE;
}

// ------------------------------------------

void xvView::ManageChildren(Boolean manage)
{

	if (manage)
		XtManageChild(w);
	else
		XtUnmanageChild(w);
}

// ------------------------------------------
xvisual/xv/xvVisualForm.cc100644    765    144        4023  6164235246  14724 0ustar  steveusers
/*     *******************************************************************************
	XVisual GUI Development System for Linux/X-Window
	Copyright (C) 1996 Steve Carrie.

        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.
        ******************************************************************************* */

#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/Xaw3d/Label.h>
#include <X11/Xaw3d/Form.h>
#include <X11/xv/xvCore.h>
#include <X11/xv/xvBasicBitmap.h>
#include <X11/xv/xvFont.h>
#include <X11/xv/xvForm.h>
#include <X11/xv/xvLabel.h>
#include <X11/xv/xvVisualForm.h>

// ----------------------------------------------------------

xvVisualForm::xvVisualForm()
{
}

// ----------------------------------------------------------

xvVisualForm::xvVisualForm(String name, xvCore & parent)
{
	init(name, parent);
}

// ----------------------------------------------------------

xvVisualForm::~xvVisualForm()
{

}

// ----------------------------------------------------------

void xvVisualForm::init(String name, xvCore & parent)
{
	xvForm::init(name, parent.ID(), FALSE, TRUE);
	w=xvForm::ID();
	formlabel.init(name, xvForm::ID());
	formlabel.SetLabel(name);
	formlabel.SetFixedPosition(TRUE);
	formlabel.SetBorderWidth(0);
	xvForm::ManageChildren(TRUE);
	formlabel.Unmap();	
}

// ---------------------------------------------------
xvisual/xv/xvVisualList.cc100644    765    144        7754  6164235261  14747 0ustar  steveusers
/*     *******************************************************************************
	XVisual GUI Development System for Linux/X-Window
	Copyright (C) 1996 Steve Carrie.

        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.
        ******************************************************************************* */

#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/Xaw3d/Viewport.h>
#include <X11/Xaw3d/List.h>
#include <X11/xv/xvCore.h>
#include <X11/xv/xvFont.h>
#include <X11/xv/xvView.h>
#include <X11/xv/xvList.h>
#include <X11/xv/xvVisualList.h>

// -------------------------------------------

xvVisualList::xvVisualList()
{
}

// -------------------------------------------

xvVisualList::xvVisualList(String name, xvCore & parent, XtCallbackProc callback,
			int numdata, char *listdata[], int columns, Boolean design)
{
	init(name, parent, callback, numdata, listdata, columns, design);
}

// -------------------------------------------

xvVisualList::~xvVisualList()
{
}

// -------------------------------------------

void xvVisualList::init(String name, xvCore & parent, XtCallbackProc callback,
			int numdata, char *listdata[], int columns, Boolean design)
{

	xvView::init(name, parent.ID(), FALSE, FALSE, TRUE);	

	xvList::init("xvVisualList", xvView::ID(), callback, numdata, listdata, columns);

	if (design) {
		XtTranslations trans=XtParseTranslationTable(" ");
		xvList::SetResource(XtNtranslations, (XtArgVal) trans);
	}
	else
		xvView::ManageChildren(TRUE);
}

// ------------------------------------------

void xvVisualList::GetResource(String resname, XtArgVal *val)
{
	XtVaGetValues(xvList::ID(), resname, val, NULL);
}

// ------------------------------------------	

void xvVisualList::SetResource(String resname, XtArgVal val)
{
	XtVaSetValues(xvList::ID(), resname, val, NULL);
}

// ------------------------------------------	

void xvVisualList::SetFixedPosition(Boolean val)
{
	xvView::SetFixedPosition(val);
}

// ------------------------------------------

void xvVisualList::SetBackground(String name)
{
	xvList::SetBackground(name);
}

// --------------------------------------------

void xvVisualList::SetBackground(Pixel bg)
{
	xvList::SetBackground(bg);
}

// --------------------------------------------

void xvVisualList::SetForeground(String name)
{
	xvList::SetForeground(name);
}

// --------------------------------------------

void xvVisualList::SetForeground(Pixel fg)
{
	xvList::SetForeground(fg);
}

// --------------------------------------------

void xvVisualList::Map()
{
	xvView::Map();
}

// --------------------------------------------

void xvVisualList::Unmap()
{
	xvView::Unmap();
}

// --------------------------------------------

void xvVisualList::SetSensitive(Boolean sense)
{
	xvList::SetSensitive(sense);
}

// --------------------------------------------

void xvVisualList::SetMappedWhenManaged(Boolean man)
{
	xvView::SetMappedWhenManaged(man);
}

// --------------------------------------------

void xvVisualList::AddEvent(EventMask eventmask, XtEventHandler handler, XtPointer cdata)
{
	xvList::AddEvent(eventmask, handler, cdata);
}

// --------------------------------------------

void xvVisualList::RemoveEvent(EventMask eventmask, XtEventHandler handler, XtPointer cdata)
{
	xvList::RemoveEvent(eventmask, handler, cdata);
}

// --------------------------------------------
xvisual/xv/xvWindow.cc100600    765    144       10045  6164235275  14117 0ustar  steveusers
/*     *******************************************************************************
	XVisual GUI Development System for Linux/X-Window
	Copyright (C) 1996 Steve Carrie.

        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.
        ******************************************************************************* */

#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/Xaw3d/Form.h>
#include <X11/Shell.h>
#include <X11/xv/xvCore.h>
#include <X11/xv/xvRegion.h>
#include <X11/xv/xvGC.h>
#include <X11/xv/xvGraphic.h>
#include <X11/xv/xvBasicBitmap.h>
#include <X11/xv/xvWindow.h>
#include <stdio.h>
#include <string.h>

// ---------------------------------------------

xvWindow::xvWindow()
{
	BOpen=FALSE;
	alloc=FALSE;
}

// ---------------------------------------------

xvWindow::xvWindow(String name, String classname, xvCore &TopLevel)
{
	BOpen=FALSE;
	init(name, classname, TopLevel);
}

// ---------------------------------------------

xvWindow::~xvWindow()
{
	if (alloc) {
		this.Close();
		XtDestroyWidget(w);	
	}
}

// ---------------------------------------------

Widget xvWindow::GetParent()
{
	return(BParent);
}

// ---------------------------------------------

void xvWindow::init(String name, String classname, xvCore & TopLevel)
{

	BParent=XtVaAppCreateShell(name, classname, applicationShellWidgetClass, 
		XtDisplay(TopLevel.ID()), NULL);
	w=XtVaCreateManagedWidget(name, formWidgetClass, BParent,
		"resizable", TRUE, NULL);

	alloc=TRUE;
	iconmap.init(NULL, w);
}

// ---------------------------------------------

void xvWindow::Open()
{
	if (! BOpen) {
		XtRealizeWidget(BParent);
		xvGraphic::init(w);
		BOpen=TRUE;
	}
}

// --------------------------------------------

void xvWindow::Close()
{
	if (BOpen) {
		XtUnrealizeWidget(BParent);
		BOpen=FALSE;
	}
}

// ---------------------------------------------

void xvWindow::MovePointer(int x, int y)
{
	XWarpPointer(xvdisplay, None, xvwindow, 0, 0, 0, 0, x, y);
}

// --------------------------------------------

void xvWindow::SetWindowResource(String resname, XtArgVal res)
{
	XtVaSetValues(BParent, resname, res, NULL);
}

// --------------------------------------------

void xvWindow::GetWindowResource(String resname, XtArgVal *res)
{
	XtVaGetValues(BParent, resname, res, NULL);
}

// ---------------------------------------------

int xvWindow::LoadNewIcon(String name, int pixtype)
{
	int bmr=iconmap.ReadFile(name, pixtype);
	if (bmr==0) SetWindowResource(XtNiconPixmap, iconmap.GetPixmap());
	return(bmr);
}

// ---------------------------------------------

void xvWindow::FixBorder(Dimension width, Dimension height)
{
	SetWindowResource(XtNminWidth, (XtArgVal) width);
	SetWindowResource(XtNminHeight, (XtArgVal) height);
	SetWindowResource(XtNmaxWidth, (XtArgVal) width);
	SetWindowResource(XtNmaxHeight, (XtArgVal) height);
}

// ---------------------------------------------

void xvWindow::ReleaseBorder()
{
	SetWindowResource(XtNminWidth, XtUnspecifiedShellInt);
	SetWindowResource(XtNminHeight, XtUnspecifiedShellInt);
	SetWindowResource(XtNmaxWidth, XtUnspecifiedShellInt);
	SetWindowResource(XtNmaxHeight, XtUnspecifiedShellInt);
}

// ----------------------------------------------

void xvWindow::SetWindowLocation(Position x, Position y)
{
	char tempbuffer[180];
	
	sprintf(tempbuffer, "+%d+%d", x, y);
	SetWindowResource(XtNgeometry, (XtArgVal) tempbuffer);
}

// ----------------------------------------------
xvisual/xv/Makefile.shared100600    765    144        1654  6141622131  14640 0ustar  steveusersCC=g++
AR=ar
LD=ld
RANLIB=ranlib
CFLAGS= -fPIC -O
INCLUDES= -I.
LIBS=-L.
XLIBS= -lXaw3d -lXpm -lXmu -lXt -lSM -lICE -lXext -lX11
VLIBS= -lxv
OBJFILES=	xvCore.o xvGC.o xvGraphic.o xvPulldownMenu.o xvMenuBar.o xvButton.o xvLabel.o \
			xvWindow.o xvEditField.o xvForm.o xvPopupShell.o xvBasicBitmap.o \
			xvList.o xvView.o xvPanner.o xvRepeater.o xvScrollbar.o xvDropDown.o \
			xvVisualForm.o xvToggle.o xvBox.o xvDialog.o xvPopupMenu.o xvPopupDialog.o \
			xvContext.o xvMsgBox.o xvFileDialog.o xvFont.o xvFontList.o xvVisualList.o \
			xvTree.o xvRegion.o xvBitmap.o xvGrip.o xvTimer.o xvSizer.o xvCursor.o \
			xvFileList.o xvEditWindow.o xvPopupTransientShell.o
.cc.o:
	$(CC) -c $(CFLAGS) $(INCLUDES) $*.cc

all:: libxv.so

libxv.so:	$(OBJFILES)
			rm -f libxv.so libxv.so.1 libxv.so.1.0
			$(CC) -shared -Wl,-soname,libxv.so.1 -o libxv.so.1.0 *.o

clean:
	rm -f *.o libxv.so.1.0

remake:: clean all

distclean:
	rm -f *.o libxv.so.1.0
xvisual/xv/Makefile.static100600    765    144        1616  6141622131  14657 0ustar  steveusersCC=g++
AR=ar
LD=ld
RANLIB=ranlib
CFLAGS= -O 
INCLUDES= -I.
LIBS=-L.
XLIBS= -lXaw3d -lXpm -lXmu -lXt -lSM -lICE -lXext -lX11
VLIBS= -lxv
OBJFILES=	xvCore.o xvGC.o xvGraphic.o xvPulldownMenu.o xvMenuBar.o xvButton.o xvLabel.o \
			xvWindow.o xvEditField.o xvForm.o xvPopupShell.o xvBasicBitmap.o \
			xvList.o xvView.o xvPanner.o xvRepeater.o xvScrollbar.o xvDropDown.o \
			xvVisualForm.o xvToggle.o xvBox.o xvDialog.o xvPopupMenu.o xvPopupDialog.o \
			xvContext.o xvMsgBox.o xvFileDialog.o xvFont.o xvFontList.o xvVisualList.o \
			xvTree.o xvRegion.o xvBitmap.o xvGrip.o xvTimer.o xvSizer.o xvCursor.o \
			xvFileList.o xvEditWindow.o xvPopupTransientShell.o
.cc.o:
	$(CC) -c $(CFLAGS) $(INCLUDES) $*.cc

all:: libxv.a 

libxv.a:	$(OBJFILES)
			rm -f libxv.a visual visual.o test test.o
			$(AR) cr $@	$(OBJFILES)
			$(RANLIB) $@

clean:
	rm -f *.o libxv.a

remake:: clean all

distclean:
	rm -f *.o libxv.a
xvisual/xvis/ 40755    765    144           0  6165756504  12216 5ustar  steveusersxvisual/xvis/Makefile100600    765    144        1307  6165707527  13745 0ustar  steveusersCC=g++
AR=ar
LD=ld
RANLIB=ranlib
CFLAGS= -ggdb
INCLUDES= -I.
XLIBS= -lxv -lXaw3d -lXpm -lXmu -lXt -lXext -lX11 

# Comment out the following line if NOT using binutils-2.6.0.2 or higher.

BIN26LINKOPTS=-u gettxt -L/usr/X11R6/lib

OBJFILES=	xvis.o xvisControl.o xvisTools.o xvisProps.o xvisResource.o xvisObject.o \
			xvisUtils.o xvisColour.o xvisCursor.o xvisFont.o xvisEvent.o xvisPath.o \
			xvisSelectFile.o xvisObjectList.o xvisFile.o xvisMenus.o xvisCalls.o \
			xvisProjectList.o xvisModule.o xvisCodeGen.o xvisHelp.o xvisGrid.o

.cc.o:
	$(CC) -c $(CFLAGS) $(INCLUDES) $*.cc

all:: xvis

xvis:	$(OBJFILES)
		$(CC) $(BIN26LINKOPTS) -o $@ $(OBJFILES)  $(XLIBS) 

clean:
	rm -f *.o xvis

remake:: clean all
xvisual/xvis/bitmaps/ 40700    765    144           0  6141622161  13624 5ustar  steveusersxvisual/xvis/bitmaps/cc.xbm100600    765    144        1204  6141622166  15022 0ustar  steveusers#define cc_width 28
#define cc_height 28
static char cc_bits[] = {
 0xf0,0xff,0x0f,0x00,0x10,0x00,0x18,0x00,0x10,0x00,0x28,0x00,0x10,0x00,0x08,
 0x00,0x90,0xff,0x49,0x00,0x10,0x00,0x88,0x00,0x90,0xff,0x09,0x01,0x10,0x54,
 0xa8,0x03,0x10,0x00,0x00,0x03,0x10,0xfc,0x01,0x03,0x10,0x00,0x00,0x03,0x10,
 0xc0,0x0f,0x03,0x10,0x00,0x00,0x03,0x10,0xc0,0x3f,0x03,0x10,0x54,0x01,0x03,
 0x10,0x00,0x00,0x03,0x10,0xc0,0x01,0x03,0x10,0x3c,0x3c,0x03,0x10,0x7f,0x7f,
 0x03,0x10,0x67,0x67,0x03,0x90,0x83,0x03,0x03,0x10,0x83,0x03,0x03,0x90,0x83,
 0x03,0x03,0x50,0x67,0x67,0x03,0xd0,0x7f,0x7f,0x03,0x50,0x3c,0x3c,0x03,0x10,
 0x00,0x00,0x03,0xf0,0xff,0xff,0x03};
xvisual/xvis/bitmaps/open.xbm100644    765    144        1410  6141622166  15405 0ustar  steveusers#define open_width 28
#define open_height 28
static char open_bits[] = {
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x80, 0x00, 0x01,
   0xf8, 0x7f, 0x00, 0x0e, 0x04, 0x00, 0x00, 0x08, 0x04, 0x00, 0x00, 0x08,
   0xfe, 0xff, 0xff, 0x09, 0x01, 0x00, 0x00, 0x0a, 0x01, 0x00, 0x00, 0x0a,
   0x01, 0x00, 0x00, 0x0a, 0x01, 0x00, 0x00, 0x0a, 0x01, 0x00, 0x00, 0x0a,
   0x02, 0x00, 0x00, 0x0c, 0x02, 0x00, 0x00, 0x0c, 0x02, 0x00, 0x00, 0x0c,
   0x02, 0x00, 0x00, 0x0c, 0x02, 0x00, 0x00, 0x0c, 0x04, 0x00, 0x00, 0x08,
   0x04, 0x00, 0x00, 0x08, 0x04, 0x00, 0x00, 0x08, 0x04, 0x00, 0x00, 0x08,
   0xfc, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00};
xvisual/xvis/bitmaps/disk.xbm100644    765    144        1212  6141622166  15376 0ustar  steveusers#define disk_width 28
#define disk_height 28
static char disk_bits[] = {
 0x00,0x00,0x00,0x00,0xf8,0xff,0xff,0x0f,0x7c,0x00,0x00,0x0f,0x7c,0x00,0x00,
 0x0f,0x6c,0x00,0x00,0x0f,0xec,0xff,0x3f,0x0f,0x7c,0x00,0x00,0x0f,0x7c,0x55,
 0x15,0x0f,0x7c,0x00,0x00,0x0f,0x7c,0x00,0x00,0x0f,0xfc,0xff,0x3f,0x0f,0x7c,
 0x00,0x00,0x0f,0x7c,0x00,0x00,0x0f,0x7c,0x00,0x00,0x0f,0x7c,0x00,0x00,0x0f,
 0x7c,0x00,0x00,0x0f,0xfc,0xff,0xff,0x0f,0xfc,0xff,0xff,0x0f,0xfc,0xff,0xff,
 0x0f,0xfc,0xff,0xff,0x0f,0xfc,0x00,0xc0,0x0f,0x7c,0x9f,0x84,0x0f,0xfc,0x4f,
 0x80,0x0f,0x7c,0x0f,0x91,0x0f,0xfc,0x0f,0xa0,0x0f,0x7c,0x4f,0x94,0x0f,0xf0,
 0x00,0x80,0x0f,0xe0,0xff,0xff,0x0f};
xvisual/xvis/bitmaps/open.xpm100644    765    144        2011  6141622166  15421 0ustar  steveusers/* XPM */
static char * open_xpm[] = {
"28 28 4 1",
" 	c #DB6CDB6CDB6C",
".	c #000000000000",
"X	c #51445144FBEE",
"o	c #FFFFFFFF0000",
"                            ",
"                            ",
"                            ",
"                            ",
"                ........    ",
"               .XXXXXXXX.   ",
"   ............XXXXXXXXXX...",
"  .XXXXXXXXXXXXXXXXXXXXXXXX.",
"  .XXXXXXXXXXXXXXXXXXXXXXXX.",
" ........................XX.",
".oooooooooooooooooooooooo.X.",
".oooooooooooooooooooooooo.X.",
".oooooooooooooooooooooooo.X.",
".oooooooooooooooooooooooo.X.",
".oooooooooooooooooooooooo.X.",
" .oooooooooooooooooooooooo..",
" .oooooooooooooooooooooooo..",
" .oooooooooooooooooooooooo..",
" .oooooooooooooooooooooooo..",
" .oooooooooooooooooooooooo..",
"  .oooooooooooooooooooooooo.",
"  .oooooooooooooooooooooooo.",
"  .oooooooooooooooooooooooo.",
"  .oooooooooooooooooooooooo.",
"  ..........................",
"                            ",
"                            ",
"                            "};
xvisual/xvis/bitmaps/blank.xbm100600    765    144        1413  6141622166  15526 0ustar  steveusers#define blank_width 28
#define blank_height 28
static char blank_bits[] = {
   0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x07, 0x02, 0x00, 0x00, 0x04,
   0x02, 0x00, 0x00, 0x04, 0xf2, 0x07, 0x00, 0x04, 0xf2, 0x0f, 0x00, 0x04,
   0xf2, 0x00, 0x00, 0x04, 0xf2, 0x01, 0x00, 0x04, 0xb2, 0x03, 0x00, 0x04,
   0x32, 0x07, 0x00, 0x04, 0x32, 0x0e, 0x00, 0x04, 0x22, 0x1c, 0x00, 0x04,
   0x02, 0x38, 0x00, 0x04, 0x02, 0x70, 0x00, 0x04, 0x02, 0xe0, 0x00, 0x04,
   0x02, 0xc0, 0x01, 0x04, 0x02, 0x80, 0x03, 0x04, 0x02, 0x00, 0x07, 0x04,
   0x02, 0x00, 0x0e, 0x04, 0x02, 0x00, 0x1c, 0x04, 0x02, 0x00, 0x38, 0x04,
   0x02, 0x00, 0x70, 0x04, 0x02, 0x00, 0xe0, 0x04, 0x02, 0x00, 0xc0, 0x04,
   0x02, 0x00, 0x00, 0x04, 0x02, 0x00, 0x00, 0x04, 0xfe, 0xff, 0xff, 0x07,
   0x00, 0x00, 0x00, 0x00};
xvisual/xvis/bitmaps/file.xbm100600    765    144        1212  6141622166  15353 0ustar  steveusers#define file_width 28
#define file_height 28
static char file_bits[] = {
 0xf0,0xff,0x0f,0x00,0x10,0x00,0x18,0x00,0x10,0x00,0x28,0x00,0x10,0x00,0x08,
 0x00,0x10,0x00,0x48,0x00,0x10,0x00,0x88,0x00,0x10,0x00,0x08,0x01,0x10,0x00,
 0xa8,0x03,0x10,0x00,0x00,0x03,0x10,0x00,0x00,0x03,0x10,0x00,0x00,0x03,0x10,
 0x00,0x00,0x03,0x10,0x00,0x00,0x03,0x10,0x00,0x00,0x03,0x10,0x00,0x00,0x03,
 0x10,0x00,0x00,0x03,0x10,0x00,0x00,0x03,0x10,0x00,0x00,0x03,0x10,0x00,0x00,
 0x03,0x10,0x00,0x00,0x03,0x10,0x00,0x00,0x03,0x10,0x00,0x00,0x03,0x10,0x00,
 0x00,0x03,0x10,0x00,0x00,0x03,0x10,0x00,0x00,0x03,0x10,0x00,0x00,0x03,0x10,
 0x00,0x00,0x03,0xf0,0xff,0xff,0x03};
xvisual/xvis/bitmaps/timer.xbm100644    765    144        1413  6141622166  15567 0ustar  steveusers#define timer_width 28
#define timer_height 28
static char timer_bits[] = {
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00,
   0x00, 0xaf, 0x07, 0x00, 0x80, 0x21, 0x0c, 0x00, 0x60, 0x21, 0x34, 0x00,
   0x10, 0x22, 0x42, 0x00, 0x10, 0x20, 0x40, 0x00, 0x08, 0x20, 0x80, 0x00,
   0x1c, 0x20, 0xc0, 0x01, 0x24, 0x20, 0x20, 0x01, 0x04, 0x20, 0x00, 0x01,
   0x06, 0x20, 0x00, 0x03, 0x02, 0x20, 0x00, 0x02, 0x1e, 0x60, 0xc0, 0x03,
   0x02, 0xc0, 0x00, 0x02, 0x06, 0x80, 0x01, 0x03, 0x04, 0x00, 0x03, 0x01,
   0x04, 0x00, 0x22, 0x01, 0x2c, 0x00, 0xc0, 0x01, 0x18, 0x00, 0xc0, 0x00,
   0x10, 0x00, 0x40, 0x00, 0x10, 0x00, 0x48, 0x00, 0x60, 0x22, 0x30, 0x00,
   0x80, 0x21, 0x0c, 0x00, 0x00, 0xaf, 0x07, 0x00, 0x00, 0xf8, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00};
xvisual/xvis/bitmaps/filelist.xbm100644    765    144        1424  6141622166  16264 0ustar  steveusers#define filelist_width 28
#define filelist_height 28
static char filelist_bits[] = {
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0xe0, 0xff, 0x7f, 0x00, 0x20, 0x00, 0x40, 0x00, 0x20, 0x00, 0xc0, 0x00,
   0x20, 0x57, 0xdc, 0x00, 0x20, 0x51, 0xc4, 0x00, 0x20, 0x53, 0xcc, 0x00,
   0x20, 0x51, 0xc4, 0x00, 0x20, 0xd1, 0xdd, 0x00, 0x20, 0x00, 0xc0, 0x00,
   0x20, 0x00, 0xc0, 0x00, 0x20, 0xfe, 0xc7, 0x00, 0x20, 0x00, 0xc0, 0x00,
   0x20, 0xfe, 0xc7, 0x00, 0x20, 0x00, 0xc0, 0x00, 0x20, 0xfe, 0xc7, 0x00,
   0x20, 0x00, 0xc0, 0x00, 0x20, 0xfe, 0xc7, 0x00, 0x20, 0x00, 0xc0, 0x00,
   0x20, 0xfe, 0xc7, 0x00, 0x20, 0x00, 0xc0, 0x00, 0x20, 0x00, 0xc0, 0x00,
   0x20, 0x00, 0xc0, 0x00, 0xe0, 0xff, 0xff, 0x00, 0x80, 0xff, 0xff, 0x00,
   0x80, 0xff, 0xff, 0x00};
xvisual/xvis/bitmaps/dropdown.xbm100644    765    144        1424  6141622166  16305 0ustar  steveusers#define dropdown_width 28
#define dropdown_height 28
static char dropdown_bits[] = {
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xe7, 0x0f,
   0x02, 0x00, 0x24, 0x08, 0xfa, 0xff, 0xa4, 0x0b, 0x02, 0x00, 0x24, 0x09,
   0x02, 0x00, 0x24, 0x08, 0xfe, 0xff, 0xe7, 0x0f, 0x00, 0x00, 0x00, 0x00,
   0xfe, 0xff, 0x07, 0x00, 0x02, 0x00, 0x04, 0x00, 0x02, 0x00, 0x0c, 0x00,
   0xfa, 0xff, 0x0d, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x02, 0x00, 0x0c, 0x00,
   0xfa, 0xff, 0x0d, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x02, 0x00, 0x0c, 0x00,
   0xfa, 0xff, 0x0d, 0x00, 0x02, 0x00, 0x0c, 0x00, 0xfe, 0xff, 0x0f, 0x00,
   0xfc, 0xff, 0x0f, 0x00};
xvisual/xvis/bitmaps/view.xbm100644    765    144        1410  6141622166  15416 0ustar  steveusers#define view_width 28
#define view_height 28
static char view_bits[] = {
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0xfe, 0xff, 0xff, 0x07, 0x02, 0x00, 0x00, 0x04, 0xf2, 0xff, 0xdf, 0x05,
   0x12, 0x00, 0x50, 0x0d, 0x12, 0x00, 0x50, 0x0d, 0x12, 0x10, 0x50, 0x0d,
   0x12, 0x38, 0x50, 0x0d, 0x12, 0x7c, 0x50, 0x0d, 0x12, 0x10, 0x50, 0x0d,
   0x12, 0x10, 0x50, 0x0d, 0x12, 0x10, 0xd0, 0x0d, 0x12, 0x10, 0xd0, 0x0d,
   0x12, 0x10, 0x50, 0x0d, 0x12, 0x10, 0x50, 0x0d, 0x12, 0x10, 0x50, 0x0d,
   0x12, 0x7c, 0x50, 0x0d, 0x12, 0x38, 0x50, 0x0d, 0x12, 0x10, 0x50, 0x0d,
   0x12, 0x00, 0x50, 0x0d, 0x12, 0x00, 0x50, 0x0d, 0xf2, 0xff, 0xdf, 0x0d,
   0x02, 0x00, 0x00, 0x0c, 0xfe, 0xff, 0xff, 0x0f, 0xf8, 0xff, 0xff, 0x0f,
   0xf8, 0xff, 0xff, 0x0f};
xvisual/xvis/bitmaps/toggle.xbm100644    765    144        1416  6141622166  15733 0ustar  steveusers#define toggle_width 28
#define toggle_height 28
static char toggle_bits[] = {
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xcf, 0xff, 0x01,
   0xfe, 0x4f, 0x00, 0x03, 0xfe, 0x5f, 0x1c, 0x03, 0x06, 0x50, 0x10, 0x03,
   0x86, 0x50, 0x08, 0x03, 0x86, 0x50, 0x1c, 0x03, 0x86, 0x50, 0x00, 0x03,
   0x86, 0xd0, 0xff, 0x03, 0x06, 0x90, 0xff, 0x03, 0xfc, 0x9f, 0xff, 0x03,
   0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x10, 0x00, 0x80, 0x00, 0x10, 0x00,
   0x80, 0x00, 0x10, 0x00, 0x80, 0x00, 0x10, 0x00, 0x80, 0x00, 0x10, 0x00,
   0x80, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00};
xvisual/xvis/bitmaps/vscroll.xbm100644    765    144        1421  6141622166  16132 0ustar  steveusers#define vscroll_width 28
#define vscroll_height 28
static char vscroll_bits[] = {
   0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x24, 0x01, 0x00,
   0x00, 0x74, 0x03, 0x00, 0x00, 0x04, 0x03, 0x00, 0x00, 0x04, 0x03, 0x00,
   0x00, 0x04, 0x03, 0x00, 0x00, 0x04, 0x03, 0x00, 0x00, 0x04, 0x03, 0x00,
   0x00, 0x04, 0x03, 0x00, 0x00, 0x74, 0x03, 0x00, 0x00, 0x74, 0x03, 0x00,
   0x00, 0x74, 0x03, 0x00, 0x00, 0x74, 0x03, 0x00, 0x00, 0x74, 0x03, 0x00,
   0x00, 0x74, 0x03, 0x00, 0x00, 0x04, 0x03, 0x00, 0x00, 0x04, 0x03, 0x00,
   0x00, 0x04, 0x03, 0x00, 0x00, 0x04, 0x03, 0x00, 0x00, 0x04, 0x03, 0x00,
   0x00, 0x04, 0x03, 0x00, 0x00, 0x04, 0x03, 0x00, 0x00, 0x74, 0x03, 0x00,
   0x00, 0x24, 0x03, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00, 0xf8, 0x03, 0x00,
   0x00, 0xf8, 0x03, 0x00};
xvisual/xvis/bitmaps/hscroll.xbm100644    765    144        1421  6141622166  16114 0ustar  steveusers#define hscroll_width 28
#define hscroll_height 28
static char hscroll_bits[] = {
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x03,
   0x02, 0x00, 0x00, 0x06, 0x0a, 0xfc, 0x80, 0x06, 0x0e, 0xfc, 0x80, 0x07,
   0x0a, 0xfc, 0x80, 0x06, 0x02, 0x00, 0x00, 0x06, 0xfe, 0xff, 0xff, 0x07,
   0xf8, 0xff, 0xff, 0x07, 0xf8, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00};
xvisual/xvis/bitmaps/panner.xbm100644    765    144        1416  6141622166  15735 0ustar  steveusers#define panner_width 28
#define panner_height 28
static char panner_bits[] = {
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x03,
   0x04, 0x00, 0x00, 0x02, 0x04, 0x00, 0x00, 0x06, 0x04, 0x20, 0x00, 0x06,
   0x04, 0x70, 0x00, 0x06, 0x04, 0x20, 0x00, 0x06, 0x04, 0x20, 0x00, 0x06,
   0x04, 0x20, 0x00, 0x06, 0x04, 0x00, 0x00, 0x06, 0x04, 0x71, 0x04, 0x06,
   0x84, 0x77, 0x0f, 0x06, 0x04, 0x71, 0x04, 0x06, 0x04, 0x00, 0x00, 0x06,
   0x04, 0x20, 0x00, 0x06, 0x04, 0x20, 0x00, 0x06, 0x04, 0x70, 0x00, 0x06,
   0x04, 0x20, 0x00, 0x06, 0x04, 0x00, 0x00, 0x06, 0x04, 0x00, 0x00, 0x06,
   0x04, 0x00, 0x00, 0x06, 0x04, 0x00, 0x00, 0x06, 0xfc, 0xff, 0xff, 0x07,
   0xf0, 0xff, 0xff, 0x07, 0xf0, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00};
xvisual/xvis/bitmaps/list.xbm100644    765    144        1410  6141622166  15417 0ustar  steveusers#define list_width 28
#define list_height 28
static char list_bits[] = {
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0xe0, 0xff, 0x7f, 0x00, 0x20, 0x00, 0x40, 0x00, 0x20, 0x00, 0xc0, 0x00,
   0x20, 0x00, 0xc0, 0x00, 0x20, 0xfe, 0xc7, 0x00, 0x20, 0x00, 0xc0, 0x00,
   0x20, 0xfe, 0xc7, 0x00, 0x20, 0x00, 0xc0, 0x00, 0x20, 0xfe, 0xc7, 0x00,
   0x20, 0x00, 0xc0, 0x00, 0x20, 0xfe, 0xc7, 0x00, 0x20, 0x00, 0xc0, 0x00,
   0x20, 0xfe, 0xc7, 0x00, 0x20, 0x00, 0xc0, 0x00, 0x20, 0xfe, 0xc7, 0x00,
   0x20, 0x00, 0xc0, 0x00, 0x20, 0xfe, 0xc7, 0x00, 0x20, 0x00, 0xc0, 0x00,
   0x20, 0xfe, 0xc7, 0x00, 0x20, 0x00, 0xc0, 0x00, 0x20, 0x00, 0xc0, 0x00,
   0x20, 0x00, 0xc0, 0x00, 0xe0, 0xff, 0xff, 0x00, 0x80, 0xff, 0xff, 0x00,
   0x80, 0xff, 0xff, 0x00};
xvisual/xvis/bitmaps/label.xbm100644    765    144        1413  6141622166  15526 0ustar  steveusers#define label_width 28
#define label_height 28
static char label_bits[] = {
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x07,
   0x04, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x0c, 0x14, 0xe6, 0x5c, 0x0c,
   0x14, 0xa9, 0x45, 0x0c, 0x14, 0xe9, 0x4c, 0x0c, 0x14, 0xaf, 0x4d, 0x0c,
   0x14, 0xa9, 0x45, 0x0c, 0x74, 0xe9, 0xdc, 0x0d, 0x04, 0x00, 0x00, 0x0c,
   0x04, 0x00, 0x00, 0x0c, 0xfc, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f,
   0xf0, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00};
xvisual/xvis/bitmaps/edit.xbm100644    765    144        1410  6141622166  15371 0ustar  steveusers#define edit_width 28
#define edit_height 28
static char edit_bits[] = {
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x07,
   0x04, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x0c, 0x74, 0xd3, 0x01, 0x0c,
   0x14, 0x95, 0x00, 0x0c, 0x34, 0x95, 0x00, 0x0c, 0x34, 0x95, 0x00, 0x0c,
   0x14, 0x95, 0x00, 0x0c, 0x74, 0x93, 0x10, 0x0c, 0x04, 0x00, 0x28, 0x0c,
   0x04, 0x00, 0x44, 0x0c, 0xfc, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x0f,
   0xf0, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00};
xvisual/xvis/bitmaps/button.xbm100644    765    144        1416  6141622166  15765 0ustar  steveusers#define button_width 28
#define button_height 28
static char button_bits[] = {
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x01,
   0x08, 0x00, 0x00, 0x02, 0x04, 0x00, 0x00, 0x04, 0x04, 0x46, 0x02, 0x0c,
   0x04, 0x49, 0x01, 0x0c, 0x04, 0xc9, 0x00, 0x0c, 0x04, 0xc9, 0x00, 0x0c,
   0x04, 0x49, 0x01, 0x0c, 0x04, 0x46, 0x02, 0x0c, 0x04, 0x00, 0x00, 0x0c,
   0x08, 0x00, 0x00, 0x0e, 0xf0, 0xff, 0xff, 0x07, 0xf0, 0xff, 0xff, 0x07,
   0xe0, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00};
xvisual/xvis/bitmaps/repeater.xbm100644    765    144        1424  6141622166  16260 0ustar  steveusers#define repeater_width 28
#define repeater_height 28
static char repeater_bits[] = {
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x10, 0x00,
   0x04, 0x42, 0x08, 0x04, 0x18, 0x44, 0x08, 0x03, 0x20, 0x44, 0x84, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x01,
   0x08, 0x00, 0x00, 0x02, 0x04, 0x00, 0x00, 0x04, 0x04, 0x46, 0x02, 0x0c,
   0x04, 0x49, 0x01, 0x0c, 0x04, 0xc9, 0x00, 0x0c, 0x04, 0xc9, 0x00, 0x0c,
   0x04, 0x49, 0x01, 0x0c, 0x04, 0x46, 0x02, 0x0c, 0x04, 0x00, 0x00, 0x0c,
   0x08, 0x00, 0x00, 0x0e, 0xf0, 0xff, 0xff, 0x07, 0xf0, 0xff, 0xff, 0x07,
   0xe0, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x08, 0x42, 0x08, 0x01, 0x04, 0x41, 0x10, 0x02, 0x02, 0x41, 0x10, 0x04,
   0x00, 0x00, 0x00, 0x00};
xvisual/xvis/bitmaps/box.xbm100644    765    144        1405  6141622166  15240 0ustar  steveusers#define box_width 28
#define box_height 28
static char box_bits[] = {
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x00, 0x10, 0x00, 0x80, 0x00,
   0xd0, 0xc7, 0xbf, 0x01, 0xd0, 0x47, 0xa8, 0x01, 0xd0, 0x47, 0xa8, 0x01,
   0x10, 0x40, 0xb8, 0x01, 0x10, 0x40, 0xa8, 0x01, 0xd0, 0x47, 0xa8, 0x01,
   0xd0, 0xc7, 0xbf, 0x01, 0xd0, 0x07, 0x80, 0x01, 0x10, 0x00, 0x80, 0x01,
   0x10, 0x00, 0x80, 0x01, 0xd0, 0xff, 0x9d, 0x01, 0x50, 0x00, 0x95, 0x01,
   0xd0, 0xff, 0x9d, 0x01, 0x10, 0x00, 0x80, 0x01, 0x10, 0x00, 0x80, 0x01,
   0x10, 0x00, 0x80, 0x01, 0x10, 0x00, 0x80, 0x01, 0xf0, 0xff, 0xff, 0x01,
   0xc0, 0xff, 0xff, 0x01, 0x80, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00};
xvisual/xvis/bitmaps/porthole.xbm100644    765    144        1424  6141622166  16305 0ustar  steveusers#define porthole_width 28
#define porthole_height 28
static char porthole_bits[] = {
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0xfc, 0xff, 0xff, 0x03, 0xfc, 0xff, 0xff, 0x03, 0xac, 0xfe, 0x55, 0x07,
   0x5c, 0x03, 0xaa, 0x07, 0xac, 0x01, 0x5c, 0x07, 0xdc, 0x00, 0xa8, 0x07,
   0x6c, 0x00, 0x50, 0x07, 0x3c, 0x00, 0xa0, 0x07, 0x2c, 0x00, 0x60, 0x07,
   0x3c, 0x00, 0xa0, 0x07, 0x2c, 0x00, 0x60, 0x07, 0x3c, 0x00, 0xa0, 0x07,
   0x2c, 0x00, 0x60, 0x07, 0x3c, 0x00, 0xa0, 0x07, 0x4c, 0x00, 0x50, 0x07,
   0xac, 0x00, 0xa8, 0x07, 0x5c, 0x01, 0x5c, 0x07, 0xac, 0x02, 0xaa, 0x07,
   0x4c, 0xfd, 0x55, 0x07, 0xfc, 0xff, 0xff, 0x07, 0xfc, 0xff, 0xff, 0x07,
   0xf0, 0xff, 0xff, 0x07, 0xe0, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00};
xvisual/xvis/bitmaps/pointer.xbm100644    765    144        1421  6141622166  16126 0ustar  steveusers#define pointer_width 28
#define pointer_height 28
static char pointer_bits[] = {
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0xc0, 0x07, 0x00, 0x00, 0xc0, 0x3f, 0x00, 0x00, 0xc0, 0x1f, 0x00, 0x00,
   0xc0, 0x0f, 0x00, 0x00, 0xc0, 0x1f, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00,
   0x80, 0x7d, 0x00, 0x00, 0x80, 0xf8, 0x00, 0x00, 0x00, 0xf0, 0x01, 0x00,
   0x00, 0xe0, 0x03, 0x00, 0x00, 0xc0, 0x07, 0x00, 0x00, 0x80, 0x0f, 0x00,
   0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x1c, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00};
xvisual/xvis/bitmaps/form.xbm100644    765    144        1410  6141622166  15407 0ustar  steveusers#define form_width 28
#define form_height 28
static char form_bits[] = {
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0xfc, 0xff, 0xff, 0x03, 0x04, 0x00, 0x00, 0x02, 0x04, 0x00, 0x00, 0x06,
   0xe4, 0xff, 0x7f, 0x06, 0x24, 0x00, 0x40, 0x06, 0x24, 0x00, 0x40, 0x06,
   0x24, 0x00, 0x40, 0x06, 0x24, 0x00, 0x40, 0x06, 0x24, 0x00, 0x40, 0x06,
   0x24, 0x00, 0x40, 0x06, 0x24, 0x00, 0x40, 0x06, 0x24, 0x00, 0x40, 0x06,
   0x24, 0x00, 0x40, 0x06, 0x24, 0x00, 0x40, 0x06, 0x24, 0x00, 0x40, 0x06,
   0x24, 0x00, 0x40, 0x06, 0xe4, 0xff, 0x7f, 0x06, 0x04, 0x00, 0x00, 0x06,
   0x04, 0x00, 0x00, 0x06, 0x04, 0x00, 0x00, 0x06, 0xfc, 0xff, 0xff, 0x07,
   0xf0, 0xff, 0xff, 0x07, 0xf0, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00};
xvisual/xvis/bitmaps/bitmap.xbm100644    765    144        1416  6141622166  15726 0ustar  steveusers#define bitmap_width 28
#define bitmap_height 28
static char bitmap_bits[] = {
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x03,
   0x04, 0x00, 0x00, 0x02, 0x04, 0x00, 0x00, 0x02, 0xc4, 0x07, 0x00, 0x02,
   0x24, 0x08, 0x00, 0x02, 0x14, 0x10, 0x00, 0x02, 0x14, 0x10, 0x00, 0x02,
   0x14, 0x10, 0x00, 0x02, 0x14, 0x10, 0x00, 0x02, 0x14, 0x10, 0x00, 0x02,
   0x24, 0x08, 0x00, 0x02, 0xc4, 0x07, 0x00, 0x02, 0x04, 0x00, 0x04, 0x02,
   0x04, 0x00, 0x0e, 0x02, 0x04, 0x00, 0x0e, 0x02, 0x04, 0x00, 0x1f, 0x02,
   0x04, 0x80, 0x3f, 0x02, 0x04, 0x80, 0x3f, 0x02, 0x04, 0xc0, 0x7f, 0x02,
   0x04, 0xe0, 0xff, 0x02, 0x04, 0xe0, 0xff, 0x02, 0x04, 0xf0, 0xff, 0x03,
   0x04, 0x00, 0x00, 0x02, 0xfc, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00};
xvisual/xvis/bitmaps/dirlist.xbm100644    765    144        1421  6141622166  16120 0ustar  steveusers#define dirlist_width 28
#define dirlist_height 28
static char dirlist_bits[] = {
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0xe0, 0xff, 0x7f, 0x00, 0x20, 0x00, 0x40, 0x00, 0x20, 0x00, 0xc0, 0x00,
   0x20, 0x4e, 0xc7, 0x00, 0x20, 0x52, 0xc9, 0x00, 0x20, 0x52, 0xc9, 0x00,
   0x20, 0x52, 0xc7, 0x00, 0x20, 0x52, 0xc9, 0x00, 0x20, 0x4e, 0xc9, 0x00,
   0x20, 0x00, 0xc0, 0x00, 0x20, 0xfe, 0xc7, 0x00, 0x20, 0x00, 0xc0, 0x00,
   0x20, 0xfe, 0xc7, 0x00, 0x20, 0x00, 0xc0, 0x00, 0x20, 0xfe, 0xc7, 0x00,
   0x20, 0x00, 0xc0, 0x00, 0x20, 0xfe, 0xc7, 0x00, 0x20, 0x00, 0xc0, 0x00,
   0x20, 0xfe, 0xc7, 0x00, 0x20, 0x00, 0xc0, 0x00, 0x20, 0x00, 0xc0, 0x00,
   0x20, 0x00, 0xc0, 0x00, 0xe0, 0xff, 0xff, 0x00, 0x80, 0xff, 0xff, 0x00,
   0x80, 0xff, 0xff, 0x00};
xvisual/xvis/bitmaps/downptr100600    765    144         531  6141622166  15327 0ustar  steveusers#ifndef _Vdownptr_
#define _Vdownptr_

#define downptr_width 16
#define downptr_height 16
static char downptr_bits[] = {
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff,
   0xfe, 0x7f, 0xfc, 0x3f, 0xf8, 0x1f, 0xf0, 0x0f, 0xe0, 0x07, 0xc0, 0x03,
   0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};


#endif // _Vdownptr_xvisual/xvis/bitmaps/upptr100644    765    144         426  6141622166  15017 0ustar  steveusers#define upptr_width 16
#define upptr_height 16
static char upptr_bits[] = {
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0xc0, 0x03, 0xe0, 0x07,
   0xf0, 0x0f, 0xf8, 0x1f, 0xfc, 0x3f, 0xfe, 0x7f, 0xff, 0xff, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
xvisual/xvis/bitmaps/leftptr100644    765    144         434  6141622166  15324 0ustar  steveusers#define leftptr_width 16
#define leftptr_height 16
static char leftptr_bits[] = {
   0x00, 0x04, 0x00, 0x06, 0x00, 0x07, 0x80, 0x07, 0xc0, 0x07, 0xe0, 0x07,
   0xf0, 0x07, 0xf8, 0x07, 0xf8, 0x07, 0xf0, 0x07, 0xe0, 0x07, 0xc0, 0x07,
   0x80, 0x07, 0x00, 0x07, 0x00, 0x06, 0x00, 0x04};
xvisual/xvis/bitmaps/rightptr100644    765    144         437  6141622166  15512 0ustar  steveusers#define rightptr_width 16
#define rightptr_height 16
static char rightptr_bits[] = {
   0x20, 0x00, 0x60, 0x00, 0xe0, 0x00, 0xe0, 0x01, 0xe0, 0x03, 0xe0, 0x07,
   0xe0, 0x0f, 0xe0, 0x1f, 0xe0, 0x1f, 0xe0, 0x0f, 0xe0, 0x07, 0xe0, 0x03,
   0xe0, 0x01, 0xe0, 0x00, 0x60, 0x00, 0x20, 0x00};
xvisual/xvis/bitmaps/newform.xbm100644    765    144        1421  6141622166  16123 0ustar  steveusers#define newform_width 28
#define newform_height 28
static char newform_bits[] = {
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0xf8, 0xff, 0xff, 0x01, 0xf8, 0xff, 0xff, 0x01, 0x18, 0x60, 0x80, 0x01,
   0x18, 0x60, 0x80, 0x01, 0x18, 0x60, 0x80, 0x01, 0x18, 0x60, 0x80, 0x01,
   0x18, 0x60, 0x80, 0x01, 0x18, 0x60, 0x80, 0x01, 0x18, 0x60, 0x80, 0x01,
   0x18, 0x60, 0x80, 0x01, 0xf8, 0xff, 0xff, 0x01, 0xf8, 0xff, 0xff, 0x01,
   0x18, 0x60, 0x80, 0x01, 0x18, 0x60, 0x80, 0x01, 0x18, 0x60, 0x80, 0x01,
   0x18, 0x60, 0x80, 0x01, 0x18, 0x60, 0x80, 0x01, 0x18, 0x60, 0x80, 0x01,
   0x18, 0x60, 0x80, 0x01, 0x18, 0x60, 0x80, 0x01, 0xf8, 0xff, 0xff, 0x01,
   0xf8, 0xff, 0xff, 0x01, 0xfc, 0xff, 0xff, 0x03, 0xfc, 0xff, 0xff, 0x03,
   0x00, 0x00, 0x00, 0x00};
xvisual/xvis/bitmaps/editmenu.xbm100644    765    144        1424  6141622166  16263 0ustar  steveusers#define editmenu_width 28
#define editmenu_height 28
static char editmenu_bits[] = {
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x07, 0x04, 0x00, 0x00, 0x04,
   0x04, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x04, 0xfc, 0xff, 0xff, 0x07,
   0xf8, 0x07, 0x00, 0x00, 0x08, 0x04, 0x00, 0x00, 0x08, 0x04, 0x00, 0x00,
   0x08, 0x04, 0x00, 0x00, 0xc8, 0x07, 0x00, 0x00, 0x48, 0x04, 0x00, 0x00,
   0x48, 0x08, 0x00, 0x00, 0x48, 0x10, 0x00, 0x00, 0xc8, 0x20, 0x00, 0x00,
   0x08, 0x41, 0x00, 0x00, 0x08, 0x82, 0x00, 0x00, 0x08, 0x04, 0x01, 0x00,
   0x08, 0x0c, 0x02, 0x00, 0x08, 0x14, 0x04, 0x00, 0x08, 0x24, 0x08, 0x00,
   0xf8, 0x47, 0x08, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00,
   0x00, 0x00, 0x00, 0x00};
xvisual/xvis/bitmaps/xvis.xbm100644    765    144        6324  6141622166  15446 0ustar  steveusers#define xvis_width 64
#define xvis_height 64
static unsigned char xvis_bits[] = {
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff,
   0xff, 0xff, 0xff, 0x7f, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
   0xfa, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x5f, 0x0a, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x50, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50,
   0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x0a, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x50, 0x0a, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x50,
   0x0a, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x50, 0x0a, 0x01, 0x00, 0x00,
   0x00, 0x00, 0x20, 0x50, 0x0a, 0x01, 0x00, 0x00, 0x00, 0x00, 0x20, 0x50,
   0x0a, 0x9d, 0x73, 0x00, 0x00, 0x00, 0x20, 0x50, 0x0a, 0x95, 0x52, 0x00,
   0x00, 0x00, 0x20, 0x50, 0x0a, 0x9d, 0x73, 0x00, 0x00, 0x00, 0x20, 0x50,
   0x0a, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x50, 0x0a, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x50, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50,
   0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x0a, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x50, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50,
   0x8a, 0xff, 0xf0, 0xff, 0x7f, 0xf0, 0xff, 0x53, 0x8a, 0xff, 0x10, 0x00,
   0x40, 0xf0, 0xff, 0x53, 0x8a, 0x80, 0xf0, 0xff, 0x7f, 0x10, 0x04, 0x52,
   0x8a, 0xff, 0x10, 0x00, 0x40, 0x10, 0x04, 0x52, 0x8a, 0x88, 0x10, 0x00,
   0x40, 0xd0, 0x35, 0x52, 0x8a, 0x88, 0xd0, 0xff, 0x41, 0x10, 0x04, 0x52,
   0x8a, 0xff, 0x50, 0x00, 0x41, 0xd0, 0x34, 0x52, 0x8a, 0x88, 0x50, 0x00,
   0x41, 0x10, 0x04, 0x52, 0x8a, 0x88, 0xd0, 0xff, 0x41, 0xd0, 0x35, 0x52,
   0x8a, 0xff, 0x10, 0x00, 0x40, 0x10, 0x04, 0x52, 0x8a, 0x88, 0x10, 0x00,
   0x40, 0x10, 0x04, 0x52, 0x8a, 0x88, 0x10, 0x00, 0x40, 0xd0, 0x74, 0x52,
   0x8a, 0xff, 0x10, 0x00, 0x40, 0x10, 0x04, 0x52, 0x8a, 0x88, 0x10, 0x3f,
   0x5f, 0x10, 0x04, 0x52, 0x8a, 0x88, 0x10, 0x21, 0x51, 0x10, 0x04, 0x52,
   0x8a, 0xff, 0x10, 0x21, 0x5f, 0xf0, 0xff, 0x53, 0x8a, 0x88, 0x10, 0x21,
   0x40, 0x00, 0x00, 0x50, 0x8a, 0x88, 0x10, 0x21, 0x5f, 0x00, 0x00, 0x50,
   0x8a, 0xff, 0x10, 0x21, 0x51, 0x00, 0x00, 0x50, 0x8a, 0x88, 0x10, 0x21,
   0x5f, 0xf0, 0x3f, 0x50, 0x8a, 0x88, 0x10, 0x21, 0x40, 0xf0, 0x3f, 0x50,
   0x8a, 0xff, 0x10, 0x3f, 0x40, 0x10, 0x20, 0x50, 0x8a, 0x88, 0x10, 0x00,
   0x40, 0x10, 0x20, 0x50, 0x8a, 0x88, 0x10, 0x00, 0x40, 0xd0, 0x21, 0x50,
   0x8a, 0xff, 0x10, 0x00, 0x40, 0x10, 0x20, 0x50, 0x8a, 0x88, 0x10, 0x00,
   0x40, 0xd0, 0x23, 0x50, 0x8a, 0x88, 0x10, 0x00, 0x40, 0x10, 0x20, 0x50,
   0x8a, 0xff, 0xf0, 0xff, 0x7f, 0x10, 0x20, 0x50, 0x8a, 0x88, 0x00, 0x00,
   0x00, 0xd0, 0x20, 0x50, 0x8a, 0x88, 0x00, 0x00, 0x00, 0x10, 0x20, 0x50,
   0x8a, 0x88, 0x00, 0x00, 0x00, 0x10, 0x20, 0x50, 0x8a, 0x88, 0x00, 0x00,
   0x00, 0xd0, 0x21, 0x50, 0x8a, 0x88, 0x00, 0x00, 0x00, 0x10, 0x20, 0x50,
   0x8a, 0xff, 0x00, 0x00, 0x00, 0x10, 0x20, 0x50, 0x0a, 0x00, 0x00, 0x00,
   0x00, 0x10, 0x20, 0x50, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x10, 0x20, 0x50,
   0x0a, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3f, 0x50, 0x0a, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x50, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50,
   0xfa, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x5f, 0x02, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x40, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
xvisual/xvis/bitmaps/cc.xpm100644    765    144        2106  6141622166  15052 0ustar  steveusers/* XPM */
static char * cc_xpm[] = {
"28 28 7 1",
" 	c #DB6CDB6CDB6C",
".	c #51445144FBEE",
"X	c #0000FFFFFFFF",
"o	c #000000000000",
"O	c #FFFF0000FFFF",
"+	c #FBEE14514103",
"@	c #FFFFFFFFFFFF",
"    ................        ",
"    .XXXXXXXXXXXXX...       ",
"    .XXXXXXXXXXXXX.o..      ",
"    .XXXXXXXXXXXXX.. .      ",
"    .XXOOXOOOXXOOXX. ..     ",
"    .XXXXXXXXOOOOXX.  ..    ",
"    .XXOOOOOOOOOOXX.   ..   ",
"    .XXXXXoXoXoXXXX.......  ",
"    .XXXXXXXXXXXXXXXXXXX..  ",
"    .XXXXXOOOOoOOOXXXXXX..  ",
"    .XXXXXXXXXXXXXXXXXXX..  ",
"    .XXXXXXXXXOOOOOOXXXX..  ",
"    .XXXXXXXXXXXXXXXXXXX..  ",
"    .XXXXXXXXXOOOOOOOOXX..  ",
"    .XXXXXoXoXoXoXXXXXXX..  ",
"    .XXXXXXXXXXXXXXXXXXX..  ",
"    .XXXXXXXXXOOOXXXXXXX..  ",
"    .XXXXX++++XXXX++++XX..  ",
"    .XXX+++++++X+++++++X..  ",
"    .XXX+++XX++X+++XX++X..  ",
"    .XX+++XXXXX+++XXXXXX..  ",
"    .XX+++XXXXX+++XXXXXX..  ",
"    .XX+++XXXXX+++XXXXXX..  ",
"    .X+@+++XX++X+++XX++X..  ",
"    .++o+++++++X+++++++X..  ",
"    .X+XXX++++XXXX++++XX..  ",
"    .XXXXXXXXXXXXXXXXXXX..  ",
"    ......................  "};
xvisual/xvis/bitmaps/info.xpm100644    765    144        2036  6141622166  15422 0ustar  steveusers/* XPM */
static char * info_xpm[] = {
"28 28 5 1",
" 	c #DB6CDB6CDB6C",
".	c #FFFF0000FFFF",
"X	c #51445144FBEE",
"o	c #FFFFFFFFFFFF",
"O	c #000000000000",
"                            ",
"    ...............         ",
"    .              .        ",
"    .               .       ",
"    .                .      ",
"    .                 .     ",
"    .                  .    ",
"    .                   .   ",
"    .       XXXXX       .   ",
"    .     XXXXXXXXX     .   ",
"    .    XXXXXoXXXXX    .   ",
"    .   XXXXXoooXXXXX   .   ",
"    .  XXXXXXoooXXXXXX  .   ",
"    .   XXXXXXoXXXXXX   .   ",
"    .  XXXXXXoOoXXXXXX  .   ",
"    .  XXXXXXoooXXXXXX  .   ",
"    .  XXXXXXoooXXXXXX  .   ",
"    .  XXXXXXoooXXXXXX  .   ",
"    .  XXXXXXoooXXXXXX  .   ",
"    .  XXXXXXoooXXXXXX  .   ",
"    .   XXXXoooooXXXX   .   ",
"    .   XXXXXXXXXXXXX   .   ",
"    .     XXXXXXXXX     .   ",
"    .       XXXXX       .   ",
"    .                   .   ",
"    .                   .   ",
"    .....................   ",
"                            "};
xvisual/xvis/bitmaps/newform.xpm100644    765    144        2014  6141622166  16140 0ustar  steveusers/* XPM */
static char * newform_xpm[] = {
"28 28 4 1",
" 	c #DB6CDB6CDB6C",
".	c #000000000000",
"X	c #0000FFFFFFFF",
"o	c #FFFFFFFF0000",
"                            ",
"                            ",
"                            ",
"   ......................   ",
"   ......................   ",
"   ..XXXXXXXX..XXoooooo..   ",
"   ..XXXXXXXX..oooooooo..   ",
"   ..XXXXXXoo..XXoooooo..   ",
"   ..XXXXXooo..Xooooooo..   ",
"   ..XXXXXoXX..ooXooooo..   ",
"   ..XXXXXXXX..oXXooooo..   ",
"   ..XXXXXXXX..XXooXooo..   ",
"   ..XXXXXXXX..XXoXXXXX..   ",
"   ......................   ",
"   ......................   ",
"   ..XXXXXXXX..ooXXXXXX..   ",
"   ..XXXXXXXX..XXXXXXXX..   ",
"   ..XXXXXXXX..XXXXXXXX..   ",
"   ..XXXXXXXX..XXXXXXXX..   ",
"   ..XXXXXXXX..XXXXXXXX..   ",
"   ..XXXXXXXX..XXXXXXXX..   ",
"   ..XXXXXXXX..XXXXXXXX..   ",
"   ..XXXXXXXX..XXXXXXXX..   ",
"   ......................   ",
"   ......................   ",
"  ........................  ",
"  ........................  ",
"                            "};
xvisual/xvis/bitmaps/editmenu.xpm100644    765    144        2042  6141622166  16276 0ustar  steveusers/* XPM */
static char * editmenu_xpm[] = {
"28 28 5 1",
" 	c #DB6CDB6CDB6C",
".	c #000000000000",
"X	c #0000FFFFFFFF",
"o	c #51445144FBEE",
"O	c #FBEE14514103",
"                            ",
"                            ",
" .........................  ",
" .XXXXXXXXXXXXXXXXXXXXXXX.  ",
" .XXXXXXXXXXXXXXXXXXXXXXX.  ",
" .XXooooooooooooooooooooX.  ",
" .XXooooooooooooooooooooX.  ",
" .XXooooooooooooooooooooX.  ",
" .XXXoXXoXXXXXXXXXXXXXXXX.  ",
" .XXXoXXoXXXXXXXXXXXXXXXX.  ",
" .XXXoXXoXX..XXXXXXXXXXXX.  ",
" .XXXoXXoXX.OOXXXXXXXXXXX.  ",
" .XXXoXXoXXXOOOXXXXXXXXXX.  ",
" .XXXoXXoXXXXOOOXXXXXXXXX.  ",
" .XXXoXXoXXXXXOOOXXXXXXXX.  ",
" .XXXoXXoXXXXXXOOOXXXXXXX.  ",
" .XXXoXXoXXXXXXXOOOXXXXXX.  ",
" .XXXooooXXXXXXXXOOOXXXXX.  ",
" .XXXXXXXXXXXXXXXXOOOXXXX.  ",
" .XXXXXXXXXXXXXXXXXOOOOXX.  ",
" .XXXXXXXXXXXXXXXXXXOOXXX.  ",
" .XXXXXXXXXXXXXXXXXXOXXXX.  ",
" .XXXXXXXXXXXXXXXXXXXXXXX.  ",
" .XXXXXXXXXXXXXXXXXXXXXXX.  ",
" .........................  ",
"                            ",
"                            ",
"                            "};
xvisual/xvis/bitmaps/disk.xpm100644    765    144        2063  6141622166  15421 0ustar  steveusers/* XPM */
static char * disk_xpm[] = {
"28 28 6 1",
" 	c #DB6CDB6CDB6C",
".	c #000000000000",
"X	c #FBEE14514103",
"o	c #FFFFFFFFFFFF",
"O	c #0000FFFFFFFF",
"+	c #3CF3FBEE34D3",
"                            ",
"   ...XXXXXXXXXXXXXXXXXXX...",
"  ....XXXXXXXXXXXXXXXXXXX...",
"  ....XXXXXXXXXXXXXXXXXXX...",
"  ..o.XXXXXXXXXXXXXXXXXXX...",
"  ..o.XXXXXXXXXXXXXXXXXXX...",
"  ....XXXXXXXXXXXXXXXXXXX...",
"  .....o.o.o.o.o.o.o.ooo....",
"  .....ooooooooooooooooo....",
"  .....ooooooooooooooooo....",
"  ....................oo....",
"  .....ooooooooooooooooo....",
"  .....ooooooooooooooooo....",
"  .....ooooooooooooooooo....",
"  .....ooooooooooooooooo....",
"  .....ooooooooooooooooo....",
"  ..........................",
"  ..OO......................",
"  ..OO......................",
"  ..........................",
"  ......oooooooooooooo......",
"  .....o.....oo+++++++o.....",
"  ..........oo.+++++++o.....",
"  .....o....ooo+++++++o.....",
"  ..........ooo+++++++o.....",
"  .....o....oo.+++++++o.....",
"    ....ooooooooooooooo.....",
"     ......................."};
xvisual/xvis/bitmaps/file.xpm100644    765    144        1764  6141622166  15415 0ustar  steveusers/* XPM */
static char * file_xpm[] = {
"28 28 3 1",
" 	c #DB6CDB6CDB6C",
".	c #000000000000",
"X	c #FFFFFFFFFFFF",
"                            ",
"    ...............         ",
"    .XXXXXXXXXXXXX..        ",
"    .XXXXXXXXXXXXX. .       ",
"    .XXXXXXXXXXXXX.  .      ",
"    .XXXXXXXXXXXXX.   .     ",
"    .XXXXXXXXXXXXX.    .    ",
"    .XXXXXXXXXXXXX......    ",
"    .XXXXXXXXXXXXXXXXXX.    ",
"    .XXXXXXXXXXXXXXXXXX.    ",
"    .XXXXXXXXXXXXXXXXXX.    ",
"    .XXXXXXXXXXXXXXXXXX.    ",
"    .XXXXXXXXXXXXXXXXXX.    ",
"    .XXXXXXXXXXXXXXXXXX.    ",
"    .XXXXXXXXXXXXXXXXXX.    ",
"    .XXXXXXXXXXXXXXXXXX.    ",
"    .XXXXXXXXXXXXXXXXXX.    ",
"    .XXXXXXXXXXXXXXXXXX.    ",
"    .XXXXXXXXXXXXXXXXXX.    ",
"    .XXXXXXXXXXXXXXXXXX.    ",
"    .XXXXXXXXXXXXXXXXXX.    ",
"    .XXXXXXXXXXXXXXXXXX.    ",
"    .XXXXXXXXXXXXXXXXXX.    ",
"    .XXXXXXXXXXXXXXXXXX.    ",
"    .XXXXXXXXXXXXXXXXXX.    ",
"    .XXXXXXXXXXXXXXXXXX.    ",
"    ....................    ",
"                            "};
xvisual/xvis/bitmaps/xvis.xpm100644    765    144       10735  6141622166  15505 0ustar  steveusers/* XPM */
static char * xvis_xpm[] = {
"64 64 8 1",
" 	c #FFFFFFFFFFFF",
".	c #000000000000",
"X	c #51445144FBEE",
"o	c #0000FFFFFFFF",
"O	c #FFFF0000FFFF",
"+	c #FBEE14514103",
"@	c #FFFFFFFF0000",
"#	c #3CF3FBEE34D3",
" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .",
"............................................................... ",
" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..",
"..X..........................................................X. ",
" .X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X..",
"..X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X. ",
" .X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X..",
"..X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X. ",
" .X.oooo..............................................oooooo.X..",
"..X.oooo..............................................oooooo.X. ",
" .X.oooo.OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.oooooo.X..",
"..X.oooo.OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.oooooo.X. ",
" .X.oooo.O...OO...OO...OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.oooooo.X..",
"..X.oooo.O.+.OO.+.OO.+.OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.oooooo.X. ",
" .X.oooo.O...OO...OO...OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.oooooo.X..",
"..X.oooo..............................................oooooo.X. ",
" .X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X..",
"..X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X. ",
" .X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X..",
"..X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X. ",
" .X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X..",
"..X.ooo.........oooo...................ooooo..............oo.X. ",
" .X.ooo.........oooo.XXXXXXXXXXXXXXXXX.ooooo..............oo.X..",
"..X.ooo.@@@@@@@.oooo...................ooooo.+++++.++++++.oo.X. ",
" .X.ooo.........oooo.#################.ooooo.+++++.++++++.oo.X..",
"..X.ooo.@@@.@@@.oooo.#################.ooooo.+...+.+..+++.oo.X. ",
" .X.ooo.@@@.@@@.oooo.#...........#####.ooooo.+++++.++++++.oo.X..",
"..X.ooo.........oooo.#.OOOOOOOOO.#####.ooooo.+..++.+..+++.oo.X. ",
" .X.ooo.@@@.@@@.oooo.#.OOOOOOOOO.#####.ooooo.+++++.++++++.oo.X..",
"..X.ooo.@@@.@@@.oooo.#...........#####.ooooo.+...+.+..+++.oo.X. ",
" .X.ooo.........oooo.#################.ooooo.+++++.++++++.oo.X..",
"..X.ooo.@@@.@@@.oooo.#################.ooooo.+++++.++++++.oo.X. ",
" .X.ooo.@@@.@@@.oooo.#################.ooooo.+..++.+...++.oo.X..",
"..X.ooo.........oooo.#################.ooooo.+++++.++++++.oo.X. ",
" .X.ooo.+++.@@@.oooo.###......##.....#.ooooo.+++++.++++++.oo.X..",
"..X.ooo.+++.@@@.oooo.###.oooo.##.XXX.#.ooooo.+++++.++++++.oo.X. ",
" .X.ooo.........oooo.###.oooo.##.....#.ooooo..............oo.X..",
"..X.ooo.@@@.@@@.oooo.###.oooo.########.ooooooooooooooooooooo.X. ",
" .X.ooo.@@@.@@@.oooo.###.oooo.##.....#.ooooooooooooooooooooo.X..",
"..X.ooo.........oooo.###.oooo.##.+++.#.ooooooooooooooooooooo.X. ",
" .X.ooo.@@@.@@@.oooo.###.oooo.##.....#.ooooo..........oooooo.X..",
"..X.ooo.@@@.@@@.oooo.###.oooo.########.ooooo..........oooooo.X. ",
" .X.ooo.........oooo.###......########.ooooo.XXXXXXXX.oooooo.X..",
"..X.ooo.@@@.@@@.oooo.#################.ooooo.XXXXXXXX.oooooo.X. ",
" .X.ooo.@@@.@@@.oooo.#################.ooooo.X...XXXX.oooooo.X..",
"..X.ooo.........oooo.#################.ooooo.XXXXXXXX.oooooo.X. ",
" .X.ooo.@@@.@@@.oooo.#################.ooooo.X....XXX.oooooo.X..",
"..X.ooo.@@@.@@@.oooo.#################.ooooo.XXXXXXXX.oooooo.X. ",
" .X.ooo.........oooo...................ooooo.XXXXXXXX.oooooo.X..",
"..X.ooo.@@@.@@@.oooooooooooooooooooooooooooo.X..XXXXX.oooooo.X. ",
" .X.ooo.@@@.@@@.oooooooooooooooooooooooooooo.XXXXXXXX.oooooo.X..",
"..X.ooo.@@@.@@@.oooooooooooooooooooooooooooo.XXXXXXXX.oooooo.X. ",
" .X.ooo.@@@.@@@.oooooooooooooooooooooooooooo.X...XXXX.oooooo.X..",
"..X.ooo.@@@.@@@.oooooooooooooooooooooooooooo.XXXXXXXX.oooooo.X. ",
" .X.ooo.........oooooooooooooooooooooooooooo.XXXXXXXX.oooooo.X..",
"..X.oooooooooooooooooooooooooooooooooooooooo.XXXXXXXX.oooooo.X. ",
" .X.oooooooooooooooooooooooooooooooooooooooo.XXXXXXXX.oooooo.X..",
"..X.oooooooooooooooooooooooooooooooooooooooo..........oooooo.X. ",
" .X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X..",
"..X.oooooooooooooooooooooooooooooooooooooooooooooooooooooooo.X. ",
" .X..........................................................X..",
"..XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. ",
" ...............................................................",
". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "};
xvisual/xvis/xvis.cc100600    765    144       33773  6164233010  13615 0ustar  steveusers
/*     *******************************************************************************
	XVisual GUI Development System for Linux/X-Window
	Copyright (C) 1996 Steve Carrie.

        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.
        ******************************************************************************* */

/* =============================================
	xvis user interface builder for Athena widgets using
	xv class library.

	Main Segment

	V1.0 BETA  - last edited 25/06/96
    ============================================= */

// ---------------------------------------------
// Include file declarations

#include "xvis.h"
#include <stdio.h>
#include <unistd.h>
#include <ctype.h>

// ---------------------------------------------
// Global Objects - Working variables

struct objectlist objects[MAXOBJECTS]; 
struct loadref loading_ref[MAXOBJECTS];
struct rgb colour[800];
char *colournamelist[800];
int numcolours=0;
struct editcontrol editor[MAXEDITWINDOWS];
struct modulecontrol module[MAXEDITWINDOWS];
struct filelist cc_files[MAXFILELIST];
struct filelist h_files[MAXFILELIST];
int numccfiles=0;
int numhfiles=0;

int nobject=0;

char *objectName[]= { 	"timer", "list", "button", "repeater", "bitmap", "label", "dropdown",
					"editfield", "box", "toggle", "form", "vscroll", "hscroll", "panner",
					"filelist", "dirlist", "window", "pointer", "none" };

char *className[] = {	"xvTimer", "xvVisualList", "xvButton", "xvRepeater", "xvBitmap",
					"xvLabel", "xvDropDown", "xvEditField", "xvBox", "xvToggle", "xvForm", 
					"xvScrollbar", "xvScrollbar", "xvPanner", "xvFileList", 
					"xvFileList", "xvWindow", "NULL", "NULL" };

Boolean uses3D[] = { FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, 
				FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, 
				FALSE, FALSE, FALSE };

objectType objectList[] = {	XVTimer, XVList, XVButton, XVRepeater, XVBitmap, XVLabel, 
						XVDropDown, XVEditField, XVBox, XVToggle, XVForm, XVVScroll,
						XVHScroll, XVPanner, XVFileList, XVDirList, XVWindow, XVPointer, 
						XVNone };

eventType eventList[]={	XVButtonPress, XVButtonRelease, XVEnterNotify, XVLeaveNotify,
					XVFocusIn, XVFocusOut, XVExpose, XVKeyPress, XVKeyRelease,
					XVStructureNotify, XVMap, XVUnmap, XVPointerMotion, 
					XVLeftButtonMotion, XVMidButtonMotion, XVRightButtonMotion };

struct event_data eventinfo[]={	"X_ButtonPress",		1L<<0,	"ButtonPressMask",		"XButtonPressedEvent",
							"X_ButtonRelease",		1L<<1,	"ButtonReleaseMask",	"XButtonReleasedEvent",
							"X_EnterNotify",		1L<<2,	"EnterWindowMask",	"XEnterWindowEvent",
							"X_LeaveNotify",		1L<<3,	"LeaveWindowMask",	"XLeaveWindowEvent",
							"X_FocusIn",			1L<<4,	"FocusChangeMask",	"XFocusInEvent",
							"X_FocusOut",			1L<<5,	"FocusChangeMask",	"XFocusOutEvent",
							"X_Expose",			1L<<6,	"ExposureMask",		"XExposeEvent",
							"X_KeyPress",			1L<<7,	"KeyPressMask", 		"XKeyPressedEvent",
							"X_KeyRelease",		1L<<8, 	"KeyReleaseMask", 	"XKeyReleasedEvent",
							"X_StructureNotify",	1L<<9,	"StructureNotifyMask",	"XConfigureEvent",
							"X_Map",				1L<<10, 	"StructureNotifyMask", 	"XMapEvent",
							"X_Unmap",			1L<<11,	"StructureNotifyMask", 	"XUnmapEvent",
							"X_PointerMotion",		1L<<12,	"PointerMotionMask",	"XPointerMovedEvent",
							"X_Left_Motion", 		1L<<13,	"Button1MotionMask", 	"XPointerMovedEvent",
							"X_Mid_Motion", 		1L<<14,	"Button2MotionMask", 	"XPointerMovedEvent",
							"X_Right_Motion",		1L<<15, 	"Button3MotionMask", 	"XPointerMovedEvent" };

int objectInstance[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };

char *listvalues[]={ "Empty List" };

char *wrapinfo[]={ "Never", "Line", "Word" };
char *wrapdata[] = { "XawtextWrapNever", "XawtextWrapLine", "XawtextWrapWord" };

char *scrollinfo[]= {"Never", "WhenNeeded", "Always" };
char *scrolldata[]= { "XawtextScrollNever", "XawtextScrollWhenNeeded", 
							"XawtextScrollAlways"};

char *resizeinfo[] = { "Never", "Width", "Height", "Both" };
char *resizedata[]={ "XawtextResizeNever", "XawtextResizeWidth", 
							"XawtextResizeHeight", "XawtextResizeBoth" };

char *editmodeinfo[] = { "Read/Write", "Read Only", "Append" };
char *editmodedata[] = { "XawtextEdit", "XawtextRead", "XawtextAppend" };

char *buttonshapeinfo[] = { "Rectangle", "Oval", "Ellipse", "Rounded" };
char *buttonshapedata[] = { "XmuShapeRectangle", "XmuShapeOval", "XmuShapeEllipse", 
						"XmuShapeRoundedRectangle" };
int buttonshapecmd[] = { XmuShapeRectangle, XmuShapeOval, XmuShapeEllipse, 
						XmuShapeRoundedRectangle };

char *justifyinfo[] = {"Centre", "Left", "Right"};
char *justifydata[] = {"XtJustifyCenter", "XtJustifyLeft", "XtJustifyRight" };
XtJustify justifycmd[] = { XtJustifyCenter, XtJustifyLeft, XtJustifyRight };

// ---------------------------------------------
// Global Info

Display *working_display;
Screen *working_screen;
int screen_num;
int screenWidth, screenHeight;
Pixel blackPixel, whitePixel;
int screenDepth;
unsigned long screenMask;

// ---------------------------------------------
// Global Class declarations.

xvContext xvisContext;

xvFont cursorfont;
xvMsgBox alert;

xvWindow xvisSelectFile;
	xvFileDialog xvisSelFile;

xvWindow xvisControl;
	xvMenuBar xvisControlMenu;
	xvPulldownMenu xvisFileMenu, xvisObjectMenu, xvisWindowMenu;
	xvPulldownMenu xvisGenerateMenu, xvisHelpMenu;
	xvButton xvisNew, xvisOpen, xvisSave, xvisCC, xvisInfo, xvisNewForm, xvisEditMenu;
	xvLabel xvisCount;
	char countvalue[40];
	char project_name[180];
	char project_path[180];
	int project_list[MAXPROJECTFILES];

xvWindow xvisTools;
	xvLabel toollabel;
	xvToggle xTimer, xBitmap, xDrop, xToggle, xVScroll, xHScroll, xPanner, xList;
	xvToggle xLabel, xEdit, xButton, xRepeater, xBox, xForm, xPointer, xFileList, xDirList;
	
xvWindow xvisProps;
	xvView propview;
	xvForm propform;
	xvList proplist, valuelist;
	xvLabel propobject, proplabel;
	xvButton propchange;
	xvEditField propedit;
	objectType prop_object_type;
	int prop_object_index=-1;
	int selected_index=0;
	char propeditbuffer[120];
	char objname[50];

xvWindow xvisEvents;
	xvToggle eventtoggles[NUMEVENTS];

xvPopupShell xvisColours;
	xvForm colourform;
	xvView colourview;
	xvList colourlist;
	xvLabel colourexample;
	xvButton colourok, colourcancel, colourdefault;
	int colourmode;

xvWindow xvisMake;
	xvEditField maketext;
	xvButton makequit;
	char *makebuffer=NULL;

xvPopupShell xvisCursors;
	xvList xvisCursorList;

xvPopupShell xvisPath;
	xvForm xvisPathForm;
	xvLabel xvisPathLabel;
	xvFileList pathlist;
	xvMsgBox pathAlert;
	xvButton pathok, pathcancel;
	char provpath[180];
	char cwd[200];

xvPopupShell xvisFonts;
	xvFontList masterfontlist;
	xvView fontview;
	xvList fontlist;
	xvForm fontform;
	xvLabel fontexample;
	xvFont fontfont;
	xvButton fontok, fontcancel;

xvWindow xvisObjList;
	xvForm objform;
	xvView objview;
	xvList objlist;
	xvButton objok, objcancel;
	int num_objects=0;
	int selected_ref=0;
	struct object_listdata objectinfo[MAXOBJECTS];
	char *objectlist[MAXOBJECTS];

xvWindow xvisGrid;
	xvLabel xlab, ylab;
	xvButton labok, labcancel;
	xvEditField xval, yval;

xvWindow xvisProjList;
	xvView projview;
	xvList projlist;
	xvButton projOpen, projDelete;
	int num_proj=0;
	char *projectlist[MAXPROJECTFILES+MAXEDITWINDOWS];

xvPopupShell xvisCallList;
	xvForm callform;
	xvView callview;
	xvList calllist;
	xvButton callclose;
	int num_calls=0;
	char *calls_list[20];
	
xvWindow xvisMenus;
	xvEditField menuCaption, menuName, menuCallback;
	xvLabel menuCaptionLabel, menuNameLabel, menuCallbackLabel;
	xvView menuView;
	xvList menuList;
	xvButton menuOK, menuCancel;
	xvButton menuAdd, menuAddSep, menuUpdate, menuRemove, menuClear;
	xvButton menuDown, menuUp, menuMain, menuSub;
	xvButton menuFont;
	xvButton menuBack, menuFore;
	xvButton menuEditCallback;
		
xvWindow xvisGenerate;
	xvButton genOK, genCancel;
	xvLabel AppNameLabel, MakeChoiceLabel, MakeFileLabel, LinkChoiceLabel, LibLabel;
	xvToggle MakeYes, MakeNo;
	xvToggle MakeStatic, MakeShared;
	xvEditField AppName, MakeFile, Libs;

xvEditWindow xvisError;
	char errorbuffer[MAXEDITBUFFERSIZE];

xvPopupShell xvisAbout;
	xvForm aboutform;
	xvLabel aboutmap;
	xvLabel aboutlabel;
	xvButton aboutbutton;

xvPopupMenu objectpopup;
xvCore *CurrentClass;
xvSizer *sizer;
Boolean objectpopupopen=FALSE;

// ---------------------------------------------
// Global Vars & data

Boolean xvisExit=FALSE;
Boolean ToolsVisible=FALSE;
Boolean PropsVisible=FALSE;
Boolean MenusVisible=FALSE;
Boolean ColoursVisible=FALSE;
Boolean EventsVisible=FALSE;
Boolean ProjectListVisible=FALSE;
Boolean ErrorsVisible=FALSE;

Boolean establishedFileFlag=FALSE;

objectType CurrentToolType=XVPointer;
char *CurrentToolName;

objectType CurrentObjectType=XVNone, CurrentParentType=XVNone;
int CurrentObject=-1, CurrentParent=-1;
int ObjectBeingSized=-1;
int ObjectBeingSizedParent=-1;
objectType ObjectBeingSizedParentType=XVNone;
xvWindow *CurrentObjectWindow;
char CurrentObjectName[40]=" ";

struct resource_store resource_values[50];
int resource_full=0;
Boolean resvalflag=FALSE;
char* *resvallist;

int CurrentX, CurrentY;
int RelativeX, RelativeY;

int gridX=10, gridY=10;
Boolean snapToGrid=TRUE, showGrid=TRUE;

// ---------------------------------------------
// Callbacks (Global)

extern void func_file_projsave(Widget aw, XtPointer client, XtPointer call);

void ExecExit()
{
	xvisExit=TRUE;
	for (int i=0; i<MAXOBJECTS; i++) 
		if (objects[i].object_type==XVWindow)
			DeleteNamedObject(objects[i].name);
	for (int i=0; i<MAXTOOLS; i++)
		objectInstance[i]=0;

	xvisControl.Close();
	xvisTools.Close();
	xvisProps.Close();
	xvisEvents.Close();
//	xvisMenus.Close();
	exit(0);
}

void exit_yes(Widget aw, XtPointer client, XtPointer call)
{
	alert.Close();
	func_file_projsave(0, NULL, NULL);
	ExecExit();
}

void exit_no(Widget aw, XtPointer client, XtPointer call)
{
	alert.Close();
	ExecExit();
}

void func_exit(Widget aw, XtPointer client, XtPointer call)
{
	
	if (! UnsavedData()) {
		ExecExit();
		return;
	}

	alert.init("UNSAVED DATA", xvisControl, 
		"There is unsaved data.\n Do you want to save?",
		XVMSGSIMPLECHOICE, "green",
		exit_yes, exit_no);
	alert.Open();

}

void func_dummy(Widget aw, XtPointer client, XtPointer call)
{
}

void func_timer(XtPointer cdata, XtIntervalId *id)
{
}

extern void func_window_error(Widget aw, XtPointer client, XtPointer call);

// ---------------------------------------------
// Utility routines

char *normalize(char *source)
{
	char temp[200];

	int len=strlen(source);
	int sptr=0, dptr=0;
	char c, *s;

	while (sptr <len) {
		c=tolower(source[sptr]);
		if (! isspace(c))
			temp[dptr++]=c;
		sptr++;
	}
	temp[dptr]='\0';

	if ((s=strstr(temp, "grey")) != NULL) 
		s[2]='a';


	return temp;
}

Boolean alreadyExist(char *name)
{
	for (int i=0; i<numcolours; i++)
		if (strcmp(name, colour[i].name)==0) 
			return TRUE;
	return FALSE;	
}

// ---------------------------------------------
// Main Stuff

void initialize()
{
	for (int i=0; i<MAXOBJECTS; i++) {
		objects[i].object_type=XVNone;
		objects[i].object_number=i;
		objects[i].num_children=0;
		objects[i].events=0L;
		strcpy(objects[i].obj_cursor, "(default)");
		objects[i].obj_path[0]='\0';
		objects[i].changed=FALSE;
	}

	for (int i=0; i<MAXPROJECTFILES; i++)
		project_list[i]=-1;
	project_name[0]='\0';
	project_path[0]='\0';
	for (int i=0; i<MAXEDITWINDOWS; i++) {
		module[i].in_use=FALSE;
		editor[i].in_use=FALSE;
		module[i].changed=FALSE;
		module[i].first=TRUE;
	}

	working_display=XOpenDisplay(NULL);
	working_screen=DefaultScreenOfDisplay(working_display);
	screen_num=DefaultScreen(working_display);
	screenWidth=WidthOfScreen(working_screen);
	screenHeight=HeightOfScreen(working_screen);
	screenDepth=DefaultDepthOfScreen(working_screen);
	whitePixel=WhitePixel(working_display, screen_num);
	blackPixel=BlackPixel(working_display, screen_num);
	screenMask=AllPlanes;
	XCloseDisplay(working_display);
	getcwd(cwd, 200);

	FILE *fp;
	int cnt=0;
	char tempbuffer[180];
	char red, green, blue, cname[90], nname[90];

	numcolours=0;
	fp=fopen("/usr/lib/X11/rgb.txt", "r");
	if (fp!=NULL) {
		fgets(tempbuffer, 80, fp);
		while (!feof(fp)) {
			fscanf(fp, "%d %d %d\t\t", &red, &blue, &green);
			fgets(cname, 24, fp);
			int i=strlen(cname);
			if (i>0) cname[i-1]='\0';
			strcpy(nname, normalize(cname));
			if (! alreadyExist(nname)) {
				strcpy(colour[numcolours].name, nname);
				colour[numcolours].red=red;
				colour[numcolours].green=green;
				colour[numcolours].blue=blue;
				colournamelist[numcolours]=colour[numcolours].name;
				numcolours++;
			}
		}
		fclose(fp);
		numcolours--;
	}
}

main(int argc, char **argv)
{
	initialize();

	xvisContext.init("xvis", argc, argv);
	buildControlWindow();
	buildToolsWindow();
	buildMenuWindow();
	SetupPropsWindow(XVNone, listvalues, TRUE);
	buildEventsWindow();
	buildProjectListWindow();
	buildCodeGenWindow();
	buildAboutWindow();
	buildGridWindow();

	xvisError.init(xvisContext, "Errors", XawtextRead, errorbuffer, 600, 200, 
		func_window_error, func_window_error, "Errors");
	xvisError.SetWindowResource(XtNiconPixmap, xvisError.xvEditField::SetPixmapInfo(
		xvis_xpm, NULL));
	xvisError.xvEditField::SetBackground("LemonChiffon");

	xvisControl.Open();
	cursorfont.init(xvisControl, "cursor");
	fontfont.init(xvisControl, "*times-*-r-*-140*");
	buildCursorWindow();
	xvisTools.Open();
	xvisProps.Open();
	xvisEvents.Open();
	propedit.SetSensitive(FALSE);
	propedit.SetBackground("gray50");
	propchange.SetSensitive(FALSE);
	propchange.SetBackground("gray50");

	masterfontlist.init(xvisProps, "*", 1000);
	
	XtAppMainLoop(xvisContext.GetContext());
}xvisual/xvis/xvis.h100644    765    144       37434  6165756221  13504 0ustar  steveusers
/*     *******************************************************************************
	XVisual GUI Development System for Linux/X-Window
	Copyright (C) 1996 Steve Carrie.

        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.
        ******************************************************************************* */

/* =============================================
	xvis user interface builder for Athena widgets using
	xv class library.

	Global Files

	V1.0 BETA  - last edited 01/07/96
    ============================================= */

#ifndef _Vxvis_h
#define _Vxvis_h

#include <X11/xv/xv.h>
#include <bitmaps/xvis.xpm>

// ---------------------------------------------
// Global Types & Structures

#define CALLMODE	0
#define EVENTMODE	1

#define MAXOBJECTS 200
#define MAXTOOLS 19
#define NUMEVENTS 16
#define MAXPROJECTFILES 20
#define MAXPULLDOWNS	20
#define MAXMENUENTRY	20
#define MAXEDITWINDOWS 10
#define MAXEDITBUFFERSIZE	32767
#define MAXFILELIST	40

#define BCOLOUR 1
#define FCOLOUR 2
#define TSCOLOUR 3
#define BSCOLOUR 4

enum objectType { 	XVTimer, XVList, XVButton, XVRepeater, XVBitmap, XVLabel, 
				XVDropDown, XVEditField, XVBox, XVToggle, XVForm, XVVScroll,
				XVHScroll, XVPanner, XVFileList, XVDirList, XVWindow, XVPointer, 
				XVNone, XVAll };

enum resourceType { 	XVVoid, XVPixel, XVDimension, XVInt, XVBoolean, XVPosition,
					XVString, XVName, XVCursor, XVWinName, XVWinIcon,
					XVWinPositionX, XVWinPositionY, XVWinSize, XVFont,
					XVPath, XVBitmapFile, XVObject, XVTime, XVLocBoolean,
					XVWrap, XVvScroll, XVhScroll, XVResize, XVEditmode,
					XVShapeStyle, XVJustify };

enum eventType {	XVButtonPress, XVButtonRelease, XVEnterNotify, XVLeaveNotify,
				XVFocusIn, XVFocusOut, XVExpose, XVKeyPress, XVKeyRelease,
				XVStructureNotify, XVMap, XVUnmap, XVPointerMotion, 
				XVLeftButtonMotion, XVMidButtonMotion, XVRightButtonMotion };

enum callType {	XVNoCall, XVCallback, XVEvent, XVTimeout };

struct filelist {
	char filename[80];
	char stubname[80];
	int source;
	int sourcetype;
};

struct rgb {
	char red;
	char blue;
	char green;
	char name[25];
};

struct event_data {	
	char *eventName;
	unsigned long eventbits;
	char *eventMask;
	char *eventStruct;
};

#define XVMENUVOID	0
#define XVMENUEND	1
#define XVMENUMAIN	2
#define XVMENUSUB	3
#define XVMENUSEP	4

struct editcontrol {
	Boolean in_use;
	char name[80];
	xvEditWindow *editor;
	char *edit_buffer;
	int mode;
	int ref;
	int object;
	char client[10];
};

struct modulecontrol {
	Boolean in_use;
	char name[80];
	char path[220];
	xvEditWindow *editor;
	char *edit_buffer;
	char client[10];
	Boolean active;
	Boolean changed;
	Boolean first;
};

struct menuentry {
	int type;
	char name[40];
	char caption[40];
	char callback[40];
	int listpoint;
	char *codebuffer;
};

struct object_listdata {
	char listitem[80];
	int object_ref;
};

struct loadref {
	int reference;
	char index_name[80];
	char window_name[80];
	char obref1[80];
	char obref2[80];
	char obref3[80];
};
	
struct resource_store {
	char *r_restype;
	char r_value[120];
	resourceType r_type;
	union {
		Dimension r_dimension;
		int r_int;
		Boolean r_boolean;
		Position r_position;
		String r_string;
		String r_cursor;
	};
};

struct objectlist {
	char name[40];
	char obj_cursor[40];
	char obj_font[120];
	char obj_path[180];
	char obj_icon[180];
	char obj_bitref[50];
	char leftbitmap[180];
	char obj_leftbitref[50];
	char obj_menu_font[120];
	char background_colour[25];
	char foreground_colour[25];
	char border_colour[25];
	char topshadow_colour[25];
	char bottomshadow_colour[25];
	char *callbackcode[3];
	char *eventcode[16];
	objectType object_type;
	objectType parent_type;
	int edit_mode;
	int resize_mode;
	int vscroll_mode;
	int hscroll_mode;
	int wrap_mode;
	int shape;
	int justify;
	int object_number;
	int object_index;
	int parent_index;
	int parent_window;
	int num_children;
	int object_ref1;
	int object_ref2;
	int object_ref3;
	int object_time;
	int totalmenu;
	int nummenu;
	int numpulldown[MAXPULLDOWNS];
	Boolean autowrap;
	Boolean echo;
	Boolean ctrl;
	Boolean enabled;
	Boolean visible;
	Boolean changed;
	Boolean fixed_size;
	Boolean hasmenu;
	Boolean iconic;
	Boolean open_at_startup;
	Boolean has_bitmap;
	Boolean has_leftbitmap;
	unsigned long events;
	Position winxpos;
	Position winypos;
	Dimension winwidth;
	Dimension winheight;
	Widget object_widget;
	xvBitmap *object_bitmap;
	xvBitmap *leftbit;
	xvFont *object_font;
	xvMenuBar *menubar;
	xvPulldownMenu *pulldown[MAXMENUENTRY];
	char menu_background[25];
	char menu_foreground[25];
	struct menuentry *menuinfo;
	union {
		xvCore *pcore;
		xvTimer *ptimer;
		xvVisualList *plist;
		xvButton *pbutton;
		xvRepeater *prepeater;
		xvBitmap *pbitmap;
		xvLabel *plabel;
		xvDropDown *pdropdown;
		xvEditField *peditfield;
		xvBox *pbox;
		xvToggle *ptoggle;
		xvVisualForm *pform;
		xvScrollbar *pvscroll;
		xvScrollbar *phscroll;
		xvPanner *ppanner;
		xvWindow *pwindow;
		xvFileList *pfilelist;
		xvFileList *pdirlist;		
	};
};

// ---------------------------------------------
// External Global working data

extern struct objectlist objects[];
extern struct loadref loading_ref[];
extern int nobject;
extern Boolean uses3D[];
extern char *objectName[];
extern char *className[];
extern int objectInstance[];
extern objectType objectList[];
extern char *listvalues[];
extern eventType eventList[];
extern struct event_data eventinfo[];
extern struct rgb colour[];
extern char *colournamelist[];
extern int numcolours;
extern struct editcontrol editor[];
extern struct modulecontrol module[];
extern struct filelist cc_files[];
extern struct filelist h_files[];
extern int numccfiles;
extern int numhfiles;
extern char *wrapinfo[], *scrollinfo[], *resizeinfo[];
extern char *wrapdata[];
extern char *scrolldata[];
extern char *resizedata[];
extern char *editmodeinfo[];
extern char *editmodedata[];
extern char *buttonshapeinfo[];
extern char *buttonshapedata[];
extern int buttonshapecmd[];
extern char *justifyinfo[];
extern char *justifydata[];
extern XtJustify justifycmd[];

// ---------------------------------------------
// Global info

extern int screenWidth, screenHeight;
extern Pixel blackPixel, whitePixel;
extern int screenDepth;
extern unsigned long screenMask;

// ---------------------------------------------
// External Global Class declarations.

extern xvContext xvisContext;

extern xvFont cursorfont;
extern xvMsgBox alert;

extern xvWindow xvisSelectFile;
	extern xvFileDialog xvisSelFile;

extern xvWindow xvisControl;
	extern xvMenuBar xvisControlMenu;
	extern xvPulldownMenu xvisFileMenu, xvisObjectMenu, xvisWindowMenu;
	extern xvPulldownMenu xvisGenerateMenu, xvisHelpMenu;
	extern xvButton xvisNew, xvisOpen, xvisSave, xvisCC, xvisInfo, xvisEditMenu, xvisNewForm;
	extern xvLabel xvisCount;
	extern char countvalue[];
	extern char project_name[], project_path[];
	extern int project_list[];

extern xvWindow xvisTools;
	extern xvLabel toollabel;
	extern xvToggle xTimer, xBitmap, xDrop, xView, xToggle;
	extern xvToggle xVScroll, xHScroll, xPanner, xList;
	extern xvToggle xLabel, xEdit, xButton, xRepeater, xBox;
	extern xvToggle xFileList, xDirList, xForm, xPointer;
	
extern xvWindow xvisProps;
	extern xvView propview;
	extern xvForm propform;
	extern xvList proplist, valuelist;
	extern xvLabel proplabel, propobject;
	extern xvButton propchange;
	extern xvEditField propedit;
	extern objectType prop_object_type;
	extern int prop_object_index;
	extern int selected_index;
	extern char propeditbuffer[];
	extern char objname[];

extern xvWindow xvisEvents;
	extern xvToggle eventtoggles[];

extern xvPopupShell xvisColours;
	extern xvForm colourform;
	extern xvView colourview;
	extern xvList colourlist;
	extern xvLabel colourexample;
	extern xvButton colourok, colourcancel, colourdefault;
	extern int colourmode;

extern xvWindow xvisMake;
	extern xvEditField maketext;
	extern xvButton makequit;
	extern char *makebuffer;

extern xvPopupShell xvisCursors;
	extern xvList xvisCursorList;

extern xvWindow xvisGrid;
	extern xvLabel xlab, ylab;
	extern xvButton labok, labcancel;
	extern xvEditField xval, yval;

extern xvPopupShell xvisPath;
	extern xvForm xvisPathForm;
	extern xvLabel xvisPathLabel;
	extern xvFileList pathlist;
	extern xvMsgBox pathAlert;
	extern xvButton pathok, pathcancel;
	extern char provpath[];
	extern char cwd[];

extern xvPopupShell xvisFonts;
	extern xvFontList masterfontlist;
	extern xvView fontview;
	extern xvList fontlist;
	extern xvButton fontok, fontcancel;
	extern xvLabel fontexample;
	extern xvForm fontform;
	extern xvFont fontfont;

extern xvWindow xvisObjList;
	extern xvForm objform;
	extern xvView objview;
	extern xvList objlist;
	extern xvButton objok, objcancel;
	extern int num_objects;
	extern int selected_ref;
	extern struct object_listdata objectinfo[];
	extern char *objectlist[];

extern xvWindow xvisProjList;
	extern xvView projview;
	extern xvList projlist;
	extern xvButton projOpen, projDelete;
	extern int num_proj;
	extern char *projectlist[];

extern xvPopupShell xvisCallList;
	extern xvForm callform;
	extern xvView callview;
	extern xvList calllist;
	extern xvButton callclose;
	extern int num_calls;
	extern char *calls_list[];
	
extern xvWindow xvisMenus;
	extern xvEditField menuCaption, menuName, menuCallback;
	extern xvLabel menuCaptionLabel, menuNameLabel, menuCallbackLabel;
	extern xvView menuView;
	extern xvList menuList;
	extern xvButton menuOK, menuCancel;
	extern xvButton menuAdd, menuAddSep, menuUpdate, menuRemove, menuClear;
	extern xvButton menuDown, menuUp, menuMain, menuSub;
	extern xvButton menuFont;
	extern xvButton menuBack, menuFore;
	extern xvButton menuEditCallback;

extern xvWindow xvisGenerate;
	extern xvButton genOK, genCancel;
	extern xvLabel AppNameLabel, MakeChoiceLabel, MakeFileLabel, LinkChoiceLabel, LibLabel;
	extern xvToggle MakeYes, MakeNo;
	extern xvToggle MakeStatic, MakeShared;
	extern xvEditField AppName, MakeFile, Libs;

extern xvEditWindow xvisError;
	extern char errorbuffer[];

extern xvPopupShell xvisAbout;
	extern xvForm aboutform;
	extern xvLabel aboutmap;
	extern xvLabel aboutlabel;
	extern xvButton aboutbutton;

extern xvPopupMenu objectpopup;
extern xvCore *CurrentClass;
extern xvSizer *sizer;
extern Boolean objectpopupopen;

// ---------------------------------------------
// Global Vars & data

extern Boolean xvisExit, ToolsVisible, PropsVisible, MenusVisible, ColoursVisible;
extern Boolean EventsVisible, ProjectListVisible, ErrorsVisible;
extern Boolean establishedFileFlag;

extern objectType CurrentObjectType, CurrentParentType;
extern int CurrentObject, CurrentParent;
extern int ObjectBeingSized, ObjectBeingSizedParent;
extern xvWindow *CurrentObjectWindow;
extern char CurrentObjectName[];
extern objectType ObjectBeingSizedParentType;

extern objectType CurrentToolType;
extern char *CurrentToolName;

extern int CurrentX, CurrentY;
extern int RelativeX, RelativeY;

extern int gridX, gridY;
extern Boolean snapToGrid, showGrid;

// ---------------------------------------------
// Globals for Resources

#define xvNnone			"none"
#define xvNobjectName		"objectName"
#define xvNtimerInterval	"timerInterval"
#define xvNwindowName		"windowName"
#define xvNwindowIcon		"windowIcon"
#define xvNpath			"path"
#define xvNbitmapFile		"bitmapFile"
#define xvNleftBitmap		"leftBitmap"
#define xvNobjectRef		"objectRef"
#define xvNfixed			"fixed"
#define xvNiconic			"iconic"
#define xvNicon			"icon"
#define xvNopenAtStart		"openAtStart"
#define xvNenabled			"enabled"
#define xvNvisible			"visible"
#define xvNautowrap		"autowrap"
#define xvNwrapmode		"wrapmode"
#define xvNVscrollmode		"Vscrollmode"
#define xvNHscrollmode		"Hscrollmode"
#define xvNresizemode		"resizemode"
#define xvNecho			"echo"
#define xvNctrl			"ctrl"
#define xvNeditmode		"editmode"
#define xvNshapeStype		"shapeStyle"

extern callType* object_call_types[];
extern char * *object_call_names[];
extern int object_call_number[];
extern char* *object_resources[];
extern char* *object_resource_types[];
extern resourceType* object_data_types[];
extern int object_resource_number[];
extern struct resource_store resource_values[];
extern int resource_full;
extern char* *resvallist;
extern Boolean resvalflag;

// ---------------------------------------------
// File Mode defines

#define xvPROJECTLOAD	0
#define xvPROJECTSAVE	1
#define xvFORMLOAD		2
#define xvFORMSAVE		3
#define xvFORMSAVEAS	4

// ---------------------------------------------
// Extern Callbacks

extern void func_dummy(Widget aw, XtPointer client, XtPointer call);
extern void func_exit(Widget aw, XtPointer client, XtPointer call);
extern void func_timer(XtPointer cdata, XtIntervalId *id);

// ---------------------------------------------
// Extern functions in other modules which require global definition

extern void buildControlWindow();
extern void buildToolsWindow();
extern void buildCursorWindow();
extern void buildColourWindow(XtCallbackProc confirm);
extern void buildFontsWindow(XtCallbackProc confirm);
extern void buildPathWindow(XtCallbackProc ok_call);
extern void buildSelectFileWindow(String name, XtCallbackProc okcallback, String mask, Boolean activemask=FALSE, Boolean allowDirchange=TRUE);
extern void buildObjectListWindow(XtCallbackProc execproc);
extern void buildEventsWindow();
extern void buildMenuWindow();
extern void buildCallsWindow(int mode);
extern void openMenuWindow();
extern void buildProjectListWindow();
extern void buildCodeGenWindow();
extern void updateProjectListWindow();
extern void updateCallbackCode(String oldname, String newname);
extern void buildAboutWindow();
extern void buildGridWindow();
extern void openGridWindow();

extern void SetupPropsWindow(objectType xtype, char **resource_vals, Boolean build=FALSE, int obj=-1);
extern void SetupPropertiesList(int obj, Boolean newlist);
extern void openObjectListWindow(objectType listobject, int current);

extern int CreateObject(objectType object);
extern void DeleteNamedObject(String name);
extern void removeSizer();

extern objectType ToolNameToType(char *token);
extern int ObjectByName(String name);
extern int firstAvailableSlot();
extern void SetCounterValue();
extern int findFirstProjectEntry(int which=-1);
extern Pixel stringToPixel(xvCore & object, String colname);
extern int findFirstEditEntry();
extern int findFirstModuleEntry();
extern Boolean UnsavedData();
extern void drawGrid(int obj);

extern void commenceCodeGeneration(Boolean codeonly);
extern void buildProgram(Boolean buildall);
extern void runProgram();

extern void makeNewModule();
extern void loadModule();
extern void saveModule(Boolean saveas);

extern void setEventsData(unsigned long bits);
extern void controlEventsData(Boolean sense);
extern void clearEventsData();
extern void constructVisualMenu(int target, int numberof);

extern void recoverResources(int numres, int thisobj);
extern void setNewResourceValue(Boolean visual=TRUE);
extern void setResourceExec(Boolean visual=TRUE);
extern void execFileAction(int fileAction, String name);

extern void WindowEvent(Widget aw, XtPointer client, register XConfigureEvent *event, Boolean *cont);
extern void enter_call(Widget aw, XtPointer client, register XEnterWindowEvent *event, Boolean *cont);
extern void leave_call(Widget aw, XtPointer client, register XLeaveWindowEvent *event, Boolean *cont);
extern void ObjectButtonEvent(Widget aw, XtPointer client, register XButtonEvent *event, Boolean *cont);

#endif // _Vxvis_h
 xvisual/xvis/xvisCalls.cc100644    765    144       20644  6164233060  14602 0ustar  steveusers
/*     *******************************************************************************
	XVisual GUI Development System for Linux/X-Window
	Copyright (C) 1996 Steve Carrie.

        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.
        ******************************************************************************* */

/* =============================================
	xvis user interface builder for Athena widgets using
	xv class library.

	Calls Segment

	V1.0BETA  - last edited 25/06/96
    ============================================= */

// ---------------------------------------------
// Include file declarations

#include "xvis.h"
#include <string.h>
#include <stdio.h>

// ---------------------------------------------
// Local data

int sel=0;
int local_mode=-1;
int ref_array[20];

// ---------------------------------------------
// local forward function declares

void OpenCallEditWindow();

// --------------------------------------------
// Callbacks

void func_calllist_call(Widget aw, XtPointer client, XtPointer call)
{
	XawListReturnStruct *val=(XawListReturnStruct *) call;
	sel=val->list_index;
	xvisCallList.Close();
	OpenCallEditWindow();
}

void func_callclose(Widget aw, XtPointer client, XtPointer call)
{
	xvisCallList.Close();
}

void editor_ok(Widget aw, XtPointer client, XtPointer call)
{
	char *temp=(char *) client;
	int which;
	sscanf(temp, "%d", &which);
	int obj=editor[which].object;
	int ref=editor[which].ref;
	int mode=editor[which].mode;	

	XtVaGetValues(editor[which].editor->xvEditField::ID(), XtNstring, &temp, NULL);

	switch(mode) {
		case CALLMODE:
			if (objects[obj].callbackcode[ref] != NULL) {
				delete objects[obj].callbackcode[ref];
				objects[obj].callbackcode[ref]=NULL;
			}
			objects[obj].callbackcode[ref]=new char[strlen(temp)+10];
			strcpy(objects[obj].callbackcode[ref], temp);
			break;
		case EVENTMODE:
			if (objects[obj].eventcode[ref] != NULL) {
				delete objects[obj].eventcode[ref];
				objects[obj].eventcode[ref]=NULL;
			}
			objects[obj].eventcode[ref]=new char[strlen(temp)+10];
			strcpy(objects[obj].eventcode[ref], temp);
			break;	
		default:
			break;
	}	
	
	delete editor[which].editor;
	delete editor[which].edit_buffer;
	editor[which].in_use=FALSE;
}

void editor_cancel(Widget aw, XtPointer client, XtPointer call)
{
	char *temp=(char *) client;
	int which;
	sscanf(temp, "%d", &which);
	delete editor[which].editor;
	delete editor[which].edit_buffer;
	editor[which].in_use=FALSE;
}

//---------------------------------------------
// Local Stuff

void buildCalls(String hdr)
{
	char **call_data=object_call_names[CurrentObjectType];
	int call_num=object_call_number[CurrentObjectType];

	for (int i=0; i<call_num; i++) {
		calls_list[num_calls]=call_data[i];
		ref_array[num_calls++]=i;
	}

	strcpy( hdr, "Call List");

}

void buildEvents(String hdr)
{
	for (int i=0; i<NUMEVENTS; i++)
		if ((objects[CurrentObject].events & eventinfo[i].eventbits) != 0) {
			calls_list[num_calls]=eventinfo[i].eventName;
			ref_array[num_calls++]=i;
		}

	strcpy(hdr, "Event List");
}

void buildCallsWindow(int mode)
{
	num_calls=0;
	char header[20];

	local_mode=mode;

	switch (mode) {
		case CALLMODE:
			buildCalls(header);
			break;
		case EVENTMODE:
			buildEvents(header);
			break;
		default:
			break;
	}

	xvisCallList.init(header, xvisControl);

	callform.init("Callform", xvisCallList);
	callform.SetBackground("gray85");
	
	callview.init("callview", callform, TRUE, FALSE, TRUE);
	callview.SetFixedPosition(TRUE);

	calllist.init("calllist", callview, func_calllist_call, 
		num_calls, calls_list, 1);
	calllist.SetHeight(200);
	calllist.SetWidth(200);
	calllist.SetFixedPosition(TRUE);

	callclose.init("Close", callform, func_callclose);
	callclose.SetWidth(80);
	callclose.SetHeight(30);
	callclose.SetRelVertical(callview);
	callclose.SetHorizDistance(60);
	callclose.SetShadow
Results 1 - 1
Help - FTP Sites List - Software Dir.
Searching half a billion files worldwide
© 1997-2009 MARUHN Internet Solutions