590{
591 int clientWidth, clientHeight;
592 GetSize(&clientWidth, &clientHeight);
593
596 {
598 }
599
600 wxMemoryDC dc;
602
603 dc.SetBrush(*wxWHITE_BRUSH);
604 dc.SetPen(*wxBLACK_PEN);
605 dc.DrawRectangle(0, 0, clientWidth, clientHeight);
606
607 dc.SetFont(wxFont(10, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL,
608 wxFONTWEIGHT_NORMAL));
609 dc.SetTextForeground(*wxBLACK);
610 dc.SetTextBackground(*wxWHITE);
611
612 double duckAmountDb = 0;
613 double innerFadeDownLen = 0;
614 double innerFadeUpLen = 0;
615 double outerFadeDownLen = 0;
616 double outerFadeUpLen = 0;
622
628 {
629
630 wxString message =
_(
"Preview not available");
631 int textWidth = 0, textHeight = 0;
632 dc.GetTextExtent(message, &textWidth, &textHeight);
633 dc.DrawText(message, (clientWidth - textWidth) / 2,
634 (clientHeight - textHeight) / 2);
635
637 } else
638 {
639
640 dc.SetBrush(*wxTRANSPARENT_BRUSH);
641 dc.SetPen(wxPen(
theTheme.
Colour(clrGraphLines), 3, wxPENSTYLE_SOLID));
642
643 wxPoint points[6];
644
645 points[0].x = 10;
647
650
654
658
661
662 points[5].x = clientWidth - 10;
664
666
667 dc.SetPen(wxPen(*wxBLACK, 1, wxPENSTYLE_DOT));
668
671
673 dc.SetBrush(*wxWHITE_BRUSH);
674
680 (points[2].x + points[3].x) / 2, points[2].y);
681
683 {
685 int digits;
686 float value;
687
689 {
690 value = innerFadeDownLen;
691 digits = 2;
692 }
694 {
695 value = innerFadeUpLen;
696 digits = 2;
697 }
699 {
700 value = outerFadeDownLen;
701 digits = 2;
703 {
704 value = outerFadeUpLen;
705 digits = 2;
706 }
707 else
708 {
709 value = duckAmountDb;
710 digits = 1;
711 }
712
714 valueStr +=
wxT(
" ");
715
717
719 else
720
722
723 int textWidth = 0, textHeight = 0;
724 GetTextExtent(valueStr, &textWidth, &textHeight);
725
728
731 else
733
734 dc.DrawText(valueStr, textPosX, textPosY);
735
738 }
739 }
740
741
742 wxPaintDC paintDC(this);
743 paintDC.Blit(0, 0, clientWidth, clientHeight, &dc, 0, 0);
744
745
746 dc.SetPen(wxNullPen);
747 dc.SetBrush(wxNullBrush);
748 dc.SetFont(wxNullFont);
749 dc.SelectObject(wxNullBitmap);
750}
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)