-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfltk.patch
More file actions
94 lines (85 loc) · 2.92 KB
/
fltk.patch
File metadata and controls
94 lines (85 loc) · 2.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
diff -aurbBw fltk-1.3.0rc3//FL/Fl_Help_View.H FLTK/FL/Fl_Help_View.H
--- fltk-1.3.0rc3//FL/Fl_Help_View.H 2010-12-19 22:20:10 +0100
+++ FLTK/FL/Fl_Help_View.H 2011-08-06 11:52:18 +0200
@@ -52,6 +52,8 @@
typedef const char *(Fl_Help_Func)(Fl_Widget *, const char *);
+typedef Fl_Image *(Fl_Image_Callback)(Fl_Widget *, void *, const char *name);
+typedef Fl_Image_Callback* Fl_Image_Callback_p;
//
// Fl_Help_Block structure...
@@ -213,6 +215,8 @@
{
enum { RIGHT = -1, CENTER, LEFT }; ///< Alignments
+ Fl_Image_Callback* image_callback_; ///< Callback for missing image
+
char title_[1024]; ///< Title string
Fl_Color defcolor_, ///< Default text color
bgcolor_, ///< Background color
@@ -390,6 +394,8 @@
void scrollbar_size(int size) {
scrollbar_size_ = size;
}
+ Fl_Image_Callback_p image_callback() const {return image_callback_;}
+ void image_callback(Fl_Image_Callback* cb) {image_callback_=cb;}
};
#endif // !Fl_Help_View_H
diff -aurbBw fltk-1.3.0rc3//src/Fl_Help_View.cxx FLTK/src/Fl_Help_View.cxx
--- fltk-1.3.0rc3//src/Fl_Help_View.cxx 2010-12-19 22:20:10 +0100
+++ FLTK/src/Fl_Help_View.cxx 2011-02-18 18:52:22 +0100
@@ -2645,12 +2645,26 @@
if (initial_load) {
if ((ip = Fl_Shared_Image::get(localname, W, H)) == NULL) {
+ if (image_callback_ == NULL) {
ip = (Fl_Shared_Image *)&broken_image;
+ } else {
+ ip = (Fl_Shared_Image *)image_callback_(this, user_data(), name);
+ if (ip == NULL) {
+ ip = (Fl_Shared_Image *)&broken_image;
+ }
+ }
}
} else { // draw or resize
if ((ip = Fl_Shared_Image::find(localname, W, H)) == NULL) {
+ if (image_callback_ == NULL) {
ip = (Fl_Shared_Image *)&broken_image;
} else {
+ ip = (Fl_Shared_Image *)image_callback_(this, user_data(), name);
+ if (ip == NULL) {
+ ip = (Fl_Shared_Image *)&broken_image;
+ }
+ }
+ } else {
ip->release();
}
}
@@ -3042,6 +3056,8 @@
{
color(FL_BACKGROUND2_COLOR, FL_SELECTION_COLOR);
+ image_callback_ = NULL;
+
title_[0] = '\0';
defcolor_ = FL_FOREGROUND_COLOR;
bgcolor_ = FL_BACKGROUND_COLOR;
diff -aurbBw fltk-1.3.0rc3//src/Fl_Text_Buffer.cxx FLTK/src/Fl_Text_Buffer.cxx
--- fltk-1.3.0rc3//src/Fl_Text_Buffer.cxx 2010-12-15 18:38:39 +0100
+++ FLTK/src/Fl_Text_Buffer.cxx 2011-02-16 10:10:18 +0100
@@ -692,8 +692,8 @@
}
}
if (toRemove == -1) {
- Fl::error
- ("Fl_Text_Buffer::remove_modify_callback(): Can't find modify CB to remove");
+ // Fl::error
+ // ("Fl_Text_Buffer::remove_modify_callback(): Can't find modify CB to remove");
return;
}
@@ -767,8 +767,8 @@
}
}
if (toRemove == -1) {
- Fl::error
- ("Fl_Text_Buffer::remove_predelete_callback(): Can't find pre-delete CB to remove");
+ // Fl::error
+ // ("Fl_Text_Buffer::remove_predelete_callback(): Can't find pre-delete CB to remove");
return;
}