64 class rviewPrefsWindow:
public rviewFrame
68 rviewPrefsWindow(
void);
69 rviewPrefsWindow(rviewPrefs *Prefs);
70 ~rviewPrefsWindow(
void);
72 void setPrefs(rviewPrefs *Prefs);
74 void unlinkParent(
void);
76 void OnSize(
int w,
int h);
79 int process(wxObject &obj, wxEvent &evt);
80 int userEvent(
const user_event &ue);
82 virtual const char *getFrameName(
void)
const;
83 virtual rviewFrameType getFrameType(
void)
const;
88 void setupVariables(
void);
89 void updatePrefs(
void);
90 void updateAndDie(
void);
91 int findInChoices(
int value,
const char **choices,
int number);
93 static rviewChoice *buildFormatMenu(wxPanel *parent,
int fmtNum,
const char *label);
94 static void textWindowToString(DynamicString &str, wxTextWindow *twin);
96 rviewPrefs *editPrefs;
99 wxPanel *panel, *butPanel;
100 rviewButton *butOK, *butCancel, *butApply;
103 wxWindowBase *miscGroup, *imgGroup, *renderGroup, *thumbGroup, *heightGroup;
104 wxWindowBase *chartGroup, *tableGroup, *soundGroup, *commGroup, *orthoGroup;
105 rviewText *filePath, *queryPath, *queryFont;
106 rviewText *vffParams;
107 rviewText *maxDWidth, *maxDHeight;
108 rviewCheckBox *imgDither, *ditherBest;
109 rviewChoice *imgMode, *chartMode, *tableMode, *rgbSpace, *movieMode;
110 rviewCheckBox *imgBBox;
111 rviewText *imgZpro, *imgClipz, *imgPixThreshLow, *imgPixThreshHigh, *imgWgtThresh, *imgWgtQuant;
113 rviewCheckBox *imgRgbBrightness, *imgVoxForType;
114 rviewCheckBox *imgLight;
115 rviewText *imgLightAmbient, *imgLightGain, *imgLightAngle, *imgLightScintAngle;
116 rviewChoice *imgKernSize, *imgKernType;
117 rviewCheckBox *imgUseVCol;
118 rviewText *imgVoxColour;
119 rviewText *imgLightDir, *imgLightDist;
120 rviewCheckBox *imgOrthoBBox, *imgOrthoDragRel;
121 rviewText *imgOrthoThick;
122 rviewCheckBox *chartCosys;
123 rviewText *chartStep, *chartMarkx, *chartMarky;
124 rviewCheckBox *tableCosys;
125 rviewText *tableStepx, *tableStepy;
126 rviewText *thumbProjdim, *thumbProjstep, *thumbWidth, *thumbCols;
127 rviewChoice *soundFreq, *soundLatency;
128 rviewCheckBox *soundLoop;
129 rviewText *imgHeightGrid, *imgHeightScale;
130 rviewChoice *transferFmt, *storageFmt;
131 wxTextWindow *transferParm, *storageParm;
132 wxMessage *transferMsg, *storageMsg;
135 colourspaceMapper *csmap;
138 static const char *soundLatencyChoices[];
139 static const char *soundFrequencyChoices[];
142 static const int prefs_width;
143 static const int prefs_height;
145 static const int prefs_border;
147 static const int prefs_bottom;
149 static const int prefs_bwidth;
150 static const int prefs_bheight;
152 static const int prefs_theight;
154 static const int prefs_chkheight;
156 static const int prefs_eheight;
158 static const int prefs_scrwidth;
160 static const int prefs_twheight;
162 static const int prefs_mheight;
164 static const int prefs_grpmsc_height;
165 static const int prefs_grpimg_height;
166 static const int prefs_grpren_height;
167 static const int prefs_grphgt_height;
168 static const int prefs_grport_height;
169 static const int prefs_grpthb_height;
170 static const int prefs_grpcht_height;
171 static const int prefs_grptab_height;
172 static const int prefs_grpsnd_height;
173 static const int prefs_grpcom_height;
175 static const int prefs_pheight;
187 rviewPrefs(
const char *file);
188 rviewPrefs(
const rviewPrefs &srcPrefs);
191 int load(
const char *file);
192 int save(
const char *file);
194 void editorClosed(
void);
195 void closeEditor(rviewPrefs *newPrefs);
196 void updatePrefs(rviewPrefs *newPrefs);
197 void markModified(
void);
199 static void copyPrefs(
const rviewPrefs &src, rviewPrefs &dest);
201 r_Data_Format getTransferFormat(
void )
const;
202 r_Data_Format getStorageFormat(
void )
const;
204 DynamicString serverName;
206 DynamicString databaseName;
207 DynamicString userName;
208 DynamicString lastColl;
209 DynamicString lastScColl;
210 DynamicString lastOrthoColl;
211 DynamicString filePath;
212 DynamicString queryPath;
213 DynamicString queryFont;
214 DynamicString vffParams;
216 int maxDWidth, maxDHeight;
217 bool imgDither, ditherBest;
218 rviewImageMode imgMode;
219 rviewChartMode chartMode;
220 int movieMode, rgbSpace;
223 unsigned long imgZpro, imgClipz, imgWgtQuant;
224 double imgPixThreshLow, imgPixThreshHigh, imgWgtThresh;
226 bool imgRgbBrightness, imgVoxForType;
228 double imgLightAmbient, imgLightGain, imgLightAngle, imgLightScintAngle;
229 int imgKernSize, imgKernType;
232 DynamicString imgLightDir;
235 double imgHeightScale;
236 bool imgOrthoBBox, imgOrthoDragRel;
239 int chartStep, chartMarkx;
242 int tableStepx, tableStepy;
243 int thumbProjdim, thumbProjstep, thumbWidth, thumbCols;
244 int soundFreq, soundLatency, soundLoop;
245 int transferFmt, storageFmt;
246 DynamicString transferParm, storageParm;
247 colourspace_params csp;
252 void setupVariables(
void);
254 char *getValue(
char *b);
256 static char *toExternal(
const DynamicString &str);
257 static void fromExternal(
const char *ext, DynamicString &str);
259 char *readLine(FILE *fp);
261 rviewPrefsWindow *pwin;
265 unsigned long buffSize;
267 static const unsigned long buffExtendGranularity;
268 static const keyword_to_ident_c prefsVarDesc[];
277 extern rviewPrefs *prefs;