From 28c0d4ffa1ccd9828f00be1c96405484b5e5d681 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Mon, 6 Aug 2001 03:17:43 +0000 Subject: 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 --- src/Fl_Menu.cxx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/Fl_Menu.cxx') 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 $". // -- cgit v1.2.3