571{
572 int clientWidth, clientHeight;
573 GetSize(&clientWidth, &clientHeight);
574
577 {
579 }
580
581 wxMemoryDC dc;
583
584 dc.SetBrush(*wxWHITE_BRUSH);
585 dc.SetPen(*wxBLACK_PEN);
586 dc.DrawRectangle(0, 0, clientWidth, clientHeight);
587
588 dc.SetFont(wxFont(10, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL,
589 wxFONTWEIGHT_NORMAL));
590 dc.SetTextForeground(*wxBLACK);
591 dc.SetTextBackground(*wxWHITE);
592
593 double duckAmountDb = 0;
594 double innerFadeDownLen = 0;
595 double innerFadeUpLen = 0;
596 double outerFadeDownLen = 0;
597 double outerFadeUpLen = 0;
603
609 {
610
611 wxString message =
_(
"Preview not available");
612 int textWidth = 0, textHeight = 0;
613 dc.GetTextExtent(message, &textWidth, &textHeight);
614 dc.DrawText(message, (clientWidth - textWidth) / 2,
615 (clientHeight - textHeight) / 2);
616
618 } else
619 {
620
621 dc.SetBrush(*wxTRANSPARENT_BRUSH);
622 dc.SetPen(wxPen(
theTheme.
Colour(clrGraphLines), 3, wxPENSTYLE_SOLID));
623
624 wxPoint points[6];
625
626 points[0].x = 10;
628
631
635
639
642
643 points[5].x = clientWidth - 10;
645
647
648 dc.SetPen(wxPen(*wxBLACK, 1, wxPENSTYLE_DOT));
649
652
654 dc.SetBrush(*wxWHITE_BRUSH);
655
661 (points[2].x + points[3].x) / 2, points[2].y);
662
664 {
666 int digits;
667 float value;
668
670 {
671 value = innerFadeDownLen;
672 digits = 2;
673 }
675 {
676 value = innerFadeUpLen;
677 digits = 2;
678 }
680 {
681 value = outerFadeDownLen;
682 digits = 2;
684 {
685 value = outerFadeUpLen;
686 digits = 2;
687 }
688 else
689 {
690 value = duckAmountDb;
691 digits = 1;
692 }
693
695 valueStr +=
wxT(
" ");
696
698
700 else
701
703
704 int textWidth = 0, textHeight = 0;
705 GetTextExtent(valueStr, &textWidth, &textHeight);
706
709
712 else
714
715 dc.DrawText(valueStr, textPosX, textPosY);
716
719 }
720 }
721
722
723 wxPaintDC paintDC(this);
724 paintDC.Blit(0, 0, clientWidth, clientHeight, &dc, 0, 0);
725
726
727 dc.SetPen(wxNullPen);
728 dc.SetBrush(wxNullBrush);
729 dc.SetFont(wxNullFont);
730 dc.SelectObject(wxNullBitmap);
731}
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)