Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

dropzone.h

Go to the documentation of this file.
00001 #ifndef DROPZONE_INCLUDED
00002 #define DROPZONE_INCLUDED
00003 
00004 //
00005 //  define a drop-zone, which can be used to over-ride
00006 //  drop-behaviour for any card stacks which fall under it
00007 //
00008 
00009 class CardStack;
00010 
00011 class DropZone
00012 {
00013     friend class CardWindow;
00014 
00015     DropZone(int Id, RECT *rect, pDropZoneProc proc) :
00016       id(Id), DropZoneCallback(proc) { CopyRect(&zone, rect); }
00017 
00018 public:
00019 
00020     void SetZone(RECT *rect) { CopyRect(&zone, rect); }
00021     void GetZone(RECT *rect) { CopyRect(rect, &zone); }
00022     void SetCallback(pDropZoneProc callback) { DropZoneCallback = callback; }
00023 
00024     int  DropCards(CardStack &cardstack)
00025     {
00026         if(DropZoneCallback)
00027             return DropZoneCallback(id, cardstack);
00028         else
00029             return -1;
00030     }
00031 
00032 private:
00033 
00034     int  id;
00035     RECT zone;
00036     pDropZoneProc DropZoneCallback;
00037 };
00038 
00039 #endif

Generated on Thu Feb 9 04:59:29 2012 for ReactOS by doxygen 1.6.3

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.