1
// Gmsh - Copyright (C) 1997-2009 C. Geuzaine, J.-F. Remacle
3
// See the LICENSE.txt file for license information. Please report all
4
// bugs and problems to <gmsh@geuz.org>.
6
#ifndef _COLORBAR_WINDOW_H
7
#define _COLORBAR_WINDOW_H
10
#include <FL/Fl_Window.H>
11
#include "ColorTable.h"
13
class colorbarWindow : public Fl_Window {
15
int font_height, marker_height, wedge_height;
17
double minval, maxval; // min and max data values
18
int wedge_y; // top coord of color wedge
19
int marker_y; // top coord of marker arrow
20
int label_y; // y coord of text labels
21
int help_flag; // if nonzero, print help message
22
int marker_pos; // position of marker as index into table
23
GmshColorTable *ct; // pointer to the color table (allocated in the view)
24
bool *viewchanged; // pointer to changed bit in view
26
int x_to_index(int x);
27
int index_to_x(int index);
28
int y_to_intensity(int y);
29
int intensity_to_y(int intensity);
30
void redraw_range(int a, int b);
35
colorbarWindow(int x, int y, int w, int h, const char *l=0);
36
void update(const char *name, double min, double max, GmshColorTable *ct,