• Andrew Hodgkinson's avatar
    As warned in the last log, pretty much all event codes and component IDs have... · e6b771f8
    Andrew Hodgkinson authored
    As warned in the last log, pretty much all event codes and component IDs have now changed along with many of the names, to provide a consistent name and numberspace for events and components. This also minimises number clashes (e.g. as was, the Save File origin when opened from a
    
    Hotlist menu with an already-used component ID). To get full details on
    this, please carefully read through TBEvents.h.
    
    Res files, Sprites files and Messages files have been updated again both
    due to the above, and routine additions (e.g. message support for a few
    Hotlist bits and pieces). !Run[D] files updated for FTP 0.11 and
    HTTP 0.36.
    
    In the Makefile, the Customer objects list was missing Save - must have
    moved something when I should've copied it, when adding in SaveFile or
    SaveObject in all probability. Now fixed. Couple of other bits and bobs
    fixed in the build environment (e.g. stuff saying !Argo instead of
    !Customer). Oh, and I've altered the MakeFile copy options again to the
    best compromise I can come up with. Newer is turned on for everything
    except !Run[D] and !RunImage, since both of those change between debug
    builds - otherwise if you'd built debug and non-debug versions, it was
    not possible to switch between them - one version would have the newer
    timestamp and thus never get overwritten.
    
    The default hotlist has had a few items added - that'll be about the end
    of it, I think; there's more than enough stuff in there now.
    
    Saving of the hotlist from the document menu and of URI files,
    directories and selections from the hotlist menu tree is now implemented
    - this new save system rocks... Oh, and you can save all images and
    backgrounds as sprites.
    
    Saving of items with Shift+Click to other applications directly now
    works, and is robust. Unique Scrap filenames are used, with data load
    bounces (e.g. if some pra - er, person quits the app they're sending
    to) working correctly - that is, give an error, keep the file, rename
    it to something safe, and open the directory it lies in. As opposed
    to normal app-to-app bounces, where the scrap file is deleted (see
    PRM 3-254). This means you can now look at README files in FTP
    sites, say, without using a disc intermediate. Or you can send pictures
    straight to ChangeFSI, fetch HTML links into editors, and so-on, and
    so-on - it's all very funky. Known problems include the ambiguous
    'invalid component ID' instead of 'file open' for *normal* (straight to
    disc) shift+click saves, and I think I'll introduce a unique name
    guarantee of some sort to stop 'file open' in the first place. Odd
    that the really tricky part (app-to-app) should be least likely to
    suffer from this!
    e6b771f8
Printing 4.42 KB
/* Copyright 1997 Acorn Computers Ltd
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/***************************************************/
/* File   : Printing.h                             */
/*                                                 */
/* Purpose: Printing functions for the browser.    */
/*                                                 */
/*          This source is fairly closely tied to  */
/*          PrintStyle.h, as the Print dialogue    */
/*          can open and close the Print Style     */
/*          dialogue.                              */
/*                                                 */
/* Author : A.D.Hodgkinson                         */
/*                                                 */
/* History: 27-Jan-97: Created.                    */
/*          25-Aug-97: Definitions imported from   */
/*                     TBEvents.h.                 */
/***************************************************/

/* Print dialogue component IDs */

#define PStartWhole                     0x02001
#define PStartVisible                   0x02002
#define PEndWhole                       0x02003
#define PEndVisible                     0x02004
#define PEndMany                        0x02005
#define PEndManyNum                     0x02006
#define PEndManyLabel                   0x02007
#define PReformatToFit                  0x02008
#define POriUpright                     0x02009
#define POriSideways                    0x0200a
#define PCopiesNum                      0x0200b
#define PCopiesLabel                    0x0200c
#define POpenPrintStyle                 0x0200d
#define PGroupFrameOne                  0x0200e
#define PGroupFrameTwo                  0x0200f

/* Print dialogue event codes */

#define EPEnableReformat                0x021ff /* When activating radios that may enable or disable the */
                                                /* Reformat option in the Print dialogue box.            */
#define EPCancelPrint                   0x021fe
#define EPStartPrint                    0x021fd

/* Message definitions */

#define Browser_Message_PrintFile       0x80140
#define Browser_Message_WillPrint       0x80141
#define Browser_Message_PrintSave       0x80142
#define Browser_Message_PrintError      0x80144
#define Browser_Message_PrintTypeOdd    0x80145
#define Browser_Message_PrintTypeKnown  0x80146

/* Printer driver features */

#define Browser_Printer_Colour             1 << 0
#define Browser_Printer_LimitedColours     1 << 1
#define Browser_Printer_DiscreteColours    1 << 2
#define Browser_Printer_OutlinesOnly       1 << 8
#define Browser_Printer_ThinLinesOnly      1 << 9
#define Browser_Printer_NoOverwriting      1 << 10
#define Browser_Printer_TransformsSprites  1 << 11
#define Browser_Printer_TransformsFonts    1 << 12
#define Browser_Printer_PreScansRectangles 1 << 13
#define Browser_Printer_ScreenDumps        1 << 24
#define Browser_Printer_TransformsPages    1 << 25
#define Browser_Printer_InsertIllustration 1 << 26
#define Browser_Printer_MiscOp             1 << 27
#define Browser_Printer_SetDriver          1 << 28
#define Browser_Printer_DeclareFont        1 << 29

/* Miscellaneous definitions */

/* If a line is more than a (1/PrintSplitFraction)th */
/* of the page height, it will always be forced to   */
/* split over the page boundary.                     */

#define PrintSplitFraction 4

/* Function prototypes */

_kernel_oserror * print_open_for             (browser_data * b, ObjectId parent);

int               print_set_defaults         (void);

int               print_to_be_shown          (int eventcode, ToolboxEvent * event, IdBlock * idb, void * handle);
_kernel_oserror * print_close                (ObjectId ancestor, int do_not_close);

void              print_print                (const char * path);
void              print_abort_print          (void);

void              print_return_dialogue_info (ObjectId * self, ObjectId * window, ObjectId * ancestor, browser_data ** ancestor_b);