| 78 | } |
| 79 | |
| 80 | void MacroCommandDialog::PopulateOrExchange(ShuttleGui &S) |
| 81 | { |
| 82 | S.StartVerticalLay(true); |
| 83 | { |
| 84 | S.StartMultiColumn(4, wxEXPAND); |
| 85 | { |
| 86 | S.SetStretchyCol(1); |
| 87 | mCommand = S.AddTextBox(XXO("&Command"), wxT(""), 20); |
| 88 | mCommand->SetEditable(false); |
| 89 | mEditParams = S.Id(EditParamsButtonID) |
| 90 | .Disable() // disable button as box is empty |
| 91 | .AddButton(XXO("&Edit Parameters")); |
| 92 | mUsePreset = S.Id(UsePresetButtonID) |
| 93 | .Disable() // disable button as box is empty |
| 94 | .AddButton(XXO("&Use Preset")); |
| 95 | } |
| 96 | S.EndMultiColumn(); |
| 97 | |
| 98 | S.StartMultiColumn(2, wxEXPAND); |
| 99 | { |
| 100 | S.SetStretchyCol(1); |
| 101 | mParameters = S.AddTextBox(XXO("&Parameters"), wxT(""), 0); |
| 102 | mParameters->SetEditable(false); |
| 103 | auto prompt = XXO("&Details"); |
| 104 | S.Prop(0).AddPrompt(prompt); |
| 105 | mDetails = S |
| 106 | .Name( prompt ) |
| 107 | .AddTextWindow( wxT("")); |
| 108 | mDetails->SetEditable(false); |
| 109 | } |
| 110 | S.EndMultiColumn(); |
| 111 | |
| 112 | S.Prop(10).StartStatic(XO("Choose command"), true); |
| 113 | { |
| 114 | mChoices = S.Id(CommandsListID) |
| 115 | .Style( wxLC_LIST | wxLC_SINGLE_SEL) |
| 116 | .AddListControl(); |
| 117 | } |
| 118 | S.EndStatic(); |
| 119 | } |
| 120 | S.EndVerticalLay(); |
| 121 | |
| 122 | S.AddStandardButtons( eOkButton | eCancelButton | eHelpButton); |
| 123 | |
| 124 | PopulateCommandList(); |
| 125 | if (mChoices->GetItemCount() > 0) { |
| 126 | // set first item to be selected (and the focus when the |
| 127 | // list first becomes the focus) |
| 128 | mChoices->SetItemState(0, wxLIST_STATE_FOCUSED | wxLIST_STATE_SELECTED, |
| 129 | wxLIST_STATE_FOCUSED | wxLIST_STATE_SELECTED); |
| 130 | } |
| 131 | |
| 132 | SetMinSize(wxSize(780, 560)); |
| 133 | Fit(); |
| 134 | Center(); |
| 135 | } |
| 136 | |
| 137 | void MacroCommandDialog::PopulateCommandList() |
nothing calls this directly
no test coverage detected