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
28
namespace
firevision {
29
class
Colormap;
30
}
31
32
class
ColormapViewerWidget
33
{
34
public
:
35
ColormapViewerWidget
();
36
~ColormapViewerWidget
();
37
38
void
set_colormap
(
firevision::Colormap
*cm);
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
44
private
:
45
bool
on_layer_selected(Gtk::ScrollType scroll,
double
value);
46
47
firevision::Colormap
*m_cm;
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_ */
ColormapViewerWidget::ColormapViewerWidget
ColormapViewerWidget()
Constructor.
Definition:
colormap_viewer_widget.cpp:37
ColormapViewerWidget::set_layer_selector
void set_layer_selector(Gtk::Scale *scl)
Set the selector widget to choose the layer of the colormap which gets rendered.
Definition:
colormap_viewer_widget.cpp:80
ColormapViewerWidget::draw
void draw(unsigned int layer=0)
Draw the colormap.
Definition:
colormap_viewer_widget.cpp:111
ColormapViewerWidget
Select a layer from a colormap and render it to a Gtk::Image.
Definition:
colormap_viewer_widget.h:33
ColormapViewerWidget::~ColormapViewerWidget
~ColormapViewerWidget()
Destructor.
Definition:
colormap_viewer_widget.cpp:46
ColormapViewerWidget::set_colormap
void set_colormap(firevision::Colormap *cm)
Set the colormap to display.
Definition:
colormap_viewer_widget.cpp:55
ColormapViewerWidget::set_colormap_img
void set_colormap_img(Gtk::Image *img)
Set the image to render into.
Definition:
colormap_viewer_widget.cpp:71
firevision::Colormap
Colormap interface.
Definition:
colormap.h:37
src
tools
vision
firestation
colormap_viewer_widget.h
Generated by
1.8.20