CFx SDK Documentation  2023 SP0
FxFdtDialogs.h
Go to the documentation of this file.
1 //
2 // (C) Copyright 2005-2022 by Graebert GmbH.
3 //
4 // Permission to use, copy, modify, and distribute this software in
5 // object code form for any purpose and without fee is hereby granted,
6 // provided that the above copyright notice appears in all copies and
7 // that both that copyright notice and the limited warranty and
8 // restricted rights notice below appear in all supporting
9 // documentation.
10 //
11 // GRAEBERT PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
12 // GRAEBERT SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
13 // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. GRAEBERT GMBH
14 // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
15 // UNINTERRUPTED OR ERROR FREE.
16 
17 #pragma once
18 
19 #include <OdaCommon.h>
20 #include "FxPragmaPush.h"
21 
22 /*===========================================================================
23  Definitions
24 ===========================================================================*/
25 /* Byte Alignment 2 */
26 #pragma pack(push)
27 #pragma pack(2)
28 
29 typedef void* dlg_hdlg;
30 typedef void* dlg_htile;
31 
32 /* control-name (max. char number ) */
33 #define KEY_STR_MAX 32
34 
35 #pragma warning( push )
36 #pragma warning (disable : 4121 ) // alignment of a member was sensitive to packing
37 
38 typedef struct {
39  dlg_hdlg dialog; /* Handle for dialog window */
40  dlg_htile tile; /* Handle for control element (tile) */
41  char key[KEY_STR_MAX+1]; /* Key (ID) of control element */
42  char* value; /* Current value of control element */
43  void* client_data; /* Current client data */
44  int reason; /* Code of return reason */
45  int x,y; /* Coordinates of image control */
47 
48 typedef struct {
49  dlg_hdlg dialog; /* Handle for dialog window */
50  dlg_htile tile; /* Handle for control element (tile) */
51  wchar_t key[KEY_STR_MAX+1]; /* Key (ID) of control element */
52  wchar_t* value; /* Current value of control element */
53  void* client_data; /* Current client data */
54  int reason; /* Code of return reason */
55  int x,y; /* Coordinates of image control */
57 
58 /* For use in tile callback packets */
59 #define CTRL_SELECT 1
60 #define CTRL_LOST_FOCUS 2
61 #define CTRL_DRAG 3
62 #define CTRL_DOUBLE_CLICK 4
63 #define CTRL_UPDATE 5
64 
65 /* DIALOG user's function, passed to FELIX to be called later */
66 typedef void ( * CCLIENTFUNCA )( dlg_callback_packetA * cpkt, void * pClass );
67 #define NO_CCLIENTFUNCA ((CCLIENTFUNCA)0)
68 typedef void ( * CCLIENTFUNCW )( dlg_callback_packetW * cpkt, void * pClass );
69 #define NO_CCLIENTFUNCW ((CCLIENTFUNCW)0)
70 typedef void ( * CDLGINITFUNC )( dlg_hdlg hdlg, void * pClass );
71 #define NO_CDLGINITFUNC ((CDLGINITFUNC)0)
72 
73 typedef int ( * CDRXLISPFUNCTION )( );
74 #define NO_CDRXLISPFUNCTION ((CDRXLISPFUNCTION)0)
75 
76 /* Return by reference integers for DLG_DialogStart() */
77 
78 #define DLG_CANCEL 0 /* User pressed Cancel or equivalent */
79 #define DLG_OK 1 /* User pressed Ok */
80 #define DLG_ALLDONE -1 /* All dialogs terminated with
81  Dlg_DialogTerm() */
82 #define DLG_STATUS 2 /* Start of user return codes */
83 #define DLG_ERR_EXIST -2 /* Dialog allready started */
84 #define DLG_ERR_TOOMANY -3 /* To many started dialogs */
85 #define DLG_ERR_WRONGHANDLE -4 /* Invalid dialog handle */
86 
87 /* List argument type for DLG_ListStart(); */
88 #define DLG_L_CHANGE ((short) 1) /* Change selected listbox contents */
89 #define DLG_L_APPEND ((short) 2) /* Append new listbox entry */
90 #define DLG_L_NEW ((short) 3) /* Delete old list and create new list */
91 #define DLG_L_INSERT ((short)10) /* Insert listbox entry */
92 #define DLG_L_DELETE ((short)11) /* Delete listbox entry */
93 #define DLG_L_GETSEL ((short)12) /* Get selected listbox entries */
94 #define DLG_L_GETTEXT ((short)13) /* Get listbox entries */
95 #define DLG_L_SETSEL ((short)14) /* Select listbox entry */
96 #define DLG_L_RESETSEL ((short)15) /* Deselect listbox entry */
97 #define DLG_L_SETCARET ((short)16) /* Set focus rectangle */
98 
99 /* Mode argument type for DLG_TileMode(); */
100 #define DLG_M_ENABLE ((short) 0) /* Enable tile */
101 #define DLG_M_DISABLE ((short) 1) /* Disable tile */
102 #define DLG_M_SETFOCUS ((short) 2) /* Set focus to tile */
103 #define DLG_M_SETSEL ((short) 3) /* Set editbox selection--allows
104  auto-clearing of old string */
105 #define DLG_M_FLIP ((short) 4) /* Invert current state */
106 #define DLG_M_VISIBLE ((short) 5) /* Visible tile */
107 #define DLG_M_HIDE ((short) 6) /* Hide tile */
108 
109 /* For buffers that receive values for tiles. The number is arbitrary
110  --it's just here to allow changing them all from one place. */
111 #define TILE_STR_MAX 40
112 #define TILE_STR_LIMIT 2035 /* real limit of dialog strings */
113 
114 /* Radiobutton/Checkbox argument type for Dlg_Tile[Set,Get]() */
115 #define DLG_B_UNCHECKED _T("0") /* Checkbox/Radiobutton */
116 #define DLG_B_CHECKED _T("1") /* Checkbox/Radiobutton */
117 #define DLG_B_INDETERMINATE _T("2") /* Only Checkbox with attribute 3STATE
118  or AUTO3STATE */
119 
120 /* Color argument type for Dlg_Image[Fill,Vector]() */
121 #define CAD_BG_COLOR ((short) -2) /* Background color CAD window */
122 #define DLG_BG_COLOR ((short)-15) /* Background color current dialog window*/
123 #define DLG_TXT_COLOR ((short)-16) /* Text color of current dialog window */
124 #define DLG_CUR_COLOR ((short)-18) /* Current color of current dialog window*/
125 
126 /* Font argument type for Dlg_TileSetFont() */
127 #define DLG_SYS_VAR_FONT ((short) 0) /* System font */
128 #define DLG_SYS_FIX_FONT ((short) 1) /* System fixed font */
129 #define DLG_ANSI_VAR_FONT ((short) 2) /* ANSI system font */
130 #define DLG_ANSI_FIX_FONT ((short) 3) /* ANSI system fixed font */
131 
132 #pragma warning( pop )
133 
134 /* Reset Byte Alignment */
135 #pragma pack(pop)
136 
137 #include "FxPragmaPop.h"
void(* CCLIENTFUNCA)(dlg_callback_packetA *cpkt, void *pClass)
Definition: FxFdtDialogs.h:66
#define KEY_STR_MAX
Definition: FxFdtDialogs.h:33
void(* CDLGINITFUNC)(dlg_hdlg hdlg, void *pClass)
Definition: FxFdtDialogs.h:70
void * dlg_hdlg
Definition: FxFdtDialogs.h:29
void * dlg_htile
Definition: FxFdtDialogs.h:30
void(* CCLIENTFUNCW)(dlg_callback_packetW *cpkt, void *pClass)
Definition: FxFdtDialogs.h:68
int(* CDRXLISPFUNCTION)()
Definition: FxFdtDialogs.h:73
typedef void(APIENTRYP PFNGLACTIVETEXTUREPROC)(GLenum texture)
GLfloat GLfloat y
Definition: gles2_ext.h:316