GR_CocoaCairoGraphics Class Reference

#include <gr_CocoaCairoGraphics.h>

Inheritance diagram for GR_CocoaCairoGraphics:

GR_CocoaCairoGraphicsBase GR_CairoGraphics GR_Graphics

List of all members.

Public Types

typedef bool(* gr_cocoa_graphics_update )(NSRect *rect, GR_CocoaCairoGraphics *pGr, void *param)

Public Member Functions

 ~GR_CocoaCairoGraphics ()
virtual UT_uint32 getClassId ()
XAP_CocoaNSViewgetView ()
virtual GR_FontgetGUIFont (void)
virtual void setCursor (GR_Graphics::Cursor c)
virtual void scroll (UT_sint32, UT_sint32)
virtual void scroll (UT_sint32 x_dest, UT_sint32 y_dest, UT_sint32 x_src, UT_sint32 y_src, UT_sint32 width, UT_sint32 height)
virtual void saveRectangle (UT_Rect &r, UT_uint32 iIndx)
virtual void restoreRectangle (UT_uint32 iIndx)
virtual GR_ImagegenImageFromRectangle (const UT_Rect &r)
virtual void _beginPaint ()
virtual void _endPaint ()
virtual bool queryProperties (GR_Graphics::Properties gp) const
virtual bool startPrint (void)
virtual bool endPrint (void)
virtual bool startPage (const char *szPageLabel, UT_uint32 pageNumber, bool bPortrait, UT_uint32 iWidth, UT_uint32 iHeight)
void init3dColors ()
void setIsPrinting (bool)
void setGrabCursor (GR_Graphics::Cursor c)
void _setUpdateCallback (gr_cocoa_graphics_update callback, void *param)
bool _callUpdateCallback (NSRect *aRect)

Static Public Member Functions

static UT_uint32 s_getClassId ()
static const char * graphicsDescriptor ()
static GR_GraphicsgraphicsAllocator (GR_AllocInfo &)
static NSColor * _utRGBColorToNSColor (const UT_RGBColor &clr)
static void _utNSColorToRGBColor (NSColor *c, UT_RGBColor &clr)
static cairo_t * _createCairo (NSView *view)
static const UT_RGBColorHBlue ()
static const UT_RGBColorVBlue ()
static const UT_RGBColorHGrey ()
static const UT_RGBColorVGrey ()
static bool _isFlipped ()
static float _getScreenResolution (void)

Protected Member Functions

 GR_CocoaCairoGraphics (XAP_CocoaNSView *win=nil)
virtual UT_uint32 _getResolution (void) const

Static Private Member Functions

static void _initColorAndImage (void)

Private Attributes

XAP_CocoaNSViewm_pWin
gr_cocoa_graphics_update m_updateCallback
void * m_updateCBparam
std::vector< cairo_rectangle_t > m_cacheRectArray
std::vector< cairo_surface_t * > m_cacheArray
GR_Graphics::Cursor m_GrabCursor
UT_uint32 m_screenResolution
bool m_bIsPrinting
bool m_bIsDrawing
bool m_bDoShowPage

Static Private Attributes

static UT_uint32 s_iInstanceCount
static bool m_colorAndImageInited = false
static UT_RGBColorm_colorBlue16x15 = NULL
static UT_RGBColorm_colorBlue11x16 = NULL
static UT_RGBColorm_colorGrey16x15 = NULL
static UT_RGBColorm_colorGrey11x16 = NULL
static NSCursor * m_Cursor_E = nil
static NSCursor * m_Cursor_N = nil
static NSCursor * m_Cursor_NE = nil
static NSCursor * m_Cursor_NW = nil
static NSCursor * m_Cursor_S = nil
static NSCursor * m_Cursor_SE = nil
static NSCursor * m_Cursor_SW = nil
static NSCursor * m_Cursor_W = nil
static NSCursor * m_Cursor_Wait = nil
static NSCursor * m_Cursor_LeftArrow = nil
static NSCursor * m_Cursor_RightArrow = nil
static NSCursor * m_Cursor_Compass = nil
static NSCursor * m_Cursor_Exchange = nil
static NSCursor * m_Cursor_LeftRight = nil
static NSCursor * m_Cursor_UpDown = nil
static NSCursor * m_Cursor_Crosshair = nil
static NSCursor * m_Cursor_HandPointer = nil
static NSCursor * m_Cursor_DownArrow = nil


Member Typedef Documentation

typedef bool(* GR_CocoaCairoGraphics::gr_cocoa_graphics_update)(NSRect *rect, GR_CocoaCairoGraphics *pGr, void *param)


Constructor & Destructor Documentation

GR_CocoaCairoGraphics::~GR_CocoaCairoGraphics (  ) 

GR_CocoaCairoGraphics::GR_CocoaCairoGraphics ( XAP_CocoaNSView win = nil  )  [protected]


Member Function Documentation

static UT_uint32 GR_CocoaCairoGraphics::s_getClassId (  )  [inline, static]

References GRID_COCOA_PANGO.

Referenced by XAP_CocoaApp::XAP_CocoaApp().

virtual UT_uint32 GR_CocoaCairoGraphics::getClassId (  )  [inline, virtual]

Implements GR_Graphics.

static const char* GR_CocoaCairoGraphics::graphicsDescriptor (  )  [inline, static]

GR_Graphics * GR_CocoaCairoGraphics::graphicsAllocator ( GR_AllocInfo info  )  [static]

XAP_CocoaNSView* GR_CocoaCairoGraphics::getView (  )  [inline]

GR_Font * GR_CocoaCairoGraphics::getGUIFont ( void   )  [virtual]

void GR_CocoaCairoGraphics::setCursor ( GR_Graphics::Cursor  c  )  [virtual]

NSColor * GR_CocoaCairoGraphics::_utRGBColorToNSColor ( const UT_RGBColor clr  )  [static]

Convert a UT_RGBColor to a NSColor

Parameters:
clr the UT_RGBColor to convert
Returns:
an autoreleased NSColor
Handle the transparency as well.

References UT_RGBColor::m_blu, UT_RGBColor::m_grn, UT_RGBColor::m_red, and UT_DEBUGMSG.

Referenced by XAP_CocoaDialog_FontChooser::runModal, and AP_CocoaDialog_FormatTable::setBackgroundColorInGUI().

void GR_CocoaCairoGraphics::_utNSColorToRGBColor ( NSColor *  c,
UT_RGBColor clr 
) [static]

void GR_CocoaCairoGraphics::scroll ( UT_sint32  dx,
UT_sint32  dy 
) [virtual]

void GR_CocoaCairoGraphics::scroll ( UT_sint32  x_dest,
UT_sint32  y_dest,
UT_sint32  x_src,
UT_sint32  y_src,
UT_sint32  width,
UT_sint32  height 
) [virtual]

void GR_CocoaCairoGraphics::saveRectangle ( UT_Rect r,
UT_uint32  iIndx 
) [virtual]

void GR_CocoaCairoGraphics::restoreRectangle ( UT_uint32  iIndx  )  [virtual]

GR_Image * GR_CocoaCairoGraphics::genImageFromRectangle ( const UT_Rect r  )  [virtual]

void GR_CocoaCairoGraphics::_beginPaint (  )  [virtual]

void GR_CocoaCairoGraphics::_endPaint (  )  [virtual]

Reimplemented from GR_Graphics.

References GR_CairoGraphics::m_cr.

bool GR_CocoaCairoGraphics::queryProperties ( GR_Graphics::Properties  gp  )  const [virtual]

bool GR_CocoaCairoGraphics::startPrint ( void   )  [virtual]

Reimplemented from GR_CairoGraphics.

References m_bDoShowPage, and m_bIsPrinting.

bool GR_CocoaCairoGraphics::endPrint ( void   )  [virtual]

Reimplemented from GR_CairoGraphics.

References m_bDoShowPage, m_bIsPrinting, and GR_CairoGraphics::m_cr.

bool GR_CocoaCairoGraphics::startPage ( const char *  szPageLabel,
UT_uint32  pageNumber,
bool  bPortrait,
UT_uint32  iWidth,
UT_uint32  iHeight 
) [virtual]

Reimplemented from GR_CairoGraphics.

References m_bDoShowPage, m_bIsPrinting, and GR_CairoGraphics::m_cr.

cairo_t * GR_CocoaCairoGraphics::_createCairo ( NSView *  view  )  [static]

void GR_CocoaCairoGraphics::init3dColors (  ) 

void GR_CocoaCairoGraphics::setIsPrinting ( bool  isprinting  ) 

void GR_CocoaCairoGraphics::setGrabCursor ( GR_Graphics::Cursor  c  )  [inline]

static const UT_RGBColor& GR_CocoaCairoGraphics::HBlue (  )  [inline, static]

static const UT_RGBColor& GR_CocoaCairoGraphics::VBlue (  )  [inline, static]

static const UT_RGBColor& GR_CocoaCairoGraphics::HGrey (  )  [inline, static]

static const UT_RGBColor& GR_CocoaCairoGraphics::VGrey (  )  [inline, static]

bool GR_CocoaCairoGraphics::_isFlipped (  )  [static]

void GR_CocoaCairoGraphics::_setUpdateCallback ( gr_cocoa_graphics_update  callback,
void *  param 
)

bool GR_CocoaCairoGraphics::_callUpdateCallback ( NSRect *  aRect  ) 

Call the update Callback that has been set

Parameters:
aRect,: the rect that should be updated
Returns:
false if no callback. Otherwise returns what the callback returns.

References m_bIsDrawing, m_updateCallback, and m_updateCBparam.

Referenced by XAP_CocoaNSView::drawRect:.

float GR_CocoaCairoGraphics::_getScreenResolution ( void   )  [static]

UT_uint32 GR_CocoaCairoGraphics::_getResolution ( void   )  const [protected, virtual]

References m_screenResolution.

void GR_CocoaCairoGraphics::_initColorAndImage ( void   )  [static, private]


Member Data Documentation

Reimplemented from GR_CairoGraphics.

std::vector<cairo_rectangle_t> GR_CocoaCairoGraphics::m_cacheRectArray [private]

Referenced by restoreRectangle(), and saveRectangle().

std::vector<cairo_surface_t*> GR_CocoaCairoGraphics::m_cacheArray [private]

Referenced by setCursor().

Referenced by _callUpdateCallback().

Referenced by endPrint(), startPage(), and startPrint().

bool GR_CocoaCairoGraphics::m_colorAndImageInited = false [static, private]

Referenced by _initColorAndImage().

Referenced by _initColorAndImage().

Referenced by _initColorAndImage().

Referenced by _initColorAndImage().

Referenced by _initColorAndImage().

NSCursor * GR_CocoaCairoGraphics::m_Cursor_E = nil [static, private]

Referenced by _initColorAndImage(), and setCursor().

NSCursor * GR_CocoaCairoGraphics::m_Cursor_N = nil [static, private]

Referenced by _initColorAndImage(), and setCursor().

NSCursor * GR_CocoaCairoGraphics::m_Cursor_NE = nil [static, private]

Referenced by _initColorAndImage(), and setCursor().

NSCursor * GR_CocoaCairoGraphics::m_Cursor_NW = nil [static, private]

Referenced by _initColorAndImage(), and setCursor().

NSCursor * GR_CocoaCairoGraphics::m_Cursor_S = nil [static, private]

Referenced by _initColorAndImage(), and setCursor().

NSCursor * GR_CocoaCairoGraphics::m_Cursor_SE = nil [static, private]

Referenced by _initColorAndImage(), and setCursor().

NSCursor * GR_CocoaCairoGraphics::m_Cursor_SW = nil [static, private]

Referenced by _initColorAndImage(), and setCursor().

NSCursor * GR_CocoaCairoGraphics::m_Cursor_W = nil [static, private]

Referenced by _initColorAndImage(), and setCursor().

NSCursor * GR_CocoaCairoGraphics::m_Cursor_Wait = nil [static, private]

Referenced by _initColorAndImage(), and setCursor().

NSCursor * GR_CocoaCairoGraphics::m_Cursor_LeftArrow = nil [static, private]

Referenced by _initColorAndImage(), and setCursor().

NSCursor * GR_CocoaCairoGraphics::m_Cursor_RightArrow = nil [static, private]

Referenced by _initColorAndImage(), and setCursor().

NSCursor * GR_CocoaCairoGraphics::m_Cursor_Compass = nil [static, private]

Referenced by _initColorAndImage(), and setCursor().

NSCursor * GR_CocoaCairoGraphics::m_Cursor_Exchange = nil [static, private]

Referenced by _initColorAndImage(), and setCursor().

NSCursor * GR_CocoaCairoGraphics::m_Cursor_LeftRight = nil [static, private]

Referenced by _initColorAndImage(), and setCursor().

NSCursor * GR_CocoaCairoGraphics::m_Cursor_UpDown = nil [static, private]

Referenced by _initColorAndImage(), and setCursor().

NSCursor * GR_CocoaCairoGraphics::m_Cursor_Crosshair = nil [static, private]

Referenced by _initColorAndImage(), and setCursor().

NSCursor * GR_CocoaCairoGraphics::m_Cursor_HandPointer = nil [static, private]

Referenced by _initColorAndImage(), and setCursor().

NSCursor * GR_CocoaCairoGraphics::m_Cursor_DownArrow = nil [static, private]

Referenced by _initColorAndImage(), and setCursor().


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

Generated on Sun Dec 27 00:07:12 2009 for AbiWord by  doxygen 1.5.5