aboutsummaryrefslogtreecommitdiff
path: root/src/displaywindow.h
blob: 1520a1b1814a53aac3b6b771716209017b3d79cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/*
 * displaywindow.h
 *
 * Quick yet non-crappy HDF viewer
 *
 * (c) 2006-2010 Thomas White <taw@physics.org>
 *
 * Part of CrystFEL - crystallography with a FEL
 *
 */


#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#ifndef DISPLAYWINDOW_H
#define DISPLAYWINDOW_H

#include <gtk/gtk.h>


typedef struct {
	GtkWidget	*window;
	GtkWidget	*entry;
} BinningDialog;


typedef struct {
	GtkWidget	*window;
	GtkWidget	*entry;
} BoostIntDialog;


struct numberswindow {
	GtkWidget *window;
	GtkWidget *labels[17*17];
	unsigned int cx;
	unsigned int cy;
};


typedef struct {

	GtkWidget	*window;
	GtkWidget	*drawingarea;
	GtkUIManager	*ui;
	GtkActionGroup	*action_group;
	GdkPixbuf	*pixbuf;
	gulong		motion_callback;

	struct hdfile	*hdfile;
	struct image	*image;
	int		image_dirty;

	/* Dialog boxes */
	BinningDialog	*binning_dialog;
	BoostIntDialog	*boostint_dialog;
	struct numberswindow *numbers_window;

	int		width;
	int		height;		/* Size of the drawing area */
	int		binning;
	int		boostint;
	int		clean;		/* Whether or not to clean the image */

	int		show_col_scale;
	int		monochrome;
	GdkPixbuf	*col_scale;

} DisplayWindow;

/* Open an image display window showing the given filename, or NULL */
extern DisplayWindow *displaywindow_open(const char *filename,
                                         const char *peaks, int boost,
                                         int binning, int clean);


#endif	/* DISPLAYWINDOW_H */