00001
00006 #ifndef _TextIterationVisualizer_h
00007 #define _TextIterationVisualizer_h
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #include "../FunctionBase.h"
00018 #include "../IterationData.h"
00019
00020
00021
00022
00023
00024 class TextIterationVisualizer
00025 {
00026 public:
00027
00029 typedef std::auto_ptr<const TextIterationVisualizer>(*Creator)();
00030
00031
00032
00035 TextIterationVisualizer(void);
00036
00037
00040 virtual ~TextIterationVisualizer(void);
00041
00042
00043
00044
00045
00046
00057 virtual void Print(wxTextCtrl* pTargetCtrl,
00058 const IterationData& iterationData,
00059 const FunctionBase& function,
00060 bool highlight) const = 0;
00061
00062
00063
00064
00065
00066 protected:
00067
00068 wxString PrintMatrix(const Matrix& matrix) const;
00069
00070 wxString PrintMatrix(const Matrix& matrix,
00071 const wxString& text) const;
00072
00073
00074 wxString PrintDirectionMatrix(wxTextCtrl* pTargetCtrl,
00075 const SquareMatrix& matrix,
00076 bool highlight)
00077 const;
00078
00079 wxString PrintDirectionMatrix(wxTextCtrl* pTargetCtrl,
00080 const SquareMatrix& matrix,
00081 const wxString& text,
00082 bool highlight)
00083 const;
00084
00085 wxString PrintTwoColumnMatrix(wxTextCtrl* pTargetCtrl,
00086 const SquareMatrix& matrix,
00087 const wxTextAttr& firstColumnAttr,
00088 const wxTextAttr& secondColumnAttr,
00089 bool highlight) const;
00090
00091 wxString PrintTwoColumnMatrix(wxTextCtrl* pTargetCtrl,
00092 const SquareMatrix& matrix,
00093 const wxTextAttr& firstColumnAttr,
00094 const wxTextAttr& secondColumnAttr,
00095 const wxString& text,
00096 bool highlight) const;
00097
00098 void Flush(wxTextCtrl* pTargetCtrl,
00099 wxString& text,
00100 bool use = true) const;
00101
00102
00103 void SetAttribute(wxTextCtrl* pTargetCtrl,
00104 const wxTextAttr& attribute,
00105 bool use) const;
00106
00107 void SetAttributeAndFlush(wxTextCtrl* pTargetCtrl,
00108 wxString& text,
00109 const wxTextAttr& attribute,
00110 bool use) const;
00111
00112 private:
00113 };
00114
00115
00116
00117
00118
00119
00120
00121 #endif // _TextIterationVisualizer_h