source: NonGTP/glut/FLTK/include/fltk/ShapedWindow.h @ 814

Revision 814, 1.6 KB checked in by gumbau, 18 years ago (diff)

Glut initial import used by Geometry modules

Line 
1// "$Id: ShapedWindow.h 3743 2004-08-02 07:35:18Z spitzak $"
2//
3// Copyright 1998-2004 by Bill Spitzak and others.
4//
5// This library is free software; you can redistribute it and/or
6// modify it under the terms of the GNU Library General Public
7// License as published by the Free Software Foundation; either
8// version 2 of the License, or (at your option) any later version.
9//
10// This library is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13// Library General Public License for more details.
14//
15// You should have received a copy of the GNU Library General Public
16// License along with this library; if not, write to the Free Software
17// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
18// USA.
19//
20// Please report all bugs and problems to "fltk-bugs@fltk.org".
21
22#ifndef fltk_ShapedWindow_h
23#define fltk_ShapedWindow_h
24
25#include <fltk/Window.h>
26#include <fltk/xbmImage.h>
27
28namespace fltk {
29
30class FL_API ShapedWindow : public Window {
31  public:
32    ShapedWindow(int W, int H, const char *l = 0)
33      : Window(W,H,l) { shape_ = 0; lw = lh = 0; changed = 0;}
34    ShapedWindow(int X, int Y, int W, int H, const char *l = 0)
35      : Window(X,Y,W,H,l) { shape_ = 0; lw = lh = 0;}
36    void shape(xbmImage* b) { shape_ = b; changed = 1; }
37    void shape(xbmImage& b) { shape_ =&b; changed = 1; }
38
39  protected:
40    virtual void draw();
41    xbmImage* shape_;
42    int lw, lh;
43    int changed;
44};
45
46}
47#endif
48
49//
50// End of "$Id: ShapedWindow.h 3743 2004-08-02 07:35:18Z spitzak $"
51//
Note: See TracBrowser for help on using the repository browser.