Commit Graph

68 Commits

Author SHA1 Message Date
Albrecht Schlosser
3f98f88156 Remove unused code and trailing white space.
The unused function was commented out about 6 months ago, see
svn r 10123. No changes other than comments and white space.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10265 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-09-03 10:07:33 +00:00
Manolo Gouy
2d845e708a Minor reformatting to follow the coding style of the CMP.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10124 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-03-30 21:32:46 +00:00
Manolo Gouy
623012ad72 Removes a constraint that the fancy string drawing function fl_draw() is limited to 1024 chars/line
that blocked a user of the Fl_Browser widget (see "fl_draw MAXBUF limit" in fltk.coredev).

Also, removed a useless computation in string expansion that checked for valid UTF-8 sequences:
the point is that a valid UTF-8 sequence for a non-ascii char contains no ascii char,
thus no tab, space, control, & or @ we want to process differently. 
Also, invalid UTF-8 sequences are copied unchanged by this procedure.
Therefore, checking for tab, space, control, & or @, and copying the byte otherwise, is enough.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10123 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2014-03-28 10:15:43 +00:00
Greg Ercolano
386b12b770 Fix STR# 2772: remove dead code in fl_measure()
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9869 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-04-09 20:11:28 +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
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
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
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
d140f4f3be Fix STR #2557.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8398 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-02-07 16:04:59 +00:00
Matthias Melcher
e454f97acc Fixed Copyright to 2010.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7903 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-28 21:06:39 +00:00
Matthias Melcher
b5a73c78e6 Fixed label alignment (STR #2436)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7782 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-10-30 21:32:15 +00:00
Manolo Gouy
f4a08a3672 Removed compilation warning
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7502 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-04-14 13:21:10 +00:00
Matthias Melcher
927fd35165 Added new label alignments for image and text to Fluid.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7476 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-04-09 22:18:05 +00:00
Matthias Melcher
f899c3897d Added new flags for label alignment: FL_LEFT_TOP, FL_RIGHT_TOP, FL_LEFT_BOTTOM, and FL_RIGHT_BOTTOM align outside labels first to the side, then to the top or botton, filling a gap in possible alignment. Also FL_ALIGN_TEXT_NEXT_TO_IMAGE and FL_ALIGN_IMAGE_NEXT_TO_TEXT which do just that, and finally FL_ALIGN_IMAGE_BACKDROP which renders the image in the background and draws the label on top.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7469 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-04-07 23:17:33 +00:00
Matthias Melcher
024368d722 Removed more Cocoa/Quartz references. Finally moved OS X font down a pixel.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7357 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-03-29 14:10:54 +00:00
Matthias Melcher
941901e273 OS X: removed all Carbon and Quickdraw references. Starting with 1.3, we only support Cocoa and Quartz.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7351 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-03-29 10:35:00 +00:00
Greg Ercolano
41cef82137 Applied patch from STR#2115.
This fix to fl_height(int,int) solves the "digital drit"
problem in Fl_Text_Editor, where doing insert/delete 
operations was leaving a trail of dead pixels. 

Also fixes problem with font display problem in fluid's
code editor. See the STR for screenshots of the problem.

NOTE: THIS IS A WORKAROUND FOR A DEEPER PROBLEM.
Somewhere during the port of UTF8, the actual pixel size
of the displayed font is a little off, causing FLTK to
miscalculate line height, causing 'digital drit'.

It used to be that when you specified a font size,
the font's actual displayed pixel size matched the
font size value.

This fix makes the fl_height(int,int) function more robust,
actually inquiring the font system for its font size, instead
of assuming the font size is the same as the 'size' argument.

Since Fl_Text_Editor makes use of this function, it helps
that widget calculate font sizes correctly.

The real fix will be restoring FLTK's old behavior where the 
font size specified is the actual pixel size of the displayed font.
Then this function can be reverted to just returning the 'size' argument.




git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6845 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-08-28 20:14:41 +00:00
engelsman
8bb63644d2 converted more html tags to doxygen commands in drawing.dox
most of the function names used as indented paragraph titles
are now recognised properly and are shown as links. However,
I was forced to "downgrade" many function() references in the
text so that the unwary user isn't unexpectedly teleported off
the tutorial pages. It reduces the link spaghetti a lot,

tweaked Enumerations.H and fl_draw.cxx to get doxygen to recognise
more function names used in drawing.dox. only fl_scroll(...)
and the offscreen drawing functions still needed for drawing.dox



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6735 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-04-01 22:11:57 +00:00
Fabien Costantini
15489bda1b Major documentation update including: now html doc API is sorted, navigation problems/side effects fixed, html tags replaced by proper doxygen commands, parameters command switched from a to p. Includes a pdf update.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6716 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-03-24 01:40:44 +00:00
Matthias Melcher
5251b64d57 Changed Copyright in 'src' directory
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6616 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-01-01 21:28:26 +00:00
Albrecht Schlosser
2bd4572918 Fixed typos and amended doxygen docs.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6562 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-12-07 17:01:55 +00:00
Albrecht Schlosser
fbea5019fb Replaced all occurrences of the deprecated fl_clip() function by
fl_push_clip().


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6551 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-12-06 14:59:52 +00:00
Fabien Costantini
899184656a STR#2086 related Fixes :
This one was really tough to track, understand:
In fact, 
the problem was comming from the misplacement of the menu window,
which itself came from invalid measurement,
which itself came from invalid fl_witdh() measurement,
but only when fl_gc is not valid because fl_width() relies on Win32 on the call
of GetTextExtentPoint32W which can't succeed if the HDC(here fl_gc) is not valid !

Now the fix:
A best-effort algorithm has been furthered to supply a valid fltk hdc if we can have one or a screen hdc if no fltk window is found by fl::first_window().

Note that when fl_gc is NULL inside fl_width() call, it can happen that Fl_Window::current() is not null but invalid (already deleted).
Finally, in the case of the buggy menu window observed here, this  fl_gc was set to NULL just after an Fl_Menu_Window deletion and re-creation in Fl_Menu_Item::pulldown().

Also added a comment to describe the new fl_width() behavior.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6540 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-12-04 17:33:30 +00:00
Fabien Costantini
73a2fa5b99 Doxygen documentation:
- Fixed recent documentation update problems in fl_draw.cxx : \ and @ char must be doubled otherwise interpreted as doxygen keywords
- Fixed some doxygenized parameters problems in Fl_Preferences.cxx
- Added the treeview mode, now featuring a vertical left tree browser in html doc
- Splitted html configuration file from pdf configuration file, now a new Doxybook config file permits to customize independtly both html and pdf modes without risking side effects and also without assuming an fltk user will have the Tex tools installed to generate the html doc. Now only pdf generation will need LaTex tools.
- Updated the doxygen based documentation to revison 9 and added new significant contributors to index.dox in alphabetical order.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6539 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-12-03 01:02:10 +00:00
Fabien Costantini
8878c68256 Doxygenized fl_expand_text() comment, more minor code comment and debug printf cleanup.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6501 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-11-06 22:36:01 +00:00
Fabien Costantini
a6def7d9de UTF8 nbsp detection before string expansion fixed: as explained, now the fl_expand_txt() main loop is utf8 multibyte char aware and should not confuse nbsp chars with utf8, even mixed with other CP125x code.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6500 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-11-06 22:30:14 +00:00
Fabien Costantini
8094043bcb Added fast utf8 string detection routine fl_is_valid_utf8(). Solves the drawing problem in #2080 related fl_expand_text() use. The particularity of this routine is that the complete scan is cached so that it executes 0 to 1 time in the fl_expand_text() loop. Now chinese example in str 2080 seems to works perfectly here. Still, incorrect windows title in Win32 need to be adressed.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6497 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-11-05 01:55:17 +00:00
engelsman
13267ea186 added doxygen comments for more font/text functions in fl_draw.{H,cxx}
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6489 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-10-28 20:58:44 +00:00
Matthias Melcher
e8f467b9e3 Updating fl_utf8.h references. Fixing copyright date in .fl files.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6311 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-19 17:40:20 +00:00
Fabien Costantini
ae697b80b2 Doxygen documentation : took the opportunity to update copyright info as we modified already in batch almost all sources, added also a fil doxygen command to class headers to harmonize with original matt Fl_Widget dox. format.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6265 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-16 07:26:22 +00:00
Matthias Melcher
b6bde2e456 Merging the UTF8 patch, consisting of O'ksi'd s original 1.1.6 patch and additions by Ian. PLEASE BE AWARE that the patch in its current incarnation is a regression in many aspects and further work is required before we can announce Unicode support.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6212 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-10 23:56:49 +00:00
Michael R Sweet
1c47b9826d Fix fl_measure with symbols.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5565 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-12-21 19:39:26 +00:00
Matthias Melcher
00ec9da8f5 - removed more inconsistencies between fl_draw and fl_measure (STR #1408)
- made the Tooltip hide code a little bit smarter
- Added subwindow test case to Fl_Tabs

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5378 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-08-29 10:04:02 +00:00
Matthias Melcher
ba8bb3d8c2 Fixed fl_measure which mistook a trailing '@@' for a symbol (STR #1406)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5377 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-08-29 07:49:22 +00:00
Matthias Melcher
1184d7eee6 Changed special handling on ISO characters 0x80 to 0xA0 for OS X, since this characters must be handled as standard characters here.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4957 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-04-15 16:19:54 +00:00
Michael R Sweet
312aa3a3c0 Fix compile error with Sun C++ compiler.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4670 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-11-29 08:49:56 +00:00
Matthias Melcher
129c8e39ec STR #1098: fl_measure now round fractional sizes up instead of down, so that an area that is create with the values returned from fl_measure will be large enough to hold the same text generated with fl_draw.
Or in short: OS X Tooltips will not wrap... .



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4663 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-11-28 09:52:19 +00:00
Michael R Sweet
1c399af444 Update source file headers with STR web page.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4288 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-04-16 00:13:17 +00:00
Michael R Sweet
e6399f8f37 Fix menu drawing...
src/fl_draw.cxx:
    - fl_measure(): use "h" instead of "min(w,h)", since "w" is
      usually 0.

src/Fl_Menu.cxx:
    - Revert previous "fix" in Fl_Menu_Item::measure()


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4070 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-05 23:01:00 +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
b2f9a532e7 Shortcuts were incorrectly underlined in multi-line labels (STR
#566)

Remove Winline from GCC options.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3870 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-10-18 20:40:36 +00:00
Michael R Sweet
a3d0905c9e Copyright updates and prep for 1.1.5rc1.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3391 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-04-11 04:39:01 +00:00
Matthias Melcher
4042047358 updated documentation and Fl_Dial. STR #101, 94, 99
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3049 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2003-07-18 05:53:21 +00:00
Michael R Sweet
1bde669d75 Fix @@ drawing (STR #84)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3029 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2003-06-15 04:13:17 +00:00
Michael R Sweet
00cb676e11 Copyright update for 1.1.3 release (not quite yet, but soon...)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2936 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2003-01-30 21:46:07 +00:00
Michael R Sweet
88d54cd78b Massive update to use strlcpy() and strlcat() instead of strncpy()
and strncat() in almost all places (there are still a few strncpy's
that need to be used...)

Added configure check for strlcat() and strlcpy().

Added emulation code for strlcat() and strlcpy().


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2239 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-05-16 12:47:44 +00:00
Michael R Sweet
7482426735 Make Fl_Output a subclass of Fl_Input, and add input_type and readonly
methods/constants to support Fl_Output as a special case of Fl_Input
(you can do everything but change the text in Fl_Output...)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2073 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-04-11 11:52:43 +00:00
Michael R Sweet
492b81c240 Return 0 after processing WM_PAINT message.
Fix clip test in fl_draw().


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1944 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-01-23 16:58:01 +00:00
Michael R Sweet
64b4177ef4 Copyright updates...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1903 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-01-01 15:11:33 +00:00