#pragma once class L4LampManager; class L4Lamp; class L4GraphicLamp; #include "..\munga\lamp.h" #include "l4ctrl.h" //######################################################################### //############################# L4LampManager ############################# //######################################################################### class L4LampManager: public LampManager { friend class L4Lamp; //---------------------------------------------------------------------- // Public methods //---------------------------------------------------------------------- public: L4LampManager(LBE4ControlsManager *controls_manager); ~L4LampManager(); Logical TestInstance() const; virtual void Update(ModeMask current_mode_mask); //---------------------------------------------------------------------- // Protected methods //---------------------------------------------------------------------- protected: void AssertNewLampValue(int lamp_number, int lamp_value); //---------------------------------------------------------------------- // Protected data //---------------------------------------------------------------------- protected: LBE4ControlsManager *controlsManager; int *previousLampState; Logical *lampActiveFlag; }; //######################################################################### //################################ L4Lamp ################################# //######################################################################### class L4Lamp : public Lamp { //---------------------------------------------------------------------- // Public methods //---------------------------------------------------------------------- public: enum { LampStateDim = Lamp::NextLampState, NextLampState }; L4Lamp( LampID lamp_number, ModeMask mode_mask, L4LampManager *lamp_manager ); ~L4Lamp(); Logical TestInstance() const; void SetAutomaticOperation(Logical automatic_flag = True); protected: //---------------------------------------------------------------------- // Protected methods //---------------------------------------------------------------------- void Update(Logical force_notify_of_state_change = False); void NotifyOfStateChange(); //---------------------------------------------------------------------- // Public data //---------------------------------------------------------------------- public: ControlsButton automaticValue; // controls lampState if 'automatic' is true //---------------------------------------------------------------------- // Protected data //---------------------------------------------------------------------- protected: ControlsButton previousAutomaticValue; Logical automatic; int alertValue; }; //######################################################################### //############################# L4GraphicLamp ############################# //######################################################################### class L4GraphicLamp : public GraphicLamp { //---------------------------------------------------------------------- // Public methods //---------------------------------------------------------------------- public: L4GraphicLamp( LampID lamp_number, ModeMask mode_mask, GaugeRenderer *renderer, int graphics_port_number, int left, int bottom, const char *bitmap_name, int bg_color, int fg_color, Logical opaque_flag = True ); ~L4GraphicLamp(); Logical TestInstance() const; protected: //---------------------------------------------------------------------- // Protected methods //---------------------------------------------------------------------- void NotifyOfStateChange(); //---------------------------------------------------------------------- // Protected data //---------------------------------------------------------------------- protected: Logical opaque; char *mapName; int bgColor, fgColor; };