23 #ifndef PIXPLANEFMCCDU_SRC_SCREEN_H_ 24 #define PIXPLANEFMCCDU_SRC_SCREEN_H_ 29 #include <SDL2/SDL_ttf.h> 74 bool isRunning =
false;
75 bool stopRequested =
false;
147 Uint32 SDLUserEventBase;
155 init = 0, LineUpdate = 1, clear = 2, quit = 4
175 bool isx737FMCLegsPage =
false;
184 void doInit(SDL_Event * event);
202 SDL_Texture *
generateCharacterTexture (std::string fontPath,
int cellWidth,
int maxHeight, SDL_Renderer * renderer);
206 TTF_Font *
getFont (std::string fontPath,
int maxWidth ,
int maxHeight, SDL_Renderer * renderer);
TTF_Font * getFont(std::string fontPath, int maxWidth, int maxHeight, SDL_Renderer *renderer)
generate a font that fits within a cell's width and height
Definition: Screen.cpp:607
int shortCellHeight
the height of a short character.
Definition: Screen.h:96
SDL_Texture * tallChars
a texture holding pre-generated tall characters
Definition: Screen.h:118
int tallCellHeight
the height of a tall character.
Definition: Screen.h:93
Manage the FMC CDU display.
Definition: Screen.h:57
SDL_Window * window
SDL Window.
Definition: Screen.h:78
int cellWidth
width of a character cell on the screen.
Definition: Screen.h:90
void doClear()
implement a "clear" action
Definition: Screen.cpp:383
void doDrawLine(SDL_Event *event)
implement a "lineUpdate" action
Definition: Screen.cpp:393
SDL_Texture * screenBufferTexture
ready-composited complete screen texture
Definition: Screen.h:124
Event Data.
Definition: Screen.h:165
int winLeftBorder
left border of the screen.
Definition: Screen.h:101
ScreenEventType
enum of possible event types
Definition: Screen.h:153
int numCols
current number of columns.
Definition: Screen.h:84
int numRows
current number of rows.
Definition: Screen.h:87
SDL_Renderer * renderer
SDL renderer.
Definition: Screen.h:81
int shortCharVertOffset
vertical offset for short chars.
Definition: Screen.h:112
SDL_Texture * shortChars
a texture holding pre-generated short characters
Definition: Screen.h:121
int linePos[15]
screen offsets for each row.
Definition: Screen.h:115
void doInit(SDL_Event *event)
implement an "init" action
Definition: Screen.cpp:277
void transferBufferToDisplay()
transfer buffer to display
Definition: Screen.cpp:510
Uint32 interPollDelayMs
how long to delay in between polls of the update queue.
Definition: Screen.h:145
SDL_Texture * generateCharacterTexture(std::string fontPath, int cellWidth, int maxHeight, SDL_Renderer *renderer)
generate the texture containing all characters for a given cell width and height
Definition: Screen.cpp:516
Uint32 screenRefreshTimerMs
How many ms to wait after a line changes before repainting the screen.
Definition: Screen.h:138
int winTopBorder
top border of the screen.
Definition: Screen.h:106