/* $Id: gisel.h 2.4 1995/07/20 11:24:33 leon Exp leon $
*
* GISEL - G-CODE ISEL CNC driver
*
* Copyright (c) 1994 LECAD
* All Rights Reserved.
*
*/
#ifndef GISEL_H_INCLUDED
#define GISEL_H_INCLUDED
#define Uses_TProgram
#define Uses_TDeskTop
#define Uses_TApplication
#define Uses_TObject
#define Uses_fpstream
#define Uses_TDialog
#define Uses_TInputLine
#define Uses_TLabel
#define Uses_THistory
#define Uses_TRect
#define Uses_TCheckBoxes
#define Uses_TRadioButtons
#define Uses_TButton
#define Uses_MsgBox
#define Uses_TSItem
#include <tvision/tv.h>
class TMenuBar;
class TStatusLine;
class TEditWindow;
class TDialog;
class TLogWindow; // log.h
class TClockView; // gadgets.h
class THeapView; // gadgets.h
class Comm; // comm.h
const int cmIntro = 100;
const int cmReplyReceived = 101;
const int cmChangeDrct = 102;
const int cmCalculator = 104;
const int cmShowClip = 105;
const int cmAboutBox = 107;
const int cmComSetup = 108;
const int cmTerminal = 109;
const int cmSaveCmd = 110;
const int cmRestoreCmd = 111;
const int cmLogCmd = 112;
const int cmHomeCmd = 113;
const int cmManualMotion = 114;
const int cmSettings = 115;
const int cmHomingSpeed = 116;
const int cmZeroAbsolute = 117;
const int cmTranslateFile = 118;
const int cmSaveSettings = 119;
const int cmSplus = 120; // manual.cpp
const int cmSminus = 121;
const int cmSpeed = 122;
const int cmGoTo = 123;
const int cmZplus = 124;
const int cmZminus = 125;
const int cmXminus = 126;
const int cmXplus = 127;
const int cmYplus = 128;
const int cmYminus = 129;
const int cmMoveTo = 150; // position.cpp
const int cmMoveToZero = 151;
const int cmSto1 = 152;
const int cmRcl1 = 153;
const int cmSto2 = 154;
const int cmRcl2 = 155;
const int cmPositionCmd = 156;
const int cmJobManagerCmd = 160; // jobman.cpp
const int cmPause = 161; // jobman.cpp
const int cmContinue = 162; // jobman.cpp
const int cmDequeue = 163; // jobman.cpp
const int cmXYZplus = 164;
const int cmXYZminus = 165;
const int cmPreview = 166;
const int cmIndex = 167;
const int cmMachining = 168;
/**
** Main GISEL application class. This is Turbo Vision based application
** For immediate ISEL controller driving with G-CODE input files.
**/
class TGIselApp : public TApplication
{
public:
TGIselApp(int argc, char **argv);
~TGIselApp();
virtual void handleEvent( TEvent& event );
virtual void getEvent(TEvent &event);
static TMenuBar *initMenuBar( TRect );
static TStatusLine *initStatusLine( TRect );
virtual void outOfMemory(); // For validView() function
virtual void run();
private:
void idle();
void comSetup();
void tile();
void cascade();
void terminal();
void calculator();
void jobManager();
void showPosition();
void translateFile();
void manualMotion();
void loadDesktop(fpstream& s); // Load and restore the
void retrieveDesktop(); // previously saved desktop
void storeDesktop(fpstream& s); // Store the current desktop
void saveDesktop(); // in a resource file
void changeDir();
void dosShell();
void showClip();
void fileOpen();
void fileNew();
void spawnPreviewer();
void logOpen();
void saveSettings();
TEditWindow *openEditor( const char *fileName, Boolean visible );
THeapView *heap;
TClockView *clock;
TLogWindow *log;
};
/**
** Settings for settings dialog
**/
typedef struct settingsRec {
long spuX; //TInputLong
long spuY; //TInputLong
long spuZ; //TInputLong
long speedX; //TInputLong
long speedY; //TInputLong
long speedZ; //TInputLong
long device; //TInputLong
ushort ack; //TRadioButtons
long stepSize; //TInputLong
long ratioZ; //TInputLong
ushort option; //TCheckBoxes
char logFileName[57]; //TInputLine
} SettingsRec;
/**
** Settings for homming speed
**/
typedef struct homingSpeedRec {
long x; //TInputLong
long y; //TInputLong
long z; //TInputLong
} HomingSpeedRec;
/** Clipboard window pointer **/
extern TEditWindow *clipWindow;
ushort execDialog( TDialog *d, void *data );
TDialog *createFindDialog();
TDialog *createCommSetupDialog();
TDialog *createReplaceDialog();
TDialog *createAboutDialog();
TDialog *createSettingsDialog(void);
TDialog *createHomingSpeedDialog(void);
ushort doEditDialog( int dialog, ... );
void HomeMotors(); // action.cpp
void ZeroAbsolute();
#endif /* GISEL_H_INCLUDED */
syntax highlighted by Code2HTML, v. 0.9.1