namespace ffw
Classes
Enums
Type | Name |
---|---|
enum | MouseButton { LEFT = 0, RIGHT = 1, MIDDLE = 2, EXTRA1 = 3, EXTRA2 = 4 } |
enum | MouseMode { RELEASED = 0, PRESSED = 1, NONE = -1 } |
enum | KeyMode { RELEASED = 0, PRESSED = 1, REPEAT = 2, NONE = -1 } |
enum | Key { UNKNOWN = -1, SPACE = 32, APOSTROPHE = 39, COMMA = 44, MINUS = 45, PERIOD = 46, SLASH = 47, NUM_0 = 48, NUM_1 = 49, NUM_2 = 50, NUM_3 = 51, NUM_4 = 52, NUM_5 = 53, NUM_6 = 54, NUM_7 = 55, NUM_8 = 56, NUM_9 = 57, SEMICOLON = 59, EQUAL = 61, LETTER_A = 65, LETTER_B = 66, LETTER_C = 67, LETTER_D = 68, LETTER_E = 69, LETTER_F = 70, LETTER_G = 71, LETTER_H = 72, LETTER_I = 73, LETTER_J = 74, LETTER_K = 75, LETTER_L = 76, LETTER_M = 77, LETTER_N = 78, LETTER_O = 79, LETTER_P = 80, LETTER_Q = 81, LETTER_R = 82, LETTER_S = 83, LETTER_T = 84, LETTER_U = 85, LETTER_V = 86, LETTER_W = 87, LETTER_X = 88, LETTER_Y = 89, LETTER_Z = 90, BRACKETLEFT = 91, BACKSLASH = 92, BRACKETRIGHT = 93, GRAVEACCENT = 96, WORLD_1 = 161, WORLD_2 = 162, ESCAPE = 256, ENTER = 257, TAB = 258, BACKSPACE = 259, FUNCTION_INSERT = 260, FUNCTION_DELETE = 261, ARROW_RIGHT = 262, ARROW_LEFT = 263, ARROW_DOWN = 264, ARROW_UP = 265, FUNCTION_PAGEUP = 266, FUNCTION_PAGEDOWN = 267, FUNCTION_HOME = 268, FUNCTION_END = 269, FUNCTION_CAPSLOCK = 280, FUNCTION_SCROLLLOCK = 281, FUNCTION_NUMLOCK = 282, FUNCTION_PRINTSCREEN = 283, FUNCTION_PAUSE = 284, FUNCTION_F1 = 290, FUNCTION_F2 = 291, FUNCTION_F3 = 292, FUNCTION_F4 = 293, FUNCTION_F5 = 294, FUNCTION_F6 = 295, FUNCTION_F7 = 296, FUNCTION_F8 = 297, FUNCTION_F9 = 298, FUNCTION_F10 = 299, FUNCTION_F11 = 300, FUNCTION_F12 = 301, FUNCTION_F13 = 302, FUNCTION_F14 = 303, FUNCTION_F15 = 304, FUNCTION_F16 = 305, FUNCTION_F17 = 306, FUNCTION_F18 = 307, FUNCTION_F19 = 308, FUNCTION_F20 = 309, FUNCTION_F21 = 310, FUNCTION_F22 = 311, FUNCTION_F23 = 312, FUNCTION_F24 = 313, FUNCTION_F25 = 314, NUMPAD_0 = 320, NUMPAD_1 = 321, NUMPAD_2 = 322, NUMPAD_3 = 323, NUMPAD_4 = 324, NUMPAD_5 = 325, NUMPAD_6 = 326, NUMPAD_7 = 327, NUMPAD_8 = 328, NUMPAD_9 = 329, NUMPAD_DECIMAL = 330, NUMPAD_DIVIDE = 331, NUMPAD_MULTIPLY = 332, NUMPAD_SUBSTRACT = 333, NUMPAD_ADD = 334, NUMPAD_ENTER = 335, NUMPAD_EQUAL = 336, SHIFT_LEFT = 340, CONTROL_LEFT = 341, ALT_LEFT = 342, SUPER_LEFT = 343, SHIFT_RIGHT = 344, CONTROL_RIGHT = 345, ALT_RIGHT = 346, SUPER_RIGHT = 347, FUNCTION_MENU = 348, FUNCTION_LAST = 348, FUNCTION_CLEAR = 348, FUNCTION_SEPARATOR = 349, FUNCTION_SELECT = 350, FUNCTION_ZOOM = 351, BROWSER_BACK = 352, BROWSER_FAVORITES = 353, BROWSER_FORWARD = 354, BROWSER_HOME = 353, BROWSER_REFRESH = 354, BROWSER_SEARCH = 355, BROWSER_STOP = 356, MEDIA_MUTE = 357, MEDIA_VOLUMEDOWN = 358, MEDIA_VOLUMEUP = 359, MEDIA_NEXT = 360, MEDIA_PREV = 361, MEDIA_STOP = 362, MEDIA_PLAY = 363, MEDIA_MAIL = 364, MEDIA_SELECT = 365, MEDIA_APP1 = 366, MEDIA_APP2 = 367 } |
enum | GuiAlign { LEFT = 0, CENTER, RIGHT, TOP_LEFT, TOP_CENTER, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_CENTER, BOTTOM_RIGHT } |
enum | GuiEventType { ACTION = 0x1, SIZE = 0x10, INNER = 0x20, POSITION = 0x40, HOVER = 0x80, FOCUS = 0x100, STATE = 0x200, INPUT = 0x400, KEY = 0x800, MOUSEBTN = 0x1000, ALL = 0x7FFFFFFF } |
enum | GuiFocusType { DEFAULT = 0, STICKY, DROP, TOGGLE } |
enum | GuiOrientation { FIXED, VERTICAL, HORIZONTAL } |
Typedefs
Type | Name |
---|---|
typedef Point< float > | Pointf |
typedef Point< int > | Pointi |
typedef Point< double > | Pointd |
typedef Rect< float > | Rectf |
typedef Rect< int > | Recti |
typedef Rect< double > | Rectd |
Functions
Type | Name |
---|---|
Color | rgb (unsigned long hex) Constructs ffw::Color from a hexadecimal value. |
Color | rgb (unsigned char r, unsigned char g, unsigned char b) Constructs ffw::Color from three 8-bit balues. |
Color | rgba (unsigned long hex) Constructs ffw::Color from a hexadecimal value with alpha. |
Color | rgba (unsigned char r, unsigned char g, unsigned char b, unsigned char a) Constructs ffw::Color from three 8-bit balues with alpha. |
Color | hsl (const float h, const float s, const float l, const float a = 1.0f) Constructs ffw::Color from HSL values. |
Color | hsv (const float h, const float s, const float v, const float a = 1.0f) Constructs ffw::Color from HSV values. |
ffw::Color | normalize (const Color & col) Normalizes a color returning a copy (won't modify the original) |
ffw::Color | clamp (const ffw::Color & color) Clamps a color between 0.0 and 1.0 values returning a copy (won't modify the original) |
std::ostream & | operator<< (std::ostream & os, const ffw::Color & color) |
bool | operator== (float left, const GuiUnits & right) |
bool | operator!= (float left, const GuiUnits & right) |
GuiUnits | guiPixels (float pixels) |
GuiUnits | guiPercent (float percent) |
GuiUnits | guiWrap () |
T | dot (const ffw::Point< T > & v1, const ffw::Point< T > & v2) |
T | distance (const Point< T > & v1, const Point< T > & v2) |
Point< T > | middle (const Point< T > & v1, const Point< T > & v2) |
ffw::Point< T > | normalize (const Point< T > & vec) |
double | angle (const ffw::Point< T > & v1, const ffw::Point< T > & v2) |
double | angleRad (const ffw::Point< T > & v1, const ffw::Point< T > & v2) |
std::ostream & | operator<< (std::ostream & os, const ffw::Point< T > & vec) |
std::ostream & | operator<< (std::ostream & os, const ffw::Rect< T > & rect) |
Enums Documentation
enum MouseButton
enum ffw::MouseButton {
LEFT = 0,
RIGHT = 1,
MIDDLE = 2,
EXTRA1 = 3,
EXTRA2 = 4,
};
enum MouseMode
enum ffw::MouseMode {
RELEASED = 0,
PRESSED = 1,
NONE = -1,
};
enum KeyMode
enum ffw::KeyMode {
RELEASED = 0,
PRESSED = 1,
REPEAT = 2,
NONE = -1,
};
enum Key
enum ffw::Key {
UNKNOWN = -1,
SPACE = 32,
APOSTROPHE = 39,
COMMA = 44,
MINUS = 45,
PERIOD = 46,
SLASH = 47,
NUM_0 = 48,
NUM_1 = 49,
NUM_2 = 50,
NUM_3 = 51,
NUM_4 = 52,
NUM_5 = 53,
NUM_6 = 54,
NUM_7 = 55,
NUM_8 = 56,
NUM_9 = 57,
SEMICOLON = 59,
EQUAL = 61,
LETTER_A = 65,
LETTER_B = 66,
LETTER_C = 67,
LETTER_D = 68,
LETTER_E = 69,
LETTER_F = 70,
LETTER_G = 71,
LETTER_H = 72,
LETTER_I = 73,
LETTER_J = 74,
LETTER_K = 75,
LETTER_L = 76,
LETTER_M = 77,
LETTER_N = 78,
LETTER_O = 79,
LETTER_P = 80,
LETTER_Q = 81,
LETTER_R = 82,
LETTER_S = 83,
LETTER_T = 84,
LETTER_U = 85,
LETTER_V = 86,
LETTER_W = 87,
LETTER_X = 88,
LETTER_Y = 89,
LETTER_Z = 90,
BRACKETLEFT = 91,
BACKSLASH = 92,
BRACKETRIGHT = 93,
GRAVEACCENT = 96,
WORLD_1 = 161,
WORLD_2 = 162,
ESCAPE = 256,
ENTER = 257,
TAB = 258,
BACKSPACE = 259,
FUNCTION_INSERT = 260,
FUNCTION_DELETE = 261,
ARROW_RIGHT = 262,
ARROW_LEFT = 263,
ARROW_DOWN = 264,
ARROW_UP = 265,
FUNCTION_PAGEUP = 266,
FUNCTION_PAGEDOWN = 267,
FUNCTION_HOME = 268,
FUNCTION_END = 269,
FUNCTION_CAPSLOCK = 280,
FUNCTION_SCROLLLOCK = 281,
FUNCTION_NUMLOCK = 282,
FUNCTION_PRINTSCREEN = 283,
FUNCTION_PAUSE = 284,
FUNCTION_F1 = 290,
FUNCTION_F2 = 291,
FUNCTION_F3 = 292,
FUNCTION_F4 = 293,
FUNCTION_F5 = 294,
FUNCTION_F6 = 295,
FUNCTION_F7 = 296,
FUNCTION_F8 = 297,
FUNCTION_F9 = 298,
FUNCTION_F10 = 299,
FUNCTION_F11 = 300,
FUNCTION_F12 = 301,
FUNCTION_F13 = 302,
FUNCTION_F14 = 303,
FUNCTION_F15 = 304,
FUNCTION_F16 = 305,
FUNCTION_F17 = 306,
FUNCTION_F18 = 307,
FUNCTION_F19 = 308,
FUNCTION_F20 = 309,
FUNCTION_F21 = 310,
FUNCTION_F22 = 311,
FUNCTION_F23 = 312,
FUNCTION_F24 = 313,
FUNCTION_F25 = 314,
NUMPAD_0 = 320,
NUMPAD_1 = 321,
NUMPAD_2 = 322,
NUMPAD_3 = 323,
NUMPAD_4 = 324,
NUMPAD_5 = 325,
NUMPAD_6 = 326,
NUMPAD_7 = 327,
NUMPAD_8 = 328,
NUMPAD_9 = 329,
NUMPAD_DECIMAL = 330,
NUMPAD_DIVIDE = 331,
NUMPAD_MULTIPLY = 332,
NUMPAD_SUBSTRACT = 333,
NUMPAD_ADD = 334,
NUMPAD_ENTER = 335,
NUMPAD_EQUAL = 336,
SHIFT_LEFT = 340,
CONTROL_LEFT = 341,
ALT_LEFT = 342,
SUPER_LEFT = 343,
SHIFT_RIGHT = 344,
CONTROL_RIGHT = 345,
ALT_RIGHT = 346,
SUPER_RIGHT = 347,
FUNCTION_MENU = 348,
FUNCTION_LAST = 348,
FUNCTION_CLEAR = 348,
FUNCTION_SEPARATOR = 349,
FUNCTION_SELECT = 350,
FUNCTION_ZOOM = 351,
BROWSER_BACK = 352,
BROWSER_FAVORITES = 353,
BROWSER_FORWARD = 354,
BROWSER_HOME = 353,
BROWSER_REFRESH = 354,
BROWSER_SEARCH = 355,
BROWSER_STOP = 356,
MEDIA_MUTE = 357,
MEDIA_VOLUMEDOWN = 358,
MEDIA_VOLUMEUP = 359,
MEDIA_NEXT = 360,
MEDIA_PREV = 361,
MEDIA_STOP = 362,
MEDIA_PLAY = 363,
MEDIA_MAIL = 364,
MEDIA_SELECT = 365,
MEDIA_APP1 = 366,
MEDIA_APP2 = 367,
};
enum GuiAlign
enum ffw::GuiAlign {
LEFT = 0,
CENTER,
RIGHT,
TOP_LEFT,
TOP_CENTER,
TOP_RIGHT,
BOTTOM_LEFT,
BOTTOM_CENTER,
BOTTOM_RIGHT,
};
enum GuiEventType
enum ffw::GuiEventType {
ACTION = 0x1,
SIZE = 0x10,
INNER = 0x20,
POSITION = 0x40,
HOVER = 0x80,
FOCUS = 0x100,
STATE = 0x200,
INPUT = 0x400,
KEY = 0x800,
MOUSEBTN = 0x1000,
ALL = 0x7FFFFFFF,
};
enum GuiFocusType
enum ffw::GuiFocusType {
DEFAULT = 0,
STICKY,
DROP,
TOGGLE,
};
enum GuiOrientation
enum ffw::GuiOrientation {
FIXED,
VERTICAL,
HORIZONTAL,
};
Typedefs Documentation
typedef Pointf
typedef Point<float> ffw::Pointf;
typedef Pointi
typedef Point<int> ffw::Pointi;
typedef Pointd
typedef Point<double> ffw::Pointd;
typedef Rectf
typedef Rect<float> ffw::Rectf;
typedef Recti
typedef Rect<int> ffw::Recti;
typedef Rectd
typedef Rect<double> ffw::Rectd;
Functions Documentation
function rgb
Color ffw::rgb (
unsigned long hex
)
Constructs ffw::Color from a hexadecimal value.
For example, ffw::rgb(0xFF0080) returns 100% red and 50% blue. Alpha is set to 100%.
Warning:
Make sure to use 0xRRGGBB formula. For example, using 0xFF00 in this function would result of color with 0% red, 100% green, and 0% blue. Also, using 0xFF would result in complete blue color.
function rgb
Color ffw::rgb (
unsigned char r,
unsigned char g,
unsigned char b
)
Constructs ffw::Color from three 8-bit balues.
For example, ffw::rgb(255, 0, 128) returns 100% red and 50% blue. Alpha is set to 100%.
function rgba
Color ffw::rgba (
unsigned long hex
)
Constructs ffw::Color from a hexadecimal value with alpha.
For example, ffw::rgba(0xFF0080BF) returns 100% red, 50% blue, and 80% alpha.
Warning:
Make sure to use 0xRRGGBBAA formula. For example, using 0xFF0080 in this function would result of color with 0% red, 100% green, 0% blue, and 50% alpha. Also, using 0xFF would result in complete black color with 100% alpha.
function rgba
Color ffw::rgba (
unsigned char r,
unsigned char g,
unsigned char b,
unsigned char a
)
Constructs ffw::Color from three 8-bit balues with alpha.
For example, ffw::rgba(255, 0, 128, 191) returns 100% red, 50% blue, and 80% alpha.
function hsl
Color ffw::hsl (
const float h,
const float s,
const float l,
const float a = 1.0f
)
Constructs ffw::Color from HSL values.
Parameters:
- h The hue component in range [0, 1]
- s The saturation component in range [0, 1]
- l The luminance component in range [0, 1]
- a The alpha component in range [0, 1]
For example, ffw::hsl(0.8f, 0.5f, 0.5f) returns purple color with 50% saturation and 50% luminance.
function hsv
Color ffw::hsv (
const float h,
const float s,
const float v,
const float a = 1.0f
)
Constructs ffw::Color from HSV values.
Parameters:
- h The hue component in range [0, 1]
- s The saturation component in range [0, 1]
- v The value component in range [0, 1]
- a The alpha component in range [0, 1]
function normalize
ffw::Color ffw::normalize (
const Color & col
)
Normalizes a color returning a copy (won't modify the original)
function clamp
ffw::Color ffw::clamp (
const ffw::Color & color
)
Clamps a color between 0.0 and 1.0 values returning a copy (won't modify the original)
function operator<<
std::ostream & ffw::operator<< (
std::ostream & os,
const ffw::Color & color
)
function operator==
bool ffw::operator== (
float left,
const GuiUnits & right
)
function operator!=
bool ffw::operator!= (
float left,
const GuiUnits & right
)
function guiPixels
GuiUnits ffw::guiPixels (
float pixels
)
function guiPercent
GuiUnits ffw::guiPercent (
float percent
)
function guiWrap
GuiUnits ffw::guiWrap ()
function dot
T ffw::dot (
const ffw::Point< T > & v1,
const ffw::Point< T > & v2
)
function distance
T ffw::distance (
const Point< T > & v1,
const Point< T > & v2
)
function middle
Point< T > ffw::middle (
const Point< T > & v1,
const Point< T > & v2
)
function normalize
ffw::Point< T > ffw::normalize (
const Point< T > & vec
)
function angle
double ffw::angle (
const ffw::Point< T > & v1,
const ffw::Point< T > & v2
)
function angleRad
double ffw::angleRad (
const ffw::Point< T > & v1,
const ffw::Point< T > & v2
)
function operator<<
std::ostream & ffw::operator<< (
std::ostream & os,
const ffw::Point< T > & vec
)
function operator<<
std::ostream & ffw::operator<< (
std::ostream & os,
const ffw::Rect< T > & rect
)
The documentation for this class was generated from the following file: include/ffw/gui/backend/guibackendfinegraphics.h