1994-08-12 10:52:49 +00:00
|
|
|
#ifndef __BA1100_H
|
|
|
|
#define __BA1100_H
|
|
|
|
|
1994-10-12 12:58:08 +00:00
|
|
|
#ifndef __SHEET_H
|
|
|
|
#include <sheet.h>
|
|
|
|
#endif
|
|
|
|
|
1995-02-02 18:08:03 +00:00
|
|
|
#ifndef __CONFIG_H
|
|
|
|
#include <config.h>
|
|
|
|
#endif
|
|
|
|
|
1995-06-22 09:28:46 +00:00
|
|
|
#ifndef __MASKFLD_H
|
|
|
|
class TMask_field;
|
|
|
|
#endif
|
|
|
|
|
1994-08-12 10:52:49 +00:00
|
|
|
#include "ba1100a.h"
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////
|
|
|
|
// TDir_sheet
|
|
|
|
///////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
class TDir_sheet : public TSheet
|
|
|
|
{
|
1994-09-27 08:24:05 +00:00
|
|
|
TTrec *_rec;
|
|
|
|
TDir *_dir;
|
|
|
|
FileDes _s_dir;
|
|
|
|
long _items;
|
1994-08-12 10:52:49 +00:00
|
|
|
|
1995-05-09 13:27:01 +00:00
|
|
|
protected:
|
1996-05-08 11:02:26 +00:00
|
|
|
virtual long get_items() const { return _items; }
|
|
|
|
virtual void get_row(long n, TToken_string& r);
|
|
|
|
|
1994-08-12 10:52:49 +00:00
|
|
|
public:
|
|
|
|
TDir* dir() const { return _dir; }
|
|
|
|
TTrec* rec() const { return _rec; }
|
|
|
|
void set_items(long items) { _items = items; }
|
|
|
|
void add();
|
|
|
|
void rebuild() { _items = _dir->items();}
|
|
|
|
|
2004-06-30 16:11:24 +00:00
|
|
|
TDir_sheet(const char* title,byte buttons=0x8,const char* col = "N.@3R|Nome@20|EOD@7R|EOX@7R|Lung.@7R|Descrizione@43|Formula@33|Flags@7R");
|
1998-03-30 14:08:53 +00:00
|
|
|
virtual ~TDir_sheet();
|
1994-08-12 10:52:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class TRec_sheet : public TObject
|
|
|
|
{
|
1994-08-16 16:35:22 +00:00
|
|
|
TTrec *_rec;
|
|
|
|
TTrec *_rec_old;
|
|
|
|
TDir *_dir;
|
1995-02-02 18:08:03 +00:00
|
|
|
bool _comfile;
|
|
|
|
TConfig *_descr;
|
|
|
|
static TMask *_mask;
|
|
|
|
TFilename _descfname;
|
|
|
|
TString16 _tab;
|
1997-07-22 12:58:54 +00:00
|
|
|
bool _external;
|
1994-08-12 10:52:49 +00:00
|
|
|
|
|
|
|
protected:
|
1994-08-16 16:35:22 +00:00
|
|
|
bool check_key_expr(int key, const char* key_expr);
|
1995-08-09 09:49:19 +00:00
|
|
|
static bool key_notify(TSheet_field& s, int r, KEY k);
|
|
|
|
static bool fld_notify(TSheet_field& s, int r, KEY k);
|
1994-08-16 16:35:22 +00:00
|
|
|
void save();
|
1996-05-23 14:58:33 +00:00
|
|
|
void save_desc();
|
1996-05-08 11:02:26 +00:00
|
|
|
|
|
|
|
virtual long get_items() const { return _rec->fields(); }
|
1994-08-12 10:52:49 +00:00
|
|
|
|
|
|
|
public:
|
1994-08-16 16:35:22 +00:00
|
|
|
TDir* dir() const { return _dir; }
|
|
|
|
TTrec* rec() const { return _rec; }
|
1995-02-02 18:08:03 +00:00
|
|
|
const char * descfname() const { return _descfname;}
|
|
|
|
const char * tab() const { return _tab; }
|
1994-08-12 10:52:49 +00:00
|
|
|
void edit();
|
|
|
|
|
1996-05-08 11:02:26 +00:00
|
|
|
TRec_sheet(int logicnum, const char * tab);
|
1997-07-22 12:58:54 +00:00
|
|
|
TRec_sheet(TExternisamfile* file);
|
1996-05-08 11:02:26 +00:00
|
|
|
virtual ~TRec_sheet();
|
1994-08-12 10:52:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class TEdit_file : public TObject
|
|
|
|
{
|
|
|
|
protected:
|
|
|
|
KEY edit_record(TRectype& rec, bool readonly = FALSE);
|
1997-07-22 12:58:54 +00:00
|
|
|
bool _browse(TCursor& cur, const TFilename& name);
|
1994-08-12 10:52:49 +00:00
|
|
|
public:
|
1996-06-14 15:45:50 +00:00
|
|
|
bool browse(int logicnum, const TFilename& name, const TString& tab);
|
1997-07-22 12:58:54 +00:00
|
|
|
bool browse(TExternisamfile* file, const TFilename& name);
|
1996-05-08 11:02:26 +00:00
|
|
|
TEdit_file() {}
|
|
|
|
virtual ~TEdit_file() {}
|
1994-08-12 10:52:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|