52 #ifdef CHECK_MEMORY_LEAKS
54 #endif // CHECK_MEMORY_LEAKS
78 const FXString& title,
80 const std::vector<
GUIGlID> &ids,
82 FXMainWindow(parent->getApp(), title, icon, NULL, DECOR_ALL, 20, 20, 300, 300),
87 FXVerticalFrame* layout1 =
new FXVerticalFrame(hbox, LAYOUT_FILL_X | LAYOUT_FILL_Y | LAYOUT_TOP, 0, 0, 0, 0, 4, 4, 4, 4);
89 FXVerticalFrame* style1 =
new FXVerticalFrame(layout1, LAYOUT_FILL_X | LAYOUT_FILL_Y | LAYOUT_TOP | FRAME_THICK | FRAME_SUNKEN, 0, 0, 0, 0, 0, 0, 0, 0);
90 myList =
new FXList(style1,
this,
MID_CHOOSER_LIST, LAYOUT_FILL_X | LAYOUT_FILL_Y | LIST_SINGLESELECT | FRAME_SUNKEN | FRAME_THICK);
91 for (std::vector<GUIGlID>::const_iterator i = ids.begin(); i != ids.end(); ++i) {
97 bool selected = myParent->isSelected(o);
100 myList->appendItem(name.c_str(), icon, (
void*) & (*myIDs.find(o->
getGlID())));
101 glStorage.unblockObject(*i);
104 FXVerticalFrame* layout =
new FXVerticalFrame(hbox, LAYOUT_TOP, 0, 0, 0, 0, 4, 4, 4, 4);
106 this,
MID_CHOOSER_CENTER, ICON_BEFORE_TEXT | LAYOUT_FILL_X | FRAME_THICK | FRAME_RAISED,
107 0, 0, 0, 0, 4, 4, 4, 4);
108 new FXHorizontalSeparator(layout, SEPARATOR_GROOVE | LAYOUT_FILL_X);
110 this,
MID_CHOOSER_FILTER, ICON_BEFORE_TEXT | LAYOUT_FILL_X | FRAME_THICK | FRAME_RAISED,
111 0, 0, 0, 0, 4, 4, 4, 4);
112 new FXHorizontalSeparator(layout, SEPARATOR_GROOVE | LAYOUT_FILL_X);
114 this,
MID_CANCEL, ICON_BEFORE_TEXT | LAYOUT_FILL_X | FRAME_THICK | FRAME_RAISED,
115 0, 0, 0, 0, 4, 4, 4, 4);
117 myParent->getParent()->addChild(
this);
118 myTextEntry->setFocus();
129 int selected =
myList->getCurrentItem();
151 myList->makeItemVisible(
id);
153 myList->setCurrentItem(
id,
true);
160 int current =
myList->getCurrentItem();
161 if (current >= 0 &&
myList->isItemSelected(current)) {
171 FXEvent*
event = (FXEvent*)ptr;
172 switch (event->code) {
186 std::vector<GUIGlID> selectedGlIDs;
187 std::vector<FXString> selectedMicrosimIDs;
188 const int numItems =
myList->getNumItems();
189 for (
int i = 0; i < numItems; i++) {
192 selectedGlIDs.push_back(glID);
193 selectedMicrosimIDs.push_back(
myList->getItemText(i));
197 const int numSelected = selectedGlIDs.size();
198 for (
int i = 0; i < numSelected; i++) {
199 myList->appendItem(selectedMicrosimIDs[i], flag, (
void*) & (*
myIDs.find(selectedGlIDs[i])));