annotate dw/fltkcomplexbutton.cc @ 2035:5625ee0230ad

clean out fltkcomplexbutton a bit
author corvid <corvid@lavabit.com>
date Wed, 18 May 2011 16:19:58 +0000
parents f542084fa707
children 6a8f4de33240
rev   line source
1811
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
1 // fltkcomplexbutton.cc contains code from FLTK 1.3's src/Fl_Button.cxx
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
2 // that is Copyright 1998-2010 by Bill Spitzak and others.
1325
23d34e319c36 fix up licensing
corvid <corvid@lavabit.com>
parents: 1274
diff changeset
3
23d34e319c36 fix up licensing
corvid <corvid@lavabit.com>
parents: 1274
diff changeset
4 /*
23d34e319c36 fix up licensing
corvid <corvid@lavabit.com>
parents: 1274
diff changeset
5 * This program is free software; you can redistribute it and/or modify
23d34e319c36 fix up licensing
corvid <corvid@lavabit.com>
parents: 1274
diff changeset
6 * it under the terms of the GNU General Public License as published by
23d34e319c36 fix up licensing
corvid <corvid@lavabit.com>
parents: 1274
diff changeset
7 * the Free Software Foundation; either version 3 of the License, or
23d34e319c36 fix up licensing
corvid <corvid@lavabit.com>
parents: 1274
diff changeset
8 * (at your option) any later version.
23d34e319c36 fix up licensing
corvid <corvid@lavabit.com>
parents: 1274
diff changeset
9 *
23d34e319c36 fix up licensing
corvid <corvid@lavabit.com>
parents: 1274
diff changeset
10 * This program is distributed in the hope that it will be useful,
23d34e319c36 fix up licensing
corvid <corvid@lavabit.com>
parents: 1274
diff changeset
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23d34e319c36 fix up licensing
corvid <corvid@lavabit.com>
parents: 1274
diff changeset
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23d34e319c36 fix up licensing
corvid <corvid@lavabit.com>
parents: 1274
diff changeset
13 * GNU General Public License for more details.
23d34e319c36 fix up licensing
corvid <corvid@lavabit.com>
parents: 1274
diff changeset
14 *
23d34e319c36 fix up licensing
corvid <corvid@lavabit.com>
parents: 1274
diff changeset
15 * You should have received a copy of the GNU General Public License
23d34e319c36 fix up licensing
corvid <corvid@lavabit.com>
parents: 1274
diff changeset
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
23d34e319c36 fix up licensing
corvid <corvid@lavabit.com>
parents: 1274
diff changeset
17 */
347
e5955ab8dafb - Moved the dw2 tree into dillo2's tree.
jcid
parents:
diff changeset
18
1811
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
19 #include <FL/Fl.H>
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
20 #include <FL/Fl_Button.H>
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
21 #include <FL/Fl_Group.H>
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
22 #include <FL/Fl_Window.H>
347
e5955ab8dafb - Moved the dw2 tree into dillo2's tree.
jcid
parents:
diff changeset
23
e5955ab8dafb - Moved the dw2 tree into dillo2's tree.
jcid
parents:
diff changeset
24 #include "fltkcomplexbutton.hh"
e5955ab8dafb - Moved the dw2 tree into dillo2's tree.
jcid
parents:
diff changeset
25
e5955ab8dafb - Moved the dw2 tree into dillo2's tree.
jcid
parents:
diff changeset
26 using namespace dw::fltk::ui;
e5955ab8dafb - Moved the dw2 tree into dillo2's tree.
jcid
parents:
diff changeset
27
1811
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
28 /**
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
29 Sets the current value of the button.
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
30 A non-zero value sets the button to 1 (ON), and zero sets it to 0 (OFF).
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
31 \param[in] v button value.
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
32 */
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
33 int ComplexButton::value(int v) {
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
34 v = v ? 1 : 0;
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
35 oldval = v;
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
36 clear_changed();
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
37 if (value_ != v) {
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
38 value_ = v;
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
39 if (box()) redraw();
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
40 else redraw_label();
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
41 return 1;
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
42 } else {
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
43 return 0;
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
44 }
347
e5955ab8dafb - Moved the dw2 tree into dillo2's tree.
jcid
parents:
diff changeset
45 }
e5955ab8dafb - Moved the dw2 tree into dillo2's tree.
jcid
parents:
diff changeset
46
1811
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
47 void ComplexButton::draw() {
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
48 Fl_Color col = value() ? selection_color() : color();
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
49 draw_box(value() ? (down_box()?down_box():fl_down(box())) : box(), col);
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
50 draw_backdrop();
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
51 if (labeltype() == FL_NORMAL_LABEL && value()) {
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
52 Fl_Color c = labelcolor();
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
53 labelcolor(fl_contrast(c, col));
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
54 draw_label();
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
55 labelcolor(c);
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
56 } else draw_label();
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
57 if (Fl::focus() == this) draw_focus();
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
58
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
59 // ComplexButton is a Group; draw its children
2022
b4c1aa2d99dc ComplexButton: fix its content widget coordinates (absolute in fltk-1.3)
Jorge Arellano Cid <jcid@dillo.org>
parents: 2021
diff changeset
60 for (int i = children () - 1; i >= 0; i--) {
b4c1aa2d99dc ComplexButton: fix its content widget coordinates (absolute in fltk-1.3)
Jorge Arellano Cid <jcid@dillo.org>
parents: 2021
diff changeset
61 // set absolute coordinates for fltk-1.3 --jcid
b4c1aa2d99dc ComplexButton: fix its content widget coordinates (absolute in fltk-1.3)
Jorge Arellano Cid <jcid@dillo.org>
parents: 2021
diff changeset
62 child (i)->position(x()+(w()-child(i)->w())/2,y()+(h()-child(i)->h())/2);
1811
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
63 draw_child (*child (i));
2022
b4c1aa2d99dc ComplexButton: fix its content widget coordinates (absolute in fltk-1.3)
Jorge Arellano Cid <jcid@dillo.org>
parents: 2021
diff changeset
64 }
1811
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
65 }
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
66
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
67 int ComplexButton::handle(int event) {
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
68 int newval;
347
e5955ab8dafb - Moved the dw2 tree into dillo2's tree.
jcid
parents:
diff changeset
69 switch (event) {
1811
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
70 case FL_ENTER: /* FALLTHROUGH */
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
71 case FL_LEAVE:
347
e5955ab8dafb - Moved the dw2 tree into dillo2's tree.
jcid
parents:
diff changeset
72 return 1;
1811
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
73 case FL_PUSH:
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
74 if (Fl::visible_focus() && handle(FL_FOCUS)) Fl::focus(this);
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
75 case FL_DRAG:
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
76 if (Fl::event_inside(this)) {
2035
5625ee0230ad clean out fltkcomplexbutton a bit
corvid <corvid@lavabit.com>
parents: 2024
diff changeset
77 newval = !oldval;
1811
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
78 } else
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
79 {
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
80 clear_changed();
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
81 newval = oldval;
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
82 }
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
83 if (newval != value_) {
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
84 value_ = newval;
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
85 set_changed();
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
86 redraw();
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
87 if (when() & FL_WHEN_CHANGED) do_callback();
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
88 }
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
89 return 1;
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
90 case FL_RELEASE:
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
91 if (value_ == oldval) {
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
92 if (when() & FL_WHEN_NOT_CHANGED) do_callback();
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
93 return 1;
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
94 }
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
95 set_changed();
2035
5625ee0230ad clean out fltkcomplexbutton a bit
corvid <corvid@lavabit.com>
parents: 2024
diff changeset
96 value(oldval);
5625ee0230ad clean out fltkcomplexbutton a bit
corvid <corvid@lavabit.com>
parents: 2024
diff changeset
97 set_changed();
5625ee0230ad clean out fltkcomplexbutton a bit
corvid <corvid@lavabit.com>
parents: 2024
diff changeset
98 if (when() & FL_WHEN_CHANGED) {
5625ee0230ad clean out fltkcomplexbutton a bit
corvid <corvid@lavabit.com>
parents: 2024
diff changeset
99 Fl_Widget_Tracker wp(this);
5625ee0230ad clean out fltkcomplexbutton a bit
corvid <corvid@lavabit.com>
parents: 2024
diff changeset
100 do_callback();
5625ee0230ad clean out fltkcomplexbutton a bit
corvid <corvid@lavabit.com>
parents: 2024
diff changeset
101 if (wp.deleted()) return 1;
347
e5955ab8dafb - Moved the dw2 tree into dillo2's tree.
jcid
parents:
diff changeset
102 }
1811
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
103 if (when() & FL_WHEN_RELEASE) do_callback();
347
e5955ab8dafb - Moved the dw2 tree into dillo2's tree.
jcid
parents:
diff changeset
104 return 1;
1811
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
105 case FL_FOCUS : /* FALLTHROUGH */
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
106 case FL_UNFOCUS :
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
107 if (Fl::visible_focus()) {
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
108 if (box() == FL_NO_BOX) {
2021
e63f6fc75427 Convert tabs into spaces
Jorge Arellano Cid <jcid@dillo.org>
parents: 1902
diff changeset
109 // Widgets with the FL_NO_BOX boxtype need a parent to
e63f6fc75427 Convert tabs into spaces
Jorge Arellano Cid <jcid@dillo.org>
parents: 1902
diff changeset
110 // redraw, since it is responsible for redrawing the
e63f6fc75427 Convert tabs into spaces
Jorge Arellano Cid <jcid@dillo.org>
parents: 1902
diff changeset
111 // background...
e63f6fc75427 Convert tabs into spaces
Jorge Arellano Cid <jcid@dillo.org>
parents: 1902
diff changeset
112 int X = x() > 0 ? x() - 1 : 0;
e63f6fc75427 Convert tabs into spaces
Jorge Arellano Cid <jcid@dillo.org>
parents: 1902
diff changeset
113 int Y = y() > 0 ? y() - 1 : 0;
e63f6fc75427 Convert tabs into spaces
Jorge Arellano Cid <jcid@dillo.org>
parents: 1902
diff changeset
114 if (window()) window()->damage(FL_DAMAGE_ALL, X, Y, w() + 2, h() + 2);
1811
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
115 } else redraw();
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
116 return 1;
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
117 } else return 0;
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
118 case FL_KEYBOARD :
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
119 if (Fl::focus() == this && Fl::event_key() == ' ' &&
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
120 !(Fl::event_state() & (FL_SHIFT | FL_CTRL | FL_ALT | FL_META))) {
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
121 set_changed();
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
122 Fl_Widget_Tracker wp(this);
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
123 if (wp.deleted()) return 1;
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
124 if (when() & FL_WHEN_RELEASE) do_callback();
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
125 return 1;
347
e5955ab8dafb - Moved the dw2 tree into dillo2's tree.
jcid
parents:
diff changeset
126 }
e5955ab8dafb - Moved the dw2 tree into dillo2's tree.
jcid
parents:
diff changeset
127 default:
e5955ab8dafb - Moved the dw2 tree into dillo2's tree.
jcid
parents:
diff changeset
128 return 0;
e5955ab8dafb - Moved the dw2 tree into dillo2's tree.
jcid
parents:
diff changeset
129 }
e5955ab8dafb - Moved the dw2 tree into dillo2's tree.
jcid
parents:
diff changeset
130 }
e5955ab8dafb - Moved the dw2 tree into dillo2's tree.
jcid
parents:
diff changeset
131
1811
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
132 /**
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
133 The constructor creates the button using the given position, size and label.
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
134 \param[in] X, Y, W, H position and size of the widget
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
135 \param[in] L widget label, default is no label
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
136 */
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
137 ComplexButton::ComplexButton(int X, int Y, int W, int H, const char *L)
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
138 : Fl_Group(X,Y,W,H,L) {
1875
d7dc24f8cdfb prevent new Fl_Widgets from automatically being added to a Fl_Group
corvid <corvid@lavabit.com>
parents: 1811
diff changeset
139 Fl_Group::current(0);
1811
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
140 box(FL_UP_BOX);
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
141 down_box(FL_NO_BOX);
630b3ab2f2bd fltkcomplexbutton from Fl_Button
corvid <corvid@lavabit.com>
parents: 1325
diff changeset
142 value_ = oldval = 0;
347
e5955ab8dafb - Moved the dw2 tree into dillo2's tree.
jcid
parents:
diff changeset
143 }
e5955ab8dafb - Moved the dw2 tree into dillo2's tree.
jcid
parents:
diff changeset
144
1876
73336563b6e7 don't let complex button destroy flat view
corvid <corvid@lavabit.com>
parents: 1875
diff changeset
145 ComplexButton::~ComplexButton() {
73336563b6e7 don't let complex button destroy flat view
corvid <corvid@lavabit.com>
parents: 1875
diff changeset
146 /*
73336563b6e7 don't let complex button destroy flat view
corvid <corvid@lavabit.com>
parents: 1875
diff changeset
147 * The Fl_Group destructor clear()s the children, but layout expects
73336563b6e7 don't let complex button destroy flat view
corvid <corvid@lavabit.com>
parents: 1875
diff changeset
148 * the flat view to be around until it deletes if.
73336563b6e7 don't let complex button destroy flat view
corvid <corvid@lavabit.com>
parents: 1875
diff changeset
149 */
73336563b6e7 don't let complex button destroy flat view
corvid <corvid@lavabit.com>
parents: 1875
diff changeset
150 remove(0);
73336563b6e7 don't let complex button destroy flat view
corvid <corvid@lavabit.com>
parents: 1875
diff changeset
151 }