default.url Aggiunto discardable alle icone ed ai cursori
form.* Resi virtuali i metodi sul cursore e la relazione principale mask.h Resa virtuale la on_firm_change relation.cpp Eliminata include di sort.h sheet.* Aggiunto metodo cursor() e reso nuovamente privato _cursor sort.* Eliminata include di isam.h git-svn-id: svn://10.65.10.50/trunk@2207 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
7e7aec3dea
commit
1b4bb30c66
@ -96,10 +96,10 @@ image BMP_DOC "f:/p.due/bmp/doc.bmp"
|
|||||||
|
|
||||||
#scan <xil.h>
|
#scan <xil.h>
|
||||||
#transparent $$$
|
#transparent $$$
|
||||||
XI_CURSOR_RESIZE cursor f:/p.due/bmp/resize.cur
|
XI_CURSOR_RESIZE CURSOR DISCARDABLE f:/p.due/bmp/resize.cur
|
||||||
XI_CURSOR_HAND cursor f:/p.due/bmp/hand.cur
|
XI_CURSOR_HAND CURSOR DISCARDABLE f:/p.due/bmp/hand.cur
|
||||||
XI_CURSOR_VRESIZE cursor f:/p.due/bmp/vresize.cur
|
XI_CURSOR_VRESIZE CORSOR DISCARDABLE f:/p.due/bmp/vresize.cur
|
||||||
COMBO_ICON icon f:/p.due/bmp/combo.ico
|
COMBO_ICON ICON DISCARDABLE f:/p.due/bmp/combo.ico
|
||||||
ICO_SEARCH icon f:/p.due/bmp/search.ico
|
ICO_SEARCH ICON DISCARDABLE f:/p.due/bmp/search.ico
|
||||||
$$$
|
$$$
|
||||||
#endif
|
#endif
|
||||||
|
@ -1001,7 +1001,8 @@ bool TForm_string::read()
|
|||||||
if (_field.items() != 0)
|
if (_field.items() != 0)
|
||||||
{
|
{
|
||||||
const char* s = "";
|
const char* s = "";
|
||||||
const TRelation* r = form().relation();
|
const TRelation* r = form().relation();
|
||||||
|
CHECK(r, "Can't read from null relation");
|
||||||
for (int i = 0; i < _field.items() && *s == '\0'; i++)
|
for (int i = 0; i < _field.items() && *s == '\0'; i++)
|
||||||
s = field(i).read(r);
|
s = field(i).read(r);
|
||||||
set(s);
|
set(s);
|
||||||
@ -2470,7 +2471,7 @@ void TForm::arrange_form()
|
|||||||
|
|
||||||
long TForm::records() const
|
long TForm::records() const
|
||||||
{
|
{
|
||||||
const long r = _cursor ? _cursor->items() : 0;
|
const long r = cursor() ? cursor()->items() : 0;
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2551,7 +2552,7 @@ bool TForm::print(long from, long to)
|
|||||||
for (long i = from; i <= to && ok; i++)
|
for (long i = from; i <= to && ok; i++)
|
||||||
{
|
{
|
||||||
if (from < 0) to = from;
|
if (from < 0) to = from;
|
||||||
else if (_cursor) *_cursor = i;
|
else if (cursor()) *cursor() = i;
|
||||||
|
|
||||||
const word h = set_body(page(pr), FALSE);
|
const word h = set_body(page(pr), FALSE);
|
||||||
if (h > pr.rows_left())
|
if (h > pr.rows_left())
|
||||||
@ -2562,7 +2563,7 @@ bool TForm::print(long from, long to)
|
|||||||
|
|
||||||
if (i == lastrec)
|
if (i == lastrec)
|
||||||
{
|
{
|
||||||
if (_cursor) *_cursor = i;
|
if (cursor()) *cursor() = i;
|
||||||
_lastpage = TRUE;
|
_lastpage = TRUE;
|
||||||
set_background(0, TRUE);
|
set_background(0, TRUE);
|
||||||
set_header(0, TRUE);
|
set_header(0, TRUE);
|
||||||
@ -2778,7 +2779,7 @@ TForm::TForm(const char* name, const char* code, int lev, const char* desc)
|
|||||||
{
|
{
|
||||||
main_app().begin_wait();
|
main_app().begin_wait();
|
||||||
|
|
||||||
if (_code != "")
|
if (_code.not_empty())
|
||||||
{
|
{
|
||||||
// extract base form name
|
// extract base form name
|
||||||
TLocalisamfile forms(LF_FORM);
|
TLocalisamfile forms(LF_FORM);
|
||||||
@ -2833,7 +2834,7 @@ TForm::TForm(const char* name, const char* code, int lev, const char* desc)
|
|||||||
ok = ps->parse(scanner); // Parse section
|
ok = ps->parse(scanner); // Parse section
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_code != "")
|
if (_code.not_empty())
|
||||||
read_profile(); // read from LF_RFORM file
|
read_profile(); // read from LF_RFORM file
|
||||||
|
|
||||||
main_app().end_wait();
|
main_app().end_wait();
|
||||||
|
@ -178,10 +178,9 @@ public:
|
|||||||
bool edit_level() const { return _editlevel; }
|
bool edit_level() const { return _editlevel; }
|
||||||
void set_description(const char* s) { _desc = s; }
|
void set_description(const char* s) { _desc = s; }
|
||||||
|
|
||||||
TRelation* relation() const { return _relation; }
|
virtual TRelation* relation() const { return _relation; }
|
||||||
|
virtual TCursor* cursor() const { return _cursor; }
|
||||||
TRelation_description& rel_desc() const;
|
TRelation_description& rel_desc() const;
|
||||||
|
|
||||||
TCursor* cursor() const { return _cursor; }
|
|
||||||
virtual bool validate(TForm_item& fld, TToken_string& val);
|
virtual bool validate(TForm_item& fld, TToken_string& val);
|
||||||
|
|
||||||
TForm_item& find_field(char sec, pagetype pag, short id) const;
|
TForm_item& find_field(char sec, pagetype pag, short id) const;
|
||||||
|
@ -258,7 +258,7 @@ public:
|
|||||||
virtual void on_idle();
|
virtual void on_idle();
|
||||||
// @cmember Aggiorna in tutti campi della maschera, che fanno riferimento ad una ditta,
|
// @cmember Aggiorna in tutti campi della maschera, che fanno riferimento ad una ditta,
|
||||||
// con il riferimento alla ditta attuale
|
// con il riferimento alla ditta attuale
|
||||||
void on_firm_change();
|
virtual void on_firm_change();
|
||||||
|
|
||||||
// @cmember Abilita/disabilita un campo
|
// @cmember Abilita/disabilita un campo
|
||||||
virtual void enable(short fld_id, bool on = TRUE);
|
virtual void enable(short fld_id, bool on = TRUE);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// $Id: relation.cpp,v 1.70 1995-11-22 13:55:00 matteo Exp $
|
// $Id: relation.cpp,v 1.71 1995-11-27 08:39:02 guy Exp $
|
||||||
// relation.cpp
|
// relation.cpp
|
||||||
// fv 12/8/93
|
// fv 12/8/93
|
||||||
// relation class for isam files
|
// relation class for isam files
|
||||||
@ -13,6 +13,7 @@
|
|||||||
#include <prefix.h>
|
#include <prefix.h>
|
||||||
#include <relation.h>
|
#include <relation.h>
|
||||||
#include <sheet.h>
|
#include <sheet.h>
|
||||||
|
#include <sort.h>
|
||||||
#include <tabutil.h>
|
#include <tabutil.h>
|
||||||
#include <utility.h>
|
#include <utility.h>
|
||||||
#include <xvtility.h>
|
#include <xvtility.h>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $Id: relation.h,v 1.30 1995-11-22 13:55:07 matteo Exp $ */
|
/* $Id: relation.h,v 1.31 1995-11-27 08:39:10 guy Exp $ */
|
||||||
// join.h
|
// join.h
|
||||||
// fv 12/8/93
|
// fv 12/8/93
|
||||||
// join class for isam files
|
// join class for isam files
|
||||||
@ -11,7 +11,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __SORT_H
|
#ifndef __SORT_H
|
||||||
#include <sort.h>
|
class TSort;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
class TRelation : public TObject
|
class TRelation : public TObject
|
||||||
@ -53,9 +53,11 @@ public:
|
|||||||
virtual int last(TReclock lockop = _nolock) { return file().last(lockop) == NOERR ? position_rels(_isequal, lockop) : file().status(); }
|
virtual int last(TReclock lockop = _nolock) { return file().last(lockop) == NOERR ? position_rels(_isequal, lockop) : file().status(); }
|
||||||
virtual int skip(TRecnotype nrec, TReclock lockop = _nolock) { return file().skip(nrec, lockop) == NOERR ? position_rels(_isequal, lockop) : file().status(); }
|
virtual int skip(TRecnotype nrec, TReclock lockop = _nolock) { return file().skip(nrec, lockop) == NOERR ? position_rels(_isequal, lockop) : file().status(); }
|
||||||
virtual int read(TIsamop op = _isgteq, TReclock lockop = _nolock, TDate& atdate = (TDate&)botime) { return file().read(op, lockop, atdate) == NOERR ? position_rels(_isequal, lockop, atdate) : file().status();}
|
virtual int read(TIsamop op = _isgteq, TReclock lockop = _nolock, TDate& atdate = (TDate&)botime) { return file().read(op, lockop, atdate) == NOERR ? position_rels(_isequal, lockop, atdate) : file().status();}
|
||||||
|
|
||||||
TLocalisamfile& lfile(int logicnum = 0) const;
|
TLocalisamfile& lfile(int logicnum = 0) const;
|
||||||
TLocalisamfile& lfile(const char* name) const;
|
TLocalisamfile& lfile(const char* name) const;
|
||||||
|
TLocalisamfile& operator[] (int logicnum) const { return lfile(logicnum); }
|
||||||
|
|
||||||
void write_enable(int logicnum = 0, const bool on = TRUE) ;
|
void write_enable(int logicnum = 0, const bool on = TRUE) ;
|
||||||
void write_enable(const char* name, const bool on = TRUE) ;
|
void write_enable(const char* name, const bool on = TRUE) ;
|
||||||
void write_disable(int logicnum = 0) { write_enable(logicnum, FALSE); }
|
void write_disable(int logicnum = 0) { write_enable(logicnum, FALSE); }
|
||||||
|
@ -895,17 +895,17 @@ bool TBrowse_sheet::on_key(KEY k)
|
|||||||
else field().set_field_data(val);
|
else field().set_field_data(val);
|
||||||
|
|
||||||
((TBrowse*)field().browse())->do_input(FALSE);
|
((TBrowse*)field().browse())->do_input(FALSE);
|
||||||
_cursor->read();
|
cursor()->read();
|
||||||
if (_cursor->file().bad())
|
if (cursor()->file().bad())
|
||||||
{
|
{
|
||||||
beep();
|
beep();
|
||||||
val = old;
|
val = old;
|
||||||
if (corre) xvt_vobj_set_title(fldwin, (char*)(const char*)val);
|
if (corre) xvt_vobj_set_title(fldwin, (char*)(const char*)val);
|
||||||
else field().set_field_data(val);
|
else field().set_field_data(val);
|
||||||
*_cursor = oldsel;
|
*cursor() = oldsel;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
select(_cursor->pos());
|
select(cursor()->pos());
|
||||||
|
|
||||||
if (ctl != NULL_WIN)
|
if (ctl != NULL_WIN)
|
||||||
{
|
{
|
||||||
|
@ -247,26 +247,34 @@ class TCursor_sheet : public TSheet
|
|||||||
// @cmember Numero del records collegato al cursore
|
// @cmember Numero del records collegato al cursore
|
||||||
long _records;
|
long _records;
|
||||||
|
|
||||||
// @access Protected Member
|
|
||||||
protected:
|
|
||||||
// @cmember Cursore da cui prelevare i dati
|
// @cmember Cursore da cui prelevare i dati
|
||||||
TCursor* _cursor;
|
TCursor* _cursor;
|
||||||
|
|
||||||
|
// @access Protected Member
|
||||||
|
protected: // TSheet
|
||||||
// @cmember Costruisce la pgaina (vedi <mf TSheet::page_build>)
|
// @cmember Costruisce la pgaina (vedi <mf TSheet::page_build>)
|
||||||
virtual void page_build(long first, byte rows);
|
virtual void page_build(long first, byte rows);
|
||||||
|
|
||||||
|
// @access Public Member
|
||||||
|
public: // TSheet
|
||||||
|
// @cmember Ritorna il numero dei records del cursore
|
||||||
|
virtual long items() const
|
||||||
|
{ return _records; }
|
||||||
|
|
||||||
|
// @cmember Lancia la finestra con lo sheet
|
||||||
|
virtual KEY run();
|
||||||
|
|
||||||
// @access Public Member
|
// @access Public Member
|
||||||
public:
|
public:
|
||||||
|
// @cmember Ritorna il cursore
|
||||||
|
TCursor* cursor() const
|
||||||
|
{ return _cursor; }
|
||||||
|
|
||||||
// @cmember Costruttore
|
// @cmember Costruttore
|
||||||
TCursor_sheet(TCursor* cursor, const char* fields, const char* title, const char* head, byte buttons = 0);
|
TCursor_sheet(TCursor* cursor, const char* fields, const char* title, const char* head, byte buttons = 0);
|
||||||
// @cmember Distruttore
|
// @cmember Distruttore
|
||||||
virtual ~TCursor_sheet()
|
virtual ~TCursor_sheet()
|
||||||
{}
|
{}
|
||||||
// @cmember Ritorna il numero del records collegato al cursore
|
|
||||||
virtual long items() const
|
|
||||||
{ return _records; }
|
|
||||||
// @cmember Lancia la finestra con lo sheet
|
|
||||||
virtual KEY run();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,22 +1,8 @@
|
|||||||
|
#include <extcdecl.h>
|
||||||
|
#include <isam.h>
|
||||||
#include <sort.h>
|
#include <sort.h>
|
||||||
|
|
||||||
#ifndef __EXTCDECL_H
|
|
||||||
#include <extcdecl.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef __CHECKS_H
|
|
||||||
#include <checks.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//#include <ccommon.h>
|
|
||||||
//#include <ccustio.h>
|
|
||||||
//#include <cfiles.h>
|
|
||||||
//#include <cbpltree.h>
|
|
||||||
//#include <cisam.h>
|
|
||||||
//#include <csort.h>
|
|
||||||
|
|
||||||
TSort::TSort(int len)
|
TSort::TSort(int len)
|
||||||
|
|
||||||
{
|
{
|
||||||
_sortvar = new s_prm;
|
_sortvar = new s_prm;
|
||||||
_sortvar->rc_len = len;
|
_sortvar->rc_len = len;
|
||||||
|
@ -5,10 +5,6 @@
|
|||||||
#include <object.h>
|
#include <object.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __ISAM_H
|
|
||||||
#include <isam.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// @doc EXTERNAL
|
// @doc EXTERNAL
|
||||||
|
|
||||||
// @class TSort | Classe per l'ordinamento di strutture o di record
|
// @class TSort | Classe per l'ordinamento di strutture o di record
|
||||||
@ -18,7 +14,7 @@ class TSort : public TObject
|
|||||||
// @author:(INTERNAL) Alex
|
// @author:(INTERNAL) Alex
|
||||||
{
|
{
|
||||||
// @friend TRecfield
|
// @friend TRecfield
|
||||||
friend TRecfield;
|
friend class TRecfield;
|
||||||
|
|
||||||
// @access Private Member
|
// @access Private Member
|
||||||
|
|
||||||
@ -54,4 +50,5 @@ public:
|
|||||||
// @cmember Distruttore
|
// @cmember Distruttore
|
||||||
virtual ~TSort();
|
virtual ~TSort();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __SORT_H
|
#endif // __SORT_H
|
||||||
|
Loading…
x
Reference in New Issue
Block a user