Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

trackButton.h

Go to the documentation of this file.
00001 /* ***********************************************************************************
00002         Writer:         Sebastien Bloc
00003         Copyright:      2003-2004
00004         eMail:          sebastien.bloc@free.fr
00005         URL:            http://mignonsoft.free.fr
00006         
00007         This program is free software; you can redistribute it and/or
00008         modify it under the terms of the GNU General Public License
00009         as published by the Free Software Foundation; either version 2
00010         of the License, or (at your option) any later version.
00011 
00012         This program is distributed in the hope that it will be useful,
00013         but WITHOUT ANY WARRANTY; without even the implied warranty of
00014         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015         GNU General Public License for more details.
00016         http://www.gnu.org/copyleft/gpl.html
00017 *********************************************************************************** */
00018 
00023 #ifndef INCLUDE_TRACK_BUTTON_H
00024 #define INCLUDE_TRACK_BUTTON_H
00025 
00026 #include "control.h"
00027 
00028 class EventTrackButton
00029 {
00030 public:
00031         signal0<> rotate; // call: void OnRotate();
00032         signal1<double> resize; // call: void OnResize(double nbTexel);
00033         signal1<double> translate; // call: void OnTranslate(double nbTexel);
00034 };
00035 
00041 class TrackButton : public Control
00042 {
00043 private:
00044         void ApplyMode();
00045         void Config(int (TrackButton::*onClickFace)(StateMouse *,int),Texture *texture,double angleZ);
00046         BOOL canResize;
00047         BOOL canRotate;
00048         BOOL isMoving;
00049 
00050 public:
00051         // varaible membre
00052         DockPos orientation;            
00053         // evenements
00054         EventTrackButton onTrackButton;
00055 
00056         TrackButton();
00057         ~TrackButton();
00058 
00059         virtual void Create() { Create(DEFAULT_SIZE_TRACK_BUTTON); } // Createur pour container
00060         BOOL Create(double size);
00061         void ToString(MyString &str);
00062 
00063         void SetMode(DockPos newOrientation);
00064         void SetResizeAndRotate(BOOL resize,BOOL rotate);
00065 
00066 
00067         int OnButtonClick();
00068         int OnMouseMove(StateMouse *mouse,int deltaX,int deltaY,int face);
00069         int OnOverOut(Control *newControl,int face);
00070 
00071         int OnClickLeft(StateMouse *,int);
00072         int OnClickRight(StateMouse *,int);
00073         int OnClickTop(StateMouse *,int);
00074         int OnClickBottom(StateMouse *,int);
00075         int OnClickLeftTop(StateMouse *,int);
00076         int OnClickLeftBottom(StateMouse *,int);
00077         int OnClickRightTop(StateMouse *,int);
00078         int OnClickRightBottom(StateMouse *,int);
00079 };
00080 
00081 #endif

Generated on Fri Aug 20 19:19:50 2004 for 3d Controls by doxygen 1.3.6