Eclipse SUMO - Simulation of Urban MObility
MFXIconComboBox.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2006-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
14 //
15 /****************************************************************************/
16 
17 #ifndef MFXIconComboBox_h
18 #define MFXIconComboBox_h
19 
20 
21 // ===========================================================================
22 // included modules
23 // ===========================================================================
24 #include <config.h>
25 
26 #include <fx.h>
27 
28 
32 class MFXListItem : public FXListItem {
33  FXDECLARE(MFXListItem)
34 
35 public:
37  MFXListItem(const FXString& text, FXIcon* ic, FXColor _bgColor, void* ptr = NULL):
38  FXListItem(text, ic, ptr),
39  bgColor(_bgColor) {}
40  FXColor bgColor;
41 
42 
43  void draw(const FXList* list, FXDC& dc, FXint x, FXint y, FXint w, FXint h);
44 
45 protected:
46  MFXListItem(): FXListItem("", nullptr) {}
47 
48 };
49 
53 class MFXIconComboBox : public FXComboBox {
54 protected:
55  // FOX stuff
56  FXDECLARE(MFXIconComboBox)
58 public:
59 
61  MFXIconComboBox(FXComposite* p, FXint cols, FXObject* tgt = nullptr, FXSelector sel = 0, FXuint opts = COMBOBOX_NORMAL, FXint x = 0, FXint y = 0, FXint w = 0, FXint h = 0, FXint pl = DEFAULT_PAD, FXint pr = DEFAULT_PAD, FXint pt = DEFAULT_PAD, FXint pb = DEFAULT_PAD);
62 
64  virtual ~MFXIconComboBox() {};
65 
66  FXint appendIconItem(const FXString& text, FXIcon* icon, FXColor bgColor = FXRGBA(0, 0, 0, 0), void* ptr = NULL);
67 
68 };
69 
70 
71 
72 
73 #endif
MFXListItem::MFXListItem
MFXListItem(const FXString &text, FXIcon *ic, FXColor _bgColor, void *ptr=NULL)
Construct new item with given text, icon, and user-data.
Definition: MFXIconComboBox.h:37
MFXListItem::bgColor
FXColor bgColor
Definition: MFXIconComboBox.h:40
MFXIconComboBox::~MFXIconComboBox
virtual ~MFXIconComboBox()
Destructor.
Definition: MFXIconComboBox.h:64
MFXListItem::MFXListItem
MFXListItem()
Definition: MFXIconComboBox.h:46
MFXListItem
Definition: MFXIconComboBox.h:32
MFXIconComboBox::appendIconItem
FXint appendIconItem(const FXString &text, FXIcon *icon, FXColor bgColor=FXRGBA(0, 0, 0, 0), void *ptr=NULL)
Definition: MFXIconComboBox.cpp:86
MFXIconComboBox::MFXIconComboBox
MFXIconComboBox()
Definition: MFXIconComboBox.h:57
config.h
MFXListItem::draw
void draw(const FXList *list, FXDC &dc, FXint x, FXint y, FXint w, FXint h)
Definition: MFXIconComboBox.cpp:37
MFXIconComboBox
Definition: MFXIconComboBox.h:53