GTK+ IOStream  Beta
<< GTK+ >> add C++ IOStream operators to GTK+. Now with extra abilities ... like network serialisation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Slider.H
Go to the documentation of this file.
1 /* Copyright 2000-2013 Matt Flax <flatmax@flatmax.org>
2  This file is part of GTK+ IOStream class set
3 
4  GTK+ IOStream is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or
7  (at your option) any later version.
8 
9  GTK+ IOStream is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You have received a copy of the GNU General Public License
15  along with GTK+ IOStream
16  */
17 #ifndef SLIDER_H_
18 #define SLIDER_H_
19 
20 #include <iomanip>
21 #include <gtk/gtk.h>
22 
23 class Slider {
24 public:
25  GtkWidget *slider;
26 public:
27  GtkWidget* getWidget(void){return slider;}
28  void show(void){gtk_widget_show(slider);}
29  void hide(void){gtk_widget_hide(slider);}
30 
31  ~Slider(void){
32  // gtk_widget_destroy(slider);
33  //#ifdef DEBUG
34  // cout<<"Slider::~Slider"<<endl;
35  //#endif
36  }
37 };
38 
39 class VSlider : public Slider {
40 public:
41  VSlider(int min, int max, int step){
42  slider = gtk_vscale_new_with_range(min,max,step);
43  }
44 };
45 
46 class HSlider : public Slider {
47 public:
49  slider = gtk_hscale_new_with_range(min,max,step);
50  }
51 };
52 
53 #endif //SLIDER_H_