Creates the dialog and its contents.
| 209 | |
| 210 | /// Creates the dialog and its contents. |
| 211 | void LabelDialog::Populate() |
| 212 | { |
| 213 | |
| 214 | //------------------------- Main section -------------------- |
| 215 | ShuttleGui S(this, eIsCreating); |
| 216 | PopulateOrExchange(S); |
| 217 | // ----------------------- End of main section -------------- |
| 218 | |
| 219 | // Go populate the macros list. |
| 220 | PopulateLabels(); |
| 221 | |
| 222 | // Layout the works |
| 223 | Layout(); |
| 224 | //Fit(); |
| 225 | |
| 226 | // Resize width based on width of columns and the vertical scrollbar |
| 227 | wxRect r = mGrid->GetGridColLabelWindow()->GetRect(); |
| 228 | wxScrollBar sb(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSB_VERTICAL); |
| 229 | r.width += sb.GetSize().GetWidth() + 6; |
| 230 | |
| 231 | // Add the size of the right column of buttons too... |
| 232 | wxWindow * w = FindWindowById( ID_IMPORT, this ); |
| 233 | wxASSERT( w ); |
| 234 | if( w ) |
| 235 | r.width += w->GetSize().GetWidth(); |
| 236 | |
| 237 | SetClientSize(r.width, 300); |
| 238 | |
| 239 | // Make sure it doesn't go below this size |
| 240 | r = GetRect(); |
| 241 | SetSizeHints(r.GetWidth(), r.GetHeight()); |
| 242 | |
| 243 | // Bug 1465 |
| 244 | // There might be a saved size, in which case use that. |
| 245 | ReadSize(); |
| 246 | |
| 247 | // Center on display |
| 248 | Center(); |
| 249 | } |
| 250 | |
| 251 | void LabelDialog::PopulateOrExchange( ShuttleGui & S ) |
| 252 | { |
nothing calls this directly
no test coverage detected