OpenASIP
2.0
|
#include <RFPortDialog.hh>
Public Member Functions | |
RFPortDialog (wxWindow *parent, TTAMachine::Port *port) | |
virtual | ~RFPortDialog () |
Private Types | |
enum | { ID_NAME = 10000, ID_INPUT_SOCKET, ID_OUTPUT_SOCKET, ID_HELP } |
enumerated IDs for the port controls More... | |
Private Member Functions | |
wxSizer * | createContents (wxWindow *parent, bool call_fit, bool set_sizer) |
virtual bool | TransferDataToWindow () |
void | onOK (wxCommandEvent &event) |
void | onCancel (wxCommandEvent &event) |
void | onHelp (wxCommandEvent &event) |
void | onName (wxCommandEvent &event) |
void | onSocketChoice (wxCommandEvent &event) |
void | updateSockets () |
void | setTexts () |
Private Attributes | |
TTAMachine::Port * | port_ |
Port to modify. More... | |
wxString | name_ |
Name of the port. More... | |
wxChoice * | inputSocketChoice_ |
Input socket choice control. More... | |
wxChoice * | outputSocketChoice_ |
Output socket choice control. More... | |
TTAMachine::Socket * | oldInput_ |
Original input socket of the port. More... | |
TTAMachine::Socket * | oldOutput_ |
Original output socket of the port. More... | |
Dialog for querying register file port parameters from the user.
Definition at line 44 of file RFPortDialog.hh.
|
private |
enumerated IDs for the port controls
Enumerator | |
---|---|
ID_NAME | |
ID_INPUT_SOCKET | |
ID_OUTPUT_SOCKET | |
ID_HELP |
Definition at line 74 of file RFPortDialog.hh.
RFPortDialog::RFPortDialog | ( | wxWindow * | parent, |
TTAMachine::Port * | port | ||
) |
The Constructor.
parent | Parent window of the dialog. |
port | Port to modify. |
Definition at line 71 of file RFPortDialog.cc.
|
virtual |
|
private |
Creates contents of the dialog window. Initially generated with wxDesigner, the code will be cleaned up later.
parent | Parent dialog of the contents. |
call_fit | If true, fits sizer in dialog window. |
set_sizer | If true, sets sizer as dialog's sizer. |
Definition at line 340 of file RFPortDialog.cc.
References TRUE.
|
private |
Resets the original output and input sockets for the port and closes the dialog.
Definition at line 198 of file RFPortDialog.cc.
|
private |
|
private |
Validates input in the controls, and updates the ComponentDescriptor.
Definition at line 318 of file RFPortDialog.cc.
References assert.
|
private |
Validates input in the controls, and updates the port.
Definition at line 135 of file RFPortDialog.cc.
References assert, ProDeTextGenerator::COMP_A_PORT, ProDeTextGenerator::COMP_PORT, ProDeTextGenerator::COMP_REGISTER_FILE, ProDeTextGenerator::instance(), MachineTester::isValidComponentName(), ProDeTextGenerator::MSG_ERROR_ILLEGAL_NAME, ProDeTextGenerator::MSG_ERROR_SAME_NAME, TTAMachine::Port::name(), TTAMachine::Unit::port(), TTAMachine::Unit::portCount(), RF, Texts::TextGenerator::text(), WxConversion::toString(), and WxConversion::toWxString().
|
private |
Updates the port object when user changes input/output socket selection.
Definition at line 225 of file RFPortDialog.cc.
References TTAMachine::Machine::Navigator< ComponentType >::item(), ProDeConstants::NONE, and WxConversion::toString().
|
private |
Sets texts for widgets.
Definition at line 101 of file RFPortDialog.cc.
References GUITextGenerator::instance(), ProDeTextGenerator::instance(), WidgetTools::setLabel(), Texts::TextGenerator::text(), WxConversion::toWxString(), GUITextGenerator::TXT_BUTTON_CANCEL, GUITextGenerator::TXT_BUTTON_HELP, GUITextGenerator::TXT_BUTTON_OK, ProDeTextGenerator::TXT_LABEL_INPUT_SOCKET, ProDeTextGenerator::TXT_LABEL_NAME, ProDeTextGenerator::TXT_LABEL_OUTPUT_SOCKET, and ProDeTextGenerator::TXT_RF_PORT_DIALOG_TITLE.
|
privatevirtual |
Transfers data from the port object to the dialog widgets.
Definition at line 215 of file RFPortDialog.cc.
References WxConversion::toWxString().
|
private |
Updates input and output socket choicers.
Definition at line 250 of file RFPortDialog.cc.
References MachineTester::canConnect(), TTAMachine::Machine::Navigator< ComponentType >::count(), TTAMachine::Socket::direction(), TTAMachine::Socket::INPUT, TTAMachine::Machine::Navigator< ComponentType >::item(), TTAMachine::Component::name(), ProDeConstants::NONE, TTAMachine::Socket::OUTPUT, and WxConversion::toWxString().
|
private |
Input socket choice control.
Definition at line 65 of file RFPortDialog.hh.
|
private |
Name of the port.
Definition at line 63 of file RFPortDialog.hh.
|
private |
Original input socket of the port.
Definition at line 69 of file RFPortDialog.hh.
|
private |
Original output socket of the port.
Definition at line 71 of file RFPortDialog.hh.
|
private |
Output socket choice control.
Definition at line 67 of file RFPortDialog.hh.
|
private |
Port to modify.
Definition at line 61 of file RFPortDialog.hh.