neoWidgets
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Pages
Public Member Functions | List of all members
neo::DeviceContextIF Class Referenceabstract

Interface for device context functions. More...

#include <DC.h>

Inheritance diagram for neo::DeviceContextIF:
Inheritance graph
[legend]

Public Member Functions

bool BitBlt (int x, int y, int width, int height, HDC sourceDC, int srcX, int srcY, DWORD rasterOp=SRCCOPY)
 
bool BitBlt (const RECT &rect, HDC sourceDC, const POINT &sourcePoint, DWORD rasterOp=SRCCOPY)
 
void DrawText (const tstring &text, RECT &boundingRect, UINT format=DT_LEFT|DT_TOP)
 
void DrawText (const tstring &text, int x, int y)
 
void FillRect (const RECT &r, HBRUSH brush)
 
void FillRegion (HRGN region, HBRUSH brush)
 
virtual HDC GetHDC ()=0
 
Size GetTextSize (const tstring &text, UINT format=DT_LEFT|DT_TOP, LONG maxWidth=1000000)
 
HGDIOBJ Select (HGDIOBJ object)
 
void SetBkColor (COLORREF color)
 
void SetBkModeOpaque ()
 
void SetBkModeTransparent ()
 
HBRUSH SetBrush (HBRUSH brush)
 
HFONT SetFont (HFONT font)
 
HPEN SetPen (HPEN pen)
 
HRGN SetRegion (HRGN region)
 
int SetStretchBltMode (int mode)
 
void SetTextColor (COLORREF color)
 
bool StretchBlt (int x, int y, int width, int height, HDC sourceDC, int srcX, int srcY, int srcWidth, int srcHeight, DWORD rasterOp=SRCCOPY)
 
bool StretchBlt (const RECT &rect, HDC sourceDC, const RECT &sourceRect, DWORD rasterOp=SRCCOPY)
 

Detailed Description

Interface for device context functions.

Member Function Documentation

void neo::DeviceContextIF::DrawText ( const tstring &  text,
RECT &  boundingRect,
UINT  format = DT_LEFT|DT_TOP 
)
inline

Shorthand for DrawText API

virtual HDC neo::DeviceContextIF::GetHDC ( )
pure virtual

Subclasses must override this function to make this interface work.

Returns
Handle of the dc that implements this interface.

Implemented in neo::MemoryDC, neo::ClientDC, neo::PaintDC, and neo::DC.

Size neo::DeviceContextIF::GetTextSize ( const tstring &  text,
UINT  format = DT_LEFT|DT_TOP,
LONG  maxWidth = 1000000 
)
inline
Parameters
formatFlags for the DrawText API
maxWidthHint to limit the result horizontally. If the largest word is wider than maxWidth, maxWidth is ignored.
HGDIOBJ neo::DeviceContextIF::Select ( HGDIOBJ  object)
inline

Selects an object (brush, pen, font, bitmap, ...) into the device context.

Returns
Previously selected object.
void neo::DeviceContextIF::SetBkColor ( COLORREF  color)
inline
void neo::DeviceContextIF::SetBkModeOpaque ( )
inline

Used for text, hatch brushes and non-solid pens

void neo::DeviceContextIF::SetBkModeTransparent ( )
inline
int neo::DeviceContextIF::SetStretchBltMode ( int  mode)
inline
Returns
Previous mode

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