OpenASIP
2.0
|
#include <IUPortDialog.hh>
Public Member Functions | |
IUPortDialog (wxWindow *parent, TTAMachine::Port *port) | |
virtual | ~IUPortDialog () |
Private Types | |
enum | { ID_NAME = 10000, ID_OUTPUT_SOCKET, ID_HELP, ID_LABEL_NAME, ID_LABEL_OUTPUT_SOCKET, ID_LINE } |
Enumerated IDs for dialog controls. More... | |
Private Member Functions | |
wxSizer * | createContents (wxWindow *parent, bool call_fit, bool set_sizer) |
virtual bool | TransferDataToWindow () |
void | onOK (wxCommandEvent &event) |
void | onHelp (wxCommandEvent &event) |
void | onName (wxCommandEvent &event) |
void | updateSocket () |
void | setTexts () |
Private Attributes | |
TTAMachine::Port * | port_ |
Immediate unit port to edit with the dialog. More... | |
wxString | name_ |
Name of the port. More... | |
wxChoice * | outputSocketChoice_ |
Output socket choice control. More... | |
Dialog for editing immediate unit ports.
Definition at line 45 of file IUPortDialog.hh.
|
private |
Enumerated IDs for dialog controls.
Enumerator | |
---|---|
ID_NAME | |
ID_OUTPUT_SOCKET | |
ID_HELP | |
ID_LABEL_NAME | |
ID_LABEL_OUTPUT_SOCKET | |
ID_LINE |
Definition at line 67 of file IUPortDialog.hh.
IUPortDialog::IUPortDialog | ( | wxWindow * | parent, |
TTAMachine::Port * | port | ||
) |
The Constructor.
parent | Parent window of the dialog. |
port | Immediate unit port to be modified with the dialog. |
Definition at line 64 of file IUPortDialog.cc.
|
virtual |
|
private |
Creates the dialog window contents.
This method was initially generated with wxDesigner, code will be cleaned up later.
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 284 of file IUPortDialog.cc.
|
private |
|
private |
Validates input in the controls, and updates the port.
Definition at line 259 of file IUPortDialog.cc.
References assert.
|
private |
Validates input in the controls, and updates the port.
Definition at line 191 of file IUPortDialog.cc.
References ProDeTextGenerator::COMP_A_PORT, ProDeTextGenerator::COMP_IMMEDIATE_UNIT, ProDeTextGenerator::COMP_PORT, ProDeTextGenerator::instance(), MachineTester::isValidComponentName(), TTAMachine::Machine::Navigator< ComponentType >::item(), ProDeTextGenerator::MSG_ERROR_ILLEGAL_NAME, ProDeTextGenerator::MSG_ERROR_SAME_NAME, TTAMachine::Port::name(), ProDeConstants::NONE, TTAMachine::Unit::port(), TTAMachine::Unit::portCount(), Texts::TextGenerator::text(), WxConversion::toString(), and WxConversion::toWxString().
|
private |
Sets texts for widgets.
Definition at line 98 of file IUPortDialog.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_IU_PORT_DIALOG_TITLE, ProDeTextGenerator::TXT_LABEL_NAME, and ProDeTextGenerator::TXT_LABEL_OUTPUT_SOCKET.
|
privatevirtual |
Transfers data from the Port object to the dialog widgets.
Definition at line 132 of file IUPortDialog.cc.
References WxConversion::toWxString().
|
private |
Updates output socket choicer.
Definition at line 145 of file IUPortDialog.cc.
References MachineTester::canConnect(), TTAMachine::Machine::Navigator< ComponentType >::count(), TTAMachine::Socket::direction(), TTAMachine::Machine::Navigator< ComponentType >::item(), TTAMachine::Component::name(), ProDeConstants::NONE, TTAMachine::Socket::OUTPUT, and WxConversion::toWxString().
|
private |
Name of the port.
Definition at line 62 of file IUPortDialog.hh.
|
private |
Output socket choice control.
Definition at line 64 of file IUPortDialog.hh.
|
private |
Immediate unit port to edit with the dialog.
Definition at line 60 of file IUPortDialog.hh.