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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [tools/] [src/] [tools/] [configtool/] [standalone/] [wxwin/] [outputwin.cpp] - Blame information for rev 174

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 26 unneback
//####COPYRIGHTBEGIN####
2
//
3
// ----------------------------------------------------------------------------
4
// Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
5
//
6
// This program is part of the eCos host tools.
7
//
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)
11
// any later version.
12
//
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
16
// more details.
17
//
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.
21
//
22
// ----------------------------------------------------------------------------
23
//
24
//####COPYRIGHTEND####
25
// outputwin.cpp :
26
//
27
//===========================================================================
28
//#####DESCRIPTIONBEGIN####
29
//
30
// Author(s):   julians
31
// Contact(s):  julians
32
// Date:        2000/10/02
33
// Version:     $Id: outputwin.cpp,v 1.1.1.1 2004-02-14 13:28:49 phoenix Exp $
34
// Purpose:
35
// Description: Implementation file for ecOutputWindow
36
// Requires:
37
// Provides:
38
// See also:
39
// Known bugs:
40
// Usage:
41
//
42
//####DESCRIPTIONEND####
43
//
44
//===========================================================================
45
 
46
// ============================================================================
47
// declarations
48
// ============================================================================
49
 
50
// ----------------------------------------------------------------------------
51
// headers
52
// ----------------------------------------------------------------------------
53
#ifdef __GNUG__
54
    #pragma implementation "outputwin.h"
55
#endif
56
 
57
// Includes other headers for precompiled compilation
58
#include "ecpch.h"
59
 
60
#ifdef __BORLANDC__
61
    #pragma hdrstop
62
#endif
63
 
64
#include "configtool.h"
65
#include "outputwin.h"
66
 
67
/*
68
 * ecOutputWindow
69
 */
70
 
71
IMPLEMENT_CLASS(ecOutputWindow, wxTextCtrl)
72
 
73
BEGIN_EVENT_TABLE(ecOutputWindow, wxTextCtrl)
74
//    EVT_PAINT(ecOutputWindow::OnPaint)
75
    EVT_MOUSE_EVENTS(ecOutputWindow::OnMouseEvent)
76
    EVT_MENU(wxID_CLEAR, ecOutputWindow::OnClear)
77
    EVT_MENU(wxID_SELECTALL, ecOutputWindow::OnSelectAll)
78
    EVT_MENU(wxID_SAVE, ecOutputWindow::OnSave)
79
END_EVENT_TABLE()
80
 
81
ecOutputWindow::ecOutputWindow(wxWindow* parent, wxWindowID id, const wxPoint& pt,
82
        const wxSize& sz, long style):
83
        wxTextCtrl(parent, id, wxEmptyString, pt, sz, style)
84
{
85
    if (!wxGetApp().GetSettings().GetWindowSettings().GetUseDefaults() &&
86
         wxGetApp().GetSettings().GetWindowSettings().GetFont(wxT("Output")).Ok())
87
    {
88
        SetFont(wxGetApp().GetSettings().GetWindowSettings().GetFont(wxT("Output")));
89
    }
90
 
91
    m_propertiesMenu = new wxMenu;
92
 
93
    m_propertiesMenu->Append(ecID_WHATS_THIS, _("&What's This?"));
94
    m_propertiesMenu->AppendSeparator();
95
    m_propertiesMenu->Append(wxID_COPY, _("&Copy"));
96
    m_propertiesMenu->Append(wxID_CLEAR, _("C&lear"));
97
    m_propertiesMenu->Append(wxID_SELECTALL, _("Select &All"));
98
    m_propertiesMenu->AppendSeparator();
99
    m_propertiesMenu->Append(wxID_SAVE, _("&Save..."));
100
}
101
 
102
ecOutputWindow::~ecOutputWindow()
103
{
104
    delete m_propertiesMenu;
105
}
106
 
107
void ecOutputWindow::OnMouseEvent(wxMouseEvent& event)
108
{
109
    if (event.RightDown())
110
    {
111
        PopupMenu(GetPropertiesMenu(), event.GetX(), event.GetY());
112
    }
113
    else
114
    {
115
        event.Skip();
116
    }
117
}
118
 
119
void ecOutputWindow::OnClear(wxCommandEvent& event)
120
{
121
    Clear();
122
}
123
 
124
void ecOutputWindow::OnSelectAll(wxCommandEvent& event)
125
{
126
    SetSelection(0, GetLastPosition());
127
}
128
 
129
void ecOutputWindow::OnSave(wxCommandEvent& event)
130
{
131
}

powered by: WebSVN 2.1.0

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