OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [host/] [tools/] [configtool/] [standalone/] [wxwin/] [shortdescrwin.cpp] - Blame information for rev 817

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
// ####ECOSHOSTGPLCOPYRIGHTBEGIN####                                        
2
// -------------------------------------------                              
3
// This file is part of the eCos host tools.                                
4
// Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.            
5
//
6
// This program is free software; you can redistribute it and/or modify     
7
// it under the terms of the GNU General Public License as published by     
8
// the Free Software Foundation; either version 2 or (at your option) any   
9
// later version.                                                           
10
//
11
// This program is distributed in the hope that it will be useful, but      
12
// WITHOUT ANY WARRANTY; without even the implied warranty of               
13
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU        
14
// General Public License for more details.                                 
15
//
16
// You should have received a copy of the GNU General Public License        
17
// along with this program; if not, write to the                            
18
// Free Software Foundation, Inc., 51 Franklin Street,                      
19
// Fifth Floor, Boston, MA  02110-1301, USA.                                
20
// -------------------------------------------                              
21
// ####ECOSHOSTGPLCOPYRIGHTEND####                                          
22
// shortdescrwin.cpp :
23
//
24
//===========================================================================
25
//#####DESCRIPTIONBEGIN####
26
//
27
// Author(s):   julians
28
// Contact(s):  julians
29
// Date:        2000/10/02
30
// Version:     $Id: shortdescrwin.cpp,v 1.4 2001/05/16 16:08:24 julians Exp $
31
// Purpose:
32
// Description: Implementation file for ecShortDescriptionWindow
33
// Requires:
34
// Provides:
35
// See also:
36
// Known bugs:
37
// Usage:
38
//
39
//####DESCRIPTIONEND####
40
//
41
//===========================================================================
42
 
43
// ============================================================================
44
// declarations
45
// ============================================================================
46
 
47
// ----------------------------------------------------------------------------
48
// headers
49
// ----------------------------------------------------------------------------
50
#ifdef __GNUG__
51
    #pragma implementation "shortdescrwin.h"
52
#endif
53
 
54
// Includes other headers for precompiled compilation
55
#include "ecpch.h"
56
 
57
#ifdef __BORLANDC__
58
    #pragma hdrstop
59
#endif
60
 
61
#include "configtool.h"
62
#include "shortdescrwin.h"
63
 
64
/*
65
 * ecShortDescriptionWindow
66
 */
67
 
68
IMPLEMENT_CLASS(ecShortDescriptionWindow, wxTextCtrl)
69
 
70
BEGIN_EVENT_TABLE(ecShortDescriptionWindow, wxTextCtrl)
71
    EVT_MOUSE_EVENTS(ecShortDescriptionWindow::OnMouseEvent)
72
END_EVENT_TABLE()
73
 
74
ecShortDescriptionWindow::ecShortDescriptionWindow(wxWindow* parent, wxWindowID id, const wxPoint& pt,
75
        const wxSize& sz, long style):
76
        wxTextCtrl(parent, id, wxEmptyString, pt, sz, style)
77
{
78
/*
79
#ifdef __WXGTK__
80
    SetThemeEnabled(FALSE);
81
#endif
82
*/
83
 
84
    if (!wxGetApp().GetSettings().GetWindowSettings().GetUseDefaults() &&
85
         wxGetApp().GetSettings().GetWindowSettings().GetFont(wxT("Short Description")).Ok())
86
    {
87
        SetFont(wxGetApp().GetSettings().GetWindowSettings().GetFont(wxT("Short Description")));
88
    }
89
 
90
    m_propertiesMenu = new wxMenu;
91
 
92
    m_propertiesMenu->Append(ecID_WHATS_THIS, _("&What's This?"));
93
    m_propertiesMenu->AppendSeparator();
94
    m_propertiesMenu->Append(wxID_COPY, _("&Copy"));
95
 
96
    //SetValue(_("This is a short description, to give you helpful remarks about the selected item."));
97
}
98
 
99
ecShortDescriptionWindow::~ecShortDescriptionWindow()
100
{
101
    delete m_propertiesMenu;
102
}
103
 
104
void ecShortDescriptionWindow::OnMouseEvent(wxMouseEvent& event)
105
{
106
    if (event.RightDown())
107
    {
108
        PopupMenu(GetPropertiesMenu(), event.GetX(), event.GetY());
109
    }
110
    else
111
    {
112
        event.Skip();
113
    }
114
}
115
 

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.