libyui  3.0.10
/usr/src/RPM/BUILD/libyui-3.0.10/src/YSlider.h
00001 /*
00002   Copyright (C) 2000-2012 Novell, Inc
00003   This library is free software; you can redistribute it and/or modify
00004   it under the terms of the GNU Lesser General Public License as
00005   published by the Free Software Foundation; either version 2.1 of the
00006   License, or (at your option) version 3.0 of the License. This library
00007   is distributed in the hope that it will be useful, but WITHOUT ANY
00008   WARRANTY; without even the implied warranty of MERCHANTABILITY or 
00009   FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
00010   License for more details. You should have received a copy of the GNU
00011   Lesser General Public License along with this library; if not, write
00012   to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
00013   Floor, Boston, MA 02110-1301 USA
00014 */
00015 
00016 
00017 /*-/
00018 
00019   File:         YSlider.h
00020 
00021   Author:       Stefan Hundhammer <sh@suse.de>
00022 
00023 /-*/
00024 
00025 #ifndef YSlider_h
00026 #define YSlider_h
00027 
00028 #include "YIntField.h"
00029 
00030 class YSliderPrivate;
00031 
00032 
00033 /**
00034  * Slider: Input widget for an integer value between a minimum and a maximum
00035  * value. Very similar to IntField in semantics, but with a graphical slider
00036  * that can be dragged to the desired value. It also contains an IntField to
00037  * allow entering the value directly.
00038  *
00039  * Don't confuse this widget with ProgressBar: ProgressBar is output-only.
00040  *
00041  *
00042  * This is an optional widget, i.e. not all UIs support it.
00043  **/
00044 class YSlider : public YIntField
00045 {
00046 protected:
00047     /**
00048      * Constructor.
00049      *
00050      * Create a Slider with 'label' as the caption, and the specified minimum
00051      * and maximum values.
00052      *
00053      * Note that YWidgetFactory::createSlider() also has an 'initialValue'
00054      * parameter that is not used here (because the current value is not stored
00055      * in this base class, but in the derived class).
00056      **/
00057     YSlider( YWidget *                  parent,
00058              const std::string &        label,
00059              int                        minValue,
00060              int                        maxValue );
00061 
00062 public:
00063     /**
00064      * Destructor.
00065      **/
00066     virtual ~YSlider();
00067 
00068     /**
00069      * Returns a descriptive name of this widget class for logging,
00070      * debugging etc.
00071      **/
00072     virtual const char * widgetClass() const { return "YSlider"; }
00073 
00074 private:
00075 
00076     ImplPtr<YSliderPrivate> priv;
00077 };
00078 
00079 
00080 #endif // YSlider_h
 All Classes Functions Variables Enumerations Friends