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.

112 lines
2.2 KiB

  1. //
  2. // mxToolKit (c) 1999 by Mete Ciragan
  3. //
  4. // file: mxWidget.h
  5. // implementation: all
  6. // last modified: Apr 28 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_MXWIDGET
  15. #define INCLUDED_MXWIDGET
  16. #include "tier0/platform.h"
  17. enum
  18. {
  19. MX_BUTTON,
  20. MX_CHECKBOX,
  21. MX_CHOICE,
  22. MX_GLWINDOW,
  23. MX_MATSYSWINDOW,
  24. MX_GROUPBOX,
  25. MX_LABEL,
  26. MX_LINEEDIT,
  27. MX_LISTBOX,
  28. MX_MENU,
  29. MX_MENUBAR,
  30. MX_POPUPMENU,
  31. MX_PROGRESSBAR,
  32. MX_RADIOBUTTON,
  33. MX_SLIDER,
  34. MX_SCROLLBAR,
  35. MX_TAB,
  36. MX_TOGGLEBUTTON,
  37. MX_TREEVIEW,
  38. MX_WINDOW,
  39. MX_LISTVIEW,
  40. };
  41. class mxWindow;
  42. class mxWidget_i;
  43. class mxWidget
  44. {
  45. mxWidget_i *d_this;
  46. protected:
  47. void setHandle (void *handle);
  48. void setType (int type);
  49. void setParent (mxWindow *parentWindow);
  50. public:
  51. // CREATORS
  52. mxWidget (mxWindow *parent, int x, int y, int w, int h, const char *label = 0);
  53. virtual ~mxWidget ();
  54. // Called just before deletion during shutdown
  55. // Closing of application aborted if any control returns false
  56. virtual bool CanClose();
  57. virtual void OnDelete();
  58. // MANIPULATORS
  59. // void setBounds (int x, int y, int w, int h);
  60. //
  61. //
  62. void setBounds (int x, int y, int w, int h);
  63. // void setLabel (const char *label);
  64. //
  65. //
  66. void setLabel (const char *format, ... );
  67. void setVisible (bool b);
  68. void setEnabled (bool b);
  69. void setId (int id);
  70. void setUserData (void *userData);
  71. // ACCESSORS
  72. void *getHandle () const;
  73. int getType () const;
  74. mxWindow *getParent () const;
  75. int x () const;
  76. int y () const;
  77. int w () const;
  78. int h () const;
  79. int w2 () const;
  80. int h2 () const;
  81. const char *getLabel () const;
  82. bool isVisible () const;
  83. bool isEnabled () const;
  84. int getId () const;
  85. void *getUserData () const;
  86. private:
  87. // NOT IMPLEMENTED
  88. mxWidget (const mxWidget&);
  89. mxWidget& operator= (const mxWidget&);
  90. };
  91. #endif // INCLUDED_MXWIDGET