Commit Graph

7380 Commits

Author SHA1 Message Date
Greg Ercolano
4bff1e5e98 Suggestion for cmake docs for building FLTK with Visual Studio (e.g. VS7 shown)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12213 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-03-30 01:52:39 +00:00
Albrecht Schlosser
680631b834 Fix dependencies.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12212 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-03-19 10:53:04 +00:00
Manolo Gouy
eb2df7e3b9 Account for translation also in non-Pango code section.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12211 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-03-17 21:06:55 +00:00
Manolo Gouy
b2afa612bf Create Fl_Xlib_Graphics_Driver::scale_and_render_pixmap() to draw depth-4 or scaled RGB images using Xrender.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12210 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-03-17 20:16:54 +00:00
Albrecht Schlosser
54596de1c3 [CMake] Fix Visual Studio header detection.
This commit fixes a CMake issue if CMake is invoked from a desktop icon
or the Windows menu, i.e. not within the correct environment to find all
required header files.

We recommend to run CMake from a "Developer Command Prompt for Visual Studio X",
but sometimes users click on their desktop icon and run CMake without the
correct context. In this case some header files in the Windows SDK's are not
found by CMake.

The solution is to issue a warning and "fix" the header detection by faking
that the headers were found, because they are always available in Visual
Studio. The affected headers <locale.h> and <GL/glu.h> were set to "found"
in the bundles IDE's in FLTK 1.3 as well, so there should be no issue with
this fix.

It is also recommended by the CMake folks, i.e. they suggest not to search
for these special header files that are known to exist always.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12209 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-03-17 17:42:50 +00:00
Albrecht Schlosser
298692f55e Revert temporary fix (attempt) introduced in svn r11644.
The fix in src/Fl_Input.cxx in svn r11644 was an attempt to fix the
Visual Studio (Windows) build because CMake would sometimes not find
the correct header files, but this attempt opened a path where the
variable 'legal_fp_chars' was not initialized.

The (hopefully) correct fix will follow in my next commit...


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12208 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-03-17 17:32:00 +00:00
Albrecht Schlosser
cb90a53c86 Fix Linux build after removal of Fl_Translated_Xlib_Graphics_Driver.cxx
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12207 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-03-17 17:22:39 +00:00
Manolo Gouy
878cd0b0b3 The new Fl_Xlib_Graphics_Driver::draw_scaled() member function must also account for possible translation.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12206 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-03-17 16:56:06 +00:00
Manolo Gouy
367e567b7b Remove class Fl_Translated_Xlib_Graphics_Driver and move its processing to Fl_Xlib_Graphics_Driver.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12205 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-03-17 16:33:14 +00:00
Albrecht Schlosser
300e0b32a9 OpenGL documentation fixes (included header files).
Also reformatted very long lines, removed trailing spaces.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12204 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-03-17 16:05:26 +00:00
Albrecht Schlosser
83b5df04fb [CMake] Remove unused header test HAVE_GL_GL_H (GL/gl.h).
Note: the test for OpenGL works slightly different with CMake vs. configure.

The CMake (cache) variable HAVE_GL_GL_H was never used.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12203 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-03-17 15:59:07 +00:00
Albrecht Schlosser
21da3f3755 Flush output of examples/fltk-versions for Windows (MinGW).
MinGW wouldn't flush the output before closing the window.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12202 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-03-17 15:02:08 +00:00
Manolo Gouy
0648489b9a Fix the projective transformation matrix used for Xrender-based scaled image drawing.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12201 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-03-17 08:58:17 +00:00
Manolo Gouy
bbbf91a4b5 Add scaled image drawing to the X11 platform using Xrender.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12200 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-03-16 21:26:12 +00:00
Manolo Gouy
e92cea2414 Make image-related member functions of class Fl_Graphics_Driver protected, as in FLTK 1.3.x
This helps ensure they are not part of the public API.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12199 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-03-16 12:47:49 +00:00
Manolo Gouy
16b3326629 Give platform-independent default implementation to Fl_System_Driver::gettime()
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12198 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-03-14 17:51:20 +00:00
Albrecht Schlosser
b9b4d85379 Fix more svn properties.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12197 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-03-13 23:51:33 +00:00
Albrecht Schlosser
3b73dece7b Set missing svn properties.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12196 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-03-13 23:31:38 +00:00
Albrecht Schlosser
0ae21376f1 Fix include file case (patch from Haiku port, thanks).
Ref.: https://github.com/mmuman/fltk-test-only.git,
commit 59c3cfbdf0412fb30f8312ed9ddd96f5affd2f0a by François Revol.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12195 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-03-13 23:06:08 +00:00
Albrecht Schlosser
2b47a115e1 Remove superfluous semicolon.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12194 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-03-12 21:33:33 +00:00
Albrecht Schlosser
3311119335 Fix svn attributes of *.c, *.cxx, *.cmake and others.
- set svn:keywords Id
- set svn:eol-style native


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12193 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-03-12 15:12:35 +00:00
Albrecht Schlosser
a1d555bd80 Separated Fl_Input_Choice.H and Fl_Input_Choice.cxx (STR #2750).
As proposed in STR #2750 and #2752: only status quo, i.e.:

  - no new method Fl_Input_Choice::maximum_size(int) (STR #2750 and #2752)
  - no handling of FL_Down key to open menu (STR #2752)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12192 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-03-11 23:26:32 +00:00
Albrecht Schlosser
5544404f7a Enable Up/Down keys in Fl_Spinner if input has focus (STR #2989).
Previously Up/Down keys worked only if one of the buttons was pressed
before so that it had the focus.

test/valuators.fl: The second Fl_Spinner widget (FL_FLOAT_INPUT) now has
wrap mode disabled whereas the first one (FL_INT_INPUT) uses wrap mode
(default, compatible with FLTK 1.3.x and older).


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12191 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-03-10 21:47:08 +00:00
Albrecht Schlosser
b67ba50f14 New method Fl_Spinner::wrap(int) to set wrap mode at bounds (STR #3365).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12190 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-03-10 18:49:44 +00:00
Albrecht Schlosser
7123b78f3f Separated Fl_Spinner.H and Fl_Spinner.cxx (STR #2776).
Also removed deprecated (misspelled) method names mininum() and maxinum().


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12189 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-03-09 22:08:29 +00:00
Manolo Gouy
fdee9dbf5d Have all Fl_Clock objects in a single FLTK app tick approximately at the same time.
Before this change, clocks can tick at any point within a second, so 2 clocks 
can appear to disagree on the time they give (by less than a second).
To see that, run the clock test program, icons one of the clocks,
and uniconize it just before the other clock will tick.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12188 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-03-07 17:04:31 +00:00
Manolo Gouy
c37744cde9 Add to Fl_System_Driver support for measuring time with split second resolution.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12187 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-03-07 16:58:13 +00:00
Albrecht Schlosser
3c375f3977 Fix tab alignment.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12186 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-03-07 00:20:26 +00:00
Albrecht Schlosser
18bb55545e Fl_Tabs: improve tab label drawing (STR #3075, STR #3076).
New method Fl_Tabs::tab_align() supports icons in tabs (STR #3076).
This commit also enables drawing labels of Fl_Window children (STR #3075).

Setting tab_align(FL_IMAGE_NEXT_TO_TEXT) draws images (icons) in the tab
labels if the child has an image(). Currently this draws the image() even
if the child is deactived (so it should presumably draw the deimage()).

Todo: Label measurement and Fl_Windows as children still need fixups.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12185 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-03-06 16:54:33 +00:00
Albrecht Schlosser
168979e6fb Simplify Fl_Tabs label drawing code (remove code duplication).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12184 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-03-05 14:52:10 +00:00
Albrecht Schlosser
843183478b Fix tab group positions.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12183 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-03-05 14:43:03 +00:00
Albrecht Schlosser
a804cbf366 Label alignment documentation clarifications.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12182 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-03-05 11:27:30 +00:00
Albrecht Schlosser
a60f99d4a1 Improve label alignment docs and border case implementations.
Make clear that some alignment bit combinations are "illegal" and yield
undefined behavior that can be changed without notice.

Fix label alignment in some border cases where illegal bit combinations like
FL_ALIGN_LEFT and FL_ALIGN_RIGHT or FL_ALIGN_TOP and FL_ALIGN_BOTTOM are
both set, respectively.

Todo: There appears to be inconsistent handling WRT these "illegal" cases,
for instance with inside labels as opposed to outside labels, such that
the behavior seems to be unpredictable. See test/label.cxx.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12181 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-02-27 17:00:41 +00:00
Albrecht Schlosser
2d18660f5c Fix typo (case) in include file name.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12180 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-02-25 19:31:36 +00:00
Manolo Gouy
aa917d709c Avoid potential crash occurring after calling win->show(0,0)
See [fltk.general] Drawing to Fl_Offscreen received signal SIGSEGV, Segmentation fault.
that is unrelated to Fl_Offscreen but caused by calling win->show(0,0).

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12179 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-02-22 11:33:12 +00:00
Manolo Gouy
393e481756 Mac OS: remove unused members variables from platform-specific struct Fl_Window_Driver::shape_data_type
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12178 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-02-20 12:57:40 +00:00
Pierre Ossman
cebc3d71be Pre-multiply alpha on cursors on X11, as required by XRender.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12177 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-02-20 12:40:50 +00:00
Manolo Gouy
a2f22358cd Fix line wrap at word end when string widths are true double values (non integer).
Useful for rescaling that creates non-integer string widths.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12176 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-02-19 15:49:48 +00:00
Manolo Gouy
3ce40f3faf Reset offscreen surface when the window is hidden.
This is necessary for compatibility with rescaling, so line widths are also rescaled.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12175 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-02-19 15:42:31 +00:00
Manolo Gouy
9c6add4943 Fix typo
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12174 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-02-19 15:37:46 +00:00
Albrecht Schlosser
66cdcfcd1b Fluid: Fix platform-specific build system (CMake + configure).
Don't compile "empty" file (avoid warning: empty translation unit).
Add '-u' (update) command switch to 'make rebuild'.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12173 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-02-15 20:28:13 +00:00
Albrecht Schlosser
1e5826e84b Add radio buttons to unittests_schemes in 4th tab.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12172 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-02-11 16:39:19 +00:00
Albrecht Schlosser
16774ddc4e Rename test/help demo program to test/help_dialog.
This change avoids a name conflict with CMake's auto-generated target 'help'
for "Unix Makefiles", "Ninja", and supposedly other generators as well.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12171 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-02-08 02:06:52 +00:00
Albrecht Schlosser
759d2f1c99 Fix line number alignment in Fl_Text_Display/Editor (STR #3363).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12170 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-02-04 21:56:38 +00:00
Manolo Gouy
cbc5a4842d Incorporate the code of function handleUpdateEvent() in the unique code section which calls it.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12169 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-02-03 13:30:36 +00:00
Albrecht Schlosser
a21f16486a Fl_Text_Display documentation updates.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12168 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-02-01 18:36:23 +00:00
Manolo Gouy
e7356529bb Allow ESC to close window and don't transmit CTRL character to fl_draw()
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12167 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-01-26 08:13:19 +00:00
Manolo Gouy
782d34fc8f MacOS: reduce the memory size of class gl_texture_fifo managing GL textures to draw strings under GL.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12166 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-01-24 12:53:33 +00:00
Manolo Gouy
c8fc8cc241 Allow resizable Fl_Gl_Window drawn using the Fl_OpenGL_Graphics_Driver
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12165 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-01-20 17:18:38 +00:00
Manolo Gouy
898d2580d3 Remove USE_OksiD_style_GL_font_selection preprocessor variable because it is equivalent to !USE_XFT
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12164 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-01-19 09:38:12 +00:00