swift
Loading...
Searching...
No Matches
XSwiftBus::CMessageBox Class Reference

Class for drawing a gray box with text messages. More...

#include <messages.h>

Inheritance diagram for XSwiftBus::CMessageBox:
[legend]

Public Member Functions

 CMessageBox (int left, int right, int top)
 Constructor.
template<typename Iterator>
void setMessages (Iterator begin, Iterator end)
 Set messages to draw in message box, from a pair of iterators.
void setValues (int leftPx, int topPx, int rightPx, int bottomPx, int lines, int durationMs)
 Set margin values.
void enableArrows (bool up, bool down)
 Set whether to draw a small arrow at the bottom of the box.
int maxLineLength () const
 Returns the maximum number of characters per line.
Public Member Functions inherited from XSwiftBus::CDrawable
 CDrawable (XPLMDrawingPhase phase, bool before)
 Constructor.
virtual ~CDrawable ()
 Destructor.
bool isVisible () const
 Is currently shown.
void show ()
 Register the draw callback.
void hide ()
 Unregister the draw callback.

Static Public Member Functions

static int lineHeight ()
 Line height based on font.

Protected Member Functions

virtual void draw ()
 Callback to draw the thing.

Detailed Description

Class for drawing a gray box with text messages.

Definition at line 53 of file messages.h.

Constructor & Destructor Documentation

◆ CMessageBox()

XSwiftBus::CMessageBox::CMessageBox ( int left,
int right,
int top )
inline

Constructor.

Parameters
leftNumber of "virtual pixels" between screen left edge and box left edge.
rightNumber of "virtual pixels" between screen right edge and box right edge.
topNumber of "virtual pixels" between screen top edge and box top edge.

Definition at line 60 of file messages.h.

Member Function Documentation

◆ draw()

virtual void XSwiftBus::CMessageBox::draw ( )
protectedvirtual

Callback to draw the thing.

Implements XSwiftBus::CDrawable.

◆ enableArrows()

void XSwiftBus::CMessageBox::enableArrows ( bool up,
bool down )
inline

Set whether to draw a small arrow at the bottom of the box.

Definition at line 76 of file messages.h.

◆ setMessages()

template<typename Iterator>
void XSwiftBus::CMessageBox::setMessages ( Iterator begin,
Iterator end )
inline

Set messages to draw in message box, from a pair of iterators.

Definition at line 66 of file messages.h.


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