3 This file is part of libmspgltk
4 Copyright © 2008 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
8 #ifndef MSP_GLTK_TABLE_H_
9 #define MSP_GLTK_TABLE_H_
18 class Table: public Widget
21 class Loader: public Widget::Loader
26 void cell_text(unsigned, unsigned, const std::string &);
27 void column_width(unsigned, unsigned);
28 void columns(unsigned);
35 std::vector<std::string> data;
36 std::vector<unsigned> col_w;
39 Table(const Resources &);
41 void set_rows(unsigned);
42 void set_columns(unsigned);
43 unsigned get_rows() const { return rows; }
44 unsigned get_columns() const { return columns; }
46 void set_column_width(unsigned, unsigned);
47 void set_cell_text(unsigned, unsigned, const std::string &);
49 virtual const char *get_class() const { return "table"; }
51 virtual void render_special(const Part &) const;
52 virtual void on_style_change();