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

Fl_ListView_Header.h

00001 #ifndef _FL_LISTVIEW_HEADER_H_
00002 #define _FL_LISTVIEW_HEADER_H_
00003 
00004 #include "Fl_Image.h"
00005 #include "Fl_Ptr_List.h"
00006 
00007 class Fl_ListView;
00008 
00012 class Fl_ListView_Header : public Fl_Widget
00013 {
00014 public:
00015     static Fl_Named_Style* default_style;
00016 
00017     Fl_ListView_Header(Fl_ListView *parent);
00018     virtual ~Fl_ListView_Header();
00019 
00020     void show();
00021     void hide();
00022 
00023     virtual void draw(int col, int width, int height);
00024     virtual void draw() { Fl_Widget::draw(); }
00025     virtual int handle(int col, int event);
00026     virtual int handle(int event) { return Fl_Widget::handle(event); }
00027 
00028     bool capture_events() const { return (m_capture>=0); }
00029 
00030     void parent(Fl_ListView *p) { Fl_Widget::parent((Fl_Group*)p); }
00031     Fl_ListView *parent() const { return (Fl_ListView *)Fl_Widget::parent(); }
00032 
00034     // Compatibility section
00035 
00036     void clear();
00037 
00038     void add_column(const char *name, int w=-1, Fl_Variant_Type column_type=VAR_STRING);
00039     void add_column(const Fl_String &name, int w=-1, Fl_Variant_Type column_type=VAR_STRING);
00040 
00041     void columns(int count);
00042     unsigned columns() const;
00043 
00044     int column_width(int col) const;
00045     void column_width(int col, int w);
00046 
00047     Fl_Variant_Type column_type(int col) const;
00048     void column_type(int col, Fl_Variant_Type w);
00049 
00050     Fl_Flags column_flags(int col, int f);
00051     Fl_Flags column_flags(int col) const;
00052     Fl_Flags column_set_flag(int col, int f);
00053     Fl_Flags column_clear_flag(int col, int f);
00054     Fl_Flags column_invert_flag(int col, int f);
00055 
00056     const Fl_String &column_label() const;
00057     const Fl_String &column_label(int col) const;
00058 
00059     void column_label(int col, const char *text);
00060     void column_label(int col, const Fl_String &text);
00061     void column_copy_label(int col, const char *txt);
00062 
00063     Fl_Font column_label_font(int col) const;
00064     int column_label_size(int col) const;
00065     Fl_Color column_label_color(int col) const;
00066 
00067     void column_label_size(int col, int size);
00068     void column_label_font(int col, Fl_Font font);
00069     void column_label_color(int col, Fl_Color color);
00070 
00071     void column_image(int col, Fl_Image *im);
00072     void column_image(int col, Fl_Image &im);
00073     Fl_Image *column_image(int col);
00074     const Fl_Image *column_image(int col) const;
00075 
00076 protected:
00077     void set_capture(int col) { m_capture = col; }
00078     int get_capture() const { return m_capture; }
00079 
00080 private:
00081     int m_capture;
00082 };
00083 
00084 #endif

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