Commit Graph

2646 Commits

Author SHA1 Message Date
Matthias Melcher
aa9148eea8 Added check for NULL for numbnuts (like me) who query the size of a font before choosing a font... .
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5179 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-06-06 15:28:20 +00:00
Matthias Melcher
30786c2ed3 STR #1310: OS X Quartz support fixed. All test codes now work without complaints fro Quickdraw or CoreGraphics. If no more major bugs are reported for Quartz, I will make Quartz the default over Quickdraw in the next release of FLTK 1.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5178 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-06-06 08:00:56 +00:00
Matthias Melcher
587e1d170b STR #1309: resize indicator not showing if size range does not permit resizing.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5177 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-06-05 12:09:30 +00:00
Matthias Melcher
9c0a2c0a0f OS X Quartz: fixed issues with creating a gray image map. Fluid problems still appear.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5176 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-06-05 11:59:09 +00:00
Matthias Melcher
c80ca69407 OS X Quartz: fixed the text width problem.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5175 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-06-05 09:04:23 +00:00
Matthias Melcher
8130f16538 OS X Quartz rendering: text is now clipped and drawn in the correct color. I had to reverse the 'selection color' change because some widgets rely on this color being dark. Still problems with Fluid rendering and measuring fonts before a window is open.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5174 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-06-05 09:01:29 +00:00
Matthias Melcher
60ece00315 OS X Quartz: one pretty essential fix to the call order in Quartz context change which fixed a lot of warnings. I also added a file that helps tremondously to debug Core Graphics calls. This file is not compiled into the source tree by default, but the annotations in "src/cgdebug.h" explain the usage.
In regard to CG Text drawing vs. the new ATSU Text drawing: I now remember why I did not ATSU in the beginning: STDU does not use the CG clipping area or text pen settings. So, if you plan on using the current SVN with --enable-quartz, please be aware that you will not have any text clipping or any other text color than black.

Finally, I added code to FLTK on OS X that retreives the selection color from the system instead of assuming dark blue. I am not entirely confident about this change as it may require OS X 10.4 . Feedback appreciiated.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5173 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-06-04 10:21:45 +00:00
Matthias Melcher
c4b8afdcf9 STR #1305: Added MacRoman to utf16 lookup table. Everything's rendered the way we are used to it now, only in Quartz.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5172 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-06-02 15:01:32 +00:00
Matthias Melcher
4dd1f5e216 STR #1305: partial fix.
FLTK on Mac with --enable-quartz now uses ATSU instead of CG to render text. First of all, it is a lot faster, but more importantly, character positions are now all at integer positions. This is not as beatiful as standard Mac text, but required by the FLTK internals. I seriously doubt that anyone who's not a typesette will notice the difference.

But - and there's always a but, isn't there?

This commit does not handle the ASCII-to-UTF16 conversion yet, so all characters above 127 are junk.

Also, there are still a lot of problems with the Quartz support in general. Most prominently, we still get a lot of messages about invalid contexts which ruins the clipping.

So in conclusion (this must be the longest SVN commit annotation ever) this modification fixes the main reason why I did not finish the Quartz port. After fixing this, there's hope that we will wrap even that dirty little corner of FLTK up for good!



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5171 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-06-02 14:17:41 +00:00
Michael R Sweet
b938cfb7ef Remove executable bit from more source files.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5170 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-05-31 18:33:37 +00:00
Michael R Sweet
ed251b5ca2 Remove executable bit from source files.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5169 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-05-31 18:33:05 +00:00
Michael R Sweet
7565604dbf Make sure native eol-style is set on all source files.
Fix some freetype-config and xprop issues in the configure script.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5166 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-05-30 14:04:00 +00:00
Matthias Melcher
987d9e05f2 Fixed shortcut and default focus for message dialogs (STR #1298).
Default focus is now on the button that also reacts to the 'Enter' key. This should avoid confusion about Enter triggering the button1 or button 0.

Also, I changed the shortcut call to the new convention which works on MSWindows. I don't have a Linux system right now for testing... .

Fixed focus issues (STR #1286, STR #1289, STR #1296)

fl_xfocus was not always updated, making widgets or even whole windows loose focus when any focus changes were not accompanied by a click into the same window. Also, Fl_Tabs would not redraw correctly if focus returned to the active tab.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5165 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-05-30 09:38:19 +00:00
Matthias Melcher
6986a1d008 Remove warnings found by Robin Rowe's settings for VC7. I do not have VC7, but I believe I managed to find and fix them all... .
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5164 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-05-30 07:58:41 +00:00
Matthias Melcher
bfd2801df2 Fixed resizing in OS X. The code was not only unneccesarily convoluted, but also forced some default sizes on user requests for specific window sizes. The new code also avoids two system calls and shortens a move/size combination into a single resize, which reduces some flicker on extreme resizes (but not all flickering - Apple, what's up with that?).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5163 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-05-30 07:35:58 +00:00
Matthias Melcher
d814fce94d - In Fluid, declarations starting with the keyword
'typedef', 'class', or 'struct' are now treated
          correctly if inside a class (STR #1283)



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5157 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-05-28 15:59:29 +00:00
Matthias Melcher
84ac69cd27 Added permission to reproduce the manual as given by Bill Spitzak and agreed upon (or at last not disagreed) by the other developers including Mike Sweet.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5156 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-05-28 15:31:25 +00:00
Matthias Melcher
b9e4886cfe Tabs now show the correct tooltip (STR #1282)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5139 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-05-21 09:41:47 +00:00
Matthias Melcher
20ad7d23fa STR #1282: added tooltips to the 'tabs' demo so we can test and fix this bug.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5138 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-05-21 08:59:40 +00:00
Matthias Melcher
e35e2a27a2 Included fltk.spec in configure.in
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5137 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-05-21 08:50:25 +00:00
Matthias Melcher
92d0163f40 Declarations in Fluid can now explicitly be made non-static or non-extern. This allows the declaration of types like 'enum'
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5130 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-05-18 14:40:10 +00:00
Matthias Melcher
b0c7fc3ab7 Fixed insufficiently invalidated cache in Fl_Browser (STR #1265). Fl_Browser::cahceline was set to 0, but Fl_Browser::cache was not which lead to confusion if the cache was usable or not.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5095 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-05-10 10:45:59 +00:00
Matthias Melcher
fc57e07cbf STR #1153: This is an attempt to fix the described issues when querying multiple monitors on defferntly set up Windows environments. Would the posters please test if the new version works. Thanks.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5094 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-05-10 10:37:32 +00:00
Michael R Sweet
65031137c5 Update svn:ignore props.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5092 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-05-07 17:22:20 +00:00
Matthias Melcher
cdc1d7d5e3 Fixed FLUID undo. Thanks Fabien fr finding this.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5087 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-05-05 18:12:05 +00:00
Matthias Melcher
22b1499904 STR #1152: Fixed Cygwin compiler warnings
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5085 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-05-05 14:36:58 +00:00
Matthias Melcher
48c8932fd5 Some minor improvements for the Mac keyboard mapping: accent-space would under some cicumstances add an extra space; tilde-space would add a 'funny' tilde from far up un the MacRoman font, not the ASCII tilde as expected.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5084 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-05-05 14:09:50 +00:00
Matthias Melcher
8e37fbafc8 STR #1187: Fixed missing reset of flag in FLUID
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5083 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-05-05 13:50:44 +00:00
Matthias Melcher
6fd58ca7cf Added fl_encoding_... files to VC6 dll build.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5082 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-05-05 13:41:04 +00:00
Matthias Melcher
93cb7b5487 STR 1264: Editor uses "delete" instead of the required "delete_widget"
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5081 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-05-05 13:38:47 +00:00
Matthias Melcher
37e05f9df2 Fixed maximizing in OS X (STR #1221)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5041 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-04-28 02:57:15 +00:00
Matthias Melcher
4e038ef82b STR #1169: Fixed 'make distclean' to remove binaries inside MacOS app packages
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5040 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-04-28 01:10:00 +00:00
Matthias Melcher
d90102f9d2 Fluid Code Viewer is now truly a viewer, not an editor. I would love to allow text editing in the Code Viewer and re-enter the code into the UI, but that is currently close to impossible to implement
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5039 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-04-28 01:00:41 +00:00
Matthias Melcher
f74a812003 STR #1158: Fl_Spinner is now fully supported by Fluid. Previously, min, max, step and value could not be edited the usual way because spinner is derived from Fl_Group, not Fl_Valuator...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5038 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-04-27 22:47:59 +00:00
Matthias Melcher
ad0fc9ca23 STR #1162: Fl_Menu_Button::popup was trying to access a previously deleted widget (itself). The delayed deleting mechanism in 'Fl::delete_widget' did not work in this case because the main loop is called before the callback returns. The fix implements a type of automatic pointer that will be cleared to NULL should the widget get deleted. This may not be a 'nice' solution, but it does fix the problem reliably. We could actually use this for all widget pointers and remove the delayed delete mechanism alltogether
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5037 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-04-27 21:40:47 +00:00
Matthias Melcher
cbbec03b5e fl_font(0, 0) as a first call in Xft would try to access a member in fl_fontsize, which was still set to NULL. This fix is untersted as I don't have a Unix machine here. Please verify this fix!
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5035 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-04-27 13:54:08 +00:00
Matthias Melcher
8ffe967089 STR 1161: Setting a new value in Fl_Input_ wil now actually move cursor to the end of the input field as documented
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5034 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-04-27 03:06:23 +00:00
Matthias Melcher
b72e1d6699 STR 1252: fixed missing includes in 'encoding' additions
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5030 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-04-25 18:28:56 +00:00
Matthias Melcher
0e750cdd65 Static destuctor must be public of course
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5015 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-04-20 12:40:42 +00:00
Michael R Sweet
9b0ac3c1c7 Update changelog to show all of Matthias's fixes... :)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5013 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-04-20 10:37:19 +00:00
Matthias Melcher
0b98e816d8 Fixed crash in Fl_Preferences if 2nd or 3rd argument in the 'path' constructor were NULL
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5007 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-04-20 04:34:18 +00:00
Matthias Melcher
a82e7879ce STR #1232: it was not possible to toggle a checkbox in Fl_Check_Browser by clicking the same box twice.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5006 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-04-20 03:53:41 +00:00
Matthias Melcher
49791adf78 Added '&255' to 'isspace(*p)' calls in order to avoid problems with signed int vs. unsigned char.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5005 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-04-20 03:21:32 +00:00
Matthias Melcher
afbe855296 STR #1231: moved clearing of resources out of Fl::run() into a static class destructor. Although this should work, I was unable to test this (no Windows machine at this time). Also, since the order in which static destructors are called is undefined, this code can still lead to a crash if the main window was alos statically allocate in global space. Suggestions welcome.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5004 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-04-20 03:11:47 +00:00
Matthias Melcher
9460fcc375 STR #1233: previous timer implementation on Mac OS X was eating up various resources. The new implementation will return Timer and UPP to the system, or just reprogram a timer for efficiency, where possible.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5003 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-04-20 03:02:37 +00:00
Matthias Melcher
9a2ca6b701 Fixed forgotten line from previouos commit
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4997 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-04-19 13:57:46 +00:00
Matthias Melcher
1df4a9fb4a STR #1195: It was not possible to enter a whole range of characters on Mac OS X, including umlauts, etc. . The changes in this patch should not only allow the FLTK way of composing characters, but also support the Mac way of composing including the dead-key preview.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4984 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-04-19 03:00:26 +00:00
Matthias Melcher
c9908d97e3 THIS FIX CONTAINS TWO MORE FILES THAT MUST BE COMPILED. I would
like to ask the maintainers of the build environments to please
add these files to the setup:

  src/fl_encoding_latin1.cxx
  src/fl_encoding_mac_roman.cxx

I ADDED SOME DOCUMENTATION THAT NEEDS TO BE FIXED. Beeing not a
native English speaker, I have a hard time writing documentation.
Would someone please update my babbeling in 
documentation/drawing.html? Thanks.

This commit fixes some very basic problems with OS X's code page in
preparation for the compose-character keyboard fix. It also fixes
issues with MS Windows and X11 not rendering the characters
in the Western (Latin-1) set between 0x80 and 0x9F. In the original
ISO font, they were unused, but are now assigned to international
characters like the Euro currency sign.

This patch also tries to fix one basic flaw with FLTK 1 and
font encoding. I will not put much more work into this because
FLTK 1.2 and FLTK 2 fix the problem entirely by using UTF-8
instead of 8-bit "C"-style strings.

All these changes are only meaningful for foreign language
users or users of special characters like the Euro, the Degree
or the Permille symbol. A short explanation follows.

Max OS X uses a different code page than X11 and Win32. This means
that all characters above 0x7f have an entirely different meaning.
If your source code contains international characters, your 
text will appear different if you change to another OS. This patch
provides two functions that convert text with international
characters from the character set of the source code into the
local character set. Two more functions are provided to convert
them back. The functions are fl_latin1_to_local (source is in Win32 
or X11), fl_mac_roman_to_local (source was written on OS X) and the 
corresponding fl_local_to_latin1 and fl_local_to_mac_roman, which
are very useful if yoou want to store strings with intl. characters
that will be moved between systems.

All this is assuming a "Western" code page as it is common in
the Americas and most of Europe. User of other languages will have 
to use FLTK 2.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4975 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-04-18 13:07:42 +00:00
Matthias Melcher
e682ec6339 Allowing characters between 0x80 and 0x9f to be enetered into Fl_Input_ derived widgets. Although these were not defined in the western ISO code page, they seem to be implemented in most X11 drivers now as MSWindows Latin-1. For example, the Euro symbol is at 0x80. It should now be possible to enter the Euro sign and other chars in this range correctly. Please verify.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4971 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2006-04-17 17:56:05 +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