/* Copyright 2020, Dirk Krause. All rights reserved. SPDX-License-Identifier: BSD-3-Clause */ #ifndef H_INCLUDED_wxdkdraw /** Include file only once. */ #define H_INCLUDED_wxdkdraw 1 #ifndef DK4CONF_H_INCLUDED #include #endif #ifndef DK4TYPES_H_INCLUDED #include #endif #ifndef DK4MEM_H_INCLUDED #include #endif #ifndef DK4STR8_H_INCLUDED #include #endif #ifndef DK4ENC_H_INCLUDED #include #endif #ifndef DK4LOC_H_INCLUDED #include #endif #ifndef DK4MATH_H_INCLUDED #include #endif #ifndef DK4MAAI_H_INCLUDED #include #endif #ifndef DK4MAAI16_H_INCLUDED #include #endif #ifndef DK4MAAU16_H_INCLUDED #include #endif #ifndef DK4MAAI32_H_INCLUDED #include #endif #ifndef DK4MAAU32_H_INCLUDED #include #endif #ifndef DK4MAI8DI8_H_INCLUDED #include #endif #ifndef DK4MAI8DU8_H_INCLUDED #include #endif #ifndef DK4MAI8DI16_H_INCLUDED #include #endif #ifndef DK4MAI8DU16_H_INCLUDED #include #endif #ifndef DK4MAI8DI32_H_INCLUDED #include #endif #ifndef DK4MAI8DU32_H_INCLUDED #include #endif #ifndef DK4MAI8DBL_H_INCLUDED #include #endif #ifndef DK4MAO8D_H_INCLUDED #include #endif #ifndef DK4MAO8DBL_H_INCLUDED #include #endif #ifndef DK4GRA_H_INCLUDED #include #endif #ifndef DK4GRAT_H_INCLUDED #include #endif #ifndef DK4XSP_H_INCLUDED #include #endif #ifndef DK4VERSWX_H_INCLUDED #include #endif #ifndef DK4UNUSED_H_INCLUDED #include #endif #ifndef WX_WXPREC_H_INCLUDED #include #define WX_WXPREC_H_INCLUDED 1 #endif #ifdef __BORLANDC__ #pragma hdrstop #endif #ifndef WX_PRECOMP #ifndef WX_WX_H_INCLUDED #include #define WX_WX_H_INCLUDED 1 #endif #endif #ifndef WX_ARRSTR_H_INCLUDED #include #define WX_ARRSTR_H_INCLUDED 1 #endif #ifndef WX_CONFIG_H_INCLUDED #include #define WX_CONFIG_H_INCLUDED 1 #endif #ifndef WX_FILENAME_H_INCLUDED #include #define WX_FILENAME_H_INCLUDED 1 #endif #ifndef WX_FFILE_H_INCLUDED #include #define WX_FFILE_H_INCLUDED 1 #endif #ifndef WX_GBSIZER_H_INCLUDED #include #define WX_GBSIZER_H_INCLUDED 1 #endif #ifndef WX_THREAD_H_INCLUDED #include #define WX_THREAD_H_INCLUDED 1 #endif #ifndef WX_GAUGE_H_INCLUDED #include #define WX_GAUGE_H_INCLUDED 1 #endif #ifndef WX_SPINCTRL_H_INCLUDED #include #define WX_SPINCTRL_H_INCLUDED 1 #endif #ifndef WX_DCBUFFER_H_INCLUDED #include #endif #ifndef WX_HELP_H_INCLUDED #include #define WX_HELP_H_INCLUDED 1 #endif #ifndef WX_FS_ZIP_H_INCLUDED #include #define WX_FS_ZIP_H_INCLUDED 1 #endif #ifndef WX_CMDLINE_H_INCLUDED #include #define WX_CMDLINE_H_INCLUDED 1 #endif #ifndef WX_DIR_H_INCLUDED #include #define WX_DIR_H_INCLUDED 1 #endif #ifndef WX_GRAPHICS_H_INCLUDED #include #define WX_GRAPHICS_H_INCLUDED 1 #endif #ifndef WX_COLORDLG_H_INCLUDED #include #define WX_COLORDLG_H_INCLUDED 1 #endif /* __CHANGE__ 018: Add further wxWidgets header files. */ #ifndef WXDKDRAWTYPES_H_INCLUDED #include "WxdkdrawTypes.h" #endif #ifndef WXDENUM_H_INCLUDED #include "wxdenum.h" #endif #ifndef WXDARC_H_INCLUDED #include "wxdarc.h" #endif #ifndef WXDKDRAWOBJ_H_INCLUDED #include "WxdkdrawObj.h" #endif #ifndef WXDKDRAWFONT_H_INCLUDED #include "WxdkdrawFont.h" #endif #ifndef WXDKDRAWCOMP_H_INCLUDED #include "WxdkdrawComp.h" #endif #ifndef WXDKDRAWREAD_H_INCLUDED #include "WxdkdrawRead.h" #endif #ifndef WXDKDRAWWRITE_H_INCLUDED #include "WxdkdrawWrite.h" #endif #ifndef DK4STRX_H_INCLUDED #include #endif #ifndef DK4RECWX_H_INCLUDED #include #endif #ifndef DK4MPL_H_INCLUDED #include #endif #ifndef DK4WXAPPLICTIONHELPER_H_INCLUDED #include #endif #ifndef DK4WXFRAME_H_INCLUDED #include #endif #ifndef DK4WXPROGRESSDIALOG_H_INCLUDED #include #endif #ifndef DK4WXHELPCONTROLLER_H_INCLUDED #include #endif /* __CHANGE__ 018: Add header files for further classes and modules. */ /** Current operation or processing state, stored in the m_iState member of the frame. */ enum { S_NOOP = 0 , /**< No operation. */ S_DELETE , /**< Delete objects. */ S_REGION_DELETE , /**< Delete region. */ S_MOVE_SELECT , /**< Select objects to move. */ S_MOVE_PLACE , /**< Place objects when moving. */ S_COPY_SELECT , /**< Select objects to copy. */ S_COPY_PLACE , /**< Place objects when copying. */ S_POLY_FIRST , /**< Place first polygon/polyline point. */ S_POLY_FURTHER , /**< Place further polygon/polyline point. */ S_SPLINE_FIRST , /**< Place first spline point. */ S_SPLINE_FURTHER , /**< Place further spline point. */ S_BOX_FIRST , /**< Place first box corner. */ S_BOX_OPPOSITE , /**< Place opposite box corner. */ S_CIRCLE_CENTER , /**< Place circle center point. */ S_CIRCLE_RADIUS , /**< Place any circle point for radius. */ S_ELLIPSE_CENTER , /**< Place ellipse center point. */ S_ELLIPSE_CORNER , /**< Place ellipse bounding box corner point. */ S_ARC_1 , /**< Place arc start point. */ S_ARC_2 , /**< Place arc intermediate point. */ S_ARC_3 , /**< Place arc end point. */ S_DOT , /**< Place dot. */ S_TEXT , /**< Place text. */ S_IMG_1 , /**< Place first image point. */ S_IMG_2 , /**< Place opposite image point. */ S_LIBELEM_PLACE , /**< Place library element. */ S_MOVEPT_SELECT , /**< Move point, select point to move. */ S_MOVEPT_PLACE , /**< Move point, place at new position. */ S_DELPT , /**< Delete point from spline or polyline. */ S_ADDPT_SELECT , /**< Add point, select neightbour. */ S_ADDPT_PLACE , /**< Add point, place new point. */ S_DRWSZ_SELECT , /**< Change drawing size, select point. */ S_DRWSZ_PLACE , /**< Change drawing size, place point. */ S_FLIP , /**< File elements vertically or horizontally. */ S_GROUP_ONE , /**< Group elements one by one. */ S_GROUP_RECT_1 , /**< Group elements by bounding box rectangle. */ S_GROUP_RECT_2 , /**< Group elements by bounding box stage 2. */ S_UNGROUP , /**< Ungroup elements. */ S_DETAILS , /**< Edit object details. */ S_DETAILS_2 , /**< Edit object details, step 2. */ S_CONVERT , /**< Convert to other object types. */ S_ROTATE , /**< Rotate object 90 degree. */ S_MOD_SPLINE , /**< Modify spline s value. */ }; /** Error codes for wxdkdraw. */ enum { /** Failed to read file (syntax or other). */ WXD_E_FAILED_TO_READ_FILE = (DK4_E_HIGHEST_NUMBER + 1), /** Failed to open file for reading. */ WXD_E_FAILED_TO_OPEN_FILE , /** Mouse position not available. */ WXD_E_MOUSE_POS_NOT_AVAILABLE , /** Missing export text. */ WXD_E_NO_EXPORT_TEXT , /** No file name specified for image. */ WXD_E_NO_FILENAME , /** Failed to retrieve coordinates from object. */ WXD_E_GET_CONTROL_POINT , /** Failed to set coordinates on object. */ WXD_E_SET_CONTROL_POINT , /** Numeric overflow in coordinates calculation. */ WXD_E_OVERFLOW_COORDINATES , /** Failed to move an object to a group. */ WXD_E_MOVE_TO_GROUP , /** Failed to ungroup an object. */ WXD_E_UNGROUP_OBJECT , /** Box is too small to calculate corner radius. */ WXD_E_BOX_TOO_SMALL , /** New point out of index range. */ WXD_E_BUG_POINT_OOR , /** Too many points. */ WXD_E_TOO_MANY_POINTS , /** Can not convert this object. */ WXD_E_CANNOT_CONVERT , /** Current working directory too long. */ WXD_E_CWD_TOO_LONG , /** Failed to find current working directory. */ WXD_E_NO_CWD , /** Output file name too long. */ WXD_E_OUTPUT_FN_TOO_LONG , /** Failed to find output directory name. */ WXD_E_OUTPUT_DIRNAME , }; /** Resolution as double value. 16256000 wxd units make up one inch. 6400000 wxd units make up one centimeter. */ #define RESWXD 16256000.0 #define CMWXD 6400000.0 /** Layer manager checkbox structure. */ typedef struct { Wxd_layer_t *lay; /**< Layer controlled by element. */ wxCheckBox *cb; /**< Checkbox for that layer. */ uint8_t oa; /**< Old active value. */ } Wxd_layer_cb_t; #endif /* vim: set ai sw=4 ts=4 : */