Adeguata printwin al fatto che title e' ora un TString& e non un const char* MOdificato leggermente comportamento del tasto ESC in modo query in modo da forzare la rilettura della maschera corrente (utile per ba4200?) git-svn-id: svn://10.65.10.50/trunk@249 c028cbd2-c16b-5b4b-a496-9718f37d4682
		
			
				
	
	
		
			92 lines
		
	
	
		
			2.5 KiB
		
	
	
	
		
			C++
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			92 lines
		
	
	
		
			2.5 KiB
		
	
	
	
		
			C++
		
	
	
		
			Executable File
		
	
	
	
	
#ifndef __APPLICATION_H
 | 
						|
#define __APPLICATION_H
 | 
						|
 | 
						|
#ifndef INCL_XVTH
 | 
						|
#include <xvt.h>
 | 
						|
#endif
 | 
						|
 | 
						|
#ifndef __PRINTER_H
 | 
						|
#include <printer.h>
 | 
						|
#endif
 | 
						|
 | 
						|
// @C
 | 
						|
// Classe TApplication
 | 
						|
// @END
 | 
						|
 | 
						|
#define MSG_AI "AI"      // message auto_insert          (relapp)
 | 
						|
#define MSG_FS "FS"      // message filtered start (relapp)
 | 
						|
#define MSG_LN "LN"      // message  (printapp -> relapp)
 | 
						|
 | 
						|
class TApplication
 | 
						|
{
 | 
						|
  // @DPRIV
 | 
						|
  int _bar;
 | 
						|
  int __argc;
 | 
						|
  const char** __argv;
 | 
						|
 | 
						|
  TString80 _name, _title;
 | 
						|
  TPrinter* _printer;
 | 
						|
 | 
						|
protected:
 | 
						|
  const char* get_module_name() const;
 | 
						|
  static long task_eh(WINDOW win, EVENT* ep);
 | 
						|
 | 
						|
  virtual long handler(WINDOW win, EVENT* ep);
 | 
						|
  virtual bool extended_firm() const { return FALSE; } // Extended set_firm dialog box?
 | 
						|
 | 
						|
  void terminate();
 | 
						|
  bool config();
 | 
						|
  void about() const;
 | 
						|
 | 
						|
public:
 | 
						|
  // @FPUB
 | 
						|
 | 
						|
  void setbar(int menubar) { _bar = menubar;}   // Modifica la menu-bar
 | 
						|
  void run(int argc, char* argv[], const char* name);
 | 
						|
 | 
						|
  // @DES Queste funzioni possono essere ridefinite da ogni applicazione
 | 
						|
  // @FPUB
 | 
						|
  virtual bool create();        // Crea la finestra principale
 | 
						|
  virtual bool menu(MENU_TAG) { return TRUE; }  // Controlla il menu
 | 
						|
  virtual bool destroy();       // Rimuove l'applicazione
 | 
						|
  virtual void print();
 | 
						|
  virtual word class_id() const { return CLASS_APPLICATION; }
 | 
						|
  void stop_run();                              // Forza chiusura applicazione
 | 
						|
 | 
						|
  void check_menu_item(MENU_TAG item);   // Check menu
 | 
						|
  void uncheck_menu_item(MENU_TAG item); // Uncheck
 | 
						|
  void enable_menu_item(MENU_TAG item, bool on = TRUE);
 | 
						|
  void disable_menu_item(MENU_TAG item) { enable_menu_item(item, FALSE); }
 | 
						|
  void dispatch_e_menu(MENU_TAG item);
 | 
						|
 | 
						|
  const TString& name()  const { return _name; }
 | 
						|
  const char** argv() const  { return __argv; }
 | 
						|
  const char* argv(int i) const  { return __argv[i]; }
 | 
						|
  int argc() const  { return __argc; }
 | 
						|
 | 
						|
  void set_title(const char* t) { _title = t; }
 | 
						|
  const TString& title() const { return _title; }
 | 
						|
 | 
						|
  void wait_for(const char* name);
 | 
						|
  void wake_up_caller() const;
 | 
						|
 | 
						|
  TPrinter* set_printer(TPrinter* p);
 | 
						|
  TPrinter& printer();
 | 
						|
 | 
						|
  virtual bool change_config(const char* var, const char* oldv, const char* newv);
 | 
						|
 | 
						|
  bool has_module(int module) const;
 | 
						|
  bool set_firm(long cod = -1);
 | 
						|
  long get_firm() const;
 | 
						|
  const char* get_firm_dir() const;
 | 
						|
 | 
						|
  TApplication();
 | 
						|
  virtual ~TApplication();
 | 
						|
};
 | 
						|
 | 
						|
bool xvt_running();        // xvt is running?
 | 
						|
TApplication* MainApp();   // main application (old fashioned: will be removed soon
 | 
						|
TApplication& main_app();
 | 
						|
 | 
						|
#endif // __APPLICATION_H
 |