home *** CD-ROM | disk | FTP | other *** search
- /*
- * flletterboxpad.h
- *
- * Copyright (C) Alberto Vigata - January 2000
- *
- * This file is part of FlasKMPEG, a free MPEG to MPEG/AVI converter
- *
- * FlasKMPEG is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * FlasKMPEG is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Make; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-
- #ifndef FLLETTERBOXPAD_H
- #define FLLETTERBOXPAD_H
-
- #include "flarea.h"
- #include "letterbox.h"
-
- class FlLetterboxPad
- {
- public:
-
- // area types
- enum {
- left, right, top, bottom
- };
-
- FlLetterboxPad();
- bool SetConfig( int nWidth, int nHeight, TLetterboxConfig *cfg );
- TLetterboxConfig *GetConfig(){ return &m_cfg; }
- bool OnDrag( int x, int y );
- bool OnHover( int x, int y, LPCTSTR &mousetype);
- bool OnClick( int x, int y );
- bool OnRelease();
-
- private:
- bool BuildAreas();
- bool Notify( int x, int y, int nType );
- int SnapCoordinate( int c, int oldc );
-
- bool m_bLocked; // area locked
- int m_nLockedType; // locked type
- int m_clx,m_cly; // clicked point
- FlArea m_vAreas[4];
- int m_nWidth, m_nHeight;
- TLetterboxConfig m_cfg;
- };
-
-
- #endif