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.

97 lines
2.0 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //=============================================================================//
  8. //
  9. // Half-Life Model Viewer (c) 1999 by Mete Ciragan
  10. //
  11. // file: FileAssociation.h
  12. // last modified: Apr 28 1999, Mete Ciragan
  13. // copyright: The programs and associated files contained in this
  14. // distribution were developed by Mete Ciragan. The programs
  15. // are not in the public domain, but they are freely
  16. // distributable without licensing fees. These programs are
  17. // provided without guarantee or warrantee expressed or
  18. // implied.
  19. //
  20. // version: 1.2
  21. //
  22. // email: [email protected]
  23. // web: http://www.swissquake.ch/chumbalum-soft/
  24. //
  25. #ifndef INCLUDED_FILEASSOCIATION
  26. #define INCLUDED_FILEASSOCIATION
  27. #ifndef INCLUDED_MXWINDOW
  28. #include <mxtk/mxWindow.h>
  29. #endif
  30. #define IDC_EXTENSION 1001
  31. #define IDC_ADD 1002
  32. #define IDC_REMOVE 1003
  33. #define IDC_ACTION1 1004
  34. #define IDC_ACTION2 1005
  35. #define IDC_ACTION3 1006
  36. #define IDC_ACTION4 1007
  37. #define IDC_PROGRAM 1008
  38. #define IDC_CHOOSEPROGRAM 1009
  39. #define IDC_OK 1010
  40. #define IDC_CANCEL 1011
  41. typedef struct
  42. {
  43. char extension[16];
  44. char program[256];
  45. int association;
  46. } association_t;
  47. class mxChoice;
  48. class mxRadioButton;
  49. class mxLineEdit;
  50. class mxButton;
  51. class FileAssociation : public mxWindow
  52. {
  53. mxChoice *cExtension;
  54. mxRadioButton *rbAction[4];
  55. mxLineEdit *leProgram;
  56. mxButton *bChooseProgram;
  57. association_t d_associations[16];
  58. void initAssociations ();
  59. void saveAssociations ();
  60. public:
  61. // CREATORS
  62. FileAssociation ();
  63. virtual ~FileAssociation ();
  64. // MANIPULATORS
  65. int handleEvent (mxEvent *event);
  66. void setAssociation (int index);
  67. // ACCESSORS
  68. int getMode (char *extension);
  69. char *getProgram (char *extension);
  70. };
  71. extern FileAssociation *g_FileAssociation;
  72. #endif // INCLUDED_FILEASSOCIATION