FLTK Imago
Main Page | Class List | File List | Class Members | File Members

Fl_SVG_Button.H

Go to the documentation of this file.
00001 // 00002 // This file is part of the FLTK Imago project 00003 // Copyright (C) 2002-2005 Chris Osgood 00004 // https://gurumeditation.org 00005 // 00006 // "$Id: Fl_SVG_Button.H 46 2005-01-04 04:09:52Z chris $" 00007 // 00008 // SVG button header file for the Fast Light Tool Kit (FLTK). 00009 // 00010 // This library is free software; you can redistribute it and/or 00011 // modify it under the terms of the GNU Library General Public 00012 // License as published by the Free Software Foundation; either 00013 // version 2 of the License, or (at your option) any later version. 00014 // 00015 // This library is distributed in the hope that it will be useful, 00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 // Library General Public License for more details. 00019 // 00020 // You should have received a copy of the GNU Library General Public 00021 // License along with this library; if not, write to the Free Software 00022 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 00023 // USA. 00024 // 00025 // Please report all bugs and problems to "1qp1z0e8 at duck.com" 00026 // 00027 00028 #ifndef Fl_SVG_Button_H 00029 #define Fl_SVG_Button_H 00030 00031 #include <FL/Fl_Button.H> 00032 #include "Fl_SVG_Image.H" 00033 00034 #ifndef IMAGO_EXPORT 00035 #define IMAGO_EXPORT 00036 #endif 00037 00038 class Fl_SVG_Button : public Fl_Button 00039 { 00040 private: 00041 Fl_SVG_Image* up_image_; // Normal button image (required) 00042 Fl_SVG_Image* down_image_; // "Pressed" image (optional) 00043 Fl_SVG_Image* focus_image_; // Widget has focus (optional) 00044 Fl_SVG_Image* highlight_image_; // Mouse is over widget (optional) 00045 bool focus_highlight_; 00046 00047 public: 00048 IMAGO_EXPORT Fl_SVG_Button(int X, int Y, int W, int H, const char* label = 0); 00049 IMAGO_EXPORT virtual ~Fl_SVG_Button(); 00050 00051 IMAGO_EXPORT virtual int handle(int); 00052 IMAGO_EXPORT void up_image(Fl_SVG_Image* img); 00053 IMAGO_EXPORT void down_image(Fl_SVG_Image* img); 00054 IMAGO_EXPORT void focus_image(Fl_SVG_Image* img); 00055 IMAGO_EXPORT void highlight_image(Fl_SVG_Image* img); 00056 IMAGO_EXPORT const Fl_SVG_Image* image() const { return up_image_; } 00057 IMAGO_EXPORT const Fl_SVG_Image* down_image() const { return down_image_; } 00058 IMAGO_EXPORT const Fl_SVG_Image* focus_image() const { return focus_image_; } 00059 IMAGO_EXPORT const Fl_SVG_Image* highlight_image() const { return highlight_image_; } 00060 00061 protected: 00062 IMAGO_EXPORT virtual void draw(); 00063 }; 00064 00065 #endif // Fl_SVG_Button_H

Generated on Mon Jan 10 16:50:17 2005 for FLTK Imago by doxygen 1.3.7