1 2 /////////////////////////////////////////////////////////// 3 // // 4 // SAGA // 5 // // 6 // System for Automated Geoscientific Analyses // 7 // // 8 // User Interface // 9 // // 10 // Program: SAGA // 11 // // 12 //-------------------------------------------------------// 13 // // 14 // VIEW_Histogram.h // 15 // // 16 // Copyright (C) 2005 by Olaf Conrad // 17 // // 18 //-------------------------------------------------------// 19 // // 20 // This file is part of 'SAGA - System for Automated // 21 // Geoscientific Analyses'. SAGA is free software; you // 22 // can redistribute it and/or modify it under the terms // 23 // of the GNU General Public License as published by the // 24 // Free Software Foundation, either version 2 of the // 25 // License, or (at your option) any later version. // 26 // // 27 // SAGA is distributed in the hope that it will be // 28 // useful, but WITHOUT ANY WARRANTY; without even the // 29 // implied warranty of MERCHANTABILITY or FITNESS FOR A // 30 // PARTICULAR PURPOSE. See the GNU General Public // 31 // License for more details. // 32 // // 33 // You should have received a copy of the GNU General // 34 // Public License along with this program; if not, see // 35 // <http://www.gnu.org/licenses/>. // 36 // // 37 //-------------------------------------------------------// 38 // // 39 // contact: Olaf Conrad // 40 // Institute of Geography // 41 // University of Goettingen // 42 // Goldschmidtstr. 5 // 43 // 37077 Goettingen // 44 // Germany // 45 // // 46 // e-mail: oconrad@saga-gis.org // 47 // // 48 /////////////////////////////////////////////////////////// 49 50 //--------------------------------------------------------- 51 #ifndef _HEADER_INCLUDED__SAGA_GUI__VIEW_Histogram_H 52 #define _HEADER_INCLUDED__SAGA_GUI__VIEW_Histogram_H 53 54 55 /////////////////////////////////////////////////////////// 56 // // 57 // // 58 // // 59 /////////////////////////////////////////////////////////// 60 61 //--------------------------------------------------------- 62 #include "view_base.h" 63 64 65 /////////////////////////////////////////////////////////// 66 // // 67 // // 68 // // 69 /////////////////////////////////////////////////////////// 70 71 //--------------------------------------------------------- 72 class CVIEW_Histogram : public CVIEW_Base 73 { 74 public: 75 CVIEW_Histogram(class CWKSP_Layer *pLayer); 76 77 static class wxToolBarBase * _Create_ToolBar (void); 78 static class wxMenu * _Create_Menu (void); 79 80 virtual void Do_Update (void); 81 82 virtual void On_Command_UI (wxUpdateUIEvent &event); 83 84 85 private: 86 87 bool m_bCumulative, m_bGaussian, m_bColored, m_bMouse_Down; 88 89 int m_XLabeling, m_Margin_Left, m_Margin_Bottom, m_Gaussian_Color, m_Gaussian_Size; 90 91 wxPoint m_Mouse_Down, m_Mouse_Move; 92 93 class CWKSP_Layer *m_pLayer; 94 95 96 void Draw (wxDC &dc, wxRect r); 97 void Draw_Histogram (wxDC &dc, wxRect r); 98 void Draw_Frame (wxDC &dc, wxRect r); 99 wxRect Draw_Get_rDiagram (wxRect r); 100 101 void On_Paint (wxPaintEvent &event); 102 void On_Size (wxSizeEvent &event); 103 104 void On_Mouse_Motion (wxMouseEvent &event); 105 void On_Mouse_LDown (wxMouseEvent &event); 106 void On_Mouse_LUp (wxMouseEvent &event); 107 void On_Mouse_RDown (wxMouseEvent &event); 108 109 void On_Properties (wxCommandEvent &event); 110 void On_Cumulative (wxCommandEvent &event); 111 void On_Gaussian (wxCommandEvent &event); 112 void On_Set_MinMax (wxCommandEvent &event); 113 void On_AsTable (wxCommandEvent &event); 114 void On_ToClipboard (wxCommandEvent &event); 115 116 117 //----------------------------------------------------- 118 DECLARE_CLASS(CVIEW_Histogram) 119 DECLARE_EVENT_TABLE() 120 121 }; 122 123 124 /////////////////////////////////////////////////////////// 125 // // 126 // // 127 // // 128 /////////////////////////////////////////////////////////// 129 130 //--------------------------------------------------------- 131 #endif // #ifndef _HEADER_INCLUDED__SAGA_GUI__VIEW_Histogram_H 132