Rise
The Vieneo Province
Loading...
Searching...
No Matches
Instrument Class Referenceabstract

#include <Instrument.h>

Inherited by AlertMessageStack, Altimeter, Altimeter2, AttitudeIndicator, AttitudeIndicator2, CarRadio, CargoManagement, Compass, ContactList, Diagnostics, ElevatorTrim, EngineBar, EngineBox, FMA, FMA2, Flaps, HeadlightBox, HeadlightIcon, IndicatedAirSpeed, IndicatedAirSpeed2, Intermedia, LandingGear, LandingStrut, LineInput, MovingMap, Orbit, RadioAltimeter, Scanner, StreetView, TCASOverlay, and Wind.

Collaboration diagram for Instrument:
[legend]

Public Member Functions

 Instrument (int prmX, int prmY, float prmXScale, float prmYScale, Bus *prmBus, Logger *prmLogger, DeviceObject *prmDevice, std::vector< Font * > prmFonts)
void DrawText (const WCHAR *str, int relativeX, int relativeY, float prmZ, int flags, RiseMath::Color color, int font=-1, std::string elementName="", int width=0, int height=0) const
virtual void Render ()=0
virtual void FrameMove (float fElapsed)
virtual bool HandleKeyPress (short key, bool shift)
virtual bool UpdateKeyRepeat (const unsigned char *keys, bool shift, float elapsed)
virtual void OnPageChanged ()

Public Attributes

std::string profileName = "Instrument"

Protected Attributes

int x = 0
int y = 0
float xScale = 1.0f
float yScale = 1.0f
DeviceObject * pDevice = nullptr
Bus * bus = nullptr
Logger * logger = nullptr
UINT defaultFont = 0
bool cacheFixedText = false
int uiRow = 0
bool showMenu = false
int uiMenuColumn = -1

Private Attributes

std::vector< Font * > fonts

Detailed Description

Definition at line 12 of file Instrument.h.

Constructor & Destructor Documentation

◆ Instrument()

Instrument::Instrument ( int prmX,
int prmY,
float prmXScale,
float prmYScale,
Bus * prmBus,
Logger * prmLogger,
DeviceObject * prmDevice,
std::vector< Font * > prmFonts )
inline

Definition at line 36 of file Instrument.h.

Here is the call graph for this function:

Member Function Documentation

◆ DrawText()

void Instrument::DrawText ( const WCHAR * str,
int relativeX,
int relativeY,
float prmZ,
int flags,
RiseMath::Color color,
int font = -1,
std::string elementName = "",
int width = 0,
int height = 0 ) const
inline
Todo
could be used for tutorial mode

Definition at line 49 of file Instrument.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FrameMove()

◆ HandleKeyPress()

virtual bool Instrument::HandleKeyPress ( short key,
bool shift )
inlinevirtual

Reimplemented in CargoManagement, Intermedia, Orbit, and Scanner.

Definition at line 96 of file Instrument.h.

◆ OnPageChanged()

virtual void Instrument::OnPageChanged ( )
inlinevirtual

Reimplemented in CargoManagement, and Orbit.

Definition at line 107 of file Instrument.h.

◆ Render()

◆ UpdateKeyRepeat()

virtual bool Instrument::UpdateKeyRepeat ( const unsigned char * keys,
bool shift,
float elapsed )
inlinevirtual

Reimplemented in CargoManagement, and Orbit.

Definition at line 102 of file Instrument.h.

Member Data Documentation

◆ bus

Bus* Instrument::bus = nullptr
protected

Definition at line 22 of file Instrument.h.

◆ cacheFixedText

bool Instrument::cacheFixedText = false
protected

Definition at line 26 of file Instrument.h.

◆ defaultFont

UINT Instrument::defaultFont = 0
protected

Definition at line 24 of file Instrument.h.

◆ fonts

std::vector<Font*> Instrument::fonts
private

Definition at line 14 of file Instrument.h.

◆ logger

Logger* Instrument::logger = nullptr
protected

Definition at line 23 of file Instrument.h.

◆ pDevice

DeviceObject* Instrument::pDevice = nullptr
protected

Definition at line 21 of file Instrument.h.

◆ profileName

std::string Instrument::profileName = "Instrument"

Definition at line 35 of file Instrument.h.

◆ showMenu

bool Instrument::showMenu = false
protected

Definition at line 30 of file Instrument.h.

◆ uiMenuColumn

int Instrument::uiMenuColumn = -1
protected

Definition at line 31 of file Instrument.h.

◆ uiRow

int Instrument::uiRow = 0
protected
Todo
I think these are only used in the cargo manifest so far!?

Definition at line 29 of file Instrument.h.

◆ x

int Instrument::x = 0
protected

Definition at line 17 of file Instrument.h.

◆ xScale

float Instrument::xScale = 1.0f
protected

Definition at line 19 of file Instrument.h.

◆ y

int Instrument::y = 0
protected

Definition at line 18 of file Instrument.h.

◆ yScale

float Instrument::yScale = 1.0f
protected

Definition at line 20 of file Instrument.h.


The documentation for this class was generated from the following file: