47 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			C++
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			47 lines
		
	
	
		
			1.1 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;
 | 
						|
 | 
						|
protected:
 | 
						|
  virtual word class_id() const;
 | 
						|
  virtual bool on_hit();
 | 
						|
  virtual bool on_key(KEY k);
 | 
						|
 | 
						|
  virtual void parse_head(TScanner& scanner);
 | 
						|
  virtual bool parse_item(TScanner& scanner);
 | 
						|
  virtual void create(WINDOW parent);
 | 
						|
 | 
						|
public:
 | 
						|
  TToken_string& row(int n);    // Get/Create a new row
 | 
						|
  TArray& rows_array() const;   // Get all rows
 | 
						|
  int first_empty() const;      // First empty row
 | 
						|
  int items() const;            // Number of rows
 | 
						|
 | 
						|
  virtual void reset();
 | 
						|
  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); }
 | 
						|
 | 
						|
  TSheet_field(TMask* m);
 | 
						|
  virtual ~TSheet_field();
 | 
						|
};
 | 
						|
 | 
						|
#endif
 |