//===========================================================================// // File: l4lamp.hpp // // Project: MUNGA Brick: Gauge Module // // Contents: Interface specification for L4 Lamps // //---------------------------------------------------------------------------// // Date Who Modification // // -------- --- -----------------------------------------------------------// // 02/16/96 CPB Initial coding. // //---------------------------------------------------------------------------// // Copyright (C) 1996, Virtual World Entertainment, Inc. All rights reserved // // PROPRIETARY and CONFIDENTIAL // //===========================================================================// #if !defined(L4LAMP_HPP) # define L4LAMP_HPP class L4LampManager; class L4Lamp; class L4GraphicLamp; # if !defined(LAMP_HPP) # include "lamp.hpp" # endif # if !defined(L4CTRL_HPP) # include "l4ctrl.hpp" # endif //######################################################################### //############################# 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; }; #endif