tbx
0.7.5
|
Class to return information on a screen mode. More...
#include <modeinfo.h>
Public Member Functions | |
ModeInfo () | |
Constructor to retrieve information about the current screen mode. | |
ModeInfo (int mode) | |
Constructor to retrieve information about the given screen mode. More... | |
void | mode (int mode=-1) |
Set the mode to return information about. More... | |
int | mode () const |
Get the mode number information will be returned about. | |
int | colours () const |
Return the number of colours for the mode. More... | |
Point | eig () const |
Return the eigen factors for the mode. More... | |
Size | screen_unit () const |
Get the size of one pixel in OS units. More... | |
Size | pixel_size () const |
Get the screen size in pixels. More... | |
Size | screen_size () const |
Get the screen size in OS units. More... | |
Static Public Member Functions | |
static int | screen_mode () |
Get to current sreen mode. More... | |
Protected Attributes | |
int | _mode |
Screen mode number interrogated for details. | |
Class to return information on a screen mode.
The mode number referred to in this class is either the standard screen mode number or for RISC OS 3.5 and above can be a mode specifier or a sprite mode word.
|
inline |
Constructor to retrieve information about the given screen mode.
mode | screen mode number |
|
inline |
Return the number of colours for the mode.
|
inline |
Return the eigen factors for the mode.
The eigen factors are the binary shift to convert from screen pixels to OS units.
e.g. and eigen factor of 2 will give 1 pixels = 1<<2 or 4 os units
|
inline |
Set the mode to return information about.
mode | screen mode number |
|
inline |
Get the screen size in pixels.
|
inlinestatic |
Get to current sreen mode.
This is the actual mode value and not -1 (which is used in some APIs to mean the current mode).
This value is only avaliable on RISC OS 3.5 or later
|
inline |
Get the screen size in OS units.
|
inline |
Get the size of one pixel in OS units.