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

Subversion Repositories openrisc

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

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
// platformsdlg.cpp :
23
//
24
//===========================================================================
25
//#####DESCRIPTIONBEGIN####
26
//
27
// Author(s):   julians
28
// Contact(s):  julians
29
// Date:        2000/09/06
30
// Version:     $Id: configpropdlg.cpp,v 1.2 2001/03/01 15:54:38 julians Exp $
31
// Purpose:
32
// Description: Implementation file for the ecConfigPropertiesDialog
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 "configpropdlg.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 "wx/cshelp.h"
62
 
63
#include "configtool.h"
64
#include "configpropdlg.h"
65
#include "propertywin.h"
66
 
67
BEGIN_EVENT_TABLE(ecConfigPropertiesDialog, wxDialog)
68
    EVT_BUTTON(wxID_OK, ecConfigPropertiesDialog::OnClose)
69
END_EVENT_TABLE()
70
 
71
// ----------------------------------------------------------------------------
72
// main frame
73
// ----------------------------------------------------------------------------
74
 
75
// Frame constructor
76
ecConfigPropertiesDialog::ecConfigPropertiesDialog(wxWindow* parent, ecConfigItem* item)
77
{
78
    m_listCtrl = NULL;
79
    m_item = item;
80
 
81
    SetExtraStyle(wxDIALOG_EX_CONTEXTHELP);
82
 
83
    wxDialog::Create(parent, ecID_CONFIG_PROPERTIES_DIALOG, _("Configuration Item Properties"));
84
 
85
    CreateControls(this);
86
 
87
    m_listCtrl->Fill(m_item);
88
 
89
    Centre(wxBOTH);
90
}
91
 
92
void ecConfigPropertiesDialog::CreateControls(wxWindow* parent)
93
{
94
    // Create custom windows first
95
    m_listCtrl = new ecPropertyListCtrl(parent, ecID_CONFIG_PROPERTIES_LIST, wxDefaultPosition, wxSize(450, 300), wxLC_REPORT|wxCLIP_CHILDREN|wxSUNKEN_BORDER|wxLC_VRULES|wxLC_HRULES);
96
    //m_listCtrl->InsertColumn(0, _("Property"), wxLIST_FORMAT_LEFT, 100);
97
    //m_listCtrl->InsertColumn(1, _("Value"), wxLIST_FORMAT_LEFT, 100);
98
 
99
    wxSizer *item0 = new wxBoxSizer( wxVERTICAL );
100
 
101
    wxWindow *item1 = parent->FindWindow( ecID_CONFIG_PROPERTIES_LIST );
102
    wxASSERT( item1 );
103
    item0->Add( item1, 1, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
104
 
105
    wxSizer *item2 = new wxBoxSizer( wxHORIZONTAL );
106
 
107
    item2->Add( 20, 20, 1, wxALIGN_CENTRE|wxALL, 5 );
108
 
109
    wxButton *item3 = new wxButton( parent, wxID_OK, "&Close", wxDefaultPosition, wxDefaultSize, 0 );
110
    item2->Add( item3, 0, wxALIGN_CENTRE|wxALL, 5 );
111
 
112
    item0->Add( item2, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
113
 
114
#ifdef __WXGTK__
115
    wxButton *contextButton = new wxContextHelpButton( parent );
116
    item2->Add( contextButton, 0, wxALIGN_CENTRE|wxALL, 5 );
117
#endif
118
 
119
    ((wxButton*) parent->FindWindow(wxID_OK))->SetDefault();
120
 
121
    parent->SetAutoLayout( TRUE );
122
    parent->SetSizer( item0 );
123
    parent->Layout();
124
    item0->Fit( parent );
125
    item0->SetSizeHints( parent );
126
 
127
    // Add context-sensitive help text
128
    parent->FindWindow( ecID_CONFIG_PROPERTIES_LIST )->SetHelpText(_("Displays the properties of the currently selected configuration item. You can double-click on a URL property to navigate to that documentation page or on a File property to view that header file."));
129
    parent->FindWindow( wxID_OK )->SetHelpText(_("Closes the dialog."));
130
 
131
#if __WXGTK__
132
    parent->FindWindow( wxID_CONTEXT_HELP )->SetHelpText(_("Invokes context-sensitive help for the clicked-on window."));
133
#endif
134
 
135
}
136
 
137
void ecConfigPropertiesDialog::OnClose(wxCommandEvent& event)
138
{
139
    event.Skip();
140
}

powered by: WebSVN 2.1.0

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