HelpView/HelpDialog updates.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1585 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
c15ea394d0
commit
743cd4f95d
3
CHANGES
3
CHANGES
@ -22,6 +22,9 @@ CHANGES IN FLTK 1.1.0b2
|
|||||||
style (round radio buttons with dots and square check
|
style (round radio buttons with dots and square check
|
||||||
buttons with check marks.)
|
buttons with check marks.)
|
||||||
- Improved the appearance of Fl_Check_Button.
|
- Improved the appearance of Fl_Check_Button.
|
||||||
|
- Improved the Fl_HelpView table formatting code; now
|
||||||
|
dynamically sizes the table columns, and supports
|
||||||
|
COLSPAN.
|
||||||
|
|
||||||
|
|
||||||
CHANGES IN FLTK 1.1.0b1
|
CHANGES IN FLTK 1.1.0b1
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#ifndef Fl_HelpDialog_H
|
#ifndef Fl_HelpDialog_H
|
||||||
#define Fl_HelpDialog_H
|
#define Fl_HelpDialog_H
|
||||||
#include <FL/Fl.H>
|
#include <FL/Fl.H>
|
||||||
#include <FL/Fl_Window.H>
|
#include <FL/Fl_Double_Window.H>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <FL/Fl_HelpView.H>
|
#include <FL/Fl_HelpView.H>
|
||||||
#include <FL/Fl_Button.H>
|
#include <FL/Fl_Button.H>
|
||||||
@ -16,7 +16,7 @@ class Fl_HelpDialog {
|
|||||||
public:
|
public:
|
||||||
Fl_HelpDialog();
|
Fl_HelpDialog();
|
||||||
private:
|
private:
|
||||||
Fl_Window *window_;
|
Fl_Double_Window *window_;
|
||||||
Fl_HelpView *view_;
|
Fl_HelpView *view_;
|
||||||
inline void cb_view__i(Fl_HelpView*, void*);
|
inline void cb_view__i(Fl_HelpView*, void*);
|
||||||
static void cb_view_(Fl_HelpView*, void*);
|
static void cb_view_(Fl_HelpView*, void*);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_HelpView.H,v 1.1.2.2 2001/08/06 23:51:39 easysw Exp $"
|
// "$Id: Fl_HelpView.H,v 1.1.2.3 2001/09/10 03:09:43 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Help Viewer widget definitions.
|
// Help Viewer widget definitions.
|
||||||
//
|
//
|
||||||
@ -101,6 +101,7 @@ struct Fl_HelpImage
|
|||||||
hattr[8]; // Height attribute
|
hattr[8]; // Height attribute
|
||||||
Fl_Image *image; // FLTK image representation
|
Fl_Image *image; // FLTK image representation
|
||||||
unsigned char *data; // Raw image data
|
unsigned char *data; // Raw image data
|
||||||
|
int copy; // Data is a copy?
|
||||||
int w, h, d; // Image size & depth
|
int w, h, d; // Image size & depth
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -157,12 +158,14 @@ class Fl_HelpView : public Fl_Group //// Help viewer widget
|
|||||||
int load_png(Fl_HelpImage *img, FILE *fp);
|
int load_png(Fl_HelpImage *img, FILE *fp);
|
||||||
|
|
||||||
Fl_HelpBlock *add_block(const char *s, int xx, int yy, int ww, int hh, uchar border = 0);
|
Fl_HelpBlock *add_block(const char *s, int xx, int yy, int ww, int hh, uchar border = 0);
|
||||||
|
static int compare_blocks(const void *a, const void *b);
|
||||||
void add_link(const char *n, int xx, int yy, int ww, int hh);
|
void add_link(const char *n, int xx, int yy, int ww, int hh);
|
||||||
void add_target(const char *n, int yy);
|
void add_target(const char *n, int yy);
|
||||||
static int compare_targets(const Fl_HelpTarget *t0, const Fl_HelpTarget *t1);
|
static int compare_targets(const Fl_HelpTarget *t0, const Fl_HelpTarget *t1);
|
||||||
int do_align(Fl_HelpBlock *block, int line, int xx, int a, int &l);
|
int do_align(Fl_HelpBlock *block, int line, int xx, int a, int &l);
|
||||||
void draw();
|
void draw();
|
||||||
void format();
|
void format();
|
||||||
|
void format_table(int *table_width, int *columns, const char *table);
|
||||||
int get_align(const char *p, int a);
|
int get_align(const char *p, int a);
|
||||||
const char *get_attr(const char *p, const char *n, char *buf, int bufsize);
|
const char *get_attr(const char *p, const char *n, char *buf, int bufsize);
|
||||||
Fl_Color get_color(const char *n, Fl_Color c);
|
Fl_Color get_color(const char *n, Fl_Color c);
|
||||||
@ -207,5 +210,5 @@ class Fl_HelpView : public Fl_Group //// Help viewer widget
|
|||||||
#endif // !_Fl_HelpView_H_
|
#endif // !_Fl_HelpView_H_
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_HelpView.H,v 1.1.2.2 2001/08/06 23:51:39 easysw Exp $".
|
// End of "$Id: Fl_HelpView.H,v 1.1.2.3 2001/09/10 03:09:43 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
</HEAD>
|
</HEAD>
|
||||||
<BODY>
|
<BODY>
|
||||||
|
|
||||||
<CENTER><TABLE WIDTH=90% BGCOLOR=#9f9f9f CELLPADDING=8 CELLSPACING=0 SUMMARY="TITLE BAR">
|
<TABLE WIDTH=90% BGCOLOR=#9f9f9f CELLPADDING=8 CELLSPACING=0 SUMMARY="TITLE BAR">
|
||||||
<TR>
|
<TR>
|
||||||
<TD ALIGN=CENTER VALIGN=MIDDLE WIDTH=100><IMG SRC="FL.gif" WIDTH=100 HEIGHT=70 ALIGN="ABSMIDDLE" ALT="FL"></TD>
|
<TD ALIGN=CENTER VALIGN=MIDDLE WIDTH=100><IMG SRC="FL.gif" WIDTH=100 HEIGHT=70 ALIGN="ABSMIDDLE" ALT="FL"></TD>
|
||||||
<TD ALIGN=CENTER VALIGN=MIDDLE WIDTH=500>
|
<TD ALIGN=CENTER VALIGN=MIDDLE WIDTH=500>
|
||||||
@ -13,6 +13,7 @@ Revision 0 by Michael Sweet, Craig P. Earls, and Bill Spitzak<BR>
|
|||||||
Copyright 1998-2001 by Bill Spitzak and others.<BR>
|
Copyright 1998-2001 by Bill Spitzak and others.<BR>
|
||||||
</TD>
|
</TD>
|
||||||
</TR>
|
</TR>
|
||||||
|
</TABLE>
|
||||||
<TABLE WIDTH=90% BGCOLOR=#9f9f9f CELLPADDING=8 CELLSPACING=0 SUMMARY="TITLE BAR">
|
<TABLE WIDTH=90% BGCOLOR=#9f9f9f CELLPADDING=8 CELLSPACING=0 SUMMARY="TITLE BAR">
|
||||||
<TR>
|
<TR>
|
||||||
<TD ALIGN=CENTER WIDTH=600>
|
<TD ALIGN=CENTER WIDTH=600>
|
||||||
@ -20,9 +21,8 @@ This software is provided under the terms of the GNU Library General
|
|||||||
Public License.
|
Public License.
|
||||||
</TD>
|
</TD>
|
||||||
</TR>
|
</TR>
|
||||||
</TABLE></CENTER>
|
</TABLE>
|
||||||
|
<TABLE WIDTH=90% COLS=2 BGCOLOR=#9f9fef CELLPADDING=8 CELLSPACING=0 SUMMARY="Table of Contents">
|
||||||
<CENTER><TABLE WIDTH=90% COLS=2 BGCOLOR=#9f9fef CELLPADDING=8 CELLSPACING=0 SUMMARY="Table of Contents">
|
|
||||||
<TR>
|
<TR>
|
||||||
<TD ALIGN=LEFT VALIGN=TOP WIDTH=300>
|
<TD ALIGN=LEFT VALIGN=TOP WIDTH=300>
|
||||||
<B><A HREF=preface.html#preface>Preface</A></B>
|
<B><A HREF=preface.html#preface>Preface</A></B>
|
||||||
@ -89,7 +89,7 @@ Widgets</A></B>
|
|||||||
<B><A HREF=license.html#license>G - Software License</A></B>
|
<B><A HREF=license.html#license>G - Software License</A></B>
|
||||||
</TD>
|
</TD>
|
||||||
</TR>
|
</TR>
|
||||||
</TABLE></CENTER>
|
</TABLE>
|
||||||
|
|
||||||
</BODY>
|
</BODY>
|
||||||
</HTML>
|
</HTML>
|
||||||
|
@ -110,15 +110,17 @@ file.o: ../FL/Fl_Tabs.H ../FL/Fl_Pack.H ../FL/Fl_Group.H ../FL/Fl_Wizard.H
|
|||||||
file.o: ../FL/Fl_Menu_.H ../FL/Fl_Menu_Button.H ../FL/Fl_Menu_Bar.H
|
file.o: ../FL/Fl_Menu_.H ../FL/Fl_Menu_Button.H ../FL/Fl_Menu_Bar.H
|
||||||
fluid.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Export.H
|
fluid.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Export.H
|
||||||
fluid.o: ../FL/Fl_Double_Window.H ../FL/Fl_Window.H ../FL/Fl_Group.H
|
fluid.o: ../FL/Fl_Double_Window.H ../FL/Fl_Window.H ../FL/Fl_Group.H
|
||||||
fluid.o: ../FL/Fl_Box.H ../FL/Fl_Button.H ../FL/Fl_Hold_Browser.H
|
fluid.o: ../FL/Fl_Box.H ../FL/Fl_Button.H ../FL/Fl_HelpDialog.H
|
||||||
|
fluid.o: ../FL/Fl_Window.H ../FL/Fl_HelpView.H ../FL/Fl_Group.H
|
||||||
|
fluid.o: ../FL/Fl_Scrollbar.H ../FL/fl_draw.H ../FL/Fl_Hold_Browser.H
|
||||||
fluid.o: ../FL/Fl_Browser.H ../FL/Fl_Menu_Bar.H ../FL/Fl_Menu_.H
|
fluid.o: ../FL/Fl_Browser.H ../FL/Fl_Menu_Bar.H ../FL/Fl_Menu_.H
|
||||||
fluid.o: ../FL/Fl_Input.H ../FL/Fl_Input_.H ../FL/fl_ask.H ../FL/fl_draw.H
|
fluid.o: ../FL/Fl_Input.H ../FL/Fl_Input_.H ../FL/fl_ask.H
|
||||||
fluid.o: ../FL/fl_file_chooser.H ../FL/fl_message.H ../FL/fl_ask.H
|
fluid.o: ../FL/fl_file_chooser.H ../FL/fl_message.H ../FL/fl_ask.H
|
||||||
fluid.o: ../FL/filename.H about_panel.h ../FL/Fl_Window.H ../FL/Fl_Group.H
|
fluid.o: ../FL/filename.H ../config.h about_panel.h ../FL/Fl_Return_Button.H
|
||||||
fluid.o: ../FL/Fl_Return_Button.H ../FL/Fl_Button.H Fl_Type.h
|
fluid.o: ../FL/Fl_Button.H Fl_Type.h ../FL/Fl_Widget.H ../FL/Fl_Menu.H
|
||||||
fluid.o: ../FL/Fl_Widget.H ../FL/Fl_Menu.H ../FL/Fl_Menu_Item.H Fluid_Image.h
|
fluid.o: ../FL/Fl_Menu_Item.H Fluid_Image.h ../FL/Fl_Tabs.H ../FL/Fl_Pack.H
|
||||||
fluid.o: ../FL/Fl_Tabs.H ../FL/Fl_Pack.H ../FL/Fl_Wizard.H ../FL/Fl_Menu_.H
|
fluid.o: ../FL/Fl_Wizard.H ../FL/Fl_Menu_.H ../FL/Fl_Menu_Button.H
|
||||||
fluid.o: ../FL/Fl_Menu_Button.H ../FL/Fl_Choice.H
|
fluid.o: ../FL/Fl_Choice.H
|
||||||
about_panel.o: about_panel.h ../FL/Fl.H ../FL/Enumerations.H
|
about_panel.o: about_panel.h ../FL/Fl.H ../FL/Enumerations.H
|
||||||
about_panel.o: ../FL/Fl_Export.H ../FL/Fl_Window.H ../FL/Fl_Group.H
|
about_panel.o: ../FL/Fl_Export.H ../FL/Fl_Window.H ../FL/Fl_Group.H
|
||||||
about_panel.o: ../FL/Fl_Group.H ../FL/Fl_Box.H ../FL/Fl_Button.H
|
about_panel.o: ../FL/Fl_Group.H ../FL/Fl_Box.H ../FL/Fl_Button.H
|
||||||
|
@ -106,8 +106,8 @@ void Fl_HelpDialog::cb_larger_(Fl_Button* o, void* v) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Fl_HelpDialog::Fl_HelpDialog() {
|
Fl_HelpDialog::Fl_HelpDialog() {
|
||||||
Fl_Window* w;
|
Fl_Double_Window* w;
|
||||||
{ Fl_Window* o = window_ = new Fl_Window(530, 385, "Help Dialog");
|
{ Fl_Double_Window* o = window_ = new Fl_Double_Window(530, 385, "Help Dialog");
|
||||||
w = o;
|
w = o;
|
||||||
o->user_data((void*)(this));
|
o->user_data((void*)(this));
|
||||||
{ Fl_HelpView* o = view_ = new Fl_HelpView(10, 10, 510, 330);
|
{ Fl_HelpView* o = view_ = new Fl_HelpView(10, 10, 510, 330);
|
||||||
@ -121,13 +121,11 @@ Fl_HelpDialog::Fl_HelpDialog() {
|
|||||||
}
|
}
|
||||||
{ Fl_Button* o = back_ = new Fl_Button(365, 350, 25, 25, "@<-");
|
{ Fl_Button* o = back_ = new Fl_Button(365, 350, 25, 25, "@<-");
|
||||||
o->shortcut(0xff51);
|
o->shortcut(0xff51);
|
||||||
o->labeltype(FL_SYMBOL_LABEL);
|
|
||||||
o->labelcolor(2);
|
o->labelcolor(2);
|
||||||
o->callback((Fl_Callback*)cb_back_);
|
o->callback((Fl_Callback*)cb_back_);
|
||||||
}
|
}
|
||||||
{ Fl_Button* o = forward_ = new Fl_Button(395, 350, 25, 25, "@->");
|
{ Fl_Button* o = forward_ = new Fl_Button(395, 350, 25, 25, "@->");
|
||||||
o->shortcut(0xff53);
|
o->shortcut(0xff53);
|
||||||
o->labeltype(FL_SYMBOL_LABEL);
|
|
||||||
o->labelcolor(2);
|
o->labelcolor(2);
|
||||||
o->callback((Fl_Callback*)cb_forward_);
|
o->callback((Fl_Callback*)cb_forward_);
|
||||||
}
|
}
|
||||||
|
@ -14,8 +14,8 @@ class Fl_HelpDialog {open
|
|||||||
Function {Fl_HelpDialog()} {open
|
Function {Fl_HelpDialog()} {open
|
||||||
} {
|
} {
|
||||||
Fl_Window window_ {
|
Fl_Window window_ {
|
||||||
label {Help Dialog} open
|
label {Help Dialog} open selected
|
||||||
private xywh {470 402 530 385} resizable
|
private xywh {470 380 530 385} type Double resizable
|
||||||
code0 {\#include <string.h>} visible
|
code0 {\#include <string.h>} visible
|
||||||
} {
|
} {
|
||||||
Fl_Group view_ {
|
Fl_Group view_ {
|
||||||
@ -72,7 +72,7 @@ if (strcmp(view_->filename(), file_[index_]) != 0)
|
|||||||
view_->load(file_[index_]);
|
view_->load(file_[index_]);
|
||||||
|
|
||||||
view_->topline(line_[index_]);}
|
view_->topline(line_[index_]);}
|
||||||
private xywh {365 350 25 25} shortcut 0xff51 labeltype SYMBOL_LABEL labelcolor 2
|
private xywh {365 350 25 25} shortcut 0xff51 labelcolor 2
|
||||||
}
|
}
|
||||||
Fl_Button forward_ {
|
Fl_Button forward_ {
|
||||||
label {@->}
|
label {@->}
|
||||||
@ -88,7 +88,7 @@ if (strcmp(view_->filename(), file_[index_]) != 0)
|
|||||||
view_->load(file_[index_]);
|
view_->load(file_[index_]);
|
||||||
|
|
||||||
view_->topline(line_[index_]);}
|
view_->topline(line_[index_]);}
|
||||||
private xywh {395 350 25 25} shortcut 0xff53 labeltype SYMBOL_LABEL labelcolor 2
|
private xywh {395 350 25 25} shortcut 0xff53 labelcolor 2
|
||||||
}
|
}
|
||||||
Fl_Button smaller_ {
|
Fl_Button smaller_ {
|
||||||
label F
|
label F
|
||||||
@ -117,8 +117,7 @@ forward_->deactivate();
|
|||||||
index_ = -1;
|
index_ = -1;
|
||||||
max_ = 0;} {}
|
max_ = 0;} {}
|
||||||
}
|
}
|
||||||
Function {~Fl_HelpDialog()} {selected
|
Function {~Fl_HelpDialog()} {} {
|
||||||
} {
|
|
||||||
code {delete window_;} {}
|
code {delete window_;} {}
|
||||||
}
|
}
|
||||||
Function {h()} {return_type int
|
Function {h()} {return_type int
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -288,7 +288,7 @@ fl_font.o: ../config.h ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Export.H
|
|||||||
fl_font.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H Fl_Font.H
|
fl_font.o: ../FL/fl_draw.H ../FL/x.H ../FL/Fl_Window.H Fl_Font.H
|
||||||
fl_labeltype.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Export.H
|
fl_labeltype.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Export.H
|
||||||
fl_labeltype.o: ../FL/Fl_Widget.H ../FL/Fl_Group.H ../FL/fl_draw.H
|
fl_labeltype.o: ../FL/Fl_Widget.H ../FL/Fl_Group.H ../FL/fl_draw.H
|
||||||
fl_labeltype.o: ../FL/Fl_Input_.H ../FL/Fl_Widget.H
|
fl_labeltype.o: ../FL/Fl_Image.H ../FL/Fl_Input_.H ../FL/Fl_Widget.H
|
||||||
fl_line_style.o: ../FL/fl_draw.H ../FL/Enumerations.H ../FL/Fl_Export.H
|
fl_line_style.o: ../FL/fl_draw.H ../FL/Enumerations.H ../FL/Fl_Export.H
|
||||||
fl_line_style.o: ../FL/x.H ../FL/Fl_Window.H
|
fl_line_style.o: ../FL/x.H ../FL/Fl_Window.H
|
||||||
fl_oval_box.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Export.H
|
fl_oval_box.o: ../FL/Fl.H ../FL/Enumerations.H ../FL/Fl_Export.H
|
||||||
|
Loading…
Reference in New Issue
Block a user