home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1997 January
/
Chip_1997-01_cd.bin
/
ms95
/
disk22
/
dir03
/
f015100.re_
/
f015100.re
Wrap
Text File
|
1996-04-02
|
9KB
|
272 lines
/*----------------------------------------------------------------------+
| |
| Copyright (1995) Bentley Systems, Inc., All rights reserved. |
| |
| "MicroStation" is a registered trademark and "MDL" and "MicroCSL" |
| are trademarks of Bentley Systems, Inc. |
| |
| Limited permission is hereby granted to reproduce and modify this |
| copyrighted material provided that the resulting code is used only |
| in conjunction with Bentley Systems products under the terms of the |
| license agreement provided therein, and that this notice is retained |
| in its entirety in any such reproduction or modification. |
| |
+----------------------------------------------------------------------*/
/*----------------------------------------------------------------------+
| |
| $Logfile: J:/mdl/examples/iconedit/iconedit.h_v $
| $Workfile: iconedit.h $
| $Revision: 6.0 $
| $Date: 29 Jun 1995 10:04:40 $
| |
+----------------------------------------------------------------------*/
/*----------------------------------------------------------------------+
| |
| Function - |
| |
| Icon edit structures and definitions |
| |
+----------------------------------------------------------------------*/
#if !defined (__iconeditH__)
#define __iconeditH__
#ifndef __basetypeH__
#include <basetype.h>
#endif
#ifndef __rscdefsH__
#include <rscdefs.h>
#endif
#ifndef __msdefsH__
#include <msdefs.h>
#endif
#if defined (msdos)
# define SEPCHAR '\\'
#elif defined (unix)
# define SEPCHAR '/'
#elif defined (macintosh)
# define SEPCHAR ':'
#else
# define SEPCHAR '.'
#endif
/*----------------------------------------------------------------------+
| |
| |
| |
+----------------------------------------------------------------------*/
#define BASEID_IconEditor 90500
#define DIALOGID_Icon BASEID_IconEditor+1
#define DIALOGID_OpenIconResource BASEID_IconEditor+2
#define DIALOGID_UserSize BASEID_IconEditor+3
#define DIALOGID_SelectCell BASEID_IconEditor+4
#define STRINGID_Messages BASEID_IconEditor+1
#define STRINGID_Errors BASEID_IconEditor+2
#define STRINGID_FormatMsgs BASEID_IconEditor+3
#define GENERICID_IconSmall BASEID_IconEditor+1
#define GENERICID_IconLarge BASEID_IconEditor+2
#define GENERICID_ShiftUp BASEID_IconEditor+3
#define GENERICID_ShiftDown BASEID_IconEditor+4
#define GENERICID_ShiftLeft BASEID_IconEditor+5
#define GENERICID_ShiftRight BASEID_IconEditor+6
#define GENERICID_Clear BASEID_IconEditor+7
#define GENERICID_SelectCell BASEID_IconEditor+8
#define ICONID_ShiftUp BASEID_IconEditor+1
#define ICONID_ShiftDown BASEID_IconEditor+2
#define ICONID_ShiftLeft BASEID_IconEditor+3
#define ICONID_ShiftRight BASEID_IconEditor+4
#define ICONID_Clear BASEID_IconEditor+5
#define MENUBARID_Icon BASEID_IconEditor+3
#define PULLDOWNMENUID_IconFile BASEID_IconEditor+1
#define PULLDOWNMENUID_IconEdit BASEID_IconEditor+2
#define PULLDOWNMENUID_Import BASEID_IconEditor+3
#define LISTBOXID_RscNum BASEID_IconEditor+1
#define LISTBOXID_SelectCell BASEID_IconEditor+2
#define OPTIONBUTTONID_Tool BASEID_IconEditor+1
#define OPTIONBUTTONID_Mode BASEID_IconEditor+2
#define OPTIONBUTTONID_Size BASEID_IconEditor+3
#define TEXTID_IconName BASEID_IconEditor+1
#define TEXTID_Width BASEID_IconEditor+2
#define TEXTID_Height BASEID_IconEditor+3
#define TEXTID_IconResourceType BASEID_IconEditor+4
#define TEXTID_RscId BASEID_IconEditor+5
#define TEXTID_SelectCell BASEID_IconEditor+6
#define LABELID_Position BASEID_IconEditor+1
#define LABELID_IconSize BASEID_IconEditor+2
#define HOOKITEMID_Generic_IconLarge BASEID_IconEditor+1
#define HOOKITEMID_Generic_IconSmall BASEID_IconEditor+2
#define HOOKITEMID_Option_Size BASEID_IconEditor+3
#define HOOKITEMID_List_RscNum BASEID_IconEditor+4
#define HOOKDIALOGID_Icon BASEID_IconEditor+5
#define HOOKDIALOGID_OpenIconResource BASEID_IconEditor+6
#define HOOKITEMID_Generic_Shift BASEID_IconEditor+7
#define HOOKITEMID_TextItem BASEID_IconEditor+8
#define HOOKID_ListBox_SelectCell BASEID_IconEditor+9
#define HOOKID_Generic_SelectCell BASEID_IconEditor+10
#define DEFFILE_ID BASEID_IconEditor+1
#define DEFCREATEFILE_ID BASEID_IconEditor+2
/*----------------------------------------------------------------------+
| |
| |
| |
+----------------------------------------------------------------------*/
#define MSG_Position 0
#define MSG_IconSize 1
#define MSG_ResourceFileToOpen 2
#define MSG_SaveToFile 3
#define MSG_SaveToNewFile 4
#define MSG_IconEditor 5
#define MSG_Ustation 6
#define MSG_Writing 7
#define MSG_NoChange 8
#define MSG_BadFile 9
#define MSG_NewResourceFile 10
#define MSG_Overwrite 11
#define PROMPT_CellLibrary 12
#define PROMPT_Reading 13
#define PROMPT_NoCells 14
#define ERROR_CommandTable 0
#define ERROR_DialogBox 1
#define ERROR_OpenOutput 2
#define ERROR_OpenRsc 3
#define ERROR_LocateIcon 4
#define ERROR_NoFence 5
#define ERROR_NoLibrary 6
/*----------------------------------------------------------------------+
| |
| |
| |
+----------------------------------------------------------------------*/
#define MENUSEARCHID_OpenFile 0
#define MENUSEARCHID_NewFile 1
#define MENUSEARCHID_OpenIcon 2
#define MENUSEARCHID_NewIcon 3
#define MENUSEARCHID_Save 4
#define MENUSEARCHID_SaveTo 5
#define MENUSEARCHID_Quit 6
#define MENUSEARCHID_Fill 0
#define MENUSEARCHID_Clear 1
#define MENUSEARCHID_ShiftLeft 2
#define MENUSEARCHID_ShiftRight 3
#define MENUSEARCHID_ShiftUp 4
#define MENUSEARCHID_ShiftDown 5
#define MENUSEARCHID_ImportGraphics 1
#define MENUSEARCHID_ImportCell 2
/*----------------------------------------------------------------------+
| |
| |
| |
+----------------------------------------------------------------------*/
#define MODE_TOGGLE 0
#define MODE_SET 1
#define MODE_CLEAR 2
#define TOOL_LINE 0
#define TOOL_BRUSH 1
#define TOOL_RECTANGLE 2
#define TOOL_CIRCLE 3
#define FATBIT 4
#define MAXRECTS 250
#define CLASS_LIST_WIDTH 4
#define RSCID_COL_WIDTH 10
#define ALIAS_COL_WIDTH 16
#define LISTWIDTHS (CLASS_LIST_WIDTH + RSCID_COL_WIDTH + ALIAS_COL_WIDTH)
#define LISTHEIGHT 10
#define FILE_UNUSED -1
#define PREDEFINED_SIZES 2
#define MAXICONSIZE 100
#define ICONSIZE 15
#define ICONBLOCKSIZE (ICONSIZE + 2)
#define ICONBLOCKWIDTH ((4 * ICONBLOCKSIZE) + 18)
#if defined (DATA_ALIGNMENT_FORCED)
# define ICONRSC_SIZEOF (sizeof (IconRsc) - 3)
#else
# define ICONRSC_SIZEOF (sizeof (IconRsc))
#endif
/*----------------------------------------------------------------------+
| |
| |
| |
+----------------------------------------------------------------------*/
typedef struct iconEditGlobals
{
int width;
int height;
int onColorDescr;
int offColorDescr;
int onByteValue;
int offByteValue;
int hiliteColor;
int lineColor;
int dynamicsColor;
int tool;
int mode;
int fillMode;
int sizeIndex;
int modeOverride;
int anchorPixelValue;
int saveToOriginal;
int modified;
int empty;
int inRscId;
int selectedType;
int rscHandleFileToRead;
char inFileName[MAXFILELENGTH];
char iconName[16];
char outFileName[MAXFILELENGTH];
char cellName[16];
long format;
long colorIndex;
Point2d anchorPixel;
Point2d anchorPos;
Point2d oldPixel;
Point2d oldPos;
#if defined (resource)
int dialogBoxP;
int downFunctionP;
int upFunctionP;
int resetFunctionP;
int dynamicFuncP;
int dataP;
int stringListP;
int listBoxHdrP;
#else
void *dialogBoxP;
int (*downFunctionP)();
int (*upFunctionP)();
int (*resetFunctionP)();
int (*dynamicFuncP)();
unsigned char *dataP;
unsigned char *stringListP;
void *listBoxHdrP;
#endif
} IconEditGlobals;
#endif /* !defined (__iconeditH__) */