OpenASIP
2.0
|
#include <TemplateSlotDialog.hh>
Public Member Functions | |
TemplateSlotDialog (wxWindow *parent, TTAMachine::InstructionTemplate *it, TTAMachine::TemplateSlot *slot=NULL) | |
virtual | ~TemplateSlotDialog () |
Private Types | |
enum | { ID_LABEL_SLOT = 10000, ID_SLOT, ID_LABEL_WIDTH, ID_WIDTH, ID_LABEL_DESTINATION, ID_DESTINATION, ID_LINE, ID_HELP } |
Private Member Functions | |
wxSizer * | createContents (wxWindow *parent, bool call_fit, bool set_sizer) |
virtual bool | TransferDataToWindow () |
void | onOK (wxCommandEvent &event) |
void | setTexts () |
Private Attributes | |
TTAMachine::TemplateSlot * | slot_ |
Instruction template slot to edit. More... | |
TTAMachine::InstructionTemplate * | it_ |
Parent instruction template of the slot. More... | |
wxChoice * | slotChoice_ |
Choice control for the slot. More... | |
wxChoice * | destinationChoice_ |
Choice control fot the destination IU. More... | |
wxSpinCtrl * | widthCtrl_ |
Spin control for the width. More... | |
int | width_ |
Bit width of the slot. More... | |
TTAMachine::ImmediateUnit * | destination_ |
Destination immediate unit. More... | |
Dialog for editing telplate slot properties.
Definition at line 49 of file TemplateSlotDialog.hh.
|
private |
Enumerator | |
---|---|
ID_LABEL_SLOT | |
ID_SLOT | |
ID_LABEL_WIDTH | |
ID_WIDTH | |
ID_LABEL_DESTINATION | |
ID_DESTINATION | |
ID_LINE | |
ID_HELP |
Definition at line 80 of file TemplateSlotDialog.hh.
TemplateSlotDialog::TemplateSlotDialog | ( | wxWindow * | parent, |
TTAMachine::InstructionTemplate * | it, | ||
TTAMachine::TemplateSlot * | slot = NULL |
||
) |
The Constructor.
parent | Parent window of the dialog. |
temp | InstructionTemplate to edit. |
slot | Slot to edit, NULL if a new slot is being added. |
Definition at line 69 of file TemplateSlotDialog.cc.
References TTAMachine::Machine::Navigator< ComponentType >::count(), and TTAMachine::Machine::Navigator< ComponentType >::item().
|
virtual |
|
private |
Creates the dialog window contents.
This method was generated with wxDesigner.
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 264 of file TemplateSlotDialog.cc.
|
private |
Creates a new tempalte slot based on the dialog widget values.
Definition at line 220 of file TemplateSlotDialog.cc.
References assert, TTAMachine::Machine::busNavigator(), TTAMachine::Machine::Navigator< ComponentType >::hasItem(), TTAMachine::Machine::Navigator< ComponentType >::item(), TTAMachine::Component::machine(), TTAMachine::Component::name(), and WxConversion::toString().
|
private |
Sets texts for widgets.
Definition at line 116 of file TemplateSlotDialog.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_DESTINATION, ProDeTextGenerator::TXT_LABEL_SLOT, ProDeTextGenerator::TXT_LABEL_WIDTH, and ProDeTextGenerator::TXT_TEMPLATE_SLOT_DIALOG_TITLE.
|
privatevirtual |
Transfers data from the InstructionTemplate object to the dialog widgets.
Definition at line 154 of file TemplateSlotDialog.cc.
References assert, TTAMachine::Machine::Navigator< ComponentType >::count(), TTAMachine::Machine::Navigator< ComponentType >::item(), and WxConversion::toWxString().
|
private |
Destination immediate unit.
Definition at line 77 of file TemplateSlotDialog.hh.
|
private |
Choice control fot the destination IU.
Definition at line 71 of file TemplateSlotDialog.hh.
|
private |
Parent instruction template of the slot.
Definition at line 67 of file TemplateSlotDialog.hh.
|
private |
Instruction template slot to edit.
Definition at line 65 of file TemplateSlotDialog.hh.
|
private |
Choice control for the slot.
Definition at line 69 of file TemplateSlotDialog.hh.
|
private |
Bit width of the slot.
Definition at line 75 of file TemplateSlotDialog.hh.
|
private |
Spin control for the width.
Definition at line 73 of file TemplateSlotDialog.hh.