home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2004 March / PCWELT_3_2004.ISO / pcwsoft / flaskmpeg_078_39_src.z.exe / flaskmpeg / flcroppad.h < prev    next >
Encoding:
C/C++ Source or Header  |  2002-10-28  |  1.7 KB  |  64 lines

  1. /* 
  2.  *  flcroppad.h
  3.  *
  4.  *    Copyright (C) Alberto Vigata - January 2000
  5.  *
  6.  *  This file is part of FlasKMPEG, a free MPEG to MPEG/AVI converter
  7.  *    
  8.  *  FlasKMPEG is free software; you can redistribute it and/or modify
  9.  *  it under the terms of the GNU General Public License as published by
  10.  *  the Free Software Foundation; either version 2, or (at your option)
  11.  *  any later version.
  12.  *   
  13.  *  FlasKMPEG is distributed in the hope that it will be useful,
  14.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16.  *  GNU General Public License for more details.
  17.  *   
  18.  *  You should have received a copy of the GNU General Public License
  19.  *  along with GNU Make; see the file COPYING.  If not, write to
  20.  *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 
  21.  *
  22.  */
  23.  
  24.  
  25. #ifndef FLCROPPAD_H
  26. #define FLCROPPAD_H
  27.  
  28. #include "flarea.h"
  29. #include "crop.h"
  30.  
  31. class FlCropPad
  32. {
  33. public:
  34.  
  35.   // area types
  36.   enum {
  37.     topleft, top, topright,
  38.     left, center, right,
  39.     bottomleft, bottom, bottomright
  40.   };
  41.  
  42.   FlCropPad();
  43.   bool SetConfig( int nWidth, int nHeight, TCropConfig *cfg );
  44.   TCropConfig *GetConfig(){ return &m_cfg; }
  45.   bool OnDrag( int x, int y );
  46.   bool OnHover( int x, int y, LPCTSTR &mousetype);
  47.   bool OnClick( int x, int y );
  48.   bool OnRelease();
  49.  
  50. private:
  51.   bool BuildAreas();
  52.   bool Notify( int x, int y, int nType );
  53.   int SnapCoordinate( int c, int oldc );
  54.  
  55.   bool m_bLocked; // area locked
  56.   int m_nLockedType; // locked type
  57.   int m_clx,m_cly; // clicked point
  58.   FlArea m_vAreas[9];
  59.   int m_nWidth, m_nHeight;
  60.   TCropConfig m_cfg;
  61. };
  62.  
  63.  
  64. #endif