#include "CCmdHandler.h"
/*
** Generated by X-Designer
*/
/*
**LIBS: -lXm -lXt -lX11
*/

#include <X11/Xatom.h>
#include <X11/Intrinsic.h>
#include <X11/Shell.h>

#include <Xm/Xm.h>
#include <X11/StringDefs.h>
#include <Xm/CascadeB.h>
#include <Xm/DialogS.h>
#include <Xm/FileSB.h>
#include <Xm/Form.h>
#include <Xm/Label.h>
#include <Xm/List.h>
#include <Xm/MessageB.h>
#include <Xm/PanedW.h>
#include <Xm/PushB.h>
#include <Xm/RowColumn.h>
#include <Xm/ScrollBar.h>
#include <Xm/SelectioB.h>
#include <Xm/Separator.h>
#include <Xm/Text.h>
#include <Xm/TextF.h>
#include <Xm/LabelG.h>
#include <Xm/PushBG.h>
#include <Xm/SeparatoG.h>


#include "CGuru.h"

CGuru_p helpShell = (CGuru_p) NULL;
CAboutBox_p aboutShell = (CAboutBox_p) NULL;
CPrintDialog_p printDialog = (CPrintDialog_p) NULL;
COpenFileDialog_p openFileDialog = (COpenFileDialog_p) NULL;
COpenDbErrorAlert_p cantOpenShell = (COpenDbErrorAlert_p) NULL;
CSysErrorAlert_p sysErrAlert = (CSysErrorAlert_p) NULL;
CFindAlert_p findAlert = (CFindAlert_p) NULL;
CFindDialog_p findDialog = (CFindDialog_p) NULL;
CSaveFileDialog_p saveFileDialog = (CSaveFileDialog_p) NULL;
CHistoryDialog_p historyShell = (CHistoryDialog_p) NULL;

#include <xpm.h>

static _xd_initialised = 0;

typedef struct PixelResources_s { 
	Pixel buttonBackground;
} PixelResources_t, *PixelResources_p;

static PixelResources_t pixel_resources;

static XtResource pixel_resources_defn[] = {
	{
		"buttonBackground", XmCColor, XmRPixel,
		sizeof (Pixel), XtOffset(PixelResources_p, buttonBackground),
		XtRString, "Black"
	},
};

typedef struct PixmapResources_s { 
	Pixmap aboutHelpPixmap;
	Pixmap upArrowIPixmap;
	Pixmap rightArrowIPixmap;
	Pixmap leftArrowIPixmap;
	Pixmap editPasteIPixmap;
	Pixmap editCutIPixmap;
	Pixmap editCopyIPixmap;
	Pixmap fileOpenIPixmap;
	Pixmap fileNewIPixmap;
	Pixmap fileOpenPixmap;
	Pixmap editCopyPixmap;
	Pixmap editCutPixmap;
	Pixmap fileNewPixmap;
	Pixmap editPastePixmap;
	Pixmap helpHelpPixmap;
	Pixmap helpHelpIPixmap;
	Pixmap fileSavePixmap;
	Pixmap fileSaveIPixmap;
	Pixmap filePrintPixmap;
	Pixmap filePrintIPixmap;
	Pixmap rightArrowPixmap;
	Pixmap leftArrowPixmap;
	Pixmap upArrowPixmap;
	Pixmap helpShellPixmap;
	Pixmap helpShellMask;
	Pixmap homePixmap;
	Pixmap homeIPixmap;
} PixmapResources_t, *PixmapResources_p;

static PixmapResources_t pixmap_resources;

#include <HelpPixmaps.cxx>

static void initialise_objects( Widget parent )
{
	XpmAttributes xpm_attributes;

	/* Some code to ensure that the pixmaps look OK even if the
	   color map is full or nearly so: */
	xpm_attributes.valuemask = XpmCloseness;
	xpm_attributes.closeness = 40000;
	if ( _xd_initialised ) return;
	_xd_initialised = 1;
	while ( XtParent ( parent ) )
		parent = XtParent ( parent );
	if (DefaultDepthOfScreen(DefaultScreenOfDisplay(XtDisplay(parent))) != 1) {
	XtGetApplicationResources(parent, &pixel_resources, pixel_resources_defn, XtNumber(pixel_resources_defn), (ArgList)0, 0);
	}
	xpm_attributes.valuemask = XpmColorSymbols | xpm_attributes.valuemask;
	xpm_attributes.colorsymbols = (XpmColorSymbol *) XtMalloc ( sizeof ( XpmColorSymbol ) * 1 );
	xpm_attributes.numsymbols = 1;
	xpm_attributes.colorsymbols[ 0].name = "buttonBackground";
	xpm_attributes.colorsymbols[ 0].value = NULL;
	xpm_attributes.colorsymbols[ 0].pixel = pixel_resources.buttonBackground;
	if ( XpmCreatePixmapFromData( XtDisplay( parent ), DefaultRootWindow( XtDisplay( parent ) ), aboutHelpPixmap_icon, &pixmap_resources.aboutHelpPixmap, NULL, &xpm_attributes ) != 0 )
		pixmap_resources.aboutHelpPixmap = XmUNSPECIFIED_PIXMAP;
	if ( XpmCreatePixmapFromData( XtDisplay( parent ), DefaultRootWindow( XtDisplay( parent ) ), upArrowIPixmap_icon, &pixmap_resources.upArrowIPixmap, NULL, &xpm_attributes ) != 0 )
		pixmap_resources.upArrowIPixmap = XmUNSPECIFIED_PIXMAP;
	if ( XpmCreatePixmapFromData( XtDisplay( parent ), DefaultRootWindow( XtDisplay( parent ) ), rightArrowIPixmap_icon, &pixmap_resources.rightArrowIPixmap, NULL, &xpm_attributes ) != 0 )
		pixmap_resources.rightArrowIPixmap = XmUNSPECIFIED_PIXMAP;
	if ( XpmCreatePixmapFromData( XtDisplay( parent ), DefaultRootWindow( XtDisplay( parent ) ), leftArrowIPixmap_icon, &pixmap_resources.leftArrowIPixmap, NULL, &xpm_attributes ) != 0 )
		pixmap_resources.leftArrowIPixmap = XmUNSPECIFIED_PIXMAP;
	if ( XpmCreatePixmapFromData( XtDisplay( parent ), DefaultRootWindow( XtDisplay( parent ) ), editPasteIPixmap_icon, &pixmap_resources.editPasteIPixmap, NULL, &xpm_attributes ) != 0 )
		pixmap_resources.editPasteIPixmap = XmUNSPECIFIED_PIXMAP;
	if ( XpmCreatePixmapFromData( XtDisplay( parent ), DefaultRootWindow( XtDisplay( parent ) ), editCutIPixmap_icon, &pixmap_resources.editCutIPixmap, NULL, &xpm_attributes ) != 0 )
		pixmap_resources.editCutIPixmap = XmUNSPECIFIED_PIXMAP;
	if ( XpmCreatePixmapFromData( XtDisplay( parent ), DefaultRootWindow( XtDisplay( parent ) ), editCopyIPixmap_icon, &pixmap_resources.editCopyIPixmap, NULL, &xpm_attributes ) != 0 )
		pixmap_resources.editCopyIPixmap = XmUNSPECIFIED_PIXMAP;
	if ( XpmCreatePixmapFromData( XtDisplay( parent ), DefaultRootWindow( XtDisplay( parent ) ), fileOpenIPixmap_icon, &pixmap_resources.fileOpenIPixmap, NULL, &xpm_attributes ) != 0 )
		pixmap_resources.fileOpenIPixmap = XmUNSPECIFIED_PIXMAP;
	if ( XpmCreatePixmapFromData( XtDisplay( parent ), DefaultRootWindow( XtDisplay( parent ) ), fileNewIPixmap_icon, &pixmap_resources.fileNewIPixmap, NULL, &xpm_attributes ) != 0 )
		pixmap_resources.fileNewIPixmap = XmUNSPECIFIED_PIXMAP;
	if ( XpmCreatePixmapFromData( XtDisplay( parent ), DefaultRootWindow( XtDisplay( parent ) ), fileOpenPixmap_icon, &pixmap_resources.fileOpenPixmap, NULL, &xpm_attributes ) != 0 )
		pixmap_resources.fileOpenPixmap = XmUNSPECIFIED_PIXMAP;
	if ( XpmCreatePixmapFromData( XtDisplay( parent ), DefaultRootWindow( XtDisplay( parent ) ), editCopyPixmap_icon, &pixmap_resources.editCopyPixmap, NULL, &xpm_attributes ) != 0 )
		pixmap_resources.editCopyPixmap = XmUNSPECIFIED_PIXMAP;
	if ( XpmCreatePixmapFromData( XtDisplay( parent ), DefaultRootWindow( XtDisplay( parent ) ), editCutPixmap_icon, &pixmap_resources.editCutPixmap, NULL, &xpm_attributes ) != 0 )
		pixmap_resources.editCutPixmap = XmUNSPECIFIED_PIXMAP;
	if ( XpmCreatePixmapFromData( XtDisplay( parent ), DefaultRootWindow( XtDisplay( parent ) ), fileNewPixmap_icon, &pixmap_resources.fileNewPixmap, NULL, &xpm_attributes ) != 0 )
		pixmap_resources.fileNewPixmap = XmUNSPECIFIED_PIXMAP;
	if ( XpmCreatePixmapFromData( XtDisplay( parent ), DefaultRootWindow( XtDisplay( parent ) ), editPastePixmap_icon, &pixmap_resources.editPastePixmap, NULL, &xpm_attributes ) != 0 )
		pixmap_resources.editPastePixmap = XmUNSPECIFIED_PIXMAP;
	if ( XpmCreatePixmapFromData( XtDisplay( parent ), DefaultRootWindow( XtDisplay( parent ) ), helpHelpPixmap_icon, &pixmap_resources.helpHelpPixmap, NULL, &xpm_attributes ) != 0 )
		pixmap_resources.helpHelpPixmap = XmUNSPECIFIED_PIXMAP;
	if ( XpmCreatePixmapFromData( XtDisplay( parent ), DefaultRootWindow( XtDisplay( parent ) ), helpHelpIPixmap_icon, &pixmap_resources.helpHelpIPixmap, NULL, &xpm_attributes ) != 0 )
		pixmap_resources.helpHelpIPixmap = XmUNSPECIFIED_PIXMAP;
	if ( XpmCreatePixmapFromData( XtDisplay( parent ), DefaultRootWindow( XtDisplay( parent ) ), fileSavePixmap_icon, &pixmap_resources.fileSavePixmap, NULL, &xpm_attributes ) != 0 )
		pixmap_resources.fileSavePixmap = XmUNSPECIFIED_PIXMAP;
	if ( XpmCreatePixmapFromData( XtDisplay( parent ), DefaultRootWindow( XtDisplay( parent ) ), fileSaveIPixmap_icon, &pixmap_resources.fileSaveIPixmap, NULL, &xpm_attributes ) != 0 )
		pixmap_resources.fileSaveIPixmap = XmUNSPECIFIED_PIXMAP;
	if ( XpmCreatePixmapFromData( XtDisplay( parent ), DefaultRootWindow( XtDisplay( parent ) ), filePrintPixmap_icon, &pixmap_resources.filePrintPixmap, NULL, &xpm_attributes ) != 0 )
		pixmap_resources.filePrintPixmap = XmUNSPECIFIED_PIXMAP;
	if ( XpmCreatePixmapFromData( XtDisplay( parent ), DefaultRootWindow( XtDisplay( parent ) ), filePrintIPixmap_icon, &pixmap_resources.filePrintIPixmap, NULL, &xpm_attributes ) != 0 )
		pixmap_resources.filePrintIPixmap = XmUNSPECIFIED_PIXMAP;
	if ( XpmCreatePixmapFromData( XtDisplay( parent ), DefaultRootWindow( XtDisplay( parent ) ), rightArrowPixmap_icon, &pixmap_resources.rightArrowPixmap, NULL, &xpm_attributes ) != 0 )
		pixmap_resources.rightArrowPixmap = XmUNSPECIFIED_PIXMAP;
	if ( XpmCreatePixmapFromData( XtDisplay( parent ), DefaultRootWindow( XtDisplay( parent ) ), leftArrowPixmap_icon, &pixmap_resources.leftArrowPixmap, NULL, &xpm_attributes ) != 0 )
		pixmap_resources.leftArrowPixmap = XmUNSPECIFIED_PIXMAP;
	if ( XpmCreatePixmapFromData( XtDisplay( parent ), DefaultRootWindow( XtDisplay( parent ) ), upArrowPixmap_icon, &pixmap_resources.upArrowPixmap, NULL, &xpm_attributes ) != 0 )
		pixmap_resources.upArrowPixmap = XmUNSPECIFIED_PIXMAP;
	if ( XpmCreatePixmapFromData( XtDisplay( parent ), DefaultRootWindow( XtDisplay( parent ) ), helpShellPixmap_icon, &pixmap_resources.helpShellPixmap, NULL, &xpm_attributes ) != 0 )
		pixmap_resources.helpShellPixmap = XmUNSPECIFIED_PIXMAP;
	if ( XpmCreatePixmapFromData( XtDisplay( parent ), DefaultRootWindow( XtDisplay( parent ) ), helpShellMask_icon, &pixmap_resources.helpShellMask, NULL, &xpm_attributes ) != 0 )
		pixmap_resources.helpShellMask = XmUNSPECIFIED_PIXMAP;
	if ( XpmCreatePixmapFromData( XtDisplay( parent ), DefaultRootWindow( XtDisplay( parent ) ), homePixmap_icon, &pixmap_resources.homePixmap, NULL, &xpm_attributes ) != 0 )
		pixmap_resources.homePixmap = XmUNSPECIFIED_PIXMAP;
	if ( XpmCreatePixmapFromData( XtDisplay( parent ), DefaultRootWindow( XtDisplay( parent ) ), homeIPixmap_icon, &pixmap_resources.homeIPixmap, NULL, &xpm_attributes ) != 0 )
		pixmap_resources.homeIPixmap = XmUNSPECIFIED_PIXMAP;
	XtFree ( (char *) xpm_attributes.colorsymbols );
}


void CStatusBar::create (Widget parent, char *widget_name)
{
	Widget children[1];      /* Children to manage */
	Arg al[64];                    /* Arg List */
	register int ac = 0;           /* Arg Count */

	if ( !widget_name )
		widget_name = "statusBar";

	XtSetArg(al[ac], XmNspacing, 0); ac++;
	XtSetArg(al[ac], XmNorientation, XmHORIZONTAL); ac++;
	statusBar = XmCreateRowColumn ( parent, widget_name, al, ac );
	ac = 0;
	_xd_rootwidget = statusBar;
	statusLabel = XmCreateLabel ( statusBar, "statusLabel", al, ac );
	children[ac++] = statusLabel;
	XtManageChildren(children, ac);
	ac = 0;
}

void CGuru::create (Display *display, char *app_name, int app_argc, char **app_argv, char *app_class_name)
{
	Widget children[14];      /* Children to manage */
	Arg al[64];                    /* Arg List */
	register int ac = 0;           /* Arg Count */
	XrmValue from_value, to_value; /* For resource conversion */
	Widget separator7 = (Widget)NULL;
	Widget separator8 = (Widget)NULL;
	Widget separator9 = (Widget)NULL;
	Widget separator10 = (Widget)NULL;
	Widget separator11 = (Widget)NULL;
	Widget separator12 = (Widget)NULL;
	Widget separator13 = (Widget)NULL;
	Widget separator14 = (Widget)NULL;
	Widget separator15 = (Widget)NULL;
	Widget separator16 = (Widget)NULL;
	Widget form5 = (Widget)NULL;
	Widget scrolledText1 = (Widget)NULL;
	Widget scrollbar7 = (Widget)NULL;
	Widget form7 = (Widget)NULL;
	Widget scrolledList3 = (Widget)NULL;
	Widget scrollbar8 = (Widget)NULL;
	Widget scrollbar9 = (Widget)NULL;
	helpDir = 0 ;
	if ( !app_class_name )
		app_class_name = "visu_help";

	XtSetArg(al[ac], XmNallowShellResize, TRUE); ac++;
	XtSetArg(al[ac], XmNargc, app_argc); ac++;
	XtSetArg(al[ac], XmNargv, app_argv); ac++;
	helpShell = XtAppCreateShell ( app_name, app_class_name, applicationShellWidgetClass, display, al, ac );
	ac = 0;
	_xd_rootwidget = helpShell;
	initialise_objects ( helpShell );
	XtSetArg(al[ac], XmNiconMask, pixmap_resources.helpShellMask); ac++;
	XtSetArg(al[ac], XmNiconPixmap, pixmap_resources.helpShellPixmap); ac++;
	XtSetValues ( helpShell,al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNresizePolicy, XmRESIZE_NONE); ac++;
	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
	mainForm = XmCreateForm ( helpShell, "mainForm", al, ac );
	ac = 0;
	menuBar = XmCreateMenuBar ( mainForm, "menuBar", al, ac );
	fileCB = XmCreateCascadeButton ( menuBar, "fileCB", al, ac );
	fileMenu = XmCreatePulldownMenu ( menuBar, "fileMenu", al, ac );
	XtSetArg(al[ac], XmNsensitive, FALSE); ac++;
	fileNewItem = XmCreatePushButton ( fileMenu, "fileNewItem", al, ac );
	ac = 0;
	fileOpenItem = XmCreatePushButton ( fileMenu, "fileOpenItem", al, ac );
	fileCloseItem = XmCreatePushButton ( fileMenu, "fileCloseItem", al, ac );
	separator7 = XmCreateSeparator ( fileMenu, "separator7", al, ac );
	fileSaveItem = XmCreatePushButton ( fileMenu, "fileSaveItem", al, ac );
	fileSaveAsItem = XmCreatePushButton ( fileMenu, "fileSaveAsItem", al, ac );
	fileRevertItem = XmCreatePushButton ( fileMenu, "fileRevertItem", al, ac );
	separator8 = XmCreateSeparator ( fileMenu, "separator8", al, ac );
	filePrintItem = XmCreatePushButton ( fileMenu, "filePrintItem", al, ac );
	separator9 = XmCreateSeparator ( fileMenu, "separator9", al, ac );
	fileQuitItem = XmCreatePushButton ( fileMenu, "fileQuitItem", al, ac );
	editCB = XmCreateCascadeButton ( menuBar, "editCB", al, ac );
	editMenu = XmCreatePulldownMenu ( menuBar, "editMenu", al, ac );
	editUndoItem = XmCreatePushButton ( editMenu, "editUndoItem", al, ac );
	separator10 = XmCreateSeparator ( editMenu, "separator10", al, ac );
	editCutItem = XmCreatePushButton ( editMenu, "editCutItem", al, ac );
	editCopyItem = XmCreatePushButton ( editMenu, "editCopyItem", al, ac );
	editPasteItem = XmCreatePushButton ( editMenu, "editPasteItem", al, ac );
	separator11 = XmCreateSeparator ( editMenu, "separator11", al, ac );
	editClearItem = XmCreatePushButton ( editMenu, "editClearItem", al, ac );
	navCB = XmCreateCascadeButton ( menuBar, "navCB", al, ac );
	navMenu = XmCreatePulldownMenu ( menuBar, "navMenu", al, ac );
	navBackItem = XmCreatePushButton ( navMenu, "navBackItem", al, ac );
	navForwardItem = XmCreatePushButton ( navMenu, "navForwardItem", al, ac );
	navIndexItem = XmCreatePushButton ( navMenu, "navIndexItem", al, ac );
	separator12 = XmCreateSeparator ( navMenu, "separator12", al, ac );
	navHistoryItem = XmCreatePushButton ( navMenu, "navHistoryItem", al, ac );
	separator13 = XmCreateSeparator ( navMenu, "separator13", al, ac );
	navFindItem = XmCreatePushButton ( navMenu, "navFindItem", al, ac );
	helpCB = XmCreateCascadeButton ( menuBar, "helpCB", al, ac );
	helpMenu = XmCreatePulldownMenu ( menuBar, "helpMenu", al, ac );
	helpOnVersionItem = XmCreatePushButton ( helpMenu, "helpOnVersionItem", al, ac );
	helpIndexItem = XmCreatePushButton ( helpMenu, "helpIndexItem", al, ac );
	XtSetArg(al[ac], XmNmenuHelpWidget, helpCB); ac++;
	XtSetValues ( menuBar,al, ac );
	ac = 0;
	statusBar->create ( mainForm, "statusBar" );
	XtSetArg(al[ac], XmNspacing, 0); ac++;
	XtSetArg(al[ac], XmNorientation, XmHORIZONTAL); ac++;
	XtSetArg(al[ac], XmNpacking, XmPACK_TIGHT); ac++;
	toolBar = XmCreateRowColumn ( mainForm, "toolBar", al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNsensitive, FALSE); ac++;
	XtSetArg(al[ac], XmNbackground, pixel_resources.buttonBackground); ac++;
	XtSetArg(al[ac], XmNlabelType, XmPIXMAP); ac++;
	newButton = XmCreatePushButton ( toolBar, "newButton", al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNlabelPixmap, pixmap_resources.fileNewPixmap); ac++;
	XtSetArg(al[ac], XmNlabelInsensitivePixmap, pixmap_resources.fileNewIPixmap); ac++;
	XtSetValues ( newButton,al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNbackground, pixel_resources.buttonBackground); ac++;
	XtSetArg(al[ac], XmNlabelType, XmPIXMAP); ac++;
	openButton = XmCreatePushButton ( toolBar, "openButton", al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNlabelPixmap, pixmap_resources.fileOpenPixmap); ac++;
	XtSetArg(al[ac], XmNlabelInsensitivePixmap, pixmap_resources.fileOpenIPixmap); ac++;
	XtSetValues ( openButton,al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNbackground, pixel_resources.buttonBackground); ac++;
	XtSetArg(al[ac], XmNlabelType, XmPIXMAP); ac++;
	saveButton = XmCreatePushButton ( toolBar, "saveButton", al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNlabelPixmap, pixmap_resources.fileSavePixmap); ac++;
	XtSetArg(al[ac], XmNlabelInsensitivePixmap, pixmap_resources.fileSaveIPixmap); ac++;
	XtSetValues ( saveButton,al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNbackground, pixel_resources.buttonBackground); ac++;
	XtSetArg(al[ac], XmNlabelType, XmPIXMAP); ac++;
	printButton = XmCreatePushButton ( toolBar, "printButton", al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNlabelPixmap, pixmap_resources.filePrintPixmap); ac++;
	XtSetArg(al[ac], XmNlabelInsensitivePixmap, pixmap_resources.filePrintIPixmap); ac++;
	XtSetValues ( printButton,al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNwidth, 4); ac++;
	XtSetArg(al[ac], XmNseparatorType, XmNO_LINE); ac++;
	XtSetArg(al[ac], XmNorientation, XmVERTICAL); ac++;
	XtSetArg(al[ac], XmNmargin, 0); ac++;
	separator14 = XmCreateSeparatorGadget ( toolBar, "separator14", al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNbackground, pixel_resources.buttonBackground); ac++;
	XtSetArg(al[ac], XmNlabelType, XmPIXMAP); ac++;
	cutButton = XmCreatePushButton ( toolBar, "cutButton", al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNlabelPixmap, pixmap_resources.editCutPixmap); ac++;
	XtSetArg(al[ac], XmNlabelInsensitivePixmap, pixmap_resources.editCutIPixmap); ac++;
	XtSetValues ( cutButton,al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNbackground, pixel_resources.buttonBackground); ac++;
	XtSetArg(al[ac], XmNlabelType, XmPIXMAP); ac++;
	copyButton = XmCreatePushButton ( toolBar, "copyButton", al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNlabelPixmap, pixmap_resources.editCopyPixmap); ac++;
	XtSetArg(al[ac], XmNlabelInsensitivePixmap, pixmap_resources.editCopyIPixmap); ac++;
	XtSetValues ( copyButton,al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNbackground, pixel_resources.buttonBackground); ac++;
	XtSetArg(al[ac], XmNlabelType, XmPIXMAP); ac++;
	pasteButton = XmCreatePushButton ( toolBar, "pasteButton", al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNlabelPixmap, pixmap_resources.editPastePixmap); ac++;
	XtSetArg(al[ac], XmNlabelInsensitivePixmap, pixmap_resources.editPasteIPixmap); ac++;
	XtSetValues ( pasteButton,al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNwidth, 4); ac++;
	XtSetArg(al[ac], XmNseparatorType, XmNO_LINE); ac++;
	XtSetArg(al[ac], XmNorientation, XmVERTICAL); ac++;
	XtSetArg(al[ac], XmNmargin, 0); ac++;
	separator15 = XmCreateSeparatorGadget ( toolBar, "separator15", al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNbackground, pixel_resources.buttonBackground); ac++;
	XtSetArg(al[ac], XmNlabelType, XmPIXMAP); ac++;
	backButton = XmCreatePushButton ( toolBar, "backButton", al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNlabelPixmap, pixmap_resources.leftArrowPixmap); ac++;
	XtSetArg(al[ac], XmNlabelInsensitivePixmap, pixmap_resources.leftArrowIPixmap); ac++;
	XtSetValues ( backButton,al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNbackground, pixel_resources.buttonBackground); ac++;
	XtSetArg(al[ac], XmNlabelType, XmPIXMAP); ac++;
	forwardButton = XmCreatePushButton ( toolBar, "forwardButton", al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNlabelPixmap, pixmap_resources.rightArrowPixmap); ac++;
	XtSetArg(al[ac], XmNlabelInsensitivePixmap, pixmap_resources.rightArrowIPixmap); ac++;
	XtSetValues ( forwardButton,al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNbackground, pixel_resources.buttonBackground); ac++;
	XtSetArg(al[ac], XmNlabelType, XmPIXMAP); ac++;
	firstButton = XmCreatePushButton ( toolBar, "firstButton", al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNlabelPixmap, pixmap_resources.homePixmap); ac++;
	XtSetArg(al[ac], XmNlabelInsensitivePixmap, pixmap_resources.homeIPixmap); ac++;
	XtSetValues ( firstButton,al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNwidth, 4); ac++;
	XtSetArg(al[ac], XmNseparatorType, XmNO_LINE); ac++;
	XtSetArg(al[ac], XmNorientation, XmVERTICAL); ac++;
	XtSetArg(al[ac], XmNmargin, 0); ac++;
	separator16 = XmCreateSeparatorGadget ( toolBar, "separator16", al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNbackground, pixel_resources.buttonBackground); ac++;
	XtSetArg(al[ac], XmNlabelType, XmPIXMAP); ac++;
	tb_helpButton = XmCreatePushButton ( toolBar, "helpButton", al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNlabelPixmap, pixmap_resources.helpHelpPixmap); ac++;
	XtSetArg(al[ac], XmNlabelInsensitivePixmap, pixmap_resources.helpHelpIPixmap); ac++;
	XtSetValues ( tb_helpButton,al, ac );
	ac = 0;
	panedWindow = XmCreatePanedWindow ( mainForm, "panedWindow", al, ac );
	XtSetArg(al[ac], XmNpaneMinimum, 64); ac++;
	XtSetArg(al[ac], XmNwidth, 350); ac++;
	XtSetArg(al[ac], XmNheight, 300); ac++;
	form5 = XmCreateForm ( panedWindow, "form5", al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNcolumns, 45); ac++;
	XtSetArg(al[ac], XmNeditable, FALSE); ac++;
	XtSetArg(al[ac], XmNresizeHeight, TRUE); ac++;
	XtSetArg(al[ac], XmNresizeWidth, TRUE); ac++;
	XtSetArg(al[ac], XmNeditMode, XmMULTI_LINE_EDIT); ac++;
	XtSetArg(al[ac], XmNwordWrap, TRUE); ac++;
	XtSetArg(al[ac], XmNscrollHorizontal, FALSE); ac++;
	helpText = XmCreateScrolledText ( form5, "helpText", al, ac );
	ac = 0;
	scrolledText1 = XtParent ( helpText );

	XtSetArg(al[ac], XmNverticalScrollBar, &scrollbar7 ); ac++;
	XtGetValues(scrolledText1, al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNcolumns, 30); ac++;
	XtSetArg(al[ac], XmNeditable, FALSE); ac++;
	titleText = XmCreateTextField ( form5, "titleText", al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNpaneMinimum, 125); ac++;
	form7 = XmCreateForm ( panedWindow, "form7", al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNselectionPolicy, XmBROWSE_SELECT); ac++;
	XtSetArg(al[ac], XmNlistSizePolicy, XmRESIZE_IF_POSSIBLE); ac++;
	linksList = XmCreateScrolledList ( form7, "linksList", al, ac );
	ac = 0;
	scrolledList3 = XtParent ( linksList );

	XtSetArg(al[ac], XmNhorizontalScrollBar, &scrollbar8 ); ac++;
	XtSetArg(al[ac], XmNverticalScrollBar, &scrollbar9 ); ac++;
	XtGetValues(scrolledList3, al, ac );
	ac = 0;
	linksLabel = XmCreateLabel ( form7, "linksLabel", al, ac );

	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNtopOffset, 0); ac++;
	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNleftOffset, 0); ac++;
	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNrightOffset, 0); ac++;
	XtSetValues ( menuBar,al, ac );
	ac = 0;

	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_NONE); ac++;
	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNbottomOffset, 0); ac++;
	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNleftOffset, 0); ac++;
	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNrightOffset, 0); ac++;
	XtSetValues ( statusBar->xd_rootwidget(),al, ac );
	ac = 0;

	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
	XtSetArg(al[ac], XmNtopOffset, 0); ac++;
	XtSetArg(al[ac], XmNtopWidget, menuBar); ac++;
	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNleftOffset, 0); ac++;
	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNrightOffset, 0); ac++;
	XtSetValues ( toolBar,al, ac );
	ac = 0;

	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
	XtSetArg(al[ac], XmNtopOffset, 0); ac++;
	XtSetArg(al[ac], XmNtopWidget, toolBar); ac++;
	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_WIDGET); ac++;
	XtSetArg(al[ac], XmNbottomOffset, 0); ac++;
	XtSetArg(al[ac], XmNbottomWidget, statusBar->xd_rootwidget()); ac++;
	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNrightOffset, 0); ac++;
	XtSetValues ( panedWindow,al, ac );
	ac = 0;
	UpdateUI();	XtAddCallback (fileNewItem, XmNdisarmCallback, OnUnsetStatus, (XtPointer) this);
	XtAddCallback (fileNewItem, XmNarmCallback, OnSetStatus, (XtPointer) this);
	XtAddCallback (fileNewItem, XmNactivateCallback, OnFileNew, (XtPointer) this);
	XtAddCallback (fileOpenItem, XmNdisarmCallback, OnUnsetStatus, (XtPointer) this);
	XtAddCallback (fileOpenItem, XmNarmCallback, OnSetStatus, (XtPointer) this);
	XtAddCallback (fileOpenItem, XmNactivateCallback, OnFileOpen, (XtPointer) this);
	XtAddCallback (fileCloseItem, XmNdisarmCallback, OnUnsetStatus, (XtPointer) this);
	XtAddCallback (fileCloseItem, XmNarmCallback, OnSetStatus, (XtPointer) this);
	XtAddCallback (fileCloseItem, XmNactivateCallback, OnFileClose, (XtPointer) this);
	XtAddCallback (fileSaveItem, XmNdisarmCallback, OnUnsetStatus, (XtPointer) this);
	XtAddCallback (fileSaveItem, XmNarmCallback, OnSetStatus, (XtPointer) this);
	XtAddCallback (fileSaveItem, XmNactivateCallback, OnFileSave, (XtPointer) this);
	XtAddCallback (fileSaveAsItem, XmNdisarmCallback, OnUnsetStatus, (XtPointer) this);
	XtAddCallback (fileSaveAsItem, XmNarmCallback, OnSetStatus, (XtPointer) this);
	XtAddCallback (fileSaveAsItem, XmNactivateCallback, OnFileSaveAs, (XtPointer) this);
	XtAddCallback (fileRevertItem, XmNdisarmCallback, OnUnsetStatus, (XtPointer) this);
	XtAddCallback (fileRevertItem, XmNarmCallback, OnSetStatus, (XtPointer) this);
	XtAddCallback (fileRevertItem, XmNactivateCallback, OnFileRevert, (XtPointer) this);
	XtAddCallback (filePrintItem, XmNdisarmCallback, OnUnsetStatus, (XtPointer) this);
	XtAddCallback (filePrintItem, XmNarmCallback, OnSetStatus, (XtPointer) this);
	XtAddCallback (filePrintItem, XmNactivateCallback, OnFilePrint, (XtPointer) this);
	XtAddCallback (fileQuitItem, XmNdisarmCallback, OnUnsetStatus, (XtPointer) this);
	XtAddCallback (fileQuitItem, XmNarmCallback, OnSetStatus, (XtPointer) this);
	XtAddCallback (fileQuitItem, XmNactivateCallback, OnFileQuit, (XtPointer) this);
	children[ac++] = fileOpenItem;
	children[ac++] = filePrintItem;
	children[ac++] = separator9;
	children[ac++] = fileQuitItem;
	XtManageChildren(children, ac);
	ac = 0;
	XtSetArg(al[ac], XmNsubMenuId, fileMenu); ac++;
	XtSetValues ( fileCB, al, ac );
	ac = 0;
	XtAddCallback (editUndoItem, XmNdisarmCallback, OnUnsetStatus, (XtPointer) this);
	XtAddCallback (editUndoItem, XmNarmCallback, OnSetStatus, (XtPointer) this);
	XtAddCallback (editUndoItem, XmNactivateCallback, OnEditUndo, (XtPointer) this);
	XtAddCallback (editCutItem, XmNdisarmCallback, OnUnsetStatus, (XtPointer) this);
	XtAddCallback (editCutItem, XmNarmCallback, OnSetStatus, (XtPointer) this);
	XtAddCallback (editCutItem, XmNactivateCallback, OnEditCut, (XtPointer) this);
	XtAddCallback (editCopyItem, XmNdisarmCallback, OnUnsetStatus, (XtPointer) this);
	XtAddCallback (editCopyItem, XmNarmCallback, OnSetStatus, (XtPointer) this);
	XtAddCallback (editCopyItem, XmNactivateCallback, OnEditCopy, (XtPointer) this);
	XtAddCallback (editPasteItem, XmNdisarmCallback, OnUnsetStatus, (XtPointer) this);
	XtAddCallback (editPasteItem, XmNarmCallback, OnSetStatus, (XtPointer) this);
	XtAddCallback (editPasteItem, XmNactivateCallback, OnEditPaste, (XtPointer) this);
	XtAddCallback (editClearItem, XmNdisarmCallback, OnUnsetStatus, (XtPointer) this);
	XtAddCallback (editClearItem, XmNarmCallback, OnSetStatus, (XtPointer) this);
	XtAddCallback (editClearItem, XmNactivateCallback, OnEditClear, (XtPointer) this);
	children[ac++] = editCopyItem;
	XtManageChildren(children, ac);
	ac = 0;
	XtSetArg(al[ac], XmNsubMenuId, editMenu); ac++;
	XtSetValues ( editCB, al, ac );
	ac = 0;
	XtAddCallback (navBackItem, XmNdisarmCallback, OnUnsetStatus, (XtPointer) this);
	XtAddCallback (navBackItem, XmNarmCallback, OnSetStatus, (XtPointer) this);
	XtAddCallback (navBackItem, XmNactivateCallback, OnNavBack, (XtPointer) this);
	XtAddCallback (navForwardItem, XmNdisarmCallback, OnUnsetStatus, (XtPointer) this);
	XtAddCallback (navForwardItem, XmNarmCallback, OnSetStatus, (XtPointer) this);
	XtAddCallback (navForwardItem, XmNactivateCallback, OnNavForward, (XtPointer) this);
	XtAddCallback (navIndexItem, XmNdisarmCallback, OnUnsetStatus, (XtPointer) this);
	XtAddCallback (navIndexItem, XmNarmCallback, OnSetStatus, (XtPointer) this);
	XtAddCallback (navIndexItem, XmNactivateCallback, OnNavIndex, (XtPointer) this);
	XtAddCallback (navHistoryItem, XmNdisarmCallback, OnUnsetStatus, (XtPointer) this);
	XtAddCallback (navHistoryItem, XmNarmCallback, OnSetStatus, (XtPointer) this);
	XtAddCallback (navHistoryItem, XmNactivateCallback, OnNavHistory, (XtPointer) this);
	XtAddCallback (navFindItem, XmNdisarmCallback, OnUnsetStatus, (XtPointer) this);
	XtAddCallback (navFindItem, XmNarmCallback, OnSetStatus, (XtPointer) this);
	XtAddCallback (navFindItem, XmNactivateCallback, OnFind, (XtPointer) this);
	children[ac++] = navBackItem;
	children[ac++] = navForwardItem;
	children[ac++] = navIndexItem;
	children[ac++] = separator12;
	children[ac++] = navHistoryItem;
	children[ac++] = separator13;
	children[ac++] = navFindItem;
	XtManageChildren(children, ac);
	ac = 0;
	XtSetArg(al[ac], XmNsubMenuId, navMenu); ac++;
	XtSetValues ( navCB, al, ac );
	ac = 0;
	XtAddCallback (helpOnVersionItem, XmNdisarmCallback, OnUnsetStatus, (XtPointer) this);
	XtAddCallback (helpOnVersionItem, XmNarmCallback, OnSetStatus, (XtPointer) this);
	XtAddCallback (helpOnVersionItem, XmNactivateCallback, OnHelpVersion, (XtPointer) this);
	XtAddCallback (helpIndexItem, XmNactivateCallback, OnHelpIndex, (XtPointer) this);
	XtAddCallback (helpIndexItem, XmNdisarmCallback, OnUnsetStatus, (XtPointer) this);
	XtAddCallback (helpIndexItem, XmNarmCallback, OnSetStatus, (XtPointer) this);
	children[ac++] = helpOnVersionItem;
	children[ac++] = helpIndexItem;
	XtManageChildren(children, ac);
	ac = 0;
	XtSetArg(al[ac], XmNsubMenuId, helpMenu); ac++;
	XtSetValues ( helpCB, al, ac );
	ac = 0;
	children[ac++] = fileCB;
	children[ac++] = editCB;
	children[ac++] = navCB;
	children[ac++] = helpCB;
	XtManageChildren(children, ac);
	ac = 0;
	XtAddCallback (newButton, XmNactivateCallback, OnFileNew, (XtPointer) this);
	XtAddCallback (newButton, XmNarmCallback, OnSetStatus, (XtPointer) this);
	XtAddCallback (newButton, XmNdisarmCallback, OnUnsetStatus, (XtPointer) this);
	XtAddCallback (openButton, XmNarmCallback, OnSetStatus, (XtPointer) this);
	XtAddCallback (openButton, XmNdisarmCallback, OnUnsetStatus, (XtPointer) this);
	XtAddCallback (openButton, XmNactivateCallback, OnFileOpen, (XtPointer) this);
	XtAddCallback (saveButton, XmNarmCallback, OnSetStatus, (XtPointer) this);
	XtAddCallback (saveButton, XmNdisarmCallback, OnUnsetStatus, (XtPointer) this);
	XtAddCallback (saveButton, XmNactivateCallback, OnFileSave, (XtPointer) this);
	XtAddCallback (printButton, XmNarmCallback, OnSetStatus, (XtPointer) this);
	XtAddCallback (printButton, XmNdisarmCallback, OnUnsetStatus, (XtPointer) this);
	XtAddCallback (printButton, XmNactivateCallback, OnFilePrint, (XtPointer) this);
	XtAddCallback (cutButton, XmNdisarmCallback, OnUnsetStatus, (XtPointer) this);
	XtAddCallback (cutButton, XmNhelpCallback, OnSetStatus, (XtPointer) this);
	XtAddCallback (cutButton, XmNarmCallback, OnSetStatus, (XtPointer) this);
	XtAddCallback (cutButton, XmNactivateCallback, OnEditCut, (XtPointer) this);
	XtAddCallback (copyButton, XmNarmCallback, OnSetStatus, (XtPointer) this);
	XtAddCallback (copyButton, XmNdisarmCallback, OnUnsetStatus, (XtPointer) this);
	XtAddCallback (copyButton, XmNactivateCallback, OnEditCopy, (XtPointer) this);
	XtAddCallback (pasteButton, XmNarmCallback, OnSetStatus, (XtPointer) this);
	XtAddCallback (pasteButton, XmNdisarmCallback, OnUnsetStatus, (XtPointer) this);
	XtAddCallback (pasteButton, XmNactivateCallback, OnEditPaste, (XtPointer) this);
	XtAddCallback (backButton, XmNarmCallback, OnSetStatus, (XtPointer) this);
	XtAddCallback (backButton, XmNdisarmCallback, OnUnsetStatus, (XtPointer) this);
	XtAddCallback (backButton, XmNactivateCallback, OnNavBack, (XtPointer) this);
	XtAddCallback (forwardButton, XmNarmCallback, OnSetStatus, (XtPointer) this);
	XtAddCallback (forwardButton, XmNdisarmCallback, OnUnsetStatus, (XtPointer) this);
	XtAddCallback (forwardButton, XmNactivateCallback, OnNavForward, (XtPointer) this);
	XtAddCallback (firstButton, XmNarmCallback, OnSetStatus, (XtPointer) this);
	XtAddCallback (firstButton, XmNdisarmCallback, OnUnsetStatus, (XtPointer) this);
	XtAddCallback (firstButton, XmNactivateCallback, OnNavIndex, (XtPointer) this);
	XtAddCallback (tb_helpButton, XmNactivateCallback, OnHelpIndex, (XtPointer) this);
	XtAddCallback (tb_helpButton, XmNarmCallback, OnSetStatus, (XtPointer) this);
	XtAddCallback (tb_helpButton, XmNdisarmCallback, OnUnsetStatus, (XtPointer) this);
	children[ac++] = openButton;
	children[ac++] = printButton;
	children[ac++] = separator14;
	children[ac++] = copyButton;
	children[ac++] = separator15;
	children[ac++] = backButton;
	children[ac++] = forwardButton;
	children[ac++] = firstButton;
	children[ac++] = separator16;
	children[ac++] = tb_helpButton;
	XtManageChildren(children, ac);
	ac = 0;

	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
	XtSetArg(al[ac], XmNtopOffset, 8); ac++;
	XtSetArg(al[ac], XmNtopWidget, titleText); ac++;
	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNbottomOffset, 10); ac++;
	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
	XtSetValues ( scrolledText1,al, ac );
	ac = 0;

	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
	XtSetValues ( titleText,al, ac );
	ac = 0;
	XtAddCallback (helpText, XmNvalueChangedCallback, OnTextSelectionChanged, (XtPointer) this);
	XtAddCallback (helpText, XmNgainPrimaryCallback, OnTextSelectionChanged, (XtPointer) this);
	XtAddCallback (helpText, XmNmotionVerifyCallback, OnTextSelectionChanged, (XtPointer) this);
	XtAddCallback (helpText, XmNlosePrimaryCallback, OnTextSelectionChanged, (XtPointer) this);
	XtAddCallback (helpText, XmNlosingFocusCallback, OnTextSelectionChanged, (XtPointer) this);
	XtManageChild(helpText);
	children[ac++] = titleText;
	XtManageChildren(children, ac);
	ac = 0;

	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
	XtSetArg(al[ac], XmNtopWidget, linksLabel); ac++;
	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
	XtSetValues ( scrolledList3,al, ac );
	ac = 0;

	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++;
	XtSetValues ( linksLabel,al, ac );
	ac = 0;
	XtAddCallback (linksList, XmNbrowseSelectionCallback, OnLinkSelection, (XtPointer) this);
	XtAddCallback (linksList, XmNdefaultActionCallback, OnSelectLink, (XtPointer) this);
	XtManageChild(linksList);
	children[ac++] = linksLabel;
	XtManageChildren(children, ac);
	ac = 0;
	children[ac++] = form5;
	children[ac++] = form7;
	XtManageChildren(children, ac);
	ac = 0;
	children[ac++] = menuBar;
	children[ac++] = statusBar->xd_rootwidget();
	children[ac++] = toolBar;
	children[ac++] = panedWindow;
	XtManageChildren(children, ac);
	ac = 0;
	XtManageChild ( mainForm);
}

CGuru::CGuru()
{
	statusBar = new CStatusBar;
}

CGuru::~CGuru()
{
	delete statusBar;
}

void CGuru::OnHelpIndex( Widget widget, XtPointer client_data, XtPointer call_data )
{
	CGuru_p instance = (CGuru_p) client_data;
	instance->OnHelpIndex ( widget, call_data );
}

void CGuru::OnUnsetStatus( Widget widget, XtPointer client_data, XtPointer call_data )
{
	CGuru_p instance = (CGuru_p) client_data;
	instance->OnUnsetStatus ( widget, call_data );
}

void CGuru::OnSetStatus( Widget widget, XtPointer client_data, XtPointer call_data )
{
	CGuru_p instance = (CGuru_p) client_data;
	instance->OnSetStatus ( widget, call_data );
}

void CGuru::OnFind( Widget widget, XtPointer client_data, XtPointer call_data )
{
	CGuru_p instance = (CGuru_p) client_data;
	instance->OnFind ( widget, call_data );
}

void CGuru::OnHelpVersion( Widget widget, XtPointer client_data, XtPointer call_data )
{
	CGuru_p instance = (CGuru_p) client_data;
	instance->OnHelpVersion ( widget, call_data );
}

void CGuru::OnNavHistory( Widget widget, XtPointer client_data, XtPointer call_data )
{
	CGuru_p instance = (CGuru_p) client_data;
	instance->OnNavHistory ( widget, call_data );
}

void CGuru::OnTextSelectionChanged( Widget widget, XtPointer client_data, XtPointer call_data )
{
	CGuru_p instance = (CGuru_p) client_data;
	instance->OnTextSelectionChanged ( widget, call_data );
}

void CGuru::OnLinkSelection( Widget widget, XtPointer client_data, XtPointer call_data )
{
	CGuru_p instance = (CGuru_p) client_data;
	instance->OnLinkSelection ( widget, call_data );
}

void CGuru::OnNavIndex( Widget widget, XtPointer client_data, XtPointer call_data )
{
	CGuru_p instance = (CGuru_p) client_data;
	instance->OnNavIndex ( widget, call_data );
}

void CGuru::OnNavForward( Widget widget, XtPointer client_data, XtPointer call_data )
{
	CGuru_p instance = (CGuru_p) client_data;
	instance->OnNavForward ( widget, call_data );
}

void CGuru::OnNavBack( Widget widget, XtPointer client_data, XtPointer call_data )
{
	CGuru_p instance = (CGuru_p) client_data;
	instance->OnNavBack ( widget, call_data );
}

void CGuru::OnEditClear( Widget widget, XtPointer client_data, XtPointer call_data )
{
	CGuru_p instance = (CGuru_p) client_data;
	instance->OnEditClear ( widget, call_data );
}

void CGuru::OnEditPaste( Widget widget, XtPointer client_data, XtPointer call_data )
{
	CGuru_p instance = (CGuru_p) client_data;
	instance->OnEditPaste ( widget, call_data );
}

void CGuru::OnEditCopy( Widget widget, XtPointer client_data, XtPointer call_data )
{
	CGuru_p instance = (CGuru_p) client_data;
	instance->OnEditCopy ( widget, call_data );
}

void CGuru::OnEditCut( Widget widget, XtPointer client_data, XtPointer call_data )
{
	CGuru_p instance = (CGuru_p) client_data;
	instance->OnEditCut ( widget, call_data );
}

void CGuru::OnEditUndo( Widget widget, XtPointer client_data, XtPointer call_data )
{
	CGuru_p instance = (CGuru_p) client_data;
	instance->OnEditUndo ( widget, call_data );
}

void CGuru::OnFilePrint( Widget widget, XtPointer client_data, XtPointer call_data )
{
	CGuru_p instance = (CGuru_p) client_data;
	instance->OnFilePrint ( widget, call_data );
}

void CGuru::OnFileRevert( Widget widget, XtPointer client_data, XtPointer call_data )
{
	CGuru_p instance = (CGuru_p) client_data;
	instance->OnFileRevert ( widget, call_data );
}

void CGuru::OnFileSaveAs( Widget widget, XtPointer client_data, XtPointer call_data )
{
	CGuru_p instance = (CGuru_p) client_data;
	instance->OnFileSaveAs ( widget, call_data );
}

void CGuru::OnFileSave( Widget widget, XtPointer client_data, XtPointer call_data )
{
	CGuru_p instance = (CGuru_p) client_data;
	instance->OnFileSave ( widget, call_data );
}

void CGuru::OnFileClose( Widget widget, XtPointer client_data, XtPointer call_data )
{
	CGuru_p instance = (CGuru_p) client_data;
	instance->OnFileClose ( widget, call_data );
}

void CGuru::OnFileNew( Widget widget, XtPointer client_data, XtPointer call_data )
{
	CGuru_p instance = (CGuru_p) client_data;
	instance->OnFileNew ( widget, call_data );
}

void CGuru::OnFileQuit( Widget widget, XtPointer client_data, XtPointer call_data )
{
	CGuru_p instance = (CGuru_p) client_data;
	instance->OnFileQuit ( widget, call_data );
}

void CGuru::OnFileOpen( Widget widget, XtPointer client_data, XtPointer call_data )
{
	CGuru_p instance = (CGuru_p) client_data;
	instance->OnFileOpen ( widget, call_data );
}

void CGuru::OnSelectLink( Widget widget, XtPointer client_data, XtPointer call_data )
{
	CGuru_p instance = (CGuru_p) client_data;
	instance->OnSelectLink ( widget, call_data );
}


void CAboutBox::create (Widget parent, char *widget_name)
{
	Widget children[3];      /* Children to manage */
	Arg al[64];                    /* Arg List */
	register int ac = 0;           /* Arg Count */
	Widget separator17 = (Widget)NULL;
	Widget rowcol2 = (Widget)NULL;

	if ( !widget_name )
		widget_name = "aboutShell";

	XtSetArg(al[ac], XmNallowShellResize, TRUE); ac++;
	aboutShell = XmCreateDialogShell ( parent, widget_name, al, ac );
	ac = 0;
	_xd_rootwidget = aboutShell;
	initialise_objects ( aboutShell );
	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
	XtSetArg(al[ac], XmNdialogType, XmDIALOG_TEMPLATE); ac++;
	aboutDT = XmCreateMessageBox ( aboutShell, "aboutDT", al, ac );
	ac = 0;
	separator17 = XmMessageBoxGetChild ( aboutDT, XmDIALOG_SEPARATOR );
	aboutOKButton = XmCreatePushButton ( aboutDT, "aboutOKButton", al, ac );
	XtSetArg(al[ac], XmNentryAlignment, XmALIGNMENT_CENTER); ac++;
	rowcol2 = XmCreateRowColumn ( aboutDT, "rowcol2", al, ac );
	ac = 0;
	prognameText = XmCreateLabel ( rowcol2, "prognameText", al, ac );
	XtSetArg(al[ac], XmNlabelType, XmPIXMAP); ac++;
	xhd_picture = XmCreateLabel ( rowcol2, "xhd_picture", al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNlabelPixmap, pixmap_resources.aboutHelpPixmap); ac++;
	XtSetValues ( xhd_picture,al, ac );
	ac = 0;
	aboutText = XmCreateLabel ( rowcol2, "aboutText", al, ac );
	XtAddCallback (aboutOKButton, XmNactivateCallback, OnOK, (XtPointer) this);
	children[ac++] = prognameText;
	children[ac++] = xhd_picture;
	children[ac++] = aboutText;
	XtManageChildren(children, ac);
	ac = 0;
	children[ac++] = aboutOKButton;
	children[ac++] = rowcol2;
	XtManageChildren(children, ac);
	ac = 0;
}

void CAboutBox::OnOK( Widget widget, XtPointer client_data, XtPointer call_data )
{
	CAboutBox_p instance = (CAboutBox_p) client_data;
	instance->OnOK ( widget, call_data );
}


void CPrintDialog::create (Widget parent, char *widget_name)
{
	Widget children[5];      /* Children to manage */
	Arg al[64];                    /* Arg List */
	register int ac = 0;           /* Arg Count */
	Widget separator19 = (Widget)NULL;
	Widget button34 = (Widget)NULL;
	Widget button36 = (Widget)NULL;

	if ( !widget_name )
		widget_name = "printDialog";

	XtSetArg(al[ac], XmNallowShellResize, TRUE); ac++;
	printDialog = XmCreateDialogShell ( parent, widget_name, al, ac );
	ac = 0;
	_xd_rootwidget = printDialog;
	initialise_objects ( printDialog );
	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
	XtSetArg(al[ac], XmNdialogType, XmDIALOG_TEMPLATE); ac++;
	printDT = XmCreateMessageBox ( printDialog, "printDT", al, ac );
	ac = 0;
	separator19 = XmMessageBoxGetChild ( printDT, XmDIALOG_SEPARATOR );
	printOKbutton = XmCreatePushButton ( printDT, "okButton", al, ac );
	button34 = XmCreatePushButton ( printDT, "cancelButton", al, ac );
	button36 = XmCreatePushButton ( printDT, "helpButton", al, ac );
	printForm = XmCreateForm ( printDT, "printForm", al, ac );
	printLabel = XmCreateLabel ( printForm, "printLabel", al, ac );
	XtSetArg(al[ac], XmNcolumns, 40); ac++;
	printCommand = XmCreateText ( printForm, "printCommand", al, ac );
	ac = 0;
	XtSetArg(al[ac], XmNdefaultButton, printOKbutton); ac++;
	XtSetValues ( printDT,al, ac );
	ac = 0;
	XtAddCallback (printOKbutton, XmNactivateCallback, OnOK, (XtPointer) this);
	XtAddCallback (button34, XmNactivateCallback, OnCancel, (XtPointer) this);
	XtAddCallback (button36, XmNactivateCallback, OnHelp, (XtPointer) this);

	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
	XtSetValues ( printLabel,al, ac );
	ac = 0;

	XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
	XtSetArg(al[ac], XmNleftAttachment, XmATTACH_WIDGET); ac++;
	XtSetArg(al[ac], XmNleftWidget, printLabel); ac++;
	XtSetValues ( printCommand,al, ac );
	ac = 0;
	children[ac++] = printLabel;
	children[ac++] = printCommand;
	XtManageChildren(children, ac);
	ac = 0;
	children[ac++] = printOKbutton;
	children[ac++] = button34;
	children[ac++] = button36;
	children[ac++] = printForm;
	XtManageChildren(children, ac);
	ac = 0;
}

void CPrintDialog::OnHelp( Widget widget, XtPointer client_data, XtPointer call_data )
{
	CPrintDialog_p instance = (CPrintDialog_p) client_data;
	instance->OnHelp ( widget, call_data );
}

void CPrintDialog::OnCancel( Widget widget, XtPointer client_data, XtPointer call_data )
{
	CPrintDialog_p instance = (CPrintDialog_p) client_data;
	instance->OnCancel ( widget, call_data );
}

void CPrintDialog::OnOK( Widget widget, XtPointer client_data, XtPointer call_data )
{
	CPrintDialog_p instance = (CPrintDialog_p) client_data;
	instance->OnOK ( widget, call_data );
}


void COpenFileDialog::create (Widget parent, char *widget_name)
{
	Widget children[13];      /* Children to manage */
	Arg al[64];                    /* Arg List */
	register int ac = 0;           /* Arg Count */
	Widget button64 = (Widget)NULL;
	Widget button65 = (Widget)NULL;
	Widget button66 = (Widget)NULL;
	Widget scrolledList4 = (Widget)NULL;
	Widget scrollbar10 = (Widget)NULL;
	Widget scrollbar11 = (Widget)NULL;
	Widget list4 = (Widget)NULL;
	Widget label19 = (Widget)NULL;
	Widget button67 = (Widget)NULL;
	Widget label15 = (Widget)NULL;
	Widget separator18 = (Widget)NULL;
	Widget text6 = (Widget)NULL;
	Widget label16 = (Widget)NULL;
	Widget text7 = (Widget)NULL;
	Widget label17 = (Widget)NULL;
	Widget scrolledList5 = (Widget)NULL;
	Widget scrollbar12 = (Widget)NULL;
	Widget scrollbar13 = (Widget)NULL;
	Widget list5 = (Widget)NULL;

	if ( !widget_name )
		widget_name = "openFileDialog";

	XtSetArg(al[ac], XmNallowShellResize, TRUE); ac++;
	openFileDialog = XmCreateDialogShell ( parent, widget_name, al, ac );
	ac = 0;
	_xd_rootwidget = openFileDialog;
	initialise_objects ( openFileDialog );
	XtSetArg(al[ac], XmNwidth, 300); ac++;
	XtSetArg(al[ac], XmNdialogStyle, XmDIALOG_FULL_APPLICATION_MODAL); ac++;
	openFileFSB = XmCreateFileSelectionBox ( openFileDialog, "openFileFSB", al, ac );
	ac = 0;
	button64 = XmSelectionBoxGetChild ( openFileFSB, XmDIALOG_APPLY_BUTTON );
	button65 = XmSelectionBoxGetChild ( openFileFSB, XmDIALOG_CANCEL_BUTTON );
	button66 = XmSelectionBoxGetChild ( openFileFSB, XmDIALOG_HELP_BUTTON );
	list4 = XmSelectionBoxGetChild ( openFileFSB, XmDIALOG_LIST );
	label19 = XmSelectionBoxGetChild ( openFileFSB, XmDIALOG_LIST_LABEL );
	button67 = XmSelectionBoxGetChild ( openFileFSB, XmDIALOG_OK_BUTTON );
	label15 = XmSelectionBoxGetChild ( openFileFSB, XmDIALOG_SELECTION_LABEL );
	separator18 = XmSelectionBoxGetChild ( openFileFSB, XmDIALOG_SEPARATOR );
	text6 = XmSelectionBoxGetChild ( openFileFSB, XmDIALOG_TEXT );
	label16 = XmFileSelectionBoxGetChild ( openFileFSB, XmDIALOG_FILTER_LABEL );
	text7 = XmFileSelectionBoxGetChild ( openFileFSB, XmDIALOG_FILTER_TEXT );
	label17 = XmFileSelectionBoxGetChild ( openFileFSB, XmDIALOG_DIR_LIST_LABEL );
	list5 = XmFileSelectionBoxGetChild ( openFileFSB, XmDIALOG_DIR_LIST );
	scrolledList4 = XtParent ( list4 );

	XtSetArg(al[ac], XmNhorizontalScrollBar, &scrollbar10 ); ac++;
	XtSetArg(al[ac], XmNverticalScrollBar, &scrollbar11 ); ac++;
	XtGetValues(scrolledList4, al, ac );
	ac = 0;
	scrolledList5 = XtParent ( list5 );

	XtSetArg(al[ac], XmNhorizontalScrollBar, &scrollbar12 ); ac++;
	XtSetArg(al[ac], XmNverticalScrollBar, &scrollbar13 ); ac++;
	XtGetValues(scrolledList5, al, ac );
	ac = 0;
	XtAddCallback (openFileFSB, XmNokCallback, OnOK, (XtPointer) this);
	XtAddCallback (openFileFSB, XmNcancelCallback, OnCancel, (XtPointer) this);
	XtAddCallback (button66, XmNactivateCallback, OnHelp, (XtPointer) this);
}

void COpenFileDialog::OnCancel( Widget widget, XtPointer client_data, XtPointer call_data )
{
	COpenFileDialog_p instance = (COpenFileDialog_p) client_data;
	instance->OnCancel ( widget, call_data );
}

void COpenFileDialog::OnHelp( Widget widget, XtPointer client_data, XtPointer call_data )
{
	COpenFileDialog_p instance = (COpenFileDialog_p) client_data;
	instance->OnHelp ( widget, call_data );
}

void COpenFileDialog::OnOK( Widget widget, XtPointer client_data, XtPointer call_data )
{
	COpenFileDialog_p instance = (COpenFileDialog_p) client_data;
	instance->OnOK ( widget, call_data );
}


void COpenDbErrorAlert::create (Widget parent, char *widget_name)
{
	Widget children[6];      /* Children to manage */
	Arg al[64];                    /* Arg List */
	register int ac = 0;           /* Arg Count */
	Widget button45 = (Widget)NULL;
	Widget button46 = (Widget)NULL;
	Widget label11 = (Widget)NULL;
	Widget button47 = (Widget)NULL;
	Widget separator1 = (Widget)NULL;
	Widget label12 = (Widget)NULL;

	if ( !widget_name )
		widget_name = "cantOpenShell";

	XtSetArg(al[ac], XmNallowShellResize, TRUE); ac++;
	cantOpenShell = XmCreateDialogShell ( parent, widget_name, al, ac );
	ac = 0;
	_xd_rootwidget = cantOpenShell;
	initialise_objects ( cantOpenShell );
	XtSetArg(al[ac], XmNdialogType, XmDIALOG_ERROR); ac++;
	cantOpenMB = XmCreateMessageBox ( cantOpenShell, "cantOpenMB", al, ac );
	ac = 0;
	button45 = XmMessageBoxGetChild ( cantOpenMB, XmDIALOG_CANCEL_BUTTON );
	button46 = XmMessageBoxGetChild ( cantOpenMB, XmDIALOG_HELP_BUTTON );
	label11 = XmMessageBoxGetChild ( cantOpenMB, XmDIALOG_MESSAGE_LABEL );
	button47 = XmMessageBoxGetChild ( cantOpenMB, XmDIALOG_OK_BUTTON );
	separator1 = XmMessageBoxGetChild ( cantOpenMB, XmDIALOG_SEPARATOR );
	label12 = XmMessageBoxGetChild ( cantOpenMB, XmDIALOG_SYMBOL_LABEL );
	XtAddCallback (button47, XmNactivateCallback, OnOK, (XtPointer) this);
	XtUnmanageChild ( button45 );
	XtUnmanageChild ( button46 );
}

void COpenDbErrorAlert::OnOK( Widget widget, XtPointer client_data, XtPointer call_data )
{
	COpenDbErrorAlert_p instance = (COpenDbErrorAlert_p) client_data;
	instance->OnOK ( widget, call_data );
}


void CSysErrorAlert::create (Widget parent, char *widget_name)
{
	Widget children[6];      /* Children to manage */
	Arg al[64];                    /* Arg List */
	register int ac = 0;           /* Arg Count */
	Widget button51 = (Widget)NULL;
	Widget button52 = (Widget)NULL;
	Widget button53 = (Widget)NULL;
	Widget separator2 = (Widget)NULL;
	Widget label7 = (Widget)NULL;

	if ( !widget_name )
		widget_name = "sysErrAlert";

	XtSetArg(al[ac], XmNallowShellResize, TRUE); ac++;
	sysErrAlert = XmCreateDialogShell ( parent, widget_name, al, ac );
	ac = 0;
	_xd_rootwidget = sysErrAlert;
	initialise_objects ( sysErrAlert );
	XtSetArg(al[ac], XmNdialogStyle, XmDIALOG_FULL_APPLICATION_MODAL); ac++;
	XtSetArg(al[ac], XmNdialogType, XmDIALOG_ERROR); ac++;
	sysErrorMB = XmCreateMessageBox ( sysErrAlert, "sysErrorMB", al, ac );
	ac = 0;
	button51 = XmMessageBoxGetChild ( sysErrorMB, XmDIALOG_CANCEL_BUTTON );
	button52 = XmMessageBoxGetChild ( sysErrorMB, XmDIALOG_HELP_BUTTON );
	messageLabel = XmMessageBoxGetChild ( sysErrorMB, XmDIALOG_MESSAGE_LABEL );
	button53 = XmMessageBoxGetChild ( sysErrorMB, XmDIALOG_OK_BUTTON );
	separator2 = XmMessageBoxGetChild ( sysErrorMB, XmDIALOG_SEPARATOR );
	label7 = XmMessageBoxGetChild ( sysErrorMB, XmDIALOG_SYMBOL_LABEL );
	XtAddCallback (button53, XmNactivateCallback, OnOK, (XtPointer) this);
	XtUnmanageChild ( button51 );
	XtUnmanageChild ( button52 );
}

void CSysErrorAlert::OnOK( Widget widget, XtPointer client_data, XtPointer call_data )
{
	CSysErrorAlert_p instance = (CSysErrorAlert_p) client_data;
	instance->OnOK ( widget, call_data );
}


void CFindAlert::create (Widget parent, char *widget_name)
{
	Widget children[6];      /* Children to manage */
	Arg al[64];                    /* Arg List */
	register int ac = 0;           /* Arg Count */
	Widget button57 = (Widget)NULL;
	Widget button58 = (Widget)NULL;
	Widget label18 = (Widget)NULL;
	Widget button59 = (Widget)NULL;
	Widget separator3 = (Widget)NULL;
	Widget label9 = (Widget)NULL;

	if ( !widget_name )
		widget_name = "findAlert";

	XtSetArg(al[ac], XmNallowShellResize, TRUE); ac++;
	findAlert = XmCreateDialogShell ( parent, widget_name, al, ac );
	ac = 0;
	_xd_rootwidget = findAlert;
	initialise_objects ( findAlert );
	XtSetArg(al[ac], XmNdialogType, XmDIALOG_INFORMATION); ac++;
	noItemsFoundMB = XmCreateMessageBox ( findAlert, "noItemsFoundMB", al, ac );
	ac = 0;
	button57 = XmMessageBoxGetChild ( noItemsFoundMB, XmDIALOG_CANCEL_BUTTON );
	button58 = XmMessageBoxGetChild ( noItemsFoundMB, XmDIALOG_HELP_BUTTON );
	label18 = XmMessageBoxGetChild ( noItemsFoundMB, XmDIALOG_MESSAGE_LABEL );
	button59 = XmMessageBoxGetChild ( noItemsFoundMB, XmDIALOG_OK_BUTTON );
	separator3 = XmMessageBoxGetChild ( noItemsFoundMB, XmDIALOG_SEPARATOR );
	label9 = XmMessageBoxGetChild ( noItemsFoundMB, XmDIALOG_SYMBOL_LABEL );
	XtAddCallback (button59, XmNactivateCallback, OnOK, (XtPointer) this);
	XtUnmanageChild ( button57 );
	XtUnmanageChild ( button58 );
}

void CFindAlert::OnOK( Widget widget, XtPointer client_data, XtPointer call_data )
{
	CFindAlert_p instance = (CFindAlert_p) client_data;
	instance->OnOK ( widget, call_data );
}


void CFindDialog::create (Widget parent, char *widget_name)
{
	Widget children[5];      /* Children to manage */
	Arg al[64];                    /* Arg List */
	register int ac = 0;           /* Arg Count */
	Widget separator4 = (Widget)NULL;

	if ( !widget_name )
		widget_name = "findDialog";

	XtSetArg(al[ac], XmNallowShellResize, TRUE); ac++;
	findDialog = XmCreateDialogShell ( parent, widget_name, al, ac );
	ac = 0;
	_xd_rootwidget = findDialog;
	initialise_objects ( findDialog );
	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
	XtSetArg(al[ac], XmNdialogType, XmDIALOG_TEMPLATE); ac++;
	findDT = XmCreateMessageBox ( findDialog, "findDT", al, ac );
	ac = 0;
	separator4 = XmMessageBoxGetChild ( findDT, XmDIALOG_SEPARATOR );
	findButton = XmCreatePushButton ( findDT, "findButton", al, ac );
	closeButton = XmCreatePushButton ( findDT, "closeButton", al, ac );
	helpButton = XmCreatePushButton ( findDT, "helpButton", al, ac );
	findText = XmCreateTextField ( findDT, "findText", al, ac );
	XtSetArg(al[ac], XmNdefaultButton, findButton); ac++;
	XtSetValues ( findDT,al, ac );
	ac = 0;
	XtAddCallback (findButton, XmNactivateCallback, OnFind, (XtPointer) this);
	XtAddCallback (closeButton, XmNactivateCallback, OnClose, (XtPointer) this);
	XtAddCallback (helpButton, XmNactivateCallback, OnHelp, (XtPointer) this);
	children[ac++] = findButton;
	children[ac++] = closeButton;
	children[ac++] = helpButton;
	children[ac++] = findText;
	XtManageChildren(children, ac);
	ac = 0;
}

void CFindDialog::OnHelp( Widget widget, XtPointer client_data, XtPointer call_data )
{
	CFindDialog_p instance = (CFindDialog_p) client_data;
	instance->OnHelp ( widget, call_data );
}

void CFindDialog::OnClose( Widget widget, XtPointer client_data, XtPointer call_data )
{
	CFindDialog_p instance = (CFindDialog_p) client_data;
	instance->OnClose ( widget, call_data );
}

void CFindDialog::OnFind( Widget widget, XtPointer client_data, XtPointer call_data )
{
	CFindDialog_p instance = (CFindDialog_p) client_data;
	instance->OnFind ( widget, call_data );
}


void CSaveFileDialog::create (Widget parent, char *widget_name)
{
	Widget children[13];      /* Children to manage */
	Arg al[64];                    /* Arg List */
	register int ac = 0;           /* Arg Count */
	Widget button56 = (Widget)NULL;
	Widget button68 = (Widget)NULL;
	Widget button69 = (Widget)NULL;
	Widget scrolledList6 = (Widget)NULL;
	Widget scrollbar14 = (Widget)NULL;
	Widget scrollbar1 = (Widget)NULL;
	Widget list6 = (Widget)NULL;
	Widget label10 = (Widget)NULL;
	Widget button70 = (Widget)NULL;
	Widget label21 = (Widget)NULL;
	Widget separator5 = (Widget)NULL;
	Widget text3 = (Widget)NULL;
	Widget label11 = (Widget)NULL;
	Widget text8 = (Widget)NULL;
	Widget label23 = (Widget)NULL;
	Widget scrolledList1 = (Widget)NULL;
	Widget scrollbar2 = (Widget)NULL;
	Widget scrollbar3 = (Widget)NULL;
	Widget list2 = (Widget)NULL;

	if ( !widget_name )
		widget_name = "saveFileDialog";

	XtSetArg(al[ac], XmNallowShellResize, TRUE); ac++;
	saveFileDialog = XmCreateDialogShell ( parent, widget_name, al, ac );
	ac = 0;
	_xd_rootwidget = saveFileDialog;
	initialise_objects ( saveFileDialog );
	XtSetArg(al[ac], XmNwidth, 300); ac++;
	XtSetArg(al[ac], XmNdialogStyle, XmDIALOG_FULL_APPLICATION_MODAL); ac++;
	saveFileFSB = XmCreateFileSelectionBox ( saveFileDialog, "saveFileFSB", al, ac );
	ac = 0;
	button56 = XmSelectionBoxGetChild ( saveFileFSB, XmDIALOG_APPLY_BUTTON );
	button68 = XmSelectionBoxGetChild ( saveFileFSB, XmDIALOG_CANCEL_BUTTON );
	button69 = XmSelectionBoxGetChild ( saveFileFSB, XmDIALOG_HELP_BUTTON );
	list6 = XmSelectionBoxGetChild ( saveFileFSB, XmDIALOG_LIST );
	label10 = XmSelectionBoxGetChild ( saveFileFSB, XmDIALOG_LIST_LABEL );
	button70 = XmSelectionBoxGetChild ( saveFileFSB, XmDIALOG_OK_BUTTON );
	label21 = XmSelectionBoxGetChild ( saveFileFSB, XmDIALOG_SELECTION_LABEL );
	separator5 = XmSelectionBoxGetChild ( saveFileFSB, XmDIALOG_SEPARATOR );
	text3 = XmSelectionBoxGetChild ( saveFileFSB, XmDIALOG_TEXT );
	label11 = XmFileSelectionBoxGetChild ( saveFileFSB, XmDIALOG_FILTER_LABEL );
	text8 = XmFileSelectionBoxGetChild ( saveFileFSB, XmDIALOG_FILTER_TEXT );
	label23 = XmFileSelectionBoxGetChild ( saveFileFSB, XmDIALOG_DIR_LIST_LABEL );
	list2 = XmFileSelectionBoxGetChild ( saveFileFSB, XmDIALOG_DIR_LIST );
	scrolledList6 = XtParent ( list6 );

	XtSetArg(al[ac], XmNhorizontalScrollBar, &scrollbar14 ); ac++;
	XtSetArg(al[ac], XmNverticalScrollBar, &scrollbar1 ); ac++;
	XtGetValues(scrolledList6, al, ac );
	ac = 0;
	scrolledList1 = XtParent ( list2 );

	XtSetArg(al[ac], XmNhorizontalScrollBar, &scrollbar2 ); ac++;
	XtSetArg(al[ac], XmNverticalScrollBar, &scrollbar3 ); ac++;
	XtGetValues(scrolledList1, al, ac );
	ac = 0;
	XtAddCallback (saveFileFSB, XmNokCallback, OnOK, (XtPointer) this);
	XtAddCallback (button68, XmNactivateCallback, OnCancel, (XtPointer) this);
	XtAddCallback (button69, XmNactivateCallback, OnHelp, (XtPointer) this);
}

void CSaveFileDialog::OnCancel( Widget widget, XtPointer client_data, XtPointer call_data )
{
	CSaveFileDialog_p instance = (CSaveFileDialog_p) client_data;
	instance->OnCancel ( widget, call_data );
}

void CSaveFileDialog::OnHelp( Widget widget, XtPointer client_data, XtPointer call_data )
{
	CSaveFileDialog_p instance = (CSaveFileDialog_p) client_data;
	instance->OnHelp ( widget, call_data );
}

void CSaveFileDialog::OnOK( Widget widget, XtPointer client_data, XtPointer call_data )
{
	CSaveFileDialog_p instance = (CSaveFileDialog_p) client_data;
	instance->OnOK ( widget, call_data );
}


void CHistoryDialog::create (Widget parent, char *widget_name)
{
	Widget children[5];      /* Children to manage */
	Arg al[64];                    /* Arg List */
	register int ac = 0;           /* Arg Count */
	Widget separator6 = (Widget)NULL;
	Widget scrolledList2 = (Widget)NULL;
	Widget scrollbar4 = (Widget)NULL;
	Widget scrollbar5 = (Widget)NULL;
	Widget button72 = (Widget)NULL;
	Widget button74 = (Widget)NULL;

	if ( !widget_name )
		widget_name = "historyShell";

	XtSetArg(al[ac], XmNallowShellResize, TRUE); ac++;
	historyShell = XmCreateDialogShell ( parent, widget_name, al, ac );
	ac = 0;
	_xd_rootwidget = historyShell;
	initialise_objects ( historyShell );
	XtSetArg(al[ac], XmNwidth, 300); ac++;
	XtSetArg(al[ac], XmNheight, 180); ac++;
	XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++;
	XtSetArg(al[ac], XmNdialogType, XmDIALOG_TEMPLATE); ac++;
	historyForm = XmCreateMessageBox ( historyShell, "historyForm", al, ac );
	ac = 0;
	separator6 = XmMessageBoxGetChild ( historyForm, XmDIALOG_SEPARATOR );
	XtSetArg(al[ac], XmNlistSizePolicy, XmCONSTANT); ac++;
	historyList = XmCreateScrolledList ( historyForm, "historyList", al, ac );
	ac = 0;
	scrolledList2 = XtParent ( historyList );

	XtSetArg(al[ac], XmNhorizontalScrollBar, &scrollbar4 ); ac++;
	XtSetArg(al[ac], XmNverticalScrollBar, &scrollbar5 ); ac++;
	XtGetValues(scrolledList2, al, ac );
	ac = 0;
	gotoButton = XmCreatePushButton ( historyForm, "gotoButton", al, ac );
	button72 = XmCreatePushButton ( historyForm, "closeButton", al, ac );
	button74 = XmCreatePushButton ( historyForm, "helpButton", al, ac );
	XtSetArg(al[ac], XmNdefaultButton, gotoButton); ac++;
	XtSetValues ( historyForm,al, ac );
	ac = 0;
	XtAddCallback (historyList, XmNdefaultActionCallback, OnOK, (XtPointer) this);
	XtManageChild(historyList);
	XtAddCallback (gotoButton, XmNactivateCallback, OnOK, (XtPointer) this);
	XtAddCallback (button72, XmNactivateCallback, OnCancel, (XtPointer) this);
	XtAddCallback (button74, XmNactivateCallback, OnHelp, (XtPointer) this);
	children[ac++] = gotoButton;
	children[ac++] = button72;
	children[ac++] = button74;
	XtManageChildren(children, ac);
	ac = 0;
}

void CHistoryDialog::OnHelp( Widget widget, XtPointer client_data, XtPointer call_data )
{
	CHistoryDialog_p instance = (CHistoryDialog_p) client_data;
	instance->OnHelp ( widget, call_data );
}

void CHistoryDialog::OnCancel( Widget widget, XtPointer client_data, XtPointer call_data )
{
	CHistoryDialog_p instance = (CHistoryDialog_p) client_data;
	instance->OnCancel ( widget, call_data );
}

void CHistoryDialog::OnOK( Widget widget, XtPointer client_data, XtPointer call_data )
{
	CHistoryDialog_p instance = (CHistoryDialog_p) client_data;
	instance->OnOK ( widget, call_data );
}

