summaryrefslogtreecommitdiffstats
path: root/src/gui/listboxtext.h
blob: 03edc95c3d8c1d1c2508c328e352b71cb9683422 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/***************************************************************************
    copyright            : (C) 2005-2006 by Robby Stephenson
    email                : [email protected]
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of version 2 of the GNU General Public License as  *
 *   published by the Free Software Foundation;                            *
 *                                                                         *
 ***************************************************************************/

#ifndef TELLICO_GUI_LISTBOXTEXT_H
#define TELLICO_GUI_LISTBOXTEXT_H

#include <tqlistbox.h>

namespace Tellico {
  namespace GUI {

/**
 * ListBoxText subclasses TQListBoxText so that @ref setText() can be made public,
 * and the font color can be changed
 *
 * @author Robby Stephenson
 */
class ListBoxText : public TQListBoxText {
public:
  ListBoxText(TQListBox* listbox, const TQString& text);
  ListBoxText(TQListBox* listbox, const TQString& text, TQListBoxItem* after);

  virtual int width(const TQListBox* box) const;
  virtual int height(const TQListBox* box) const;

  bool isColored() const { return m_colored; }
  void setColored(bool colored);
  void setText(const TQString& text);

protected:
  virtual void paint(TQPainter* painter);

private:
  bool m_colored;
};

  } // end namespace
} // end namespace

#endif