Wt::SDLPalette Class Reference

#include <sdlpalette.h>

Collaboration diagram for Wt::SDLPalette:

Collaboration graph
[legend]
List of all members.

Public Types

 Logical = SDL_LOGPAL
 Physical = SDL_PHYSPAL
enum  Type { Logical = SDL_LOGPAL, Physical = SDL_PHYSPAL }

Public Member Functions

 SDLPalette (SDL_Palette *palette)
 copy constructor
SDLPaletteoperator= (SDL_Palette *palette)
 assign operator
 operator const SDL_Palette * () const
 operator SDL_Palette * ()
int size () const
SDLColor operator[] (int i) const

Private Member Functions

 SDLPalette ()
 private constructor

Private Attributes

SDL_Palette * sdl_palette

Detailed Description

Note:
SDLPalette encapsulates a pointer and not the direct struct as opposed to SDLRect, SDLColor.

Definition at line 34 of file sdlpalette.h.


Member Enumeration Documentation

enum Wt::SDLPalette::Type

Enumerator:
Logical 
Physical 

Definition at line 65 of file sdlpalette.h.

00065                  {
00066         Logical = SDL_LOGPAL,
00067         Physical = SDL_PHYSPAL
00068     } Type;


Constructor & Destructor Documentation

Wt::SDLPalette::SDLPalette ( SDL_Palette *  palette  )  [inline]

copy constructor

Definition at line 37 of file sdlpalette.h.

00038             : sdl_palette(palette) {
00039         assert(sizeof(SDLPalette) == sizeof(SDL_Palette*));
00040     }

Wt::SDLPalette::SDLPalette (  )  [inline, private]

private constructor

Definition at line 72 of file sdlpalette.h.

00072 {}


Member Function Documentation

Wt::SDLPalette::operator const SDL_Palette * (  )  const [inline]

Definition at line 49 of file sdlpalette.h.

References sdl_palette.

00049                                          {
00050         return sdl_palette;
00051     }

Wt::SDLPalette::operator SDL_Palette * (  )  [inline]

Definition at line 53 of file sdlpalette.h.

References sdl_palette.

00053                               {
00054         return sdl_palette;
00055     }

SDLPalette& Wt::SDLPalette::operator= ( SDL_Palette *  palette  )  [inline]

assign operator

Definition at line 43 of file sdlpalette.h.

References sdl_palette.

00043                                                 {
00044         sdl_palette = palette;
00045         return *this;
00046     }

SDLColor Wt::SDLPalette::operator[] ( int  i  )  const [inline]

Definition at line 61 of file sdlpalette.h.

References sdl_palette.

00061                                      {
00062         return sdl_palette->colors[i];
00063     }

int Wt::SDLPalette::size (  )  const [inline]

Definition at line 57 of file sdlpalette.h.

References sdl_palette.

Referenced by Wt::SDLSurface::numColors().

00057                      {
00058         return sdl_palette->ncolors;
00059     }


Member Data Documentation

SDL_Palette* Wt::SDLPalette::sdl_palette [private]

Definition at line 74 of file sdlpalette.h.

Referenced by operator const SDL_Palette *(), operator SDL_Palette *(), operator=(), operator[](), and size().


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

Generated Fri Jul 28 19:32:48 2006.
Copyright © 1998-2003 by the respective authors.

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.