From 90590eb8b5eb3c3e7e8f1bc2e451264461133831 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Sat, 5 Feb 2005 18:36:59 +0000 Subject: FLUID didn't use the label type constant names for menu items, causing them to be drawn using the normal label type (STR #668) fluid/Fl_Menu_Type.cxx: - Use FL_*_LABEL constants instead of numeric label types in menu items. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4011 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- CHANGES | 3 +++ fluid/Fl_Menu_Type.cxx | 19 +++++++++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/CHANGES b/CHANGES index d4bb43a3e..6b2df107a 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ CHANGES IN FLTK 1.1.7 + - FLUID didn't use the label type constant names for + menu items, causing them to be drawn using the normal + label type (STR #668) - Fl_File_Chooser was slow with large directories (STR #654) - FLUID didn't add xclass() calls to windows (STR #718) diff --git a/fluid/Fl_Menu_Type.cxx b/fluid/Fl_Menu_Type.cxx index cdfdb12d5..08d109916 100644 --- a/fluid/Fl_Menu_Type.cxx +++ b/fluid/Fl_Menu_Type.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Menu_Type.cxx,v 1.16.2.12.2.10 2004/11/21 14:53:48 easysw Exp $" +// "$Id$" // // Menu item code for the Fast Light Tool Kit (FLTK). // @@ -216,6 +216,17 @@ int Fl_Menu_Item_Type::flags() { } void Fl_Menu_Item_Type::write_item() { + static const char * const labeltypes[] = { + "FL_NORMAL_LABEL", + "FL_NO_LABEL", + "FL_SHADOW_LABEL", + "FL_ENGRAVED_LABEL", + "FL_EMBOSSED_LABEL", + "FL_MULTI_LABEL", + "FL_ICON_LABEL", + "FL_IMAGE_LABEL" + }; + write_c(" {"); if (image) write_c("0"); else if (label()) { @@ -254,8 +265,8 @@ void Fl_Menu_Item_Type::write_item() { write_c(" (void*)(%s),", user_data()); else write_c(" 0,"); - write_c(" %d, %d, %d, %d, %d", flags(), - o->labeltype(), o->labelfont(), o->labelsize(), o->labelcolor()); + write_c(" %d, %s, %d, %d, %d", flags(), + labeltypes[o->labeltype()], o->labelfont(), o->labelsize(), o->labelcolor()); write_c("},\n"); } @@ -468,5 +479,5 @@ void shortcut_in_cb(Shortcut_Button* i, void* v) { } // -// End of "$Id: Fl_Menu_Type.cxx,v 1.16.2.12.2.10 2004/11/21 14:53:48 easysw Exp $". +// End of "$Id$". // -- cgit v1.2.3