Commit graph

15 commits

Author SHA1 Message Date
John Popplewell
b878e9646e Added code to hook low-level keyboard events on 2K/XP/Vista.
The hook is only installed if in full-screen mode.
Filters out the left and right Windows keys to avoid accidentally dropping
out of full-screen mode.
If Tux Paint is deliberately switched to the background (using ALT-TAB, say)
the Windows keys function as normal until Tux Paint is the active
application again.
2008-07-10 20:57:25 +00:00
John Popplewell
62279d117a Show print configuration dialog even when in fullscreen mode.
If no 'print.cfg' file is found, always shows the print configuration dialog.
Clicking 'Cancel' on the print configuration dialog cancels the print!
Removed messy global PRINTDLG structure.
2007-11-11 23:22:24 +00:00
John Popplewell
e94f8afb63 Fixes the scaling problem when printing. The image is scaled to fit whilst
preserving the aspect ratio. It is centered horizontally and vertically
aligned at the top of the page.

On Win9x/ME I'm getting a slight problem with the left and right margins
when printing to our samba/cups shared printer which is making the Epson
Stylus Color 860 emulate a post-script printer (I think).

If I print to a file and use the HP LaserJet 6P/6MP PostScript driver it
looks OK. I'm hoping it is a driver problem on my system.
2007-08-12 01:02:44 +00:00
John Popplewell
9036c8b4ea Fix for printing bug 1748705. 2007-07-30 00:28:57 +00:00
John Popplewell
a85bc639be WIN32 only:
Change use_print_config (printcfg) default to be yes.
Create the 'lockfile.dat' in the users local temporary directory, usually:
'C:\Documents and Settings\<USER NAME>\Local Settings\Temp\'. This allows
the use of a shared 'savedir' without messing up the lockfile.
2007-04-28 02:52:11 +00:00
William Kendrick
7716a05281 Ran source code through "indent -nbfda -npcs -npsl -bli0". 2006-08-27 21:00:52 +00:00
John Popplewell
2982961f38 Various fixes for win32, mostly as a result of the splits. 2006-02-20 04:12:27 +00:00
William Kendrick
e964eb17a0 More splits from "tuxpaint.c":
+ "debug.h": Defines whether debugging printf() calls should be enabled.
  + "dirwalk.c/h": Callback functions for recursive directory traversal.
  + "fonts.c/h": Font loading/grouping/discarding variables and functions.
  + "get_fname.c/h": Functions for constructing preferred file paths.
2006-02-19 08:02:39 +00:00
John Popplewell
304f49672b Added GetSystemFontDir() and amended WIN32 code so that the system fonts
option work correctly on Windows.
Modified the text gadget so that it correctly handles the 16-bit unicode
characters that SDL sends. The text buffer is held internally as an array
of wchar_t, and makes uses of various wide-character functions.
It is converted back into 16-bit unicode characters to satisfy SDL_ttf.
Tested on Windows and Linux.
2006-01-11 23:23:34 +00:00
Mark K. Kim
8a896438a1 CVS Id tags added to several files for easier version tracking. 2005-11-27 08:09:37 +00:00
John Popplewell
d9f70cfde6 Added GetDefaultSaveDir(suffix) which fetches the default "Application
Data" path for the current user from the registry, appends the suffix,
creates the subdirectory if it doesn't exist, then returns a string from
the heap.
This path is the new default "savedir" location on Windows. Tested on
98/2K/XP.
Changed code that sets the pwd to the directory containing the executable.
Originally for BEOS only, now working and enabled for Windows also.
2005-07-19 04:44:31 +00:00
John Popplewell
778bd2f897 Added support for building on a Windows system using MinGW/MSYS.
After building and installing all the dependencies I used these commands,
in MSYS, to build, install and run:

    export set CPATH=/usr/local/include
    export set LIBRARY_PATH=/usr/local/bin:/usr/local/lib
    make win32
    make install-win32
    tuxpaint
2005-02-26 02:26:40 +00:00
William Kendrick
8dee572c9d Tacked GPL into comments. More hq4x tweaks. 2003-12-21 00:50:52 +00:00
William Kendrick
1e60f10112 Windows98 printing fixes from October. Also, added dummy Makefile in src/ 2003-12-19 19:46:49 +00:00
William Kendrick
365fe3e5b6 Initial revision 2003-02-24 01:46:52 +00:00