Aggiustate sciocchezzuole su righe disabilitate array-sheet

Altri files modificati per cause spurie (fmkmk problematici)


git-svn-id: svn://10.65.10.50/trunk@802 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
villa 1994-12-29 14:51:43 +00:00
parent 929a349a3c
commit ecfe1f34a1
20 changed files with 1040 additions and 1000 deletions

View File

@ -1 +1,35 @@
/* Maschera ricerca per viswin */ /* Maschera ricerca per viswin */
#include "bagn005.h"
PAGE "Cerca testo" -1 -1 55 11
STRING F_STRING 45 70
BEGIN
PROMPT 1 1 "Ricerca: "
END
LIST F_DIRECT
BEGIN
PROMPT 1 2 "Direzione "
ITEM "D|Avanti"
ITEM "U|Indietro"
END
BOOLEAN F_CASE
BEGIN
PROMPT 30 2 "Maiuscolo/Minuscolo"
END
BUTTON DLG_OK 10 2
BEGIN
PROMPT -12 -1 ""
END
BUTTON DLG_CANCEL 10 2
BEGIN
PROMPT -22 -1 ""
END
ENDPAGE
ENDMASK

View File

@ -16,7 +16,7 @@
class TField_array : public TArray class TField_array : public TArray
{ {
public: public:
// @FPUB // @FPUB
TField& operator[] (int index) const { return (TField&)TArray::operator[](index); } // Operatore [] ritorna il campo di posto index. TField& operator[] (int index) const { return (TField&)TArray::operator[](index); } // Operatore [] ritorna il campo di posto index.

View File

@ -1,4 +1,4 @@
/* $Id: maskfld.h,v 1.17 1994-12-28 11:01:27 guy Exp $ */ /* $Id: maskfld.h,v 1.18 1994-12-29 14:51:27 villa Exp $ */
#ifndef __MASKFLD_H #ifndef __MASKFLD_H
#define __MASKFLD_H #define __MASKFLD_H

View File

@ -203,7 +203,7 @@ void TSheet::handler(WINDOW win, EVENT* ep)
select(nuo); select(nuo);
if (ep->type == E_MOUSE_DBL) if (ep->type == E_MOUSE_DBL)
dispatch_e_char(win, K_ENTER); dispatch_e_char(win, K_ENTER);
else if (_checkable && _check_enabled && vec == nuo) else if (_checkable && _check_enabled && !_disabled[nuo] && vec == nuo)
{ {
_checked.not(nuo); _checked.not(nuo);
force_update(); force_update();
@ -456,30 +456,29 @@ bool TSheet::update_row(long n)
const char* s; const char* s;
int x = 0; int x = 0;
for (int j = 0; (s = t.get()) != NULL; x += _size[j++]+1) const bool chk = _checked[n] && !_disabled[n];
{
int x1 = x;
bool changed = FALSE; bool changed = FALSE;
if (n >= 0)
{ if (chk)
if (_checkable && j == 0)
{
const bool c = _checked[n];
s = c ? "X" : " ";
if (c)
{ {
changed = TRUE; changed = TRUE;
set_color(COLOR_RED, COLOR_LTGRAY); set_color(MASK_BACK_COLOR, COLOR_LTGRAY);
} }
} else if (_disabled[n])
const bool c = _disabled[n];
if (c)
{ {
set_color(COLOR_GRAY, COLOR_LTGRAY); set_color(COLOR_GRAY, COLOR_LTGRAY);
changed = TRUE; changed = TRUE;
} }
for (int j = 0; (s = t.get()) != NULL; x += _size[j++]+1)
{
int x1 = x;
if (n >= 0)
{
if (_checkable && j == 0)
{
s = chk ? "X" : " ";
}
switch (_type[j]) switch (_type[j])
{ {
case 'R': case 'R':
@ -496,9 +495,9 @@ bool TSheet::update_row(long n)
x1 += (_size[j]-strlen(s)) >> 1; // Centra le testate x1 += (_size[j]-strlen(s)) >> 1; // Centra le testate
stringat(x1, y, s); stringat(x1, y, s);
}
if (changed) if (changed)
set_color(COLOR_BLACK, COLOR_LTGRAY); set_color(COLOR_BLACK, COLOR_LTGRAY);
}
return TRUE; return TRUE;
} }
@ -604,6 +603,13 @@ TArray_sheet::TArray_sheet(short x, short y, short dx, short dy,
: TSheet(x, y, dx, dy, caption, head, buttons, 0L, parent) : TSheet(x, y, dx, dy, caption, head, buttons, 0L, parent)
{} {}
bool TArray_sheet::destroy(int i)
{
uncheck(-1);
enable(-1);
return _data.destroy(i, TRUE);
}
void TArray_sheet::page_build(long first, byte num) void TArray_sheet::page_build(long first, byte num)
{ {
for (byte i = 0; i < num; i++) for (byte i = 0; i < num; i++)

View File

@ -120,7 +120,7 @@ public:
long add(TToken_string* s); long add(TToken_string* s);
long insert(const TToken_string& s, long n); long insert(const TToken_string& s, long n);
virtual TToken_string& row(long s = -1) { return (s < 0) ? data(selected()) : data(s); } virtual TToken_string& row(long s = -1) { return (s < 0) ? data(selected()) : data(s); }
bool destroy(int i = -1) { uncheck(-1); return _data.destroy(i, TRUE); } bool destroy(int i = -1);
}; };

View File

@ -5,17 +5,17 @@
#include <object.h> #include <object.h>
#endif #endif
/* /*
@(SH) Header @(SH) Header
@(C#) PUBBLICHE @(C#) PUBBLICHE
@(C$) PRIVATE @(C$) PRIVATE
@(VG#) PUBBLICHE @(VG#) PUBBLICHE
@(VG$) PRIVATE @(VG$) PRIVATE
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
*/ */
// @C // @C
// Classe TSort_field : public TObject // Classe TSort_field : public TObject
@ -24,12 +24,12 @@
class TSort_field : public TObject class TSort_field : public TObject
{ {
protected: protected:
// @DPROT // @DPROT
int pos; int pos;
int len; int len;
char ad; char ad;
public: public:
// @FPUB // @FPUB
virtual const char* class_name() const pure; virtual const char* class_name() const pure;
virtual void print_on(ostream& out) const pure; virtual void print_on(ostream& out) const pure;
virtual void read_from(istream&) {}; virtual void read_from(istream&) {};

View File

@ -11,11 +11,11 @@
class TStack : private TArray class TStack : private TArray
{ {
// @DPRIV // @DPRIV
int _sp; // Puntatore alla cima dello stack int _sp; // Puntatore alla cima dello stack
public: public:
// @FPUB // @FPUB
TStack(int size); // Chiama il costruttore di TArray(size) TStack(int size); // Chiama il costruttore di TArray(size)
int count() const { return _sp; } // Ritorna il puntatore allo stack int count() const { return _sp; } // Ritorna il puntatore allo stack

View File

@ -9,7 +9,7 @@ class TSystem_cursor : public TCursor
{ {
virtual TRecnotype buildcursor(TRecnotype rp); virtual TRecnotype buildcursor(TRecnotype rp);
public: public:
void mark_deleted(bool deleted = FALSE); void mark_deleted(bool deleted = FALSE);
void recall() { mark_deleted(FALSE);} void recall() { mark_deleted(FALSE);}

View File

@ -1,4 +1,4 @@
// $Id: value.h,v 1.1.1.1 1994-08-12 10:52:08 alex Exp $ // $Id: value.h,v 1.2 1994-12-29 14:51:40 villa Exp $
// language types for Simulation and SimulationManager // language types for Simulation and SimulationManager
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
@ -18,7 +18,7 @@
enum basetype enum basetype
{ {
UNDEFINED, VOID, INT, LONG, CHAR, DOUBLE, STRING UNDEFINED, VOID, INT, LONG, CHAR, DOUBLE, STRING
}; };
class Value class Value
{ {

View File

@ -1967,7 +1967,7 @@ void TViswin::find_next()
} }
TViswin ::TViswin (const char *fname, TViswin::TViswin(const char *fname,
const char *title, const char *title,
bool editbutton, bool editbutton,
bool printbutton, bool printbutton,
@ -2070,7 +2070,7 @@ TViswin ::TViswin (const char *fname,
_curbut = 0; _curbut = 0;
if (_isopen) if (_isopen)
_wtimer = set_timer (win (), 150l); _wtimer = set_timer(win(), 150l);
_point.set (0, 0); _point.set (0, 0);
autoscroll (FALSE); autoscroll (FALSE);