void JXDisplayMenu::BuildMenu() { RemoveAllItems(); JXApplication* app = JXGetApplication(); const JSize count = app->GetDisplayCount(); for (JIndex i=1; i<=count; i++) { JXDisplay* display = app->GetDisplay(i); AppendItem(display->GetName(), kRadioType); } ShowSeparatorAfter(count); AppendItem(kNewDisplayStr); itsNewDisplayIndex = count+1; SetUpdateAction(kDisableNone); const JBoolean found = (JXGetApplication())->GetDisplayIndex(GetDisplay(), &itsDisplayIndex); assert( found ); ListenTo(this); ListenTo( (JXGetApplication())->GetDisplayList() ); }