summaryrefslogtreecommitdiff
path: root/src/fl_shadow_box.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>1998-10-06 18:21:25 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>1998-10-06 18:21:25 +0000
commitf9039b2ae21988783feae9b362818e7923e82d14 (patch)
tree6d6fe3679d73448758f9794e7d4d4f6b22a4adad /src/fl_shadow_box.cxx
parent67e89232f9ba067825a158734a09e0fa21aacbe3 (diff)
Initial revision
git-svn-id: file:///fltk/svn/fltk/trunk@2 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/fl_shadow_box.cxx')
-rw-r--r--src/fl_shadow_box.cxx31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/fl_shadow_box.cxx b/src/fl_shadow_box.cxx
new file mode 100644
index 000000000..d48b6ba96
--- /dev/null
+++ b/src/fl_shadow_box.cxx
@@ -0,0 +1,31 @@
+// fl_shadow_box.C
+
+// Box drawing code for an obscure box type.
+// These box types are in seperate files so they are not linked
+// in if not used.
+
+#include <FL/Fl.H>
+#include <FL/fl_draw.H>
+
+#define BW 3
+
+static void fl_shadow_frame(int x, int y, int w, int h, Fl_Color c) {
+ fl_color(FL_DARK3);
+ fl_rectf(x+BW, y+h, w, BW);
+ fl_rectf(x+w, y+BW, BW, h);
+ fl_color(c);
+ fl_rect(x,y,w,h);
+}
+
+static void fl_shadow_box(int x, int y, int w, int h, Fl_Color c) {
+ fl_color(c);
+ fl_rectf(x+1,y+1,w-2,h-2);
+ fl_shadow_frame(x,y,w,h,FL_GRAY0);
+}
+
+extern void fl_internal_boxtype(Fl_Boxtype, Fl_Box_Draw_F*);
+Fl_Boxtype define_FL_SHADOW_BOX() {
+ fl_internal_boxtype(_FL_SHADOW_FRAME, fl_shadow_frame);
+ fl_internal_boxtype(_FL_SHADOW_BOX, fl_shadow_box);
+ return _FL_SHADOW_BOX;
+}