fltk/src/Fl_Help_Dialog.fl
Matthias Melcher 47276e733d In order to make the whitte text field at the bottom left of the
Help Dialog clearer, I added a magnifying glass in front of the
field sybolising "search".

I made the scaleable magnifying glass available as a symbol via
"@search"

I added yet another symbol that draw a vectorized version of
the FLTK logo. Available via "@FLTK".

Lastly, I changed the 'symbol' test program to show the additional
symbols, and added a slider to changae the relative symbol size.

I hope the new symbols look good enough on other platforms, too. I
tested only OS X.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3479 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-07-04 06:49:34 +00:00

213 lines
4.9 KiB
Plaintext

# data file for the Fltk User Interface Designer (fluid)
version 1.0105
header_name {../FL/Fl_Help_Dialog.H}
code_name {.cxx}
decl {\#include "flstring.h"} {}
decl {\#include <FL/fl_ask.H>} {}
class FL_EXPORT Fl_Help_Dialog {open
} {
decl {int index_;} {}
decl {int max_;} {}
decl {int line_[100];} {}
decl {char file_[100][256];} {}
decl {int find_pos_;} {}
Function {Fl_Help_Dialog()} {open
} {
Fl_Window window_ {
label {Help Dialog} open
private xywh {398 65 530 385} type Double resizable visible
} {
Fl_Group view_ {
callback {if (view_->changed())
{
index_ ++;
if (index_ >= 100)
{
memmove(line_, line_ + 10, sizeof(line_[0]) * 90);
memmove(file_, file_ + 10, sizeof(file_[0]) * 90);
index_ -= 10;
}
max_ = index_;
strlcpy(file_[index_], view_->filename(),sizeof(file_[0]));
line_[index_] = view_->topline();
if (index_ > 0)
back_->activate();
else
back_->deactivate();
forward_->deactivate();
window_->label(view_->title());
}
else if (view_->filename())
{
strlcpy(file_[index_], view_->filename(), sizeof(file_[0]));
line_[index_] = view_->topline();
}} open
private xywh {10 10 510 330} box DOWN_BOX selection_color 15 resizable
code0 {\#include <FL/Fl_Help_View.H>}
class Fl_Help_View
} {}
Fl_Button {} {
label Close
callback {window_->hide();}
private xywh {425 350 95 25}
code0 {o->label(fl_close);}
}
Fl_Button back_ {
label {@<-}
callback {if (index_ > 0)
index_ --;
if (index_ == 0)
back_->deactivate();
forward_->activate();
int l = line_[index_];
if (strcmp(view_->filename(), file_[index_]) != 0)
view_->load(file_[index_]);
view_->topline(l);}
private tooltip {Show the previous help page.} xywh {355 350 25 25} shortcut 0xff51 labelcolor 2
}
Fl_Button forward_ {
label {@->}
callback {if (index_ < max_)
index_ ++;
if (index_ >= max_)
forward_->deactivate();
back_->activate();
int l = view_->topline();
if (strcmp(view_->filename(), file_[index_]) != 0)
view_->load(file_[index_]);
view_->topline(l);}
private tooltip {Show the next help page.} xywh {390 350 25 25} shortcut 0xff53 labelcolor 2
}
Fl_Button smaller_ {
label F
callback {if (view_->textsize() > 8)
view_->textsize(view_->textsize() - 2);
if (view_->textsize() <= 8)
smaller_->deactivate();
larger_->activate();}
private tooltip {Make the help text smaller.} xywh {285 350 25 25} labelfont 1 labelsize 10
}
Fl_Button larger_ {
label F
callback {if (view_->textsize() < 18)
view_->textsize(view_->textsize() + 2);
if (view_->textsize() >= 18)
larger_->deactivate();
smaller_->activate();}
private tooltip {Make the help text larger.} xywh {320 350 25 25} labelfont 1 labelsize 16
}
Fl_Group {} {open
xywh {10 350 265 25} box DOWN_BOX color 7
} {
Fl_Input find_ {
label {@search}
callback {find_pos_ = view_->find(find_->value(), find_pos_);} selected
private tooltip {find text in document} xywh {35 352 238 21} box FLAT_BOX labelsize 13 when 10
}
}
}
code {back_->deactivate();
forward_->deactivate();
index_ = -1;
max_ = 0;
find_pos_ = 0;
fl_register_images();} {}
}
Function {~Fl_Help_Dialog()} {} {
code {delete window_;} {}
}
Function {h()} {return_type int
} {
code {return (window_->h());} {}
}
Function {hide()} {return_type void
} {
code {window_->hide();} {}
}
Function {load(const char *f)} {return_type void
} {
code {view_->set_changed();
view_->load(f);
window_->label(view_->title());} {}
}
Function {position(int xx, int yy)} {return_type void
} {
code {window_->position(xx, yy);} {}
}
Function {resize(int xx, int yy, int ww, int hh)} {return_type void
} {
code {window_->resize(xx, yy, ww, hh);} {}
}
Function {show()} {return_type void
} {
code {window_->show();} {}
}
Function {show(int argc, char **argv)} {return_type void
} {
code {window_->show(argc, argv);} {}
}
Function {textsize(uchar s)} {return_type void
} {
code {view_->textsize(s);
if (s <= 8)
smaller_->deactivate();
else
smaller_->activate();
if (s >= 18)
larger_->deactivate();
else
larger_->activate();} {}
}
Function {textsize()} {return_type uchar
} {
code {return (view_->textsize());} {}
}
Function {topline(const char *n)} {return_type void
} {
code {view_->topline(n);} {}
}
Function {topline(int n)} {return_type void
} {
code {view_->topline(n);} {}
}
Function {visible()} {return_type int
} {
code {return (window_->visible());} {}
}
Function {w()} {return_type int
} {
code {return (window_->w());} {}
}
Function {x()} {return_type int
} {
code {return (window_->x());} {}
}
Function {y()} {return_type int
} {
code {return (window_->y());} {}
}
}