MGD::DEVICE_X32 Class Reference

A hybrid between a DEVICE_X and DEVICE_MEM32RGB. More...

#include <mi32/mg2x32.h>

Inheritance diagram for MGD::DEVICE_X32:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DEVICE_X32 ()
virtual ~DEVICE_X32 ()
ERRVALUE Create (Display *display, Drawable drawable, INT32 height, INT32 width)
ERRVALUE Create (Widget widget)
Pixmap GetPixmap () const
MGD::DEVICE_XGetXDevice ()
ERRVALUE Resize (Drawable drawable, INT32 height, INT32 width)
void UpdatePixmap ()
ERRVALUE UpdateSize ()

Detailed Description

A hybrid between a DEVICE_X and DEVICE_MEM32RGB.

To the caller, this seems to be just like an MGD::DEVICE_MEM32RGB but it also creates an X Pixmap the same size. After doing some rendering, call UpdatePixmap() to transfer the contents of the memory frame buffer to the pixmap. If the X device is not 32-bit, it will automatically convert the image to the format necessary.


Constructor & Destructor Documentation

MGD::DEVICE_X32::DEVICE_X32 (  ) 

constructor

virtual MGD::DEVICE_X32::~DEVICE_X32 (  )  [virtual]

Destructor.


Member Function Documentation

ERRVALUE MGD::DEVICE_X32::Create ( Display *  display,
Drawable  drawable,
INT32  height,
INT32  width 
)

Create a buffered pixmap for an X display and drawable.

Parameters:
display X display pointer
drawable X drawable
height Height in pixels
width Width in pixels
ERRVALUE MGD::DEVICE_X32::Create ( Widget  widget  ) 

Create a buffered pixmap for an X Widget.

Size will be determined from widget. Widget background pixmap will be set to the buffered pixmap. When widget size changes, you must call UpdateSize() to adjust the pixmap size. This is not done automatically to avoid multiple updates during user sizing operation.

Pixmap MGD::DEVICE_X32::GetPixmap (  )  const [inline]

Return the pixmap being used for this device.

Note that the pixmap is owned by the device and will be freed when the device is destroyed.

MGD::DEVICE_X& MGD::DEVICE_X32::GetXDevice (  )  [inline]

Get the X device associated with this device.

ERRVALUE MGD::DEVICE_X32::Resize ( Drawable  drawable,
INT32  height,
INT32  width 
) [inline]

Resize the pixmap and image buffer.

Current contents are destroyed by this process. New pixmap is blank. Previous pixmap will be destroyed in the process.

void MGD::DEVICE_X32::UpdatePixmap (  ) 

Transfer the contents of the memory frame buffer to the X Pixmap.

ERRVALUE MGD::DEVICE_X32::UpdateSize (  ) 

Update buffered pixmap size after widget size changes.

Current pixmap contents will be destroyed and the new contents will be blank.


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

Generated on Sun Oct 7 21:35:19 2012 for TNTsdk 2012 by  doxygen 1.6.1