1 | // |
---|
2 | // "$Id: BarGroup.h 3961 2005-01-24 08:07:59Z spitzak $" |
---|
3 | // |
---|
4 | // The BarGroup is a closable strip that can be put in the edges of a Pack, |
---|
5 | // usually it contains toolbars or buttons. |
---|
6 | // |
---|
7 | // Copyright 2002 by Bill Spitzak and others. |
---|
8 | // |
---|
9 | // This library is free software; you can redistribute it and/or |
---|
10 | // modify it under the terms of the GNU Library General Public |
---|
11 | // License as published by the Free Software Foundation; either |
---|
12 | // version 2 of the License, or (at your option) any later version. |
---|
13 | // |
---|
14 | // This library is distributed in the hope that it will be useful, |
---|
15 | // but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
16 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
17 | // Library General Public License for more details. |
---|
18 | // |
---|
19 | // You should have received a copy of the GNU Library General Public |
---|
20 | // License along with this library; if not, write to the Free Software |
---|
21 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
---|
22 | // USA. |
---|
23 | // |
---|
24 | // Please report all bugs and problems to "fltk-bugs@fltk.org". |
---|
25 | // |
---|
26 | |
---|
27 | #ifndef fltk_BarGroup_h |
---|
28 | #define fltk_BarGroup_h |
---|
29 | |
---|
30 | #include <fltk/Group.h> |
---|
31 | |
---|
32 | namespace fltk { |
---|
33 | |
---|
34 | class FL_API BarGroup : public Group { |
---|
35 | bool open_; |
---|
36 | bool highlighted; |
---|
37 | bool pushed; |
---|
38 | int glyph_size_; |
---|
39 | int saved_size; |
---|
40 | void glyph_box(Rectangle&) const; |
---|
41 | public: |
---|
42 | BarGroup(int x,int y,int w ,int h,const char *l = 0); |
---|
43 | static NamedStyle* default_style; |
---|
44 | void layout(); |
---|
45 | int handle(int); |
---|
46 | void draw(); |
---|
47 | bool opened() const {return open_;} |
---|
48 | bool opened(bool); |
---|
49 | bool open() {return opened(true);} |
---|
50 | bool close() {return opened(false);} |
---|
51 | int glyph_size() const {return glyph_size_;} |
---|
52 | void glyph_size(int v) {glyph_size_ = v;} |
---|
53 | }; |
---|
54 | |
---|
55 | } |
---|
56 | #endif |
---|
57 | |
---|
58 | // |
---|
59 | // End of "$Id: BarGroup.h 3961 2005-01-24 08:07:59Z spitzak $". |
---|
60 | // |
---|