Commit Graph

645 Commits

Author SHA1 Message Date
Michael R Sweet
b41cf28662 Update "clean" targets to properly handle core files, remove backup files,
etc.

Add "install" target to test directory which installs the example programs.

Install the config.h file in the examples directory.

Make sure the example programs compile outside the FLTK source dir.

Add example programs to fltk.list.in.

Fix missing redraw() in x_cb() in FLUID...


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4287 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-04-16 00:01:49 +00:00
Michael R Sweet
7102b0a38a Fixed the drawing of the Fl_Browser_ selection box (STR #786)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4268 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-04-10 22:44:48 +00:00
Michael R Sweet
39505e6df8 Remove CodeWarrier files.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4263 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-04-10 22:17:51 +00:00
Michael R Sweet
558958ad23 The FLTK string functions are now compiled in on all systems (STR
#774)

src/vsnprintf.c:
    - Replaced fl_vsnprintf() implementation with one that
      properly emulates the vsnprintf() function.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4262 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-04-10 22:14:08 +00:00
Michael R Sweet
5b20fbdce4 Fixed symbol demo label bug (STR #777)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4260 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-04-10 21:53:03 +00:00
Michael R Sweet
ba3bde19c5 Fixed position of menu titles (STR #794)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4259 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-04-10 18:49:43 +00:00
Michael R Sweet
25447eeb04 Added missing Fl_Window::copy_label() method.
Cleaned up screen_xywh() conditional stuff.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4251 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-04-09 13:51:32 +00:00
Matthias Melcher
f12052870c STR #784: Fixed tooltip stating 'function' instead of 'comment'
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4233 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-04-02 18:57:49 +00:00
Matthias Melcher
aed7263678 STR #783: added zlib to fluid path
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4232 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-04-02 18:37:42 +00:00
Michael R Sweet
e50e551f7c Fl_Chart would draw outside its bounding box (STR #780)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4228 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-31 20:59:10 +00:00
Michael R Sweet
cc593f6b64 Add Fl::screen_count() and Fl::screen_xywh() APIs to support multi-
screen displays (currently only X11 support with Xinerama)



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4223 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-31 16:01:24 +00:00
Michael R Sweet
c94a59c3f7 Add support to FLUID for widget class creation without the intermediate
class stuff.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4197 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-28 05:04:13 +00:00
Michael R Sweet
f5ed012b28 Updated Fl_File_Chooser to correctly deselect other items when
the user picks a file or directory in multiple selection mode
(only files or directories, not both at once...)

Use the fl_file_chooser_ok_label() function in FLUID.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4191 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-25 18:58:18 +00:00
Michael R Sweet
2ccbfdccc9 Fl_File_Chooser no longer resets the type() when choosing a
single file, and it now works when selecting multiple directories
(STR #747)

Fl_File_Icon::load_system_icons() now only loads 16x16 and 32x32
icon images to improve startup performance.

Fixed an error dialog message in FLUID.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4189 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-25 17:27:07 +00:00
Michael R Sweet
a343b0d4e4 Pressing Enter in the file chooser when selecting a directory
will choose that directory if it is currently shown (STR #746)

Added a fl_file_chooser_ok_label() function to set the "OK"
button label for the fl_file_chooser() and fl_dir_chooser()
functions.

Added Fl_File_Chooser::ok_label() methods to set the "OK" button
label.

The fl_ask() function is now deprecated since it does not conform
to the FLTK Human Interface Guidelines.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4188 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-25 16:11:07 +00:00
Michael R Sweet
ce40d4a0e6 The Fl_File_Chooser window now properly resizes its controls (STR
#766)

The Fl_Help_Dialog window now properly resizes its controls (STR
#768)

The Fl_File_Chooser favorites window is now resizable (STR #770)

Added more documentation on the file chooser filter pattern format
(in both functions.html and Fl_File_Chooser.html)

Added Fl_File_Chooser::save_label (for favorites dialog) and
Fl_File_Chooser::ok_label() to change the default "OK" button
label to something more appropriate according to the HIG.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4187 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-25 15:20:26 +00:00
Michael R Sweet
ead8aa8fcb Now provide FL_PLASTIC_ROUND_UP/DOWN_BOX box types which are used
by the plastic scheme.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4183 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-24 15:56:37 +00:00
Michael R Sweet
2bf787ce69 Resizing or moving a window through the widget panel now resets the
window size_range() so that the window can still be resized through the
window manager controls...



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4180 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-24 13:14:43 +00:00
Michael R Sweet
e01bdbfbf2 Update tile image to 64x64 (STR #769)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4164 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-23 03:48:42 +00:00
Michael R Sweet
325dc85b2c Fix syntax highlighting bug in the editor demo, and port changes to the
CodeEditor widget in FLUID.

Use the CodeEditor widget for the other code windows.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4163 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-23 03:13:31 +00:00
Michael R Sweet
e2a04270b9 Fl_Progress didn't use a contrasting label color over the progress bar,
so dark bars would make it difficult to read the label.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4160 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-21 19:52:53 +00:00
Michael R Sweet
880928146d Image reading, template handling, and printing bug fixes.
CHANGES:
    - Add fl_read_image() note and move documentation STRs back
      to the top of the list...

fluid/fluid.cxx:
    - Use printer choice data instead of the label text, since
      we have to escape / in printer names.
    - Change page number in header to n/N.

fluid/print_panel.*:
    - Don't disable properties button, ever.
    - Quote / in printer names.
    - Put copy of real printer name in the user data.
    - Use user data instead of label text for printer name.

fluid/template_panel.*:
    - Only free the files array if num_files > 0.

src/fl_read_image.cxx:
    - Use fl_visual->visual->*_mask instead of fl_*mask and
      fl_*shift when the XGetImage() data does not have them
      set.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4157 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-21 17:34:03 +00:00
Matthias Melcher
562198fa31 Polygon drawing fixed #765, fl_message wrapped in Fl_Group::current(0), so it doesn't end up inside some current group #253. Undefined 'check' in Fl_Menu_Item_, so it will compile as an Apple XCode project (to be delivered later)..
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4154 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-21 11:38:52 +00:00
Michael R Sweet
e852b736ad Initial integration with editor-based CodeEditor class (only the widget
callback editor right now)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4152 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-21 06:28:30 +00:00
Michael R Sweet
bcadb07bb2 Printing support for FLUID...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4150 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-21 04:51:16 +00:00
Michael R Sweet
e12e37c5f9 Add Fl_Spinner widget (another combo of existing widgets in a header file)
Set the window callback to do the same as the cancel button in the template
panel.

Clean up widget bin + tooltips (didn't have correct tooltips for new widgets)



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4149 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-20 23:38:14 +00:00
Michael R Sweet
0919d57c33 Template panel for "new" and "save template" actions, complete with
preview images that are generated when you save the template.

Use @INSTANCE@ anywhere you want to substitute an instance name.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4148 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-20 21:27:20 +00:00
Michael R Sweet
0bc98fd29e Preliminary template save support in FLUID, plus some bug fixes.
fluid/Fl_Type.h:
    - Added read_image() declaration to Fl_Window_Type class.

fluid/Fl_Window_Type.cxx:
    - Added Overlay_Window::read_image() and
      Fl_Window_Type::read_image() functions.
    - Fl_Window_Type::fix_overlay(): update menu indices.
    - toggle_overlays(): update menu indices.

fluid/fluid.cxx:
    - save_template_cb(): Added to save to
      ~/.fltk/fltk.org/fluid/templates, along with PNG screenshot
      of first window.
    - "Save To" instead of "Save to".
    - Use fl_alert() for errors, not fl_message().
    - Add "File/Save Template..." and "File/Print..." (not yet
      implemented) menu items.
    - toggle_widgetbin_cb(): update menu indices.

fluid/undo.cxx:
    - Update menu item indices.
    - Don't need extra slash in undo checkpoint filename.

src/Fl_PNG_Image.cxx:
    - Fix typo in #endif comment.

src/Fl_Window.cxx:
    - Fl_Window::draw(): save/restore flags() when changing label.
    - Fl_Window::iconlabel(): save/restore flags() when changing label.

src/fl_rect.cxx:
    - fl_not_clipped(): don't use current window for gross clipping.





git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4147 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-20 17:41:56 +00:00
Michael R Sweet
4e965380bc Use uppercase letters for shortcut labels (e.g. "Ctrl+N", not
"Ctrl+n") to be consistent with other toolkits.

Remove debug printf from undo_checkpoint().

Change "Show Widget Panel" to "Show Properties" since it displays any
Fl_Type dialog, not just the widget panel.

Add "properties" to all of the type dialogs (UI consistency)

Remove extra elipsis (...) from code items in the new menu.

Revert Grid shortcut to Ctrl+G, since Alt+G is used to run a shell
command again.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4146 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-20 14:35:18 +00:00
Michael R Sweet
eee3897e19 Changelog update.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4143 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-20 04:25:13 +00:00
Michael R Sweet
a2f4b27b27 Undo/redo support for FLUID.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4142 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-20 04:00:48 +00:00
Michael R Sweet
921dabf5b8 Add "scheme" chooser in GUI settings dialog.
Set window image to scheme_bg image when the window is shown.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4140 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-20 00:51:02 +00:00
Michael R Sweet
59004878f3 Many FLUID updates...
fluid/align_widget.cxx:
    - Add widget_size_cb() to set default size and size of
      labels and text for selected widgets.

fluid/factory.cxx:
    - More normalization of menus - "..." when opening a window,
      Capitalized Words.
    - cb(): Assign default label/text size and resize to ideal
      size.
    - Make sure that all buttons, input, and valuator widgets
      have default label strings.
    - Fl_*_Button::ideal_size(): fix ideal width calcs to match
      widget.

fluid/Fl_Menu_Type.cxx:
    - Fl_Menu_Item_Type::make(): set default label size.

fluid/Fl_Type.h:
    - Add Fl_Widget_Type::default_size global.
    - Fl_Menu_Item_Type::type_name(): return "Menu_Item".
    - Fl_Submenu_Type::type_name(): return "Submenu".
    - Update ideal_size() methods to use a default height that
      is evenly divisible by 5.
    - Fl_Choice_Type::ideal_size() and
      Fl_Menubutton_Type::ideal_size(): fix ideal width calcs to
      match widget.
    - Fl_Menu_Bar::ideal_size(): add, returning the window
      width.

fluid/fluid.cxx:
    - Add "Layout/Widget Size" submenu.
    - "File/Write code..." becomes "File/Write Code..." and
      "File/Write strings..." becomes "File/Write Strings..."

fluid/fluid.plist:
    - Bump version number and copyright info.

fluid/Fl_Widget_Type.cxx:
    - Fl_Widget_Type::ideal_size(): add box dw/dh and enforce a
      minimum size of 15x15.
    - labelsize_cb(): use Fl_Widget_Type::default_size instead
      of FL_NORMAL_SIZE.
    - textsize_cb(): use Fl_Widget_Type::default_size instead of
      FL_NORMAL_SIZE.

fluid/Fl_Window_Type.cxx:
    - Fl_Window_Type::newdx(): require at least 2 pixels of
      movement.
    - Fl_Window_Type::draw_overlay(): adjust bounding box for
      outside labels above and below.
    - Fl_Window_Type::handle(): reset dx/dy on FL_PUSH.

fluid/function_panel.cxx:
fluid/function_panel.fl:
fluid/function_panel.h:
    - Update some of the windows for the "small" size.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4129 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-19 04:09:32 +00:00
Michael R Sweet
1e742cc41f Use check items for overlays and the widget bin, and track their state.
Add Edit/Duplicate to duplicate the current selection; this functions
independently of the cut/copy/paste buffer.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4126 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-17 21:57:17 +00:00
Matthias Melcher
93a2170661 fixed frame drawing of Fl_Text_Display (STR #762.2). Thanks for the patch proposal to Alessandro Portale.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4123 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-15 22:50:53 +00:00
Michael R Sweet
23f90b2301 STR 748: Fl_Clock_Output::value(ulong) does not change value_
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4109 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-12 23:18:48 +00:00
Matthias Melcher
00651bc412 Updated CHANGES file. Removed CRLF from xpm Pixmaps
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4093 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-09 21:31:13 +00:00
Matthias Melcher
2bbee87dc3 'Anonymous' reported a problem when using Fl_Value_Input. It seemed,
that contrary to the man pages, a fractional 'step' value above 1
would not create a floating point input.

In fact it does, but the output was formatted wrong so that the 
digits after the decimal point were never rendered.

I changed the Fl_Valuator::format(double v) function how I beleive
it should format the output correctly, but as already stated by
the original author in the source code, this is a hack that should
be fixed by providing a 'precission' setting for valuators.

Anyway. My fix makes sure that all digits right of the decimal 
point are always rendered, so that the step value will show full
precision. This gives a much better behavior in respect to steps values
like 2.5, 3.75, etc., but also leads to 8 digits after the decimal point
for step(1.0/3.0)... .

I suggest that we keep this change (hence the commit), risking that 
rendering of valuator text will change in a few cases (odd step() values).



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4091 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-08 22:55:10 +00:00
Michael R Sweet
9b5555d142 fl_filename_relative() didn't compare drive letters in a
case-insensitive way (STR #741)

src/filename_absolute.cxx:
    - fl_filename_relative(): use tolower() when comparing drive
      letters.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4071 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-05 23:09:36 +00:00
Michael R Sweet
a48c6dd545 Fixed menu item width calculations with symbols (STR #740)
src/Fl_Menu.cxx:
    - Fl_Menu_Item::measure() - initialize w and h to label font
      size so that the symbol size is calculated properly.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4066 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-05 19:53:43 +00:00
Michael R Sweet
2c989c8e4c More browser documentation changes.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4065 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-05 19:31:42 +00:00
Michael R Sweet
b066dea55d The keyboard shortcut handling code did not handle 8-bit
characters properly (STR #731)

src/Fl.cxx:
    - Fl::handle(): use unsigned char * for event_text()
      shortcut key conversion.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4064 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-05 19:23:19 +00:00
Michael R Sweet
c3a5b61223 Doco fixes (show const modifier on methods)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4063 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-05 19:18:07 +00:00
Michael R Sweet
52e086f75b Fl_JPEG_Image could still crash an app with a corrupt JPEG file
(STR #739)

src/Fl_JPEG_Image.cxx:
    - Use setjmp/longjmp to catch JPEG file errors and prevent the
      JPEG library from crashing the FLTK app.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4061 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-05 15:25:30 +00:00
Michael R Sweet
62721060db Using the layout alignment controls on a menu widget would cause
FLUID to crash (STR #742)

The Fl_Input_Choice documentation was not installed (STR #745)

documentation/Makefile:
    - Add Fl_Input_Choice.html to list of doco files.

fluid/align_widget.cxx:
    - Only do a full resize if the widget is not a menu button.
    - Also set modflag when making changes.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4060 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-05 15:09:59 +00:00
Michael R Sweet
9cca0a6c9a Added QNX bug workaround for menu handling (STR #704)
src/Fl_Menu.cxx:
    - menuwindow::handle(): #ifdef QNX check for done menu


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4051 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-24 21:51:38 +00:00
Michael R Sweet
2df3459457 Added Greg Ercolano's simple Fl_Input_Choice widget which is a
combination of the Fl_Input and Fl_Menu_Button widgets (STR
#650)

FL/Fl_Input_Choice.H:


documentation/Fl_Input_Choice.html:
    - Added.

documentation/fltk.book:
    - Added Fl_Input_Choice.html + --no-embedfonts option.

documentation/index.html:
    - Update version number and revision.

documentation/input_choice.jpg:
    - Added.

documentation/preface.html:
    - Update version number and revision.

documentation/widgets.html:
    - Add Fl_Input_Choice to lists.

fluid/Fl_Menu_Type.cxx:
    - Add Fl_Input_Choice_Type class and instance.

fluid/Fl_Type.h:
    - Add Fl_Input_Choice_Type class and instance.

fluid/factory.cxx:
    - Add Fl_Input_Choice menu item.

test/Makefile:
    - Add input_choice example.

test/input_choice.cxx:
    - Added.

test/demo.menu:
    - Add input_choice example.




git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4050 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-24 21:14:22 +00:00
Michael R Sweet
97b9464f59 Fl_Multiline_Input now scrolls the full height of the widget
instead of 5 lines when the user presses PageUp or PageDown (STR
#727)

src/Fl_Input.cxx:
    - Set repeat_num to h()/textsize() instead of 5.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4049 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-24 20:35:07 +00:00
Michael R Sweet
3ee9c50180 CMake build fixes (STR #724)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4047 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-24 20:26:22 +00:00
Michael R Sweet
36402b7fe5 Fl_Browser::swap() didn't handle redraws properly when the
swapped lines had different heights (STR #729)

src/Fl_Browser.cxx:
    - Fl_Browser::swap(): call redraw_lines() instead of
      redrawing individual lines.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4046 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-24 20:17:08 +00:00