Flu_Combo_Tree.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. // $Id: Flu_Combo_Tree.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_TREE_H
  13. #define _FLU_COMBO_TREE_H
  14. #include "FLU/Flu_Combo_Box.h"
  15. #include "FLU/Flu_Tree_Browser.h"
  16. //! Just like the Fl_Choice widget except the input area is editable and it can display a tree instead of a list (using Flu_Tree_Browser)
  17. class FLU_EXPORT Flu_Combo_Tree : public Flu_Combo_Box
  18. {
  19. public:
  20. //! Normal FLTK widget constructor
  21. Flu_Combo_Tree( int x, int y, int w, int h, const char *l = 0 );
  22. //! Default destructor
  23. ~Flu_Combo_Tree();
  24. //! Publicly exposed tree widget (instance of Flu_Tree_Browser)
  25. Flu_Tree_Browser tree;
  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_Tree*)arg)->cb(); }
  33. void cb();
  34. };
  35. #endif