..gata nella gestione delle pagine disabilitate
git-svn-id: svn://10.65.10.50/trunk@636 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									e738fe49c0
								
							
						
					
					
						commit
						76f16c5b5f
					
				| @ -389,7 +389,10 @@ const char* TApplication::get_module_name() const | |||||||
|   if (ok) ok = has_module(aut); |   if (ok) ok = has_module(aut); | ||||||
| 
 | 
 | ||||||
|   if (!ok) |   if (!ok) | ||||||
|     fatal_box("Il modulo '%s' non e' autorizzato", module); |   { | ||||||
|  |     error_box("Il modulo '%s' non e' autorizzato", module); | ||||||
|  |     module = ""; | ||||||
|  |   }   | ||||||
| 
 | 
 | ||||||
|   return module; |   return module; | ||||||
| } | } | ||||||
| @ -480,8 +483,11 @@ void TApplication::run(int argc, char* argv[], const char* title) | |||||||
|   } |   } | ||||||
|   set_perms(); |   set_perms(); | ||||||
| 
 | 
 | ||||||
|  |   const TFixed_string mod(get_module_name()); | ||||||
|  |   if (mod.empty()) return; | ||||||
|  |    | ||||||
|   TString80 caption; |   TString80 caption; | ||||||
|   caption << "PRASSI S.p.A. - " << get_module_name(); |   caption << "PRASSI S.p.A. - " << mod; | ||||||
| 
 | 
 | ||||||
|   static XVT_CONFIG cfg; |   static XVT_CONFIG cfg; | ||||||
|   cfg.base_appl_name = (char*)base.name(); |   cfg.base_appl_name = (char*)base.name(); | ||||||
|  | |||||||
| @ -39,6 +39,8 @@ int fatal_box(const char* fmt, ...) | |||||||
| 
 | 
 | ||||||
|   if (xvt_running()) |   if (xvt_running()) | ||||||
|     main_app().stop_run(); |     main_app().stop_run(); | ||||||
|  |   else | ||||||
|  |     exit(1); | ||||||
| #else | #else | ||||||
|   beep(); |   beep(); | ||||||
|   if (xvt_running()) xvt_fatal("%s", msg); |   if (xvt_running()) xvt_fatal("%s", msg); | ||||||
|  | |||||||
| @ -706,6 +706,8 @@ protected: | |||||||
| 
 | 
 | ||||||
| public: | public: | ||||||
|   TPage_button(WINDOW parent, byte flag); |   TPage_button(WINDOW parent, byte flag); | ||||||
|  |   byte get_flag() const { return _flag; } | ||||||
|  |   void set_flag(byte f); | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| TPage_button::TPage_button(WINDOW parent, byte flag) : _flag(flag) | TPage_button::TPage_button(WINDOW parent, byte flag) : _flag(flag) | ||||||
| @ -729,9 +731,16 @@ void TPage_button::mouse_up() | |||||||
| void TPage_button::update() const | void TPage_button::update() const | ||||||
| { | { | ||||||
|   TControl::update();     |   TControl::update();     | ||||||
|  |   if (_flag) | ||||||
|     cpb_win_picture_draw_at(_hdc, cpb[BMP_BOOK1 + _flag -1], 0, 0); |     cpb_win_picture_draw_at(_hdc, cpb[BMP_BOOK1 + _flag -1], 0, 0); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | void TPage_button::set_flag(byte f) | ||||||
|  | {            | ||||||
|  |   _flag = f; | ||||||
|  |   update(); | ||||||
|  | } | ||||||
|  | 
 | ||||||
| ///////////////////////////////////////////////////////////
 | ///////////////////////////////////////////////////////////
 | ||||||
| // TTag_button
 | // TTag_button
 | ||||||
| ///////////////////////////////////////////////////////////
 | ///////////////////////////////////////////////////////////
 | ||||||
| @ -752,6 +761,8 @@ protected: | |||||||
| 
 | 
 | ||||||
| public: | public: | ||||||
|   TTag_button(WINDOW parent, byte p, byte tot); |   TTag_button(WINDOW parent, byte p, byte tot); | ||||||
|  |   byte get_pages() const { return _pages; } | ||||||
|  |   void set_pages(byte p); | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| TTag_button::TTag_button(WINDOW parent, byte p, byte tot) | TTag_button::TTag_button(WINDOW parent, byte p, byte tot) | ||||||
| @ -809,7 +820,8 @@ void TTag_button::update() const | |||||||
| void TTag_button::mouse_down(PNT where) | void TTag_button::mouse_down(PNT where) | ||||||
| { | { | ||||||
|   _curr = where.h / width; |   _curr = where.h / width; | ||||||
|   if (_curr >= _pages) _curr = _pages-1; |   if (_curr >= _pages) _curr = _pages-1; else | ||||||
|  |     if (_curr < 0) _curr = 0; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void TTag_button::mouse_up() | void TTag_button::mouse_up() | ||||||
| @ -818,6 +830,12 @@ void TTag_button::mouse_up() | |||||||
|     dispatch_e_char(_parent, K_CTRL + K_F1 + _curr); |     dispatch_e_char(_parent, K_CTRL + K_F1 + _curr); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | void TTag_button::set_pages(byte p) | ||||||
|  | { | ||||||
|  |   _pages = p; | ||||||
|  |   update(); | ||||||
|  | } | ||||||
|  | 
 | ||||||
| ///////////////////////////////////////////////////////////
 | ///////////////////////////////////////////////////////////
 | ||||||
| // Checkbox
 | // Checkbox
 | ||||||
| ///////////////////////////////////////////////////////////
 | ///////////////////////////////////////////////////////////
 | ||||||
| @ -1024,3 +1042,23 @@ TControl* TControl::WINDOW2TControl(WINDOW win) | |||||||
|   CHECK(model && *model, "Can't get the model from a window"); |   CHECK(model && *model, "Can't get the model from a window"); | ||||||
|   return *model; |   return *model; | ||||||
| } | } | ||||||
|  | 
 | ||||||
|  | void xvt_change_page_tags(WINDOW pag, bool on, WINDOW tag, byte p) | ||||||
|  | { | ||||||
|  |   if (pag != NULL_WIN) | ||||||
|  |   { | ||||||
|  |     TPage_button* pb = (TPage_button*)TControl::WINDOW2TControl(pag); | ||||||
|  |     byte f = pb->get_flag(); | ||||||
|  |     if (on) f |= 0x1; | ||||||
|  |     else    f &= 0x2; | ||||||
|  |     pb->set_flag(f); | ||||||
|  |   }   | ||||||
|  |    | ||||||
|  |   if (tag != NULL_WIN) | ||||||
|  |   { | ||||||
|  |     TTag_button* pt = (TTag_button*)TControl::WINDOW2TControl(tag); | ||||||
|  |     pt->set_pages(p); | ||||||
|  |   }   | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | |||||||
| @ -11,7 +11,8 @@ WINDOW xvt_create_checkbox( | |||||||
|   WINDOW parent, |   WINDOW parent, | ||||||
|   long flags, |   long flags, | ||||||
|   long app_data, |   long app_data, | ||||||
|   int id); |   int id | ||||||
|  |   ); | ||||||
| 
 | 
 | ||||||
|   WINDOW xvt_create_radiobutton( |   WINDOW xvt_create_radiobutton( | ||||||
|     short left, short top, short right, short bottom, |     short left, short top, short right, short bottom, | ||||||
| @ -19,7 +20,8 @@ WINDOW xvt_create_checkbox( | |||||||
|     WINDOW parent, |     WINDOW parent, | ||||||
|     long flags, |     long flags, | ||||||
|     long app_data, |     long app_data, | ||||||
|     int id); |     int id | ||||||
|  |     ); | ||||||
| 
 | 
 | ||||||
|     WINDOW xvt_create_pushbutton( |     WINDOW xvt_create_pushbutton( | ||||||
|       short left, short top, short right, short bottom, |       short left, short top, short right, short bottom, | ||||||
| @ -27,7 +29,8 @@ WINDOW xvt_create_checkbox( | |||||||
|       WINDOW parent, |       WINDOW parent, | ||||||
|       long flags, |       long flags, | ||||||
|       long app_data, |       long app_data, | ||||||
|       int id); |       int id | ||||||
|  |       ); | ||||||
| 
 | 
 | ||||||
|       WINDOW xvt_create_text( |       WINDOW xvt_create_text( | ||||||
|         short left, short top, short right, short bottom, |         short left, short top, short right, short bottom, | ||||||
| @ -35,7 +38,8 @@ WINDOW xvt_create_checkbox( | |||||||
|         WINDOW parent, |         WINDOW parent, | ||||||
|         long flags, |         long flags, | ||||||
|         long app_data, |         long app_data, | ||||||
|         int id); |         int id | ||||||
|  |         ); | ||||||
| 
 | 
 | ||||||
|         WINDOW xvt_create_groupbox( |         WINDOW xvt_create_groupbox( | ||||||
|           short left, short top, short right, short bottom, |           short left, short top, short right, short bottom, | ||||||
| @ -43,7 +47,8 @@ WINDOW xvt_create_checkbox( | |||||||
|           WINDOW parent, |           WINDOW parent, | ||||||
|           long flags, |           long flags, | ||||||
|           long app_data, |           long app_data, | ||||||
|           int id); |           int id | ||||||
|  |           ); | ||||||
| 
 | 
 | ||||||
|           void free_controls_bmp(); |           void free_controls_bmp(); | ||||||
| 
 | 
 | ||||||
| @ -51,7 +56,6 @@ WINDOW xvt_create_checkbox( | |||||||
|           // Custom control
 |           // Custom control
 | ||||||
|           ///////////////////////////////////////////////////////////
 |           ///////////////////////////////////////////////////////////
 | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
|           class TControl |           class TControl | ||||||
| { | { | ||||||
|   WINDOW _win; |   WINDOW _win; | ||||||
|  | |||||||
| @ -162,15 +162,19 @@ void TMask::handler(WINDOW win, EVENT* ep) | |||||||
| void TMask::init_mask(int mode) | void TMask::init_mask(int mode) | ||||||
| { | { | ||||||
|   _sheets = _pages = 0;                       // Azzera numero pagine e sheets
 |   _sheets = _pages = 0;                       // Azzera numero pagine e sheets
 | ||||||
|   _enabled = 0xffff;                          // Abilita tutte le pagine
 |    | ||||||
|  |   _enabled.set(MAX_PAGES); | ||||||
|  |   _enabled.set();                             // Abilita tutte le pagine
 | ||||||
|  |    | ||||||
|   _focus = _first_focus = 0;                  // Nessuno ha il focus
 |   _focus = _first_focus = 0;                  // Nessuno ha il focus
 | ||||||
|   _page = -1;                                 // Nessuna pagina corrente
 |   _page = -1;                                 // Nessuna pagina corrente
 | ||||||
|   _handler = NULL;                            // Nessun handler utente
 |   _handler = NULL;                            // Nessun handler utente
 | ||||||
|   _mode = mode;                               // Inizializza modo
 |   _mode = mode;                               // Inizializza modo
 | ||||||
|   _exchange = 1.0;                            // Il cambio per la valuta e' la lira
 |   _exchange = 1.0;                            // Il cambio per la valuta e' la lira
 | ||||||
| 
 | 
 | ||||||
|   for (int i = 0; i <= MAX_PAGES; i++) |   memset(_pagewin, 0, sizeof(_pagewin)); | ||||||
|     _pagewin[i] = NULL_WIN;                   // Azzera le finestre delle varie pagine
 |   memset(_pagepag, 0, sizeof(_pagepag)); | ||||||
|  |   memset(_pagetag, 0, sizeof(_pagetag)); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| @ -237,12 +241,12 @@ void TMask::add_buttons() | |||||||
|   { |   { | ||||||
|     if (_pages > 1) |     if (_pages > 1) | ||||||
|     {                                                     |     {                                                     | ||||||
|       const byte flag = (p < _pages-1 ? 0x1 : 0x0) | (p > 0 ? 0x2 : 0x0); |       const long flags = (p < _pages-1 ? 0x1 : 0x0) | (p > 0 ? 0x2 : 0x0); | ||||||
|       xvt_create_control(WC_PUSHBUTTON, 0,0,1,1, "", |       _pagepag[p] = xvt_create_control(WC_PUSHBUTTON, 0, 0, 1, 1, "",  | ||||||
|                          _pagewin[p], flag, 0, DLG_PAGE); |                                        _pagewin[p], flags, 0, DLG_PAGE); | ||||||
|     }                                                                             |     }                                                                             | ||||||
|     if (toolwin()) |     if (toolwin()) | ||||||
|       xvt_create_control(WC_PUSHBUTTON, 0,0,0,1, "", |       _pagetag[p] = xvt_create_control(WC_PUSHBUTTON, 0, 0, 0, 1, "", | ||||||
|                                        _pagewin[p], p, _pages, DLG_PAGETAGS); |                                        _pagewin[p], p, _pages, DLG_PAGETAGS); | ||||||
|   } |   } | ||||||
| #else | #else | ||||||
| @ -384,23 +388,31 @@ void TMask::load_checks() const | |||||||
|   } |   } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void TMask::enable_page(int page, bool on) | // Dis/abilita una pagina e tutte le successive
 | ||||||
|  | void TMask::enable_page(byte page, bool on) | ||||||
| { | { | ||||||
|   int first = (page >= 0) ? page : 1; |   CHECK(page > 0, "Can't enable/disable first page"); | ||||||
|   int last = (page >= 0) ? page+1 : _pages; |  | ||||||
|    |    | ||||||
|   for (int p = first; p < last; p++) |   if (_enabled[page] != on)  | ||||||
|   { |   { | ||||||
|     const word n = 1 << p; |     for (byte i = page; i < _pages; i++)                      | ||||||
|     if (on) _enabled |= n; |       _enabled.set(i, on); | ||||||
|     else    _enabled &= ~n; | 
 | ||||||
|  | #if XVT_OS == XVT_OS_WIN                                                        | ||||||
|  |     const byte p = on ? _pages : page; | ||||||
|  |     for (i = 0; i < page-1; i++)                      | ||||||
|  |       xvt_change_page_tags(NULL_WIN, FALSE, _pagetag[i], p); | ||||||
|  | 
 | ||||||
|  |     xvt_change_page_tags(_pagepag[page-1], on, _pagetag[page-1], p); | ||||||
|  | #endif                       | ||||||
|   } |   } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| bool TMask::page_enabled(int page) const | // Controlla lo stato di abilitazione di una pagina    
 | ||||||
|  | // Certified 100%
 | ||||||
|  | bool TMask::page_enabled(byte page) const | ||||||
| { | { | ||||||
|   const unsigned long n = 1 << page; |   return _enabled[page]; | ||||||
|   return (_enabled & n) > 0; |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| @ -426,7 +438,7 @@ void TMask::start_run() | |||||||
|   for (i = 0; i < max; i++) |   for (i = 0; i < max; i++) | ||||||
|   { |   { | ||||||
|     TMask_field& f = fld(i); |     TMask_field& f = fld(i); | ||||||
|     if (mode() == MODE_QUERY && f.is_edit() && f.in_key(1) &&  |     if (query_mode() && f.is_edit() && f.in_key(1) &&  | ||||||
|         !f.automagic() && !f.get().empty()) |         !f.automagic() && !f.get().empty()) | ||||||
|     { |     { | ||||||
|       f.set_dirty(TRUE); |       f.set_dirty(TRUE); | ||||||
| @ -497,7 +509,7 @@ void TMask::get_mask_fields() | |||||||
| 
 | 
 | ||||||
| int TMask::id2pos(short id) const | int TMask::id2pos(short id) const | ||||||
| { | { | ||||||
|   const int MAX_FIELDS = 128; |   const int MAX_FIELDS = 256; | ||||||
|   static byte positions[MAX_FIELDS];      //  100 <= id < MAX_FIELDS
 |   static byte positions[MAX_FIELDS];      //  100 <= id < MAX_FIELDS
 | ||||||
|   const int max = fields(); |   const int max = fields(); | ||||||
| 
 | 
 | ||||||
| @ -1124,27 +1136,35 @@ void TMask::autosave(TRelation* r) const | |||||||
|   } |   } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void TMask::send_key(KEY key, short to) const | void TMask::send_key(KEY key, short to, TMask_field* from) | ||||||
| { | { | ||||||
|   if (to == 0) |   if (to == 0) | ||||||
|   {                 |   {                 | ||||||
|     WINDOW w = win(); |     WINDOW w = from ? from->parent() : _pagewin[0]; | ||||||
|     if (w == NULL_WIN) w = _pagewin[0]; |  | ||||||
|     dispatch_e_char(w, key); |     dispatch_e_char(w, key); | ||||||
|     return; |     return; | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   if (to > 0) |   if (to > 0) | ||||||
|  |   {         | ||||||
|  |     if (to == DLG_PAGE) | ||||||
|  |     {                 | ||||||
|  |       CHECK(from, "You should specify a sender!"); | ||||||
|  |       const int p = find_parent_page(*from)+1; | ||||||
|  |       CHECKD(p > 0 && p < _pages, "You should specify a good page, not ", p); | ||||||
|  |       key -= K_CTRL+K_SHIFT; | ||||||
|  |       enable_page(p, key == 's' || key == 'e'); | ||||||
|  |     } | ||||||
|  |     else | ||||||
|     { |     { | ||||||
|       const int pos = id2pos(to); |       const int pos = id2pos(to); | ||||||
|     if (pos >= 0) |       if (pos >= 0) fld(pos).on_key(key); | ||||||
|       fld(pos).on_key(key); |  | ||||||
| #ifdef DBG | #ifdef DBG | ||||||
|       else |       else | ||||||
|       if (mode() != MODE_SEARCH)  |  | ||||||
|         yesnofatal_box("Can't send key %u to field %d", key, to); |         yesnofatal_box("Can't send key %u to field %d", key, to); | ||||||
| #endif   | #endif   | ||||||
|     } |     } | ||||||
|  |   } | ||||||
|   else |   else | ||||||
|   { |   { | ||||||
|     const int max = fields(); |     const int max = fields(); | ||||||
|  | |||||||
| @ -30,11 +30,13 @@ class TMask : public TWindow | |||||||
|   // @DPRIV
 |   // @DPRIV
 | ||||||
|   enum { MAX_PAGES = 12 };      // Massimo numero di pagine nella maschera
 |   enum { MAX_PAGES = 12 };      // Massimo numero di pagine nella maschera
 | ||||||
|   WINDOW _pagewin[MAX_PAGES+1]; // Windows of the pages
 |   WINDOW _pagewin[MAX_PAGES+1]; // Windows of the pages
 | ||||||
|  |   WINDOW _pagepag[MAX_PAGES];   // Windows of pgup/pgdn
 | ||||||
|  |   WINDOW _pagetag[MAX_PAGES];   // Windows of pagetags
 | ||||||
|    |    | ||||||
|   int _pages;                   // Number of pages of the mask
 |   int _pages;                   // Number of pages of the mask
 | ||||||
|   int _page;                    // Current page
 |   int _page;                    // Current page
 | ||||||
| 
 | 
 | ||||||
|   word   _enabled;              // Are pages enabled (bit field)
 |   TBit_array _enabled;          // Are pages enabled
 | ||||||
|   int    _mode;                 // Mode of the mask
 |   int    _mode;                 // Mode of the mask
 | ||||||
|   TArray _field;                // Fields in the mask
 |   TArray _field;                // Fields in the mask
 | ||||||
|    |    | ||||||
| @ -150,9 +152,9 @@ public: | |||||||
|   void disable(short fld_id) { enable(fld_id, FALSE); } |   void disable(short fld_id) { enable(fld_id, FALSE); } | ||||||
|   void enable_default(short fld_id = -1); |   void enable_default(short fld_id = -1); | ||||||
| 
 | 
 | ||||||
|   void enable_page(int p, bool on = TRUE); |   void enable_page(byte p, bool on = TRUE); | ||||||
|   void disable_page(int p) { enable_page(p, FALSE); } |   void disable_page(byte p) { enable_page(p, FALSE); } | ||||||
|   bool page_enabled(int p) const; |   bool page_enabled(byte p) const; | ||||||
|    |    | ||||||
|   byte num_keys() const; |   byte num_keys() const; | ||||||
|   void enable_key(byte key, bool on = TRUE); |   void enable_key(byte key, bool on = TRUE); | ||||||
| @ -170,7 +172,7 @@ public: | |||||||
|   void autoload(const TRelation* = NULL); |   void autoload(const TRelation* = NULL); | ||||||
|   void autosave(TRelation* = NULL) const; |   void autosave(TRelation* = NULL) const; | ||||||
| 
 | 
 | ||||||
|   void send_key(KEY key, short id) const; |   void send_key(KEY key, short id, TMask_field* from = NULL); | ||||||
|   void set_handler(short fld_id, CONTROL_HANDLER handler); |   void set_handler(short fld_id, CONTROL_HANDLER handler); | ||||||
|   void set_handler(MASK_HANDLER handler); |   void set_handler(MASK_HANDLER handler); | ||||||
|   void set_workfile(const char* workfile) { _workfile = workfile; _lastpos = 0L;} |   void set_workfile(const char* workfile) { _workfile = workfile; _lastpos = 0L;} | ||||||
|  | |||||||
| @ -1,4 +1,4 @@ | |||||||
| //      $Id: maskfld.cpp,v 1.48 1994-11-15 17:14:22 guy Exp $
 | //      $Id: maskfld.cpp,v 1.49 1994-11-16 15:50:57 guy Exp $
 | ||||||
| #include <xvt.h> | #include <xvt.h> | ||||||
| 
 | 
 | ||||||
| #include <applicat.h> | #include <applicat.h> | ||||||
| @ -541,8 +541,13 @@ HIDDEN const char* copy_value(TToken_string& msg, const TString& val) | |||||||
|   return val.sub(from, to); |   return val.sub(from, to); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | void TMask_field::send_key(KEY k, short to)  | ||||||
|  | {  | ||||||
|  |   mask().send_key(k, to, this);  | ||||||
|  | } | ||||||
| 
 | 
 | ||||||
| // Certified 50%
 | 
 | ||||||
|  | // Certified 90%
 | ||||||
| bool TMask_field::do_message(int num) | bool TMask_field::do_message(int num) | ||||||
| {                | {                | ||||||
|   const int MAX_CMD = 14; |   const int MAX_CMD = 14; | ||||||
| @ -644,7 +649,7 @@ bool TMask_field::do_message(int num) | |||||||
|       if (key > 0) |       if (key > 0) | ||||||
|       { |       { | ||||||
|         if (broadcast) fld = -fld; |         if (broadcast) fld = -fld; | ||||||
|         mask().send_key(key, fld); |         send_key(key, fld); | ||||||
|       }   |       }   | ||||||
|     } |     } | ||||||
|     else |     else | ||||||
| @ -742,7 +747,7 @@ bool TMask_field::on_key(KEY key) | |||||||
|     break; |     break; | ||||||
|   case K_PREV: |   case K_PREV: | ||||||
|   case K_NEXT: |   case K_NEXT: | ||||||
|     dispatch_e_char(parent(), key); |     send_key(key, 0); | ||||||
|     break; |     break; | ||||||
|   case K_F1: |   case K_F1: | ||||||
|     if (_help.not_empty()) |     if (_help.not_empty()) | ||||||
| @ -1486,7 +1491,7 @@ default: | |||||||
|     const short id = siblings.get_int((k - K_CTRL) << 1); |     const short id = siblings.get_int((k - K_CTRL) << 1); | ||||||
|     TEdit_field& ef = (TEdit_field&)_fld->mask().field(id); |     TEdit_field& ef = (TEdit_field&)_fld->mask().field(id); | ||||||
|     ef.set_focus(); |     ef.set_focus(); | ||||||
|     ef.mask().send_key(k = K_F9, 0); |     ef.send_key(k = K_F9, 0); | ||||||
|   } |   } | ||||||
|   break; |   break; | ||||||
| } | } | ||||||
| @ -2000,7 +2005,8 @@ bool TEdit_field::on_key(KEY key) | |||||||
|           { |           { | ||||||
|             for (int fld = m.get_key_field(i, TRUE); fld != -1; fld = m.get_key_field(i, FALSE)) |             for (int fld = m.get_key_field(i, TRUE); fld != -1; fld = m.get_key_field(i, FALSE)) | ||||||
|               m.field(fld).set_dirty(FALSE); |               m.field(fld).set_dirty(FALSE); | ||||||
|             dispatch_e_char(get_parent(win()), K_AUTO_ENTER); |             //            dispatch_e_char(get_parent(win()), K_AUTO_ENTER);
 | ||||||
|  |             mask().stop_run(K_AUTO_ENTER); | ||||||
|             break; |             break; | ||||||
|           } |           } | ||||||
|       } |       } | ||||||
| @ -2055,7 +2061,7 @@ bool TEdit_field::on_key(KEY key) | |||||||
|       { |       { | ||||||
|         set_dirty(); |         set_dirty(); | ||||||
|         if (mask().is_running())    |         if (mask().is_running())    | ||||||
|           mask().send_key(K_TAB, 0); |           send_key(K_TAB, 0); | ||||||
|         else |         else | ||||||
|           on_hit(); |           on_hit(); | ||||||
|         return TRUE; |         return TRUE; | ||||||
|  | |||||||
| @ -1,4 +1,4 @@ | |||||||
| /*      $Id: maskfld.h,v 1.10 1994-11-15 17:14:28 guy Exp $  */ | /*      $Id: maskfld.h,v 1.11 1994-11-16 15:51:01 guy Exp $  */ | ||||||
| #ifndef __MASKFLD_H | #ifndef __MASKFLD_H | ||||||
| #define __MASKFLD_H | #define __MASKFLD_H | ||||||
| 
 | 
 | ||||||
| @ -187,6 +187,7 @@ public: | |||||||
|   const TFieldref* field() const { return _field; } |   const TFieldref* field() const { return _field; } | ||||||
|    |    | ||||||
|   void set_focus() const; |   void set_focus() const; | ||||||
|  |   void send_key(KEY k, short to); | ||||||
| 
 | 
 | ||||||
|   // set focus, message-box, set focus  
 |   // set focus, message-box, set focus  
 | ||||||
|   bool message_box(const char* fmt, ...) const; |   bool message_box(const char* fmt, ...) const; | ||||||
|  | |||||||
| @ -1 +1 @@ | |||||||
| #define VERSION 1.16 | #define VERSION 1.15 | ||||||
|  | |||||||
| @ -1,4 +1,4 @@ | |||||||
| //      $Id: relapp.cpp,v 1.28 1994-11-15 11:23:19 guy Exp $        
 | //      $Id: relapp.cpp,v 1.29 1994-11-16 15:51:05 guy Exp $        
 | ||||||
| #include <mailbox.h> | #include <mailbox.h> | ||||||
| #include <sheet.h> | #include <sheet.h> | ||||||
| #include <urldefid.h> | #include <urldefid.h> | ||||||
| @ -712,7 +712,6 @@ bool TRelation_application::main_loop() | |||||||
|     // Dis/abilita cambio ditta
 |     // Dis/abilita cambio ditta
 | ||||||
|     enable_menu_item(M_FILE_NEW, (_mask->mode() == MODE_QUERY)); |     enable_menu_item(M_FILE_NEW, (_mask->mode() == MODE_QUERY)); | ||||||
| 
 | 
 | ||||||
|      |  | ||||||
|     k = _mask->run(); |     k = _mask->run(); | ||||||
| 
 | 
 | ||||||
|     // Seleziona il cursore a clessidra se necessario
 |     // Seleziona il cursore a clessidra se necessario
 | ||||||
|  | |||||||
| @ -24,7 +24,8 @@ WINDOW xvt_create_window(WIN_TYPE wt, | |||||||
|                          const char* caption, WINDOW parent, |                          const char* caption, WINDOW parent, | ||||||
|                          long flags, |                          long flags, | ||||||
|                          EVENT_HANDLER eh, |                          EVENT_HANDLER eh, | ||||||
|                          long app_data); |                          long app_data | ||||||
|  |                          ); | ||||||
| 
 | 
 | ||||||
|                          WINDOW xvt_create_control(WIN_TYPE wt, |                          WINDOW xvt_create_control(WIN_TYPE wt, | ||||||
|                                                    short x, short y, short dx, short dy, |                                                    short x, short y, short dx, short dy, | ||||||
| @ -32,7 +33,8 @@ WINDOW xvt_create_window(WIN_TYPE wt, | |||||||
|                                                    WINDOW parent, |                                                    WINDOW parent, | ||||||
|                                                    long flags, |                                                    long flags, | ||||||
|                                                    long app_data, |                                                    long app_data, | ||||||
|                                                    int id); |                                                    int id | ||||||
|  |                                                    ); | ||||||
| 
 | 
 | ||||||
|                                                    WINDOW xvt_create_statbar(); |                                                    WINDOW xvt_create_statbar(); | ||||||
|                                                    void xvt_statbar_set(const char* text, bool def = FALSE); |                                                    void xvt_statbar_set(const char* text, bool def = FALSE); | ||||||
| @ -53,6 +55,7 @@ WINDOW xvt_create_window(WIN_TYPE wt, | |||||||
|                                                    bool xvt_get_checked_state(WINDOW win); |                                                    bool xvt_get_checked_state(WINDOW win); | ||||||
|                                                    void xvt_check_radio_button(WINDOW win, const WINDOW* ctls, int count); |                                                    void xvt_check_radio_button(WINDOW win, const WINDOW* ctls, int count); | ||||||
|                                                    int  xvt_get_checked_radio(const WINDOW* ctls, int count); |                                                    int  xvt_get_checked_radio(const WINDOW* ctls, int count); | ||||||
|  |                                                    void xvt_change_page_tags(WINDOW pag, bool on, WINDOW tag, byte p); | ||||||
| 
 | 
 | ||||||
|                                                    bool xvt_test_menu_tag(MENU_TAG tag);     |                                                    bool xvt_test_menu_tag(MENU_TAG tag);     | ||||||
| 
 | 
 | ||||||
| @ -60,9 +63,6 @@ WINDOW xvt_create_window(WIN_TYPE wt, | |||||||
|                                                    PAT_STYLE trans_brush(char p); |                                                    PAT_STYLE trans_brush(char p); | ||||||
|                                                    PEN_STYLE trans_pen  (char p); |                                                    PEN_STYLE trans_pen  (char p); | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
|                                                    /* @END */ |  | ||||||
| 
 |  | ||||||
|                                                    extern short CHARX, CHARY, BASEY, ROWY; |                                                    extern short CHARX, CHARY, BASEY, ROWY; | ||||||
| 
 | 
 | ||||||
|                                                    /* @END */ |                                                    /* @END */ | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user