OpenASIP
2.0
|
#include <OSEdInfoView.hh>
Public Member Functions | |
OSEdInfoView (wxWindow *parent) | |
virtual | ~OSEdInfoView () |
void | clear () |
void | pathView () |
void | moduleView (const std::string &name) |
void | operationView (const std::string &path, const std::string &mod) |
void | operationPropertyView (const std::string &opName, const std::string &modName, const std::string &pathName) |
std::string | selectedPath () |
std::string | selectedModule () |
std::string | selectedOperation () |
Private Types | |
enum | InfoMode { MODE_NOMODE, MODE_PATH, MODE_MODULE, MODE_OPERATION, MODE_PROPERTY } |
Private Member Functions | |
void | onSelection (wxListEvent &event) |
void | onDropDownMenu (wxMouseEvent &event) |
void | insertOperationPropertyColumns () |
int | writeStaticPropertiesOfOperation (Operation *op) |
Private Attributes | |
InfoMode | mode_ |
Mode of the info view. More... | |
Models an info screen.
Info screen shows info about search paths, modules, and operations.
Definition at line 47 of file OSEdInfoView.hh.
|
private |
Possible modes of info view.
Enumerator | |
---|---|
MODE_NOMODE | Initial state. |
MODE_PATH | Path view. |
MODE_MODULE | Module view. |
MODE_OPERATION | Operation View. |
MODE_PROPERTY | Operation property view. |
Definition at line 75 of file OSEdInfoView.hh.
OSEdInfoView::OSEdInfoView | ( | wxWindow * | parent | ) |
|
virtual |
void OSEdInfoView::clear | ( | ) |
Clears the info screen.
Definition at line 86 of file OSEdInfoView.cc.
Referenced by moduleView(), operationPropertyView(), operationView(), and pathView().
|
private |
Inserts columns in operation property view.
Definition at line 372 of file OSEdInfoView.cc.
References OSEdConstants::DEFAULT_COLUMN_WIDTH, OSEdTextGenerator::instance(), Texts::TextGenerator::text(), WxConversion::toWxString(), OSEdTextGenerator::TXT_COLUMN_OPERAND_VALUE, OSEdTextGenerator::TXT_COLUMN_PROPERTY, and OSEdTextGenerator::TXT_COLUMN_VALUE.
Referenced by operationPropertyView().
void OSEdInfoView::moduleView | ( | const std::string & | name | ) |
Shows the module view.
The | name of the path. |
Definition at line 129 of file OSEdInfoView.cc.
References clear(), OSEdConstants::DEFAULT_COLUMN_WIDTH, OSEdTextGenerator::instance(), mode_, MODE_MODULE, OperationIndex::module(), OperationIndex::moduleCount(), OperationModule::name(), OperationContainer::operationIndex(), Texts::TextGenerator::text(), WxConversion::toWxString(), and OSEdTextGenerator::TXT_COLUMN_MODULES.
Referenced by OSEdRemoveModuleCmd::Do(), OSEdTreeView::onItemSelected(), and OSEdTreeView::update().
|
private |
Handles the event when list item is clicked with right mouse button.
Then the drop down menu is shown.
event | Event to be handled. |
Definition at line 579 of file OSEdInfoView.cc.
References OSEdTextGenerator::instance(), DropDownMenu::MENU_MODULE, DropDownMenu::MENU_OPERATION, DropDownMenu::MENU_PATH, mode_, MODE_MODULE, MODE_OPERATION, MODE_PATH, MODE_PROPERTY, OSEdMainFrame::statusBar(), Texts::TextGenerator::text(), WxConversion::toWxString(), OSEdTextGenerator::TXT_STATUS_MODULE_SELECTED, OSEdTextGenerator::TXT_STATUS_OPERATION_SELECTED, and OSEdTextGenerator::TXT_STATUS_PATH_SELECTED.
|
private |
Handles the event when list item is selected.
Definition at line 538 of file OSEdInfoView.cc.
References OSEdTextGenerator::instance(), mode_, MODE_MODULE, MODE_OPERATION, MODE_PATH, OSEdMainFrame::statusBar(), Texts::TextGenerator::text(), WxConversion::toWxString(), OSEdTextGenerator::TXT_STATUS_MODULE_SELECTED, OSEdTextGenerator::TXT_STATUS_OPERATION_SELECTED, OSEdTextGenerator::TXT_STATUS_PATH_SELECTED, and OSEdMainFrame::updateMenuBar().
void OSEdInfoView::operationPropertyView | ( | const std::string & | opName, |
const std::string & | modName, | ||
const std::string & | pathName | ||
) |
Shows the operation properties of an operation.
opName | The name of the operation. |
modName | The name of the module. |
pathName | The name of the path. |
Definition at line 202 of file OSEdInfoView.cc.
References Operation::affectedBy(), Operation::affectedByCount(), Operation::affects(), Operation::affectsCount(), Operation::canBeSimulated(), clear(), insertOperationPropertyColumns(), OSEdTextGenerator::instance(), Operand::isAddress(), Operand::isMemoryData(), mode_, MODE_PROPERTY, Operation::numberOfInputs(), Operation::operand(), OperationContainer::operation(), Operand::swap(), Texts::TextGenerator::text(), WxConversion::toWxString(), OSEdTextGenerator::TXT_ROW_AFFECTED_BY, OSEdTextGenerator::TXT_ROW_AFFECTS, OSEdTextGenerator::TXT_ROW_CAN_SWAP, OSEdTextGenerator::TXT_ROW_FALSE, OSEdTextGenerator::TXT_ROW_HAS_BEHAVIOR, OSEdTextGenerator::TXT_ROW_ID, OSEdTextGenerator::TXT_ROW_INPUT_OPERANDS, OSEdTextGenerator::TXT_ROW_MEMORY_ADDRESS, OSEdTextGenerator::TXT_ROW_MEMORY_DATA, OSEdTextGenerator::TXT_ROW_NO, OSEdTextGenerator::TXT_ROW_OUTPUT_OPERANDS, OSEdTextGenerator::TXT_ROW_TRUE, OSEdTextGenerator::TXT_ROW_TYPE, OSEdTextGenerator::TXT_ROW_YES, Operand::typeString(), and writeStaticPropertiesOfOperation().
Referenced by OSEdTreeView::onItemSelected(), and OSEdTreeView::update().
void OSEdInfoView::operationView | ( | const std::string & | path, |
const std::string & | mod | ||
) |
Shows the operation view.
path | The path of the module. |
mod | The name of the module. |
Definition at line 161 of file OSEdInfoView.cc.
References clear(), OSEdConstants::DEFAULT_COLUMN_WIDTH, OSEdTextGenerator::instance(), OperationContainer::isEffective(), mode_, MODE_OPERATION, OperationContainer::module(), OperationIndex::operationCount(), OperationContainer::operationIndex(), OperationIndex::operationName(), Texts::TextGenerator::text(), WxConversion::toWxString(), and OSEdTextGenerator::TXT_COLUMN_OPERATIONS.
Referenced by OSEdRemoveOperationCmd::Do(), OSEdTreeView::onItemSelected(), and OSEdTreeView::update().
void OSEdInfoView::pathView | ( | ) |
Shows the search path view.
Definition at line 98 of file OSEdInfoView.cc.
References clear(), OSEdConstants::DEFAULT_COLUMN_WIDTH, FileSystem::fileExists(), OSEdTextGenerator::instance(), mode_, MODE_PATH, Environment::osalPaths(), Texts::TextGenerator::text(), WxConversion::toWxString(), and OSEdTextGenerator::TXT_COLUMN_SEARCH_PATHS.
Referenced by OSEdTreeView::constructTree(), OSEdTreeView::onItemSelected(), and OSEdTreeView::update().
string OSEdInfoView::selectedModule | ( | ) |
Returns the selected module.
If no module is selected, returns an empty string.
Definition at line 510 of file OSEdInfoView.cc.
References WidgetTools::lcStringSelection(), mode_, and MODE_MODULE.
Referenced by OSEdTreeView::isModuleSelected(), OSEdTreeView::selectedModule(), and OSEdTreeView::selectedModuleId().
string OSEdInfoView::selectedOperation | ( | ) |
Returns the selected operation.
If no operation is selected, return empty string.
Definition at line 526 of file OSEdInfoView.cc.
References WidgetTools::lcStringSelection(), mode_, and MODE_OPERATION.
Referenced by OSEdTreeView::isOperationSelected(), OSEdTreeView::selectedOperation(), and OSEdTreeView::selectedOperationId().
string OSEdInfoView::selectedPath | ( | ) |
Returns the selected path.
If path is not selected returns an empty string.
Definition at line 493 of file OSEdInfoView.cc.
References WidgetTools::lcStringSelection(), mode_, and MODE_PATH.
Referenced by OSEdTreeView::isPathSelected(), OSEdTreeView::selectedPath(), and OSEdTreeView::selectedPathId().
|
private |
Writes the "static" operation properties in operation property view
op | Operation which static properties are written. |
Definition at line 398 of file OSEdInfoView.cc.
References Operation::canTrap(), Operation::description(), Operation::hasSideEffects(), OSEdTextGenerator::instance(), Operation::isClocked(), Operation::name(), Operation::numberOfInputs(), Operation::numberOfOutputs(), Operation::readsMemory(), Texts::TextGenerator::text(), WxConversion::toWxString(), OSEdTextGenerator::TXT_ROW_CAN_TRAP, OSEdTextGenerator::TXT_ROW_CLOCKED, OSEdTextGenerator::TXT_ROW_DESCRIPTION, OSEdTextGenerator::TXT_ROW_FALSE, OSEdTextGenerator::TXT_ROW_HAS_SIDE_EFFECTS, OSEdTextGenerator::TXT_ROW_INPUTS, OSEdTextGenerator::TXT_ROW_NAME, OSEdTextGenerator::TXT_ROW_OUTPUTS, OSEdTextGenerator::TXT_ROW_READS_MEMORY, OSEdTextGenerator::TXT_ROW_TRUE, OSEdTextGenerator::TXT_ROW_WRITES_MEMORY, and Operation::writesMemory().
Referenced by operationPropertyView().
|
private |
Mode of the info view.
Definition at line 84 of file OSEdInfoView.hh.
Referenced by moduleView(), onDropDownMenu(), onSelection(), operationPropertyView(), operationView(), pathView(), selectedModule(), selectedOperation(), and selectedPath().