Добавил:
Studfiles2
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз:
Предмет:
Файл:Программы для выполнения лаб 1 и 2 / KALMAN / SOURCE / FIRSTAPP
.H#if !defined(__firstapp_h) // Sentry, use file only if it's not already included.
#define __firstapp_h
/* Project first
Copyright © 1997 by US. All Rights Reserved.
SUBSYSTEM: first.exe Application
FILE: firstapp.h
AUTHOR: US
OVERVIEW
========
Class definition for firstApp (TApplication).
*/
#include <owl\owlpch.h>
#pragma hdrstop
#include <classlib\bags.h>
#include <owl\controlb.h>
#include <owl\buttonga.h>
#include <owl\opensave.h>
#include <owl\combobox.h>
#include <stdio.h>
#include "firstapp.rh" // Definition of all resources.
#include "w-data.h"
// TFileDrop class Maintains information about a dropped file, its name, where it was dropped,
// and whether or not it was in the client area
class TFileDrop {
public:
operator == (const TFileDrop& other) const {return this == &other;}
char* FileName;
TPoint Point;
BOOL InClientArea;
HICON Icon;
BOOL DefIcon;
TFileDrop (char*, TPoint&, BOOL, TModule* module);
~TFileDrop ();
const char* WhoAmI ();
private:
//
// hidden to prevent accidental copying or assignment
//
TFileDrop (const TFileDrop&);
TFileDrop & operator = (const TFileDrop&);
};
typedef TIBagAsVector<TFileDrop> TFileList;
typedef TIBagAsVectorIterator<TFileDrop> TFileListIter;
#define IDC_ATTEMPTNAME 24900
#define IDC_GRAPHICNAME 24901
//{{TApplication = firstApp}}
class firstApp : public TApplication {
private:
TOpenSaveDialog::TData FileData; // Data to control open/saveas standard dialog.
TOpenSaveDialog::TData XFileData; // Data to control write protocol dialog.
TOpenSaveDialog::TData BMPFileData; // Data to control write image dialog.
// Work data
unsigned AttemptNum;
public:
TWindow *Client; // Client window for the frame.
TComboBox *AttemptName, // Attempts list
*GraphicName; // The name of the graphic to draw
private:
void AddFiles (TFileList* files);
double GenerateNoise(NoiseType noise, double dispersion);
void Simulate(void);
void ReGenerate(void);
void ReRender(void);
void readWord(char *buffer, unsigned bufferLength, FILE *inf);
public:
firstApp ();
virtual ~firstApp ();
void OpenFile (const char *fileName = 0);
void SaveFile (const char *fileName = 0);
void WriteData(void);
//{{firstAppVIRTUAL_BEGIN}}
public:
virtual void InitMainWindow();
virtual void InitInstance();
void CmAttNameChange();
void CmGrNameChange();
//{{firstAppVIRTUAL_END}}
//{{firstAppRSP_TBL_BEGIN}}
protected:
void CmFileNew ();
void CmFileOpen ();
void CmHelpAbout ();
void EvDropFiles (TDropInfo drop);
int EvCreate (CREATESTRUCT far& createStruct);
void CmSimulate ();
void CmReSimulate ();
void CmFileSave ();
void CmFileSaveAs ();
void CmWriteData ();
void CmWriteImage ();
//{{firstAppRSP_TBL_END}}
DECLARE_RESPONSE_TABLE(firstApp);
}; //{{firstApp}}
extern firstApp *App;
#endif // __firstapp_h sentry.
Соседние файлы в папке SOURCE