Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

Fl_Menu_Bar.h

00001 /*
00002  * $Id: Fl_Menu_Bar.h,v 1.6 2003/05/02 00:14:56 parshin Exp $
00003  *
00004  * Extended Fast Light Toolkit (EFLTK)
00005  * Copyright (C) 2002-2003 by EDE-Team
00006  * WWW: http://www.sourceforge.net/projects/ede
00007  *
00008  * Fast Light Toolkit (FLTK)
00009  * Copyright (C) 1998-2003 by Bill Spitzak and others.
00010  * WWW: http://www.fltk.org
00011  *
00012  * This library is distributed under the GNU LIBRARY GENERAL PUBLIC LICENSE
00013  * version 2. See COPYING for details.
00014  *
00015  * Author : Mikko Lahteenmaki
00016  * Email  : mikko@fltk.net
00017  *
00018  * Please report all bugs and problems to "efltk-bugs@fltk.net"
00019  *
00020  */
00021 
00022 #ifndef _FL_MENU_BAR_H_
00023 #define _FL_MENU_BAR_H_
00024 
00025 #include "Fl_Widget.h"
00026 #include "Fl_Menu_.h"
00027 #include "Fl_Menu_Window.h"
00028 
00030 class Fl_Menu_Bar : public Fl_Menu_ {
00031 public:
00032     static Fl_Named_Style* default_style;
00033 
00035     Fl_Menu_Bar(int x,int y,int w,int h,const char *l=0);
00036 
00038     Fl_Menu_Bar(const char* l = 0,int layout_size=20,Fl_Align layout_al=FL_ALIGN_TOP,int label_w=-1);
00039 
00040     virtual int handle(int ev);
00041     virtual void layout();
00042     virtual void draw();
00043     virtual void preferred_size(int& w, int& h) const;
00044 
00045     int popup(int X, int Y, int W, int H);
00046 
00047     // This one is layouted to most right of the menubar (often help)
00048     void right_layout(Fl_Widget *w) { right_ = w; }
00049     Fl_Widget *right_layout() { return right_; }
00050 
00051     // If this is set to FALSE, then menubar won't layout to many lines when it's too small.
00052     void layout_menubar(bool val) { do_layout = val; }
00053     bool layout_menubar() { return do_layout; }
00054 
00055 private:
00056     Fl_Widget *right_;
00057 
00058     void ctor_init();    
00059 
00060     int highlight_, last_highlight_;
00061     int selected_, last_selected_;
00062     int lines;
00063 
00064     bool do_layout;
00065 };
00066 
00067 #endif

Generated on Thu Jul 31 15:33:44 2003 for eFLTK by doxygen1.2.15