OpenASIP
2.0
|
#include <AddressSpacesDialog.hh>
Public Member Functions | |
AddressSpacesDialog (wxWindow *parent, TTAMachine::Machine *machine) | |
~AddressSpacesDialog () | |
Private Types | |
enum | { ID_ADD = 10000, ID_EDIT, ID_HELP, ID_DELETE, ID_LIST, ID_LINE } |
Private Member Functions | |
wxSizer * | createContents (wxWindow *parent, bool call_fit, bool set_sizer) |
TTAMachine::AddressSpace * | selectedAS () |
void | updateASList () |
void | onAdd (wxCommandEvent &event) |
void | onActivateAS (wxListEvent &event) |
void | onEdit (wxCommandEvent &event) |
void | onDelete (wxCommandEvent &event) |
void | onASSelection (wxListEvent &event) |
void | onASRightClick (wxListEvent &event) |
void | setTexts () |
Private Attributes | |
TTAMachine::Machine * | machine_ |
Machine containing the address spaces to list. More... | |
wxListCtrl * | asList_ |
List control for listing the address spaces. More... | |
Dialog for listing and editing address spaces of the machine.
Definition at line 48 of file AddressSpacesDialog.hh.
|
private |
AddressSpacesDialog::AddressSpacesDialog | ( | wxWindow * | parent, |
TTAMachine::Machine * | machine | ||
) |
The Constructor.
parent | Parent window of the dialog. |
machine | Machine containing the address spaces. |
Definition at line 81 of file AddressSpacesDialog.cc.
AddressSpacesDialog::~AddressSpacesDialog | ( | ) |
|
private |
Creates the dialog window contents.
This method was generated with wxDesigner, thus the ugly code and too long lines.
parent | The dialog window. |
call_fit | If true, fits the contents inside the dialog. |
set_sizer | If true, sets the main sizer as dialog contents. |
Definition at line 352 of file AddressSpacesDialog.cc.
|
private |
Handles left mouse button double click on the address space list.
Opens the clicked address space in an AddressSpaceDialog.
Definition at line 233 of file AddressSpacesDialog.cc.
References dummy.
|
private |
Creates and shows an address space dialog with default values set for adding an address space.
Definition at line 194 of file AddressSpacesDialog.cc.
References ProDeConstants::COMP_NEW_NAME_PREFIX_AS, ModelConstants::DEFAULT_AS_MAU_WIDTH, ModelConstants::DEFAULT_AS_MAX_ADDRESS, ModelConstants::DEFAULT_AS_MIN_ADDRESS, TTAMachine::Machine::Navigator< ComponentType >::hasItem(), and Conversion::toString().
|
private |
Opens a pop-up menu when right mouse button is pressed on the list.
event | Information about right mouse click event. |
Definition at line 320 of file AddressSpacesDialog.cc.
References ProDeTextGenerator::instance(), Texts::TextGenerator::text(), WxConversion::toWxString(), ProDeTextGenerator::TXT_LABEL_BUTTON_DELETE, and ProDeTextGenerator::TXT_LABEL_BUTTON_EDIT.
|
private |
Disables and enables Edit and Delete buttons under the address space list.
If an address space is selected, buttons are enabled. If no address space is selected the buttons will be disabled.
Definition at line 280 of file AddressSpacesDialog.cc.
|
private |
Handles the 'Delete' button event.
Deletes the selected address space.
Definition at line 267 of file AddressSpacesDialog.cc.
|
private |
Handles the 'Edit' button event.
Opens an AddressSpaceDialog with the selected address space's attributes set.
Definition at line 246 of file AddressSpacesDialog.cc.
|
private |
Returns pointer to the AddressSpace, which is selected on the list.
Definition at line 166 of file AddressSpacesDialog.cc.
References TTAMachine::Machine::Navigator< ComponentType >::hasItem(), TTAMachine::Machine::Navigator< ComponentType >::item(), and WxConversion::toString().
|
private |
Sets texts for widgets.
Definition at line 112 of file AddressSpacesDialog.cc.
References GUITextGenerator::instance(), ProDeTextGenerator::instance(), WidgetTools::setLabel(), Texts::TextGenerator::text(), WxConversion::toWxString(), ProDeTextGenerator::TXT_ADDRESS_SPACES_DIALOG_TITLE, GUITextGenerator::TXT_BUTTON_ADD_DIALOG, GUITextGenerator::TXT_BUTTON_CANCEL, GUITextGenerator::TXT_BUTTON_DELETE, GUITextGenerator::TXT_BUTTON_EDIT_DIALOG, GUITextGenerator::TXT_BUTTON_HELP, GUITextGenerator::TXT_BUTTON_OK, ProDeTextGenerator::TXT_COLUMN_BIT_WIDTH, ProDeTextGenerator::TXT_COLUMN_MAU, ProDeTextGenerator::TXT_COLUMN_MAX_ADDRESS, ProDeTextGenerator::TXT_COLUMN_MIN_ADDRESS, and ProDeTextGenerator::TXT_COLUMN_NAME.
|
private |
Updates the address space list.
Definition at line 295 of file AddressSpacesDialog.cc.
References TTAMachine::Machine::Navigator< ComponentType >::count(), TTAMachine::AddressSpace::end(), TTAMachine::Machine::Navigator< ComponentType >::item(), TTAMachine::Component::name(), MathTools::requiredBits(), TTAMachine::AddressSpace::start(), WxConversion::toWxString(), and TTAMachine::AddressSpace::width().
|
private |
List control for listing the address spaces.
Definition at line 68 of file AddressSpacesDialog.hh.
|
private |
Machine containing the address spaces to list.
Definition at line 66 of file AddressSpacesDialog.hh.