edelib 2.1.0
ExpandableGroup.h
1/*
2 * $Id: ExpandableGroup.h 3505 2013-01-08 14:58:54Z karijes $
3 *
4 * Group with applied layout on childs
5 * Copyright (c) 2005-2007 edelib authors
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this library. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#ifndef __EDELIB_EXPANDABLEGROUP_H__
22#define __EDELIB_EXPANDABLEGROUP_H__
23
24#include "edelib-global.h"
25
26#include <FL/Fl_Group.H>
27#include <FL/Fl_Scrollbar.H>
28
29EDELIB_NS_BEGIN
30
50class EDELIB_API ExpandableGroup : public Fl_Group {
51private:
52 int scroll_w;
53 int px, py;
54 int sval, sval_curr, sval_old;
55 int area_x, area_y, area_w, area_h;
56
57 Fl_Scrollbar *vscrollbar;
58
59 void reposition_childs(void);
60 void fix_scrollbar_order(void);
61 static void draw_clip(void *d, int X, int Y, int W, int H);
62
63public:
67 ExpandableGroup(int x, int y, int w, int h, const char *l = 0);
68
69#ifndef SKIP_DOCS
70 virtual void draw(void);
71 virtual void resize(int x, int y, int w, int h);
72 virtual int handle(int event);
73 void clear(void);
74 int children(void);
75 void scrolly(int yp);
76 void add(Fl_Widget* o);
77 Fl_Scrollbar* get_scroll(void) { return vscrollbar; }
78#endif
79};
80
81EDELIB_NS_END
82#endif
A group with applied layout on childs.
Definition: ExpandableGroup.h:50
ExpandableGroup(int x, int y, int w, int h, const char *l=0)