INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES

indexing

title: "Visual Eiffel Library.", "Win32 API: Painting and Drawing Functions"
project: "Visual Eiffel Win32 Library"
revision: "$Revision: 1.1 $"
copyright: "Copyright (C) 1996-2005 Object Tools Group"
license: "http://visual-eiffel.com/license"
cluster: winlib
class WAPI_PAINTING_AND_DRAWING_FUNCTIONS
inherit

WAPI_ERROR_SERVER
end
feature -- Access

BeginPaint (hwnd: INTEGER; lpps: POINTER): INTEGER
-- The 'BeginPaint' function prepares the specified window for painting
-- and fills a WAPI_PAINTSTRUCT structure with information about the painting.
require
correct_hwnd: hwnd /= null_
correct_lpps: lpps /= default_pointer

DrawEdge (hdc: INTEGER; qrc: WAPI_RECT; edge, grfflags: BIT 32)
-- The `DrawEdge' function draws one or more edges of rectangle.
require
correct_hdc: hdc /= null_
correct_qrc: qrc /= void

DrawFocusRect (hdc: INTEGER; lprc: WAPI_RECT)
-- The `DrawFocusRect' function draws a rectangle in the style used
-- to indicate that the rectangle has the focus.
require
correct_hdc: hdc /= null_
correct_lprc: lprc /= void

DrawText (hdc: INTEGER; lpszstr: POINTER; cchstr: INTEGER; lprc: POINTER; wformat: BIT 32): INTEGER
-- The 'DrawText' function draws formatted text in the specified rectangle.
-- It formats the text according to the specified method (expanding tabs,
-- justifying characters, breaking lines, and so forth).
require
correct_hdc: hdc /= null_
correct_lpszstr: lpszstr /= default_pointer
correct_lprc: lprc /= default_pointer

EndPaint (hwnd: INTEGER; lppaint: POINTER)
-- The 'EndPaint' procedure marks the end of painting in the given window.
-- This procedure is required for each call to the 'BeginPaint' function,
-- but only after painting is complete.
require
correct_hwnd: hwnd /= null_
correct_lppaint: lppaint /= default_pointer

GdiFlush: BOOLEAN
-- Flushes the calling thread's current batch. If all functions in the
-- current batch succeed, the return value is nonzero. If not all functions in the
-- current batch succeed, the return value is zero, indicating that at least one
-- function returned an error

GetUpdateRect (hwnd: INTEGER; lprect: WAPI_RECT; ferase: BOOLEAN): BOOLEAN
-- The `GetUpdateRect' function retrieves the coordinates of the
-- smallest rectangle that completely encloses the update region
-- of the specified window. If the window was created with the
-- CS_OWNDC style and the mapping mode is not MM_TEXT, `GetUpdateRect'
-- retrieves the rectangle in logical coordinates.
-- Otherwise, it retrieves the rectangle in client coordinates.
-- If there is no update region, `GetUpdateRect' retrieves an empty
-- rectangle (sets all coordinates to zero).

GetBkColor (hdc: INTEGER): INTEGER
-- The `GetBkColor' function returns the current background color
-- for the specified device context.
require
correct_hdc: hdc /= null_

GetBkMode (hdc: INTEGER): INTEGER
-- The `GetBkMode' function returns the current background mix mode
-- for a specified device context. The background mix mode
-- of a device context affects text, hatched brushes, and pen styles
-- that are not solid lines.
require
correct_hdc: hdc /= null_

GetROP2 (hdc: INTEGER): INTEGER
-- The `GetROP2' function retrieves the foreground mix mode
-- of the specified device context. The mix mode specifies
-- how the pen or interior color and the color already on the screen
-- are combined to yield a new color.
require
correct_hdc: hdc /= null_

GrayString (hdc: INTEGER; hbrush: INTEGER; lpoutputfunc: POINTER; lpdata: POINTER; ncount: INTEGER; x, y, nwidth, nheight: INTEGER): INTEGER
-- The `GrayString' function draws gray text at the specified location.
-- The function draws the text by copying it into a memory bitmap,
-- graying the bitmap, and then copying the bitmap to the screen.
-- The function grays the text regardless of the selected brush
-- and background. `GrayString' uses the font currently selected
-- for the specified device context.
-- If the `lpOutputFunc' parameter is NULL, GDI uses the `TextOut'
-- function, and the `lpData' parameter is assumed to be a pointer
-- to the character string to be output. If the characters to be output
-- cannot be handled by `TextOut' (for example, the string is stored
-- as a bitmap), the application must supply its own output function.
require
correct_hdc: hdc /= null_

InvalidateRect (hwnd: INTEGER; lprc: POINTER; ferase: INTEGER)
-- The 'InvalidateRect' procedure adds a rectangle to the specified
-- window's update region. The update region represents the portion
-- of the window's client area that must be redrawn.

frozen RedrawWindow (hwnd: INTEGER; lprcupdate: POINTER; hrgnupdate: INTEGER; flags: BIT 32): INTEGER
-- The 'RedrawWindow' function updates the specified rectangle
-- or region in a window's client area.

SetBkColor (hdc, crcolor: INTEGER): INTEGER
-- The 'SetBkColor' function sets the current background color to the
-- specified color value, or to the nearest physical color if the device
-- cannot represent the specified color value.
require
correct_hdc: hdc /= null_

SetBkMode (hdc, ibkmode: INTEGER): INTEGER
-- The 'SetBkMode' function sets the background mix mode of the specified
-- device context. The background mix mode is used with text, hatched
-- brushes, and pen styles that are not solid lines.
require
correct_hdc: hdc /= null_

SetROP2 (hdc, fndrawmode: INTEGER): INTEGER
-- The 'SetROP2' function sets the current foreground mix mode.
-- GDI uses the foreground mix mode to combine pens and interiors
-- of filled objects with the colors already on the screen.
-- The foreground mix mode defines how colors from the brush or pen and
-- the colors in the existing image are to be combined.
require
correct_hdc: hdc /= 0

UpdateWindow (hwnd: INTEGER)
-- The 'UpdateWindow' procedure updates the client area of the specified
-- window by sending a WM_PAINT message to the window if the window's
-- update region is not empty. The procedure sends a WM_PAINT message
-- directly to the window procedure of the specified window,
-- bypassing the application queue. If the update region is empty,
-- no message is sent.
require
correct_hwnd: hwnd /= null_

LockWindowUpdate (hwnd: INTEGER): INTEGER
feature -- Implementation

frozen wDrawEdge (hdc: INTEGER; qrc: POINTER; edge, grfflags: BIT 32): INTEGER

frozen wDrawFocusRect (hdc: INTEGER; lprc: POINTER): INTEGER

wDrawText (hdc: INTEGER; lpszstr: POINTER; cchstr: INTEGER; lprc: POINTER; wformat: BIT 32): INTEGER

frozen wGetBkColor (hdc: INTEGER): INTEGER

frozen wGetBkMode (hdc: INTEGER): INTEGER

frozen wGetROP2 (hdc: INTEGER): INTEGER

frozen wGetUpdateRect (hwnd: INTEGER; lprect: POINTER; ferase: INTEGER): INTEGER

wInvalidateRect (hwnd: INTEGER; lprc: POINTER; ferase: INTEGER): INTEGER

wSetBkColor (hdc, crcolor: INTEGER): INTEGER

wSetBkMode (hdc, ibkmode: INTEGER): INTEGER

wSetROP2 (hdc, fndrawmode: INTEGER): INTEGER

wUpdateWindow (hwnd: INTEGER): INTEGER
end -- class WAPI_PAINTING_AND_DRAWING_FUNCTIONS

INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES