1 //####COPYRIGHTBEGIN####
3 // ----------------------------------------------------------------------------
4 // Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
6 // This program is part of the eCos host tools.
8 // This program is free software; you can redistribute it and/or modify it
9 // under the terms of the GNU General Public License as published by the Free
10 // Software Foundation; either version 2 of the License, or (at your option)
13 // This program is distributed in the hope that it will be useful, but WITHOUT
14 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
18 // You should have received a copy of the GNU General Public License along with
19 // this program; if not, write to the Free Software Foundation, Inc.,
20 // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 // ----------------------------------------------------------------------------
24 //####COPYRIGHTEND####
27 //===========================================================================
28 //#####DESCRIPTIONBEGIN####
31 // Contact(s): julians
35 // Description: Header file for ecMemoryLayoutWindow
42 //####DESCRIPTIONEND####
44 //===========================================================================
46 #ifndef _ECOS_MLTWIN_H_
47 #define _ECOS_MLTWIN_H_
50 #pragma interface "mltwin.h"
57 typedef struct tagREGIONRECT
59 std::list <mem_region>::iterator Region;
64 typedef struct tagSECTIONRECT
66 std::list <mem_section_view>::iterator SectionView;
73 class ecMemoryLayoutWindow : public wxScrolledWindow
77 ecMemoryLayoutWindow(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style);
78 ~ecMemoryLayoutWindow();
82 //void OnPaint(wxPaintEvent& event);
83 void OnMouseEvent(wxMouseEvent& event);
84 void OnPaint(wxPaintEvent& event);
85 void OnSize(wxSizeEvent& event);
86 void OnProperties(wxCommandEvent& event);
92 void DrawRegion (wxDC& dc, int uRegion, int uUnitCount, int uPixelsPerUnit, std::list <mem_region>::iterator region);
93 SECTIONRECT * SectionHitTest (wxPoint pntTest);
94 REGIONRECT * RegionHitTest (wxPoint pntTest);
97 void CalcUnitCountMax ();
101 wxMenu* GetPropertiesMenu() const { return m_propertiesMenu; }
104 wxMenu* m_propertiesMenu;
106 wxList m_listSectionRect;
107 wxList m_listRegionRect;
110 std::list <mem_section_view>::iterator m_sviSelectedSectionView;
111 std::list <mem_region>::iterator m_riSelectedRegion;
114 int m_uViewWidth, m_uClientWidth;
116 wxRect m_rectSelectedItem;
119 DECLARE_EVENT_TABLE()
120 DECLARE_CLASS(ecMemoryLayoutWindow)