campo-sirio/include/msksheet.h
alex 0d179a37c6 Modifica 95/3
Modificato l' append delle righe per poterle inserire anche in mezzo ad uno sheet


git-svn-id: svn://10.65.10.50/trunk@1668 c028cbd2-c16b-5b4b-a496-9718f37d4682
1995-08-03 13:56:34 +00:00

62 lines
1.5 KiB
C++
Executable File

#ifndef __MSKSHEET_H
#define __MSKSHEET_H
#ifndef __MASK_H
#include <mask.h>
#endif
class TSpreadsheet;
typedef bool (*SPREADSHEET_NOTIFY)(int r, KEY k);
class TSheet_field : public TMask_field
{
TSpreadsheet* _sheet;
TToken_string _head;
bool _append;
protected:
virtual word class_id() const;
virtual bool on_hit();
virtual bool on_key(KEY k);
virtual bool test_focus_change();
virtual void parse_head(TScanner& scanner);
virtual bool parse_item(TScanner& scanner);
virtual void create(WINDOW parent);
virtual void highlight() const;
virtual void exchange(bool show_value, const real& n);
public:
TToken_string& row(int n); // Get/Create a new row
TString_array& rows_array() const; // Get all rows
int first_empty() const; // First empty row
int items() const; // Number of rows
int selected() const; // Number of current row
virtual void reset();
virtual void enable(bool on);
void on_idle();
void destroy(int r = -1); // Destroy row
void force_update(int r = -1);// Update data/screen
TMask& sheet_mask() const;
void set_notify(SPREADSHEET_NOTIFY n);
void enable_column(int col, bool on = TRUE);
void enable_cell(int row, int column, bool on = TRUE);
void disable_cell(int row, int column) { enable_cell(row, column, FALSE); }
bool cell_disabled(int row, int column) const;
void set_append(bool on = TRUE) { _append = on;}
bool append() const { return _append;}
TSheet_field(TMask* m);
virtual ~TSheet_field();
};
#endif