Main Page | Class Hierarchy | Class List | File List | Class Members

aedSpinner.h

00001 
00002 /*
00003  * The aedSpinner class
00004  * This class implements a spinner.
00005  * Initial design by Eduardo B. Fonseca <ebf@aedsolucoes.com.br>
00006  *
00007  * This library is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Library General Public
00009  * License as published by the Free Software Foundation; either
00010  * version 2 of the License, or (at your option) any later version.
00011  *
00012  * This library 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 GNU
00015  * Library General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Library General Public
00018  * License along with this library; if not, write to the Free
00019  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00020  *
00021  */
00022 #ifndef AEDSPINNER_H
00023 #define AEDSPINNER_H
00024 
00025 #include "aedWidget.h"
00026 #include "aedTextBox.h"
00027 #include "aedButton.h"
00028 
00029 
00030 class DLLEXPORT aedSpinner:public aedWidget
00031 {
00032   public:
00033     aedSpinner();
00034     virtual void create(aedWidget * parent = NULL, aedRect pos =
00035                         aedDEFAULTPOSITION, std::string caption = "");
00036 
00037     int wm_update(Uint32 msdelta);
00038     void incrementValue();
00039     void decrementValue();
00040 
00041     Sint32 getValue() const
00042     {
00043         return m_Value;
00044     }
00045     void setValue(Sint32 val);
00046 
00047     void setRange(Sint32 minval, Sint32 maxval);
00048     void getRange(Sint32 * minval, Sint32 * maxval) const
00049     {
00050         if(minval)
00051             *minval = m_Min;
00052         if(maxval)
00053             *maxval = m_Max;
00054     }
00055 
00056   private:
00057       Sint32 m_Value, m_Min, m_Max;
00058     aedButton m_ButtonUp, m_ButtonDown;
00059     aedTextBox m_TextBox;
00060 
00061     void textbox_change(void *caller, void *data);
00062     void buttonUpClicked(void *caller, void *data);
00063     void buttonDownClicked(void *caller, void *data);
00064 };
00065 
00066 #if defined(_MSC_VER)
00067 DLLEXTERN template DLLEXPORT aedFunctor1Arg < stub, aedSpinner >;
00068 #endif
00069 
00070 #endif /* AEDSPINNER_H */

Generated on Mon Mar 1 19:56:18 2004 for aedGUI by doxygen 1.3.6