dmIGraphics Class Reference

Graphic base interface. More...

#include <CCI_Graphics.h>

Inherits dmINotify.

List of all members.

Public Member Functions

bool SetPageScale (dm_uint pageScale)
 Set the scale factor used for rendering.
dm_uint GetPageScale ()
 Return the scale factor used for rendering.
void * GetNativeWindow ()
 Return a handle to the native window associated to this Graphics object.
dmGraphics * GetGraphics ()
 Return the internal Daim graphics object.
bool Draw (void *nativeDC, const dm_rect *boundRect, dm_uint paintFlags)
 Ask the graphics object to render its content (i.e its attached document).
cci_object * GetDocument ()
 Return the document object associated with the graphic object.
bool SetDocument (cci_object *document)
 Set the document object associated with the graphic object Note that document must implement the dmIDocument interface.
bool ClearDocument ()
 Remove the document associated with the graphic object.
bool InitGraphics (void *nativeWindow)
 Initialise the graphic object.
bool ProcessSystemEvent (dm_uint structType, dm_uint eventType, dm_uint button, dm_uint keyQual, dm_uint keyCode, dm_int cursorX, dm_int cursorY)
 Process an event initiated from the native widgets.
bool SetDisplay (dm_int left, dm_int top, dm_uint width, dm_uint height)
 Set the size of the display output area.
dm_int ScreenX ()
 Return the current screen-X position of the mouse cursor.
dm_int ScreenY ()
 Return the current screen-Y position of the mouse cursor.


Detailed Description

Graphic base interface.

This interface is the base class for implementors of native image factory and display methods.


Member Function Documentation

bool dmIGraphics::Draw void *  nativeDC,
const dm_rect *  boundRect,
dm_uint  paintFlags
[inline]
 

Ask the graphics object to render its content (i.e its attached document).

This method will call the dmIDocument::Draw function of the attached document

Parameters:
nativeDC is a pointer to a native device context handle
boundRect is a pointer to the display rectangle to be updated
paintFlags are passed directly to dmIDocument::Draw

cci_object* dmIGraphics::GetDocument  )  [inline]
 

Return the document object associated with the graphic object.

The returned object should be compatible with the dmIDocument interface. This method AddRef() the returned object.

See also:
SetDocument.

bool dmIGraphics::InitGraphics void *  nativeWindow  )  [inline]
 

Initialise the graphic object.

Parameters:
[in] nativeWindow pointer to a native window handle.

bool dmIGraphics::ProcessSystemEvent dm_uint  structType,
dm_uint  eventType,
dm_uint  button,
dm_uint  keyQual,
dm_uint  keyCode,
dm_int  cursorX,
dm_int  cursorY
[inline]
 

Process an event initiated from the native widgets.

Parameters:
structType the event struct type ( a dmTk::dmEventStructType value )
eventType the event type ( a dmTk::dmEventType value )
button the mouse button qualifier ( a dmTk::dmButtonType value )
keyQual the key qualifier ( a dmTk::dmKeyType value )
keyCode the key code
cursorX the position X of the graphical cursor
cursorY the position Y of the graphical cursor

bool dmIGraphics::SetDisplay dm_int  left,
dm_int  top,
dm_uint  width,
dm_uint  height
[inline]
 

Set the size of the display output area.

This method pass informations to the graphic context handler about the (logical) size of the dimensions of the output area. These informations are used in conjonction with the PageScale in order to properly compute cursor position and display scaling.

bool dmIGraphics::SetPageScale dm_uint  pageScale  )  [inline]
 

Set the scale factor used for rendering.

See also:
SetDisplay()


Generated on Tue May 9 12:34:57 2006 for Daim Library Module Set by  doxygen 1.4.6-NO