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.

77 lines
2.2 KiB

  1. //
  2. // mxToolKit (c) 1999 by Mete Ciragan
  3. //
  4. // file: mxTreeView.h
  5. // implementation: all
  6. // last modified: Apr 12 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_MXTREEVIEW
  15. #define INCLUDED_MXTREEVIEW
  16. #ifndef INCLUDED_MXWIDGET
  17. #include "mxtk/mxWidget.h"
  18. #endif
  19. class mxWindow;
  20. typedef void *mxTreeViewItem;
  21. //typedef int __stdcall (*TreeSortFunc)(long lParam1, long lParam2, long lParamSort);
  22. class mxTreeView_i;
  23. class mxTreeView : public mxWidget
  24. {
  25. mxTreeView_i *d_this;
  26. public:
  27. // CREATORS
  28. mxTreeView (mxWindow *parent, int x, int y, int w, int h, int id = 0);
  29. virtual ~mxTreeView ();
  30. // MANIPULATORS
  31. mxTreeViewItem *add (mxTreeViewItem *parent, const char *item);
  32. void remove (mxTreeViewItem *item);
  33. void removeAll ();
  34. void setLabel (mxTreeViewItem *item, const char *label);
  35. void setUserData (mxTreeViewItem *item, void *userData);
  36. void setOpen (mxTreeViewItem *item, bool b);
  37. void setSelected (mxTreeViewItem *item, bool b);
  38. void setImageList( void *himagelist );
  39. void setImages(mxTreeViewItem *item, int imagenormal, int imageselected );
  40. void moveItemDown( mxTreeViewItem *item );
  41. void sortTree( mxTreeViewItem *parent, bool recurse,
  42. void *func, int parameter );
  43. void scrollTo( mxTreeViewItem *item );
  44. // ACCESSORS
  45. mxTreeViewItem *getFirstChild (mxTreeViewItem *item) const;
  46. mxTreeViewItem *getNextChild (mxTreeViewItem *item) const;
  47. mxTreeViewItem *getSelectedItem () const;
  48. const char *getLabel (mxTreeViewItem *item) const;
  49. void *getUserData (mxTreeViewItem *item) const;
  50. bool isOpen (mxTreeViewItem *item) const;
  51. bool isSelected (mxTreeViewItem *item) const;
  52. mxTreeViewItem *getParent (mxTreeViewItem *item) const;
  53. private:
  54. // NOT IMPLEMENTED
  55. mxTreeView (const mxTreeView&);
  56. mxTreeView& operator= (const mxTreeView&);
  57. };
  58. #endif // INCLUDED_MXTREEVIEW