35 #define SIDE_SPACING 6
36 #define ICON_SPACING 4
41 void MFXListItem::draw(const FXList* list, FXDC& dc, FXint xx, FXint yy, FXint ww, FXint hh) {
43 FXFont* font = list->getFont();
46 ih = icon->getHeight();
49 th = font->getFontHeight();
52 dc.setForeground(list->getSelBackColor());
53 }
else if (bgColor != FXRGBA(0, 0, 0, 0)) {
54 dc.setForeground(bgColor);
56 dc.setForeground(list->getBackColor());
58 dc.fillRectangle(xx, yy, ww, hh);
60 dc.drawFocusRectangle(xx + 1, yy + 1, ww - 2, hh - 2);
64 dc.drawIcon(icon, xx, yy + (hh - ih) / 2);
70 dc.setForeground(makeShadowColor(list->getBackColor()));
71 }
else if (isSelected()) {
72 dc.setForeground(list->getSelTextColor());
74 dc.setForeground(list->getTextColor());
76 dc.drawText(xx, yy + (hh - th) / 2 + font->getFontAscent(), label);
82 FXComposite* p, FXint cols, FXObject* tgt,
83 FXSelector sel, FXuint opts,
84 FXint x, FXint y, FXint w, FXint h,
85 FXint pl, FXint pr, FXint pt, FXint pb):
86 FXComboBox(p, cols, tgt, sel, opts, x, y, w, h, pl, pr, pt, pb)
91 FXint index = list->appendItem(
new MFXListItem(text, icon, bgColor, ptr));
92 if (isItemCurrent(getNumItems() - 1)) {
FXint appendIconItem(const FXString &text, FXIcon *icon, FXColor bgColor=FXRGBA(0, 0, 0, 0), void *ptr=NULL)