Classes | |
class | Fatal |
an exception thrown when the library experiences a fatal error More... | |
class | Application |
Toplevel application class. More... | |
class | BorderedDialog |
A dialog with decorative borders. More... | |
class | Box |
a box which can hold multiple screen areas More... | |
class | Box::iterator |
an iterator over the box's children More... | |
class | Button |
Button Class. More... | |
class | Color |
Wrapper class for describing colors using 8-bits per red, green, blue, and alpha channels. More... | |
class | CornerContainer |
A container which puts its single child in one of its corners. More... | |
class | Debug |
The Debug class handles the debug channels. More... | |
class | Debug::Endl |
A class that emulates std::endl when DEBUG is defined, but doesn't require <iostream> when it's not. More... | |
class | Debug::Flush |
A class that emulates std::flush when DEBUG is defined, but doesn't require <iostream> when it's not. More... | |
class | Dialog |
Dialog. More... | |
class | Filler |
Filler Class. More... | |
class | FixedDialog |
A dialog that all but ignores its child's packing preferences. More... | |
class | Focus |
Singleton class for handling the current widget that owns keyboard focus. More... | |
class | Font |
FreeType based surface font. More... | |
class | Font::BadFont |
an exception thrown when a font fails to load properly More... | |
class | Font::Glyph |
Glyph class: represents a single ASCII value as a surface. More... | |
struct | Font::Glyph::Metrics |
holds the info from FT_Glyph_Slot_Rec More... | |
struct | Font::Metrics |
info from FT_Face_Rec More... | |
class | FullScreenDialog |
A dialog that completely fills its parent widget. More... | |
class | Joystick |
A class to handle joystick information. More... | |
class | Label |
Display a text message onscreen. More... | |
class | LineEdit |
LineEdit: a single-line text box for user input. More... | |
class | ListBox |
A multi-line selection with scroll bar. More... | |
class | BoolMarshal |
A custom marshaller for bools. More... | |
class | MessageDialog |
Display a message to the user, allow them to dismiss this box. More... | |
class | Mixer |
Wrapper class around the audio mixer. More... | |
class | Pointer |
virtual base pointer class More... | |
class | Mouse |
software mouse pointer. More... | |
class | Movie |
"movie" of animated surfaces (stop-animation) More... | |
class | MultiLineEdit |
multi-line text box for user input More... | |
class | Music |
Wrapper class for loading and playing music files (mp3, ogg, mod). More... | |
class | Mutex |
Mutex class. More... | |
class | Painter |
class that allows drawing graphics primitives onto a Surface More... | |
class | Pixelformat |
Format of pixels in memory. More... | |
class | Point |
Class to handle x,y - points on the screen. More... | |
class | HardPointer |
a pointer which uses SDL's native pointer capabilities More... | |
class | SoftPointer |
a software pointer More... | |
class | AnimatedPointer |
an animated software pointer More... | |
class | PollBase |
Base class for watching for socket events. More... | |
class | Poll |
Watch a socket for data. More... | |
class | ProgressBar |
Simple widget that paints a progress meter. More... | |
class | ProgressDialog |
progress meter dialog More... | |
class | PushButton |
PushButton Class. More... | |
class | QuestionBox |
Dialog box with question, user answers yes / no. More... | |
class | Rect |
Rectangle class. Has corners, fill, etc. More... | |
class | Region |
Region specifies a 'working area' of the screen - pixels outside the region are always ignored. More... | |
class | Region::RectList |
Used for things like passing an array of SDL_Rect to SDL_UpdateRects(). More... | |
struct | ResDestroy |
default data freeing mechanism for resources (do nothing) More... | |
struct | ResDestroy< R * > |
default data freeing mechanism for resources which are pointers (call delete) More... | |
struct | ResInval |
default fallback for a failed resource find (return a reference to a static member) More... | |
struct | ResInval< R * > |
default fallback for a failed resource find for pointer data (return null) More... | |
struct | ResLoad |
default loader for resource data More... | |
struct | ResLoad< R * > |
default loader for pointer resource data More... | |
class | Resource |
Resource manager with reference counting. More... | |
class | ResourceRegistry |
R is the class of the resource type Loader specifies how to load the resource from a file Invalid specifies the fallback mechanism if a resource isn't found Destroy specifies how to free the resource data when the resource is freed. More... | |
class | RootWindow |
singleton class, handles access to the entire drawing surface of the application More... | |
class | Sample |
Sample - for loading / playing sounds. More... | |
class | ScreenArea |
ScreenArea Baseclass. More... | |
struct | ScreenArea::PackingInfo |
packing information to pass to containers More... | |
struct | ScreenArea::PackingInfo::Expander |
The per-axis packing info. More... | |
class | ScreenArea::PackingInfo::Weights |
For use by containers. More... | |
class | ScreenSurface |
interface to the underlying SDL_Surface More... | |
class | SDLFatal |
a fatal error generated by SDL's behavior (usually out of memory) More... | |
class | SDLHandler |
SDL_Event wrapper class. More... | |
class | SingleContainer |
A container which can hold a single child. More... | |
class | Slider |
Slider Class. More... | |
class | Sound |
abstract sound class More... | |
struct | StringHash |
A wrapper for std::hash_map<std::string,Foo>, since it didn't make the C++ standard. More... | |
class | GammaFunction |
A texture to use with Surface::shiftGamma() The "texture" always has to have a size of 256*256 values ! More... | |
class | Surface |
Surface represents a bitmap (texture). More... | |
class | Table |
an automatically expanding table More... | |
class | Terminal |
Terminal widget: has multi-line output, one-line input, scroll bar. More... | |
class | Time |
A time class to escape SDL's 2^32 ms epoch limitations. More... | |
struct | Time::Info |
A structure used when parsing time into days, hours, ... More... | |
class | Timer |
Timer handles known events that must happen (fairly) regularly. More... | |
class | ToggleButton |
ToggleButton. More... | |
class | Video |
Wrapper class for loading and playing mpeg video. More... | |
class | VideoWidget |
Video player widget. More... | |
class | Widget |
Widget Baseclass. More... | |
Enumerations | |
enum | { KEY_UNKNOWN, KEY_FIRST = 0, KEY_BACKSPACE, KEY_TAB, KEY_CLEAR, KEY_RETURN, KEY_PAUSE, KEY_ESCAPE, KEY_SPACE, KEY_EXCLAIM, KEY_QUOTEDBL, KEY_HASH, KEY_DOLLAR, KEY_AMPERSAND, KEY_QUOTE, KEY_LEFTPAREN, KEY_RIGHTPAREN, KEY_ASTERISK, KEY_PLUS, KEY_COMMA, KEY_MINUS, KEY_PERIOD, KEY_SLASH, KEY_0, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, KEY_7, KEY_8, KEY_9, KEY_COLON, KEY_SEMICOLON, KEY_LESS, KEY_EQUALS, KEY_GREATER, KEY_QUESTION, KEY_AT, KEY_LEFTBRACKET, KEY_BACKSLASH, KEY_RIGHTBRACKET, KEY_CARET, KEY_UNDERSCORE, KEY_BACKQUOTE, KEY_a, KEY_b, KEY_c, KEY_d, KEY_e, KEY_f, KEY_g, KEY_h, KEY_i, KEY_j, KEY_k, KEY_l, KEY_m, KEY_n, KEY_o, KEY_p, KEY_q, KEY_r, KEY_s, KEY_t, KEY_u, KEY_v, KEY_w, KEY_x, KEY_y, KEY_z, KEY_DELETE, KEY_WORLD_0 = 160, KEY_WORLD_1, KEY_WORLD_2, KEY_WORLD_3, KEY_WORLD_4, KEY_WORLD_5, KEY_WORLD_6, KEY_WORLD_7, KEY_WORLD_8, KEY_WORLD_9, KEY_WORLD_10, KEY_WORLD_11, KEY_WORLD_12, KEY_WORLD_13, KEY_WORLD_14, KEY_WORLD_15, KEY_WORLD_16, KEY_WORLD_17, KEY_WORLD_18, KEY_WORLD_19, KEY_WORLD_20, KEY_WORLD_21, KEY_WORLD_22, KEY_WORLD_23, KEY_WORLD_24, KEY_WORLD_25, KEY_WORLD_26, KEY_WORLD_27, KEY_WORLD_28, KEY_WORLD_29, KEY_WORLD_30, KEY_WORLD_31, KEY_WORLD_32, KEY_WORLD_33, KEY_WORLD_34, KEY_WORLD_35, KEY_WORLD_36, KEY_WORLD_37, KEY_WORLD_38, KEY_WORLD_39, KEY_WORLD_40, KEY_WORLD_41, KEY_WORLD_42, KEY_WORLD_43, KEY_WORLD_44, KEY_WORLD_45, KEY_WORLD_46, KEY_WORLD_47, KEY_WORLD_48, KEY_WORLD_49, KEY_WORLD_50, KEY_WORLD_51, KEY_WORLD_52, KEY_WORLD_53, KEY_WORLD_54, KEY_WORLD_55, KEY_WORLD_56, KEY_WORLD_57, KEY_WORLD_58, KEY_WORLD_59, KEY_WORLD_60, KEY_WORLD_61, KEY_WORLD_62, KEY_WORLD_63, KEY_WORLD_64, KEY_WORLD_65, KEY_WORLD_66, KEY_WORLD_67, KEY_WORLD_68, KEY_WORLD_69, KEY_WORLD_70, KEY_WORLD_71, KEY_WORLD_72, KEY_WORLD_73, KEY_WORLD_74, KEY_WORLD_75, KEY_WORLD_76, KEY_WORLD_77, KEY_WORLD_78, KEY_WORLD_79, KEY_WORLD_80, KEY_WORLD_81, KEY_WORLD_82, KEY_WORLD_83, KEY_WORLD_84, KEY_WORLD_85, KEY_WORLD_86, KEY_WORLD_87, KEY_WORLD_88, KEY_WORLD_89, KEY_WORLD_90, KEY_WORLD_91, KEY_WORLD_92, KEY_WORLD_93, KEY_WORLD_94, KEY_WORLD_95 = 255, KEY_KP0, KEY_KP1, KEY_KP2, KEY_KP3, KEY_KP4, KEY_KP5, KEY_KP6, KEY_KP7, KEY_KP8, KEY_KP9, KEY_KP_PERIOD, KEY_KP_DIVIDE, KEY_KP_MULTIPLY, KEY_KP_MINUS, KEY_KP_PLUS, KEY_KP_ENTER, KEY_KP_EQUALS, KEY_UP, KEY_DOWN, KEY_RIGHT, KEY_LEFT, KEY_INSERT, KEY_HOME, KEY_END, KEY_PAGEUP, KEY_PAGEDOWN, KEY_F1, KEY_F2, KEY_F3, KEY_F4, KEY_F5, KEY_F6, KEY_F7, KEY_F8, KEY_F9, KEY_F10, KEY_F11, KEY_F12, KEY_F13, KEY_F14, KEY_F15, KEY_NUMLOCK, KEY_CAPSLOCK, KEY_SCROLLOCK, KEY_RSHIFT, KEY_LSHIFT, KEY_RCTRL, KEY_LCTRL, KEY_RALT, KEY_LALT, KEY_RMETA, KEY_LMETA, KEY_LSUPER, KEY_RSUPER, KEY_MODE, KEY_HELP, KEY_PRINT, KEY_SYSREQ, KEY_BREAK, KEY_MENU, KEY_POWER, KEY_EURO, KEY_LAST } |
enum | { KEY_MOD_NONE, KEY_MOD_NUM, KEY_MOD_LCTRL, KEY_MOD_RCTRL, KEY_MOD_CAPS, KEY_MOD_RSHIFT, KEY_MOD_LSHIFT, KEY_MOD_LALT, KEY_MOD_RALT, KEY_MOD_LMETA, KEY_MOD_RMETA } |
Functions | |
std::ostream & | operator<< (std::ostream &os, const Pixelformat &pf) |
std::ostream & | operator<< (std::ostream &s, const Point &p) |
std::ostream & | operator<< (std::ostream &s, const Rect &p) |
Time | operator+ (Uint32 val, const Time &t) |
increment a timestamp | |
Time | operator+ (int val, const Time &t) |
increment a timestamp |
For a std::vector<A>, the sequence would be something like:
const A init_data[] = {...}; const unsigned num_init_data = sizeof(init_data)/sizeof(init_data[0]); const std::vector<A> vec(init_data, init_data + num_init_data);
where we use the fact that a pointer is a valid input iterator. It's somewhat harder with a std::map, since std::pair can only initialize from a normal constructor. You have to do something like:
const MapType::value_type init_data[] = {MapType::value_type(key1, data1), ...};
writing out each of the constructors explicitly. The following class provides a trick to initialize the std::pair values in the map. It should work for any container of std::pair<>. The initialization sequence then looks something like:
const PairInit<MapType::value_type> init_data[] = {{key1, data1}, {key2, data2}, ...}; const unsigned num_init_data = sizeof(init_data)/sizeof(init_data[0]); const MapType map(init_data->itr(), init_data->itr(num_init_data));
We use a custom iterator which casts to the type passed in the template when * dereferenced, so this works out nicely.
|
|
|
This document is licensed under the terms of the GNU Free Documentation License and may be freely distributed under the conditions given by this license.