2009-08-17 10:41:51 +00:00
|
|
|
/***************************************************************************
|
|
|
|
|
|
|
|
gspinbox.h
|
|
|
|
|
|
|
|
(c) 2000-2009 Benoît Minisini <gambas@users.sourceforge.net>
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2, or (at your option)
|
|
|
|
any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
|
|
|
|
***************************************************************************/
|
2007-12-30 16:41:49 +00:00
|
|
|
#ifndef __GSPINBOX_H
|
|
|
|
#define __GSPINBOX_H
|
|
|
|
|
|
|
|
class gSpinBox : public gControl
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
gSpinBox(gContainer *parent);
|
|
|
|
|
|
|
|
//"Properties"
|
2009-11-30 04:30:37 +00:00
|
|
|
int maxValue() const { return _max; }
|
|
|
|
int minValue() const { return _min; }
|
|
|
|
int step();
|
|
|
|
int value();
|
2007-12-30 16:41:49 +00:00
|
|
|
bool wrap();
|
2009-11-30 04:30:37 +00:00
|
|
|
bool hasBorder() const;
|
2007-12-30 16:41:49 +00:00
|
|
|
|
2009-11-30 04:30:37 +00:00
|
|
|
void setMaxValue (int vl);
|
|
|
|
void setMinValue (int vl);
|
|
|
|
void setStep (int vl);
|
|
|
|
void setValue (int vl);
|
2007-12-30 16:41:49 +00:00
|
|
|
void setWrap (bool vl);
|
2009-11-30 04:30:37 +00:00
|
|
|
void setBorder(bool vl);
|
2007-12-30 16:41:49 +00:00
|
|
|
|
|
|
|
//"Methods"
|
|
|
|
void selectAll();
|
|
|
|
|
|
|
|
//"Signals"
|
|
|
|
void (*onChange) (gSpinBox *sender);
|
|
|
|
|
|
|
|
//"Private"
|
|
|
|
private:
|
|
|
|
int _min;
|
|
|
|
int _max;
|
|
|
|
virtual void updateCursor(GdkCursor *cursor);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|