From b4adc20ef08257124a01499436f2b8b447adcb33 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sat, 9 Jan 2010 03:18:25 +0100 Subject: Use room list --- src/Gui/Renderer/RoomListRenderer.h | 53 +++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 src/Gui/Renderer/RoomListRenderer.h (limited to 'src/Gui/Renderer/RoomListRenderer.h') diff --git a/src/Gui/Renderer/RoomListRenderer.h b/src/Gui/Renderer/RoomListRenderer.h new file mode 100644 index 0000000..ee2ac9f --- /dev/null +++ b/src/Gui/Renderer/RoomListRenderer.h @@ -0,0 +1,53 @@ +/* + * RoomListRenderer.h + * + * Copyright (C) 2010 Matthias Schiffer + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by the + * Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License along + * with this program. If not, see . + */ + +#ifndef ZOOMEDIT_GUI_RENDERER_ROOMLISTRENDERER_H_ +#define ZOOMEDIT_GUI_RENDERER_ROOMLISTRENDERER_H_ + +#include + +namespace ZoomEdit { +namespace Gui { +namespace Renderer { + +class RoomListRenderer : public virtual Glib::ObjectBase, public Gtk::CellRenderer { + public: + RoomListRenderer() : Glib::ObjectBase(typeid(RoomListRenderer)), value(*this, "value") {} + + Glib::PropertyProxy property_value() { + return value.get_proxy(); + } + + protected: + virtual void get_size_vfunc(Gtk::Widget &widget, const Gdk::Rectangle *cell_area, + int *x_offset, int *y_offset, int *width, int *height) const; + + virtual void render_vfunc(const Glib::RefPtr &window, Gtk::Widget &widget, + const Gdk::Rectangle &background_area, const Gdk::Rectangle &cell_area, + const Gdk::Rectangle &expose_area, Gtk::CellRendererState flags); + + private: + Glib::Property value; +}; + +} +} +} + +#endif /* ZOOMEDIT_GUI_RENDERER_ROOMLISTRENDERER_H_ */ -- cgit v1.2.3