Classes | |
class | GuiDoubleBufferRef |
Class used to push/pop the GUI double-buffer reference count. More... | |
Functions | |
void | mdlWindow_arcDraw (MSWindowP windowP, DPoint2dCP origin, double primary, double secondary, double start, double sweep, double rotation, BSIRectCP clipRectP) |
Draws an arc (partial ellipse) in the window designated by windowP. More... | |
StatusInt | mdlWindow_backgroundColorSet (MSWindowP windowP, BSIColorDescrCP bgColorP) |
Changes the background color of the window specified by windowP to the color described by bgColorP. More... | |
BSIColorDescrP | mdlWindow_colorIndexGet (MSWindowP windowP, int colorNumber, DgnModelRefP modelRef) |
Gets the index of a color that matches the color in which a MicroStation graphic element is drawn. More... | |
void | mdlWindow_ellipseDraw (MSWindowP windowP, DPoint2dCP origin, double primary, double secondary, double rotation, BSIRectCP clipRectP) |
Draws an ellipse. More... | |
void | mdlWindow_ellipseFill (MSWindowP windowP, DPoint2dCP origin, double primary, double secondary, double rotation, BSIRectCP clipRectP) |
Fills an ellipse. More... | |
BSIColorDescrP | mdlWindow_fixedColorIndexGet (MSWindowP windowP, int colorIndex) |
Returns the Color Descriptor for the fixed colors available to MDL applications. More... | |
void | mdlWindow_iconDraw (MSWindowP windowP, void *vIrP, Point2dCP originP, BSIColorDescrCP onColor, BSIColorDescrCP offColor, int style, BSIRectCP clipRectP) |
Draws an icon in the window specified by windowP. More... | |
bool | mdlWindow_isDisplayed (MSWindowP windowP) |
Determines whether the designated window is being displayed. More... | |
void | mdlWindow_lineDraw (MSWindowP windowP, int startX, int startY, int endX, int endY, BSIRectCP clipRectP) |
Draws a line to a designated window. More... | |
void | mdlWindow_lineStringDraw (MSWindowCP windowP, Point2dCP pointP, int numPoints, BSIRectCP clipRectP) |
Draws a line string to a designated window. More... | |
void | mdlWindow_lineStyleSet (MSWindowP windowP, int pattern, BSIColorDescrCP color, int mode, int lweight) |
Sets the characteristics of the graphics that are subsequently drawn. More... | |
void | mdlWindow_lineStyleSetCD (MSWindowP windowP, int pattern, BSIColorDescrCP colorP, int mode, int lweight) |
Sets the line drawing style for the window specified by windowP. More... | |
void | mdlWindow_pointDraw (MSWindowP windowP, int xPos, int yPos, BSIRectCP clipRectP) |
Draws a point to the designated window. More... | |
bool | mdlWindow_isGlobalPointConversionRequired (int screenNum) |
When the Ribbon interface is used, to position popup windows and dynamics correctly, the global point requires a conversion to compensate for the height of the Ribbon. More... | |
void | mdlWindow_globalPointConversionIncrease (Point2d *newGlobalPtP, MSWindowP windowP, Point2dCP oldGlobalPtP) |
When the Ribbon interface is used, to position popup windows and dynamics correctly, the global point requires a conversion to compensate for the height of the Ribbon. More... | |
void | mdlWindow_globalPointConversionDecrease (Point2dP newGlobalPtP, MSWindowP windowP, Point2dCP oldGlobalPtP) |
When the Ribbon interface is used, to position popup windows and dynamics correctly, the global point requires a conversion to compensate for the height of the Ribbon. More... | |
void | mdlWindow_rasterDataDraw (MSWindowP windowP, BSIRectCP rectP, byte *srcData, int srcPitch, int monoChrome, int foreground, int background, BSIRectCP clipRectP) |
Draws arbitrary raster data in the window specified in windowP. More... | |
StatusInt | mdlWindow_getPixelData (byte **imagePP, MSWindowP windowP, BSIRectCP rectP, int imageFormat) |
Returns the an array of pixel values from the window specified by windowP in the format specified by imageFormat. More... | |
int | mdlWindow_rgbDataDraw (MSWindowP windowP, BSIRectCP rectP, int pitch, byte *rgbBufferP, int ditherMode, int format, BSIRectCP clipRectP) |
Draws a block of RGB data to the window specified by windowP, The output rectangle for the data is specified in rectP and the actual data is specified by rgbBufferP with the top row first. More... | |
void | mdlWindow_rectClear (MSWindowP windowP, BSIRectCP rP, BSIRectCP clipRectP) |
Clears the rectangle in the window's background color. More... | |
void | mdlWindow_rectDraw (MSWindowP windowP, BSIRectCP rectP, BSIRectCP clipRectP) |
Draws an outline of a rectangle in a window using the graphic attributes set by mdlWindow_lineStyleSet. More... | |
void | mdlWindow_rectFill (MSWindowP windowP, BSIRectCP rP, BSIColorDescrCP color, BSIRectCP clipRectP) |
Fills a rectangle in a given color. More... | |
void | mdlWindow_rectFillByRGB (MSWindowP windowP, BSIRectCP rectP, RgbColorDefCP colorP, int ditherMode, BSIRectCP clipRectP) |
Fills a rectangle with an RGB color. More... | |
void | mdlWindow_gradientRectFill (MSWindowP windowP, BSIRectCP rectP, BSIColorDescrCP tlColorP, BSIColorDescrCP brColorP, BSIRectCP clipRectP, bool bLeftToRight, bool bInactive) |
Fills a rectangle with smooth shading from one color to another. More... | |
void | mdlWindow_gradientRectFillEx (MSWindowP windowP, BSIRectCP rectP, BSIColorDescrP *gradientColors, double *gradientPositions, UInt numGradientStops, BSIRectCP clipRectP, bool isHorizontal, bool isInactive) |
Fills a rectangle with a linear gradient. More... | |
void | mdlWindow_gradientBackgroundDraw (MSWindowP windowP, BSIRectCP rectP, BSIRectCP clipRectP, BSIColorDescrCP bgColorP, bool bVertical, bool bRoundEdges) |
Fills a rectangle with a gradient for docked windows using two system colors. More... | |
void | mdlWindow_rectInvert (MSWindowP windowP, BSIRectCP rP) |
XORs the pixels within the rectangle specified by rectP in the window specified by windowP. More... | |
bool | mdlWindow_calcDiffRects (BSIRectP pOldRect, BSIRectP pNewRect, int *pNRects, BSIRectP diffRects) |
Calculates the difference between two rectangles, pOldRect and pNewRect. More... | |
void | mdlWindow_shapeFill (MSWindowP windowP, Point2dCP pointP, int numPoints, BSIRectCP clipRectP) |
Fills a shape. More... | |
StatusInt | mdlWindow_textDraw (MSWindowP windowP, int fontIndex, Point2dCP ptP, WCharCP pwString, BSIColorDescrCP fgColor, BSIColorDescrCP bgColor, BSIRectCP clipRectP, bool halfTone) |
Draws text from a Unicode string into a dialog box. More... | |
StatusInt | mdlWindow_textDrawTransparent (MSWindowP windowP, int fontIndex, Point2dCP ptP, WCharCP pwString, BSIColorDescrCP fgColorP, BSIColorDescrCP bgColorP, BSIRectCP clipRectP, bool halfTone, bool rightToLeft, bool transparent) |
Displays Unicode text in a window without filling in its background. More... | |
StatusInt | mdlWindow_textDrawCD (MSWindowP windowP, int fontIndex, Point2dCP ptP, WCharCP pwString, BSIColorDescrCP fgColorP, BSIColorDescrCP bgColorP, BSIRectCP clipRectP, bool halfTone) |
Draws text from a Unicode string into a dialog box with specific foreground and background colors. More... | |
StatusInt | mdlWindow_textDrawTransparentN (MSWindowP windowP, int fontIndex, Point2dCP ptP, WCharCP pwString, BSIColorDescrCP fgColorP, BSIColorDescrCP bgColorP, BSIRectCP clipRectP, bool halfTone, bool rightToLeft, bool transparent, size_t nChars) |
Draws Unicode text into a window with a specific foreground color and without filling in its background. More... | |
void | mdlWindow_copyRectBetweenDevices (int destDevice, int sourceDevice, MSWindowP windowP, BSIRectCP pRect) |
Copies a window rectangle from one display device to another. More... | |
bool | mdlWindow_isTrueColorCapable (MSWindowP windowP) |
Determines whether the specified window has true color capability. More... | |
BSIColorDescrP | mdlWindow_systemColorGet (int systemColorIndex) |
Returns a pointer to the system color descriptor specified by systemColorIndex, which may have values such as SYSCOLOR_WINDOWS_WINTEXT, etc. More... | |
BSIColorDescrP | mdlWindow_backgroundCDGet (MSWindowP windowP, int viewOrDialog) |
Gets a pointer to the color descriptor for the background color of the window indicated by windowP. More... | |
UInt32 | mdlWindow_getMouseHoverTime () |
Gets the system hover time for the mouse before a tooltip is shown. More... | |
int | mdlWindow_getScrollBarSize (MSWindowP windowP, bool bVertical) |
Gets the width of a vertical scroll bar or height of a horizontal scroll bar. More... | |
int | mdlWindow_getTitleBarHeight (MSWindowP windowP, bool bSmallCaption) |
Gets the title bar from the Operating System. More... | |
void | mdlWindow_setIconName (MSWindowP windowP, WCharCP name) |
Sets the window's icon name. More... | |
WCharP | mdlWindow_getIconName (MSWindowP windowP) |
Gets the window's icon name set by mdlWindow_setIconName. More... | |
bool | mdlRect_overlap (BSIRectP overlapRectP, BSIRectCP rect1P, BSIRectCP rect2P) |
Determines if two rectangles intersect, and if they do, will return a third rectangle representing their intersection. More... | |
void | mdlWindow_clipRectSet (MSWindowP windowP, BSIRectCP rectP) |
Sets or clears the clip rectangle for the specified window. More... | |
StatusInt | mdlWindow_doubleBufferPush (MSWindowP windowP) |
Increments the double-buffer reference count for the window. More... | |
StatusInt | mdlWindow_doubleBufferPop (MSWindowP windowP) |
Decrements the double-buffer reference count for the window. More... | |
StatusInt | mdlWindow_doubleBufferFlush (MSWindowP windowP) |
Flushes the reference count, resulting in the buffer being drawn to the window. More... | |
StatusInt | mdlWindow_doubleBufferPending (MSWindowP windowP) |
Sets the double-buffer pending flag for the window because something has been drawn to the buffer. More... | |
StatusInt | mdlWindow_setDoubleBufferDisabled (MSWindowP windowP, bool disabled) |
Disables or enables the double-buffering for the window. More... | |
bool mdlRect_overlap | ( | BSIRectP | overlapRectP, |
BSIRectCP | rect1P, | ||
BSIRectCP | rect2P | ||
) |
Determines if two rectangles intersect, and if they do, will return a third rectangle representing their intersection.
[out] | overlapRectP | points to a rectangle to receive the definition of the intersection of the first two rectangles. |
[in] | rect1P | points to one of the rectangles to check for intersection. |
[in] | rect2P | points to the second rectangle to check for intersection. |
void mdlWindow_arcDraw | ( | MSWindowP | windowP, |
DPoint2dCP | origin, | ||
double | primary, | ||
double | secondary, | ||
double | start, | ||
double | sweep, | ||
double | rotation, | ||
BSIRectCP | clipRectP | ||
) |
Draws an arc (partial ellipse) in the window designated by windowP.
The origin of the arc is given in a double-precision 2D point, originP. The primary axis (the axis at zero degrees in the arc/ellipse coordinate system) is passed in primary, and the secondary axis (the axis at 90 degrees) is passed in secondary. You can produce a circle or circular arc by setting primary equal to secondary.
[in] | windowP | window to draw to |
[in] | origin | center point of arc |
[in] | primary | primary axis |
[in] | secondary | secondary axis |
[in] | start | starting angle |
[in] | sweep | sweep angle |
[in] | rotation | rotation of entire arc |
[in] | clipRectP | overriding clip rectangle |
BSIColorDescrP mdlWindow_backgroundCDGet | ( | MSWindowP | windowP, |
int | viewOrDialog | ||
) |
Gets a pointer to the color descriptor for the background color of the window indicated by windowP.
If windowP is NULL, a pointer to the default background color descriptor for either views or dialogs is returned, depending on the value of viewOrDialog. BSIBGCOLOR_VIEW causes the default view background to be returned, and BSIBGCOLOR_DIALOG causes the default dialog background to be returned.
[in] | windowP | window whose bkcolor to get |
[in] | viewOrDialog | if windowP=NULL, get vw or dbox? |
StatusInt mdlWindow_backgroundColorSet | ( | MSWindowP | windowP, |
BSIColorDescrCP | bgColorP | ||
) |
Changes the background color of the window specified by windowP to the color described by bgColorP.
If bgColorP has the value BSIBGCOLOR_DIALOG, the default background color is used.
[in] | windowP | window whose bkcolor we're setting |
[in] | bgColorP | new background color for the window |
bool mdlWindow_calcDiffRects | ( | BSIRectP | pOldRect, |
BSIRectP | pNewRect, | ||
int * | pNRects, | ||
BSIRectP | diffRects | ||
) |
Calculates the difference between two rectangles, pOldRect and pNewRect.
[in] | pOldRect | points to the old rectangle. |
[in] | pNewRect | points to the new rectangle. |
[in,out] | pNRects | points to the number of BSIRects set in diffRects. |
[in,out] | diffRects | an array of 4 BSIRects. |
void mdlWindow_clipRectSet | ( | MSWindowP | windowP, |
BSIRectCP | rectP | ||
) |
Sets or clears the clip rectangle for the specified window.
[in] | windowP | points to the window to set the clipping rectangle on. |
[in] | rectP | points to the clipping rectangle to set. |
BSIColorDescrP mdlWindow_colorIndexGet | ( | MSWindowP | windowP, |
int | colorNumber, | ||
DgnModelRefP | modelRef | ||
) |
Gets the index of a color that matches the color in which a MicroStation graphic element is drawn.
When MicroStation starts, it downloads a balanced color table (with the maximum size allowed by the number of colors supported by the graphic hardware) to the graphic hardware. It then processes the master file and reference file color tables to find each element's color index that most closely matches one of the balanced colors. mdlWindow_colorIndexGet returns those color indices.
[in] | colorNumber | is the position (0-255) in the master file or reference file color table. |
[in] | modelRef | indicates the model to get the color index from. The constant MASTERFILE can be used for the current design file. |
[in] | windowP | specifies the window and subsequently the graphic screen for which you need the color index. |
void mdlWindow_copyRectBetweenDevices | ( | int | destDevice, |
int | sourceDevice, | ||
MSWindowP | windowP, | ||
BSIRectCP | pRect | ||
) |
Copies a window rectangle from one display device to another.
[in] | destDevice | the number of the screen that is the destination. |
[in] | sourceDevice | the number of the screen that is the source. |
[in] | windowP | points to the window that contains the rectangle to copy. |
[in] | pRect | the rectangle to copy. |
StatusInt mdlWindow_doubleBufferFlush | ( | MSWindowP | windowP | ) |
Flushes the reference count, resulting in the buffer being drawn to the window.
[in] | windowP | points to the window to be double-buffered. |
StatusInt mdlWindow_doubleBufferPending | ( | MSWindowP | windowP | ) |
Sets the double-buffer pending flag for the window because something has been drawn to the buffer.
[in] | windowP | points to the window to be double-buffered. |
StatusInt mdlWindow_doubleBufferPop | ( | MSWindowP | windowP | ) |
Decrements the double-buffer reference count for the window.
[in] | windowP | points to the window to be double-buffered. |
StatusInt mdlWindow_doubleBufferPush | ( | MSWindowP | windowP | ) |
Increments the double-buffer reference count for the window.
[in] | windowP | points to the window to be double-buffered. |
void mdlWindow_ellipseDraw | ( | MSWindowP | windowP, |
DPoint2dCP | origin, | ||
double | primary, | ||
double | secondary, | ||
double | rotation, | ||
BSIRectCP | clipRectP | ||
) |
Draws an ellipse.
The origin of the ellipse is given in a double-precision 2D point, originP. The primary axis (the axis at zero degrees in the arc/ellipse coordinate system) is passed in primary, and the secondary axis (the axis at 90 degrees) is passed in secondary. You can produce a circle or circular arc by setting primary equal to secondary.
[in] | windowP | window to draw to |
[in] | origin | center point of ellipse |
[in] | primary | primary axis |
[in] | secondary | secondary axis |
[in] | rotation | rotation of entire ellipse |
[in] | clipRectP | overriding clip rectangle |
void mdlWindow_ellipseFill | ( | MSWindowP | windowP, |
DPoint2dCP | origin, | ||
double | primary, | ||
double | secondary, | ||
double | rotation, | ||
BSIRectCP | clipRectP | ||
) |
Fills an ellipse.
The origin of the ellipse is given in a double-precision 2D point, originP. The primary axis (the axis at zero degrees in the arc/ellipse coordinate system) is passed in primary, and the secondary axis (the axis at 90 degrees) is passed in secondary. You can produce a circle or circular arc by setting primary equal to secondary.
[in] | windowP | window to draw to |
[in] | origin | center point of ellipse |
[in] | primary | primary axis |
[in] | secondary | secondary axis |
[in] | rotation | rotation of entire ellipse |
[in] | clipRectP | overriding clip rectangle |
BSIColorDescrP mdlWindow_fixedColorIndexGet | ( | MSWindowP | windowP, |
int | colorIndex | ||
) |
Returns the Color Descriptor for the fixed colors available to MDL applications.
colorIndex specifies the color needed. Possible values for colorIndex are the *_INDEX values found in the DialogBoxColor enum in MicroStation.r.h.
[in] | windowP | window to get index for |
[in] | colorIndex | color number |
WCharP mdlWindow_getIconName | ( | MSWindowP | windowP | ) |
Gets the window's icon name set by mdlWindow_setIconName.
[in] | windowP | window whose icon name to get |
UInt32 mdlWindow_getMouseHoverTime | ( | ) |
Gets the system hover time for the mouse before a tooltip is shown.
StatusInt mdlWindow_getPixelData | ( | byte ** | imagePP, |
MSWindowP | windowP, | ||
BSIRectCP | rectP, | ||
int | imageFormat | ||
) |
Returns the an array of pixel values from the window specified by windowP in the format specified by imageFormat.
The pixel array is returned in the memory pointer pointed to by imagePP; if imagePP points to NULL, this function will allocate a memory region to hold the pixel data and store the address of that region in the memory pointer pointed to by imagePP.
[out] | imagePP | points to user allocated pointer for pixel array, or points to NULL to allocate |
[in] | windowP | window |
[in] | rectP | if not NULL, specifies sub-rectangle of window to extract |
[in] | imageFormat | format of returned data (IMAGEFORMAT_RGB, IMAGEFORMAT_RGBA, IMAGEFORMAT_RGBSeparate) |
int mdlWindow_getScrollBarSize | ( | MSWindowP | windowP, |
bool | bVertical | ||
) |
Gets the width of a vertical scroll bar or height of a horizontal scroll bar.
[in] | windowP | window whose scroll bar size to get |
[in] | bVertical | true is vertical, false is horizontal |
int mdlWindow_getTitleBarHeight | ( | MSWindowP | windowP, |
bool | bSmallCaption | ||
) |
Gets the title bar from the Operating System.
[in] | windowP | window whose title bar height to get |
[in] | bSmallCaption | true is small, false is normal |
void mdlWindow_globalPointConversionDecrease | ( | Point2dP | newGlobalPtP, |
MSWindowP | windowP, | ||
Point2dCP | oldGlobalPtP | ||
) |
When the Ribbon interface is used, to position popup windows and dynamics correctly, the global point requires a conversion to compensate for the height of the Ribbon.
This function converts the global point by decreasing the point by the height of the Ribbon.
[in,out] | newGlobalPtP | The updated global point. |
[in] | windowP | Window with which the point is associated. |
[in] | oldGlobalPtP | The global point before conversion. If NULL, the point at newGlobalPtP is updated in place. |
void mdlWindow_globalPointConversionIncrease | ( | Point2d * | newGlobalPtP, |
MSWindowP | windowP, | ||
Point2dCP | oldGlobalPtP | ||
) |
When the Ribbon interface is used, to position popup windows and dynamics correctly, the global point requires a conversion to compensate for the height of the Ribbon.
This function converts the global point by increasing the point by the height of the Ribbon.
[in,out] | newGlobalPtP | The updated global point. |
[in] | windowP | Window with which the point is associated. |
[in] | oldGlobalPtP | The global point before conversion. If NULL, the point at newGlobalPtP is updated in place. |
void mdlWindow_gradientBackgroundDraw | ( | MSWindowP | windowP, |
BSIRectCP | rectP, | ||
BSIRectCP | clipRectP, | ||
BSIColorDescrCP | bgColorP, | ||
bool | bVertical, | ||
bool | bRoundEdges | ||
) |
Fills a rectangle with a gradient for docked windows using two system colors.
[in] | windowP | is the window to draw to. |
[in] | rectP | is the rectangle to be filled. |
[in] | clipRectP | A clipping rectangle. If clipRectP is NULL, rectP is used. |
[in] | bgColorP | is the middle color between the two system colors. If bgColorP is NULL, the system background color is used. |
[in] | bVertical | indicates whether the shading occurs from left to right (true) or top to bottom (false). |
[in] | bRoundEdges | indicates whether to round the edges after drawing the gradient. |
void mdlWindow_gradientRectFill | ( | MSWindowP | windowP, |
BSIRectCP | rectP, | ||
BSIColorDescrCP | tlColorP, | ||
BSIColorDescrCP | brColorP, | ||
BSIRectCP | clipRectP, | ||
bool | bLeftToRight, | ||
bool | bInactive | ||
) |
Fills a rectangle with smooth shading from one color to another.
[in] | windowP | is the window to draw to. |
[in] | rectP | is the rectangle to be filled. |
[in] | tlColorP | is the RGB color that will be used by to fill the top left portion of the rectangle. |
[in] | brColorP | is the RGB color that will be used by to fill the bottom right portion of the rectangle. |
[in] | clipRectP | A clipping rectangle can be passed to each function in clipRectP. If clipRectP is NULL, the rectangle is clipped to the window's content rectangle. |
[in] | bLeftToRight | indicates whether the shading occurs from left to right (true) or top to bottom (false). |
[in] | bInactive | This is only used if color args are NULL; If it is true, then it will use inactive title bar colors; if false, then it uses active title bar colors. |
void mdlWindow_gradientRectFillEx | ( | MSWindowP | windowP, |
BSIRectCP | rectP, | ||
BSIColorDescrP * | gradientColors, | ||
double * | gradientPositions, | ||
UInt | numGradientStops, | ||
BSIRectCP | clipRectP, | ||
bool | isHorizontal, | ||
bool | isInactive | ||
) |
Fills a rectangle with a linear gradient.
[in] | windowP | is the window to draw to. |
[in] | rectP | is the rectangle to be filled. |
[in] | gradientColors | is the RGB colors that will be used to fill the rectangle. |
[in] | gradientPositions | is the position of each gradient stop, in the range 0.0 to 1.0. |
[in] | numGradientStops | is the number of gradient stops. |
[in] | clipRectP | A clipping rectangle can be passed to each function in clipRectP. If clipRectP is NULL, the rectangle is clipped to the window's content rectangle. |
[in] | isHorizontal | indicates whether the shading occurs from left to right (true) or top to bottom (false). |
[in] | isInactive | This is only used if color args are NULL; If it is true, then it will use inactive title bar colors; if false, then it uses active title bar colors. |
void mdlWindow_iconDraw | ( | MSWindowP | windowP, |
void * | vIrP, | ||
Point2dCP | originP, | ||
BSIColorDescrCP | onColor, | ||
BSIColorDescrCP | offColor, | ||
int | style, | ||
BSIRectCP | clipRectP | ||
) |
Draws an icon in the window specified by windowP.
An icon is a binary bitmap data element consisting of a width, height, and actual data. Icons are stored as resources in a resource file and retrieved using the mdlResource_load function.
[in] | windowP | window to draw to |
[in] | vIrP | icon to draw |
[in] | originP | upper left area of icon |
[in] | onColor | is the color index that draws the on (1) bits in the icon data, and offColor is the color index that draws the off (0) bits. |
[in] | offColor | color of 0 bits |
[in] | style | lets icons be drawn in several different half-tone styles. ICON_STYLE_NORMAL draws the icon exactly as it is stored. ICON_STYLE_LGREY covers every fourth dot of the icon with a black dot, ICON_STYLE_DGREY covers every third dot with a black dot, and ICON_STYLE_DISABLED makes the icon half-tone. |
[in] | clipRectP | clips the icon. If clipRectP is NULL, the icon is clipped to the window's content rectangle. |
bool mdlWindow_isDisplayed | ( | MSWindowP | windowP | ) |
Determines whether the designated window is being displayed.
A window is not displayed if it has been created but never shown or if it was shown but then hidden without being destroyed.
[in] | windowP | is the window to test. |
bool mdlWindow_isGlobalPointConversionRequired | ( | int | screenNum | ) |
When the Ribbon interface is used, to position popup windows and dynamics correctly, the global point requires a conversion to compensate for the height of the Ribbon.
This function determines if that conversion is required.
[in] | screenNum | the number of the screen being queried |
bool mdlWindow_isTrueColorCapable | ( | MSWindowP | windowP | ) |
Determines whether the specified window has true color capability.
If a window has true color capability, graphics drawn into the window can be drawn in any color, rather than only a color that is defined in MicroStation's color palette.
[in] | windowP | window to test |
void mdlWindow_lineDraw | ( | MSWindowP | windowP, |
int | startX, | ||
int | startY, | ||
int | endX, | ||
int | endY, | ||
BSIRectCP | clipRectP | ||
) |
Draws a line to a designated window.
[in] | windowP | window to draw to |
[in] | startX | starting position |
[in] | startY | starting position |
[in] | endX | ending position |
[in] | endY | ending position |
[in] | clipRectP | specifies a clipping rectangle that overrides the default clipping. If this argument is NULL, the default clipping (to the window's content rectangle) is applied. |
void mdlWindow_lineStringDraw | ( | MSWindowCP | windowP, |
Point2dCP | pointP, | ||
int | numPoints, | ||
BSIRectCP | clipRectP | ||
) |
Draws a line string to a designated window.
[in] | windowP | window to draw to |
[in] | pointP | starting position |
[in] | numPoints | number of points in input array |
[in] | clipRectP | specifies a clipping rectangle that overrides the default clipping. If this argument is NULL, the default clipping (to the window's content rectangle) is applied. |
void mdlWindow_lineStyleSet | ( | MSWindowP | windowP, |
int | pattern, | ||
BSIColorDescrCP | color, | ||
int | mode, | ||
int | lweight | ||
) |
Sets the characteristics of the graphics that are subsequently drawn.
The windowP argument designates the window that you intend to draw to. On some platforms (such as the PC), the graphic attributes are shared for all windows on a given screen and are not maintained for each window individually. Therefore, as a general rule, set the graphic attributes when you draw on the screen.
[in] | windowP | window to set attributes for |
[in] | pattern | specifies an on/off pattern for the line to be drawn. Possible values are 0 through 7, resulting in solid, dotted, medium-dashed, long-dashed, dot-dashed, short-dashed, dash double-dot and long dash-short dash lines, respectively. |
[in] | color | specifies a color index for the graphics. The method for obtaining the appropriate color index depends on whether you want a known color or you will match a color in the design file's active color table. In the former case, use mdlWindow_fixedColorIndexGet; in the latter case, use mdlWindow_colorIndexGet. |
[in] | mode | determines whether the lines will be drawn on the screen (mode 0) or combined with the current screen contents using the XOR (exclusive OR) operation (mode 1). |
[in] | lweight | specifies the line thickness. Possible values are 0 to 31. Sometimes two adjacent line thicknesses will display the same on the screen because of the limited resolution available on some displays. (For example 0 and 1 may set only one pixel). |
void mdlWindow_lineStyleSetCD | ( | MSWindowP | windowP, |
int | pattern, | ||
BSIColorDescrCP | colorP, | ||
int | mode, | ||
int | lweight | ||
) |
Sets the line drawing style for the window specified by windowP.
[in] | windowP | wondow to set attributes for |
[in] | pattern | specifies an on/off pattern to be drawn. Possible values are 0 through 7, resulting in dotted, medium-dashed, long-dashed, dot-dashed, short-dashed, dash double-dot and long dash-short dash lines, respectively. |
[in] | colorP | points to a color descriptor. |
[in] | mode | may be 0, indicating lines are to be drawn on the screen (mode 0) or combined with the current screen contents using the exclusive OR (XOR) operation (mode 1). |
[in] | lweight | specifies the line thickness. Possible values are 0 through 31. Sometimes two adjacent line thicknesses will display the same on the screen because of the limited resolution available on some displays. (For example, 0 and 1 may both set one pixel). |
void mdlWindow_pointDraw | ( | MSWindowP | windowP, |
int | xPos, | ||
int | yPos, | ||
BSIRectCP | clipRectP | ||
) |
Draws a point to the designated window.
[in] | windowP | window to draw to |
[in] | xPos | point position * |
yPos | point position | |
[in] | clipRectP | specifies a clipping rectangle that overrides the default clipping. If this argument is NULL, the default clipping (to the window's content rectangle) is applied. |
void mdlWindow_rasterDataDraw | ( | MSWindowP | windowP, |
BSIRectCP | rectP, | ||
byte * | srcData, | ||
int | srcPitch, | ||
int | monoChrome, | ||
int | foreground, | ||
int | background, | ||
BSIRectCP | clipRectP | ||
) |
Draws arbitrary raster data in the window specified in windowP.
The output rectangle for the data is specified in rectP, and the actual data, one byte per pixel starting at the upper left and going to the right and down, is stored in an array pointed to by srcDataP. If the source pitch or (width) of each row of data differs from the width of the rectangle, it is specified in srcPitch. Otherwise, srcPitch can be set to zero.
[in] | windowP | window to draw to |
[in] | rectP | rectangle to put data in |
[in] | srcData | raster data |
[in] | srcPitch | # of bytes in each input row |
[in] | monoChrome | how to display the data |
[in] | foreground | color of non-zero bytes |
[in] | background | color of zero bytes |
[in] | clipRectP | overriding clip rectangle |
void mdlWindow_rectClear | ( | MSWindowP | windowP, |
BSIRectCP | rP, | ||
BSIRectCP | clipRectP | ||
) |
Clears the rectangle in the window's background color.
The affected window is passed in rectP. A clipping rectangle can be passed in clipRectP. If clipRectP is NULL, the rectangle is clipped to the window's content rectangle.
[in] | windowP | window to draw to |
[in] | rP | rectangle to clear |
[in] | clipRectP | overriding clip rectangle |
void mdlWindow_rectDraw | ( | MSWindowP | windowP, |
BSIRectCP | rectP, | ||
BSIRectCP | clipRectP | ||
) |
Draws an outline of a rectangle in a window using the graphic attributes set by mdlWindow_lineStyleSet.
The affected window is passed in rectP. A clipping rectangle can be passed in clipRectP. If clipRectP is NULL, the rectangle is clipped to the window's content rectangle.
[in] | windowP | window to draw to |
[in] | rectP | rectangle to draw |
[in] | clipRectP | overriding clip rectangle |
void mdlWindow_rectFill | ( | MSWindowP | windowP, |
BSIRectCP | rP, | ||
BSIColorDescrCP | color, | ||
BSIRectCP | clipRectP | ||
) |
Fills a rectangle in a given color.
[in] | windowP | is the window to draw to. |
[in] | rP | is the rectangle to be filled. |
[in] | color | is the color index that will be used by mdlWindow_rectFill to fill the rectangle. colorP is the RGB color that will be used by mdlWindow_rectFillByRGB to fill the rectangle. |
[in] | clipRectP | A clipping rectangle can be passed to each function in clipRectP. If clipRectP is NULL, the rectangle is clipped to the window's content rectangle. no value. |
void mdlWindow_rectFillByRGB | ( | MSWindowP | windowP, |
BSIRectCP | rectP, | ||
RgbColorDefCP | colorP, | ||
int | ditherMode, | ||
BSIRectCP | clipRectP | ||
) |
Fills a rectangle with an RGB color.
[in] | windowP | is the window to draw to. |
[in] | rectP | is the rectangle to be filled. |
[in] | colorP | is the RGB color that will be used by mdlWindow_rectFillByRGB to fill the rectangle. |
[in] | ditherMode | If the graphics display does not support true color, the color will be dithered as specified by ditherMode. A ditherMode of 0 (DITHERMODE_Pattern) will produce a patterned dithering that is generally faster, but less accurate than other dithering methods. A ditherMode of one (DITHERMODE_ErrorDiffusion) will use an error diffusion filter (Floyd- Steinberg) to produce a more accurate dithering at the expense of increased processing time. |
[in] | clipRectP | A clipping rectangle can be passed to each function in clipRectP. If clipRectP is NULL, the rectangle is clipped to the window's content rectangle. |
void mdlWindow_rectInvert | ( | MSWindowP | windowP, |
BSIRectCP | rP | ||
) |
XORs the pixels within the rectangle specified by rectP in the window specified by windowP.
It makes use of the color set by the most recent call to mdlWindow_lineStyleSet, and the call to mdlWindow_lineStyleSet should specify 1 (XOR) for the mode parameter. The pattern and weight parameters to mdlWindow_lineStyleSet are ignored by mdlWindow_rectInvert.
[in] | windowP | window containing rectangle |
[in] | rP | rectangle within window * |
int mdlWindow_rgbDataDraw | ( | MSWindowP | windowP, |
BSIRectCP | rectP, | ||
int | pitch, | ||
byte * | rgbBufferP, | ||
int | ditherMode, | ||
int | format, | ||
BSIRectCP | clipRectP | ||
) |
Draws a block of RGB data to the window specified by windowP, The output rectangle for the data is specified in rectP and the actual data is specified by rgbBufferP with the top row first.
If the source pitch (or row width) of the input data differs from the width of the rectangle, it is specified in srcPitch, otherwise srcPitch can be set to zero.
[in] | windowP | window to copy to |
[in] | rectP | portion of window to update |
[in] | pitch | source pitch |
[in] | rgbBufferP | RGB data |
[in] | ditherMode | (0=Pattern, 1=Error Diffusion) |
[in] | format | (0=RRRGGGBBB, 1=RGB, 2=RGBA) |
[in] | clipRectP | overriding clip rectangle |
StatusInt mdlWindow_setDoubleBufferDisabled | ( | MSWindowP | windowP, |
bool | disabled | ||
) |
Disables or enables the double-buffering for the window.
[in] | windowP | points to the window. |
[in] | disabled | indicates whether the double-buffering should be disabled or enabled. |
void mdlWindow_setIconName | ( | MSWindowP | windowP, |
WCharCP | name | ||
) |
Sets the window's icon name.
This name is associated with the window for all window drawing.
[in] | windowP | window whose icon name to set |
[in] | name | the icon name to associate with the window |
void mdlWindow_shapeFill | ( | MSWindowP | windowP, |
Point2dCP | pointP, | ||
int | numPoints, | ||
BSIRectCP | clipRectP | ||
) |
Fills a shape.
[in] | windowP | window to draw in |
[in] | pointP | points to draw |
[in] | numPoints | number of points |
[in] | clipRectP | specifies a clipping rectangle that overrides the default clipping. If this argument is NULL, the default clipping (to the window's content rectangle) is applied. |
BSIColorDescrP mdlWindow_systemColorGet | ( | int | systemColorIndex | ) |
Returns a pointer to the system color descriptor specified by systemColorIndex, which may have values such as SYSCOLOR_WINDOWS_WINTEXT, etc.
These values are defined in the SysColor enum in MstnDefs.h.
[in] | systemColorIndex | the system color descriptor to get, a SYSCOLOR value |
StatusInt mdlWindow_textDraw | ( | MSWindowP | windowP, |
int | fontIndex, | ||
Point2dCP | ptP, | ||
WCharCP | pwString, | ||
BSIColorDescrCP | fgColor, | ||
BSIColorDescrCP | bgColor, | ||
BSIRectCP | clipRectP, | ||
bool | halfTone | ||
) |
Draws text from a Unicode string into a dialog box.
[in] | windowP | points to the window to draw the text in. |
[in] | fontIndex | the index of the raster font to use to draw the text. |
[in] | ptP | points to the location within the window in local coords to place the text. |
[in] | pwString | points to the WChar string that contains the text to draw. |
[in] | fgColor | foreground color |
[in] | bgColor | background color |
[in] | clipRectP | points to the rectangle to clip text to. |
[in] | halfTone | true if the drawing should be done in a halftone. |
StatusInt mdlWindow_textDrawCD | ( | MSWindowP | windowP, |
int | fontIndex, | ||
Point2dCP | ptP, | ||
WCharCP | pwString, | ||
BSIColorDescrCP | fgColorP, | ||
BSIColorDescrCP | bgColorP, | ||
BSIRectCP | clipRectP, | ||
bool | halfTone | ||
) |
Draws text from a Unicode string into a dialog box with specific foreground and background colors.
[in] | windowP | points to the window to draw the text in. |
[in] | fontIndex | the index of the raster font to use to draw the text. |
[in] | ptP | points to the location within the window in local coords to place the text. |
[in] | pwString | points to the WChar string that contains the text to draw. |
[in] | fgColorP | points to the foreground color descriptor to use. |
[in] | bgColorP | points to the background color descriptor to use. |
[in] | clipRectP | points to the rectangle to clip text to. |
[in] | halfTone | true if the drawing should be done in a halftone. |
StatusInt mdlWindow_textDrawTransparent | ( | MSWindowP | windowP, |
int | fontIndex, | ||
Point2dCP | ptP, | ||
WCharCP | pwString, | ||
BSIColorDescrCP | fgColorP, | ||
BSIColorDescrCP | bgColorP, | ||
BSIRectCP | clipRectP, | ||
bool | halfTone, | ||
bool | rightToLeft, | ||
bool | transparent | ||
) |
Displays Unicode text in a window without filling in its background.
The window is specified in windowP.
[in] | windowP | specified window |
[in] | fontIndex | is set to FONT_DEX_SYSTEM, FONT_DEX_BORDER, FONT_INDEX_DIALOG or FONT_INDEX_BOLD. This argument designates which of the four predefined system fonts to use. You can configure these fonts using the MS_SYSFONTS environment variable. FONT_INDEX_SYSTEM is used in the command window. It is also used to open the screen. FONT_INDEX_BORDER is used in window borders. FONT_INDEX_DIALOG is the main dialog box font, and FONT_INDEX_BOLD is used in the rare instances when bold text is required in a dialog box. |
[in] | ptP | designates the upper left corner of the text, which is specified by the character array string. The foreground color index is fgColor, and the background color index is bgColor. See mdlWindow_lineStyleSet for information about obtaining the desired color indexes. |
[in] | pwString | Unicode string to put out |
[in] | fgColorP | specifies the foreground color for the text. If fgColorP is NULL, the default dialog item foreground color is used. |
[in] | bgColorP | specifies the background color for the text. If bgColorP is NULL, the default dialog item background color is used. |
[in] | clipRectP | A clipping rectangle can be specified with clipRectP, or the value NULL causes the routine to use the window's content rectangle. If halftone is true, the text is drawn half-toned. |
[in] | halfTone | true if drawn in halftone |
[in] | rightToLeft | true draw left to right for Arabic/Hebrew |
[in] | transparent | true draw the text only without filling in the background |
StatusInt mdlWindow_textDrawTransparentN | ( | MSWindowP | windowP, |
int | fontIndex, | ||
Point2dCP | ptP, | ||
WCharCP | pwString, | ||
BSIColorDescrCP | fgColorP, | ||
BSIColorDescrCP | bgColorP, | ||
BSIRectCP | clipRectP, | ||
bool | halfTone, | ||
bool | rightToLeft, | ||
bool | transparent, | ||
size_t | nChars | ||
) |
Draws Unicode text into a window with a specific foreground color and without filling in its background.
The string being drawn may be truncated to a maximum length.
[in] | windowP | points to the window to draw the text in. |
[in] | fontIndex | the index of the raster font to use to draw the text. |
[in] | ptP | points to the location within the window in local coords to place the text. |
[in] | pwString | points to the Unicode text to draw. |
[in] | fgColorP | points to the foreground color descriptor to use. |
[in] | bgColorP | points to the background color descriptor to use. |
[in] | clipRectP | points to the rectangle to clip text to. |
[in] | halfTone | true if the drawing should be done in a halftone. |
[in] | rightToLeft | true draw left to right for Arabic/Hebrew |
[in] | transparent | true draw the text only without filling in the background |
[in] | nChars | number of chars to draw |