Changeset 153


Ignore:
Timestamp:
Nov 11, 2006, 9:39:04 AM (15 years ago)
Author:
Eugene Romanenko
Message:

Writes into EA thumbnail of first page of document

Location:
trunk/Lucide
Files:
1 added
22 edited

Legend:

Unmodified
Added
Removed
  • trunk/Lucide/BIN/Lucide.lng

    r136 r153  
    6969MSGS_FILE_LOAD_ERROR=File load error!
    7070MSGS_LOADING_DOCUMENT=Loading document, please wait...
     71MSGS_CREATING_THUMBNAIL=Creating thumbnail for document, please wait...
    7172MSGS_WARNING=Warning!
    7273MSGS_OVERWRITE_FILE=File already exist. Overwrite?
  • trunk/Lucide/SOURCE/gui/lucide.cpp

    r152 r153  
    109109bool         Lucide::docLoaded                     = false;;
    110110char        *Lucide::loadError                     = NULL;
     111void        *Lucide::thumbnailData                 = NULL;
     112int          Lucide::thumbnailDataLen              = 0;
     113
    111114
    112115HMODULE _hmod = NULLHANDLE;
     
    337340
    338341
     342void Lucide::closeDocument()
     343{
     344    docViewer->close();
     345    delete doc;
     346    doc = NULL;
     347    WinSetWindowText( hWndFrame, title );
     348
     349    if ( thumbnailData != NULL ) {
     350        writeThumbnail( docFullName );
     351        delete thumbnailData;
     352        thumbnailData = NULL;
     353        thumbnailDataLen = 0;
     354    }
     355}
     356
    339357void Lucide::loadthread( void *p )
    340358{
     
    343361
    344362    docLoaded = doc->loadFile( ev, docFullName, NULL, &loadError );
     363    if ( docLoaded ) {
     364        if ( doc->isCreateFileThumbnail( ev ) && isThumbNeeded( docFullName ) ) {
     365            loadProgressDlg->setText( getLocalizedString( MSGS_CREATING_THUMBNAIL ).c_str() );
     366            createThumbnail( doc );
     367        }
     368    }
    345369    loadProgressDlg->hide();
    346370
     
    370394        else
    371395        {
    372             docViewer->close();
    373             delete doc;
    374             doc = NULL;
    375             WinSetWindowText( hWndFrame, title );
     396            closeDocument();
    376397
    377398            doc = pluginMan->createDocumentForExt( ext + 1, false );
     
    953974    WinDestroyWindow( hWndFrame );
    954975
     976    Lucide::closeDocument();
    955977    delete docViewer;
    956978    delete indexWin;
    957     // must be freed _before_ plugin manager
    958     delete doc;
     979
    959980    // must be freed _after_ document
    960981    delete pluginMan;
  • trunk/Lucide/SOURCE/gui/lucide.h

    r152 r153  
    7171        static void setZoomChecks( SHORT cmd, SHORT cbind, double zoom );
    7272        static void loadthread( void *p );
     73       
     74        static void *thumbnailData;
     75        static int thumbnailDataLen;
    7376
    7477    public:
     
    7982       
    8083        static void openDocument();
     84        static void closeDocument();
    8185        static void loadDocument( const char *fn );
    8286        static void saveDocumentAs();
     
    96100        static void cmdMinimize();
    97101        static void cmdSwitchToFullscreen();
     102        static void createThumbnail( LuDocument *_doc );
     103        static bool isThumbNeeded( const char *fn );
     104        static void writeThumbnail( const char *fn );
    98105};
    99106
  • trunk/Lucide/SOURCE/gui/luutils.cpp

    r133 r153  
    4242#include <string.h>
    4343#include <strstrea.h>
     44#include <stdlib.h>
    4445#include <string>
    4546
     
    507508    return z;
    508509}
     510
     511char *getTmpDir( char *buf )
     512{
     513    char *tmpenv = getenv( "TMP" );
     514    strcpy( buf, ( tmpenv == NULL ) ? ".\\" : tmpenv );
     515    if ( buf[ strlen( buf ) - 1 ] != '\\' ) {
     516        strcat( buf, "\\" );
     517    }
     518    return buf;
     519}
  • trunk/Lucide/SOURCE/gui/luutils.h

    r127 r153  
    7272
    7373char *newstrdup( const char *s );
     74char *getTmpDir( char *buf );
    7475
    7576// Internationalization/Localization
  • trunk/Lucide/SOURCE/gui/makefile

    r152 r153  
    11.autodepend
    22
    3 TEST=0
     3TEST=1
    44VERSION=Beta 5
    55
     
    3737       fontsInfoDlg.obj docInfoDlg.obj findDlg.obj progressDlg.obj \
    3838       aboutDlg.obj settingsDlg.obj lusettings.obj printDlg.obj \
    39        print.obj stbrowser.obj pipemon.obj
     39       print.obj stbrowser.obj pipemon.obj lucidethumbs.obj
    4040
    4141lucide.dll: $(OBJS) lucide.res
     
    7070file $(OBJDIR)\stbrowser.obj
    7171file $(OBJDIR)\pipemon.obj
     72file $(OBJDIR)\lucidethumbs.obj
    7273name $(EXEDIR)\lucide
    7374lib ..\plugins\ludoc\ludoc
     
    125126messages.obj:       messages.cpp
    126127pipemon.obj:        pipemon.cpp
     128lucidethumbs.obj:   lucidethumbs.cpp
    127129linklab.obj:        linklab.c
    128130wwbtn.obj:          wwbtn.c
  • trunk/Lucide/SOURCE/gui/messages.cpp

    r129 r153  
    5555
    5656// Lucide messages
    57 const char *MSGS_MAIN_WIN_TITLE   = "MSGS_MAIN_WIN_TITLE";
    58 const char *MSGS_NO_SUIT_PLUG     = "MSGS_NO_SUIT_PLUG";
    59 const char *MSGS_FILE_LOAD_ERROR  = "MSGS_FILE_LOAD_ERROR";
    60 const char *MSGS_LOADING_DOCUMENT = "MSGS_LOADING_DOCUMENT";
    61 const char *MSGS_WARNING          = "MSGS_WARNING";
    62 const char *MSGS_OVERWRITE_FILE   = "MSGS_OVERWRITE_FILE";
    63 const char *MSGS_FILE_SAVE_ERROR  = "MSGS_FILE_SAVE_ERROR";
    64 const char *MSGS_PAGE             = "MSGS_PAGE";
     57const char *MSGS_MAIN_WIN_TITLE     = "MSGS_MAIN_WIN_TITLE";
     58const char *MSGS_NO_SUIT_PLUG       = "MSGS_NO_SUIT_PLUG";
     59const char *MSGS_FILE_LOAD_ERROR    = "MSGS_FILE_LOAD_ERROR";
     60const char *MSGS_LOADING_DOCUMENT   = "MSGS_LOADING_DOCUMENT";
     61const char *MSGS_CREATING_THUMBNAIL = "MSGS_CREATING_THUMBNAIL";
     62const char *MSGS_WARNING            = "MSGS_WARNING";
     63const char *MSGS_OVERWRITE_FILE     = "MSGS_OVERWRITE_FILE";
     64const char *MSGS_FILE_SAVE_ERROR    = "MSGS_FILE_SAVE_ERROR";
     65const char *MSGS_PAGE               = "MSGS_PAGE";
    6566const char *MSGS_ERROR_STARTING_BROWSER = "MSGS_ERROR_STARTING_BROWSER";
    6667
  • trunk/Lucide/SOURCE/gui/messages.h

    r129 r153  
    5959extern const char *MSGS_FILE_LOAD_ERROR;
    6060extern const char *MSGS_LOADING_DOCUMENT;
     61extern const char *MSGS_CREATING_THUMBNAIL;
    6162extern const char *MSGS_WARNING;
    6263extern const char *MSGS_OVERWRITE_FILE;
  • trunk/Lucide/SOURCE/gui/print.cpp

    r123 r153  
    305305    double pheight = ( (double)( curForm.cy - mTop - mBottom ) / 25.4 ) * 72.0;
    306306
    307     char tmpps[ CCHMAXPATHCOMP ] = "";
    308     char *tmpenv = getenv( "TMP" );
    309     strcpy( tmpps, ( tmpenv == NULL ) ? ".\\" : tmpenv );
    310     if ( tmpps[ strlen( tmpps ) - 1 ] != '\\' ) {
    311         strcat( tmpps, "\\" );
    312     }
     307    char tmpps[ CCHMAXPATH ] = "";
     308    getTmpDir( tmpps );
    313309    strcat( tmpps, "TMPLUCID.PS" );
    314310
  • trunk/Lucide/SOURCE/plugins/ludjvu/ludjvu.cpp

    r144 r153  
    390390
    391391
     392SOM_Scope boolean  SOMLINK isCreateFileThumbnail(LuDjvuDocument *somSelf,
     393                                                  Environment *ev)
     394{
     395    return TRUE;
     396}
     397
     398
    392399SOM_Scope void SOMLINK somDefaultInit(LuDjvuDocument *somSelf,
    393400                                      som3InitCtrl* ctrl)
  • trunk/Lucide/SOURCE/plugins/ludjvu/ludjvu.idl

    r95 r153  
    3333        exportToPostScript: override;
    3434        isFixedImage: override;
     35        isCreateFileThumbnail: override;
    3536
    3637        somDefaultInit: override, init;
  • trunk/Lucide/SOURCE/plugins/ludjvu/ludjvu.xh

    r123 r153  
    192192                boolean caseSensitive);
    193193typedef somTP_LuDjvuDocument_searchText *somTD_LuDjvuDocument_searchText;
     194typedef boolean   SOMLINK somTP_LuDjvuDocument_isCreateFileThumbnail(LuDjvuDocument *somSelf, Environment *ev);
     195typedef somTP_LuDjvuDocument_isCreateFileThumbnail *somTD_LuDjvuDocument_isCreateFileThumbnail;
    194196typedef void   SOMLINK somTP_LuDjvuDocument_somDefaultInit(LuDjvuDocument *somSelf,
    195197                som3InitCtrl* ctrl);
     
    701703
    702704
     705/* method: isCreateFileThumbnail */
     706boolean   isCreateFileThumbnail(Environment *ev)
     707{
     708   return SOM_ResolveD(this,LuDjvuDocument,LuDocument,isCreateFileThumbnail)
     709        (this, ev);
     710}
     711
     712
    703713/* initializer method: somDefaultInit */
    704714void   somDefaultInit(som3InitCtrl* ctrl)
  • trunk/Lucide/SOURCE/plugins/ludjvu/ludjvu.xih

    r123 r153  
    110110  #define _getThumbnail somSelf->getThumbnail
    111111  #define _searchText somSelf->searchText
     112  #define _isCreateFileThumbnail somSelf->isCreateFileThumbnail
    112113  #define _somDefaultInit somSelf->somDefaultInit
    113114  #define _somDestruct somSelf->somDestruct
     
    153154  #define _exportToPostScript somSelf->exportToPostScript
    154155  #define _isFixedImage somSelf->isFixedImage
     156  #define _isCreateFileThumbnail somSelf->isCreateFileThumbnail
    155157  #define _somDefaultInit somSelf->somDefaultInit
    156158  #define _somDestruct somSelf->somDestruct
     
    729731#define LuDjvuDocument_parents_isFixedImage(somSelf,ev) (\
    730732   LuDjvuDocument_parent_LuDocument_isFixedImage(somSelf,ev))
     733
     734/*
     735 * Overridden method: isCreateFileThumbnail
     736 */
     737SOM_Scope boolean  SOMLINK isCreateFileThumbnail(LuDjvuDocument *somSelf, Environment *ev);
     738static char *somMN_LuDjvuDocumentisCreateFileThumbnail = "LuDocument::isCreateFileThumbnail";
     739static somId somId_LuDjvuDocumentisCreateFileThumbnail = &somMN_LuDjvuDocumentisCreateFileThumbnail;
     740#ifdef somId_isCreateFileThumbnail
     741#undef somId_isCreateFileThumbnail
     742#else
     743#define somId_isCreateFileThumbnail somId_LuDjvuDocumentisCreateFileThumbnail
     744#endif
     745typedef boolean   SOMLINK somTP_xih_LuDjvuDocument_isCreateFileThumbnail(LuDjvuDocument *somSelf, Environment *ev);
     746typedef somTP_xih_LuDjvuDocument_isCreateFileThumbnail *somTD_xih_LuDjvuDocument_isCreateFileThumbnail;
     747/* define the parent method call macro */
     748static somMethodProc* LuDjvuDocument_parent_LuDocument_isCreateFileThumbnail_resolved;
     749#define LuDjvuDocument_parent_LuDocument_isCreateFileThumbnail(somSelf,ev) \
     750  ((( somTD_xih_LuDjvuDocument_isCreateFileThumbnail ) \
     751      LuDjvuDocument_parent_LuDocument_isCreateFileThumbnail_resolved) \
     752        (somSelf,ev))
     753/* define a variety of (possibly ambiguous) short forms */
     754#ifndef SOMGD_pmc_parent_isCreateFileThumbnail
     755  #ifdef parent_isCreateFileThumbnail
     756    #define SOMGD_pmc_parent_isCreateFileThumbnail
     757    #undef parent_isCreateFileThumbnail
     758  #else
     759#define parent_isCreateFileThumbnail LuDjvuDocument_parent_LuDocument_isCreateFileThumbnail
     760  #endif
     761#endif
     762#ifndef SOMGD_pmc_parent_LuDocument_isCreateFileThumbnail
     763  #ifdef parent_LuDocument_isCreateFileThumbnail
     764    #define SOMGD_pmc_parent_LuDocument_isCreateFileThumbnail
     765    #undef parent_LuDocument_isCreateFileThumbnail
     766  #else
     767    #define parent_LuDocument_isCreateFileThumbnail LuDjvuDocument_parent_LuDocument_isCreateFileThumbnail
     768  #endif
     769#endif
     770#define LuDjvuDocument_parents_isCreateFileThumbnail(somSelf,ev) (\
     771   LuDjvuDocument_parent_LuDocument_isCreateFileThumbnail(somSelf,ev))
    731772
    732773/*
     
    792833    {    &somId_LuDjvuDocumentisFixedImage,
    793834         (somMethodProc *) isFixedImage  },
     835    {    &somId_LuDjvuDocumentisCreateFileThumbnail,
     836         (somMethodProc *) isCreateFileThumbnail  },
    794837    {    &somId_LuDjvuDocumentsomDefaultInit,
    795838         (somMethodProc *) somDefaultInit  },
     
    810853
    811854static somStaticClassInfo LuDjvuDocumentSCI = {
    812     4, 0, 15, 0, 0, 0, /* layout version 4 */
     855    4, 0, 16, 0, 0, 0, /* layout version 4 */
    813856    LuDjvuDocument_MajorVersion, LuDjvuDocument_MinorVersion,
    814857    sizeof(LuDjvuDocumentData), LuDjvuDocument_MaxNoMethods, 1,
     
    856899    LuDocumentNewClass(LuDocument_MajorVersion,LuDocument_MinorVersion);        /* static reference */
    857900    result = (SOMClass*)((void*)somBuildClass(0xFFFFFFFF,&LuDjvuDocumentSCI, somtmajorVersion, somtminorVersion));
     901    LuDjvuDocument_parent_LuDocument_isCreateFileThumbnail_resolved =
     902        somParentNumResolve(LuDjvuDocumentCClassData.parentMtab, 1, LuDocumentClassData.isCreateFileThumbnail);
    858903    LuDjvuDocument_parent_LuDocument_isFixedImage_resolved =
    859904        somParentNumResolve(LuDjvuDocumentCClassData.parentMtab, 1, LuDocumentClassData.isFixedImage);
  • trunk/Lucide/SOURCE/plugins/ludoc/ludoc.cpp

    r126 r153  
    430430
    431431
     432SOM_Scope boolean  SOMLINK isCreateFileThumbnail(LuDocument *somSelf,
     433                                                  Environment *ev)
     434{
     435    return FALSE;
     436}
     437
     438
    432439SOM_Scope void SOMLINK somDefaultInit(LuDocument *somSelf, som3InitCtrl* ctrl)
    433440{
  • trunk/Lucide/SOURCE/plugins/ludoc/ludoc.idl

    r126 r153  
    2323    typedef sequence <LuLinkMapping> LuLinkMapSequence;
    2424    typedef sequence <LuFontInfo> LuFontInfoSequence;
    25         typedef somMToken asynchCallbackFn;
     25    typedef somMToken asynchCallbackFn;
    2626
    2727    /**
     
    6666    /**
    6767     * isFixedImage
    68      * 
     68     *
    6969     * Determines if upscaling doesn't improve image quality.
    7070     * Must return TRUE for fixed-size images/bitmaps.
     
    158158     *       it used during printing.
    159159     **/
    160     void renderPageToPixbufAsynch( in long pagenum, in long src_x, 
    161                            in long src_y, in long src_width, in long src_height,
    162                    in double scale, in long rotation, in LuPixbuf pixbuf, 
    163                    in asynchCallbackFn fnd, in asynchCallbackFn fna, 
     160    void renderPageToPixbufAsynch( in long pagenum, in long src_x,
     161                   in long src_y, in long src_width, in long src_height,
     162                   in double scale, in long rotation, in LuPixbuf pixbuf,
     163                   in asynchCallbackFn fnd, in asynchCallbackFn fna,
    164164                   in somToken fndata );
    165165
     
    173173     *               presentation space using renderPageToPS().
    174174     *
    175      * Note: You may not implement renderPageToPixbuf() if 
     175     * Note: You may not implement renderPageToPixbuf() if
    176176     *       isRenderIntoPS() is TRUE.
    177177     *
     
    179179     **/
    180180    boolean isRenderIntoPS();
    181    
    182    
     181
     182
    183183    /**
    184184     * renderPageToPS
     
    202202    void renderPageToPS( in long pagenum, in long src_x, in long src_y,
    203203                   in long src_width, in long src_height,
    204                    in double scale, in long rotation, 
     204                   in double scale, in long rotation,
    205205                   in unsigned long hps, in somMToken rect );
    206206
     
    212212     *
    213213     * Return value: TRUE if document contains text, which
    214      *               can be selected by user, searched, etc, 
     214     *               can be selected by user, searched, etc,
    215215     *               FALSE otherwise.
    216216     * Default return value: FALSE
     
    349349     * brkExport: pointer to boolean variable which must be checked
    350350     *            during generating postscript, if it's TRUE - interrupt
    351      *            generation process. 
     351     *            generation process.
    352352     *
    353353     * Create a new postscript file and render document to.
     
    356356     * Default return value: FALSE
    357357     **/
    358     boolean exportToPostScript( in string filename, 
     358    boolean exportToPostScript( in string filename,
    359359                     in long first_page, in long last_page,
    360360                     in double width, in double height,
     
    514514
    515515
     516    /**
     517     * isCreateFileThumbnail
     518     *
     519     * If this method returns TRUE, then GUI may create thumbnail for
     520     * this file and write it into EAs.
     521     *
     522     * Default return value: FALSE
     523     **/
     524    boolean isCreateFileThumbnail();
     525
     526
    516527#ifdef __SOMIDL__
    517528
    518529    implementation
    519530    {
    520         releaseorder: loadFile, getBpp, isScalable, isRotable, 
    521                       getPageCount, getPageSize, renderPageToPixbuf, 
     531        releaseorder: loadFile, getBpp, isScalable, isRotable,
     532                      getPageCount, getPageSize, renderPageToPixbuf,
    522533                      isAsynchRenderingSupported, renderPageToPixbufAsynch,
    523534                      isRenderIntoPS, renderPageToPS,
    524535                      isHaveText, getSelectionRectangles, freeRectangles,
    525536                      getText, isHaveLinks, getLinkMapping, freeLinkMapping,
    526                       isSaveable, saveAs, 
     537                      isSaveable, saveAs,
    527538                      isPostScriptExportable, exportToPostScript,
    528539                      isHaveFontInfo, getFontInfo, freeFontInfo,
    529540                      isHaveIndex, getIndex, getDocumentInfo,
    530541                      freeDocumentInfo, getThumbnailSize, getThumbnail,
    531                       searchText, isFixedImage;
     542                      searchText, isFixedImage, isCreateFileThumbnail;
    532543
    533544
  • trunk/Lucide/SOURCE/plugins/ludoc/ludoc.xh

    r123 r153  
    175175        somMToken searchText;
    176176        somMToken isFixedImage;
     177        somMToken isCreateFileThumbnail;
    177178} SOMDLINK LuDocumentClassData;
    178179#define _LuDocument LuDocumentClassData.classObject
     
    313314                boolean caseSensitive);
    314315typedef somTP_LuDocument_searchText *somTD_LuDocument_searchText;
     316typedef boolean   SOMLINK somTP_LuDocument_isCreateFileThumbnail(LuDocument *somSelf, Environment *ev);
     317typedef somTP_LuDocument_isCreateFileThumbnail *somTD_LuDocument_isCreateFileThumbnail;
    315318
    316319/*
     
    822825
    823826
     827/* method: isCreateFileThumbnail */
     828boolean   isCreateFileThumbnail(Environment *ev)
     829{
     830   return SOM_ResolveD(this,LuDocument,LuDocument,isCreateFileThumbnail)
     831        (this, ev);
     832}
     833
     834
    824835/*
    825836 * Reintroduce inherited methods
  • trunk/Lucide/SOURCE/plugins/ludoc/ludoc.xih

    r123 r153  
    3232#endif
    3333
    34 #define LuDocument_MaxNoMethods 33
     34#define LuDocument_MaxNoMethods 34
    3535
    3636/*
     
    122122  #define _getThumbnail somSelf->getThumbnail
    123123  #define _searchText somSelf->searchText
     124  #define _isCreateFileThumbnail somSelf->isCreateFileThumbnail
    124125  #define _somDefaultInit somSelf->somDefaultInit
    125126#endif
     
    753754
    754755/*
     756 * New Method: isCreateFileThumbnail
     757 */
     758SOM_Scope boolean  SOMLINK isCreateFileThumbnail(LuDocument *somSelf, Environment *ev);
     759#ifndef somMN_isCreateFileThumbnail_defined
     760#define somMN_isCreateFileThumbnail_defined
     761static char *somMN_isCreateFileThumbnail = "isCreateFileThumbnail";
     762static somId somId_isCreateFileThumbnail = &somMN_isCreateFileThumbnail;
     763#endif  /* somMN_isCreateFileThumbnail_defined */
     764#ifndef somDS_isCreateFileThumbnail_defined
     765#define somDS_isCreateFileThumbnail_defined
     766static char *somDS_isCreateFileThumbnail = "::LuDocument::isCreateFileThumbnail";
     767static somId somDI_isCreateFileThumbnail = &somDS_isCreateFileThumbnail;
     768#endif  /* somDS_isCreateFileThumbnail_defined */
     769
     770static somMethodInfo isCreateFileThumbnailMethodInfo = {10, 8, 0};
     771
     772static somApRdInfo isCreateFileThumbnailStubs = {0, 0, &isCreateFileThumbnailMethodInfo};
     773
     774/*
    755775 * Overridden method: somDefaultInit
    756776 */
     
    10631083#else
    10641084         (somMethodProc *) ((void*) &searchTextStubs) },
     1085#endif
     1086    {    &LuDocumentClassData.isCreateFileThumbnail,
     1087         &somId_isCreateFileThumbnail,
     1088         &somDI_isCreateFileThumbnail,
     1089         (somMethodProc *) isCreateFileThumbnail,
     1090         (somMethodProc *)((void*)-1),
     1091#ifdef isCreateFileThumbnail_somApRdDefault
     1092         0},
     1093#else
     1094         (somMethodProc *) ((void*) &isCreateFileThumbnailStubs) },
    10651095#endif
    10661096};
     
    10971127
    10981128static somStaticClassInfo LuDocumentSCI = {
    1099     4, 29, 1, 0, 4, 0, /* layout version 4 */
     1129    4, 30, 1, 0, 4, 0, /* layout version 4 */
    11001130    LuDocument_MajorVersion, LuDocument_MinorVersion,
    11011131    0, LuDocument_MaxNoMethods, 1,
     
    11201150    0, /* number of SelectInheritedMethods */
    11211151    0, /* no SelectInheritedMethods */
    1122     33, /* number of classdata entries */
     1152    34, /* number of classdata entries */
    11231153    0, /* no list provided currently */
    11241154    0, /* number of migrated methods */
  • trunk/Lucide/SOURCE/plugins/lupoppler/lupoppler.cpp

    r144 r153  
    55 *     SOM incremental update: 2.24
    66 */
     7
    78
    89/*
     
    13121313
    13131314
     1315SOM_Scope boolean  SOMLINK isCreateFileThumbnail(LuPopplerDocument *somSelf,
     1316                                                  Environment *ev)
     1317{
     1318    return TRUE;
     1319}
     1320
     1321
    13141322SOM_Scope void SOMLINK somDefaultInit(LuPopplerDocument *somSelf,
    13151323                                      som3InitCtrl* ctrl)
  • trunk/Lucide/SOURCE/plugins/lupoppler/lupoppler.idl

    r95 r153  
    5151        searchText: override;
    5252        isFixedImage: override;
     53        isCreateFileThumbnail: override;
    5354       
    5455        somDefaultInit: override, init;
  • trunk/Lucide/SOURCE/plugins/lupoppler/lupoppler.xh

    r123 r153  
    192192                boolean caseSensitive);
    193193typedef somTP_LuPopplerDocument_searchText *somTD_LuPopplerDocument_searchText;
     194typedef boolean   SOMLINK somTP_LuPopplerDocument_isCreateFileThumbnail(LuPopplerDocument *somSelf, Environment *ev);
     195typedef somTP_LuPopplerDocument_isCreateFileThumbnail *somTD_LuPopplerDocument_isCreateFileThumbnail;
    194196typedef void   SOMLINK somTP_LuPopplerDocument_somDefaultInit(LuPopplerDocument *somSelf,
    195197                som3InitCtrl* ctrl);
     
    701703
    702704
     705/* method: isCreateFileThumbnail */
     706boolean   isCreateFileThumbnail(Environment *ev)
     707{
     708   return SOM_ResolveD(this,LuPopplerDocument,LuDocument,isCreateFileThumbnail)
     709        (this, ev);
     710}
     711
     712
    703713/* initializer method: somDefaultInit */
    704714void   somDefaultInit(som3InitCtrl* ctrl)
  • trunk/Lucide/SOURCE/plugins/lupoppler/lupoppler.xih

    r123 r153  
    110110  #define _getThumbnail somSelf->getThumbnail
    111111  #define _searchText somSelf->searchText
     112  #define _isCreateFileThumbnail somSelf->isCreateFileThumbnail
    112113  #define _somDefaultInit somSelf->somDefaultInit
    113114  #define _somDestruct somSelf->somDestruct
     
    167168  #define _searchText somSelf->searchText
    168169  #define _isFixedImage somSelf->isFixedImage
     170  #define _isCreateFileThumbnail somSelf->isCreateFileThumbnail
    169171  #define _somDefaultInit somSelf->somDefaultInit
    170172  #define _somDestruct somSelf->somDestruct
     
    13271329#define LuPopplerDocument_parents_isFixedImage(somSelf,ev) (\
    13281330   LuPopplerDocument_parent_LuDocument_isFixedImage(somSelf,ev))
     1331
     1332/*
     1333 * Overridden method: isCreateFileThumbnail
     1334 */
     1335SOM_Scope boolean  SOMLINK isCreateFileThumbnail(LuPopplerDocument *somSelf, Environment *ev);
     1336static char *somMN_LuPopplerDocumentisCreateFileThumbnail = "LuDocument::isCreateFileThumbnail";
     1337static somId somId_LuPopplerDocumentisCreateFileThumbnail = &somMN_LuPopplerDocumentisCreateFileThumbnail;
     1338#ifdef somId_isCreateFileThumbnail
     1339#undef somId_isCreateFileThumbnail
     1340#else
     1341#define somId_isCreateFileThumbnail somId_LuPopplerDocumentisCreateFileThumbnail
     1342#endif
     1343typedef boolean   SOMLINK somTP_xih_LuPopplerDocument_isCreateFileThumbnail(LuPopplerDocument *somSelf, Environment *ev);
     1344typedef somTP_xih_LuPopplerDocument_isCreateFileThumbnail *somTD_xih_LuPopplerDocument_isCreateFileThumbnail;
     1345/* define the parent method call macro */
     1346static somMethodProc* LuPopplerDocument_parent_LuDocument_isCreateFileThumbnail_resolved;
     1347#define LuPopplerDocument_parent_LuDocument_isCreateFileThumbnail(somSelf,ev) \
     1348  ((( somTD_xih_LuPopplerDocument_isCreateFileThumbnail ) \
     1349      LuPopplerDocument_parent_LuDocument_isCreateFileThumbnail_resolved) \
     1350        (somSelf,ev))
     1351/* define a variety of (possibly ambiguous) short forms */
     1352#ifndef SOMGD_pmc_parent_isCreateFileThumbnail
     1353  #ifdef parent_isCreateFileThumbnail
     1354    #define SOMGD_pmc_parent_isCreateFileThumbnail
     1355    #undef parent_isCreateFileThumbnail
     1356  #else
     1357#define parent_isCreateFileThumbnail LuPopplerDocument_parent_LuDocument_isCreateFileThumbnail
     1358  #endif
     1359#endif
     1360#ifndef SOMGD_pmc_parent_LuDocument_isCreateFileThumbnail
     1361  #ifdef parent_LuDocument_isCreateFileThumbnail
     1362    #define SOMGD_pmc_parent_LuDocument_isCreateFileThumbnail
     1363    #undef parent_LuDocument_isCreateFileThumbnail
     1364  #else
     1365    #define parent_LuDocument_isCreateFileThumbnail LuPopplerDocument_parent_LuDocument_isCreateFileThumbnail
     1366  #endif
     1367#endif
     1368#define LuPopplerDocument_parents_isCreateFileThumbnail(somSelf,ev) (\
     1369   LuPopplerDocument_parent_LuDocument_isCreateFileThumbnail(somSelf,ev))
    13291370
    13301371/*
     
    14181459    {    &somId_LuPopplerDocumentisFixedImage,
    14191460         (somMethodProc *) isFixedImage  },
     1461    {    &somId_LuPopplerDocumentisCreateFileThumbnail,
     1462         (somMethodProc *) isCreateFileThumbnail  },
    14201463    {    &somId_LuPopplerDocumentsomDefaultInit,
    14211464         (somMethodProc *) somDefaultInit  },
     
    14361479
    14371480static somStaticClassInfo LuPopplerDocumentSCI = {
    1438     4, 0, 29, 0, 0, 0, /* layout version 4 */
     1481    4, 0, 30, 0, 0, 0, /* layout version 4 */
    14391482    LuPopplerDocument_MajorVersion, LuPopplerDocument_MinorVersion,
    14401483    sizeof(LuPopplerDocumentData), LuPopplerDocument_MaxNoMethods, 1,
     
    14821525    LuDocumentNewClass(LuDocument_MajorVersion,LuDocument_MinorVersion);        /* static reference */
    14831526    result = (SOMClass*)((void*)somBuildClass(0xFFFFFFFF,&LuPopplerDocumentSCI, somtmajorVersion, somtminorVersion));
     1527    LuPopplerDocument_parent_LuDocument_isCreateFileThumbnail_resolved =
     1528        somParentNumResolve(LuPopplerDocumentCClassData.parentMtab, 1, LuDocumentClassData.isCreateFileThumbnail);
    14841529    LuPopplerDocument_parent_LuDocument_isFixedImage_resolved =
    14851530        somParentNumResolve(LuPopplerDocumentCClassData.parentMtab, 1, LuDocumentClassData.isFixedImage);
  • trunk/Lucide/changelog

    r152 r153  
    11Beta-5:
    22  - Pipe commands, see readme for details.
     3  - Writes into EA thumbnail of first page of document.
    34  - PDF plugin: freetype library updated to version 2.2.1.
    45  - Updated NLS-files: Spanish, German...
Note: See TracChangeset for help on using the changeset viewer.