Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

file_listbox.H

Go to the documentation of this file.
00001 #ifndef _FILE_LISTBOX_H_IS_INCLUDED_
00002 #define _FILE_LISTBOX_H_IS_INCLUDED_
00003 #include "std/support.H"
00004 /*****************************************************************
00005  * FileListbox
00006  *****************************************************************/
00007 class GLUI;
00008 class GLUI_Listbox;
00009 class FileListbox {
00010  public:
00011    // Callbacks to application provided to GLUI widgets
00012    static void listbox_cb(int id);
00013    static void set_cb    (int id);
00014    static void hide_cb   (int id);
00015 
00016  protected:
00017    GLUI*              _glui;   
00018 
00019    GLUI_Listbox*      _listbox;
00020    int                _selected;
00021    bool               _shown;
00022    str_list           _files;
00023 
00024    static ARRAY<FileListbox *> _file_list_boxes;
00025 
00026    //******** MEMBERS ********
00027    virtual void button_press_cb() = 0;
00028 
00029  public:
00030    //******** MANAGERS ********
00031    FileListbox(Cstr_ptr &label, Cstr_ptr &listbox_name, Cstr_ptr &button_name);
00032 
00033    virtual ~FileListbox() {}
00034 
00035    void toggle();
00036    void show();
00037    void hide();
00038 
00039    // If extention is provided, it should be like ".png".  It must
00040    // be four characters long, and include the dot!  Files lacking
00041    // this extension are ignored.
00042    static void fill_listbox(GLUI_Listbox *listbox, str_list &files,
00043                             Cstr_ptr &full_path, Cstr_ptr &save_path,
00044                             const char *extension=0);
00045 
00046  protected:
00047 
00048    void init(Cstr_ptr &label, Cstr_ptr &listbox_name, Cstr_ptr &button_name);
00049 };
00050 
00051 #endif // _FILE_LISTBOX_H_IS_INCLUDED_
00052 
00053 /* end of file paper_ui.H */

Generated on Mon Sep 18 11:39:29 2006 for jot by  doxygen 1.4.4