2b33f854d2
posto dei normali TCursor_sheet. L'oggetto in questione ha in piu' un TBit_array utilizzato nei filtri delle stampe scadenzario/scaduto. Ogni elemento di questo TBit_array e' posto a uno in corrispondenza del numero di record del CLI/FO o CONTO selezionato. Sono state apportate le dovute modifiche ai metodi di TSelection_mask che ritornano i TCursor_sheet ed in piu' sono stati resi virtuali 2 metodi (reset_sheet e cur_sheet) per una classe derivata da usare sempre in stampa scadenzario/scaduto. In scselmsk.h sono stati aggiunti alcuni identificatori (Relativi a PCON). git-svn-id: svn://10.65.10.50/trunk@2224 c028cbd2-c16b-5b4b-a496-9718f37d4682
84 lines
2.0 KiB
C++
Executable File
84 lines
2.0 KiB
C++
Executable File
#ifndef __SCSELECT_H
|
|
#define __SCSELECT_H
|
|
|
|
#ifndef __MASK_H
|
|
#include <mask.h>
|
|
#endif
|
|
|
|
#ifndef __RELATION_H
|
|
#include <relation.h>
|
|
#endif
|
|
|
|
#ifndef __SHEET_H
|
|
#include <sheet.h>
|
|
#endif
|
|
|
|
#ifndef __SCSELMSK_H
|
|
#include "scselmsk.h"
|
|
#endif
|
|
|
|
class TCursor_sheet_recno : public TCursor_sheet
|
|
{
|
|
TBit_array _recnos;
|
|
|
|
protected:
|
|
virtual bool on_key(KEY k);
|
|
public:
|
|
TCursor_sheet_recno(TCursor * cursor, const char* fields,
|
|
const char * title, const char * head, byte buttons = 0);
|
|
virtual ~TCursor_sheet_recno() {}
|
|
bool rec_checked(TRecnotype n) { return _recnos[n]; }
|
|
void rec_check(TRecnotype n, bool on = TRUE) ;
|
|
void rec_uncheck(TRecnotype n) { rec_check(n,FALSE); }
|
|
};
|
|
|
|
class TSelection_mask : public TMask
|
|
{
|
|
TRelation* _clifo_rel;
|
|
TCursor* _cli_cur_k1;
|
|
TCursor* _cli_cur_k2;
|
|
TCursor* _for_cur_k1;
|
|
TCursor* _for_cur_k2;
|
|
|
|
TCursor_sheet_recno* _cli_sh_k1;
|
|
TCursor_sheet_recno* _cli_sh_k2;
|
|
TCursor_sheet_recno* _for_sh_k1;
|
|
TCursor_sheet_recno* _for_sh_k2;
|
|
|
|
char _who;
|
|
int _key;
|
|
|
|
protected: // TMask
|
|
virtual void set_handler(short fld_id, CONTROL_HANDLER handler);
|
|
|
|
protected:
|
|
void select_clifo_range(long from, long to);
|
|
void set_clifo_limits();
|
|
|
|
void set_who(char w) { _who = w; }
|
|
void set_key (int k) { _key = k; }
|
|
|
|
virtual void reset_sheets();
|
|
|
|
// handlers
|
|
static bool bfrom_handler(TMask_field& f, KEY k);
|
|
static bool bto_handler(TMask_field& f, KEY k);
|
|
static bool ffrom_handler(TMask_field& f, KEY k);
|
|
static bool fto_handler(TMask_field& f, KEY k);
|
|
static bool breset_handler(TMask_field& f, KEY k);
|
|
static bool bselect_handler(TMask_field& f, KEY k);
|
|
static bool rclifo_handler(TMask_field& f, KEY k);
|
|
static bool rsortcf_handler(TMask_field& f, KEY k);
|
|
|
|
public:
|
|
virtual TCursor_sheet_recno& cur_sheet();
|
|
|
|
char get_who() const { return _who; }
|
|
int get_key() const { return _key; }
|
|
|
|
TSelection_mask(const char* name);
|
|
virtual ~TSelection_mask();
|
|
};
|
|
|
|
#endif
|