Author: manolo
Date: 2012-04-02 08:46:03 -0700 (Mon, 02 Apr 2012)
New Revision: 9316
Log:
Some more FLTK 1.3 compatibility
Modified:
branches/branch-3.0/include/FL/Fl_Sys_Menu_Bar.H
branches/branch-3.0/include/FL/fl_ask.H
branches/branch-3.0/include/FL/x.H
branches/branch-3.0/include/fltk3/MenuItem.h
Modified: branches/branch-3.0/include/FL/Fl_Sys_Menu_Bar.H
===================================================================
--- branches/branch-3.0/include/FL/Fl_Sys_Menu_Bar.H 2012-04-01 22:08:16 UTC
(rev 9315)
+++ branches/branch-3.0/include/FL/Fl_Sys_Menu_Bar.H 2012-04-02 15:46:03 UTC
(rev 9316)
@@ -40,6 +40,7 @@
FLTK3_WRAPPER_INTERFACE_WIDGET(Fl_Sys_Menu_Bar, SysMenuBar)
FLTK3_WRAPPER_INTERFACE_END()
+#define fl_sys_menu_bar ((Fl_Sys_Menu_Bar*)(fltk3::sys_menu_bar->wrapper()))
class FL_EXPORT Fl_Sys_Menu_Bar : public Fl_Menu_Bar {
Modified: branches/branch-3.0/include/FL/fl_ask.H
===================================================================
--- branches/branch-3.0/include/FL/fl_ask.H 2012-04-01 22:08:16 UTC (rev
9315)
+++ branches/branch-3.0/include/FL/fl_ask.H 2012-04-02 15:46:03 UTC (rev
9316)
@@ -98,10 +98,12 @@
inline Fl_Widget *fl_message_icon();
extern inline Fl_Font fl_message_font_;
extern inline Fl_Fontsize fl_message_size_;
-inline void fl_message_font(Fl_Font f, Fl_Fontsize s) {
- fl_message_font_ = f; fl_message_size_ = s;}
#endif
+inline void fl_message_font(Fl_Font f, Fl_Fontsize s) {
+ fltk3::message_font(fltk3::_1to3_font(f), fltk3::_1to3_fontsize(s));
+}
+
inline void fl_message_hotspot(int enable) {
fltk3::message_hotspot(enable);
}
Modified: branches/branch-3.0/include/FL/x.H
===================================================================
--- branches/branch-3.0/include/FL/x.H 2012-04-01 22:08:16 UTC (rev 9315)
+++ branches/branch-3.0/include/FL/x.H 2012-04-02 15:46:03 UTC (rev 9316)
@@ -34,6 +34,18 @@
typedef fltk3::Region Fl_Region;
+inline ::Window fl_xid(const Fl_Window* w) {
+ return fl_xid( (fltk3::Window*)fltk3::_1to3_widget((Fl_Widget*)w) );
+}
+
+#ifdef __APPLE__
+#include <FL/Fl_Widget.H>
+inline void fl_mac_set_about( Fl_Callback *cb, void *user_data, int shortcut =
0) {
+ fl_mac_set_about( (fltk3::Callback*)cb, user_data, shortcut);
+ }
+
+#endif
+
#if 0 // FIXME: 123
FL_EXPORT void fl_open_display();
Modified: branches/branch-3.0/include/fltk3/MenuItem.h
===================================================================
--- branches/branch-3.0/include/fltk3/MenuItem.h 2012-04-01 22:08:16 UTC
(rev 9315)
+++ branches/branch-3.0/include/fltk3/MenuItem.h 2012-04-02 15:46:03 UTC
(rev 9316)
@@ -384,8 +384,11 @@
The callback is called with the stored user_data() as its second argument.
You must first check that callback() is non-zero before calling this.
*/
- void do_callback(fltk3::Widget* o) const {callback_(o, user_data_);}
-
+ //void do_callback(fltk3::Widget* o) const {callback_(o, user_data_);}
+ void do_callback(fltk3::Widget* o) const {
+ callback_( o->wrapper() ? (fltk3::Widget*)o->wrapper() : o, user_data_);
+ }
+
/**
Calls the fltk3::MenuItem item's callback, and provides the fltk3::Widget
argument.
This call overrides the callback's second argument with the given value
\p arg.
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit