campo-sirio/lv/lv0500.cpp

70 lines
1.5 KiB
C++
Raw Normal View History

#include <automask.h>
#include <defmask.h>
#include <relapp.h>
#include <tabutil.h>
#include "lv0.h"
#include "lv0500a.h"
//-------------------------------------------------------------------
// MASCHERA
//-------------------------------------------------------------------
class TLavanderie_mask : public TAutomask
{
protected:
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
public:
TLavanderie_mask();
};
bool TLavanderie_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
{
return true;
}
TLavanderie_mask::TLavanderie_mask() : TAutomask("")
{
}
//--------------------------------------------------------------
// APPLICAZIONE
//--------------------------------------------------------------
class TLavanderie : public TRelation_application
{
TLavanderie_mask* _mask;
TRelation* _rel;
protected:
bool user_create();
bool user_destroy();
virtual TMask* get_mask(int mode) { return _mask; }
virtual bool changing_mask(int mode) { return false; }
public:
virtual TRelation* get_relation() const {return (TRelation*)_rel;}
};
bool TLavanderie::user_create()
{
const TString8 name = get_relation()->file(0).name();
_rel = new TRelation(LF_LETINT);
_mask = new TLavanderie_mask;
return true;
}
bool TLavanderie::user_destroy()
{
delete _mask;
return true;
}
int lv0500(int argc, char* argv[])
{
TLavanderie a;
a.run(argc, argv, TR("Archivi Lavanderie"));
return 0;
}