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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.8"/>
<title>Dillo: Problems with FLTK</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="https://www.dillo.org/dw/html/jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">Dillo
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.8 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li class="current"><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">Problems with FLTK </div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><h2><a class="el" href="classdw_1_1fltk_1_1FltkViewport.html">dw::fltk::FltkViewport</a></h2>
<p>Current problems:</p>
<ul>
<li>
<p class="startli">How should <a class="el" href="classdw_1_1fltk_1_1FltkViewBase.html#a5e068f530f1c8ca8307d631c0e3c27a8" title="Cancel a draw queue request. ">dw::fltk::FltkViewport::cancelQueueDraw</a> be implemented?</p>
<p class="endli"></p>
</li>
<li>
<p class="startli">If the value of a scrollbar is changed by the program, not the user, the callback seems not to be called. Can this be assured?</p>
<p class="endli"></p>
</li>
<li>
<p class="startli">The same for dw::fltk::FltkViewport::layout?</p>
<p class="endli"></p>
</li>
<li>
<p class="startli">Also, the problems with the widgets seems to work. Also sure?</p>
<p class="endli"></p>
</li>
<li>
<p class="startli">When drawing, clipping of 32 bit values is not working properly.</p>
<p class="endli"></p>
</li>
<li>
The item group within a selection widget (menu) should not be selectable. </li>
</ul>
<h2><a class="el" href="classdw_1_1fltk_1_1FltkPlatform.html">dw::fltk::FltkPlatform</a></h2>
<ul>
<li>
<p class="startli">There is the problem, that fltk::font always returns a font, the required one, or a replacements. The latter is not wanted in all cases, e.g. when several fonts are tested. Perhaps, this could be solved by searching in the font list. <em>[This was true of fltk2. What is the state of font handling now with fltk-1.3?]</em></p>
<p class="endli"></p>
</li>
<li>
Distinction between italics and oblique would be nice (<a class="el" href="classdw_1_1fltk_1_1FltkFont.html#a038a5e239cabe7cbbe1d9cd6a1579fe3">dw::fltk::FltkFont::FltkFont</a>). </li>
</ul>
<h2><a class="el" href="classdw_1_1fltk_1_1ui_1_1FltkCheckButtonResource.html">dw::fltk::ui::FltkCheckButtonResource</a></h2>
<p>Groups of Fl_Radio_Button must be added to one Fl_Group, which is not possible in this context. There are two alternatives:</p>
<ol>
<li>
there is a more flexible way to group radio buttons, or </li>
<li>
radio buttons are not grouped, instead, grouping (especially unchecking other buttons) is done by the application. </li>
</ol>
<p>(This is mostly solved.)</p>
<h2><a class="el" href="classdw_1_1fltk_1_1FltkImgbuf.html">dw::fltk::FltkImgbuf</a></h2>
<p>Alpha transparency should be best abstracted by FLTK itself. If not, perhaps different implementations for different window systems could be used. Then, it is for X necessary to use GCs with clipping masks.</p>
<h2><a class="el" href="classdw_1_1fltk_1_1ui_1_1ComplexButton.html">dw::fltk::ui::ComplexButton</a></h2>
<p>Unfortunately, FLTK does not provide a button with Fl_Group as parent, so that children may be added to the button. <a class="el" href="classdw_1_1fltk_1_1ui_1_1ComplexButton.html">dw::fltk::ui::ComplexButton</a> does exactly this, and is, in an ugly way, a modified copy of the FLTK button.</p>
<p>It would be nice, if this is merged with the standard FLTK button. Furthermore, setting the type is strange.</p>
<p>If the files do not compile, it may be useful to create a new one from the FLTK source:</p>
<ol>
<li>
<p class="startli">Copy Fl_Button.H from FLTK to <a class="el" href="fltkcomplexbutton_8hh.html">dw/fltkcomplexbutton.hh</a> and src/Button.cxx to <a class="el" href="fltkcomplexbutton_8cc.html">dw/fltkcomplexbutton.cc</a>.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli">In both files, rename "Button" to "ComplexButton". Automatic replacing should work.</p>
<p class="endli"></p>
</li>
<li>
Apply the changes below. </li>
</ol>
<p>The following changes should be applied manually.</p>
<h3>Changes in <a class="el" href="fltkcomplexbutton_8hh.html">fltkcomplexbutton.hh</a></h3>
<p>First of all, the #define's for avoiding multiple includes:</p>
<div class="fragment"><div class="line">-#ifndef fltk_ComplexButton_h <span class="comment">// fltk_Button_h formerly</span></div>
<div class="line">-#define fltk_ComplexButton_h</div>
<div class="line">+#ifndef __FLTK_COMPLEX_BUTTON_HH__</div>
<div class="line">+#define __FLTK_COMPLEX_BUTTON_HH__</div>
</div><!-- fragment --><p>at the beginning and</p>
<div class="fragment"><div class="line">-#endif</div>
<div class="line">+#endif <span class="comment">// __FLTK_COMPLEX_BUTTON_HH__</span></div>
</div><!-- fragment --><p>at the end. Then, the namespace is changed:</p>
<div class="fragment"><div class="line">-<span class="keyword">namespace </span>fltk {</div>
<div class="line">+<span class="keyword">namespace </span><a class="code" href="namespacedw.html">dw</a> {</div>
<div class="line">+<span class="keyword">namespace </span>fltk {</div>
<div class="line">+<span class="keyword">namespace </span>ui {</div>
</div><!-- fragment --><p>at the beginning and</p>
<div class="fragment"><div class="line">-}</div>
<div class="line">+} <span class="comment">// namespace ui</span></div>
<div class="line">+} <span class="comment">// namespace fltk</span></div>
<div class="line">+} <span class="comment">// namespace dw</span></div>
</div><!-- fragment --><p>at the end. Most important, the base class is changed:</p>
<div class="fragment"><div class="line">-#include <span class="stringliteral">"FL/Fl_Widget.H"</span></div>
<div class="line">+#include <FL/Fl_Group.H></div>
</div><!-- fragment --><p>and</p>
<div class="fragment"><div class="line">-<span class="keyword">class </span>FL_API ComplexButton : <span class="keyword">public</span> Fl_Widget {</div>
<div class="line">+<span class="keyword">class </span>ComplexButton: <span class="keyword">public</span> Fl_Group</div>
<div class="line">+{</div>
</div><!-- fragment --><p>Finally, for dw::fltk::ui::ComplexButton::default_style, there is a namespace conflict:</p>
<div class="fragment"><div class="line">- <span class="keyword">static</span> NamedStyle* default_style;</div>
<div class="line">+ static ::fltk::NamedStyle* default_style;</div>
</div><!-- fragment --><h3>Changes in <a class="el" href="fltkcomplexbutton_8cc.html">fltkcomplexbutton.cc</a></h3>
<p>First, #include's:</p>
<div class="fragment"><div class="line"><span class="preprocessor"> #include <FL/Fl.H></span></div>
<div class="line">-#include <FL/ComplexButton.h> <span class="comment">// <FL/Fl_Button.H> formerly</span></div>
<div class="line"><span class="preprocessor"> #include <FL/Fl_Group.H></span></div>
<div class="line"><span class="preprocessor"> #include <FL/Fl_Window.H></span></div>
<div class="line">+</div>
<div class="line">+#include <span class="stringliteral">"fltkcomplexbutton.hh"</span></div>
</div><!-- fragment --><p>Second, namespaces:</p>
<div class="fragment"><div class="line">+<span class="keyword">using namespace </span><a class="code" href="namespacedw_1_1fltk_1_1ui.html">dw::fltk::ui</a>;</div>
</div><!-- fragment --><p>Since the base class is now Fl_Group, the constructor must be changed:</p>
<div class="fragment"><div class="line">-ComplexButton::ComplexButton(<span class="keywordtype">int</span> x,<span class="keywordtype">int</span> y,<span class="keywordtype">int</span> w,<span class="keywordtype">int</span> h, <span class="keyword">const</span> <span class="keywordtype">char</span> *l) : Fl_Widget(x,y,w,h,l) {</div>
<div class="line">+ComplexButton::ComplexButton(<span class="keywordtype">int</span> x,<span class="keywordtype">int</span> y,<span class="keywordtype">int</span> w,<span class="keywordtype">int</span> h, <span class="keyword">const</span> <span class="keywordtype">char</span> *l) :</div>
<div class="line">+ Fl_Group(x,y,w,h,l)</div>
<div class="line">+{</div>
</div><!-- fragment --><p>Finally, the button must draw its children (end of <a class="el" href="classdw_1_1fltk_1_1ui_1_1ComplexButton.html#a16f178a6d66081f759081026e88bbec6">dw::fltk::ui::ComplexButton::draw()</a>):</p>
<div class="fragment"><div class="line">+</div>
<div class="line">+ <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = children () - 1; i >= 0; i--)</div>
<div class="line">+ draw_child (*child (i));</div>
<div class="line"> }</div>
</div><!-- fragment --> </div></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sat May 28 2016 11:47:43 for Dillo by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.8
</small></address>
</body>
</html>
|