Migliorata gestione celle disabilitate
git-svn-id: svn://10.65.10.50/trunk@628 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
496edc10f2
commit
efccdb6226
@ -55,7 +55,6 @@ protected:
|
||||
// Ritorna la finestra della pagina corrente (Usare con attenzione)
|
||||
WINDOW win() const { return _page == -1 ? NULL_WIN : _pagewin[_page]; }
|
||||
WINDOW toolwin() const { return _pagewin[MAX_PAGES]; }
|
||||
WINDOW fieldwin(short id) const { return field(id).win(); }
|
||||
|
||||
int find_field_win(WINDOW win) const; // number of field with window win
|
||||
|
||||
|
6091
include/maskfld.cpp
6091
include/maskfld.cpp
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
||||
/* $Id: maskfld.h,v 1.9 1994-11-15 11:23:11 guy Exp $ */
|
||||
/* $Id: maskfld.h,v 1.10 1994-11-15 17:14:28 guy Exp $ */
|
||||
#ifndef __MASKFLD_H
|
||||
#define __MASKFLD_H
|
||||
|
||||
@ -230,8 +230,6 @@ protected:
|
||||
virtual word class_id() const;
|
||||
virtual void parse_head(TScanner& scanner);
|
||||
virtual bool parse_item(TScanner& scanner);
|
||||
virtual void show(bool on);
|
||||
virtual void enable(bool on);
|
||||
|
||||
virtual void create(WINDOW parent);
|
||||
virtual void destroy();
|
||||
@ -249,6 +247,8 @@ public:
|
||||
virtual bool has_check() const;
|
||||
virtual bool has_query() const { return _browse || _sheet;}
|
||||
virtual const char* picture_data(const char* data, bool video);
|
||||
virtual void show(bool on = TRUE);
|
||||
virtual void enable(bool on = TRUE);
|
||||
virtual CheckType check_type() const { return _check; }
|
||||
void check_type(CheckType c) { _check = c; }
|
||||
|
||||
|
@ -290,7 +290,7 @@ int TSpreadsheet::rec2row(int record)
|
||||
// Retrieves the corresponding field of the mask from a spredsheet cell
|
||||
TMask_field* TSpreadsheet::cell2field(const XI_OBJ* cell) const
|
||||
{
|
||||
const int pos = cell->v.cell.column;
|
||||
const int& pos = cell->v.cell.column;
|
||||
|
||||
int num;
|
||||
XI_OBJ** column = xi_get_member_list(_list, &num);
|
||||
@ -299,11 +299,12 @@ TMask_field* TSpreadsheet::cell2field(const XI_OBJ* cell) const
|
||||
for (short id = column[pos]->cid; ; id += 100)
|
||||
{
|
||||
TMask_field* f = field(id);
|
||||
if (f == NULL) break;
|
||||
if (f == NULL) break; // End of search
|
||||
good = f; // We've found a field with the proper ID ...
|
||||
if (f->active()) break; // ... and it's active: end of search
|
||||
}
|
||||
|
||||
CHECKD(good, "Can't find field corresponding to column ", pos);
|
||||
return good;
|
||||
}
|
||||
|
||||
@ -565,18 +566,18 @@ break;
|
||||
break;
|
||||
case XIE_ON_CELL:
|
||||
if (_check_enabled)
|
||||
{
|
||||
{
|
||||
TMask_field* f = cell2field(xiev->v.xi_obj);
|
||||
const int col = (f->dlg() - FIRST_FIELD) % 100;
|
||||
if (!cell_disabled(_cur_row, col))
|
||||
{
|
||||
_edit_field = f;
|
||||
_cur_col = xiev->v.xi_obj->v.cell.column;
|
||||
const int col = (f->dlg()-FIRST_FIELD) % 100;
|
||||
if (cell_disabled(_cur_row, col)) // If the cell is disabled ...
|
||||
{
|
||||
dispatch_e_char(win(), K_TAB); // ... skip to the next one.
|
||||
}
|
||||
else
|
||||
{
|
||||
xiev->refused = TRUE; // Refuse focus on disabled cells
|
||||
}
|
||||
{
|
||||
_edit_field = f;
|
||||
_cur_col = xiev->v.xi_obj->v.cell.column;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case XIE_OFF_CELL:
|
||||
|
@ -1 +1 @@
|
||||
#define VERSION 1.15
|
||||
#define VERSION 1.16
|
||||
|
Loading…
x
Reference in New Issue
Block a user