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_WINDOW_CTRL_H 00024 #define INCLUDE_WINDOW_CTRL_H 00025 00026 #include "MyString.h" 00027 #include "MyDebug.h" 00028 #include "title.h" 00029 #include "container.h" 00030 #include "cubedock.h" 00031 #include "trackButton.h" 00032 00050 class ResizingAndRotateControl : public Control 00051 { 00052 private: 00053 int OnTrackButtonOver(Control *,int); 00054 TrackButton *trackButton; 00055 int OnNextFrame(Timer *timer); 00056 00057 public: 00058 BOOL canResize; 00059 BOOL canRotate; 00060 00061 ResizingAndRotateControl(); 00062 ~ResizingAndRotateControl(); 00063 int OnHover(StateMouse *mouse,int deltaX,int deltaY,int numFace); // La fenetre est survollé 00064 }; 00065 00071 class Window : public ResizingAndRotateControl 00072 { 00073 public: 00074 DockPos titleDock; 00075 Title title; 00076 Container client; 00077 00078 Window(); 00079 ~Window(); 00080 virtual void Create() { Create(DEFAULT_DEPTH_WINDOW); } 00081 void Create(double depth); 00082 void ToString(MyString &str); 00083 00084 int OnMouseWheel(StateMouse *mouse,int face); 00085 int OnClose(); // on a demander la fermeture 00086 int OnOver(StateMouse *mouse,int face); 00087 int OnLMRButton(StateMouse *,int); 00088 00089 }; 00090 00091 #endif