Commit Graph

338 Commits

Author SHA1 Message Date
Michael R Sweet ae55d848e9 More HIG stuff - file menu now shows recent files in-line, above the "Quit"
item.

Removed debug stuff from template panel.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4184 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-24 16:31:59 +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 9e84259e6c Add auto-indent to code editor.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4171 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-24 04:07:19 +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 f0c00448b0 Add "Use" button to printer properties (uses settings for that job only)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4162 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-21 19:59:45 +00:00
Michael R Sweet 4afcc1762c Fix order of output mode buttons...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4161 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-21 19:57:50 +00:00
Michael R Sweet 7d6b887401 If window has not been shown yet, set the image to the scheme_bg_ image so
that prints and template screenshots show the correct background.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4159 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-21 19:41:23 +00:00
Michael R Sweet 55002148cd More printing tweaks (nicer looking simulated windows...)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4158 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-21 19:35:43 +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
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 8a5eef2917 Fix minor printing glitch with simulated window borders.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4151 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-21 05:02:05 +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
Matthias Melcher a4786598bb 'Show/Hide Widget Bin menu item is 39, not 38
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4145 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-20 14:02:21 +00:00
Michael R Sweet 0bbcbe666d Do'h! Forgot to add these files...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4144 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-20 13:38:04 +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 665a2c1b7d Add "Edit/Delete".
Clean up menus.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4141 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-20 01:49:46 +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 2cef7d91d3 Hide/Show Widget Bin and Overlays, instead of checks.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4139 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-20 00:12:21 +00:00
Michael R Sweet 46476b4e37 Fix order of Cancel, Save, and Don't Save buttons.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4138 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-19 23:49:46 +00:00
Matthias Melcher 009283b48c file fluid.cxx must include <io.h> on Windows to find the access() function.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4132 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-19 14:54:54 +00:00
Michael R Sweet b0f0910f79 Widget panel has "Close" instead of "OK" button.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4131 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-19 08:41:51 +00:00
Michael R Sweet 81bd60b47d More UI cleanup.
fluid/*.fl:
    - Go through all of the UIs and make sure they conform to the
      UI guidelines.

fluid/fluid.cxx:
    - Change fl_ask() and fl_choice() to use the "Save"/"Don't
      Save" and similar button labels instead of "Yes" and "No",
      per UI guidelines.

fluid/factory.cxx:
fluid/Fl_Type.h:
    - Make sure that widget and type names are capitalized.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4130 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-19 08:38:21 +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 a218f44b5d Bug fixes and UI tweaking...
src/Fl_Menu_.cxx:
    - Fl_Menu_::find_item(): wasn't checking for a non-NULL label()...

fluid/alignment_panel.*:
fluid/widget_panel.*:
    - Use small controls, normalize layout.
    - Add FLTK header/footer comments.

fluid/Fluid_Image.cxx:
    - Use relative paths for images.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4127 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-18 06:29:11 +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
Michael R Sweet 8fcd08ffaa Tweak 1.1.x FLUID some more...
fluid/about_panel.*:
    - Finish cleanup of about dialog.

fluid/comments.h:
    - Change default FLTK header comment to refer to the STR
      page instead of fltk-bugs (will update the CMP
      accordingly)

fluid/fluid.cxx:
    - Update all menu items that open a window to have "..."
    - Change overlays/widget bin on/off to "Toggle foo"
    - Add a divider after toggle items.

fluid/makedepend:
    - Update FLUID dependencies so that changes to comments.h
      will cause an rebuild of the affected files.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4125 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-17 07:11:57 +00:00
Michael R Sweet fb820bcf23 Add icon images (still need to update OSX icon file...)
Update FLUID about window to use new icon and clean up layout.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4103 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-10 12:23:43 +00:00
Michael R Sweet 7cad39d3ef Start working on a new FLUID icon for desktop integration...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4098 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-10 04:15:17 +00:00
Michael R Sweet 3bf9a5cb2f Ahem, Fl_File_Chooser.H, not fl_file_chooser.H... :)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4097 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-10 03:14:20 +00:00
Matthias Melcher 327f5f14a5 Removed warning about for(;;) variable lookup
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4094 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-09 21:35:09 +00:00
Matthias Melcher fc1a4cf809 Added a new Type to fluid called 'Comment' to be used for standardized Copyright notices and other comments throughout the source code.
- simply add the 'Comment' type from the 'New' menu or the Widget Bin
- comments in the very first position will be added at the very beginning of the source file or header. Comments at the end are at the very end in source and headers as well.
- if the users enters simple text, FLUID will add '// ' in front of every line. If a line already starts with '//' or a block starts with '/*', the text will be copied verbatim.
- text can be loaded from files
- text can be stored in a database and quickly retrieved later via a pulldown menu. The pulldown menu is customizable.

Enjoy!

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4092 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-09 21:26:53 +00:00
Michael R Sweet 29e022cc46 Use grid size for window resizing.
Save work on project settings dialog.

Ideal spacing for group-derived widgets is 10 pixels, except for
tabs which has a Y spacing of 25 (for the normal label size)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4090 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-08 13:46:31 +00:00
Michael R Sweet 8769b2f7fa Make guides and snap work from either side of a widget border.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4089 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-08 04:37:39 +00:00
Michael R Sweet 3ecd5ba911 Only horizontally snap align when the current widget is within 50
pixels vertically of the other widgets.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4088 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-08 02:57:19 +00:00
Michael R Sweet 9998dcc396 Clean up more snap glitches...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4087 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-08 02:38:33 +00:00
Michael R Sweet cdcb8a50e2 More guide stuff - most of the widgets that need it should have their
own custom ideal_size() function, and we now snap when showing the
alignment guides.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4086 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-07 23:55:49 +00:00
Michael R Sweet 120dbf2c46 Add ideal_size() and ideal_spacing() methods, which are used for the
guide stuff.  This allows for different sizes and spacing depending on
the widget and size...


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4085 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-07 20:46:21 +00:00
Michael R Sweet f00f9c7422 Update widget panel so that the "GUI" tab is shown first.
Clean up implementation of guide lines and snapping - now does horizontal
*and* vertical snapping/spacing, nicer drawing of width/height lines,
eliminated space width since we're always doing 10 pixels, and delay
drawing of bounding box until the end so that snap adjustments are reflected
in the display.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4084 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-07 16:55:34 +00:00
Michael R Sweet 11d689f5bc Save my changes to the guide lines - basic snapping is implemented with
10 pixel spacing and recommended width/height.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4073 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-06 05:19:26 +00:00
Michael R Sweet ec7b060957 Fix Fl_Input_Choice in FLUID, and make sure that we expose enough of the
text and box stuff for use in FLUID.

Update dependencies.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4072 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-06 00:32:11 +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
Matthias Melcher 5b49a9ae51 Added visual gudelines for widget distances and sizes to fluid. It is disabled by default, but can be enabled in the "Grid" dialog box. I am not sure if this is actually a good change, but thanks to SVN I'll risk a commit to get some feedback fro the early adopters.
Fluid now indicates a "good" (according to some Apple guidelines, but that's not permanent y any means) distance of widgets to the window border, indicates vertical and horizontal alignment with other widgets, shows "good" sizes for buttons, and indicates a good distance between two buttons at the same y-position.

Achtung, Baby: I wrote this on a WIndows machine, hoping that SVN will replce CR/LF with LF's, as promised by the documentation. Unix users: please check and blame me!

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4057 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-26 20:27:19 +00:00
Michael R Sweet add37faa25 Copyright updates.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4052 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-24 21:55:12 +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
Matthias Melcher 53e7546c23 Fixed a few warnings in OS X. The fluid stuff was 'touche'd, but not changed.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4036 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-06 16:28:36 +00:00