Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

CCursor Class Reference

#include <CursorManager.h>

Inheritance diagram for CCursor:

CStreamObject CObject List of all members.

Public Member Functions

 CCursor (const char *csrfilename)
 ~CCursor (void)
int Read (SStream *stream, Tag tag)
void ReadFinished (void)
void Load (const char *pbmName)
void FreeTexture (void)

Public Attributes

char csr [64]
char curs [64]
 Cursor .CSR filename.
Tag csid
 OS cursor resource (not used).
char imag [64]
 Unique cursor ID.
int hots_x
 Image .PBM filename.
int hots_y
GLuint texid
 Hotspot x, y.

Detailed Description

CCursor class represents a bitmapped cursor specified in a CSR file

Definition at line 43 of file CursorManager.h.


Constructor & Destructor Documentation

CCursor::CCursor const char *  csrfilename  ) 
 

Todo:
For performance, cursors should be textured not bitmapped Use fixed-size 32x32 cursor area, construct texture image from bitmap data including transparency for index 0

Definition at line 76 of file CursorManager.cpp.

References CloseStream(), csid, csr, curs, SStream::filename, hots_x, hots_y, imag, SStream::mode, OpenStream(), and ReadFrom().

CCursor::~CCursor void   ) 
 

Definition at line 99 of file CursorManager.cpp.

References FreeTexture(), and texid.


Member Function Documentation

void CCursor::FreeTexture void   ) 
 

Definition at line 244 of file CursorManager.cpp.

References texid.

Referenced by ~CCursor().

void CCursor::Load const char *  pbmName  ) 
 

Definition at line 105 of file CursorManager.cpp.

References RGB::b, RGB::g, globals, gtfo, SPBMHeader::height, SPBMHeader::magic, pclose(), SGlobals::pfs, popen(), pread(), RGB::r, texid, and SPBMHeader::width.

Referenced by ReadFinished().

int CCursor::Read SStream stream,
Tag  tag
[virtual]
 

Reimplemented from CStreamObject.

Definition at line 250 of file CursorManager.cpp.

References csid, curs, globals, hots_x, hots_y, imag, SGlobals::logWarning, ReadInt(), ReadString(), ReadTag(), TAG_IGNORED, TAG_READ, TagToString(), and CLogFile::Write().

void CCursor::ReadFinished void   )  [virtual]
 

Reimplemented from CStreamObject.

Definition at line 290 of file CursorManager.cpp.

References imag, and Load().


Member Data Documentation

Tag CCursor::csid
 

Definition at line 59 of file CursorManager.h.

Referenced by CCursorManager::BindCursor(), CCursor(), CCursorManager::GetCursor(), and Read().

char CCursor::csr[64]
 

Definition at line 57 of file CursorManager.h.

Referenced by CCursor(), and CCursorManager::FindCursor().

char CCursor::curs[64]
 

Definition at line 58 of file CursorManager.h.

Referenced by CCursor(), and Read().

int CCursor::hots_x
 

Definition at line 61 of file CursorManager.h.

Referenced by CCursor(), CCursorManager::MouseMotion(), and Read().

int CCursor::hots_y
 

Definition at line 61 of file CursorManager.h.

Referenced by CCursor(), CCursorManager::MouseMotion(), and Read().

char CCursor::imag[64]
 

Definition at line 60 of file CursorManager.h.

Referenced by CCursor(), Read(), and ReadFinished().

GLuint CCursor::texid
 

Definition at line 67 of file CursorManager.h.

Referenced by CCursorManager::Draw(), FreeTexture(), Load(), and ~CCursor().


The documentation for this class was generated from the following files:
SourceForge.net Logo Documentation generated by doxygen