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 <mailbox.h>
|
||||
@ -22,17 +22,14 @@ bool TBrowse_application::main_loop()
|
||||
|
||||
do
|
||||
{
|
||||
// Seleziona il cursore a freccia
|
||||
set_cursor(TASK_WIN, CURSOR_ARROW);
|
||||
|
||||
// Dis/abilita cambio ditta
|
||||
enable_menu_item(M_FILE_NEW, (curr_mask().mode() == MODE_QUERY));
|
||||
|
||||
|
||||
k = curr_mask().run();
|
||||
|
||||
// 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)
|
||||
{
|
||||
@ -83,6 +80,9 @@ bool TBrowse_application::main_loop()
|
||||
else query_mode();
|
||||
break;
|
||||
}
|
||||
|
||||
if (k != K_QUIT && k != K_F9)
|
||||
end_wait();
|
||||
} while (k != K_QUIT);
|
||||
|
||||
if (curr_mask().is_open())
|
||||
|
@ -53,9 +53,7 @@ int TExternal_app::run(bool async, bool user)
|
||||
|
||||
if (_exitcode == 0)
|
||||
{
|
||||
CURSOR oldcur = get_cursor(TASK_WIN);
|
||||
set_cursor(TASK_WIN, CURSOR_WAIT);
|
||||
|
||||
main_app().begin_wait();
|
||||
_exitcode = WinExec((char*)(const char*)path, SW_SHOW);
|
||||
|
||||
if (_exitcode >= 32)
|
||||
@ -91,7 +89,7 @@ int TExternal_app::run(bool async, bool user)
|
||||
else
|
||||
error_box("Impossibile eseguire '%s':\nErrore %d", (const char*)_path, _exitcode);
|
||||
}
|
||||
set_cursor(TASK_WIN, oldcur);
|
||||
main_app().end_wait();
|
||||
}
|
||||
#else
|
||||
|
||||
|
@ -1295,9 +1295,8 @@ word TForm::height()
|
||||
|
||||
TForm::TForm(const char* name) : _name(name), _relation(NULL), _cursor(NULL)
|
||||
{
|
||||
const CURSOR oldcur = get_cursor(TASK_WIN);
|
||||
set_cursor(TASK_WIN, CURSOR_WAIT);
|
||||
|
||||
main_app().begin_wait();
|
||||
|
||||
_name.ext("frm");
|
||||
TScanner scanner(_name);
|
||||
|
||||
@ -1320,7 +1319,7 @@ TForm::TForm(const char* name) : _name(name), _relation(NULL), _cursor(NULL)
|
||||
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();
|
||||
|
||||
const CURSOR old = get_cursor(TASK_WIN);
|
||||
set_cursor(TASK_WIN, CURSOR_WAIT);
|
||||
|
||||
main_app().begin_wait();
|
||||
while (scanner.ok() && scanner.popkey() != "EN")
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
set_cursor(TASK_WIN, old);
|
||||
|
||||
main_app().end_wait();
|
||||
|
||||
if (_pages < 1)
|
||||
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 CURSOR oldcur = get_cursor(TASK_WIN); // Store current cursor
|
||||
set_cursor(TASK_WIN, CURSOR_WAIT);
|
||||
|
||||
main_app().begin_wait();
|
||||
for (int i = 0; i < fields(); 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
|
||||
|
||||
set_cursor(TASK_WIN, oldcur); // Restore cursor
|
||||
main_app().end_wait();
|
||||
}
|
||||
|
@ -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 <sheet.h>
|
||||
#include <urldefid.h>
|
||||
@ -735,9 +735,6 @@ bool TRelation_application::main_loop()
|
||||
|
||||
do
|
||||
{
|
||||
// Seleziona il cursore a freccia
|
||||
set_cursor(TASK_WIN, CURSOR_ARROW);
|
||||
|
||||
const bool change = _mask->query_mode() && can_change_firm();
|
||||
// Dis/abilita cambio ditta
|
||||
enable_menu_item(M_FILE_NEW, change);
|
||||
@ -747,7 +744,8 @@ bool TRelation_application::main_loop()
|
||||
k = _mask->run();
|
||||
|
||||
// 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)
|
||||
{
|
||||
@ -832,6 +830,9 @@ bool TRelation_application::main_loop()
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (k != K_QUIT && k != K_F9)
|
||||
end_wait();
|
||||
} while (k != K_QUIT);
|
||||
|
||||
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
|
||||
// fv 12/8/93
|
||||
// relation class for isam files
|
||||
@ -6,6 +6,7 @@
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <applicat.h>
|
||||
#include <config.h>
|
||||
#include <expr.h>
|
||||
#include <extcdecl.h>
|
||||
@ -732,7 +733,7 @@ TRecnotype TCursor::buildcursor(TRecnotype rp)
|
||||
fclose(_f);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
fseek(_f, 0L, SEEK_SET);
|
||||
|
||||
l = strlen(to());
|
||||
@ -866,15 +867,13 @@ bool TCursor::changed()
|
||||
TRecnotype TCursor::update()
|
||||
|
||||
{
|
||||
main_app().begin_wait();
|
||||
|
||||
file().setkey(_nkey);
|
||||
file().read(_isgteq);
|
||||
const TRecnotype totrec = buildcursor(file().recno());
|
||||
|
||||
const CURSOR old = get_cursor(TASK_WIN);
|
||||
set_cursor(TASK_WIN, CURSOR_WAIT);
|
||||
|
||||
TRecnotype totrec = buildcursor(file().recno());
|
||||
|
||||
set_cursor(TASK_WIN, old);
|
||||
main_app().end_wait();
|
||||
|
||||
return totrec;
|
||||
}
|
||||
|
@ -561,8 +561,9 @@ void TSheet::print()
|
||||
TPrinter& pr = main_app().printer();
|
||||
TPrintrow row;
|
||||
bool ok = pr.open();
|
||||
|
||||
set_cursor(TASK_WIN, CURSOR_WAIT);
|
||||
|
||||
main_app().begin_wait();
|
||||
|
||||
int step = visible_rows();
|
||||
for (long n = 0L; ok && n < items(); n += step)
|
||||
{
|
||||
@ -584,7 +585,8 @@ void TSheet::print()
|
||||
ok = pr.print(row);
|
||||
}
|
||||
}
|
||||
set_cursor(TASK_WIN, CURSOR_ARROW);
|
||||
|
||||
main_app().end_wait();
|
||||
|
||||
if (ok)
|
||||
{
|
||||
|
@ -2145,17 +2145,16 @@ void TBrowsefile_field::parse_head(TScanner& scanner)
|
||||
// Certified 100%
|
||||
void TBrowsefile_field::create(WINDOW parent)
|
||||
{
|
||||
CURSOR oldcur = get_cursor(TASK_WIN);
|
||||
set_cursor(TASK_WIN,CURSOR_WAIT);
|
||||
|
||||
main_app().begin_wait();
|
||||
|
||||
const TMask& m = mask();
|
||||
_viswin = new TViswin(_prompt, _prompt, FALSE, FALSE, FALSE, _x, _y,
|
||||
_size, _width, _flags.rightjust ? TRUE : FALSE, parent, this);
|
||||
_win = _viswin->win();
|
||||
enable_window(_win, enabled());
|
||||
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)
|
||||
fatal_box("File non trovato: %s", file);
|
||||
|
||||
CURSOR oldcur = get_cursor(TASK_WIN);
|
||||
set_cursor(TASK_WIN,CURSOR_WAIT);
|
||||
main_app().begin_wait();
|
||||
|
||||
TString256 tmpp;
|
||||
long ret = -1l;
|
||||
@ -2192,8 +2190,8 @@ long TBrowsefile_field::set_text(const char* file, const char* line)
|
||||
fclose(instr);
|
||||
|
||||
_viswin->close_print();
|
||||
set_cursor(TASK_WIN, oldcur);
|
||||
|
||||
|
||||
main_app().end_wait();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user