diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2001-08-06 03:17:43 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2001-08-06 03:17:43 +0000 |
| commit | 28c0d4ffa1ccd9828f00be1c96405484b5e5d681 (patch) | |
| tree | 1d3b2b901ccbfdf6e50168f7ff51dd7954b50c3c /src/Fl_Menu.cxx | |
| parent | 7ebaf77cdcbcadb4706c87f1662730a4687caf20 (diff) | |
Symbols are now supported by main label drawing code - @@ to insert a
single @. Currently only 1 symbol per label, at the beginning or end of the
label string, with the remaining text (and image) getting formatted as
usual. The size of the symbol == lines * labelsize, unless there is
no text in which case the size == height of label area.
Fl_Menu_Item::draw() didn't clear the image field in the Fl_Label
structure.
Removed Fl::enable_symbols(), which is now the default.
Dropped FL_IMAGE_LABEL, FL_PIXMAP_LABEL, and FL_BITMAP_LABEL types,
which are no longer needed.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1561 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Menu.cxx')
| -rw-r--r-- | src/Fl_Menu.cxx | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/Fl_Menu.cxx b/src/Fl_Menu.cxx index 8a822e448..2e958dab9 100644 --- a/src/Fl_Menu.cxx +++ b/src/Fl_Menu.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Menu.cxx,v 1.18.2.12.2.1 2001/08/04 20:17:10 easysw Exp $" +// "$Id: Fl_Menu.cxx,v 1.18.2.12.2.2 2001/08/06 03:17:43 easysw Exp $" // // Menu code for the Fast Light Tool Kit (FLTK). // @@ -123,11 +123,13 @@ int Fl_Menu_Item::measure(int* hp, const Fl_Menu_* m) const { void Fl_Menu_Item::draw(int x, int y, int w, int h, const Fl_Menu_* m, int selected) const { Fl_Label l; - l.value = text; - l.type = labeltype_; - l.font = labelsize_ ? labelfont_ : uchar(m ? m->textfont() : FL_HELVETICA); - l.size = labelsize_ ? labelsize_ : m ? m->textsize() : FL_NORMAL_SIZE; - l.color = labelcolor_ ? labelcolor_ : m ? m->textcolor() : int(FL_BLACK); + l.value = text; + l.image = 0; + l.deimage = 0; + l.type = labeltype_; + l.font = labelsize_ ? labelfont_ : uchar(m ? m->textfont() : FL_HELVETICA); + l.size = labelsize_ ? labelsize_ : m ? m->textsize() : FL_NORMAL_SIZE; + l.color = labelcolor_ ? labelcolor_ : m ? m->textcolor() : int(FL_BLACK); if (!active()) l.color = inactive((Fl_Color)l.color); Fl_Color color = m ? m->color() : FL_GRAY; if (selected) { @@ -741,5 +743,5 @@ const Fl_Menu_Item* Fl_Menu_Item::test_shortcut() const { } // -// End of "$Id: Fl_Menu.cxx,v 1.18.2.12.2.1 2001/08/04 20:17:10 easysw Exp $". +// End of "$Id: Fl_Menu.cxx,v 1.18.2.12.2.2 2001/08/06 03:17:43 easysw Exp $". // |
