Menu titles and buttons in the menubar can be images (allows it to be used as a toolbar)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1306 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
59c2b2dd31
commit
77d42ecdd3
@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: Fl_Menu_Bar.cxx,v 1.7.2.4 2000/07/30 00:31:44 spitzak Exp $"
|
||||
// "$Id: Fl_Menu_Bar.cxx,v 1.7.2.5 2000/09/23 08:21:52 spitzak Exp $"
|
||||
//
|
||||
// Menu bar widget for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@ -32,8 +32,9 @@ void Fl_Menu_Bar::draw() {
|
||||
const Fl_Menu_Item* m;
|
||||
int X = x()+6;
|
||||
for (m=menu(); m->text; m = m->next()) {
|
||||
m->draw(X, y(), 0, h(), this);
|
||||
X += m->measure(0,this) + 16;
|
||||
int W = m->measure(0,this) + 16;
|
||||
m->draw(X, y(), W, h(), this);
|
||||
X += W;
|
||||
}
|
||||
}
|
||||
|
||||
@ -60,5 +61,5 @@ int Fl_Menu_Bar::handle(int event) {
|
||||
}
|
||||
|
||||
//
|
||||
// End of "$Id: Fl_Menu_Bar.cxx,v 1.7.2.4 2000/07/30 00:31:44 spitzak Exp $".
|
||||
// End of "$Id: Fl_Menu_Bar.cxx,v 1.7.2.5 2000/09/23 08:21:52 spitzak Exp $".
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user