diff options
| author | Bill Spitzak <spitzak@gmail.com> | 1999-02-25 19:09:11 +0000 |
|---|---|---|
| committer | Bill Spitzak <spitzak@gmail.com> | 1999-02-25 19:09:11 +0000 |
| commit | 82877b2eb6e29361e682a4a86144ec1daa046a5e (patch) | |
| tree | 10ffe7f54e42c6d93294c5f051954c8158f2c086 | |
| parent | 38d8473088e02d4afdac847d08c5fbc7b79fcdcf (diff) | |
Fix for Curtis so that the height of a title of a popup menu is not
affected by the height of the Fl_Menu_Button.
git-svn-id: file:///fltk/svn/fltk/trunk@340 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | documentation/index.html | 2 | ||||
| -rw-r--r-- | src/Fl_Menu.cxx | 16 | ||||
| -rw-r--r-- | test/menubar.cxx | 5 |
3 files changed, 12 insertions, 11 deletions
diff --git a/documentation/index.html b/documentation/index.html index f5fe6bc97..a433799e9 100644 --- a/documentation/index.html +++ b/documentation/index.html @@ -60,7 +60,7 @@ Widgets</A></B> <UL> <LI><A HREF=fluid.html#widget_attributes>Widget Attributes</A></LI> <LI><A HREF=fluid.html#widget_attributes>Selecting Moving Widgets</A></LI> -<LI><A HREF=drawing.html#images>Image Labels</A></LI> +<LI><A HREF=fluid.html#images>Image Labels</A></LI> </UL> <B><A HREF=opengl.html#opengl>9 - Using OpenGL</A></B> <BR> diff --git a/src/Fl_Menu.cxx b/src/Fl_Menu.cxx index 9b14afdd4..4758b8364 100644 --- a/src/Fl_Menu.cxx +++ b/src/Fl_Menu.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Menu.cxx,v 1.16 1999/02/19 15:34:08 mike Exp $" +// "$Id: Fl_Menu.cxx,v 1.17 1999/02/25 19:09:10 bill Exp $" // // Menu code for the Fast Light Tool Kit (FLTK). // @@ -92,7 +92,7 @@ public: const Fl_Menu_Item* menu; menuwindow(const Fl_Menu_Item* m, int X, int Y, int W, int H, const Fl_Menu_Item* picked, const Fl_Menu_Item* title, - int menubar = 0); + int menubar = 0, int menubar_title = 0); ~menuwindow(); void set_selected(int); int find_selected(int mx, int my); @@ -191,7 +191,7 @@ menutitle::menutitle(int X, int Y, int W, int H, const Fl_Menu_Item* L) : menuwindow::menuwindow(const Fl_Menu_Item* m, int X, int Y, int Wp, int Hp, const Fl_Menu_Item* picked, const Fl_Menu_Item* t, - int menubar) + int menubar, int menubar_title) : Fl_Menu_Window(X, Y, Wp, Hp, 0) { end(); @@ -252,8 +252,7 @@ menuwindow::menuwindow(const Fl_Menu_Item* m, int X, int Y, int Wp, int Hp, if (m) y(Y-1); else {y(Y-3); w(1); h(1);} if (t) { - int ht = button && button->h() <= 100 ? button->h()-6 - : Htitle+2*BW+3; + int ht = menubar_title ? button->h()-6 : Htitle+2*BW+3; title = new menutitle(X, Y-ht-3, Wtitle, ht, t); } else title = 0; @@ -655,7 +654,8 @@ const Fl_Menu_Item* Fl_Menu_Item::pulldown( } else { // delete all the old menus and create new one: while (p.nummenus > p.menu_number+1) delete p.p[--p.nummenus]; - p.p[p.nummenus++]= new menuwindow(menutable,nX,nY,title?1:0,0,0,title); + p.p[p.nummenus++]= new menuwindow(menutable, nX, nY, + title?1:0, 0, 0, title, 0, menubar); } } else { // !m->submenu(): while (p.nummenus > p.menu_number+1) delete p.p[--p.nummenus]; @@ -664,7 +664,7 @@ const Fl_Menu_Item* Fl_Menu_Item::pulldown( fakemenu = new menuwindow(0, cw.x()+cw.titlex(p.item_number), cw.y()+cw.h(), 0, 0, - 0, m); + 0, m, 0, 1); fakemenu->title->show(); } } @@ -710,5 +710,5 @@ const Fl_Menu_Item* Fl_Menu_Item::test_shortcut() const { } // -// End of "$Id: Fl_Menu.cxx,v 1.16 1999/02/19 15:34:08 mike Exp $". +// End of "$Id: Fl_Menu.cxx,v 1.17 1999/02/25 19:09:10 bill Exp $". // diff --git a/test/menubar.cxx b/test/menubar.cxx index 0d9fe6ec9..4ec2f97ed 100644 --- a/test/menubar.cxx +++ b/test/menubar.cxx @@ -1,5 +1,5 @@ // -// "$Id: menubar.cxx,v 1.5 1999/01/07 19:17:58 mike Exp $" +// "$Id: menubar.cxx,v 1.6 1999/02/25 19:09:11 bill Exp $" // // Menubar test program for the Fast Light Tool Kit (FLTK). // @@ -207,11 +207,12 @@ int main(int argc, char **argv) { Fl_Toggle_Button t(250,50,150,25,"MicroSoft Style"); t.callback(button_cb); window.resizable(&mb); + window.size_range(300,20); window.end(); window.show(argc, argv); return Fl::run(); } // -// End of "$Id: menubar.cxx,v 1.5 1999/01/07 19:17:58 mike Exp $". +// End of "$Id: menubar.cxx,v 1.6 1999/02/25 19:09:11 bill Exp $". // |
