/*------------------------------------------------------------------------------
 src/lib/djWidget/djMenuWidget.h

 Copyright (c) 2004-2006 Darby Johnston.
 All rights reserved.
 Use is subject to license terms.
------------------------------------------------------------------------------*/

#ifndef DJ_MENU_WIDGET_H
#define DJ_MENU_WIDGET_H
#include <djWidget.h>
#include <FL/Fl_Menu_Bar.H>

namespace dj {

class _MenuItem;

class MenuItems {
public:

  ~MenuItems();
  
  int add(
    const Str & label, int shortcut,
    Fl_Callback * callback, void * data,
    int flags = 0
  );
  void end();
  void del();
  
  void set(Fl_Menu_ *);
  
private:

  List<_MenuItem *> _itemList;
};

// Menubar widget.
//
class MenubarWidget : public Fl_Menu_Bar, public WidgetBase {
public:

  MenubarWidget();
  
  // Layout.
  //
  const Vec2i sizeHint() const;
  void resize(int, int, int, int);
  int visible() const;
};

}

#endif
