OpenASIP  2.0
OSEdInfoView.hh
Go to the documentation of this file.
1 /*
2  Copyright (c) 2002-2009 Tampere University.
3 
4  This file is part of TTA-Based Codesign Environment (TCE).
5 
6  Permission is hereby granted, free of charge, to any person obtaining a
7  copy of this software and associated documentation files (the "Software"),
8  to deal in the Software without restriction, including without limitation
9  the rights to use, copy, modify, merge, publish, distribute, sublicense,
10  and/or sell copies of the Software, and to permit persons to whom the
11  Software is furnished to do so, subject to the following conditions:
12 
13  The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  DEALINGS IN THE SOFTWARE.
23  */
24 /**
25  * @file OSEdInfoView.hh
26  *
27  * Declaration of OSEdInfoView class.
28  *
29  * @author Jussi Nykänen 2004 (nykanen-no.spam-cs.tut.fi)
30  * @note rating: red
31  */
32 
33 #ifndef TTA_OSED_INFO_VIEW_HH
34 #define TTA_OSED_INFO_VIEW_HH
35 
36 #include <wx/wx.h>
37 #include <wx/listctrl.h>
38 #include <string>
39 
40 class Operation;
41 
42 /**
43  * Models an info screen.
44  *
45  * Info screen shows info about search paths, modules, and operations.
46  */
47 class OSEdInfoView : public wxListCtrl {
48 public:
49  OSEdInfoView(wxWindow* parent);
50  virtual ~OSEdInfoView();
51 
52  void clear();
53  void pathView();
54  void moduleView(const std::string& name);
55  void operationView(const std::string& path, const std::string& mod);
57  const std::string& opName,
58  const std::string& modName,
59  const std::string& pathName);
60 
61  std::string selectedPath();
62  std::string selectedModule();
63  std::string selectedOperation();
64 
65 private:
66 
67  void onSelection(wxListEvent& event);
68  void onDropDownMenu(wxMouseEvent& event);
71 
72  /**
73  * Possible modes of info view.
74  */
75  enum InfoMode {
76  MODE_NOMODE, ///< Initial state.
77  MODE_PATH, ///< Path view.
78  MODE_MODULE, ///< Module view.
79  MODE_OPERATION, ///< Operation View.
80  MODE_PROPERTY ///< Operation property view.
81  };
82 
83  /// Mode of the info view.
85 
86  DECLARE_EVENT_TABLE()
87 };
88 
89 #endif
OSEdInfoView::operationView
void operationView(const std::string &path, const std::string &mod)
Definition: OSEdInfoView.cc:161
OSEdInfoView::selectedPath
std::string selectedPath()
Definition: OSEdInfoView.cc:493
OSEdInfoView::MODE_OPERATION
@ MODE_OPERATION
Operation View.
Definition: OSEdInfoView.hh:79
OSEdInfoView::~OSEdInfoView
virtual ~OSEdInfoView()
Definition: OSEdInfoView.cc:79
OSEdInfoView::writeStaticPropertiesOfOperation
int writeStaticPropertiesOfOperation(Operation *op)
Definition: OSEdInfoView.cc:398
OSEdInfoView::InfoMode
InfoMode
Definition: OSEdInfoView.hh:75
OSEdInfoView::selectedModule
std::string selectedModule()
Definition: OSEdInfoView.cc:510
OSEdInfoView::insertOperationPropertyColumns
void insertOperationPropertyColumns()
Definition: OSEdInfoView.cc:372
OSEdInfoView::moduleView
void moduleView(const std::string &name)
Definition: OSEdInfoView.cc:129
OSEdInfoView::pathView
void pathView()
Definition: OSEdInfoView.cc:98
OSEdInfoView::selectedOperation
std::string selectedOperation()
Definition: OSEdInfoView.cc:526
OSEdInfoView::clear
void clear()
Definition: OSEdInfoView.cc:86
OSEdInfoView::mode_
InfoMode mode_
Mode of the info view.
Definition: OSEdInfoView.hh:84
OSEdInfoView::onDropDownMenu
void onDropDownMenu(wxMouseEvent &event)
Definition: OSEdInfoView.cc:579
OSEdInfoView
Definition: OSEdInfoView.hh:47
OSEdInfoView::OSEdInfoView
OSEdInfoView(wxWindow *parent)
Definition: OSEdInfoView.cc:68
OSEdInfoView::operationPropertyView
void operationPropertyView(const std::string &opName, const std::string &modName, const std::string &pathName)
Definition: OSEdInfoView.cc:202
OSEdInfoView::onSelection
void onSelection(wxListEvent &event)
Definition: OSEdInfoView.cc:538
Operation
Definition: Operation.hh:59
OSEdInfoView::MODE_NOMODE
@ MODE_NOMODE
Initial state.
Definition: OSEdInfoView.hh:76
OSEdInfoView::MODE_PROPERTY
@ MODE_PROPERTY
Operation property view.
Definition: OSEdInfoView.hh:80
OSEdInfoView::MODE_MODULE
@ MODE_MODULE
Module view.
Definition: OSEdInfoView.hh:78
OSEdInfoView::MODE_PATH
@ MODE_PATH
Path view.
Definition: OSEdInfoView.hh:77