00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00023 #ifndef INCLUDE_TITLE_H
00024 #define INCLUDE_TITLE_H
00025
00026 #include "MyString.h"
00027 #include "button.h"
00028 #include "textBox.h"
00029
00030
00031 typedef enum { original , maximize , minimize } StateTitle;
00032
00033 [event_source(native)]
00034 class EventTitle
00035 {
00036 public:
00037 __event void Move(Point3D<double> pos,BOOL asAbsolute);
00038 __event void Rotate(Point2D<double> angle,BOOL asAbsolute);
00039 __event void Min();
00040 __event void Max();
00041 __event void Close();
00042 __event void GotFocus();
00043 __event void LostFocus();
00044 };
00045
00051 [event_receiver(native)]
00052 class Title : public TextTexture , public Control
00053 {
00054 public:
00055
00056 Button btnMin,btnMax,btnClose;
00057
00058
00059 BOOL focused;
00060 BOOL isActiveMin;
00061 BOOL isActiveMax;
00062 BOOL isActiveClose;
00063
00064 Point3D<double> originalSize,originalAngle;
00065
00066 StateTitle state;
00067 StateMouse oldMouse;
00068 EventTitle onTitle;
00069
00070 Title();
00071 virtual void Create() { Create(DEFAULT_DELTAZ_TITLE); }
00072 void Create(double deltaZ);
00073 void ToString(MyString &str);
00074 void Move(Point3D<double> pos,BOOL asAbsolute);
00075 void Move(double x,double y,double z,BOOL asAbsolute);
00076 void Rotate(double x,double y,BOOL asAbsolute);
00077 void Rotate(Point2D<double> angle,BOOL asAbsolute);
00078 void Original();
00079 void GotFocus();
00080 void LostFocus();
00081 void operator=(char *newText) { SetText(newText); };
00082
00083 void OnClick(StateMouse *mouse,int face);
00084 void OnLMButtonDown(StateMouse *mouse,int face);
00085 void OnMaxOrOriginal(StateMouse *mouse,int face);
00086 void OnMouseMove (StateMouse *mouse,int face);
00087 void OnMouseWheel(StateMouse *mouse,int face);
00088 void OnMin();
00089 void OnMax();
00090 void OnClose();
00091 void OnKeyDown(StateKey *key,int face);
00092 void OnKeyUp(StateKey *key,int face);
00093 };
00094
00095 #endif