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)
|
// Ritorna la finestra della pagina corrente (Usare con attenzione)
|
||||||
WINDOW win() const { return _page == -1 ? NULL_WIN : _pagewin[_page]; }
|
WINDOW win() const { return _page == -1 ? NULL_WIN : _pagewin[_page]; }
|
||||||
WINDOW toolwin() const { return _pagewin[MAX_PAGES]; }
|
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
|
int find_field_win(WINDOW win) const; // number of field with window win
|
||||||
|
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
// $Id: maskfld.cpp,v 1.47 1994-11-15 11:23:06 guy Exp $
|
// $Id: maskfld.cpp,v 1.48 1994-11-15 17:14:22 guy Exp $
|
||||||
#include <xvt.h>
|
#include <xvt.h>
|
||||||
|
|
||||||
#include <applicat.h>
|
#include <applicat.h>
|
||||||
#include <defmask.h>
|
#include <defmask.h>
|
||||||
#include <execp.h>
|
#include <execp.h>
|
||||||
#include <mailbox.h>
|
#include <mailbox.h>
|
||||||
#include <sheet.h>
|
|
||||||
#include <mask.h>
|
#include <mask.h>
|
||||||
#include <relation.h>
|
#include <relation.h>
|
||||||
|
#include <sheet.h>
|
||||||
#include <tabutil.h>
|
#include <tabutil.h>
|
||||||
#include <urldefid.h>
|
#include <urldefid.h>
|
||||||
#include <utility.h>
|
#include <utility.h>
|
||||||
@ -377,6 +377,11 @@ word TMask_field::last_key() const
|
|||||||
|
|
||||||
void TMask_field::set_dirty(bool d)
|
void TMask_field::set_dirty(bool d)
|
||||||
{
|
{
|
||||||
|
#ifdef DBG
|
||||||
|
if (dlg() == 103)
|
||||||
|
d *= 1;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (_flags.dirty > TRUE && d == FALSE)
|
if (_flags.dirty > TRUE && d == FALSE)
|
||||||
return;
|
return;
|
||||||
_flags.dirty = d;
|
_flags.dirty = d;
|
||||||
@ -1495,9 +1500,11 @@ bool TBrowse::check(CheckTime t)
|
|||||||
|
|
||||||
if (_secondary == TRUE && t != RUNNING_CHECK)
|
if (_secondary == TRUE && t != RUNNING_CHECK)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
// if (_checked && t == FINAL_CHECK)
|
// if (_checked && t == FINAL_CHECK)
|
||||||
// return TRUE;
|
// return TRUE;
|
||||||
// _checked = TRUE;
|
// _checked = TRUE;
|
||||||
|
|
||||||
if (_fld->check_type() != CHECK_NONE)
|
if (_fld->check_type() != CHECK_NONE)
|
||||||
{
|
{
|
||||||
const TMaskmode mode = (TMaskmode)field().mask().mode();
|
const TMaskmode mode = (TMaskmode)field().mask().mode();
|
||||||
|
@ -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
|
#ifndef __MASKFLD_H
|
||||||
#define __MASKFLD_H
|
#define __MASKFLD_H
|
||||||
|
|
||||||
@ -230,8 +230,6 @@ protected:
|
|||||||
virtual word class_id() const;
|
virtual word class_id() const;
|
||||||
virtual void parse_head(TScanner& scanner);
|
virtual void parse_head(TScanner& scanner);
|
||||||
virtual bool parse_item(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 create(WINDOW parent);
|
||||||
virtual void destroy();
|
virtual void destroy();
|
||||||
@ -249,6 +247,8 @@ public:
|
|||||||
virtual bool has_check() const;
|
virtual bool has_check() const;
|
||||||
virtual bool has_query() const { return _browse || _sheet;}
|
virtual bool has_query() const { return _browse || _sheet;}
|
||||||
virtual const char* picture_data(const char* data, bool video);
|
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; }
|
virtual CheckType check_type() const { return _check; }
|
||||||
void check_type(CheckType c) { _check = c; }
|
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
|
// Retrieves the corresponding field of the mask from a spredsheet cell
|
||||||
TMask_field* TSpreadsheet::cell2field(const XI_OBJ* cell) const
|
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;
|
int num;
|
||||||
XI_OBJ** column = xi_get_member_list(_list, &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)
|
for (short id = column[pos]->cid; ; id += 100)
|
||||||
{
|
{
|
||||||
TMask_field* f = field(id);
|
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 ...
|
good = f; // We've found a field with the proper ID ...
|
||||||
if (f->active()) break; // ... and it's active: end of search
|
if (f->active()) break; // ... and it's active: end of search
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CHECKD(good, "Can't find field corresponding to column ", pos);
|
||||||
return good;
|
return good;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -567,15 +568,15 @@ break;
|
|||||||
if (_check_enabled)
|
if (_check_enabled)
|
||||||
{
|
{
|
||||||
TMask_field* f = cell2field(xiev->v.xi_obj);
|
TMask_field* f = cell2field(xiev->v.xi_obj);
|
||||||
const int col = (f->dlg() - FIRST_FIELD) % 100;
|
const int col = (f->dlg()-FIRST_FIELD) % 100;
|
||||||
if (!cell_disabled(_cur_row, col))
|
if (cell_disabled(_cur_row, col)) // If the cell is disabled ...
|
||||||
{
|
{
|
||||||
_edit_field = f;
|
dispatch_e_char(win(), K_TAB); // ... skip to the next one.
|
||||||
_cur_col = xiev->v.xi_obj->v.cell.column;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
xiev->refused = TRUE; // Refuse focus on disabled cells
|
_edit_field = f;
|
||||||
|
_cur_col = xiev->v.xi_obj->v.cell.column;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -1 +1 @@
|
|||||||
#define VERSION 1.15
|
#define VERSION 1.16
|
||||||
|
Loading…
x
Reference in New Issue
Block a user