1 # data file for the Fltk User Interface Designer (fluid)
3 header_name {../FL/Fl_Help_Dialog.H}
6 // "$Id: Fl_Help_Dialog.fl 7913 2010-11-29 18:18:27Z greg.ercolano $"
8 // Fl_Help_Dialog dialog for the Fast Light Tool Kit (FLTK).
10 // Copyright 1998-2010 by Bill Spitzak and others.
12 // This library is free software; you can redistribute it and/or
13 // modify it under the terms of the GNU Library General Public
14 // License as published by the Free Software Foundation; either
15 // version 2 of the License, or (at your option) any later version.
17 // This library is distributed in the hope that it will be useful,
18 // but WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 // Library General Public License for more details.
22 // You should have received a copy of the GNU Library General Public
23 // License along with this library; if not, write to the Free Software
24 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
27 // Please report all bugs and problems on the following page:
29 // http://www.fltk.org/str.php
31 } {in_source in_header
34 decl {\#include "flstring.h"} {}
36 decl {\#include <FL/fl_ask.H>} {}
38 class FL_EXPORT Fl_Help_Dialog {open
42 decl {int line_[100];} {}
43 decl {char file_[100][256];} {}
44 decl {int find_pos_;} {}
45 Function {Fl_Help_Dialog()} {open
48 label {Help Dialog} open
49 private xywh {398 64 530 385} type Double resizable size_range {260 150 0 0} visible
51 Fl_Group {} {open selected
56 callback {if (index_ > 0)
64 int l = line_[index_];
66 if (strcmp(view_->filename(), file_[index_]) != 0)
67 view_->load(file_[index_]);
70 private tooltip {Show the previous help page.} xywh {10 10 25 25} shortcut 0xff51 labelcolor 2
74 callback {if (index_ < max_)
78 forward_->deactivate();
82 int l = view_->topline();
84 if (strcmp(view_->filename(), file_[index_]) != 0)
85 view_->load(file_[index_]);
88 private tooltip {Show the next help page.} xywh {45 10 25 25} shortcut 0xff53 labelcolor 2
92 callback {if (view_->textsize() > 8)
93 view_->textsize(view_->textsize() - 2);
95 if (view_->textsize() <= 8)
96 smaller_->deactivate();
98 private tooltip {Make the help text smaller.} xywh {80 10 25 25} labelfont 1 labelsize 10
102 callback {if (view_->textsize() < 18)
103 view_->textsize(view_->textsize() + 2);
105 if (view_->textsize() >= 18)
106 larger_->deactivate();
107 smaller_->activate();}
108 private tooltip {Make the help text larger.} xywh {115 10 25 25} labelfont 1 labelsize 16
111 xywh {350 10 171 25} box DOWN_BOX color 7
115 callback {find_pos_ = view_->find(find_->value(), find_pos_);}
116 private tooltip {find text in document} xywh {375 12 143 21} box FLAT_BOX labelsize 13 when 10 textfont 4
120 xywh {150 10 190 25} resizable
124 callback {if (view_->filename())
126 if (view_->changed())
132 memmove(line_, line_ + 10, sizeof(line_[0]) * 90);
133 memmove(file_, file_ + 10, sizeof(file_[0]) * 90);
139 strlcpy(file_[index_], view_->filename(),sizeof(file_[0]));
140 line_[index_] = view_->topline();
147 forward_->deactivate();
148 window_->label(view_->title());
150 else // if ! view_->changed()
152 strlcpy(file_[index_], view_->filename(), sizeof(file_[0]));
153 line_[index_] = view_->topline();
155 } else { // if ! view_->filename()
156 index_ = 0; // hitting an internal page will disable the back/fwd buffer
157 file_[index_][0] = 0; // unnamed internal page
158 line_[index_] = view_->topline();
160 forward_->deactivate();
162 private xywh {10 45 510 330} box DOWN_BOX resizable
165 code {back_->deactivate();
166 forward_->deactivate();
172 fl_register_images();} {}
174 Function {~Fl_Help_Dialog()} {} {
175 code {delete window_;} {}
177 Function {h()} {return_type int
179 code {return (window_->h());} {}
181 Function {hide()} {return_type void
183 code {window_->hide();} {}
185 Function {load(const char *f)} {return_type void
187 code {view_->set_changed();
189 window_->label(view_->title());} {}
191 Function {position(int xx, int yy)} {return_type void
193 code {window_->position(xx, yy);} {}
195 Function {resize(int xx, int yy, int ww, int hh)} {return_type void
197 code {window_->resize(xx, yy, ww, hh);} {}
199 Function {show()} {return_type void
201 code {window_->show();} {}
203 Function {show(int argc, char **argv)} {return_type void
205 code {window_->show(argc, argv);} {}
207 Function {textsize(Fl_Fontsize s)} {return_type void
209 code {view_->textsize(s);
212 smaller_->deactivate();
214 smaller_->activate();
217 larger_->deactivate();
219 larger_->activate();} {}
221 Function {textsize()} {return_type Fl_Fontsize
223 code {return (view_->textsize());} {}
225 Function {topline(const char *n)} {return_type void
227 code {view_->topline(n);} {}
229 Function {topline(int n)} {return_type void
231 code {view_->topline(n);} {}
233 Function {value(const char *f)} {return_type void
235 code {view_->set_changed();
237 window_->label(view_->title());} {}
239 Function {value() const} {return_type {const char *}
241 code {return view_->value();} {}
243 Function {visible()} {return_type int
245 code {return (window_->visible());} {}
247 Function {w()} {return_type int
249 code {return (window_->w());} {}
251 Function {x()} {return_type int
253 code {return (window_->x());} {}
255 Function {y()} {return_type int
257 code {return (window_->y());} {}
263 // End of "$Id: Fl_Help_Dialog.fl 7913 2010-11-29 18:18:27Z greg.ercolano $".
264 //} {in_source in_header