Fawkes API Fawkes Development Version
colormap_viewer_widget.h
1
2/***************************************************************************
3 * colormap_viewer_widget.h - Viwer widget for colormaps
4 *
5 * Created: Thu Mar 20 19:03:02 2008
6 * Copyright 2008 Daniel Beck
7 *
8 ****************************************************************************/
9
10/* This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Library General Public License for more details.
19 *
20 * Read the full text in the LICENSE.GPL file in the doc directory.
21 */
22
23#ifndef _FIREVISION_TOOLS_FIRESTATION_COLORMAP_VIEWER_WIDGET_H_
24#define _FIREVISION_TOOLS_FIRESTATION_COLORMAP_VIEWER_WIDGET_H_
25
26#include <gtkmm.h>
27
28namespace firevision {
29class Colormap;
30}
31
33{
34public:
37
39 void set_colormap_img(Gtk::Image *img);
40 void set_layer_selector(Gtk::Scale *scl);
41
42 void draw(unsigned int layer = 0);
43
44private:
45 bool on_layer_selected(Gtk::ScrollType scroll, double value);
46
48
49 Gtk::Image * m_img_colormap;
50 Gtk::Scale * m_scl_layer_selector;
51 unsigned char *m_colormap_img_buf;
52};
53
54#endif /* #define _FIREVISION_TOOLS_FIRESTATION_COLORMAP_VIEWER_WIDGET_H_ */
Select a layer from a colormap and render it to a Gtk::Image.
void draw(unsigned int layer=0)
Draw the colormap.
void set_colormap_img(Gtk::Image *img)
Set the image to render into.
void set_colormap(firevision::Colormap *cm)
Set the colormap to display.
void set_layer_selector(Gtk::Scale *scl)
Set the selector widget to choose the layer of the colormap which gets rendered.
Colormap interface.
Definition: colormap.h:37