nux-0.9.46
|
00001 /* 00002 * Copyright 2010 Inalogic® Inc. 00003 * 00004 * This program is free software: you can redistribute it and/or modify it 00005 * under the terms of the GNU Lesser General Public License, as 00006 * published by the Free Software Foundation; either version 2.1 or 3.0 00007 * of the License. 00008 * 00009 * This program is distributed in the hope that it will be useful, but 00010 * WITHOUT ANY WARRANTY; without even the implied warranties of 00011 * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR 00012 * PURPOSE. See the applicable version of the GNU Lesser General Public 00013 * License for more details. 00014 * 00015 * You should have received a copy of both the GNU Lesser General Public 00016 * License along with this program. If not, see <http://www.gnu.org/licenses/> 00017 * 00018 * Authored by: Jay Taoko <jaytaoko@inalogic.com> 00019 * 00020 */ 00021 00022 00023 #ifndef VECTOR3DOUBLEVALUATOR_H 00024 #define VECTOR3DOUBLEVALUATOR_H 00025 00026 #include "DoubleValidator.h" 00027 #include "Vector3Valuator.h" 00028 00029 namespace nux 00030 { 00031 00032 class EditTextBox; 00033 class StaticTextBox; 00034 class HLayout; 00035 00036 class Vector3DoubleValuator: public Vector3Valuator 00037 { 00038 public: 00039 Vector3DoubleValuator (double X = 0, double Y = 0, double Z = 0, double Step = 1, double MinValue = -1.7E308, double MaxValue = 1.7E308); 00040 ~Vector3DoubleValuator(); 00041 00042 virtual long ProcessEvent (IEvent &ievent, long TraverseInfo, long ProcessEventInfo); 00043 virtual void Draw (GraphicsEngine &GfxContext, bool force_draw); 00044 virtual void DrawContent (GraphicsEngine &GfxContext, bool force_draw); 00045 virtual void PostDraw (GraphicsEngine &GfxContext, bool force_draw); 00046 00047 virtual void ImplementIncrementX(); 00048 virtual void ImplementDecrementX(); 00049 virtual void ImplementIncrementY(); 00050 virtual void ImplementDecrementY(); 00051 virtual void ImplementIncrementZ(); 00052 virtual void ImplementDecrementZ(); 00053 virtual void ImplementValidateEntryX(); 00054 virtual void ImplementValidateEntryY(); 00055 virtual void ImplementValidateEntryZ(); 00056 00057 void SetVectorX (double value); 00058 void SetVectorY (double value); 00059 void SetVectorZ (double value); 00060 void SetValue (double x, double y, double z); 00061 double GetVectorX() const; 00062 double GetVectorY() const; 00063 double GetVectorZ() const; 00064 void SetStep (double i); 00065 double GetStep() const; 00066 double GetMinValue() const; 00067 double GetMaxValue() const; 00068 void SetRange (double MinValue, double Maxvalue); 00069 00070 sigc::signal<void, Vector3DoubleValuator *> sigIncrement; 00071 sigc::signal<void, Vector3DoubleValuator *> sigDecrement; 00072 sigc::signal<void, Vector3DoubleValuator *> sigValueChanged; 00073 sigc::signal<void, double, double, double> sigValue; 00074 private: 00075 HLayout *m_hlayout; 00076 00077 DoubleValidator m_DoubleValidator; 00078 double m_X; 00079 double m_Y; 00080 double m_Z; 00081 double m_Step; 00082 00083 StaticTextBox *m_XLabel; 00084 StaticTextBox *m_YLabel; 00085 StaticTextBox *m_ZLabel; 00086 }; 00087 00088 } 00089 00090 #endif // VECTOR3DOUBLEVALUATOR_H 00091