Tolte tutte le set_cursor
git-svn-id: svn://10.65.10.50/trunk@815 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
99d3339570
commit
5961786295
@ -1,4 +1,4 @@
|
|||||||
// $Id: brwapp.cpp,v 1.2 1994-09-07 16:00:28 alex Exp $
|
// $Id: brwapp.cpp,v 1.3 1995-01-03 15:06:26 guy Exp $
|
||||||
|
|
||||||
#include <brwapp.h>
|
#include <brwapp.h>
|
||||||
#include <mailbox.h>
|
#include <mailbox.h>
|
||||||
@ -22,17 +22,14 @@ bool TBrowse_application::main_loop()
|
|||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
// Seleziona il cursore a freccia
|
|
||||||
set_cursor(TASK_WIN, CURSOR_ARROW);
|
|
||||||
|
|
||||||
// Dis/abilita cambio ditta
|
// Dis/abilita cambio ditta
|
||||||
enable_menu_item(M_FILE_NEW, (curr_mask().mode() == MODE_QUERY));
|
enable_menu_item(M_FILE_NEW, (curr_mask().mode() == MODE_QUERY));
|
||||||
|
|
||||||
|
|
||||||
k = curr_mask().run();
|
k = curr_mask().run();
|
||||||
|
|
||||||
// Seleziona il cursore a clessidra se necessario
|
// Seleziona il cursore a clessidra se necessario
|
||||||
if (k != K_QUIT && k != K_F9) set_cursor(TASK_WIN, CURSOR_WAIT);
|
if (k != K_QUIT && k != K_F9)
|
||||||
|
begin_wait();
|
||||||
|
|
||||||
switch (k)
|
switch (k)
|
||||||
{
|
{
|
||||||
@ -83,6 +80,9 @@ bool TBrowse_application::main_loop()
|
|||||||
else query_mode();
|
else query_mode();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (k != K_QUIT && k != K_F9)
|
||||||
|
end_wait();
|
||||||
} while (k != K_QUIT);
|
} while (k != K_QUIT);
|
||||||
|
|
||||||
if (curr_mask().is_open())
|
if (curr_mask().is_open())
|
||||||
|
@ -53,9 +53,7 @@ int TExternal_app::run(bool async, bool user)
|
|||||||
|
|
||||||
if (_exitcode == 0)
|
if (_exitcode == 0)
|
||||||
{
|
{
|
||||||
CURSOR oldcur = get_cursor(TASK_WIN);
|
main_app().begin_wait();
|
||||||
set_cursor(TASK_WIN, CURSOR_WAIT);
|
|
||||||
|
|
||||||
_exitcode = WinExec((char*)(const char*)path, SW_SHOW);
|
_exitcode = WinExec((char*)(const char*)path, SW_SHOW);
|
||||||
|
|
||||||
if (_exitcode >= 32)
|
if (_exitcode >= 32)
|
||||||
@ -91,7 +89,7 @@ int TExternal_app::run(bool async, bool user)
|
|||||||
else
|
else
|
||||||
error_box("Impossibile eseguire '%s':\nErrore %d", (const char*)_path, _exitcode);
|
error_box("Impossibile eseguire '%s':\nErrore %d", (const char*)_path, _exitcode);
|
||||||
}
|
}
|
||||||
set_cursor(TASK_WIN, oldcur);
|
main_app().end_wait();
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
@ -1295,9 +1295,8 @@ word TForm::height()
|
|||||||
|
|
||||||
TForm::TForm(const char* name) : _name(name), _relation(NULL), _cursor(NULL)
|
TForm::TForm(const char* name) : _name(name), _relation(NULL), _cursor(NULL)
|
||||||
{
|
{
|
||||||
const CURSOR oldcur = get_cursor(TASK_WIN);
|
main_app().begin_wait();
|
||||||
set_cursor(TASK_WIN, CURSOR_WAIT);
|
|
||||||
|
|
||||||
_name.ext("frm");
|
_name.ext("frm");
|
||||||
TScanner scanner(_name);
|
TScanner scanner(_name);
|
||||||
|
|
||||||
@ -1320,7 +1319,7 @@ TForm::TForm(const char* name) : _name(name), _relation(NULL), _cursor(NULL)
|
|||||||
ok = ps->parse(scanner);
|
ok = ps->parse(scanner);
|
||||||
}
|
}
|
||||||
|
|
||||||
set_cursor(TASK_WIN, oldcur);
|
main_app().end_wait();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -210,9 +210,7 @@ void TMask::read_mask(const char* name, int num, int max)
|
|||||||
|
|
||||||
init_mask();
|
init_mask();
|
||||||
|
|
||||||
const CURSOR old = get_cursor(TASK_WIN);
|
main_app().begin_wait();
|
||||||
set_cursor(TASK_WIN, CURSOR_WAIT);
|
|
||||||
|
|
||||||
while (scanner.ok() && scanner.popkey() != "EN")
|
while (scanner.ok() && scanner.popkey() != "EN")
|
||||||
{
|
{
|
||||||
if (scanner.key() == "PA")
|
if (scanner.key() == "PA")
|
||||||
@ -228,9 +226,8 @@ void TMask::read_mask(const char* name, int num, int max)
|
|||||||
_pagewin[MAX_PAGES] = read_page(scanner, TRUE);
|
_pagewin[MAX_PAGES] = read_page(scanner, TRUE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
main_app().end_wait();
|
||||||
set_cursor(TASK_WIN, old);
|
|
||||||
|
|
||||||
if (_pages < 1)
|
if (_pages < 1)
|
||||||
fatal_box("Impossibile leggere la maschera %s", name);
|
fatal_box("Impossibile leggere la maschera %s", name);
|
||||||
|
|
||||||
@ -1351,9 +1348,7 @@ void TMask::set_exchange(bool show_value, const real& n)
|
|||||||
{
|
{
|
||||||
const real nuo = (n.sign() <= 0) ? _exchange : n;
|
const real nuo = (n.sign() <= 0) ? _exchange : n;
|
||||||
|
|
||||||
const CURSOR oldcur = get_cursor(TASK_WIN); // Store current cursor
|
main_app().begin_wait();
|
||||||
set_cursor(TASK_WIN, CURSOR_WAIT);
|
|
||||||
|
|
||||||
for (int i = 0; i < fields(); i++)
|
for (int i = 0; i < fields(); i++)
|
||||||
{
|
{
|
||||||
TMask_field& f = fld(i);
|
TMask_field& f = fld(i);
|
||||||
@ -1363,6 +1358,5 @@ void TMask::set_exchange(bool show_value, const real& n)
|
|||||||
}
|
}
|
||||||
|
|
||||||
_exchange = nuo; // Update current exchange
|
_exchange = nuo; // Update current exchange
|
||||||
|
main_app().end_wait();
|
||||||
set_cursor(TASK_WIN, oldcur); // Restore cursor
|
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// $Id: relapp.cpp,v 1.42 1995-01-02 09:32:49 guy Exp $
|
// $Id: relapp.cpp,v 1.43 1995-01-03 15:06:34 guy Exp $
|
||||||
#include <mailbox.h>
|
#include <mailbox.h>
|
||||||
#include <sheet.h>
|
#include <sheet.h>
|
||||||
#include <urldefid.h>
|
#include <urldefid.h>
|
||||||
@ -735,9 +735,6 @@ bool TRelation_application::main_loop()
|
|||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
// Seleziona il cursore a freccia
|
|
||||||
set_cursor(TASK_WIN, CURSOR_ARROW);
|
|
||||||
|
|
||||||
const bool change = _mask->query_mode() && can_change_firm();
|
const bool change = _mask->query_mode() && can_change_firm();
|
||||||
// Dis/abilita cambio ditta
|
// Dis/abilita cambio ditta
|
||||||
enable_menu_item(M_FILE_NEW, change);
|
enable_menu_item(M_FILE_NEW, change);
|
||||||
@ -747,7 +744,8 @@ bool TRelation_application::main_loop()
|
|||||||
k = _mask->run();
|
k = _mask->run();
|
||||||
|
|
||||||
// Seleziona il cursore a clessidra se necessario
|
// Seleziona il cursore a clessidra se necessario
|
||||||
if (k != K_QUIT && k != K_F9) set_cursor(TASK_WIN, CURSOR_WAIT);
|
if (k != K_QUIT && k != K_F9)
|
||||||
|
begin_wait();
|
||||||
|
|
||||||
switch (k)
|
switch (k)
|
||||||
{
|
{
|
||||||
@ -832,6 +830,9 @@ bool TRelation_application::main_loop()
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (k != K_QUIT && k != K_F9)
|
||||||
|
end_wait();
|
||||||
} while (k != K_QUIT);
|
} while (k != K_QUIT);
|
||||||
|
|
||||||
if (_mask->is_open())
|
if (_mask->is_open())
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// $Id: relation.cpp,v 1.28 1994-12-27 14:59:10 guy Exp $
|
// $Id: relation.cpp,v 1.29 1995-01-03 15:06:36 guy Exp $
|
||||||
// relation.cpp
|
// relation.cpp
|
||||||
// fv 12/8/93
|
// fv 12/8/93
|
||||||
// relation class for isam files
|
// relation class for isam files
|
||||||
@ -6,6 +6,7 @@
|
|||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#include <applicat.h>
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <expr.h>
|
#include <expr.h>
|
||||||
#include <extcdecl.h>
|
#include <extcdecl.h>
|
||||||
@ -732,7 +733,7 @@ TRecnotype TCursor::buildcursor(TRecnotype rp)
|
|||||||
fclose(_f);
|
fclose(_f);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
fseek(_f, 0L, SEEK_SET);
|
fseek(_f, 0L, SEEK_SET);
|
||||||
|
|
||||||
l = strlen(to());
|
l = strlen(to());
|
||||||
@ -866,15 +867,13 @@ bool TCursor::changed()
|
|||||||
TRecnotype TCursor::update()
|
TRecnotype TCursor::update()
|
||||||
|
|
||||||
{
|
{
|
||||||
|
main_app().begin_wait();
|
||||||
|
|
||||||
file().setkey(_nkey);
|
file().setkey(_nkey);
|
||||||
file().read(_isgteq);
|
file().read(_isgteq);
|
||||||
|
const TRecnotype totrec = buildcursor(file().recno());
|
||||||
|
|
||||||
const CURSOR old = get_cursor(TASK_WIN);
|
main_app().end_wait();
|
||||||
set_cursor(TASK_WIN, CURSOR_WAIT);
|
|
||||||
|
|
||||||
TRecnotype totrec = buildcursor(file().recno());
|
|
||||||
|
|
||||||
set_cursor(TASK_WIN, old);
|
|
||||||
|
|
||||||
return totrec;
|
return totrec;
|
||||||
}
|
}
|
||||||
|
@ -561,8 +561,9 @@ void TSheet::print()
|
|||||||
TPrinter& pr = main_app().printer();
|
TPrinter& pr = main_app().printer();
|
||||||
TPrintrow row;
|
TPrintrow row;
|
||||||
bool ok = pr.open();
|
bool ok = pr.open();
|
||||||
|
|
||||||
set_cursor(TASK_WIN, CURSOR_WAIT);
|
main_app().begin_wait();
|
||||||
|
|
||||||
int step = visible_rows();
|
int step = visible_rows();
|
||||||
for (long n = 0L; ok && n < items(); n += step)
|
for (long n = 0L; ok && n < items(); n += step)
|
||||||
{
|
{
|
||||||
@ -584,7 +585,8 @@ void TSheet::print()
|
|||||||
ok = pr.print(row);
|
ok = pr.print(row);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
set_cursor(TASK_WIN, CURSOR_ARROW);
|
|
||||||
|
main_app().end_wait();
|
||||||
|
|
||||||
if (ok)
|
if (ok)
|
||||||
{
|
{
|
||||||
|
@ -2145,17 +2145,16 @@ void TBrowsefile_field::parse_head(TScanner& scanner)
|
|||||||
// Certified 100%
|
// Certified 100%
|
||||||
void TBrowsefile_field::create(WINDOW parent)
|
void TBrowsefile_field::create(WINDOW parent)
|
||||||
{
|
{
|
||||||
CURSOR oldcur = get_cursor(TASK_WIN);
|
main_app().begin_wait();
|
||||||
set_cursor(TASK_WIN,CURSOR_WAIT);
|
|
||||||
|
|
||||||
const TMask& m = mask();
|
const TMask& m = mask();
|
||||||
_viswin = new TViswin(_prompt, _prompt, FALSE, FALSE, FALSE, _x, _y,
|
_viswin = new TViswin(_prompt, _prompt, FALSE, FALSE, FALSE, _x, _y,
|
||||||
_size, _width, _flags.rightjust ? TRUE : FALSE, parent, this);
|
_size, _width, _flags.rightjust ? TRUE : FALSE, parent, this);
|
||||||
_win = _viswin->win();
|
_win = _viswin->win();
|
||||||
enable_window(_win, enabled());
|
enable_window(_win, enabled());
|
||||||
show_window(_win, shown());
|
show_window(_win, shown());
|
||||||
|
|
||||||
set_cursor(TASK_WIN, oldcur);
|
main_app().end_wait();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2167,8 +2166,7 @@ long TBrowsefile_field::set_text(const char* file, const char* line)
|
|||||||
if (instr == NULL)
|
if (instr == NULL)
|
||||||
fatal_box("File non trovato: %s", file);
|
fatal_box("File non trovato: %s", file);
|
||||||
|
|
||||||
CURSOR oldcur = get_cursor(TASK_WIN);
|
main_app().begin_wait();
|
||||||
set_cursor(TASK_WIN,CURSOR_WAIT);
|
|
||||||
|
|
||||||
TString256 tmpp;
|
TString256 tmpp;
|
||||||
long ret = -1l;
|
long ret = -1l;
|
||||||
@ -2192,8 +2190,8 @@ long TBrowsefile_field::set_text(const char* file, const char* line)
|
|||||||
fclose(instr);
|
fclose(instr);
|
||||||
|
|
||||||
_viswin->close_print();
|
_viswin->close_print();
|
||||||
set_cursor(TASK_WIN, oldcur);
|
|
||||||
|
main_app().end_wait();
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user