Skip to content

Commit

Permalink
Tooltips, and more tooltips.
Browse files Browse the repository at this point in the history
Fl_Browser_, Fl_Choice, and Fl_Input_ did not do the tooltip stuff.

Fix write_properties so it writes tooltips properly from FLUID.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1616 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
michaelrsweet committed Sep 29, 2001
1 parent e7f3ad8 commit 72b56ed
Show file tree
Hide file tree
Showing 23 changed files with 242 additions and 131 deletions.
6 changes: 6 additions & 0 deletions CHANGES
Expand Up @@ -50,6 +50,12 @@ CHANGES IN FLTK 1.1.0b2

- Changed Fl_HelpXYZ to Fl_Help_XYZ.

- Tooltip fixes for Fl_Browser_, Fl_Choice, and Fl_Input_.

- Added tooltips to FLUID, help dialog, and file chooser.

- Now load system icons in FLUID.


CHANGES IN FLTK 1.1.0b1

Expand Down
6 changes: 3 additions & 3 deletions fluid/Fl_Widget_Type.cxx
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Widget_Type.cxx,v 1.15.2.16.2.3 2001/09/29 06:20:15 easysw Exp $"
// "$Id: Fl_Widget_Type.cxx,v 1.15.2.16.2.4 2001/09/29 22:59:45 easysw Exp $"
//
// Widget type code for the Fast Light Tool Kit (FLTK).
//
Expand Down Expand Up @@ -1644,7 +1644,7 @@ void Fl_Widget_Type::write_properties() {
if (!public_) write_string("private");
if (tooltip() && *tooltip()) {
write_string("tooltip");
write_word(o->tooltip());
write_word(tooltip());
}
if (image_name() && *image_name()) {
write_string("image");
Expand Down Expand Up @@ -1955,5 +1955,5 @@ int Fl_Widget_Type::read_fdesign(const char* name, const char* value) {
}

//
// End of "$Id: Fl_Widget_Type.cxx,v 1.15.2.16.2.3 2001/09/29 06:20:15 easysw Exp $".
// End of "$Id: Fl_Widget_Type.cxx,v 1.15.2.16.2.4 2001/09/29 22:59:45 easysw Exp $".
//
4 changes: 2 additions & 2 deletions fluid/about_panel.cxx
@@ -1,4 +1,4 @@
// generated by Fast Light User Interface Designer (fluid) version 1.0011
// generated by Fast Light User Interface Designer (fluid) version 1.0100

#include "about_panel.h"

Expand Down Expand Up @@ -87,7 +87,7 @@ Fl_Window* make_about_panel(const char *copyright) {
o->labelcolor(7);
o->align(FL_ALIGN_TOP|FL_ALIGN_INSIDE);
}
{ Fl_Box* o = new Fl_Box(140, 27, 160, 123, "FLTK User\nInterface\nDesigner\nVersion 1.0.11");
{ Fl_Box* o = new Fl_Box(140, 27, 160, 123, "FLTK User\nInterface\nDesigner\nVersion 1.1.0");
o->box(FL_OVAL_BOX);
o->color(12);
o->selection_color(47);
Expand Down
8 changes: 4 additions & 4 deletions fluid/about_panel.fl
@@ -1,5 +1,5 @@
# data file for the Fltk User Interface Designer (fluid)
version 1.0011
version 1.0100
header_name {.h}
code_name {.cxx}
gridx 10
Expand All @@ -9,7 +9,7 @@ Function {make_about_panel(const char *copyright)} {open
} {
Fl_Window about_panel {
label {about fluid} open
xywh {345 417 309 258} box UP_BOX color 97 selection_color 47 hotspot non_modal visible
xywh {78 110 309 258} box UP_BOX color 97 selection_color 47 hotspot non_modal visible
} {
Fl_Group display_group {open
xywh {10 10 290 240}
Expand Down Expand Up @@ -49,14 +49,14 @@ Function {make_about_panel(const char *copyright)} {open
label {FLTK User
Interface
Designer
Version 1.0.11}
Version 1.1.0} selected
xywh {140 27 160 123} box OVAL_BOX color 12 selection_color 47 labeltype SHADOW_LABEL labelfont 1 labelsize 18 labelcolor 7
}
Fl_Button {} {
label {�1998-2001 by
Bill Spitzak and others}
callback {display_group->hide();
copyright_box->show();} selected
copyright_box->show();}
xywh {181 176 115 30} box THIN_UP_BOX labelsize 10 labelcolor 136
}
}
Expand Down
2 changes: 1 addition & 1 deletion fluid/about_panel.h
@@ -1,4 +1,4 @@
// generated by Fast Light User Interface Designer (fluid) version 1.0011
// generated by Fast Light User Interface Designer (fluid) version 1.0100

#ifndef about_panel_h
#define about_panel_h
Expand Down
17 changes: 15 additions & 2 deletions fluid/alignment_panel.cxx
@@ -1,4 +1,4 @@
// generated by Fast Light User Interface Designer (fluid) version 1.0008
// generated by Fast Light User Interface Designer (fluid) version 1.0100

#include "alignment_panel.h"

Expand Down Expand Up @@ -41,30 +41,34 @@ Fl_Window* make_alignment_window() {
Fl_Window* w;
{ Fl_Window* o = alignment_window = new Fl_Window(365, 340, "Preferences");
w = o;
{ Fl_Box* o = new Fl_Box(10, 25, 130, 130, "Alignment:");
{ Fl_Box* o = new Fl_Box(10, 25, 130, 130, "Grid:");
o->box(FL_ENGRAVED_FRAME);
o->labelsize(12);
o->align(FL_ALIGN_TOP_LEFT);
}
{ Fl_Input* o = horizontal_input = new Fl_Input(90, 35, 40, 20, "Horizontal:");
o->tooltip("Horizontal grid spacing.");
o->type(2);
o->box(FL_THIN_DOWN_BOX);
o->callback((Fl_Callback*)alignment_cb, (void*)(1));
o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);
}
{ Fl_Input* o = vertical_input = new Fl_Input(90, 65, 40, 20, "Vertical:");
o->tooltip("Vertical grid spacing.");
o->type(2);
o->box(FL_THIN_DOWN_BOX);
o->callback((Fl_Callback*)alignment_cb, (void*)(2));
o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);
}
{ Fl_Input* o = snap_input = new Fl_Input(90, 95, 40, 20, "Snap:");
o->tooltip("Snap to grid within this many pixels.");
o->type(2);
o->box(FL_THIN_DOWN_BOX);
o->callback((Fl_Callback*)alignment_cb, (void*)(3));
o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);
}
{ Fl_Button* o = new Fl_Button(295, 305, 60, 25, "Close");
o->tooltip("Close this dialog.");
o->callback((Fl_Callback*)cb_Close);
}
{ Fl_Box* o = new Fl_Box(10, 175, 345, 120, "Output File Names:");
Expand All @@ -77,18 +81,21 @@ Fl_Window* make_alignment_window() {
o->align(132|FL_ALIGN_INSIDE);
}
{ Fl_Input* o = header_file_input = new Fl_Input(100, 205, 245, 20, "Header File:");
o->tooltip("The name of the generated header file.");
o->box(FL_THIN_DOWN_BOX);
o->textfont(4);
o->callback((Fl_Callback*)header_input_cb, (void*)(1));
o->when(FL_WHEN_CHANGED);
}
{ Fl_Input* o = code_file_input = new Fl_Input(100, 235, 245, 20, "Code File:");
o->tooltip("The name of the generated code file.");
o->box(FL_THIN_DOWN_BOX);
o->textfont(4);
o->callback((Fl_Callback*)code_input_cb, (void*)(1));
o->when(FL_WHEN_CHANGED);
}
{ Fl_Light_Button* o = include_H_from_C_button = new Fl_Light_Button(100, 265, 170, 20, "Include Header from Code");
o->tooltip("Include the header file from the code file.");
o->value(1);
o->labelsize(12);
o->callback((Fl_Callback*)include_H_from_C_button_cb);
Expand All @@ -99,30 +106,36 @@ Fl_Window* make_alignment_window() {
o->align(FL_ALIGN_TOP_LEFT);
}
{ Fl_Choice* o = i18n_type_chooser = new Fl_Choice(220, 35, 125, 20, "Use:");
o->tooltip("Type of internationalization to use.");
o->box(FL_THIN_UP_BOX);
o->down_box(FL_BORDER_BOX);
o->callback((Fl_Callback*)i18n_type_cb);
o->menu(menu_i18n_type_chooser);
}
{ Fl_Input* o = i18n_include_input = new Fl_Input(220, 65, 125, 20, "#include:");
o->tooltip("The include file for internationalization.");
o->box(FL_THIN_DOWN_BOX);
o->textfont(4);
o->callback((Fl_Callback*)i18n_text_cb);
o->hide();
}
{ Fl_Input* o = i18n_file_input = new Fl_Input(220, 95, 125, 20, "File:");
o->tooltip("The name of the message catalog.");
o->box(FL_THIN_DOWN_BOX);
o->textfont(4);
o->callback((Fl_Callback*)i18n_text_cb);
o->hide();
}
{ Fl_Input* o = i18n_set_input = new Fl_Input(220, 125, 125, 20, "Set:");
o->tooltip("The message set number.");
o->type(2);
o->box(FL_THIN_DOWN_BOX);
o->textfont(4);
o->callback((Fl_Callback*)i18n_text_cb);
o->hide();
}
{ Fl_Input* o = i18n_function_input = new Fl_Input(220, 95, 125, 20, "Function:");
o->tooltip("The function to call to internationalize the labels and tooltips.");
o->box(FL_THIN_DOWN_BOX);
o->textfont(4);
o->callback((Fl_Callback*)i18n_text_cb);
Expand Down
34 changes: 17 additions & 17 deletions fluid/alignment_panel.fl
@@ -1,5 +1,5 @@
# data file for the Fltk User Interface Designer (fluid)
version 1.0008
version 1.0100
header_name {.h}
code_name {.cxx}
gridx 5
Expand All @@ -9,37 +9,37 @@ Function {make_alignment_window()} {open
} {
Fl_Window alignment_window {
label Preferences open
xywh {473 284 365 340} hide modal
xywh {469 112 365 340} modal visible
} {
Fl_Box {} {
label {Alignment:}
label {Grid:}
xywh {10 25 130 130} box ENGRAVED_FRAME labelsize 12 align 5
}
Fl_Input horizontal_input {
label {Horizontal:}
user_data 1 user_data_type long
callback alignment_cb
xywh {90 35 40 20} type Int box THIN_DOWN_BOX
tooltip {Horizontal grid spacing.} xywh {90 35 40 20} type Int box THIN_DOWN_BOX
code0 {o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);}
}
Fl_Input vertical_input {
label {Vertical:}
user_data 2 user_data_type long
callback alignment_cb
xywh {90 65 40 20} type Int box THIN_DOWN_BOX
tooltip {Vertical grid spacing.} xywh {90 65 40 20} type Int box THIN_DOWN_BOX
code0 {o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);}
}
Fl_Input snap_input {
label {Snap:}
user_data 3 user_data_type long
callback alignment_cb
xywh {90 95 40 20} type Int box THIN_DOWN_BOX
tooltip {Snap to grid within this many pixels.} xywh {90 95 40 20} type Int box THIN_DOWN_BOX
code0 {o->when(FL_WHEN_RELEASE|FL_WHEN_ENTER_KEY);}
}
Fl_Button {} {
label Close
callback {alignment_window->hide();}
xywh {295 305 60 25}
callback {alignment_window->hide();} selected
tooltip {Close this dialog.} xywh {295 305 60 25}
}
Fl_Box {} {
label {Output File Names:}
Expand All @@ -53,18 +53,18 @@ Function {make_alignment_window()} {open
label {Header File:}
user_data 1 user_data_type {void*}
callback header_input_cb
xywh {100 205 245 20} box THIN_DOWN_BOX when 1 textfont 4
tooltip {The name of the generated header file.} xywh {100 205 245 20} box THIN_DOWN_BOX when 1 textfont 4
}
Fl_Input code_file_input {
label {Code File:}
user_data 1 user_data_type {void*}
callback code_input_cb
xywh {100 235 245 20} box THIN_DOWN_BOX when 1 textfont 4
tooltip {The name of the generated code file.} xywh {100 235 245 20} box THIN_DOWN_BOX when 1 textfont 4
}
Fl_Light_Button include_H_from_C_button {
label {Include Header from Code}
callback include_H_from_C_button_cb
xywh {100 265 170 20} value 1 labelsize 12
tooltip {Include the header file from the code file.} xywh {100 265 170 20} value 1 labelsize 12
}
Fl_Box {} {
label {Internationalization:}
Expand All @@ -73,7 +73,7 @@ Function {make_alignment_window()} {open
Fl_Choice i18n_type_chooser {
label {Use:}
callback i18n_type_cb open
xywh {220 35 125 20} box THIN_UP_BOX
tooltip {Type of internationalization to use.} xywh {220 35 125 20} box THIN_UP_BOX down_box BORDER_BOX
} {
menuitem {} {
label None
Expand All @@ -90,23 +90,23 @@ Function {make_alignment_window()} {open
}
Fl_Input i18n_include_input {
label {\#include:}
callback i18n_text_cb selected
xywh {220 65 125 20} box THIN_DOWN_BOX textfont 4 hide
callback i18n_text_cb
tooltip {The include file for internationalization.} xywh {220 65 125 20} box THIN_DOWN_BOX textfont 4 hide
}
Fl_Input i18n_file_input {
label {File:}
callback i18n_text_cb
xywh {220 95 125 20} box THIN_DOWN_BOX textfont 4 hide
tooltip {The name of the message catalog.} xywh {220 95 125 20} box THIN_DOWN_BOX textfont 4 hide
}
Fl_Input i18n_set_input {
label {Set:}
callback i18n_text_cb
xywh {220 125 125 20} type Int box THIN_DOWN_BOX textfont 4 hide
tooltip {The message set number.} xywh {220 125 125 20} type Int box THIN_DOWN_BOX textfont 4 hide
}
Fl_Input i18n_function_input {
label {Function:}
callback i18n_text_cb
xywh {220 95 125 20} box THIN_DOWN_BOX textfont 4 hide
tooltip {The function to call to internationalize the labels and tooltips.} xywh {220 95 125 20} box THIN_DOWN_BOX textfont 4 hide
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion fluid/alignment_panel.h
@@ -1,4 +1,4 @@
// generated by Fast Light User Interface Designer (fluid) version 1.0008
// generated by Fast Light User Interface Designer (fluid) version 1.0100

#ifndef alignment_panel_h
#define alignment_panel_h
Expand Down
7 changes: 5 additions & 2 deletions fluid/fluid.cxx
@@ -1,5 +1,5 @@
//
// "$Id: fluid.cxx,v 1.15.2.13.2.6 2001/09/29 14:38:59 easysw Exp $"
// "$Id: fluid.cxx,v 1.15.2.13.2.7 2001/09/29 22:59:45 easysw Exp $"
//
// FLUID main entry for the Fast Light Tool Kit (FLTK).
//
Expand Down Expand Up @@ -48,6 +48,7 @@ const char *copyright =
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Box.H>
#include <FL/Fl_Button.H>
#include <FL/Fl_File_Icon.H>
#include <FL/Fl_Help_Dialog.H>
#include <FL/Fl_Hold_Browser.H>
#include <FL/Fl_Menu_Bar.H>
Expand Down Expand Up @@ -426,6 +427,7 @@ void make_main_window() {
main_window->box(FL_NO_BOX);
o = make_widget_browser(0,MENUHEIGHT,BROWSERWIDTH,BROWSERHEIGHT);
o->box(FL_FLAT_BOX);
o->tooltip("Double-click to view or change an item.");
main_window->resizable(o);
Fl_Menu_Bar *m = new Fl_Menu_Bar(0,0,BROWSERWIDTH,MENUHEIGHT);
m->menu(Main_Menu);
Expand Down Expand Up @@ -498,6 +500,7 @@ int main(int argc,char **argv) {
if (c) set_filename(c);
if (!compile_only) {
Fl::visual((Fl_Mode)(FL_DOUBLE|FL_INDEX));
Fl_File_Icon::load_system_icons();
main_window->callback(exit_cb);
main_window->show(argc,argv);
}
Expand All @@ -518,5 +521,5 @@ int main(int argc,char **argv) {
}

//
// End of "$Id: fluid.cxx,v 1.15.2.13.2.6 2001/09/29 14:38:59 easysw Exp $".
// End of "$Id: fluid.cxx,v 1.15.2.13.2.7 2001/09/29 22:59:45 easysw Exp $".
//

0 comments on commit 72b56ed

Please sign in to comment.