Flu_Combo_List.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. // $Id: Flu_Combo_List.h,v 1.6 2004/03/24 02:49:00 jbryan Exp $
  2. /***************************************************************
  3. * FLU - FLTK Utility Widgets
  4. * Copyright (C) 2002 Ohio Supercomputer Center, Ohio State University
  5. *
  6. * This file and its content is protected by a software license.
  7. * You should have received a copy of this license with this file.
  8. * If not, please contact the Ohio Supercomputer Center immediately:
  9. * Attn: Jason Bryan Re: FLU 1224 Kinnear Rd, Columbus, Ohio 43212
  10. *
  11. ***************************************************************/
  12. #ifndef _FLU_COMBO_LIST_H
  13. #define _FLU_COMBO_LIST_H
  14. #include <FL/Fl_Hold_Browser.H>
  15. #include "FLU/Flu_Combo_Box.h"
  16. //! Just like the Fl_Choice widget except the input area is editable
  17. class FLU_EXPORT Flu_Combo_List : public Flu_Combo_Box
  18. {
  19. public:
  20. //! Normal FLTK widget constructor
  21. Flu_Combo_List( int x, int y, int w, int h, const char *l = 0 );
  22. //! Default destructor
  23. ~Flu_Combo_List();
  24. //! Publicly exposed list widget (instance of Fl_Hold_Browser)
  25. Fl_Hold_Browser list;
  26. protected:
  27. bool _value( const char *v );
  28. const char* _next();
  29. const char* _previous();
  30. void _hilight( int x, int y );
  31. inline static void _cb( Fl_Widget *w, void *arg )
  32. { ((Flu_Combo_List*)arg)->cb(); }
  33. void cb();
  34. };
  35. #endif