msksheet: aggiunto metodo swap 13/95
relation:
window  : raddoppiato numero massimo finestre modali


git-svn-id: svn://10.65.10.50/trunk@1727 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1995-08-23 09:22:18 +00:00
parent cdea07e1d9
commit 16b36af496
5 changed files with 5555 additions and 5539 deletions

View File

@ -264,7 +264,7 @@ TObject* TArray::remove(
bool dopack) // @parm Indica se si vuole richiamare la funzione
// <mf TArray::pack> (default FALSE) per il compattamento dell'array
// @rdesc Ritorna l'elemento dell'array eliminato
// @rdesc Ritorna l'elemento dell'array eliminato senza farne la delete
{
TObject* o = objptr(index);
if (o)

View File

@ -76,10 +76,12 @@ public:
// Matteo
void delete_column( const int col ) const;
void move_column( const int fromindex, const int toindex ) const;
void swap_columns(const int fromid, const int toid) const;
void swap_rows( const int fromindex, const int toindex);
void set_column_width( const int col, const int width ) const;
void set_column_header( const int col, const TString& header ) const;
void swap_columns(const int fromid, const int toid) const;
void enable_cell(int row, int column, bool on = TRUE);
bool cell_disabled(int row, int column) const;
@ -427,6 +429,7 @@ int TSpreadsheet::insert(int rec)
rec = _cur_rec + 1;
const int r = _str.insert(new TToken_string(80), rec);
const bool ok = notify(r, K_INS);
if (!ok)
@ -436,12 +439,8 @@ int TSpreadsheet::insert(int rec)
}
_disabled.insert(NULL, r);
xi_insert_row(_list, INT_MAX);
xi_cell_request(_list);
if (rec < 0) _cur_row = items() - 1;
else
_cur_row = rec;
return r;
}
@ -1213,6 +1212,11 @@ void TSpreadsheet::swap_columns(const int fromid, const int toid) const
#endif
}
void TSpreadsheet::swap_rows( const int fromindex, const int toindex)
{
_str.swap(fromindex, toindex);
_disabled.swap(fromindex, toindex);
}
void TSpreadsheet::set_column_width(const int col, const int width) const
{
@ -1475,7 +1479,11 @@ TToken_string& TSheet_field::row(int n)
if (n < 0 || n >= max)
{
if (n < 0) n = first_empty();
if (n >= max) n = _sheet->add(new TToken_string(80));
if (n >= max)
{
n = _sheet->add(new TToken_string(80));
force_update();
}
}
return _sheet->row(n);
}
@ -1563,6 +1571,11 @@ void TSheet_field::move_column( const int fromindex, const int toindex ) const
_sheet->move_column(fromindex, toindex);
}
void TSheet_field::swap_rows( const int fromindex, const int toindex)
{
_sheet->swap_rows(fromindex, toindex);
}
void TSheet_field::set_column_width( const int col, const int width ) const
{
_sheet->set_column_width(col, width);
@ -1573,7 +1586,6 @@ void TSheet_field::set_column_header( const int col, const TString& header ) con
_sheet->set_column_header(col, header);
}
TMask& TSheet_field::sheet_mask() const
{
return _sheet->sheet_mask();

View File

@ -62,6 +62,7 @@ public:
void delete_column( const int col ) const;
void move_column( const int fromindex, const int toindex ) const;
void swap_columns(const int fromid, const int toid) const;
void swap_rows( const int fromindex, const int toindex );
void set_column_width( const int col, const int width ) const;
void set_column_header( const int col, const TString& header ) const;

View File

@ -1,4 +1,4 @@
// $Id: relation.cpp,v 1.57 1995-08-21 07:47:12 guy Exp $
// $Id: relation.cpp,v 1.58 1995-08-23 09:22:13 guy Exp $
// relation.cpp
// fv 12/8/93
// relation class for isam files
@ -1720,7 +1720,10 @@ int TRecord_array::read(TRectype* filter)
TRectype* rec = (TRectype*)filter->dup();
err = rec->read(f, _isgteq);
for (int e = err; e == NOERR && *rec == key(); e = rec->next(f))
add_row(*rec);
{
add_row(rec);
rec = (TRectype*)filter->dup();
}
delete rec;
}
return err;

View File

@ -80,7 +80,7 @@ HIDDEN void set_menu_item(MENU_ITEM& m, TToken_string& tt)
class TWindow_manager
{
// @DPRIV
enum { MAX_WIN = 4 }; // Max number of modal windows
enum { MAX_WIN = 8 }; // Max number of modal windows
TWindow* _window[MAX_WIN]; // Stack of active windows
char _current; // Stack pointer