imginput.h
Go to the documentation of this file.
1 /*--------------------------------------------------------------------------------------+
2 |
3 | Supplied under applicable software license agreement.
4 |
5 | Copyright (c) 2018 Bentley Systems, Incorporated. All rights reserved.
6 |
7 +---------------------------------------------------------------------------------------*/
8 #pragma once
9 #ifndef __IMGINPUT_H__
10 #define __IMGINPUT_H__
11 
12 #include <Mstn\MdlApi\mssystem.fdf>
13 
14 /*
15 ** Maximum lenght for a key-in string
16 */
17 #define MAXKEYINLENGTH 256
18 
19 /*
20 ** IMGxxx key-ins Error Codes
21 */
22 #define KIN_SUCCESS 0
23 #define KIN_ERROR 1 /* Invalid Key-in */
24 #define KIN_PERM_DENIED 2 /* Permission denied */
25 #define KIN_NOIMAGE 3 /* An image should be Active when Key-in activated */
26 #define KIN_INVALID_VIEW 4 /* Invalid View Number or List */
27 #define KIN_FILE_READ_ONLY 5 /* This file is read only */
28 #define KIN_NO_ACTIVE_FILE 6 /* No active file */
29 #define KIN_FILE_NOT_FOUND 7 /* The specified file was not found */
30 #define KIN_FILE_EXIST 8 /* The specified file name already exists */
31 #define KIN_FILE_ALREADY_OPEN 9 /* The specified file name is already open */
32 #define KIN_MISSING_SETTINGS 10 /* Previous settings should be made before this Key-in is called */
33 #define KIN_INVALID_SETTINGS 11 /* Previous settings are not valid for this Key-in */
34 #define KIN_INVALID_FILE_NAME 12 /* The file is already open or does not exist */
35 #define KIN_NOT_ENOUGH_SPACE 13 /* Not enough Disk space */
36 #define KIN_INVALID_PARAM 14 /* Indicates that an invalid object/parameter was given */
37 #define KIN_NEED_INTERACTION 15 /* The operation can not be performed without a user interaction */
38 #define KIN_INVALID_IMAGE_TYPE 16 /* The type of image is invalid for this Key-In (e.g.:1 bit images) */
39 #define KIN_INVALID_THEME 17 /* The theme name is invalid for this Key-In */
40 #define KIN_INVALID_COLOR 18 /* The color number is invalid for this Key-In */
41 #define KIN_INVALID_HATCH 19 /* The hatch number is invalid for this Key-In */
42 #define KIN_INVALID_PATTERN 20 /* The pattern number is invalid for this Key-In */
43 #define KIN_3DFILE_NEEDED 21 /* The dgn file needs to be 3D for this Key-in */
44 #define KIN_DESIGN_READONLY 22 /* The dgn file is read only. This key-in can not be processed */
45 #define KIN_INVALID_POINT 23 /* The given point is invalid */
46 #define KIN_AREA_OVERFLOW 24 /* Maximum area overflow */
47 #define KIN_INVALID_SERVER 25 /* The server alias is invalid for this Key-In */
48 #define KIN_MORE_THAN_1_SELECTED 26 /* More than 1 raster is selected */
49 #define KIN_INVALID_DIRECTORY 27 /* the directory doesn't exist */
50 
51 
52 
53 // these are function used by the macros below.
54 // @remark Required Library : mdlbltin.lib
55 MSCORE_EXPORT int GetImageRegisterValueLong (int regNum);
56 MSCORE_EXPORT int GetImageRegisterErrorCode ();
57 MSCORE_EXPORT int GetImageRegisterValueShort (int regNum);
58 MSCORE_EXPORT double GetImageRegisterValueDouble (int regNum);
59 MSCORE_EXPORT WCharCP GetImageRegisterStringContents (WStringR valueHolder, int regNum);
60 
61 /*
62 ** TCB Registers. These macros simplify the access to tcb registers
63 */
64 
65 /* Longs (0-14) */
66 #define REG_LONG(x) (GetImageRegisterValueLong (x))
67 
68 /* Error Code register */
69 #define ERROR_CODE (GetImageRegisterErrorCode())
70 /* Shorts (0-31) */
71 #define REG_SHORT(x) (GetImageRegisterValueShort (x))
72 
73 /* Doubles (0-15) */
74 #define REG_DOUBLE(x) (GetImageRegisterValueDouble (x))
75 
76 #define REG_STRING_CONT(valueHolder, x) (GetImageRegisterStringContents (valueHolder, x))
77 
78 
79 
80 #endif /* __IMGINPUT_H__ */
81 
int GetImageRegisterErrorCode()
wchar_t const * WCharCP
Definition: Bentley.h:224
struct Bentley::WString & WStringR
Definition: Bentley.h:239
WCharCP GetImageRegisterStringContents(WStringR valueHolder, int regNum)
int GetImageRegisterValueShort(int regNum)
int GetImageRegisterValueLong(int regNum)
double GetImageRegisterValueDouble(int regNum)

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.