Author: matt
Date: 2011-06-19 12:58:54 -0700 (Sun, 19 Jun 2011)
New Revision: 8823
Log:
123: macros are much better now
Removed:
branches/branch-3.0/test1/CubeViewUI.fl
branches/branch-3.0/test1/fast_slow.fl
branches/branch-3.0/test1/inactive.fl
branches/branch-3.0/test1/keyboard_ui.fl
branches/branch-3.0/test1/mandelbrot_ui.fl
branches/branch-3.0/test1/preferences.fl
branches/branch-3.0/test1/radio.fl
branches/branch-3.0/test1/resize.fl
branches/branch-3.0/test1/tabs.fl
branches/branch-3.0/test1/tree.fl
branches/branch-3.0/test1/valuators.fl
Modified:
branches/branch-3.0/fltk3/Wrapper.h
branches/branch-3.0/test/makedepend
Modified: branches/branch-3.0/fltk3/Wrapper.h
===================================================================
--- branches/branch-3.0/fltk3/Wrapper.h 2011-06-19 19:36:20 UTC (rev 8822)
+++ branches/branch-3.0/fltk3/Wrapper.h 2011-06-19 19:58:54 UTC (rev 8823)
@@ -139,96 +139,46 @@
*/
-/*
- FLTK3_OBJECT_VCALLS_WRAPPER:
-if (pWrapper) {
- // We only do this tests if there is a wrapper connected to me.
- if ( pWrapper->pVCalls & Wrapper::pVCallWidgetDraw ) {
- // if my flag is set, we are being called from the wrapper, so we simply
- // continue with the original code. The wrapper must clear the flag.
- } else {
- // if my flag is clear, we are called from the core. So lets set the
- // flag and call the wrapper.
- pWrapper->pVCalls |= Wrapper::pVCallWidgetDraw;
- ((WidgetWrapper*)pWrapper)->draw();
- if ( (pWrapper->pVCalls & Wrapper::pVCallWidgetDraw) ) {
- // If the flag is still set, the function was overridden in the wrapper.
- // Clear the flag for the next call and abort.
- pWrapper->pVCalls &= ~Wrapper::pVCallWidgetDraw;
- return;
- } else {
- // If the wrapper returns with the flag cleared, the default code was
- // called and we continue with the original code.
- }
- }
-}
-
- FLTK3_WRAPPER_VCALLS_OBJECT
+#define FLTK3_WRAPPER_VCALLS_OBJECT(klass, proto, call, flag) \
virtual void proto { \
if ( pVCalls & pVCallWidget##flag ) { \
- // if my flag is set, we are called from the core. Clear the flag so the
core function knows
- // that we were not overridden.
- pVCalls &= ~pVCallWidget##flag;
+ ((fltk3::klass*)_p)->call; \
} else { \
- // if my flag is cleared, we are called from
pVCalls |= pVCallWidget##flag; \
((fltk3::klass*)_p)->call; \
pVCalls &= ~pVCallWidget##flag; \
} \
}
-*/
-/*
-#define FLTK3_WRAPPER_VCALLS_OBJECT(klass, proto, call, flag) \
- virtual void proto { \
- if ( pVCalls & pVCallWidget##flag ) { \
- } else { \
- pVCalls |= pVCallWidget##flag; \
- ((fltk3::klass*)_p)->call; \
- pVCalls &= ~pVCallWidget##flag; \
- } \
- }
+#define FLTK3_WRAPPER_VCALLS_OBJECT_INT(klass, proto, call, flag) \
+virtual int proto { \
+ int ret = 0; \
+ if ( pVCalls & pVCallWidget##flag ) { \
+ ret = ((fltk3::klass*)_p)->call; \
+ } else { \
+ pVCalls |= pVCallWidget##flag; \
+ ret = ((fltk3::klass*)_p)->call; \
+ pVCalls &= ~pVCallWidget##flag; \
+ } \
+ return ret; \
+}
#define FLTK3_OBJECT_VCALLS_WRAPPER(call, flag) \
- if (pWrapper) { \
- if ( pWrapper->pVCalls & Wrapper::pVCallWidget##flag ) { \
- } else { \
- pWrapper->pVCalls |= Wrapper::pVCallWidget##flag; \
- ((WidgetWrapper*)pWrapper)->call; \
- if ( (pWrapper->pVCalls & Wrapper::pVCallWidget##flag) ) { \
- pWrapper->pVCalls &= ~Wrapper::pVCallWidget##flag; \
- return; \
- } \
- } \
+ if (pWrapper && !(pWrapper->pVCalls & Wrapper::pVCallWidget##flag) ) { \
+ pWrapper->pVCalls |= Wrapper::pVCallWidget##flag; \
+ ((WidgetWrapper*)pWrapper)->call; \
+ pWrapper->pVCalls &= ~Wrapper::pVCallWidget##flag; \
+ return; \
}
-
-#define FLTK3_WRAPPER_VCALLS_OBJECT_INT(klass, proto, call, flag) \
- virtual int proto { \
- int ret = 0; \
- if ( pVCalls & pVCallWidget##flag ) { \
- } else { \
- pVCalls |= pVCallWidget##flag; \
- ret = ((fltk3::klass*)_p)->call; \
- pVCalls &= ~pVCallWidget##flag; \
- } \
+#define FLTK3_OBJECT_VCALLS_WRAPPER_INT(call, flag) \
+ if (pWrapper && !(pWrapper->pVCalls & Wrapper::pVCallWidget##flag) ) { \
+ pWrapper->pVCalls |= Wrapper::pVCallWidget##flag; \
+ int ret = ((WidgetWrapper*)pWrapper)->call; \
+ pWrapper->pVCalls &= ~Wrapper::pVCallWidget##flag; \
return ret; \
}
-#define FLTK3_OBJECT_VCALLS_WRAPPER_INT(call, flag) \
- if (pWrapper) { \
- if ( pWrapper->pVCalls & Wrapper::pVCallWidget##flag ) { \
- } else { \
- pWrapper->pVCalls |= Wrapper::pVCallWidget##flag; \
- int ret = ((WidgetWrapper*)pWrapper)->call; \
- if ( (pWrapper->pVCalls & Wrapper::pVCallWidget##flag) ) { \
- pWrapper->pVCalls &= ~Wrapper::pVCallWidget##flag; \
- return ret; \
- } else { \
- } \
- } \
- }
-*/
namespace fltk3 {
Modified: branches/branch-3.0/test/makedepend
===================================================================
--- branches/branch-3.0/test/makedepend 2011-06-19 19:36:20 UTC (rev 8822)
+++ branches/branch-3.0/test/makedepend 2011-06-19 19:58:54 UTC (rev 8823)
@@ -140,12 +140,6 @@
cube.o: ../fltk3/RGBImage.h ../fltk3/draw.h ../fltk3/PostScript.h
CubeMain.o: ../config.h ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
CubeMain.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-CubeMain.o: CubeViewUI.h ../fltk3/DoubleWindow.h ../fltk3/Window.h
-CubeMain.o: ../fltk3/Group.h ../fltk3/Widget.h ../fltk3/Rectangle.h
-CubeMain.o: ../fltk3/Object.h ../fltk3/Group.h ../fltk3/Roller.h
-CubeMain.o: ../fltk3/Valuator.h ../fltk3/Slider.h ../fltk3/Box.h CubeView.h
-CubeMain.o: ../fltk3/GlWindow.h ../fltk3/gl.h ../fltk3/ValueSlider.h
-CubeMain.o: ../fltk3/Slider.h
CubeView.o: CubeView.h ../config.h ../fltk3/run.h ../fltk3/utf8.h
CubeView.o: ../fltk3/Export.h ../fltk3/types.h ../fltk3/Xutf8.h
CubeView.o: ../fltk3/enumerations.h ../fltk3/GlWindow.h ../fltk3/Window.h
@@ -331,12 +325,6 @@
input_choice.o: ../fltk3/Input.h ../fltk3/Input_.h ../fltk3/MenuButton.h
input_choice.o: ../fltk3/Menu_.h ../fltk3/MenuItem.h ../fltk3/Image.h
input_choice.o: ../fltk3/draw.h
-keyboard.o: keyboard_ui.h ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h
-keyboard.o: ../fltk3/types.h ../fltk3/Xutf8.h ../fltk3/enumerations.h
-keyboard.o: keyboard.h ../fltk3/Window.h ../fltk3/Button.h ../fltk3/Widget.h
-keyboard.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Output.h
-keyboard.o: ../fltk3/Input.h ../fltk3/Box.h ../fltk3/Dial.h
-keyboard.o: ../fltk3/Valuator.h
label.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
label.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/DoubleWindow.h
label.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Widget.h
@@ -355,23 +343,21 @@
line_style.o: ../fltk3/MenuItem.h ../fltk3/Image.h ../fltk3/CheckButton.h
line_style.o: ../fltk3/LightButton.h ../fltk3/Button.h ../fltk3/Box.h
list_visuals.o: ../config.h
-mandelbrot.o: mandelbrot_ui.h ../fltk3/run.h ../fltk3/utf8.h
-mandelbrot.o: ../fltk3/Export.h ../fltk3/types.h ../fltk3/Xutf8.h
-mandelbrot.o: ../fltk3/enumerations.h mandelbrot.h ../fltk3/Box.h
-mandelbrot.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
-mandelbrot.o: ../fltk3/Slider.h ../fltk3/Valuator.h ../fltk3/DoubleWindow.h
-mandelbrot.o: ../fltk3/Window.h ../fltk3/Group.h ../fltk3/Input.h
-mandelbrot.o: ../fltk3/Input_.h ../fltk3/Window.h ../fltk3/FloatInput.h
-mandelbrot.o: ../fltk3/Input.h ../fltk3/draw.h ../fltk3/Button.h
-mandelbrot.o: ../fltk3/Printer.h ../fltk3/x.h ../fltk3/PagedDevice.h
-mandelbrot.o: ../fltk3/Device.h ../fltk3/Object.h ../fltk3/Plugin.h
-mandelbrot.o: Preferences.h ../fltk3/Preferences.h ../fltk3/Group.h
-mandelbrot.o: ../fltk3/Choice.h ../fltk3/Menu_.h ../fltk3/MenuItem.h
-mandelbrot.o: ../fltk3/Image.h ../fltk3/RoundButton.h ../fltk3/LightButton.h
-mandelbrot.o: ../fltk3/Button.h ../fltk3/CheckButton.h ../fltk3/IntInput.h
-mandelbrot.o: ../fltk3/ValueSlider.h ../fltk3/Slider.h ../fltk3/Image.h
-mandelbrot.o: ../fltk3/Bitmap.h ../fltk3/Pixmap.h ../fltk3/RGBImage.h
-mandelbrot.o: ../fltk3/PostScript.h
+mandelbrot.o: ../fltk3/draw.h ../fltk3/Button.h ../fltk3/Widget.h
+mandelbrot.o: ../fltk3/enumerations.h ../fltk3/Export.h ../fltk3/types.h
+mandelbrot.o: ../fltk3/Rectangle.h ../fltk3/Object.h ../fltk3/Printer.h
+mandelbrot.o: ../fltk3/x.h ../fltk3/Window.h ../fltk3/Group.h
+mandelbrot.o: ../fltk3/Xutf8.h ../fltk3/PagedDevice.h ../fltk3/Device.h
+mandelbrot.o: ../fltk3/Object.h ../fltk3/Plugin.h Preferences.h
+mandelbrot.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Preferences.h
+mandelbrot.o: ../fltk3/DoubleWindow.h ../fltk3/Group.h ../fltk3/Input.h
+mandelbrot.o: ../fltk3/Input_.h ../fltk3/Choice.h ../fltk3/Menu_.h
+mandelbrot.o: ../fltk3/MenuItem.h ../fltk3/Image.h ../fltk3/RoundButton.h
+mandelbrot.o: ../fltk3/LightButton.h ../fltk3/Button.h ../fltk3/Box.h
+mandelbrot.o: ../fltk3/CheckButton.h ../fltk3/IntInput.h ../fltk3/Input.h
+mandelbrot.o: ../fltk3/ValueSlider.h ../fltk3/Slider.h ../fltk3/Valuator.h
+mandelbrot.o: ../fltk3/Image.h ../fltk3/Bitmap.h ../fltk3/Pixmap.h
+mandelbrot.o: ../fltk3/RGBImage.h ../fltk3/Window.h ../fltk3/PostScript.h
menubar.o: ../fltk3/run.h ../fltk3/utf8.h ../fltk3/Export.h ../fltk3/types.h
menubar.o: ../fltk3/Xutf8.h ../fltk3/enumerations.h ../fltk3/Box.h
menubar.o: ../fltk3/Widget.h ../fltk3/Rectangle.h ../fltk3/Object.h
Deleted: branches/branch-3.0/test1/CubeViewUI.fl
Deleted: branches/branch-3.0/test1/fast_slow.fl
Deleted: branches/branch-3.0/test1/inactive.fl
Deleted: branches/branch-3.0/test1/keyboard_ui.fl
Deleted: branches/branch-3.0/test1/mandelbrot_ui.fl
Deleted: branches/branch-3.0/test1/preferences.fl
Deleted: branches/branch-3.0/test1/radio.fl
Deleted: branches/branch-3.0/test1/resize.fl
Deleted: branches/branch-3.0/test1/tabs.fl
Deleted: branches/branch-3.0/test1/tree.fl
Deleted: branches/branch-3.0/test1/valuators.fl
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit