+ wxPoint pt = handlerDialog->ConvertPixelsToDialog(wxPoint(x, y));
+
+ // Convert back so we've rounded down
+ pt = handlerDialog->ConvertDialogToPixels(pt);
+ pt = handlerDialog->ConvertPixelsToDialog(pt);
+ pt = handlerDialog->ConvertDialogToPixels(pt);
+ x = pt.x;
+ y = pt.y;
+ }
+
+ switch (wxResourceManager::GetCurrentResourceManager()->GetEditorControlList()->GetSelection())
+ {
+ case RESED_BUTTON:
+ resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxButton", x, y);
+ break;
+ case RESED_BMPBUTTON:
+ resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxBitmapButton", x, y, TRUE);
+ break;
+ case RESED_STATICTEXT:
+ resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxStaticText", x, y);
+ break;
+ case RESED_STATICBMP:
+ resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxStaticBitmap", x, y, TRUE);
+ break;
+ case RESED_TEXTCTRL_SINGLE:
+ resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxTextCtrl (single-line)", x, y);
+ break;
+ case RESED_TEXTCTRL_MULTIPLE:
+ resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxTextCtrl (multi-line)", x, y);
+ break;
+ case RESED_CHOICE:
+ resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxChoice", x, y);
+ break;
+ case RESED_COMBOBOX:
+ resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxComboBox", x, y);
+ break;
+ case RESED_CHECKBOX:
+ resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxCheckBox", x, y);
+ break;
+ case RESED_RADIOBOX:
+ resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxRadioBox", x, y);
+ break;
+ case RESED_RADIOBUTTON:
+ resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxRadioButton", x, y);
+ break;
+ case RESED_LISTBOX:
+ resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxListBox", x, y);
+ break;
+ case RESED_SLIDER:
+ resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxSlider", x, y);
+ break;
+ case RESED_GAUGE:
+ resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxGauge", x, y);
+ break;
+ case RESED_STATICBOX:
+ resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxStaticBox", x, y);
+ break;
+ case RESED_SCROLLBAR:
+ resourceManager->CreatePanelItem(handlerResource, handlerDialog, "wxScrollBar", x, y);
+ break;
+ default:
+ break;
+ }
+
+ // Now switch pointer on.
+ if (wxResourceManager::GetCurrentResourceManager()->GetEditorControlList()->GetSelection() != RESED_POINTER)
+ {
+ wxResourceManager::GetCurrentResourceManager()->GetEditorControlList()->SetItemState(RESED_POINTER, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);