bufferlist.h

00001 /***************************************************************************
00002  *   Copyright (C) 2001 by Rick L. Vinyard, Jr.                            *
00003  *   rvinyard@cs.nmsu.edu                                                  *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU Lesser General Public License as        *
00007  *   published by the Free Software Foundation version 2.1.                *
00008  *                                                                         *
00009  *   This program is distributed in the hope that it will be useful,       *
00010  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00011  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00012  *   GNU General Public License for more details.                          *
00013  *                                                                         *
00014  *   You should have received a copy of the GNU Lesser General Public      *
00015  *   License along with this library; if not, write to the                 *
00016  *   Free Software Foundation, Inc.,                                       *
00017  *   51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA              *
00018  ***************************************************************************/
00019 #ifndef BITGTKBUFFERLIST_H
00020 #define BITGTKBUFFERLIST_H
00021 
00022 #include <gtkmm.h>
00023 #include <map>
00024 
00025 #include <bit/recordbuffer.h>
00026 
00027 namespace bitGtk {
00028 
00032   class BufferList : public Gtk::EventBox
00033     {
00034     public:
00035       BufferList();
00036 
00037       ~BufferList();
00038 
00039       void set_buffer(bit::RecordBuffer::pointer buffer);
00040 
00041       void enable_tooltips(bool b=true);
00042 
00043     protected:
00044       bit::RecordBuffer::pointer m_buffer;
00045       Gtk::Table* m_table;
00046       std::map< bit::FieldBase::pointer, Gtk::Label*> m_value_label;
00047       unsigned int m_value_label_left;
00048       Gtk::Tooltips m_tooltips;
00049 
00050       void on_record_changed();
00051       void on_field_value_changed( bit::FieldBuffer fieldbuffer );
00052       void set_field_value( bit::FieldBase::pointer field );
00053       void load_all_field_values();
00054       void load_all_field_values( bit::FieldBase::pointer );
00055 
00056       void create_table();
00057       void setup_table();
00058       unsigned int add_field_label(bit::FieldBase::pointer fb, unsigned int row=0, unsigned int depth=0);
00059       unsigned int add_field_value_label(bit::FieldBase::pointer fb, unsigned int row=0);
00060 
00061     };
00062 
00063 }
00064 
00065 #endif

Generated on Mon Mar 12 22:06:05 2007 by  doxygen 1.5.1