206{
207 int clientWidth, clientHeight;
208 GetSize(&clientWidth, &clientHeight);
209
212 {
214 }
215
216 wxMemoryDC dc;
218
219 dc.SetBrush(*wxWHITE_BRUSH);
220 dc.SetPen(*wxBLACK_PEN);
221 dc.DrawRectangle(0, 0, clientWidth, clientHeight);
222
223 dc.SetFont(wxFont(10, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL,
224 wxFONTWEIGHT_NORMAL));
225 dc.SetTextForeground(*wxBLACK);
226 dc.SetTextBackground(*wxWHITE);
227
228 double duckAmountDb = 0;
229 double innerFadeDownLen = 0;
230 double innerFadeUpLen = 0;
231 double outerFadeDownLen = 0;
232 double outerFadeUpLen = 0;
238
244 {
245
246 wxString message =
_(
"Preview not available");
247 int textWidth = 0, textHeight = 0;
248 dc.GetTextExtent(message, &textWidth, &textHeight);
249 dc.DrawText(message, (clientWidth - textWidth) / 2,
250 (clientHeight - textHeight) / 2);
251
253 } else
254 {
255
256 dc.SetBrush(*wxTRANSPARENT_BRUSH);
257 dc.SetPen(wxPen(
theTheme.
Colour(clrGraphLines), 3, wxPENSTYLE_SOLID));
258
259 wxPoint points[6];
260
261 points[0].x = 10;
263
266
270
274
277
278 points[5].x = clientWidth - 10;
280
282
283 dc.SetPen(wxPen(*wxBLACK, 1, wxPENSTYLE_DOT));
284
287
289 dc.SetBrush(*wxWHITE_BRUSH);
290
296 (points[2].x + points[3].x) / 2, points[2].y);
297
299 {
301 int digits;
302 float value;
303
305 {
306 value = innerFadeDownLen;
307 digits = 2;
308 }
310 {
311 value = innerFadeUpLen;
312 digits = 2;
313 }
315 {
316 value = outerFadeDownLen;
317 digits = 2;
319 {
320 value = outerFadeUpLen;
321 digits = 2;
322 }
323 else
324 {
325 value = duckAmountDb;
326 digits = 1;
327 }
328
330 valueStr +=
wxT(
" ");
331
333
335 else
336
338
339 int textWidth = 0, textHeight = 0;
340 GetTextExtent(valueStr, &textWidth, &textHeight);
341
344
347 else
349
350 dc.DrawText(valueStr, textPosX, textPosY);
351
354 }
355 }
356
357
358 wxPaintDC paintDC(this);
359 paintDC.Blit(0, 0, clientWidth, clientHeight, &dc, 0, 0);
360
361
362 dc.SetPen(wxNullPen);
363 dc.SetBrush(wxNullBrush);
364 dc.SetFont(wxNullFont);
365 dc.SelectObject(wxNullBitmap);
366}
static void Line(wxDC &dc, wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2)
static void Lines(wxDC &dc, size_t nPoints, const wxPoint points[])
wxTextCtrl * mInnerFadeUpLenBox
wxTextCtrl * mInnerFadeDownLenBox
wxTextCtrl * mOuterFadeDownLenBox
wxTextCtrl * mOuterFadeUpLenBox
wxTextCtrl * mDuckAmountDbBox
static wxString ToDisplayString(double numberToConvert, int digitsAfterDecimalPoint=-1)
Convert a number to a string, uses the user's locale's decimal separator.
wxColour & Colour(int iIndex)