In file libs/cs2d/csdive/libDIVE.h:

class diveWindow

DIVE window class This class implements everything needed to use a DIVE context

Public Methods

inline long ActiveBuff()
Return active buffer
bool AdjustAspectRatio(long *Width, long *Height)
Adjust these variables so that Width/Height == BufferWidth/BufferHeight
u_char* BeginPaint(ULONG * BytesPerLine, long BufferNo)
Call this to get the address of the buffer to paint in
bool Bind(HWND winHandle)
Bind DIVE buffer to a PM window, either client or frame window
inline long BufferHeight()
Return logical buffer height
inline long BufferWidth()
Return logical buffer width
virtual MRESULT ClientMessage(ULONG Message, MPARAM MsgParm1, MPARAM MsgParm2)
Two virtual functions that performs PM message management for frame and client
inline void Command(ULONG CommandCode)
Send a message to frame window (any of cmdXXX works too)
bool DisableAccelTable()
Disable standard accelerator table for window so we can use ALT, ALT+F4 etc
diveWindow(long Width, long Height, FOURCC Format, long nBuff)
Constructor: attach DIVE view to client of given frame handle
void EndPaint()
Call this when you`re done with painting
bool FullScreen(bool State)
Switch to/from full-screen mode
inline bool isAspectRatioConst()
Return 'constant aspect ratio' flag
inline bool isMinimized()
Return minimized status
inline bool isPaused()
Return if window is paused
inline void MaintainAspectRatio(bool State)
Enable or disable constant aspect ratio of window
inline void MouseCursor(ULONG ID)
Set mouse cursor shape when it is over DIVE window
void MouseVisible(bool State)
Set mouse cursor visibility when it is over DIVE window
inline void Pause(bool State)
Pause window: application will skip ticks in BeginPaint ()
bool ResetPhysCLUT()
Restore default desktop palette
bool Resize(long Width, long Height, bool Center)
Resize *client* window, compute and set new frame window size
bool ResizeBuffer(long Width, long Height, FOURCC Format)
Resize *image buffer*; all previous images will be lost
bool SetCLUT(ULONG * NewCLUT, int Count)
Set *logical* color lookup table (AKA palette)
inline void SetFocusHandler(tFocusHandler Handler, void *param)
Define window focus change handler
inline void SetKeyboardHandler(tKeyboardHandler Handler, void *param)
Define Keyboard Handler
inline void SetMouseHandler(tMouseHandler Handler, void *param)
Define mouse handler
bool SetPhysCLUT()
Set physical CLUT to logical CLUT
bool SetPos(long X, long Y)
Set DIVE window position
inline void SetTerminateHandler(tTerminateHandler Handler, void *param)
Define Terminate Handler
inline bool SetTitle(char *Title)
Set window title: This function requires a message queue
bool Show(bool Visible)
Show the window
inline void Switch(long BufferNo, PRECTL rect = NULL)
Repaint DIVE buffer
bool Unbind(bool Destroy)
Unbind from window; optionally destroy window
inline void WaitSwitch()
Wait until buffer redraw is complete. Recommended before calling Switch()
inline long WindowHeight()
Return physical client window height
inline long WindowWidth()
Return physical client window width
virtual ~diveWindow()
Destructor: free DIVE buffers and memory

Documentation

DIVE window class This class implements everything needed to use a DIVE context. If you attach it to a frame window (by passing a handle of a frame window in constructor) it will replace system menu (or application menu if there is one) by a specialized one. If you pass a handle of a different-type window, DIVE context will simply attach to that window (@@ NOT TESTED! but should work). All window resises, moves etc are tracked so that DIVE buffer always covers entire frame window client area (or entire window area). You can set up some additional callbacks to process all input to the window such as mouse and keyboard.
diveWindow(long Width, long Height, FOURCC Format, long nBuff)
Constructor: attach DIVE view to client of given frame handle

virtual ~diveWindow()
Destructor: free DIVE buffers and memory

bool Bind(HWND winHandle)
Bind DIVE buffer to a PM window, either client or frame window

bool Unbind(bool Destroy)
Unbind from window; optionally destroy window

bool SetCLUT(ULONG * NewCLUT, int Count)
Set *logical* color lookup table (AKA palette)

bool SetPhysCLUT()
Set physical CLUT to logical CLUT

bool ResetPhysCLUT()
Restore default desktop palette

bool Show(bool Visible)
Show the window

bool DisableAccelTable()
Disable standard accelerator table for window so we can use ALT, ALT+F4 etc

virtual MRESULT ClientMessage(ULONG Message, MPARAM MsgParm1, MPARAM MsgParm2)
Two virtual functions that performs PM message management for frame and client

u_char* BeginPaint(ULONG * BytesPerLine, long BufferNo)
Call this to get the address of the buffer to paint in

void EndPaint()
Call this when you`re done with painting

inline void MaintainAspectRatio(bool State)
Enable or disable constant aspect ratio of window

inline void Pause(bool State)
Pause window: application will skip ticks in BeginPaint ()

void MouseVisible(bool State)
Set mouse cursor visibility when it is over DIVE window

inline void MouseCursor(ULONG ID)
Set mouse cursor shape when it is over DIVE window

inline void Switch(long BufferNo, PRECTL rect = NULL)
Repaint DIVE buffer

inline void WaitSwitch()
Wait until buffer redraw is complete. Recommended before calling Switch()

inline long ActiveBuff()
Return active buffer

inline bool SetTitle(char *Title)
Set window title: This function requires a message queue

inline void Command(ULONG CommandCode)
Send a message to frame window (any of cmdXXX works too)

bool AdjustAspectRatio(long *Width, long *Height)
Adjust these variables so that Width/Height == BufferWidth/BufferHeight

bool Resize(long Width, long Height, bool Center)
Resize *client* window, compute and set new frame window size

bool ResizeBuffer(long Width, long Height, FOURCC Format)
Resize *image buffer*; all previous images will be lost

bool FullScreen(bool State)
Switch to/from full-screen mode

bool SetPos(long X, long Y)
Set DIVE window position

inline void SetKeyboardHandler(tKeyboardHandler Handler, void *param)
Define Keyboard Handler

inline void SetTerminateHandler(tTerminateHandler Handler, void *param)
Define Terminate Handler

inline void SetMouseHandler(tMouseHandler Handler, void *param)
Define mouse handler

inline void SetFocusHandler(tFocusHandler Handler, void *param)
Define window focus change handler

inline bool isPaused()
Return if window is paused

inline bool isAspectRatioConst()
Return 'constant aspect ratio' flag

inline bool isMinimized()
Return minimized status

inline long BufferWidth()
Return logical buffer width

inline long BufferHeight()
Return logical buffer height

inline long WindowWidth()
Return physical client window width

inline long WindowHeight()
Return physical client window height


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de