Commit Graph

3139 Commits

Author SHA1 Message Date
Fabien Costantini
9011c77c0e Added range test in new fl_ascii_strcasecmp to avoid potential false positives.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9390 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-24 01:12:54 +00:00
Matthias Melcher
e2d3d400cd Reverted flags in Fl_Widget to protected.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9388 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-23 20:12:06 +00:00
Greg Ercolano
d07ef80207 Various Fl_Tree enhancements:
o Added keyboard navigation table
    o Added Shift-Click to extend selection, Ctrl-Space to toggle selection, Enter key toggle
    o Added protected extend_selection(from_item,to_item)
    o Cleanup of Fl_Tree::handle()
    o Limit ^A to multi-select mode only
    o Disable focus box in SELECT_NONE mode
    o test/tree: changed default mode to 'multiselect' (most often needs testing)



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9385 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-23 16:31:51 +00:00
Greg Ercolano
42416fa912 Fixed problem with linespacing(): should not affect widget() size
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9381 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-22 17:42:18 +00:00
Greg Ercolano
2ae607e8ba o doc fixes
o new calc_item_height() -> const
o Added a needed ABI ifdef



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9380 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-22 14:21:08 +00:00
Greg Ercolano
f58cd169c0 Various mods for Fl_Tree
o Fix STR#2828 (E): {Vertical|Widget} Gap
    o Moved Fabien's reselected methods to Fl_Tree_Prefs,
      return method made const, doxygen, removed underbars from methods
      (to follow general API)
    o Widgets can now appear to the right of labels.
      This can be controlled with item_draw_mode(FL_TREE_ITEM_DRAW_LABEL_AND_WIDGET)
    o Cleaned up Fl_Tree_Item::draw(), Fl_Tree::draw()
    o New methods:
            marginbottom()       -- [ABI feature] extra space below last tree element when scrolling
            widgetmarginleft()   -- [ABI feature] space to left of widget
            usericonmarginleft() -- space to left of usericon
            labelmarginleft()    -- space to left of label
            item_draw_mode()     -- control how items, widget() are drawn
    o Updated Fl_Tree docs, tree-elements.png
    o test/tree: added sliders to test the above new features,
      added "open all" and "close all" buttons
    o Probably other stuff..


TODO: Fix "scroll-beyond-bottom" (STR#2796)
TODO: Fix other items in STR#2828



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9377 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-22 13:40:02 +00:00
Fabien Costantini
dc6e8a5f8a fixed missing win32 preprocessor clause
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9375 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-22 03:09:31 +00:00
Fabien Costantini
a5196976cc restore transparent_c use for win32...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9374 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-22 02:59:27 +00:00
Fabien Costantini
822bc272fc Fixed linux 64 gcc 4.6.1 compilation problems
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9373 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-22 02:45:09 +00:00
Fabien Costantini
1b01c3a94c STR 2771 fix cont'd used the new api in scheme(const char*)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9369 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-21 17:40:07 +00:00
Fabien Costantini
56a184d529 STR 2771 fix: introduce a new ascii strcasecmp that does not rely on locale sensitive toupper tolower.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9368 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-21 17:21:11 +00:00
Fabien Costantini
157a96aa4b STR2783: make potential null string substituted to an empty string, still achieve internal cleanup in Fl_Text_Buffer::text(s)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9366 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-21 15:05:00 +00:00
Matthias Melcher
eb9b58c7cc Fl::arg now removes a command line argument that is added by Xcode. This will help "Demo" to run again
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9365 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-21 11:13:10 +00:00
Fabien Costantini
226f425443 STR2731 fixing: potential use of unassigned (Y) value
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9362 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-21 03:02:25 +00:00
Greg Ercolano
526efe8a13 > Added ^A to 'select all' when tree has focus
> A user click on the tree's background does a 'deselect all'



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9359 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-19 08:58:22 +00:00
Greg Ercolano
055a7d47ed STR# 2827 cont'd:
> Prevent 'changed' flag from being set during reselect
> test/tree.fl: added chooser so user can test with item reselect enabled|disabled
  (Chooser deactivated if the ABI option is not enabled)



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9358 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-19 08:50:04 +00:00
Greg Ercolano
c7044ca009 Optimizations for when Fl_Tree is a container of FLTK widgets.
o Don't draw FLTK widgets outside tree's viewport.
   o Added tree-as-container.cxx example program, demos tree 
     w/50k tree items each with 6 widgets (300k total)



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9356 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-18 15:20:20 +00:00
Greg Ercolano
d741da4317 indent fixes
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9355 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-18 08:23:35 +00:00
Fabien Costantini
b31264e473 STR 2827 implementation. Implemented Reselect code and related API all within ABI controlled preprocessor blocks because of new attribute defintion would break ABI anyway. Because the code is already ABI controlled, I took the opportunity to keep keep the REASON enum sorted. Added test code in Tree.fl adequately.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9347 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-15 20:11:36 +00:00
Greg Ercolano
3cf006f5c3 Solves STR #2681.
Added ABI-breaking Fl_Table::scrollbar_size() with new ABI #ifdefs.
tests/unittests program modified to test this feature if enabled.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9345 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-14 20:35:56 +00:00
Greg Ercolano
418dd143f0 ABI modifications to Fl_Tree: deprecate mouse selection hotfix with proper solution.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9340 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-13 02:51:15 +00:00
Greg Ercolano
6444e23359 fixes to build on IRIX.
(scoping rules for variables declared within for() loops)



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9337 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-10 19:16:44 +00:00
Albrecht Schlosser
dfe7fafd92 Fix compiler warning "variable set but not used".
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9334 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-09 12:36:23 +00:00
Manolo Gouy
60d448d150 Removed Fl_Widget::is_fullscreen() that is just another name for Fl_Window::fullscreen_active()
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9331 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-09 09:12:34 +00:00
Albrecht Schlosser
8ed93f0065 fix a typo and indenting.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9326 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-05 14:30:19 +00:00
Fabien Costantini
8809c5d65d Fixed build error in msvs because Fl ref to FULLSCREEN enum was not accessible in Fl_Widget. new inline is_fullscreen() getter has been implemented to avoid a build error with (at least) msvc compilers. Fixed a ton of warnings / problems when bilding on windows 64 bits target with ms toolchain. cleaned up about 200 warnings raised when building win74 targets.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9325 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-05 05:12:30 +00:00
Manolo Gouy
37ea8ba9e6 Mac OS: canBecomeKeyWindow returns NO also for menu windows
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9324 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-04 19:53:11 +00:00
Manolo Gouy
cb32ceaf4d Fix STR#2818: (Mac OS) tooltip window takes focus away from input field.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9321 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-04-04 16:33:09 +00:00
Ian MacArthur
1e5c19b087 Maybe fix for the Fl_Pixmap issue building 9310 on mingw/WinXP.
PLEASE check this is OK, I don't have access to test systems here...



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9311 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-29 13:45:11 +00:00
Manolo Gouy
ae4d6338b8 WIN32: Fl_Pixmap printing uses a global variable called win_pixmap_bg_color equal to the color
used for the pixmap background, and treats this color as transparent. FLTK assigns to this variable
a color unused by the processed pixmap. In theory this variable should be specific to each processed
pixmap. In practice, it's very unlikely that several values are needed. A new member variable is
added to the Fl_Pixmap object to hold this value. This member is made static if FLTK_ABI_VERSION
< 10302 for ABI compatibility. The correct thing, though, is for a non-static member.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9308 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-28 13:19:33 +00:00
Manolo Gouy
0b6f546b0f Added support for the additional key of ISO keyboards (aka 102-key keyboards) named FL_Iso_Key.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9303 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-26 16:54:54 +00:00
Manolo Gouy
08ce2e07d3 Fix STR#2641: true fullscreen windows that cover all their screen including menu bar, task bar, dock.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9299 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-23 16:47:53 +00:00
Manolo Gouy
8cd98f5236 Mac OS: Allow keyboard input with borderless windows
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9294 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-22 13:58:38 +00:00
Manolo Gouy
32d4bc4099 Fix STR#2810: removed all uses of function Fl_Device::class_name().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9293 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-18 18:48:29 +00:00
Manolo Gouy
53ccc78759 Removed duplicated code when printing pixmap on WIN32.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9291 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-17 17:35:02 +00:00
Manolo Gouy
c41d3ac3f3 Fixed error in printed color of Fl_Bitmap
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9284 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-14 15:59:02 +00:00
Manolo Gouy
da96b83903 Moved a few local variable declarations.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9283 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-14 09:51:22 +00:00
Manolo Gouy
7d0b5d05cb Simplified Fl_Paged_Device::print_window() under Mac OS
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9282 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-14 08:49:36 +00:00
Manolo Gouy
f6cb583e27 Replaced fl_copy_offscreen_with_alpha() by Fl_GDI_Graphics_Driver::copy_offscreen_with_alpha() and
fl_create_offscreen_with_alpha() by Fl_Quartz_Graphics_Driver::create_offscreen_with_alpha()

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9278 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-12 11:55:50 +00:00
Manolo Gouy
4715e1593e Use a new Fl_Quartz_Graphics_Driver or Fl_GDI_Graphics_Driver instance when printing.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9276 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-12 09:39:17 +00:00
Manolo Gouy
c9303f2c83 Added needed initialization in Fl_Graphics_Driver constructor.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9274 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-11 18:58:55 +00:00
Manolo Gouy
de254a0070 Fixed error in vktab[] table.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9273 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-10 15:52:44 +00:00
Manolo Gouy
719f72b501 Mac OS: renamed compute_macKeyLookUp() to fl_compute_macKeyLookUp().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9271 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-10 08:45:44 +00:00
Manolo Gouy
739a6f89ae Mac OS: the macKeyLookUp table is now computed at program start from the vktab table
by compute_macKeyLookUp() in file src/Fl_get_key_mac.cx

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9270 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-09 21:35:45 +00:00
Manolo Gouy
c36a9992e3 Fix STR #2260: OpenGL windows in Fl_Tabs don't hide when tabs are switched (Mac only)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9264 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-05 08:46:30 +00:00
Manolo Gouy
7c4e992977 Minor comment rewording
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9261 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-02 16:23:28 +00:00
Greg Ercolano
4ce583c0f8 Docs + cosmetics only.
> Added docs to utf8_input_filter() function
    > Documented its variables
    > Added comments to its code so it can be better understood in the future.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9260 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-01 14:22:15 +00:00
Greg Ercolano
4e934c01be Fix STR#2808: corruption bug with Fl_Text_Buffer::insertfile().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9259 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-01 13:25:15 +00:00
Manolo Gouy
17d221bd34 Improved doc of Fl_PostScript_File_Device::start_job().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9257 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-03-01 08:48:36 +00:00
Greg Ercolano
e920c28d0b Fix STR#2807: when(FL_WHEN_NEVER) was not working.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9249 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-02-21 00:34:27 +00:00
Manolo Gouy
435e7f5e23 Various fixes required by device virtualization in fl_vertex.cxx
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9239 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-02-17 09:47:04 +00:00
Manolo Gouy
477febec7b Added missing initialization/deallocation of member variables of class Fl_Graphics_Driver
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9235 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-02-16 13:09:34 +00:00
Greg Ercolano
78e2cdf50b fl_measure() doc clarifications for common use errors.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9233 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-02-04 17:24:47 +00:00
Greg Ercolano
9a4ef219de Fl_Tree optimizations for selecting large trees (100k items).
Added _next_sibling and _prev_sibling to Fl_Tree_Item class to make 
next_sibling() and prev_sibling() more efficient during item selection.
Used new FLTK_ABI_VERSION macro (as designed by Greg and Albrecht on fltk.dev) to protect the ABI breaking features.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9231 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-01-19 12:44:26 +00:00
Albrecht Schlosser
92d846caa4 Fixed Fl_Preferences documentation typos.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9228 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-01-18 11:39:57 +00:00
Manolo Gouy
c7b0467518 Remove compilation error under Mac OS 10.3
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9227 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-01-13 19:04:10 +00:00
Manolo Gouy
b8d34a254f Fixed the use of FL_SUBMENU_POINTER in Fl_Sys_Menu_Bar objects (cont'd).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9223 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-01-12 16:00:07 +00:00
Manolo Gouy
2d4cf9e26b Some code simplifications.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9220 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-01-12 12:49:58 +00:00
Manolo Gouy
4be97ea19c Fixed the use of FL_SUBMENU_POINTER in Fl_Sys_Menu_Bar objects (Mac OS-specific).
Modified the menubar demo program to exercise the Fl_Sys_Menu_Bar class.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9218 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-01-11 16:16:31 +00:00
Greg Ercolano
aa0e4bb823 Small fix for vertical connectors between far away items, as noted by Christophe.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9217 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-12-25 17:51:50 +00:00
Greg Ercolano
fc135a498b Optimizations for very large Fl_Tree's
(Adding 60k items took forever, and drawing them
 caused wraparound drawing issues and scrolling slowness)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9216 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-12-25 01:10:45 +00:00
Greg Ercolano
a0be94eebe Fix comment typo
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9215 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-12-25 00:36:11 +00:00
Albrecht Schlosser
7788e3d699 Fixed fl_round_box regression causing drawing artifacts (STR #2709).
Regression was from svn r8630 (STR #2615), adding fl_line_style() settings
that turned out to cause side effects on fl_round_box drawing and others.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9211 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-12-21 12:01:50 +00:00
Ian MacArthur
c4e1e39f6b Per STR 2687, remove the old fltk-local scandir implementation which might
have been re-using "borrowed" code with inappropriate licensing.

NOTE: It is not expected that this makes any real difference, it
is assumed that all modern hosts actually provice their own
scandir implementation and that the code (now excised) was orpahned
a long, long time ago...



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9210 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-12-21 10:42:14 +00:00
Ian MacArthur
367f563334 Fix typo in includes
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9201 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-12-08 09:58:51 +00:00
Manolo Gouy
900fe72b8a Fixed the Doxygen comments of the Fl_Overlay_Window class.
The description of Fl_Overlay_Window ::draw_overlay() didn't appear in Doxygen,
and Fl_Overlay_Window::can_do_overlay() wasn't commented.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9198 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-12-07 13:40:39 +00:00
Greg Ercolano
272475dde4 Fixing STR #2786; clipping problem with child FLTK widgets.
Replication: Run 'tree' demo, open '500 items' subtree, change 'connector width' to 100..
the "D2" and "ccc" buttons would overdraw the scrollbar. (Not the regular tree items)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9197 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-12-06 21:08:07 +00:00
Albrecht Schlosser
d250e21542 Fixed Fl_Input_::maximum_size() documentation and Fl_Input::replace()
to honor maximum_size() as number of allowed characters (STR #2747).
This was a hangover from FLTK 1.1, where the number of bytes was equal
to the number of characters.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9196 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-12-06 16:55:51 +00:00
Manolo Gouy
67fdcb8fa3 Fix STR #2779: clang-detected error
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9192 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-11-29 14:41:33 +00:00
Manolo Gouy
eab4e1f2d5 Needed after r.9181 for the Gmsh program according to its author Christophe Geuzaine
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9191 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-11-29 11:50:18 +00:00
Albrecht Schlosser
05f669c9ce Fixed a potential crash if Fl_Double_Window::flush() was called before show().
Thanks to Mathieu Peyrega for the patch in fltk.general [1] on Nov 14, 2011,
although I implemented it differently.
[1] http://www.fltk.org/newsgroups.php?gfltk.general+v:33946


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9188 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-11-28 12:32:56 +00:00
Manolo Gouy
a1a9dbd961 Improved the windowShouldClose message processing.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9185 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-11-23 09:19:39 +00:00
Manolo Gouy
c78bc79001 Fix STR #2770: menubar menus have problems near screen edges.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9183 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-11-22 16:58:19 +00:00
Manolo Gouy
d92f2d765b Mac OS: fix possible crash when closing window with a callback that deletes it.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9182 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-11-22 14:48:47 +00:00
Manolo Gouy
1962c2b6ed Fix STR #2775. Under Mac OS, fixed some erroneous window move/resize.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9181 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-11-22 12:33:49 +00:00
Manolo Gouy
12a0cb308e Fix STR #2769: Mac OS crash during creation of non-modal window on secondary screen
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9177 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-11-14 17:10:28 +00:00
Manolo Gouy
74720fd205 Mac OS: better window positioning on secondary displays at creation.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9176 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-11-14 15:15:03 +00:00
Greg Ercolano
6b1db04a80 Small fix: typo affected string length calc.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9175 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-11-13 09:13:26 +00:00
Greg Ercolano
7f556fde4a Solve STR #2733: MAX_PATH too small on Win32 (260 chars!)
Removed some hardcoded arrays in favor of dynamic,
and created a new macro with 32768 and used it for remaining pathname arrays.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9174 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-11-13 07:33:50 +00:00
Greg Ercolano
e0e04cc956 Solve STR #2768: WIN32 file filter pulldown menu was not showing wildcard patterns.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9173 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-11-13 07:25:36 +00:00
Greg Ercolano
baca25f902 Fix for problem with posting 'popup menus' during user callback
causing change in row/col selection of Fl_Table_Row.
As reported by David Lopez in fltk.general on 11/09/2011, Subject: Popup menu over Fl_Table.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9172 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-11-13 02:46:10 +00:00
Manolo Gouy
409afd29cc Mac OS: more accurate definition of the Window system-specific type.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9170 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-11-12 13:06:54 +00:00
Manolo Gouy
e37006f259 Fix STR #2759: Fl_Window::hotspot() now positions a new window correctly on a secondary display.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9163 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-31 19:44:55 +00:00
Manolo Gouy
0cf73d4603 Mac OS: simpler processing of window closing events.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9161 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-30 17:23:42 +00:00
Manolo Gouy
c9345e7d01 Added more paper sizes for Fl_PostScript_Printer.
Fixed saving of the paper size preference for the "Print to File" printer.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9158 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-29 14:50:04 +00:00
Manolo Gouy
1e88511efa Fixed use of "landscape" orientation with PostScript printing/output.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9156 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-28 20:55:17 +00:00
Manolo Gouy
8ff32e11d6 Mac OS: fixed the setting of the key window after a window is closed.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9154 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-27 19:41:54 +00:00
Manolo Gouy
353f59a0ce Mac OS: restore the focus to the top FLTK window after closing the window opened by the
"About ..." item of the application menu. This issue appeared with OS X 10.7.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9152 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-26 12:42:41 +00:00
Manolo Gouy
a1d63bc158 Mac OS: removed unused type Fl_XMap and global variable fl_current_xmap.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9151 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-26 11:17:31 +00:00
Albrecht Schlosser
afd64de007 Fixed regression (in FLTK 1.3.0) that could clear a radio button by
using the keyboard (space or shortcut) (STR #2748).
This regression was introduced in svn r7826 and released with FLTK 1.3.0 (!)
to add visual feedback for Fl_Button's using the keyboard (STR #2372).


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9149 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-26 10:29:13 +00:00
Manolo Gouy
8c552b377d Fl_cocoa.mm: removed useless fl_screen global variable.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9147 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-26 09:12:33 +00:00
Manolo Gouy
81fcaed456 Mac OS: the procedure used to restore visible focus to a window after using an Fl_Native_File_Chooser
window failed under OS X 10.7. It's replaced by a simpler, OS version-independent procedure.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9144 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-22 15:12:57 +00:00
Greg Ercolano
babac08474 1) Fix STR#2742.
2) Fix fl_eventnames[] debugging stuff.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9142 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-20 05:02:53 +00:00
Manolo Gouy
31489f1f0d Follow the declared type of the fl_window global variable: Window.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9141 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-19 17:05:03 +00:00
Albrecht Schlosser
c90b78eb56 Typo correction (removed extraneous ";")
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9140 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-19 09:42:46 +00:00
Albrecht Schlosser
b2fb612dde Removed unused variables (gcc 4.6 warning [-Wunused-but-set-variable]).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9138 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-19 09:22:52 +00:00
Albrecht Schlosser
df525e2922 Removed unused variables (gcc 4.6 warning [-Wunused-but-set-variable]).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9137 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-18 22:18:39 +00:00
Manolo Gouy
0ba6c0e381 Simplified window positioning on main screen.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9135 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-18 12:18:22 +00:00
Manolo Gouy
55b744c225 When several screens, allow creation of window on secondary screen by Fl_Window::Fl_Window(x,y,w,h,title).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9134 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-18 11:46:29 +00:00
Manolo Gouy
3c8a18a575 Back to before r.9070 because this change produces badly drawn menu button labels.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9133 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-17 13:46:31 +00:00
Manolo Gouy
9f15516f5e Mac OS: don't generate an FL_SCREEN_CONFIGURATION_CHANGED event at application startup.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9131 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-12 12:38:32 +00:00
Manolo Gouy
23e38f1980 Exploit the HAVE_DLSYM and HAVE_DLFCN_H preprocessor variables defined by configure
to control usage of dlopen/dlsym system calls.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9128 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-04 16:56:09 +00:00
Manolo Gouy
d8a1aea23e STR#2600 again: more detailed Doxygen comments of the FL_SCREEN_CONFIGURATION_CHANGED event.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9124 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-04 09:31:42 +00:00
Manolo Gouy
f309c395fc STR#2600 again: under X11, dynamically load the libXrandr shared library.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9123 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-04 09:21:47 +00:00
Manolo Gouy
5c7800ea61 OSX: transferred from 3.0 the great speed improvement of text width computation when
many substitute fonts are involved.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9120 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-03 09:22:57 +00:00
Greg Ercolano
f86e7e318a Fix drawing problem with Fl_Input as child of Fl_Tree.
(fixes STR#2725)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9117 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-02 19:56:19 +00:00
Manolo Gouy
e3b758c6f0 Fix STR#2724: #if HAVE_XRANDR instead of #ifdef
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9115 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-01 17:33:02 +00:00
Matthias Melcher
8e95ba0700 STR 2713: less restrictive XClass handling.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9110 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-01 15:53:57 +00:00
Matthias Melcher
8709753e1b STR 2701: more tolerant Xft Font Attribute interpretation.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9108 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-01 15:42:39 +00:00
Matthias Melcher
dde4dbd61f If a vertical scrollbar is added, wrapped lines must be recalculated.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9107 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-10-01 06:48:50 +00:00
Manolo Gouy
9bdc310346 Fix STR#2600 : screens configuration changes are now detected under all platforms.
Requires the RandR X extension.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9102 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-30 14:46:08 +00:00
Manolo Gouy
2df4196d8b About STR#2600 : some code factorization.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9101 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-30 13:09:06 +00:00
Matthias Melcher
b7abad288e Horizontal Scrollbar in TextDisplay is now even smarter.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9097 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-30 10:31:08 +00:00
Matthias Melcher
7446a4d5bb Text area width needs to be recalculated if vertical scrollbar changes visibility.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9094 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-30 10:20:09 +00:00
Matthias Melcher
41876bf00a Horizontal scrollbar in TextDisplay is not shown if text wrappes at the right edge
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9092 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-30 10:09:16 +00:00
Matthias Melcher
00e8e44cf4 OSX: Fixed screen updates durin DND operations
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9090 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-30 09:38:35 +00:00
Manolo Gouy
c029bba113 Fix STR#2600 for the MSWindow and Mac OS platforms.
A new event FL_SCREEN_CONFIGURATION_CHANGED is introduced.
Fl::add_handler() allows to register a callback for this event.
The unix/X11 implementation is still missing.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9087 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-30 08:03:22 +00:00
Greg Ercolano
7d44e7f378 Solve Fl_Tree issues w/ STR#2714 (shadow variable issue for apps)
by moving code implementations from Fl_Tree.H -> Fl_Tree.cxx.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9085 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-29 20:08:54 +00:00
Manolo Gouy
d9cda5c3aa Fix STR#2695 & 2697: correct computation of work areas with multiple screens.
This introduces 3 new functions
static void Fl::screen_work_area(X,Y,W,H)
static void Fl::screen_work_area(X,Y,W,H,mx,my)
static void Fl::screen_work_area(X,Y,W,H,screen_no)
that compute screen work areas and are used by FLTK to position menu windows.

The Fl::x(),y(),w(),h() functions are made consistent across platforms: they return
the origin/size of the work area of the main screen (as far as possible, see below).

On the Mac OS platform, all screen functions reflect changes in screen number and 
positions without requiring the application to restart.

On the X11 platform, I did not find an API to compute the main screen work area
in all conditions. What's used does compute the correct work area when there's
a single screen, but not when there are several, because it returns an area that
encompasses all screens. The implemented workaround is that Fl::x(),y(),w(),h() 
and Fl::screen_work_area(X,Y,W,H,0) return the exact work area when there's 
a single screen, and return the full screen area when there are several.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9084 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-29 16:04:24 +00:00
Matthias Melcher
7ed9960a28 STR 2677: new cursor shape for Fl_Text_Display
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9078 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-28 20:08:48 +00:00
Matthias Melcher
6c3555c0de STR 2710: limited scheme names to known schemes.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9076 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-28 19:54:05 +00:00
Manolo Gouy
0faba4e3cb Mac only: further fine tuning in clipping/rectf needed for scroll demo after changes in r.9050.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9074 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-28 09:07:50 +00:00
Matthias Melcher
1fba7d0f46 STR 2673: stop the annoying beeps when opening modal dialogs (this was so '80s)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9072 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-28 03:39:23 +00:00
Matthias Melcher
8f41d85454 STR 2711: fixed radio menu button drawing.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9071 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-28 03:35:51 +00:00
Matthias Melcher
d5822e35e7 STR 2711: fitting Menu_Button label text into the part that does not have the pulldown symbol. This does not fix clipping: if a label is too big, it's still ugly (and too big)!
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9070 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-28 02:44:56 +00:00
Matthias Melcher
b2399e393f STR 2684: increased right margin in Fl_Input_ so that a cursor at the end of a line would always be fully visible.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9068 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-28 02:11:14 +00:00
Matthias Melcher
6a14cfb34e STR #2691: fixed possible invalid text pointer in Text Display
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9065 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-27 17:10:04 +00:00
Matthias Melcher
4a7eb9cb0c STR 2683: calling show_cursor() before a text buffer is assigned to an Fl_Text_Diisplay deos not crash any longer.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9064 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-27 17:00:35 +00:00
Manolo Gouy
5b04fd35fc Mac OS: simplified use of #define MAC_OS_X_VERSION_10_x
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9057 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-22 11:40:53 +00:00
Manolo Gouy
bdb000bf2f Mac OS: simplified use of CGRectMake() for rectangle drawing and clipping on display and printer.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9050 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-19 19:03:22 +00:00
Manolo Gouy
1eb3664e7a Don't draw the resize window corner under Mac OS X 10.7-Lion.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9039 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-16 08:29:23 +00:00
Manolo Gouy
58076d7a26 Mac OS: - Correct application hiding when modal or menu window is on.
- Removed useless FL_FOCUS events when unhiding application.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9034 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-13 13:03:07 +00:00
Manolo Gouy
28d33a29ad Mac OS: print dialog uses only one window instead of two.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9033 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-08 10:56:51 +00:00
Manolo Gouy
8c6aad459d Mac OS: center on page the "Print Front Window" application menu command.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9032 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-08 08:09:20 +00:00
Manolo Gouy
19b3e33944 Keep filter attached to an Fl_Native-File_Chooser after it's closed.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9030 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-05 16:52:16 +00:00
Manolo Gouy
bb9dd96ad3 Fixed Mac OS crash when using Fl_Native_File_Chooser with filter that does not end with \n.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9029 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-04 13:50:31 +00:00
Manolo Gouy
21ddc8900c Before deleting a window, it's better to check whether it contains the currently focused NSView,
and unlock focus there.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9026 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-09-02 12:15:43 +00:00
Albrecht Schlosser
62b30f85cb Fixed fl_pie() drawing too small on X11 (STR #2703)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9023 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-08-30 07:50:16 +00:00
Albrecht Schlosser
06ec8900f0 Fix window positioning on screen (Fl_X::fake_X_wm()) by testing the
entire window area instead of the top left corner only to find the
screen to put the window on (Windows only).

Note that this *should* be changed to use the work area instead of
the screen area, as discussed in fltk.development.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8983 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-08-19 14:11:30 +00:00
Ian MacArthur
ce3185a94f Initial fixes for window position at or beyond (0,0) under win32.
This is not the whole story, but is better.

We were messing up the initialisation of num_screens on Win32 in that
it was being set to a non-zero value by a call to 
GetSystemMetrics(SM_CMONITORS) but was then subsequently incremented
even higher by each iteration call to the screen_cb(...) function, 
so what we were storing for the screen rectangles was a bit messed up.

Under fltk-1.1, the code used to explicitly reset num_screens to zero
before starting to iterate the screen_cb(...) function, so that worked OK.

I have sort-of restored that behaviour, and removed the (now redundant)
call to GetSystemMetrics(SM_CMONITORS) since we *always* enumerate the 
monitors now to get the per-screen DPI values out.

I've also put in a commented out stub where we could store the per-screen 
work-area, which it seems we do also need now, though I have not yet 
contrived to actually implement that.
Volunteers welcomed...



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8981 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-08-18 16:23:07 +00:00
Manolo Gouy
2beb43cf85 Fix STR #2695 (continued). Use of Fl::x() is appropriate only under Mac OS.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8935 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-08-08 15:24:19 +00:00
Manolo Gouy
59fdc24b16 Fix STR #2688. fl_width(' ') was wrong under X11 without XFT.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8930 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-08-08 12:24:54 +00:00
Manolo Gouy
de0be01e23 Fix STR #2695: to scroll menus properly, use Fl::x(),y(),w() and h() functions that return
the work area rather than the screen size.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8929 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-08-08 10:07:03 +00:00
Ian MacArthur
e3a53da439 Add a #warning to scandir.c with the intent of trying to flag up which,
if any, hosts actually use this code now.
Will only trigger on hosts using gcc though, so may not help at all...
This is part of trying to remove this (possibly) not fltk license 
compliant code from the codebase.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8913 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-08-03 11:04:30 +00:00
Ian MacArthur
ec42758183 fix typo in debug output, as per #2690
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8911 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-08-03 08:17:34 +00:00
Manolo Gouy
0c0305865a Fixed crash under Solaris if no printer is defined.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8867 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-07-20 16:06:02 +00:00
Albrecht Schlosser
2d52aebc6d Fixed Fl_Menu issue with unusual menu flags (STR #2680).
Setting some flags in a terminating Fl_Menu_Item (one with
a NULL label/text/name) caused an endless loop.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8866 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-07-20 13:50:15 +00:00
Manolo Gouy
5b98e80a4f Mac OS: Greatly simplified the open document handler.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8865 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-07-19 13:26:52 +00:00
Greg Ercolano
4f4a8fc3c7 Modifications to all LGPL headers for STR #2685.
(to clarify static exception LGPL by changing license references)



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8864 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-07-19 04:49:30 +00:00
Greg Ercolano
6fa9df7e90 Fixing STR #2679; Fl_Table makes use of FLTK's Fl::scrollbar_size() global.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8863 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-07-17 16:40:41 +00:00
Manolo Gouy
ada26bff29 Under X11, allow to call printable_rect() before any start_page() call.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8858 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-07-13 14:15:50 +00:00
Manolo Gouy
b2561363f7 Mac OS: fix STR #2666 allowing to display copyright info in the default About window.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8852 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-07-11 14:53:07 +00:00
Manolo Gouy
264c73c9ab Mac OS: added missing lock/unlock pairs when running system menu items.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8851 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-07-11 13:52:16 +00:00
Manolo Gouy
20ab9c3c33 Mac OS: Added missing lock/unlock calls in Fl_Paged_Device::print_window().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8849 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-07-11 09:45:21 +00:00
Manolo Gouy
5faaebe373 Added initial value of _driver member in Fl_Printer constructor.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8847 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-07-04 15:57:30 +00:00
Manolo Gouy
3bc8713bac Fl_Paged_Device::print_window() now works with any output surface on Mac platform.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8846 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-07-04 15:07:22 +00:00
Manolo Gouy
0b784cc90f Arguments x_offset & y_offset of function Fl_Paged_Device::print_window() were partially
ignored by the Mac version.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8845 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-07-04 13:54:43 +00:00
Manolo Gouy
682a8fc062 Mac OS: use cmd-A and cmd-C to select all and copy (instead of ctrl-A and ctrl-C).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8842 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-06-26 07:42:07 +00:00
Manolo Gouy
77e393f9b6 Added %%PageBoundingBox clause in each PostScript page so Evince, the Gnome doc
viewer recognizes page formats.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8833 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-06-20 13:23:05 +00:00
Albrecht Schlosser
6027f410ed Fixed Windows DLL import of fl_xid() (STR #2670)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8821 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-06-18 12:29:49 +00:00
Manolo Gouy
c5784d139d Fix STR #2671: added missing object deallocation.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8820 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-06-18 08:36:16 +00:00
Manolo Gouy
29d9c40dea Removed Doxygen documentation of function Fl_File_Chooser::browser() that had been
removed at r. 8785.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8817 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-06-17 11:39:25 +00:00
Manolo Gouy
6475f1a424 Fix STR #2668.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8808 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-06-16 13:31:25 +00:00
Manolo Gouy
598057f079 Fix STR #2665: Mac OS: use bundle name when available.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8807 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-06-16 12:35:32 +00:00
Manolo Gouy
82e53806aa Fix STR #2664.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8806 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-06-16 11:13:59 +00:00
Albrecht Schlosser
5e7fea33d9 Update dependencies.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8802 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-06-11 09:11:08 +00:00
Matthias Melcher
6a5026055f Tooltip test
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8788 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-06-08 14:35:22 +00:00
Manolo Gouy
75c9d386fa Fix STR #2657: repaired indentation error in fluid-output code.
Also changed copyright year to 2011.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8786 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-06-07 11:41:36 +00:00
Manolo Gouy
7feb5a9dfe Added "Show hidden files" check button to the file chooser panel.
This had been previously done in r.8282 and r.8286 without accounting for
the existence of the Fl_File_Chooser.fl file. With this commit, files
Fl_File_Chooser.{cxx, H} are properly generated by Fl_File_Chooser.fl

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8785 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-06-06 16:11:22 +00:00
Manolo Gouy
9223527992 Mac OS: allow internationalization of file dialogs (continued).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8784 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-06-06 12:11:04 +00:00
Albrecht Schlosser
c53313ac6e Fix potential NULL pointer dereference, if !XineramaIsActive(...).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8783 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-06-06 09:37:21 +00:00
Matthias Melcher
4236124af2 STR 2655: applied commited patch. Looks good to me.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8778 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-06-03 19:51:19 +00:00
Manolo Gouy
6fde8226fa Mac OS: allow internationalization of file dialogs.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8776 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-06-03 16:08:42 +00:00
Manolo Gouy
f5de82aac5 Fix STR #2654.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8775 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-06-03 14:07:52 +00:00
Manolo Gouy
ad73700388 Fix STR #2653: (Mac OS only) filters in file chooser panels have now the form filter_name (pattern)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8774 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-06-03 10:06:27 +00:00
Manolo Gouy
965e81fc87 Fixes bug entitled "Fl::event_text() omitted for keyups?" in fltk.development.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8773 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-06-03 09:12:07 +00:00
Manolo Gouy
bd1e9c8ca3 Fix STR #2652: Mac OS-specific bug in Fl::remove_fd().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8771 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-31 11:20:52 +00:00
Manolo Gouy
1bef30d503 Fix STR #2647: crash when copying text from firefox under X11.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8764 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-30 16:47:48 +00:00
Manolo Gouy
2e397fcd81 Fix STR #2649: fl_measure() did not handle well double @@ at line start.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8763 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-30 16:08:46 +00:00
Manolo Gouy
18a902ca31 Fix Fl_Paged_Device::print_window(), Fl_Window::decorated_w() and Fl_Window::decorated_h()
when the window is iconized for all platforms.
Also, factorized some duplicated code in src/Fl_x.cxx.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8759 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-30 12:33:51 +00:00
Manolo Gouy
39998a972c Fix for STR #2648 continued: Fl_Window::decorated_w() and Fl_Window::decorated_h() are
also involved in this fix. 

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8756 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-29 18:01:17 +00:00
Manolo Gouy
84a025b174 Fix for STR #2648: when compiz is used, the window's parent is the root window, not the
title bar-containing window, so we resign printing the window decoration.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8754 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-29 17:34:57 +00:00
Manolo Gouy
493accc905 Attempt to fix STR #2648 by testing all X-API return codes.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8753 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-29 16:29:09 +00:00
Matthias Melcher
76454cb77b #2646: improved queries for screen sizes.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8738 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-26 13:48:00 +00:00
Albrecht Schlosser
9846e7879c Fix constructors for VC++ DLL builds (STR #2645).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8736 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-24 20:00:56 +00:00
Albrecht Schlosser
203f4d8c7e Fix STR #2643: derefenced NULL pointer, if Xinerama is available, but inactive.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8733 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-24 10:20:25 +00:00
Albrecht Schlosser
c690c6fb1c Fix STR #2637, part 2: accessing pixel values beyond array bounds. 64-bit
converters to X image formats would access one more pixel per line
for images with odd widths.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8731 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-23 21:05:22 +00:00
Manolo Gouy
e86bbe4be8 Removes a compilation warning because of use of X->xid = NULL
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8730 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-23 19:40:23 +00:00
Albrecht Schlosser
4bea46c1ce src/screen_xywh.cxx: Fix STR #2637, part 1.
Fix array bounds error when Xinerama and Xlib disagree about number of screens.
Fix setting vertical resolution (dpi) of different monitors.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8727 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-23 19:16:16 +00:00
Albrecht Schlosser
0c8f264df0 Add FL_EXPORT to several classes to fix MS VC++ dll builds (STR #2632).
Remove FL_EXPORT from fl_clip_region() since this is an inline function
on all platforms (and issued a warning when building fltkdll with MS VC++).


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8726 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-23 18:32:47 +00:00
Manolo Gouy
ea020f0081 Fix STR #2640: Fl::w() and Fl::h() are documented to return the width and height of the
main screen's work area (system-occupied space excluded); Fl::screen_xywh() functions
instead compute the full width and height of a screen.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8724 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-23 18:01:29 +00:00
Manolo Gouy
b3f6de1f37 Fix STR #2627: if an X11 window is externally destroyed, FLTK now reacts coherently
either deleting the corresponding FLTK window, or recreating the X11 window.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8723 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-23 16:49:02 +00:00
Ian MacArthur
4614fffc29 Rework the ifdefs for defining the appropriate value of WINVER in our builds.
In particular, ensure that if we redefine WINVER we undef it first (if it is already set) and also ensure that it is set before we include windows.h (by any hidden nested path!) in Fl.cxx.

Previously, we were hitting issues with WINVER being redefined in some build cases, e.g. with --enable-cairo set on a win32 build.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8722 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-23 16:06:13 +00:00
Manolo Gouy
2a9d1e7bec Fix STR #2638. The X11 part is simplified as suggested by Bill.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8710 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-21 21:55:59 +00:00
Manolo Gouy
695613433a Fix STR #2635 for Mac OS: allow fl_xid() even if window is not yet shown.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8708 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-21 21:31:35 +00:00
Albrecht Schlosser
fce1e80ee3 Fix potential crash in fl_xid() on Linux (STR #2635). This would
crash if called when a window is not shown().


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8706 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-21 10:05:19 +00:00
Manolo Gouy
422a2570a8 Allows to set the chooser's type at construction time without calling the type(int) function.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8692 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-19 15:40:43 +00:00
Manolo Gouy
a64c0dc9f3 Mac OS: implemented the effect of the 2nd arg of Fl_Window::label(label, iconlabel) - continued.
Now works also if called before the window is shown().

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8665 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-15 12:34:31 +00:00
Manolo Gouy
9e1a7079c3 Mac OS: implemented the effect of the 2nd arg of Fl_Window::label(label, iconlabel)
that sets the window name when it is iconized (or minimized).

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8664 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-15 09:42:36 +00:00
Manolo Gouy
4ee9b8d7aa Fix for STR #2629: remove beep when typing cmd-<key> under Mac OS.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8660 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-13 11:05:00 +00:00
Matthias Melcher
6892d8a265 STR 2630: added bounds check for very narrow text editing widgets, wishing that Valgrind was available for OS X
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8659 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-13 07:58:26 +00:00
Manolo Gouy
b588a8d399 Fix for STR #2628: keep focus within an Fl_Tab after moving to another window and back.
This had been partially fixed following STR #2552.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8658 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-12 15:53:59 +00:00
Manolo Gouy
bcdf4a4be1 Mac OS: simplified by removing Fl_X::contains_GL_subwindow() function.
This operation is now performed within Fl_cocoa.mm

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8657 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-12 11:50:43 +00:00
Manolo Gouy
622b357f24 Fix STR #2625: removed memory leak after reading erroneous PNG data.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8656 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-12 08:07:27 +00:00
Manolo Gouy
bcbb26d5e7 On Mac OS, allow creation of a window in a minimized form.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8654 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-11 18:31:28 +00:00
Manolo Gouy
703d7df7d5 On Mac OS, FL_HIDE is now sent when a window is minimized or the application is hidden.
The context removal on Fl_Gl_Window::handle() destroyed the GL colors when the window 
is remapped.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8653 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-11 18:09:43 +00:00
Ian MacArthur
41fc90726b Hopefully this fixes the bug Albrecht found in using fl_measure on surrogate pairs whilst we were looking at STR #2622.
In summary, if you measured the string *before* the selected font had been used to actually fl_draw() anything, the measurement returned was invalid, as the new font was not "locked in" to the gc.
This change makes sure the selected font is set in the gc before making the measurement.
In tests, this appears to work correctly now...
More opinions welcomed!


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8644 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-10 15:37:05 +00:00
Ian MacArthur
eb16787f7a Pushing this as a possible fix for STR #2622.
This might not be correct (though I think it is) but should be no worse than the current mess I made...

Please test with as many different win32/64 compilers as possible and let me know!




git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8643 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-10 09:27:18 +00:00
Manolo Gouy
80ea4bcde6 Restoring correct keyboard handling under Mac OS X 10.5.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8642 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-07 13:45:42 +00:00
Manolo Gouy
f9a2d65bb3 Fix STR #2619. An extra FL_MOVE event is sent on X11 after the menu item is selected
by the keyboard. 

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8641 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-07 07:15:39 +00:00
Manolo Gouy
2c42334c55 Fix STR #2620. Obeys the tab distance value set by Fl_Text_Buffer::tab_distance(int).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8640 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-06 18:15:29 +00:00
Manolo Gouy
26f81a4834 Fix STR #2613. Allows a menu item to be invisible but with functional shortcut
as authorized by the doc.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8639 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-06 16:29:16 +00:00
Greg Ercolano
6871a6512a Fl_Tree mods for handling escaped item menu names.
Docs clarified.
Also, tree-simple example's callback handler brought up to date.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8632 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-04 02:59:50 +00:00
Manolo Gouy
14839338ec Fix STR #2616. This is a very indirect consequence of the fix made for STR #2594
that allowed to set the focus to an Fl_Window.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8631 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-01 20:02:47 +00:00
Albrecht Schlosser
428008c276 Fixed drawing artifacts when scrolling round boxes (FL_ROUND_UP_BOX and
FL_ROUND_DOWN_BOX) on Linux (STR #2615). This was done by

 (a) setting the line width in the box drawing function (was undefined, maybe 0)
 (b) taking care of zero and negative line width in X11 clipping functions.

Both solutions would have solved the particular problem individually.

Additionally made local helper function fl_arc_i() in src/fl_round_box.cxx
static to avoid name clashes.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8630 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-05-01 12:45:29 +00:00
Manolo Gouy
ae8d142ed0 Corrected spurious FL_NUMLOCK setting.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8628 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-29 20:25:04 +00:00
Manolo Gouy
73a6f06c34 Reorganized keyboard input-handling code.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8626 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-27 11:21:57 +00:00
Manolo Gouy
0f5ea9a2e2 Fix STR #2612: added missing #include <X11/keysym.h>
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8625 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-27 08:47:00 +00:00
Manolo Gouy
5be46ea4ad Added function keys F13 - F16 and corrected backslash key.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8624 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-26 17:28:10 +00:00
Albrecht Schlosser
3b76848435 Documentation updates, also fixing STR #2574, trying to make clear
which events invisible and inactive widgets can get.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8623 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-24 17:09:41 +00:00
Albrecht Schlosser
06e17886ed Documentation fixes and a few indent corrections.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8621 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-23 15:46:30 +00:00
Albrecht Schlosser
5c6913fed9 Fixed potential uninitialized pointer usage.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8620 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-23 12:27:58 +00:00
Manolo Gouy
65b9610a96 Mac OS: exact implementation of the Fl::screen_dpi() function.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8619 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-22 17:30:37 +00:00
Manolo Gouy
239489c4b8 Fix STR #2608: the bug had been introduced by r.8552 to solve STR #2598.
The new code makes the STR #2598 changes unix-specific so it does not
interact with the WIN32 platform.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8618 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-22 11:00:06 +00:00
Albrecht Schlosser
0f20c065ce Fixed keyboard navigation in fl_choice() (STR #2591)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8616 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-20 14:54:42 +00:00
Albrecht Schlosser
85a3534ee3 Updated dependencies.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8612 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-20 14:03:22 +00:00
Albrecht Schlosser
18628d428b Fixed alpha blending under X11 when line data size != 0 (STR #2606)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8611 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-20 14:01:04 +00:00
Manolo Gouy
ad50b753be Added fallback mechanism if malformed UTF-8 is used for a window title.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8608 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-19 12:37:20 +00:00
Manolo Gouy
d4685c13ef Misc code cleaning.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8607 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-19 08:22:05 +00:00
Manolo Gouy
1ad8cf320d Fixed a problem in the WIN32 version of Fl_Paged_Device::print_window_part() and
Fl_Paged_Device::print_window() where the window didn't redraw well in some
cases after printing.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8606 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-18 20:47:32 +00:00
Ian MacArthur
451b91ea46 OK - this time I actually think I have got it.
The win32 text-extents stuff now seems to be handling surrogate pairs correctly,
at least in my testing harness, and with a variety of supplementary plane fonts.

I really will leave this alone now - unless anyone finds bugs of course!

I have tested for regressions and it seems to be fine AFAICT.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8605 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-18 14:34:20 +00:00
Manolo Gouy
aa930a6d21 Fix STR #2603: deselected menu item when mouse enters menu bar out from any menu title.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8604 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-18 13:05:08 +00:00
Manolo Gouy
b51f47c437 Fix STR #2605: proper mapping of the Windows key.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8603 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-18 11:45:46 +00:00
Manolo Gouy
619cb25982 Mac OS: The Fl_mac.cxx test
if (winclass != kHelpWindowClass)
is now replaced in Fl_cocoa.mm by its exact equivalent:
  if ( w->border() || (!w->modal() && !w->tooltip_window()) )
so that tooltip windows are handled as in carbon.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8601 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-18 08:18:16 +00:00
Ian MacArthur
ac5d865986 This WIN32 patch introduces a credible (though far from ideal)
workaround for text_extents being measured on glyphs from
supplementary Unicode planes.
It has no effect on glyphs from the Basic plane, so should not
be visible at all to most code.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8600 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-17 21:19:14 +00:00
Manolo Gouy
8f59684c0f Mac OS: Fixed bug where an application could be left with only a tooltip window opened.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8599 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-17 19:58:31 +00:00
Ian MacArthur
d77223ea58 A quick hack to prevent the OSX tooltip-crash on
badly formed UTF8 strings.

This probably is not the best solution, but it
does work.
Note that the problem actually seems to be in
setting the window title, and indeed if you try to
label ANY window with a badly formed UTF8 string
(not just a tooltip) you get the same exception
thrown.

NOTE: I'm not even sure why we try to set the 
window title in tooltips, as it is never used 
and the tooltip label itlsef still works fine.

Anyway, we can do something better, but this will
work for now.

Aside: If you close an app on OSX whilst a tooltip
is visible, the app will not exit, as there is still
a window open (the tooltip) but no way to cancel
the tooltip.

Don't know if this is OSX specific or not though
but it is certainly a bug.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8598 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-17 14:39:16 +00:00
Ian MacArthur
e67e628317 I've extended Manolo's excellent tweaks that handle surrogate pairs.
I found some kind of weird interaction with some symbol fonts that
covered the supplementary planes that meant we could not measure
the width correctly (although we did measure the text extents correctly.)

This mod mirrors what we do for non-surrogate-pair glyphs more
closely and appears to do the Righ Thing now, at least for the test fonts that I have, and which were exhibiting the aberrant behaviour before.

I don't think I have broken anything else in the meantime!

 


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8597 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-17 13:18:55 +00:00
Manolo Gouy
f8d1e074ed Made Fl_Quartz_Graphics_Driver::text_extents() resistant to mal-formed UTF-8 text.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8596 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-17 11:19:41 +00:00
Manolo Gouy
ddc4b21b55 Fixed Fl_Paged_Device::print_window() that did not work under Windows seven.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8595 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-17 08:48:40 +00:00
Manolo Gouy
8212e4bfe7 Corrected gl.h instead of gl.H
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8594 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-15 21:41:34 +00:00
Manolo Gouy
9ff9cf1230 Added Fl_Paged_Device::print_window() to print a window with its title bar and frame.
Added Fl_Window::decorated_w() and Fl_Window::decorated_h() that return the size
of a window with its title bar and frame.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8593 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-15 21:38:05 +00:00
Manolo Gouy
c473215f2a Corrected typo.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8592 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-14 13:22:13 +00:00
Manolo Gouy
8d2d3c2a7d Corrected typo.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8591 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-14 13:21:12 +00:00
Manolo Gouy
2af958422a Corrected typo.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8590 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-14 13:16:03 +00:00
Manolo Gouy
8c6aa5edb5 Corrected typo.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8589 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-14 13:15:13 +00:00
Manolo Gouy
f7c2061f0c Improved the accuracy of clipping when printing on Mac OS.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8586 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-13 20:50:41 +00:00
Ian MacArthur
be6df55717 More attempts to clean up WIN32 handling of UTF16 surrogate pairs.
In particular, I have added a new function to src/fl_utf.c called fl_ucs_to_Utf16() which
converts a single 32-bit Unicode value into one (or more) UTF16 cells.

This is needed in the win32 char-by-char text width() logic, and I suspect may also be useful in the OSX code in some places.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8585 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-13 15:43:22 +00:00
Manolo Gouy
639ee4fbab Now sends FL_HIDE/FL_SHOW events when window is iconized/un-iconized.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8584 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-13 09:03:19 +00:00
Manolo Gouy
404a7c1bad Restores change made in r.8557 that blocked system menu shortcuts.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8583 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-04-12 20:15:10 +00:00