summaryrefslogtreecommitdiff
path: root/src/fl_draw.cxx
AgeCommit message (Collapse)Author
2010-04-09Added new label alignments for image and text to Fluid.Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7476 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-04-07Added new flags for label alignment: FL_LEFT_TOP, FL_RIGHT_TOP, ↵Matthias Melcher
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-03-29Removed more Cocoa/Quartz references. Finally moved OS X font down a pixel.Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7357 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-03-29OS X: removed all Carbon and Quickdraw references. Starting with 1.3, we ↵Matthias Melcher
only support Cocoa and Quartz. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7351 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-08-28Applied patch from STR#2115.Greg Ercolano
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-04-01converted more html tags to doxygen commands in drawing.doxengelsman
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-03-24Major documentation update including: now html doc API is sorted, navigation ↵Fabien Costantini
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-01-01Changed Copyright in 'src' directoryMatthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6616 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-12-07Fixed typos and amended doxygen docs.Albrecht Schlosser
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6562 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-12-06Replaced all occurrences of the deprecated fl_clip() function byAlbrecht Schlosser
fl_push_clip(). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6551 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-12-04STR#2086 related Fixes :Fabien Costantini
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-03Doxygen documentation:Fabien Costantini
- 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-11-06Doxygenized fl_expand_text() comment, more minor code comment and debug ↵Fabien Costantini
printf cleanup. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6501 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-11-06UTF8 nbsp detection before string expansion fixed: as explained, now the ↵Fabien Costantini
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-05Added fast utf8 string detection routine fl_is_valid_utf8(). Solves the ↵Fabien Costantini
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-10-28added doxygen comments for more font/text functions in fl_draw.{H,cxx}engelsman
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6489 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-19Updating fl_utf8.h references. Fixing copyright date in .fl files.Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6311 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-16Doxygen documentation : took the opportunity to update copyright info as we ↵Fabien Costantini
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-10Merging the UTF8 patch, consisting of O'ksi'd s original 1.1.6 patch and ↵Matthias Melcher
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
2006-12-21Fix fl_measure with symbols.Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5565 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-08-29- removed more inconsistencies between fl_draw and fl_measure (STR #1408)Matthias Melcher
- 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-29Fixed fl_measure which mistook a trailing '@@' for a symbol (STR #1406)Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5377 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-04-15Changed special handling on ISO characters 0x80 to 0xA0 for OS X, since this ↵Matthias Melcher
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
2005-11-29Fix compile error with Sun C++ compiler.Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4670 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-11-28STR #1098: fl_measure now round fractional sizes up instead of down, so that ↵Matthias Melcher
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-04-16Update source file headers with STR web page.Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4288 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-05Fix menu drawing...Michael R Sweet
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-02-24Copyright updates.Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4052 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-10-18Shortcuts were incorrectly underlined in multi-line labels (STRMichael R Sweet
#566) Remove Winline from GCC options. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3870 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-04-11Copyright updates and prep for 1.1.5rc1.Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3391 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2003-07-18updated documentation and Fl_Dial. STR #101, 94, 99Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3049 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2003-06-15Fix @@ drawing (STR #84)Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3029 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2003-01-30Copyright update for 1.1.3 release (not quite yet, but soon...)Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2936 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-05-16Massive update to use strlcpy() and strlcat() instead of strncpy()Michael R Sweet
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-04-11Make Fl_Output a subclass of Fl_Input, and add input_type and readonlyMichael R Sweet
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-01-23Return 0 after processing WM_PAINT message.Michael R Sweet
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-01Copyright updates...Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1903 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-12-21Fixed browser @ symbol prefix handling...Michael R Sweet
OS/2 fixes (makeinclude update and filename_isdir needed #include <sys/types.h>) MingW fix (makeinclude update) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1886 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-11-19WIN32 fixes for the new image stuff...Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1705 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-11-03Add Fl::visible_focus() method.Michael R Sweet
Add optional "draw_symbols" argument to fl_draw and fl_measure functions. Fl_Repeat_Button didn't handle keyboard focus properly. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1678 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-10-16Fix two uninitialized vars...Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1635 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-09-02Fix label/image problems.Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1581 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-08-06Include config.h in Fl_FileBrowser.cxx.Michael R Sweet
Remove Fl::enable_symbols() from resizebox.cxx. Update fl_draw() to support symbols at the beginning and end of the label (for double symbols on either end, e.g. "@< Bla@>") Update fl_measure() to understand symbols and add them to the measurement. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1562 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-08-06Symbols are now supported by main label drawing code - @@ to insert aMichael R Sweet
single @. Currently only 1 symbol per label, at the beginning or end of the label string, with the remaining text (and image) getting formatted as usual. The size of the symbol == lines * labelsize, unless there is no text in which case the size == height of label area. Fl_Menu_Item::draw() didn't clear the image field in the Fl_Label structure. Removed Fl::enable_symbols(), which is now the default. Dropped FL_IMAGE_LABEL, FL_PIXMAP_LABEL, and FL_BITMAP_LABEL types, which are no longer needed. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1561 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-08-05Image labels!Michael R Sweet
image() method to set active image, deimage() method to set inactive image. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1560 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-01-22Copyright 2001.Michael R Sweet
FLTK 1.0.11. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1356 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2000-06-05OK, now version 1.0.9Michael R Sweet
Updated email addresses to point to fltk.org domain... Updated README and CHANGES files accordingly. Updated makeinclude and Makefile files to put -L../lib before the LDFLAGS/GLDFLAGS to avoid problem reported by Alexander. documentation/Makefile wasn't including makeinclude. Updated FLUID about window to show version 1.0.9. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1168 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2000-04-25Updated copyright notices for all of the 1.0.x files.Michael R Sweet
Updated the configure script for *BSD and GCC 2.95 (-fno-exceptions) Added install rule to documentation directory. Dumped old packages directory; added traditional RPM spec file and EPM list file (that replace all of the packages stuff) The FLUID man page is now "fluid.1" for the formatted page and "fluid.man" for the non-formatted page, since only IRIX uses pack'd formatted man pages. Whew! git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1090 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-06-16Was escaping characters from 0x80 to 0x9f, but these are used by theMichael R Sweet
PostScript and Windows ISOLatin1 encodings (and the X11 fonts which use them...) Commented the code out for now... git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@609 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
1999-01-07Yay, change all copyright notices to be 1998-1999.Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/trunk@201 ea41ed52-d2ee-0310-a9c1-e6b18d33e121