#include "CCmdHandler.h"
/*
** Generated by X-Designer
*/
#ifndef _CGuru_h
#define _CGuru_h

#define XD_MOTIF

#include <xdclass.h>

class CStatusBar: public xd_XmRowColumn_c {
public:
	void SetTextFromResource( const char *formatResource, const char *text ) ;
	void SetText( const char *text ) ;
	void SetText( XmString string ) ;
	void Clear() ;	virtual void create (Widget parent, char *widget_name = NULL);
protected:
	Widget statusBar;
	Widget statusLabel;
};

typedef CStatusBar *CStatusBar_p;

class CGuru: public xd_ApplicationShell_c,public CCmdHandler {
public:
        void Exit();
	void UpdateUI();
	void SetHelpTopic(const char *key, Boolean bAddToHistory = FALSE);
	void SetTopic(const char *key, Boolean bAddToHistory = FALSE);
	Boolean DoCommand(long cmd);
	Boolean DispatchCommand(long cmd, Boolean bUpdate);
	Boolean OnCommand(long cmd);
	Boolean OnUpdateCommand(long cmd);
	void MainLoop(XtAppContext appContext, Display *display);
	static void NewTopic( Widget w, XtPointer client_data, XEvent *event, Boolean *ctd ) ;
	void NewTopic( Widget w, XEvent *event, Boolean *ctd ) ;
	void IPCConnect( Window w ) ;
	void SetupIPC( int argc, char **argv ) ;
	char *GetHelpDir() ;
	virtual void create (Display *display, char *app_name, int app_argc, char **app_argv, char *app_class_name = NULL);
	CGuru();
	virtual ~CGuru();
	Widget helpText;
	Widget titleText;
protected:
	Widget helpShell;
	Widget mainForm;
	Widget menuBar;
	Widget fileCB;
	Widget fileMenu;
	Widget fileNewItem;
	Widget fileOpenItem;
	Widget fileCloseItem;
	Widget fileSaveItem;
	Widget fileSaveAsItem;
	Widget fileRevertItem;
	Widget filePrintItem;
	Widget fileQuitItem;
	Widget editCB;
	Widget editMenu;
	Widget editUndoItem;
	Widget editCutItem;
	Widget editCopyItem;
	Widget editPasteItem;
	Widget editClearItem;
	Widget navCB;
	Widget navMenu;
	Widget navBackItem;
	Widget navForwardItem;
	Widget navIndexItem;
	Widget navHistoryItem;
	Widget navFindItem;
	Widget helpCB;
	Widget helpMenu;
	Widget helpOnVersionItem;
	Widget helpIndexItem;
	CStatusBar_p statusBar;
	Widget toolBar;
	Widget newButton;
	Widget openButton;
	Widget saveButton;
	Widget printButton;
	Widget cutButton;
	Widget copyButton;
	Widget pasteButton;
	Widget backButton;
	Widget forwardButton;
	Widget firstButton;
	Widget tb_helpButton;
	Widget panedWindow;
	Widget linksList;
	Widget linksLabel;
private:
	Widget myCommWidget ;
	static char *helpDir ;
public:
	static void OnUnsetStatus( Widget, XtPointer, XtPointer );
	virtual void OnUnsetStatus( Widget, XtPointer );
	static void OnSetStatus( Widget, XtPointer, XtPointer );
	virtual void OnSetStatus( Widget, XtPointer );
	static void OnFind( Widget, XtPointer, XtPointer );
	virtual void OnFind( Widget, XtPointer );
	static void OnHelpVersion( Widget, XtPointer, XtPointer );
	virtual void OnHelpVersion( Widget, XtPointer );
	static void OnNavHistory( Widget, XtPointer, XtPointer );
	virtual void OnNavHistory( Widget, XtPointer );
	static void OnNavIndex( Widget, XtPointer, XtPointer );
	virtual void OnNavIndex( Widget, XtPointer );
	static void OnNavForward( Widget, XtPointer, XtPointer );
	virtual void OnNavForward( Widget, XtPointer );
	static void OnNavBack( Widget, XtPointer, XtPointer );
	virtual void OnNavBack( Widget, XtPointer );
	static void OnEditClear( Widget, XtPointer, XtPointer );
	virtual void OnEditClear( Widget, XtPointer );
	static void OnEditPaste( Widget, XtPointer, XtPointer );
	virtual void OnEditPaste( Widget, XtPointer );
	static void OnEditCopy( Widget, XtPointer, XtPointer );
	virtual void OnEditCopy( Widget, XtPointer );
	static void OnEditCut( Widget, XtPointer, XtPointer );
	virtual void OnEditCut( Widget, XtPointer );
	static void OnEditUndo( Widget, XtPointer, XtPointer );
	virtual void OnEditUndo( Widget, XtPointer );
	static void OnFilePrint( Widget, XtPointer, XtPointer );
	virtual void OnFilePrint( Widget, XtPointer );
	static void OnFileRevert( Widget, XtPointer, XtPointer );
	virtual void OnFileRevert( Widget, XtPointer );
	static void OnFileSaveAs( Widget, XtPointer, XtPointer );
	virtual void OnFileSaveAs( Widget, XtPointer );
	static void OnFileSave( Widget, XtPointer, XtPointer );
	virtual void OnFileSave( Widget, XtPointer );
	static void OnFileClose( Widget, XtPointer, XtPointer );
	virtual void OnFileClose( Widget, XtPointer );
	static void OnFileNew( Widget, XtPointer, XtPointer );
	virtual void OnFileNew( Widget, XtPointer );
	static void OnFileQuit( Widget, XtPointer, XtPointer );
	virtual void OnFileQuit( Widget, XtPointer );
	static void OnFileOpen( Widget, XtPointer, XtPointer );
	virtual void OnFileOpen( Widget, XtPointer );
	static void OnSelectLink( Widget, XtPointer, XtPointer );
	virtual void OnSelectLink( Widget, XtPointer );
protected:
	static void OnHelpIndex( Widget, XtPointer, XtPointer );
	virtual void OnHelpIndex( Widget, XtPointer );
	static void OnTextSelectionChanged( Widget, XtPointer, XtPointer );
	virtual void OnTextSelectionChanged( Widget, XtPointer );
	static void OnLinkSelection( Widget, XtPointer, XtPointer );
	virtual void OnLinkSelection( Widget, XtPointer );
};

typedef CGuru *CGuru_p;


class CAboutBox: public xd_XmDialog_c {
public:
	virtual void create (Widget parent, char *widget_name = NULL);
	Widget aboutDT;
protected:
	Widget aboutShell;
	Widget aboutOKButton;
	Widget prognameText;
	Widget xhd_picture;
	Widget aboutText;
public:
	static void OnOK( Widget, XtPointer, XtPointer );
	virtual void OnOK( Widget, XtPointer );
};

typedef CAboutBox *CAboutBox_p;


class CPrintDialog: public xd_XmDialog_c {
public:
	virtual void create (Widget parent, char *widget_name = NULL);
protected:
	Widget printDialog;
	Widget printDT;
	Widget printOKbutton;
	Widget printForm;
	Widget printLabel;
	Widget printCommand;
public:
	static void OnHelp( Widget, XtPointer, XtPointer );
	virtual void OnHelp( Widget, XtPointer );
	static void OnCancel( Widget, XtPointer, XtPointer );
	virtual void OnCancel( Widget, XtPointer );
	static void OnOK( Widget, XtPointer, XtPointer );
	virtual void OnOK( Widget, XtPointer );
};

typedef CPrintDialog *CPrintDialog_p;


class COpenFileDialog: public xd_XmDialog_c {
public:
	virtual void create (Widget parent, char *widget_name = NULL);
protected:
	Widget openFileDialog;
	Widget openFileFSB;
public:
	static void OnCancel( Widget, XtPointer, XtPointer );
	virtual void OnCancel( Widget, XtPointer );
	static void OnHelp( Widget, XtPointer, XtPointer );
	virtual void OnHelp( Widget, XtPointer );
	static void OnOK( Widget, XtPointer, XtPointer );
	virtual void OnOK( Widget, XtPointer );
};

typedef COpenFileDialog *COpenFileDialog_p;


class COpenDbErrorAlert: public xd_XmDialog_c {
public:
	virtual void create (Widget parent, char *widget_name = NULL);
protected:
	Widget cantOpenShell;
	Widget cantOpenMB;
protected:
	static void OnOK( Widget, XtPointer, XtPointer );
	virtual void OnOK( Widget, XtPointer );
};

typedef COpenDbErrorAlert *COpenDbErrorAlert_p;


class CSysErrorAlert: public xd_XmDialog_c {
public:
	virtual void create (Widget parent, char *widget_name = NULL);
	Widget messageLabel;
protected:
	Widget sysErrAlert;
	Widget sysErrorMB;
protected:
	static void OnOK( Widget, XtPointer, XtPointer );
	virtual void OnOK( Widget, XtPointer );
};

typedef CSysErrorAlert *CSysErrorAlert_p;


class CFindAlert: public xd_XmDialog_c {
public:
	virtual void create (Widget parent, char *widget_name = NULL);
protected:
	Widget findAlert;
	Widget noItemsFoundMB;
protected:
	static void OnOK( Widget, XtPointer, XtPointer );
	virtual void OnOK( Widget, XtPointer );
};

typedef CFindAlert *CFindAlert_p;


class CFindDialog: public xd_XmDialog_c {
public:
	virtual void create (Widget parent, char *widget_name = NULL);
protected:
	Widget findDialog;
	Widget findDT;
	Widget findButton;
	Widget closeButton;
	Widget helpButton;
	Widget findText;
protected:
	static void OnHelp( Widget, XtPointer, XtPointer );
	virtual void OnHelp( Widget, XtPointer );
	static void OnClose( Widget, XtPointer, XtPointer );
	virtual void OnClose( Widget, XtPointer );
	static void OnFind( Widget, XtPointer, XtPointer );
	virtual void OnFind( Widget, XtPointer );
};

typedef CFindDialog *CFindDialog_p;


class CSaveFileDialog: public xd_XmDialog_c {
public:
	virtual void create (Widget parent, char *widget_name = NULL);
protected:
	Widget saveFileDialog;
	Widget saveFileFSB;
public:
	static void OnCancel( Widget, XtPointer, XtPointer );
	virtual void OnCancel( Widget, XtPointer );
	static void OnHelp( Widget, XtPointer, XtPointer );
	virtual void OnHelp( Widget, XtPointer );
	static void OnOK( Widget, XtPointer, XtPointer );
	virtual void OnOK( Widget, XtPointer );
};

typedef CSaveFileDialog *CSaveFileDialog_p;


class CHistoryDialog: public xd_XmDialog_c {
public:
	class CLinkList *itsList;
	virtual void create (Widget parent, char *widget_name = NULL);
	Widget historyForm;
	Widget historyList;
protected:
	Widget historyShell;
	Widget gotoButton;
public:
	static void OnHelp( Widget, XtPointer, XtPointer );
	virtual void OnHelp( Widget, XtPointer );
	static void OnCancel( Widget, XtPointer, XtPointer );
	virtual void OnCancel( Widget, XtPointer );
	static void OnOK( Widget, XtPointer, XtPointer );
	virtual void OnOK( Widget, XtPointer );
};

typedef CHistoryDialog *CHistoryDialog_p;


extern CGuru_p helpShell;

extern CAboutBox_p aboutShell;

extern CPrintDialog_p printDialog;

extern COpenFileDialog_p openFileDialog;

extern COpenDbErrorAlert_p cantOpenShell;

extern CSysErrorAlert_p sysErrAlert;

extern CFindAlert_p findAlert;

extern CFindDialog_p findDialog;

extern CSaveFileDialog_p saveFileDialog;

extern CHistoryDialog_p historyShell;











#endif
