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####
25 // shortdescrwin.cpp :
27 //===========================================================================
28 //#####DESCRIPTIONBEGIN####
31 // Contact(s): julians
33 // Version: $Id: shortdescrwin.cpp,v 1.4 2001/05/16 16:08:24 julians Exp $
35 // Description: Implementation file for ecShortDescriptionWindow
42 //####DESCRIPTIONEND####
44 //===========================================================================
46 // ============================================================================
48 // ============================================================================
50 // ----------------------------------------------------------------------------
52 // ----------------------------------------------------------------------------
54 #pragma implementation "shortdescrwin.h"
57 // Includes other headers for precompiled compilation
64 #include "configtool.h"
65 #include "shortdescrwin.h"
68 * ecShortDescriptionWindow
71 IMPLEMENT_CLASS(ecShortDescriptionWindow, wxTextCtrl)
73 BEGIN_EVENT_TABLE(ecShortDescriptionWindow, wxTextCtrl)
74 EVT_MOUSE_EVENTS(ecShortDescriptionWindow::OnMouseEvent)
77 ecShortDescriptionWindow::ecShortDescriptionWindow(wxWindow* parent, wxWindowID id, const wxPoint& pt,
78 const wxSize& sz, long style):
79 wxTextCtrl(parent, id, wxEmptyString, pt, sz, style)
83 SetThemeEnabled(FALSE);
87 if (!wxGetApp().GetSettings().GetWindowSettings().GetUseDefaults() &&
88 wxGetApp().GetSettings().GetWindowSettings().GetFont(wxT("Short Description")).Ok())
90 SetFont(wxGetApp().GetSettings().GetWindowSettings().GetFont(wxT("Short Description")));
93 m_propertiesMenu = new wxMenu;
95 m_propertiesMenu->Append(ecID_WHATS_THIS, _("&What's This?"));
96 m_propertiesMenu->AppendSeparator();
97 m_propertiesMenu->Append(wxID_COPY, _("&Copy"));
99 //SetValue(_("This is a short description, to give you helpful remarks about the selected item."));
102 ecShortDescriptionWindow::~ecShortDescriptionWindow()
104 delete m_propertiesMenu;
107 void ecShortDescriptionWindow::OnMouseEvent(wxMouseEvent& event)
109 if (event.RightDown())
111 PopupMenu(GetPropertiesMenu(), event.GetX(), event.GetY());