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

Fl_Input_Browser.h

00001 /*
00002  * $Id: Fl_Input_Browser.h,v 1.8 2003/03/31 04:54:05 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_INPUT_BROWSER_H_
00023 #define _FL_INPUT_BROWSER_H_
00024 
00025 #include "Fl_Input.h"
00026 #include "Fl_Menu_.h"
00027 #include "Fl_Menu_Window.h"
00028 
00029 class ComboBrowser;
00030 class ComboWindow;
00031 
00033 class Fl_Input_Browser : public Fl_Menu_ {
00034 public:
00035     static Fl_Named_Style* default_style;
00036     enum { // values for type()
00037         NORMAL = 0,
00038         NONEDITABLE = 1,
00039         INDENTED = 2,
00040         NONEDITABLE_INDENTED = 3
00041     };
00042 
00044     Fl_Input_Browser(int,int,int,int,const char * = 0);
00045 
00047     Fl_Input_Browser(const char* l = 0,int layout_size=30,Fl_Align layout_al=FL_ALIGN_TOP,int label_w=100);
00048 
00050     virtual ~Fl_Input_Browser();
00051 
00052     void popup();
00053     void hide_popup();
00054     virtual int popup(int x, int y, int w, int h) { Fl_Input_Browser::popup(); return Fl_Menu_::popup(x,y,w,h); }
00055 
00056     virtual void draw();
00057     virtual int handle(int);
00058     virtual void preferred_size(int& w,int &h) const;
00059 
00060     void clear() { Fl_Menu_::clear(); item(0); }
00061 
00062     void value(const char *v) { input()->value(v); }
00063     const char *value() { return input()->value(); }
00064 
00065     Fl_Input *input() { return &m_input; }
00066 
00067 private:
00068     Fl_Input m_input;
00069 
00070     ComboWindow *win;
00071     ComboBrowser *list;
00072 
00073     friend class ComboWindow;
00074     friend class ComboBrowser;
00075 
00076     bool over_now, over_last;
00077 
00078     void ctor_init();
00079     static void input_cb(Fl_Input *in, Fl_Input_Browser *d);
00080 };
00081 
00082 #endif

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