home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / flash078.zip / flashsource-r0_7_8.zip / FButton.h < prev    next >
C/C++ Source or Header  |  2001-05-05  |  2KB  |  87 lines

  1. #ifndef FBUTTON_H_FILE
  2. #define FBUTTON_H_FILE
  3.  
  4.  
  5. #include <vector>
  6.  
  7. #include "FBase.h"
  8. #include "FShape.h"
  9. #include "FAction.h"
  10.  
  11. #define FBR_HIT_TEST (1<<3)
  12. #define FBR_DOWN     (1<<2)
  13. #define FBR_OVER     (1<<1)
  14. #define FBR_UP       (1)
  15.  
  16.  
  17. class FlashTagDefineButton;
  18. class FlashTagDefineButton2;
  19.  
  20. class FlashButtonRecord : public FlashVersionEnabled
  21. {
  22. DEFINE_RW_INTERFACE
  23. public:
  24.     FlashButtonRecord(UWORD _charID, UWORD _depth, char _validstates, FlashMatrix &_matrix,
  25.         FlashColorTransform &_cfx);
  26.     
  27.     friend std::ostream &operator<< (std::ostream &out, FlashButtonRecord &data);
  28.     friend std::istream &operator>> (std::istream &in,  FlashButtonRecord &data);
  29.  
  30. private:
  31.     FlashButtonRecord()  {}    
  32.     
  33.     friend std::istream &operator>> (std::istream &in,  FlashTagDefineButton &data);
  34.     friend std::istream &operator>> (std::istream &in,  FlashTagDefineButton2 &data);
  35.  
  36.     UWORD charID;
  37.     UWORD depth;
  38.     char validstates;
  39.     FlashMatrix matrix;
  40.     FlashColorTransform cfx;
  41. };
  42.  
  43. class FlashTagDefineButton : public FlashTag, public FlashIDEnabled
  44. {
  45. DEFINE_RW_INTERFACE
  46. public:
  47.     FlashTagDefineButton() {}
  48.     ~FlashTagDefineButton() { }
  49.     
  50.     void AddButtonRecord(FlashButtonRecord *r);
  51.     void AddActionRecord(FlashActionRecord *r);
  52. private:
  53.     friend std::ostream &operator<< (std::ostream &out, FlashTagDefineButton &data);
  54.     friend std::istream &operator>> (std::istream &in,  FlashTagDefineButton &data);
  55.  
  56.     std::vector<FlashButtonRecord*> buttonrecords;
  57.     std::vector<FlashActionRecord*> actionrecords;
  58.  
  59.     gc_vector<FlashButtonRecord*> gcbuttonrecords;
  60.     gc_vector<FlashActionRecord*> gcactionrecords;
  61.  
  62.  
  63. };
  64.  
  65. class FlashTagDefineButton2 : public FlashTag, public FlashIDEnabled
  66. {    
  67. DEFINE_RW_INTERFACE
  68. public:
  69.     FlashTagDefineButton2(bool _menu) : menu(_menu) {}
  70.     ~FlashTagDefineButton2();
  71.     void AddButtonRecord(FlashButtonRecord *r);
  72.     void AddActionRecords(std::vector<FlashActionRecord *> &r, UWORD conditionflags);    
  73. private:
  74.     friend std::ostream &operator<< (std::ostream &out, FlashTagDefineButton2 &data);
  75.     friend std::istream &operator>> (std::istream &in,  FlashTagDefineButton2 &data);
  76.  
  77.     bool menu;
  78.     std::vector<FlashButtonRecord *> buttonrecords;
  79.     
  80.     std::vector<flash_pair<std::vector<FlashActionRecord*>, UWORD> > actionrecords;
  81.  
  82.     gc_vector<FlashButtonRecord*> gcbuttonrecords;
  83.     gc_vector<FlashActionRecord*> gcactionrecords;
  84.  
  85. };
  86. #endif
  87.