31 #define SIDE_SPACING 6 // Left or right spacing between items
32 #define ICON_SPACING 4 // Spacing between icon and label
37 void MFXListItem::draw(const FXList* list, FXDC& dc, FXint xx, FXint yy, FXint ww, FXint hh) {
39 FXFont* font = list->getFont();
42 ih = icon->getHeight();
45 th = font->getFontHeight();
48 dc.setForeground(list->getSelBackColor());
49 }
else if (bgColor != FXRGBA(0, 0, 0, 0)) {
50 dc.setForeground(bgColor);
52 dc.setForeground(list->getBackColor());
54 dc.fillRectangle(xx, yy, ww, hh);
56 dc.drawFocusRectangle(xx + 1, yy + 1, ww - 2, hh - 2);
60 dc.drawIcon(icon, xx, yy + (hh - ih) / 2);
66 dc.setForeground(makeShadowColor(list->getBackColor()));
67 }
else if (isSelected()) {
68 dc.setForeground(list->getSelTextColor());
70 dc.setForeground(list->getTextColor());
72 dc.drawText(xx, yy + (hh - th) / 2 + font->getFontAscent(), label);
78 FXComposite* p, FXint cols, FXObject* tgt,
79 FXSelector sel, FXuint opts,
80 FXint x, FXint y, FXint w, FXint h,
81 FXint pl, FXint pr, FXint pt, FXint pb):
82 FXComboBox(p, cols, tgt, sel, opts, x, y, w, h, pl, pr, pt, pb)
87 FXint index = list->appendItem(
new MFXListItem(text, icon, bgColor, ptr));
88 if (isItemCurrent(getNumItems() - 1)) {