FLTK 1.3.2
|
00001 // 00002 // "$Id$" 00003 // 00004 // Dial header file for the Fast Light Tool Kit (FLTK). 00005 // 00006 // Copyright 1998-2010 by Bill Spitzak and others. 00007 // 00008 // This library is free software. Distribution and use rights are outlined in 00009 // the file "COPYING" which should have been included with this file. If this 00010 // file is missing or damaged, see the license at: 00011 // 00012 // http://www.fltk.org/COPYING.php 00013 // 00014 // Please report all bugs and problems on the following page: 00015 // 00016 // http://www.fltk.org/str.php 00017 // 00018 00019 /* \file 00020 Fl_Dial widget . */ 00021 00022 #ifndef Fl_Dial_H 00023 #define Fl_Dial_H 00024 00025 #ifndef Fl_Valuator_H 00026 #include "Fl_Valuator.H" 00027 #endif 00028 00029 // values for type(): 00030 #define FL_NORMAL_DIAL 0 00031 #define FL_LINE_DIAL 1 00032 #define FL_FILL_DIAL 2 00047 class FL_EXPORT Fl_Dial : public Fl_Valuator { 00048 00049 short a1,a2; 00050 00051 protected: 00052 00053 // these allow subclasses to put the dial in a smaller area: 00054 void draw(int X, int Y, int W, int H); 00055 int handle(int event, int X, int Y, int W, int H); 00056 void draw(); 00057 00058 public: 00059 00060 int handle(int); 00065 Fl_Dial(int x,int y,int w,int h, const char *l = 0); 00072 short angle1() const {return a1;} 00074 void angle1(short a) {a1 = a;} 00076 short angle2() const {return a2;} 00078 void angle2(short a) {a2 = a;} 00080 void angles(short a, short b) {a1 = a; a2 = b;} 00081 00082 }; 00083 00084 #endif 00085 00086 // 00087 // End of "$Id$". 00088 //