00001 #ifndef _MatrixStyle_h
00002 #define _MatrixStyle_h
00003
00011 class MatrixStyle
00012 {
00013 public:
00014
00015
00018 MatrixStyle(unsigned width, unsigned height);
00023 MatrixStyle(const GeneralMatrix& matrix);
00024
00025
00026
00027
00028
00029
00030
00033 void SetStyle (const wxTextAttr& style);
00036 void SetStyle (unsigned x, unsigned y, const wxTextAttr& style);
00039 void SetRowStyle ( unsigned y, const wxTextAttr& style);
00042 void SetColumnStyle (unsigned x, const wxTextAttr& style);
00045 void SetColumnStyle (unsigned first, unsigned last,
00046 const wxTextAttr& style);
00049 void AddStyle (const wxTextAttr& style);
00052 void AddStyle (unsigned x, unsigned y, const wxTextAttr& style);
00055 void AddRowStyle ( unsigned y, const wxTextAttr& style);
00058 void AddColumnStyle (unsigned x, const wxTextAttr& style);
00061 void AddColumnStyle (unsigned first, unsigned last,
00062 const wxTextAttr& style);
00063
00073 static MatrixStyle Merge(const MatrixStyle& base,
00074 const MatrixStyle& overlaid);
00075
00079 void Reset(const GeneralMatrix& matrix);
00080
00081
00082 const wxTextAttr& Style(unsigned x, unsigned y) const;
00083 unsigned ColumnCount() const;
00084 unsigned RowCount() const;
00085
00086 private:
00087 void Init(unsigned width, unsigned height);
00088
00089 typedef vector<wxTextAttr> StyleRow;
00090 typedef vector<StyleRow> StyleArray;
00091
00092 StyleArray mStyles;
00093 };
00094
00095 #endif