#ifndef __SC100_H #define __SC100_H #ifndef __APPLICAT_H #include #endif #ifndef __CGSALDAC_H #include "../cg/cgsaldac.h" #endif #ifndef __MASK_H class TMask; class TMask_field; #endif class TSaldaconto_app : public TApplication { TMask* _msk; TArray _file; TPartite_array _partite; TAssoc_array _colori; bool _allow_firm; bool _ges_val; protected: // TApplication virtual bool create(); virtual bool destroy(); virtual bool menu(MENU_TAG tag); virtual bool firm_change_enabled() const { return _allow_firm; } virtual void on_config_change(); protected: void open_files(int logicnum, ...); void close_files() { _file.destroy(); } void edit_partite(const TMask& m); void load_colors(); COLOR type2color(char tipor, char tipoc); public: TMask& curr_mask() { return *_msk; } TPartite_array& partite() { return _partite; } bool gestione_valuta() const { return _ges_val; } void type2colors(char tipor, COLOR& back, COLOR& fore); void gioca_cambi(TMask& m, int force = 0x0); static bool descr_handler(TMask_field& f, KEY k); static bool totale_handler(TMask_field& f, KEY k); static bool imposte_handler(TMask_field& f, KEY k); static bool totval_handler(TMask_field& f, KEY k); static bool cambio_handler(TMask_field& f, KEY k); static bool datacambio_handler(TMask_field& f, KEY k); static bool valuta_handler(TMask_field& f, KEY k); TSaldaconto_app(); virtual ~TSaldaconto_app() {} }; inline TSaldaconto_app& app() { return (TSaldaconto_app&)main_app(); } #endif