summaryrefslogtreecommitdiff
path: root/app/bin/param.h
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2024-07-03 10:19:36 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2024-07-03 10:19:36 +0200
commitb6bd52cd7330a90fc0e44dbe6022551a8dd768a1 (patch)
tree9804282102f8c40d27407b9c94119b35eeb5013c /app/bin/param.h
parentc9d0740841fbe0539e42e66d3865672bfcd3ac02 (diff)
parenta14a7a0ccc9de76aeab0b2e4bbf58f1a79deedc2 (diff)
Update upstream source from tag 'upstream/5.3.0GA'
Update to upstream version '5.3.0GA' with Debian dir dfd14d63b0238e276ade6f54dd9100325df5b2f9
Diffstat (limited to 'app/bin/param.h')
-rw-r--r--app/bin/param.h203
1 files changed, 114 insertions, 89 deletions
diff --git a/app/bin/param.h b/app/bin/param.h
index d72553e..004dcb5 100644
--- a/app/bin/param.h
+++ b/app/bin/param.h
@@ -17,7 +17,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef PARAM_H
@@ -28,24 +28,29 @@
typedef struct turnoutInfo_t * turnoutInfo_p;
+extern wWinPix_t DlgSepTop;
+extern wWinPix_t DlgSepBottom;
+extern wWinPix_t DlgSepLeft;
+extern wWinPix_t DlgSepRight;
+
typedef enum {
- PD_LONG,
- PD_FLOAT,
- PD_RADIO,
- PD_TOGGLE,
- PD_STRING,
- PD_LIST,
- PD_DROPLIST,
- PD_COMBOLIST,
- PD_BUTTON,
- PD_COLORLIST,
- PD_MESSAGE, /* static text */
- PD_DRAW,
- PD_TEXT,
- PD_MENU,
- PD_MENUITEM,
- PD_BITMAP
- } parameterType;
+ PD_LONG,
+ PD_FLOAT,
+ PD_RADIO,
+ PD_TOGGLE,
+ PD_STRING,
+ PD_LIST,
+ PD_DROPLIST,
+ PD_COMBOLIST,
+ PD_BUTTON,
+ PD_COLORLIST,
+ PD_MESSAGE, /* static text */
+ PD_DRAW,
+ PD_TEXT,
+ PD_MENU,
+ PD_MENUITEM,
+ PD_BITMAP
+} parameterType;
// PD_FLOAT modifiers
#define PDO_DIM (1L<<0)
@@ -102,60 +107,61 @@ typedef struct paramGroup_t *paramGroup_p;
#define PDO_NORANGECHECK_LOW (1<<0)
#define PDO_NORANGECHECK_HIGH (1<<1)
typedef struct {
- long low;
- long high;
- wWinPix_t width;
- int rangechecks;
- } paramIntegerRange_t;
+ long low;
+ long high;
+ wWinPix_t width;
+ int rangechecks;
+} paramIntegerRange_t;
typedef struct {
- FLOAT_T low;
- FLOAT_T high;
- wWinPix_t width;
- int rangechecks;
- } paramFloatRange_t;
+ FLOAT_T low;
+ FLOAT_T high;
+ wWinPix_t width;
+ int rangechecks;
+} paramFloatRange_t;
typedef struct {
- wWinPix_t width;
- wWinPix_t height;
- wDrawRedrawCallBack_p redraw;
- playbackProc action;
- drawCmd_p d;
- } paramDrawData_t;
+ wWinPix_t width;
+ wWinPix_t height;
+ wDrawRedrawCallBack_p redraw;
+ playbackProc action;
+ drawCmd_p d;
+} paramDrawData_t;
typedef struct {
- wIndex_t number;
- wWinPix_t width;
- int colCnt;
- wWinPix_t * colWidths;
- const char * * colTitles;
- wWinPix_t height;
- } paramListData_t;
+ wIndex_t number;
+ wWinPix_t width;
+ int colCnt;
+ wWinPix_t * colWidths;
+ const char * * colTitles;
+ wWinPix_t height;
+} paramListData_t;
typedef struct {
- wWinPix_t width;
- wWinPix_t height;
- } paramTextData_t;
+ wWinPix_t width;
+ wWinPix_t height;
+} paramTextData_t;
typedef union {
- long l;
- FLOAT_T f;
- char * s;
- turnoutInfo_p p;
- wDrawColor dc;
- } paramOldData_t;
+ long l;
+ FLOAT_T f;
+ char * s;
+ turnoutInfo_p p;
+ wDrawColor dc;
+} paramOldData_t;
typedef struct {
- parameterType type;
- void * valueP;
- const char * nameStr;
- long option;
- const void * winData;
- const char * winLabel;
- long winOption;
- void * context;
- unsigned int max_string;
- wControl_p control;
- paramGroup_p group;
- paramOldData_t oldD, demoD;
- wBool_t enter_pressed;
- wBool_t bInvalid;
- } paramData_t, *paramData_p;
+ parameterType type;
+ void * valueP;
+ const char * nameStr;
+ long option;
+ const void * winData;
+ const char * winLabel;
+ long winOption;
+ void * context;
+ unsigned int max_string;
+ wControl_p control;
+ paramGroup_p group;
+ paramOldData_t oldD, demoD;
+ wBool_t enter_pressed;
+ wBool_t bInvalid;
+ wBool_t bShown;
+} paramData_t, *paramData_p;
typedef void (*paramGroupProc_t) ( long, long );
@@ -171,36 +177,56 @@ typedef void (*paramGroupProc_t) ( long, long );
#define PGO_PREFDRAWGROUP (1<<9)
#define PGO_PREFMISC (1<<10)
-typedef void (*paramLayoutProc)( paramData_t *, int, wWinPix_t, wWinPix_t *, wWinPix_t * );
+typedef void (*paramLayoutProc)( paramData_t *, int, wWinPix_t, wWinPix_t *,
+ wWinPix_t * );
typedef void (*paramActionOkProc)( void * );
typedef void (*paramActionCancelProc)( wWin_p );
typedef void (*paramChangeProc)( paramGroup_p, int, void * );
typedef struct paramGroup_t {
- char * nameStr;
- long options;
- paramData_p paramPtr;
- int paramCnt;
- paramActionOkProc okProc;
- paramActionCancelProc cancelProc;
- paramLayoutProc layoutProc;
- long winOption;
- paramChangeProc changeProc;
- long action;
- paramGroupProc_t proc;
- wWin_p win;
- wButton_p okB;
- wButton_p cancelB;
- wButton_p helpB;
- wWinPix_t origW;
- wWinPix_t origH;
- wBox_p * boxs;
- } paramGroup_t;
+ char * nameStr;
+ long options;
+ paramData_p paramPtr;
+ int paramCnt;
+ paramActionOkProc okProc;
+ paramActionCancelProc cancelProc;
+ paramLayoutProc layoutProc;
+ long winOption;
+ paramChangeProc changeProc;
+ long action;
+ paramGroupProc_t proc;
+ wWin_p win;
+ wButton_p okB;
+ wButton_p cancelB;
+ wButton_p helpB;
+ wWinPix_t origW;
+ wWinPix_t origH;
+ wBox_p * boxs;
+} paramGroup_t;
wIndex_t ColorTabLookup( wDrawColor );
extern char * PREFSECT;
// extern char decodeErrorStr[STR_SHORT_SIZE];
+
+
+#define ANGLE_POLAR (0)
+#define ANGLE_CART (1)
+extern long angleSystem;
+#define PutAngle(X) ((angleSystem==ANGLE_POLAR)?(X):NormalizeAngle(90.0-(X)))
+
+#define DISTFMT_DECS 0x00FF
+#define DISTFMT_FMT 0x0300
+#define DISTFMT_FMT_NONE 0x0000
+#define DISTFMT_FMT_SHRT 0x0100
+#define DISTFMT_FMT_LONG 0x0200
+#define DISTFMT_FMT_MM 0x0100
+#define DISTFMT_FMT_CM 0x0200
+#define DISTFMT_FMT_M 0x0300
+#define DISTFMT_FRACT 0x0400
+#define DISTFMT_FRACT_NUM 0x0000
+#define DISTFMT_FRACT_FRC 0x0400
+
FLOAT_T DecodeFloat( wString_p, BOOL_T * );
FLOAT_T DecodeDistance( wString_p, BOOL_T * );
char * FormatLong( long );
@@ -224,7 +250,6 @@ void ParamRestoreAll( void );
void ParamSaveAll( void );
void ParamMenuPush( void * );
-extern int paramHiliteFast;
void ParamHilite( wWin_p, wControl_p, BOOL_T );
wBool_t ParamCheckInputs( paramGroup_p pg, wControl_p b );
@@ -244,7 +269,8 @@ long GetChanges(paramGroup_p pg);
if ( HS ) GetBalloonHelpStr(HS);
#define PD_F_ALT_CANCELLABEL (1L<<30) /**<use Close or Cancel for the discard button */
-wWin_p ParamCreateDialog( paramGroup_p, char *, char *, paramActionOkProc, paramActionCancelProc, BOOL_T, paramLayoutProc, long, paramChangeProc );
+wWin_p ParamCreateDialog( paramGroup_p, char *, char *, paramActionOkProc,
+ paramActionCancelProc, BOOL_T, paramLayoutProc, long, paramChangeProc );
void ParamCreateControls( paramGroup_p, paramChangeProc );
void ParamLayoutDialog( paramGroup_p );
@@ -252,6 +278,5 @@ void ParamDialogOkActive( paramGroup_p, int );
void ParamResetInvalid( wWin_p win );
-#define ParamControlShow( PG, INX, SHOW ) \
- wControlShow( ((PG)->paramPtr)[INX].control, SHOW )
+void ParamControlShow( paramGroup_t *, wIndex_t, wBool_t );
#endif