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:
parent
e2ce4316ff
commit
adb2327962
@ -20,7 +20,6 @@
|
|||||||
// Metodi di accesso globali all'applicazione corrente
|
// Metodi di accesso globali all'applicazione corrente
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
HIDDEN XVT_CONFIG cfg;
|
|
||||||
HIDDEN TApplication* _application = NULL;
|
HIDDEN TApplication* _application = NULL;
|
||||||
HIDDEN long savefirm = 0;
|
HIDDEN long savefirm = 0;
|
||||||
|
|
||||||
@ -80,6 +79,7 @@ HIDDEN void create_backdrop( void )
|
|||||||
|
|
||||||
class TBanner : public TWindow
|
class TBanner : public TWindow
|
||||||
{
|
{
|
||||||
|
enum { FONT_SIZE = 28 };
|
||||||
protected:
|
protected:
|
||||||
virtual void handler(WINDOW win, EVENT* ep);
|
virtual void handler(WINDOW win, EVENT* ep);
|
||||||
|
|
||||||
@ -90,8 +90,7 @@ public:
|
|||||||
|
|
||||||
TBanner::TBanner()
|
TBanner::TBanner()
|
||||||
{
|
{
|
||||||
const int w = main_app().title().len()*3+4;
|
create(-1, -1, 78, 6, "BANNER", WSF_NONE, W_PLAIN);
|
||||||
create(-1, -1, w, 6, "BANNER", WSF_NONE, W_PLAIN);
|
|
||||||
hide_brush();
|
hide_brush();
|
||||||
open_modal();
|
open_modal();
|
||||||
do_events();
|
do_events();
|
||||||
@ -110,7 +109,7 @@ void TBanner::handler(WINDOW win, EVENT* ep)
|
|||||||
RCT r; get_client_rect(win, &r);
|
RCT r; get_client_rect(win, &r);
|
||||||
|
|
||||||
set_color(COLOR_WHITE, COLOR_LTGRAY);
|
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();
|
char* t = (char*)(const char*)main_app().title();
|
||||||
int w = win_get_text_width(win, t, -1);
|
int w = win_get_text_width(win, t, -1);
|
||||||
int x = (r.right-r.left-w)>>1, y = r.bottom - 4*CHARY;
|
int x = (r.right-r.left-w)>>1, y = r.bottom - 4*CHARY;
|
||||||
@ -119,7 +118,12 @@ void TBanner::handler(WINDOW win, EVENT* ep)
|
|||||||
win_draw_text(win, x, y, t, -1);
|
win_draw_text(win, x, y, t, -1);
|
||||||
|
|
||||||
set_font(FF_TIMES);
|
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);
|
w = win_get_text_width(win, t, -1);
|
||||||
x = (r.right-r.left-w)>>1, y = r.bottom - 2*CHARY;
|
x = (r.right-r.left-w)>>1, y = r.bottom - 2*CHARY;
|
||||||
win_draw_text(win, x, y, t, -1);
|
win_draw_text(win, x, y, t, -1);
|
||||||
@ -146,8 +150,8 @@ void TBanner::handler(WINDOW win, EVENT* ep)
|
|||||||
const word WM_WAKEUP = RegisterWindowMessage("WAKEUP");
|
const word WM_WAKEUP = RegisterWindowMessage("WAKEUP");
|
||||||
DWORD waiting_for = 0;
|
DWORD waiting_for = 0;
|
||||||
|
|
||||||
BOOLEAN waiting_event_hook(HWND, WORD msg, WORD,
|
HIDDEN BOOLEAN waiting_event_hook(HWND, WORD msg, WORD,
|
||||||
DWORD lparam, long far* ret)
|
DWORD lparam, long far* ret)
|
||||||
{
|
{
|
||||||
if (msg == WM_WAKEUP)
|
if (msg == WM_WAKEUP)
|
||||||
{
|
{
|
||||||
@ -302,11 +306,7 @@ void TApplication::stop_run()
|
|||||||
{
|
{
|
||||||
if (savefirm) prefhndl->set_codditta(savefirm);
|
if (savefirm) prefhndl->set_codditta(savefirm);
|
||||||
terminate();
|
terminate();
|
||||||
//#if XVT_OS == XVT_OS_WIN
|
|
||||||
// xvt_escape(XVT_ESC_WIN_TERMINATE);
|
|
||||||
//#else
|
|
||||||
xvt_terminate();
|
xvt_terminate();
|
||||||
//#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -331,7 +331,8 @@ TPrinter* TApplication::set_printer(TPrinter* p)
|
|||||||
|
|
||||||
TPrinter& TApplication::printer()
|
TPrinter& TApplication::printer()
|
||||||
{
|
{
|
||||||
if (_printer == NULL) _printer = new TPrinter;
|
if (_printer == NULL)
|
||||||
|
_printer = new TPrinter;
|
||||||
return *_printer;
|
return *_printer;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -358,7 +359,7 @@ void TApplication::terminate()
|
|||||||
_application->destroy(); // Distruzione files e maschere
|
_application->destroy(); // Distruzione files e maschere
|
||||||
do_events();
|
do_events();
|
||||||
|
|
||||||
if (_printer) // Distruzione dell'eventuale stampante
|
if (_printer != NULL) // Distruzione dell'eventuale stampante
|
||||||
{
|
{
|
||||||
if (printer().isopen())
|
if (printer().isopen())
|
||||||
printer().close();
|
printer().close();
|
||||||
@ -411,8 +412,9 @@ void TApplication::run(int argc, char* argv[], const char* title)
|
|||||||
}
|
}
|
||||||
|
|
||||||
TString80 caption;
|
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.base_appl_name = (char*)base.name();
|
||||||
cfg.appl_name = (char*)(const char*)_title;
|
cfg.appl_name = (char*)(const char*)_title;
|
||||||
cfg.taskwin_title = (char*)(const char*)caption;
|
cfg.taskwin_title = (char*)(const char*)caption;
|
||||||
|
@ -68,7 +68,8 @@ int TExternal_app::run(bool async)
|
|||||||
if (!async) MainApp()->wait_for(_path);
|
if (!async) MainApp()->wait_for(_path);
|
||||||
_exitcode = 0;
|
_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);
|
set_cursor(TASK_WIN, CURSOR_ARROW);
|
||||||
#else
|
#else
|
||||||
|
@ -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 <xvt.h>
|
||||||
|
|
||||||
#include <applicat.h>
|
#include <applicat.h>
|
||||||
@ -1282,12 +1282,13 @@ bool TBrowse::do_insert()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
app = _insert.mid(1);
|
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;
|
TMailbox mail;
|
||||||
TMessage msg(cmd2name(app), MSG_AI, "");
|
TMessage msg(cmd2name(app), MSG_AI, "");
|
||||||
mail.send(msg);
|
mail.send(msg);
|
||||||
|
@ -1 +1 @@
|
|||||||
#define VERSION 1.3
|
#define VERSION 1.2
|
||||||
|
@ -207,24 +207,27 @@ void TSheet::handler(WINDOW win, EVENT* ep)
|
|||||||
switch(ep->v.ctl.id)
|
switch(ep->v.ctl.id)
|
||||||
{
|
{
|
||||||
case DLG_OK :
|
case DLG_OK :
|
||||||
case DLG_SELECT:dispatch_e_char(win, K_ENTER); break;
|
case DLG_SELECT:
|
||||||
case DLG_CANCEL:
|
dispatch_e_char(win, K_ENTER); break;
|
||||||
case DLG_QUIT :dispatch_e_char(win, K_ESC); break;
|
case DLG_CANCEL:
|
||||||
case DLG_NEWREC:dispatch_e_char(win, K_INS); break;
|
case DLG_QUIT :
|
||||||
case DLG_DELREC:dispatch_e_char(win, K_DEL); break;
|
dispatch_e_char(win, K_ESC); break;
|
||||||
default:
|
case DLG_NEWREC:
|
||||||
{
|
dispatch_e_char(win, K_INS); break;
|
||||||
const WINDOW b = ep->v.ctl.ci.win;
|
case DLG_DELREC:
|
||||||
|
dispatch_e_char(win, K_DEL); break;
|
||||||
for (int i = 0; i < MAX_BUT; i++)
|
default:
|
||||||
if (_button[i] == b)
|
{
|
||||||
{
|
const WINDOW b = ep->v.ctl.ci.win;
|
||||||
stop_run(_key[i]);
|
for (int i = 0; i < MAX_BUT; i++)
|
||||||
break;
|
if (_button[i] == b)
|
||||||
}
|
{
|
||||||
break;
|
stop_run(_key[i]);
|
||||||
}
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case E_SIZE:
|
case E_SIZE:
|
||||||
{
|
{
|
||||||
@ -648,20 +651,24 @@ short TBrowse_sheet::reserved_rows() const
|
|||||||
|
|
||||||
void TBrowse_sheet::repos_buttons() const
|
void TBrowse_sheet::repos_buttons() const
|
||||||
{
|
{
|
||||||
TSheet::repos_buttons();
|
TSheet::repos_buttons(); // Repos toolbar
|
||||||
|
|
||||||
|
RCT wr; get_client_rect(win(), &wr); // Get window size
|
||||||
|
|
||||||
|
int left = CHARX; // left coord of next control to draw
|
||||||
|
|
||||||
RCT wr; get_client_rect(win(), &wr);
|
|
||||||
for (int id = 99; id <= 100; id++)
|
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)
|
if (w != NULL_WIN)
|
||||||
{
|
{
|
||||||
RCT r; get_client_rect(w, &r);
|
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.top = wr.bottom - 4*CHARY + 4;
|
||||||
r.right += r.left;
|
r.right += r.left;
|
||||||
r.bottom += r.top;
|
r.bottom += r.top;
|
||||||
move_window(w, &r);
|
move_window(w, &r);
|
||||||
|
left = r.right+CHARX; // Increase left coord
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -120,8 +120,7 @@ void TWindow_manager::reg(TWindow* m)
|
|||||||
menu_enable(FALSE);
|
menu_enable(FALSE);
|
||||||
break;
|
break;
|
||||||
case 1 :
|
case 1 :
|
||||||
win_menu_enable(TASK_WIN, M_FILE_QUIT, _current < 1);
|
win_menu_enable(TASK_WIN, M_FILE_QUIT, FALSE);
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
_window[_current-1]->disable(); break;
|
_window[_current-1]->disable(); break;
|
||||||
}
|
}
|
||||||
@ -135,22 +134,21 @@ void TWindow_manager::unreg(const TWindow* m)
|
|||||||
#ifdef DBG
|
#ifdef DBG
|
||||||
if (m != cur_win())
|
if (m != cur_win())
|
||||||
{
|
{
|
||||||
yesnofatal_box("You can unregister the current window only");
|
yesnofatal_box("E' successo un casino nel Window Manager");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
_current--;
|
_current--;
|
||||||
|
|
||||||
if (_current <= 0)
|
if (_current < 0)
|
||||||
{
|
{
|
||||||
menu_enable(TRUE);
|
menu_enable(TRUE);
|
||||||
win_menu_enable(TASK_WIN, M_FILE_QUIT, TRUE);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cur_win()->enable();
|
cur_win()->enable();
|
||||||
win_menu_enable(TASK_WIN, M_FILE_QUIT, FALSE);
|
win_menu_enable(TASK_WIN, M_FILE_QUIT, _current == 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user