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 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
|
/*
Aeskulap - DICOM image viewer and network client
Copyright (C) 2005 Alexander Pipelka
This file is part of Aeskulap.
Aeskulap is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
Aeskulap 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with Aeskulap; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Alexander Pipelka
pipelka@teleweb.at
Last Update: $Author: braindead $
Update Date: $Date: 2006/03/16 15:11:19 $
Source File: $Source: /cvsroot/aeskulap/aeskulap/widgets/adisplay.h,v $
CVS/RCS Revision: $Revision: 1.8 $
Status: $State: Exp $
*/
#ifndef AESKULAP_DISPLAY_H
#define AESKULAP_DISPLAY_H
#include "asimpledisplay.h"
namespace Aeskulap {
class Display : public SimpleDisplay {
public:
Display();
Display(const Glib::RefPtr<DisplayParameters>& params);
~Display();
void enable_mouse_functions(bool enable);
void set_selected(bool selected);
bool get_selected();
void draw_point(const ImagePool::Instance::Point& p);
void draw_cross(const ImagePool::Instance::Point& p);
void draw_line(const ImagePool::Instance::Point& p0, const ImagePool::Instance::Point& p1);
Gdk::Color m_colorSeriesSelected;
Gdk::Color m_colorReferenceCurrent;
Gdk::Color m_colorReference;
Gdk::Color m_colorSelected;
Gdk::Color m_colorFrame;
Gdk::Color m_colorText;
sigc::signal< void, int > signal_selected;
sigc::signal< void, int, bool > signal_changed;
sigc::signal<void, Display*, const Glib::RefPtr<Gdk::Window>&, const Glib::RefPtr<Gdk::GC>&> signal_draw;
sigc::signal<void, GdkEventButton*> signal_popup;
sigc::signal<void, GdkEventMotion*> signal_motion;
sigc::signal<void, GdkEventButton*, bool> signal_button;
sigc::signal<void, int> signal_locate;
sigc::signal<void, Display*> signal_doubleclick;
protected:
void on_realize();
bool on_expose_event(GdkEventExpose* event);
bool on_button_press_event(GdkEventButton* button);
bool on_button_release_event(GdkEventButton* button);
bool on_motion_notify_event(GdkEventMotion* event);
virtual void bitstretch(bool smooth = false);
void draw_ruler_v();
void draw_ruler_h();
void set_window_palette(gdouble x, gdouble y);
// drag parameters
bool m_drag_active;
guint m_drag_button;
gdouble m_drag_start_x;
gdouble m_drag_start_y;
WindowLevel m_drag_window;
Glib::RefPtr<Pango::Layout> m_layoutR;
Glib::RefPtr<Pango::Layout> m_layoutL;
Glib::RefPtr<Pango::Layout> m_layoutB;
Pango::FontDescription m_fntdesc;
bool m_changed;
Gdk::Cursor* m_cursor_pan;
Gdk::Cursor* m_cursor_windowlevel;
Gdk::Cursor* m_cursor_zoom;
Gdk::Cursor* m_cursor_locate;
bool m_mouse_functions;
};
} //namespace Aeskulap
#endif // AESKULAP_DISPLAY_H
|