summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FL/Fl_Terminal.H7
-rw-r--r--src/Fl_Terminal.cxx10
2 files changed, 15 insertions, 2 deletions
diff --git a/FL/Fl_Terminal.H b/FL/Fl_Terminal.H
index 1c8187b12..e012c061f 100644
--- a/FL/Fl_Terminal.H
+++ b/FL/Fl_Terminal.H
@@ -417,18 +417,20 @@ protected:
int charwidth_; // width of a fixed width ASCII character
public:
CharStyle(bool fontsize_defer);
+ uchar attrib(void) const { return attrib_; }
+ uchar charflags(void) const { return charflags_; }
Fl_Color fgcolor(void) const;
Fl_Color bgcolor(void) const;
Fl_Color defaultfgcolor(void) const { return defaultfgcolor_; }
Fl_Color defaultbgcolor(void) const { return defaultbgcolor_; }
- uchar attrib(void) const { return attrib_; }
Fl_Font fontface(void) const { return fontface_; }
Fl_Fontsize fontsize(void) const { return fontsize_; }
int fontheight(void) const { return fontheight_; }
int fontdescent(void) const { return fontdescent_; }
int charwidth(void) const { return charwidth_; }
uchar colorbits_only(uchar inflags) const;
- void attrib(uchar val) { attrib_ = val; }
+ void attrib(uchar val) { attrib_ = val; }
+ void charflags(uchar val) { charflags_ = val; }
void set_charflag(uchar val) { charflags_ |= val; }
void clr_charflag(uchar val) { charflags_ &= ~val; }
void fgcolor_uchar(uchar val);
@@ -1092,6 +1094,7 @@ public:
Fl_Color selectionbgcolor(void) const { return select_.selectionbgcolor(); }
// API: Text attrib
void textattrib(uchar val);
+ uchar textattrib() const;
// API: Redraw style/rate
RedrawStyle redraw_style(void) const;
void redraw_style(RedrawStyle val);
diff --git a/src/Fl_Terminal.cxx b/src/Fl_Terminal.cxx
index 2b53c4a77..b4266b8fb 100644
--- a/src/Fl_Terminal.cxx
+++ b/src/Fl_Terminal.cxx
@@ -1634,6 +1634,16 @@ void Fl_Terminal::textattrib(uchar val) {
}
/**
+ Get text attribute bits (underline, inverse, etc).
+ This is the default attribute used for all newly printed text.
+
+ \see textattrib(uchar), Fl_Terminal::Attrib
+*/
+uchar Fl_Terminal::textattrib() const {
+ return current_style_->attrib();
+}
+
+/**
Convert fltk window X coord to column 'gcol' on specified global 'grow'
\returns
- 1 if 'gcol' was found