diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2010-11-27 20:49:27 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2010-11-27 20:49:27 +0000 |
| commit | 1a793cdbc31f9fedaf282b8a348851b412e662f1 (patch) | |
| tree | 8cd6f27e578cb08d4b78162fe32e8cd252e1cd89 /FL/Fl_Text_Display.H | |
| parent | c6e46fed45d803243805975ea3f2c5f73e84654f (diff) | |
Tab is now alway 8 characters wide.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7896 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL/Fl_Text_Display.H')
| -rw-r--r-- | FL/Fl_Text_Display.H | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/FL/Fl_Text_Display.H b/FL/Fl_Text_Display.H index 0812fe52a..ae5356c00 100644 --- a/FL/Fl_Text_Display.H +++ b/FL/Fl_Text_Display.H @@ -287,7 +287,7 @@ public: \param x number of pixels form the left margin \return an approximate column number based on the main font */ - double x_to_col(double y); + double x_to_col(double y) const; /** Convert a column number into an x pixel position. @@ -295,7 +295,7 @@ public: \return number of pixels form the left margin to the left of an average sized character */ - double col_to_x(double col); + double col_to_x(double col) const; protected: // Most (all?) of this stuff should only be called from resize() or @@ -445,7 +445,10 @@ protected: int mModifyingTabDistance; /* Whether tab distance is being modified */ - double mColumnScale; /* Width in pixels of an average character */ + mutable double mColumnScale; /* Width in pixels of an average character. This + value is calculated as needed (lazy eval); it + needs to be mutable so that it can be calculated + within a method marked as "const" */ Fl_Color mCursor_color; |
