Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
1.5 KiB

  1. //
  2. // mxToolKit (c) 1999 by Mete Ciragan
  3. //
  4. // file: mxListBox.h
  5. // implementation: all
  6. // last modified: Mar 14 1999, Mete Ciragan
  7. // copyright: The programs and associated files contained in this
  8. // distribution were developed by Mete Ciragan. The programs
  9. // are not in the public domain, but they are freely
  10. // distributable without licensing fees. These programs are
  11. // provided without guarantee or warrantee expressed or
  12. // implied.
  13. //
  14. #ifndef INCLUDED_MXLIST
  15. #define INCLUDED_MXLIST
  16. #ifndef INCLUDED_MxWIDGET
  17. #include "mxtk/mxWidget.h"
  18. #endif
  19. class mxWindow;
  20. class mxListBox_i;
  21. class mxListBox : public mxWidget
  22. {
  23. mxListBox_i *d_this;
  24. public:
  25. // ENUMS
  26. enum { Normal, MultiSelection };
  27. // CREATORS
  28. mxListBox (mxWindow *parent, int x, int y, int w, int h, int id = 0, int style = 0);
  29. virtual ~mxListBox ();
  30. // MANIPULATORS
  31. void add (const char *item);
  32. void select (int index);
  33. void deselect (int index);
  34. void remove (int index);
  35. void removeAll ();
  36. void setItemText (int index, const char *text);
  37. void setItemData (int index, void *data);
  38. // ACCESSORS
  39. int getItemCount () const;
  40. int getSelectedIndex () const;
  41. bool isSelected (int index) const;
  42. const char *getItemText (int index) const;
  43. void *getItemData (int index) const;
  44. int getTopIndex () const;
  45. private:
  46. // NOT IMPLEMENTED
  47. mxListBox (const mxListBox&);
  48. mxListBox& operator= (const mxListBox&);
  49. };
  50. #endif // INCLUDED_MXLISTBOX