MOdificato il banner a larghezza fissa.

Aggiunta la 'a' a ba3 se lanciato da se stesso col tasto gestione
Invertiti i campi di ricerca automatica sugli sheet


git-svn-id: svn://10.65.10.50/trunk@255 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1994-09-16 10:48:43 +00:00
parent e2ce4316ff
commit adb2327962
6 changed files with 61 additions and 52 deletions

View File

@ -20,7 +20,6 @@
// Metodi di accesso globali all'applicazione corrente
///////////////////////////////////////////////////////////
HIDDEN XVT_CONFIG cfg;
HIDDEN TApplication* _application = NULL;
HIDDEN long savefirm = 0;
@ -79,7 +78,8 @@ HIDDEN void create_backdrop( void )
///////////////////////////////////////////////////////////
class TBanner : public TWindow
{
{
enum { FONT_SIZE = 28 };
protected:
virtual void handler(WINDOW win, EVENT* ep);
@ -90,8 +90,7 @@ public:
TBanner::TBanner()
{
const int w = main_app().title().len()*3+4;
create(-1, -1, w, 6, "BANNER", WSF_NONE, W_PLAIN);
create(-1, -1, 78, 6, "BANNER", WSF_NONE, W_PLAIN);
hide_brush();
open_modal();
do_events();
@ -110,7 +109,7 @@ void TBanner::handler(WINDOW win, EVENT* ep)
RCT r; get_client_rect(win, &r);
set_color(COLOR_WHITE, COLOR_LTGRAY);
set_font(FF_TIMES, FS_BOLD, 28);
set_font(FF_TIMES, FS_BOLD | FS_ITALIC, FONT_SIZE);
char* t = (char*)(const char*)main_app().title();
int w = win_get_text_width(win, t, -1);
int x = (r.right-r.left-w)>>1, y = r.bottom - 4*CHARY;
@ -119,11 +118,16 @@ void TBanner::handler(WINDOW win, EVENT* ep)
win_draw_text(win, x, y, t, -1);
set_font(FF_TIMES);
t = "Attendere prego ...";
t = "PRASSI S.p.A.";
w = win_get_text_width(win, t, -1);
x = (r.right-r.left-w)>>1, y = 2*CHARY;
win_draw_text(win, x, y, t, -1);
t = "Caricamento in corso";
w = win_get_text_width(win, t, -1);
x = (r.right-r.left-w)>>1, y = r.bottom - 2*CHARY;
win_draw_text(win, x, y, t, -1);
r.left += CHARX; r.right -= CHARX;
r.top += CHARX; r.bottom -= CHARX;
set_pen(COLOR_BLACK); win_draw_rect(win, &r);
@ -146,8 +150,8 @@ void TBanner::handler(WINDOW win, EVENT* ep)
const word WM_WAKEUP = RegisterWindowMessage("WAKEUP");
DWORD waiting_for = 0;
BOOLEAN waiting_event_hook(HWND, WORD msg, WORD,
DWORD lparam, long far* ret)
HIDDEN BOOLEAN waiting_event_hook(HWND, WORD msg, WORD,
DWORD lparam, long far* ret)
{
if (msg == WM_WAKEUP)
{
@ -302,11 +306,7 @@ void TApplication::stop_run()
{
if (savefirm) prefhndl->set_codditta(savefirm);
terminate();
//#if XVT_OS == XVT_OS_WIN
// xvt_escape(XVT_ESC_WIN_TERMINATE);
//#else
xvt_terminate();
//#endif
}
@ -331,7 +331,8 @@ TPrinter* TApplication::set_printer(TPrinter* p)
TPrinter& TApplication::printer()
{
if (_printer == NULL) _printer = new TPrinter;
if (_printer == NULL)
_printer = new TPrinter;
return *_printer;
}
@ -358,7 +359,7 @@ void TApplication::terminate()
_application->destroy(); // Distruzione files e maschere
do_events();
if (_printer) // Distruzione dell'eventuale stampante
if (_printer != NULL) // Distruzione dell'eventuale stampante
{
if (printer().isopen())
printer().close();
@ -411,8 +412,9 @@ void TApplication::run(int argc, char* argv[], const char* title)
}
TString80 caption;
caption << "PRASSI S.P.A. - " << get_module_name();
caption << "PRASSI S.p.A. - " << get_module_name();
static XVT_CONFIG cfg;
cfg.base_appl_name = (char*)base.name();
cfg.appl_name = (char*)(const char*)_title;
cfg.taskwin_title = (char*)(const char*)caption;

View File

@ -68,7 +68,8 @@ int TExternal_app::run(bool async)
if (!async) MainApp()->wait_for(_path);
_exitcode = 0;
}
else error_box("Impossibile eseguire %s", (const char*)_path);
else
error_box("Impossibile eseguire %s: errore %d", (const char*)_path, _exitcode);
set_cursor(TASK_WIN, CURSOR_ARROW);
#else

View File

@ -1,4 +1,4 @@
// $Id: maskfld.cpp,v 1.17 1994-09-13 16:43:39 guy Exp $
// $Id: maskfld.cpp,v 1.18 1994-09-16 10:48:32 guy Exp $
#include <xvt.h>
#include <applicat.h>
@ -1282,12 +1282,13 @@ bool TBrowse::do_insert()
else
{
app = _insert.mid(1);
#if XVT_OS == XVT_OS_WIN
if (strnicmp(app, MainApp()->name(), 3) == 0)
app.insert("a", 3);
#endif
}
#if XVT_OS == XVT_OS_WIN
if (strnicmp(app, MainApp()->name(), 3) == 0)
app.insert("a", 3);
#endif
TMailbox mail;
TMessage msg(cmd2name(app), MSG_AI, "");
mail.send(msg);

View File

@ -1 +1 @@
#define VERSION 1.3
#define VERSION 1.2

View File

@ -207,24 +207,27 @@ void TSheet::handler(WINDOW win, EVENT* ep)
switch(ep->v.ctl.id)
{
case DLG_OK :
case DLG_SELECT:dispatch_e_char(win, K_ENTER); break;
case DLG_CANCEL:
case DLG_QUIT :dispatch_e_char(win, K_ESC); break;
case DLG_NEWREC:dispatch_e_char(win, K_INS); break;
case DLG_DELREC:dispatch_e_char(win, K_DEL); break;
default:
{
const WINDOW b = ep->v.ctl.ci.win;
for (int i = 0; i < MAX_BUT; i++)
if (_button[i] == b)
{
stop_run(_key[i]);
break;
}
break;
}
}
case DLG_SELECT:
dispatch_e_char(win, K_ENTER); break;
case DLG_CANCEL:
case DLG_QUIT :
dispatch_e_char(win, K_ESC); break;
case DLG_NEWREC:
dispatch_e_char(win, K_INS); break;
case DLG_DELREC:
dispatch_e_char(win, K_DEL); break;
default:
{
const WINDOW b = ep->v.ctl.ci.win;
for (int i = 0; i < MAX_BUT; i++)
if (_button[i] == b)
{
stop_run(_key[i]);
break;
}
}
break;
}
break;
case E_SIZE:
{
@ -648,20 +651,24 @@ short TBrowse_sheet::reserved_rows() const
void TBrowse_sheet::repos_buttons() const
{
TSheet::repos_buttons();
TSheet::repos_buttons(); // Repos toolbar
RCT wr; get_client_rect(win(), &wr);
RCT wr; get_client_rect(win(), &wr); // Get window size
int left = CHARX; // left coord of next control to draw
for (int id = 99; id <= 100; id++)
{
WINDOW w = get_ctl_window(win(), id);
const WINDOW w = get_ctl_window(win(), id);
if (w != NULL_WIN)
{
RCT r; get_client_rect(w, &r);
r.left = CHARX*(id == 99 ? _field->size()+4 : 1);
r.left = left;
r.top = wr.bottom - 4*CHARY + 4;
r.right += r.left;
r.bottom += r.top;
move_window(w, &r);
left = r.right+CHARX; // Increase left coord
}
}
}

View File

@ -120,8 +120,7 @@ void TWindow_manager::reg(TWindow* m)
menu_enable(FALSE);
break;
case 1 :
win_menu_enable(TASK_WIN, M_FILE_QUIT, _current < 1);
break;
win_menu_enable(TASK_WIN, M_FILE_QUIT, FALSE);
default:
_window[_current-1]->disable(); break;
}
@ -135,22 +134,21 @@ void TWindow_manager::unreg(const TWindow* m)
#ifdef DBG
if (m != cur_win())
{
yesnofatal_box("You can unregister the current window only");
yesnofatal_box("E' successo un casino nel Window Manager");
return;
}
#endif
_current--;
if (_current <= 0)
if (_current < 0)
{
menu_enable(TRUE);
win_menu_enable(TASK_WIN, M_FILE_QUIT, TRUE);
}
else
{
cur_win()->enable();
win_menu_enable(TASK_WIN, M_FILE_QUIT, FALSE);
win_menu_enable(TASK_WIN, M_FILE_QUIT, _current == 0);
}
}