Initial
This commit is contained in:
BIN
browse/Asmutil.OBJ
Normal file
BIN
browse/Asmutil.OBJ
Normal file
Binary file not shown.
176
browse/Asmutil.asm
Normal file
176
browse/Asmutil.asm
Normal file
@@ -0,0 +1,176 @@
|
||||
INCLUDE ..\COMMON\COMMON.INC
|
||||
INCLUDE ..\COMMON\MATH.INC
|
||||
SMART
|
||||
LOCALS
|
||||
.386
|
||||
.MODEL FLAT
|
||||
RGB888 STRUC
|
||||
PRGB888 TYPEDEF NEAR PTR RGB888
|
||||
RGB888@@mBlue DB ?
|
||||
RGB888@@mGreen DB ?
|
||||
RGB888@@mRed DB ?
|
||||
ENDS
|
||||
|
||||
ImageInfo STRUC
|
||||
PImageInfo TYPEDEF NEAR PTR
|
||||
ImageInfo@@mSrcWidth DD ?
|
||||
ImageInfo@@mSrcHeight DD ?
|
||||
ENDS
|
||||
|
||||
.DATA
|
||||
sOutColIterator DD ?
|
||||
sSrcRow DD ?
|
||||
sDstRow DD ?
|
||||
.CODE
|
||||
_resampleClipRow proc near ; short resampleClip(char *lpIn,char *lpOut,DWORD inLen,DWORD outLen,DWORD outClamp)
|
||||
LOCAL sampleFactor:DWORD,runningFactor:DWORD=LocalLength
|
||||
push ebp ; save stack frame
|
||||
mov ebp,esp ; create new stack frame
|
||||
sub esp,LocalLength ; adjust stack for local
|
||||
push esi ; save source index register
|
||||
push edi ; save destination
|
||||
push ebx ; save ebx register
|
||||
mov eax,[ebp+10h] ; move inLen to eax register
|
||||
cmp eax,0000h ; compare inLen to zero
|
||||
jle @@errorExit ; if it's less or equal then exit
|
||||
mov ebx,[ebp+14h] ; move outLen to ebx register
|
||||
cmp ebx,0000h ; compare outLen to zero
|
||||
jle @@errorExit ; if it's less or equal then exit
|
||||
dec eax ; decrement inLen
|
||||
shl eax,10h ; multiply inLen by 65536L
|
||||
divide eax,ebx ; divide ((inLen-1L)*65536L)/outLen
|
||||
mov sampleFactor,eax ; store the factor
|
||||
dec ebx ; ebx has (outLen-1)
|
||||
mov ecx,ebx ; copy (outLen-1) to ecx
|
||||
mov eax,[ebp+18h] ; move outClip to eax register
|
||||
sub ebx,eax ; subtract (outLen-1L)-outClip, this is clipping region
|
||||
mov edi,[ebp+0Ch] ; move lpOut to destination index register
|
||||
mov eax,size RGB888 ; move sizeof(RGB888) to eax register
|
||||
multiply eax,ecx ; multiply (outLen-1)*sizeof(RGB888)
|
||||
add edi,eax ; edi=lpOut+(outLen-1L)
|
||||
mov esi,[ebp+08h] ; move lpIn to source index register
|
||||
multiply ecx,sampleFactor ; multiply (outLen-1)*sampleFactor
|
||||
mov runningFactor,eax ; save this into runningFactor
|
||||
@@loopControl: ; loop control sync address
|
||||
cmp ecx,0000h ; make sure we're within boundary
|
||||
jl @@exit ; if not then we exit
|
||||
; cmp ecx,ebx ; compare ecx to clipping region
|
||||
; je @@exit ; if it's equal then we're done
|
||||
mov eax,runningFactor ; move last running factor into eax
|
||||
round ; round it off
|
||||
mov ebx,size RGB888 ; get size of RGB888 to ebx register
|
||||
multiply eax,ebx ; multiply running factor by sizeof(RGB888)
|
||||
mov dl,byte ptr[esi+eax] ; copy blue into dl
|
||||
mov byte ptr[edi],dl ; copy blue into target
|
||||
mov dl,byte ptr[esi+eax+1] ; copy green into dl
|
||||
mov byte ptr[edi+1],dl ; copy green into target
|
||||
mov dl,byte ptr[esi+eax+2] ; copy red into dl
|
||||
mov byte ptr[edi+2],dl ; copy red into target
|
||||
mov eax,sampleFactor ; move sampleFactor into eax register
|
||||
sub runningFactor,eax ; subtract from running factor
|
||||
dec ecx ; decrement counter
|
||||
sub edi,size RGB888 ; advance (backwards) along lpOut array
|
||||
jmp @@loopControl ; continue processing
|
||||
@@errorExit: ; error exit return sync address
|
||||
xor ax,ax ; clear ax register on error
|
||||
jmp @@endProcedure ; jump to end procedure
|
||||
@@exit: ; exit sync address
|
||||
mov ax,01h ; set ax register on success
|
||||
@@endProcedure: ; end procedure sync address
|
||||
pop ebx ; restore ebx register
|
||||
pop edi ; restore destination index register
|
||||
pop esi ; restore source index register
|
||||
add esp,LocalLength ; remove locals off stack
|
||||
pop ebp ; restore previous stack frame
|
||||
retn ; return near to caller
|
||||
_resampleClipRow endp
|
||||
_resampleClipCol proc near ; short resampleClip(char *lpIn,char *lpOut,DWORD inLen,DWORD inWidth,DWORD outLen,DWORD outWidth,DWORD outClamp)
|
||||
LOCAL sampleFactor:DWORD,runningFactor:DWORD=LocalLength
|
||||
push ebp ; save stack frame
|
||||
mov ebp,esp ; create new stack frame
|
||||
sub esp,LocalLength ; adjust stack for local
|
||||
push esi ; save source index register
|
||||
push edi ; save destination
|
||||
push ebx ; save ebx register
|
||||
mov edx,[ebp+1Ch] ; move outWidth to edx register
|
||||
mov eax,size RGB888 ; move sizeof(RGB888) to eax register
|
||||
multiply eax,edx ; eax=outWidth*sizeof(RGB888)
|
||||
mov sOutColIterator,eax ; save column iterator
|
||||
mov eax,[ebp+10h] ; move inLen to eax register
|
||||
cmp eax,0000h ; compare inLen to zero
|
||||
jle @@errorExit ; if it's less or equal then exit
|
||||
mov ebx,[ebp+18h] ; move outLen to ebx register
|
||||
cmp ebx,0000h ; compare outLen to zero
|
||||
jle @@errorExit ; if it's less or equal then exit
|
||||
dec eax ; decrement inLen
|
||||
shl eax,10h ; multiply inLen by 65536L
|
||||
divide eax,ebx ; divide ((inLen-1L)*65536L)/outLen
|
||||
mov sampleFactor,eax ; store the factor
|
||||
dec ebx ; ebx has (outLen-1)
|
||||
mov ecx,ebx ; copy (outLen-1) to ecx
|
||||
mov eax,[ebp+20h] ; move outClip to eax register
|
||||
sub ebx,eax ; subtract (outLen-1L)-outClip, this is clipping region
|
||||
mov edi,[ebp+0Ch] ; move lpOut to destination index register
|
||||
mov eax,[ebp+1Ch] ; move outWidth to eax register
|
||||
multiply eax,ecx ; multiply (outLen-1)*width
|
||||
mov edx,size RGB888 ; move sizeof(RGB888) to edx
|
||||
multiply eax,edx ; eax has ((outLen-1)*outWidth)*sizeof(RGB888)
|
||||
add edi,eax ; edi=lpOut+((outLen-1)*outWidth)*sizeof(RGB888), points to end of array
|
||||
mov esi,[ebp+08h] ; move lpIn to source index register
|
||||
multiply ecx,sampleFactor ; multiply (outLen-1)*sampleFactor
|
||||
mov runningFactor,eax ; save this into runningFactor
|
||||
@@loopControl: ; loop control sync address
|
||||
cmp ecx,0000h ; make sure we're within boundary
|
||||
jl @@exit ; if not then we exit
|
||||
cmp ecx,ebx ; compare ecx to clipping region
|
||||
je @@exit ; if it's equal then we're done
|
||||
mov eax,runningFactor ; move last running factor into eax
|
||||
round ; round it off
|
||||
mov edx,[ebp+14h] ; move inWidth to edx register
|
||||
multiply eax,edx ; eax=inWidth*runningFactor
|
||||
mov edx,size RGB888 ; move sizeof(RGB888) to edx register
|
||||
multiply eax,edx ; eax=(inWidth*runningFactor)*sizeof(RGB888)
|
||||
mov dl,byte ptr[esi+eax] ; copy blue into dl
|
||||
mov byte ptr[edi],dl ; copy blue into target
|
||||
mov dl,byte ptr[esi+eax+1] ; copy green into dl
|
||||
mov byte ptr[edi+1],dl ; copy green into target
|
||||
mov dl,byte ptr[esi+eax+2] ; copy red into dl
|
||||
mov byte ptr[edi+2],dl ; copy red into target
|
||||
mov eax,sampleFactor ; move sampleFactor into eax register
|
||||
sub runningFactor,eax ; subtract from running factor
|
||||
dec ecx ; decrement counter
|
||||
sub edi,sOutColIterator ; advance backwards along lpOutArray
|
||||
jmp @@loopControl ; continue processing
|
||||
@@errorExit: ; error exit return sync address
|
||||
xor ax,ax ; clear ax register on error
|
||||
jmp @@endProcedure ; jump to end procedure
|
||||
@@exit: ; exit sync address
|
||||
mov ax,01h ; set ax register on success
|
||||
@@endProcedure: ; end procedure sync address
|
||||
pop ebx ; restore ebx register
|
||||
pop edi ; restore destination index register
|
||||
pop esi ; restore source index register
|
||||
add esp,LocalLength ; remove locals off stack
|
||||
pop ebp ; restore previous stack frame
|
||||
retn ; return near to caller
|
||||
_resampleClipCol endp
|
||||
|
||||
_setAt proc near ; int setAt(ImageInfo *pImageInfo,DWORD row,DWORD col)
|
||||
push ebp ; save previous stack frame
|
||||
mov ebp,esp ; create new frame
|
||||
|
||||
mov eax,(ImageInfo ptr [ebp+10h]).ImageInfo@@mSrcWidth
|
||||
|
||||
|
||||
pop ebp ; restore previous stack frame
|
||||
retn ; return near to caller
|
||||
_setAt endp
|
||||
|
||||
public _resampleClipRow
|
||||
public _resampleClipCol
|
||||
|
||||
public _setAt
|
||||
END
|
||||
|
||||
|
||||
|
||||
19
browse/BROWSE.H
Normal file
19
browse/BROWSE.H
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef _PROTO_PROTO_H_
|
||||
#define _PROTO_PROTO_H_
|
||||
|
||||
// FIND DIALOG
|
||||
|
||||
|
||||
#define FILE_OPEN 100
|
||||
#define FILE_EXIT 101
|
||||
#define FILE_BROWSE 102
|
||||
|
||||
#define IDM_CASCADE 10014
|
||||
#define IDM_TILE 10015
|
||||
#define IDM_ARRANGE 10016
|
||||
#define IDM_CLOSEALL 10017
|
||||
#define IDM_MINIMIZEALL 10018
|
||||
#define IDM_RESTOREALL 10019
|
||||
|
||||
#define STRING_IMAGEVIEWCLASSNAME 500
|
||||
#endif
|
||||
939
browse/BROWSE.MAK
Normal file
939
browse/BROWSE.MAK
Normal file
@@ -0,0 +1,939 @@
|
||||
# Microsoft Developer Studio Generated NMAKE File, Based on browse.dsp
|
||||
!IF "$(CFG)" == ""
|
||||
CFG=browse - Win32 Debug
|
||||
!MESSAGE No configuration specified. Defaulting to browse - Win32 Debug.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" != "browse - Win32 Release" && "$(CFG)" != "browse - Win32 Debug"
|
||||
!MESSAGE Invalid configuration "$(CFG)" specified.
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "browse.mak" CFG="browse - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "browse - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "browse - Win32 Debug" (based on "Win32 (x86) Application")
|
||||
!MESSAGE
|
||||
!ERROR An invalid configuration is specified.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(OS)" == "Windows_NT"
|
||||
NULL=
|
||||
!ELSE
|
||||
NULL=nul
|
||||
!ENDIF
|
||||
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "browse - Win32 Release"
|
||||
|
||||
OUTDIR=.\Release
|
||||
INTDIR=.\Release
|
||||
# Begin Custom Macros
|
||||
OutDir=.\Release
|
||||
# End Custom Macros
|
||||
|
||||
!IF "$(RECURSE)" == "0"
|
||||
|
||||
ALL : "$(OUTDIR)\browse.exe"
|
||||
|
||||
!ELSE
|
||||
|
||||
ALL : "$(OUTDIR)\browse.exe"
|
||||
|
||||
!ENDIF
|
||||
|
||||
CLEAN :
|
||||
-@erase "$(INTDIR)\browse.res"
|
||||
-@erase "$(INTDIR)\brwsview.obj"
|
||||
-@erase "$(INTDIR)\jpgimg.obj"
|
||||
-@erase "$(INTDIR)\Main.obj"
|
||||
-@erase "$(INTDIR)\mainfrm.obj"
|
||||
-@erase "$(INTDIR)\thmbnail.obj"
|
||||
-@erase "$(INTDIR)\thmbpage.obj"
|
||||
-@erase "$(INTDIR)\vc50.idb"
|
||||
-@erase "$(OUTDIR)\browse.exe"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS"\
|
||||
/Fp"$(INTDIR)\browse.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
|
||||
CPP_OBJS=.\Release/
|
||||
CPP_SBRS=.
|
||||
MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
|
||||
RSC_PROJ=/l 0x409 /fo"$(INTDIR)\browse.res" /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)\browse.bsc"
|
||||
BSC32_SBRS= \
|
||||
|
||||
LINK32=link.exe
|
||||
LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
|
||||
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\
|
||||
odbccp32.lib /nologo /subsystem:windows /incremental:no\
|
||||
/pdb:"$(OUTDIR)\browse.pdb" /machine:I386 /out:"$(OUTDIR)\browse.exe"
|
||||
LINK32_OBJS= \
|
||||
"$(INTDIR)\browse.res" \
|
||||
"$(INTDIR)\brwsview.obj" \
|
||||
"$(INTDIR)\jpgimg.obj" \
|
||||
"$(INTDIR)\Main.obj" \
|
||||
"$(INTDIR)\mainfrm.obj" \
|
||||
"$(INTDIR)\thmbnail.obj" \
|
||||
"$(INTDIR)\thmbpage.obj" \
|
||||
"..\..\Parts\jpeg-6b\lib\jpeg6b.lib" \
|
||||
"..\Exe\mediapak.lib" \
|
||||
"..\Exe\mscommon.lib" \
|
||||
"..\Exe\msfileio.lib" \
|
||||
"..\Exe\sample.lib" \
|
||||
"..\Exe\statbar.lib"
|
||||
|
||||
"$(OUTDIR)\browse.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||
$(LINK32) @<<
|
||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
<<
|
||||
|
||||
!ELSEIF "$(CFG)" == "browse - Win32 Debug"
|
||||
|
||||
OUTDIR=.\msvcobj
|
||||
INTDIR=.\msvcobj
|
||||
# Begin Custom Macros
|
||||
OutDir=.\msvcobj
|
||||
# End Custom Macros
|
||||
|
||||
!IF "$(RECURSE)" == "0"
|
||||
|
||||
ALL : "$(OUTDIR)\browse.exe"
|
||||
|
||||
!ELSE
|
||||
|
||||
ALL : "$(OUTDIR)\browse.exe"
|
||||
|
||||
!ENDIF
|
||||
|
||||
CLEAN :
|
||||
-@erase "$(INTDIR)\browse.res"
|
||||
-@erase "$(INTDIR)\brwsview.obj"
|
||||
-@erase "$(INTDIR)\jpgimg.obj"
|
||||
-@erase "$(INTDIR)\Main.obj"
|
||||
-@erase "$(INTDIR)\mainfrm.obj"
|
||||
-@erase "$(INTDIR)\thmbnail.obj"
|
||||
-@erase "$(INTDIR)\thmbpage.obj"
|
||||
-@erase "$(INTDIR)\vc50.idb"
|
||||
-@erase "$(INTDIR)\vc50.pdb"
|
||||
-@erase "$(OUTDIR)\browse.exe"
|
||||
-@erase "$(OUTDIR)\browse.ilk"
|
||||
-@erase "$(OUTDIR)\browse.pdb"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
CPP_PROJ=/nologo /Zp1 /MTd /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS"\
|
||||
/D "STRICT" /D "__FLAT__" /Fp"$(INTDIR)\browse.pch" /YX /Fo"$(INTDIR)\\"\
|
||||
/Fd"$(INTDIR)\\" /FD /c
|
||||
CPP_OBJS=.\msvcobj/
|
||||
CPP_SBRS=.
|
||||
MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
|
||||
RSC_PROJ=/l 0x409 /fo"$(INTDIR)\browse.res" /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)\browse.bsc"
|
||||
BSC32_SBRS= \
|
||||
|
||||
LINK32=link.exe
|
||||
LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
|
||||
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comctl32.lib /nologo\
|
||||
/subsystem:windows /incremental:yes /pdb:"$(OUTDIR)\browse.pdb" /debug\
|
||||
/machine:I386 /out:"$(OUTDIR)\browse.exe" /pdbtype:sept
|
||||
LINK32_OBJS= \
|
||||
"$(INTDIR)\browse.res" \
|
||||
"$(INTDIR)\brwsview.obj" \
|
||||
"$(INTDIR)\jpgimg.obj" \
|
||||
"$(INTDIR)\Main.obj" \
|
||||
"$(INTDIR)\mainfrm.obj" \
|
||||
"$(INTDIR)\thmbnail.obj" \
|
||||
"$(INTDIR)\thmbpage.obj" \
|
||||
"..\..\Parts\jpeg-6b\lib\jpeg6b.lib" \
|
||||
"..\Exe\mediapak.lib" \
|
||||
"..\Exe\mscommon.lib" \
|
||||
"..\Exe\msfileio.lib" \
|
||||
"..\Exe\sample.lib" \
|
||||
"..\Exe\statbar.lib" \
|
||||
".\Asmutil.obj"
|
||||
|
||||
"$(OUTDIR)\browse.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||
$(LINK32) @<<
|
||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
<<
|
||||
|
||||
!ENDIF
|
||||
|
||||
.c{$(CPP_OBJS)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(CPP_OBJS)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(CPP_OBJS)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.c{$(CPP_SBRS)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(CPP_SBRS)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(CPP_SBRS)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
|
||||
!IF "$(CFG)" == "browse - Win32 Release" || "$(CFG)" == "browse - Win32 Debug"
|
||||
SOURCE=.\Asmutil.asm
|
||||
|
||||
!IF "$(CFG)" == "browse - Win32 Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "browse - Win32 Debug"
|
||||
|
||||
InputPath=.\Asmutil.asm
|
||||
InputName=Asmutil
|
||||
|
||||
"$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
tasm32 /t /zi /ml /m5 $(InputName).asm
|
||||
|
||||
!ENDIF
|
||||
|
||||
SOURCE=.\browse.rc
|
||||
DEP_RSC_BROWS=\
|
||||
".\PAINT.ICO"\
|
||||
{$(INCLUDE)}"proto\proto.h"\
|
||||
|
||||
|
||||
"$(INTDIR)\browse.res" : $(SOURCE) $(DEP_RSC_BROWS) "$(INTDIR)"
|
||||
$(RSC) $(RSC_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
SOURCE=.\brwsview.cpp
|
||||
|
||||
!IF "$(CFG)" == "browse - Win32 Release"
|
||||
|
||||
DEP_CPP_BRWSV=\
|
||||
".\brwsview.hpp"\
|
||||
".\dib24.hpp"\
|
||||
".\jpgimg.hpp"\
|
||||
".\rgb888.hpp"\
|
||||
".\scroll.hpp"\
|
||||
".\thmbnail.hpp"\
|
||||
".\thmbpage.hpp"\
|
||||
{$(INCLUDE)}"bsptree\btree.hpp"\
|
||||
{$(INCLUDE)}"bsptree\btree.tpp"\
|
||||
{$(INCLUDE)}"bsptree\treenode.hpp"\
|
||||
{$(INCLUDE)}"bsptree\treenode.tpp"\
|
||||
{$(INCLUDE)}"common\array.hpp"\
|
||||
{$(INCLUDE)}"common\assert.hpp"\
|
||||
{$(INCLUDE)}"common\block.hpp"\
|
||||
{$(INCLUDE)}"common\block.tpp"\
|
||||
{$(INCLUDE)}"common\bminfo.hpp"\
|
||||
{$(INCLUDE)}"common\brush.hpp"\
|
||||
{$(INCLUDE)}"common\callback.hpp"\
|
||||
{$(INCLUDE)}"common\callback.tpp"\
|
||||
{$(INCLUDE)}"common\cbdata.hpp"\
|
||||
{$(INCLUDE)}"common\cbptr.hpp"\
|
||||
{$(INCLUDE)}"common\commctrl.hpp"\
|
||||
{$(INCLUDE)}"common\control.hpp"\
|
||||
{$(INCLUDE)}"common\crsctrl.hpp"\
|
||||
{$(INCLUDE)}"common\dib.hpp"\
|
||||
{$(INCLUDE)}"common\dwindow.hpp"\
|
||||
{$(INCLUDE)}"common\except.hpp"\
|
||||
{$(INCLUDE)}"common\filetime.hpp"\
|
||||
{$(INCLUDE)}"common\finddata.hpp"\
|
||||
{$(INCLUDE)}"common\fixup.hpp"\
|
||||
{$(INCLUDE)}"common\gdata.hpp"\
|
||||
{$(INCLUDE)}"common\gdata.tpp"\
|
||||
{$(INCLUDE)}"common\gdiobj.hpp"\
|
||||
{$(INCLUDE)}"common\gdipoint.hpp"\
|
||||
{$(INCLUDE)}"common\guiwnd.hpp"\
|
||||
{$(INCLUDE)}"common\intel.hpp"\
|
||||
{$(INCLUDE)}"common\mdiwin.hpp"\
|
||||
{$(INCLUDE)}"common\memfile.hpp"\
|
||||
{$(INCLUDE)}"common\menuitem.hpp"\
|
||||
{$(INCLUDE)}"common\mmsystem.hpp"\
|
||||
{$(INCLUDE)}"common\openfile.hpp"\
|
||||
{$(INCLUDE)}"common\overlap.hpp"\
|
||||
{$(INCLUDE)}"common\palentry.hpp"\
|
||||
{$(INCLUDE)}"common\pathfnd.hpp"\
|
||||
{$(INCLUDE)}"common\pcallbck.hpp"\
|
||||
{$(INCLUDE)}"common\pen.hpp"\
|
||||
{$(INCLUDE)}"common\point.hpp"\
|
||||
{$(INCLUDE)}"common\pointer.hpp"\
|
||||
{$(INCLUDE)}"common\purebmp.hpp"\
|
||||
{$(INCLUDE)}"common\purehdc.hpp"\
|
||||
{$(INCLUDE)}"common\puremenu.hpp"\
|
||||
{$(INCLUDE)}"common\purepal.hpp"\
|
||||
{$(INCLUDE)}"common\pvector.hpp"\
|
||||
{$(INCLUDE)}"common\pvector.tpp"\
|
||||
{$(INCLUDE)}"common\rect.hpp"\
|
||||
{$(INCLUDE)}"common\rgbcolor.hpp"\
|
||||
{$(INCLUDE)}"common\rgbquad.hpp"\
|
||||
{$(INCLUDE)}"common\status.hpp"\
|
||||
{$(INCLUDE)}"common\stdio.hpp"\
|
||||
{$(INCLUDE)}"common\stdlib.hpp"\
|
||||
{$(INCLUDE)}"common\string.hpp"\
|
||||
{$(INCLUDE)}"common\systime.hpp"\
|
||||
{$(INCLUDE)}"common\types.hpp"\
|
||||
{$(INCLUDE)}"common\vhandler.hpp"\
|
||||
{$(INCLUDE)}"common\window.hpp"\
|
||||
{$(INCLUDE)}"common\windows.hpp"\
|
||||
{$(INCLUDE)}"common\windowsx.hpp"\
|
||||
{$(INCLUDE)}"fileio\fileio.hpp"\
|
||||
{$(INCLUDE)}"mediapak\entryinf.hpp"\
|
||||
{$(INCLUDE)}"mediapak\mediapak.hpp"\
|
||||
{$(INCLUDE)}"mediapak\pakentry.hpp"\
|
||||
{$(INCLUDE)}"sample\chunkid.hpp"\
|
||||
{$(INCLUDE)}"sample\datachnk.hpp"\
|
||||
{$(INCLUDE)}"sample\fmtchnk.hpp"\
|
||||
{$(INCLUDE)}"sample\genchnk.hpp"\
|
||||
{$(INCLUDE)}"sample\puresmpl.hpp"\
|
||||
{$(INCLUDE)}"sample\wave.hpp"\
|
||||
{$(INCLUDE)}"statbar\popup.hpp"\
|
||||
{$(INCLUDE)}"statbar\statbarx.hpp"\
|
||||
{$(INCLUDE)}"statbar\statmenu.hpp"\
|
||||
{$(INCLUDE)}"thread\mutex.hpp"\
|
||||
|
||||
|
||||
"$(INTDIR)\brwsview.obj" : $(SOURCE) $(DEP_CPP_BRWSV) "$(INTDIR)"
|
||||
|
||||
|
||||
!ELSEIF "$(CFG)" == "browse - Win32 Debug"
|
||||
|
||||
DEP_CPP_BRWSV=\
|
||||
"..\..\parts\mssdk\include\basetsd.h"\
|
||||
".\brwsview.hpp"\
|
||||
".\dib24.hpp"\
|
||||
".\jpgimg.hpp"\
|
||||
".\rgb888.hpp"\
|
||||
".\scroll.hpp"\
|
||||
".\thmbnail.hpp"\
|
||||
".\thmbpage.hpp"\
|
||||
{$(INCLUDE)}"bsptree\btree.hpp"\
|
||||
{$(INCLUDE)}"bsptree\btree.tpp"\
|
||||
{$(INCLUDE)}"bsptree\treenode.hpp"\
|
||||
{$(INCLUDE)}"bsptree\treenode.tpp"\
|
||||
{$(INCLUDE)}"common\array.hpp"\
|
||||
{$(INCLUDE)}"common\assert.hpp"\
|
||||
{$(INCLUDE)}"common\block.hpp"\
|
||||
{$(INCLUDE)}"common\block.tpp"\
|
||||
{$(INCLUDE)}"common\bminfo.hpp"\
|
||||
{$(INCLUDE)}"common\brush.hpp"\
|
||||
{$(INCLUDE)}"common\callback.hpp"\
|
||||
{$(INCLUDE)}"common\callback.tpp"\
|
||||
{$(INCLUDE)}"common\cbdata.hpp"\
|
||||
{$(INCLUDE)}"common\cbptr.hpp"\
|
||||
{$(INCLUDE)}"common\commctrl.hpp"\
|
||||
{$(INCLUDE)}"common\control.hpp"\
|
||||
{$(INCLUDE)}"common\crsctrl.hpp"\
|
||||
{$(INCLUDE)}"common\dib.hpp"\
|
||||
{$(INCLUDE)}"common\dwindow.hpp"\
|
||||
{$(INCLUDE)}"common\except.hpp"\
|
||||
{$(INCLUDE)}"common\filetime.hpp"\
|
||||
{$(INCLUDE)}"common\finddata.hpp"\
|
||||
{$(INCLUDE)}"common\fixup.hpp"\
|
||||
{$(INCLUDE)}"common\gdata.hpp"\
|
||||
{$(INCLUDE)}"common\gdata.tpp"\
|
||||
{$(INCLUDE)}"common\gdiobj.hpp"\
|
||||
{$(INCLUDE)}"common\gdipoint.hpp"\
|
||||
{$(INCLUDE)}"common\guiwnd.hpp"\
|
||||
{$(INCLUDE)}"common\intel.hpp"\
|
||||
{$(INCLUDE)}"common\mdiwin.hpp"\
|
||||
{$(INCLUDE)}"common\memfile.hpp"\
|
||||
{$(INCLUDE)}"common\menuitem.hpp"\
|
||||
{$(INCLUDE)}"common\mmsystem.hpp"\
|
||||
{$(INCLUDE)}"common\openfile.hpp"\
|
||||
{$(INCLUDE)}"common\overlap.hpp"\
|
||||
{$(INCLUDE)}"common\palentry.hpp"\
|
||||
{$(INCLUDE)}"common\pathfnd.hpp"\
|
||||
{$(INCLUDE)}"common\pcallbck.hpp"\
|
||||
{$(INCLUDE)}"common\pen.hpp"\
|
||||
{$(INCLUDE)}"common\point.hpp"\
|
||||
{$(INCLUDE)}"common\pointer.hpp"\
|
||||
{$(INCLUDE)}"common\purebmp.hpp"\
|
||||
{$(INCLUDE)}"common\purehdc.hpp"\
|
||||
{$(INCLUDE)}"common\puremenu.hpp"\
|
||||
{$(INCLUDE)}"common\purepal.hpp"\
|
||||
{$(INCLUDE)}"common\pvector.hpp"\
|
||||
{$(INCLUDE)}"common\pvector.tpp"\
|
||||
{$(INCLUDE)}"common\rect.hpp"\
|
||||
{$(INCLUDE)}"common\rgbcolor.hpp"\
|
||||
{$(INCLUDE)}"common\rgbquad.hpp"\
|
||||
{$(INCLUDE)}"common\status.hpp"\
|
||||
{$(INCLUDE)}"common\stdio.hpp"\
|
||||
{$(INCLUDE)}"common\stdlib.hpp"\
|
||||
{$(INCLUDE)}"common\string.hpp"\
|
||||
{$(INCLUDE)}"common\systime.hpp"\
|
||||
{$(INCLUDE)}"common\types.hpp"\
|
||||
{$(INCLUDE)}"common\vhandler.hpp"\
|
||||
{$(INCLUDE)}"common\window.hpp"\
|
||||
{$(INCLUDE)}"common\windows.hpp"\
|
||||
{$(INCLUDE)}"common\windowsx.hpp"\
|
||||
{$(INCLUDE)}"fileio\fileio.hpp"\
|
||||
{$(INCLUDE)}"mediapak\entryinf.hpp"\
|
||||
{$(INCLUDE)}"mediapak\mediapak.hpp"\
|
||||
{$(INCLUDE)}"mediapak\pakentry.hpp"\
|
||||
{$(INCLUDE)}"sample\chunkid.hpp"\
|
||||
{$(INCLUDE)}"sample\datachnk.hpp"\
|
||||
{$(INCLUDE)}"sample\fmtchnk.hpp"\
|
||||
{$(INCLUDE)}"sample\genchnk.hpp"\
|
||||
{$(INCLUDE)}"sample\puresmpl.hpp"\
|
||||
{$(INCLUDE)}"sample\wave.hpp"\
|
||||
{$(INCLUDE)}"statbar\popup.hpp"\
|
||||
{$(INCLUDE)}"statbar\statbarx.hpp"\
|
||||
{$(INCLUDE)}"statbar\statmenu.hpp"\
|
||||
{$(INCLUDE)}"thread\mutex.hpp"\
|
||||
|
||||
|
||||
"$(INTDIR)\brwsview.obj" : $(SOURCE) $(DEP_CPP_BRWSV) "$(INTDIR)"
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
||||
SOURCE=.\jpgimg.cpp
|
||||
|
||||
!IF "$(CFG)" == "browse - Win32 Release"
|
||||
|
||||
DEP_CPP_JPGIM=\
|
||||
".\asmutil.hpp"\
|
||||
".\jpgimg.hpp"\
|
||||
".\rgb888.hpp"\
|
||||
{$(INCLUDE)}"common\array.hpp"\
|
||||
{$(INCLUDE)}"common\assert.hpp"\
|
||||
{$(INCLUDE)}"common\bminfo.hpp"\
|
||||
{$(INCLUDE)}"common\dib.hpp"\
|
||||
{$(INCLUDE)}"common\except.hpp"\
|
||||
{$(INCLUDE)}"common\fixup.hpp"\
|
||||
{$(INCLUDE)}"common\gdata.hpp"\
|
||||
{$(INCLUDE)}"common\gdata.tpp"\
|
||||
{$(INCLUDE)}"common\gdiobj.hpp"\
|
||||
{$(INCLUDE)}"common\gdipoint.hpp"\
|
||||
{$(INCLUDE)}"common\palentry.hpp"\
|
||||
{$(INCLUDE)}"common\pen.hpp"\
|
||||
{$(INCLUDE)}"common\point.hpp"\
|
||||
{$(INCLUDE)}"common\pointer.hpp"\
|
||||
{$(INCLUDE)}"common\purebmp.hpp"\
|
||||
{$(INCLUDE)}"common\purehdc.hpp"\
|
||||
{$(INCLUDE)}"common\purepal.hpp"\
|
||||
{$(INCLUDE)}"common\pvector.hpp"\
|
||||
{$(INCLUDE)}"common\pvector.tpp"\
|
||||
{$(INCLUDE)}"common\rect.hpp"\
|
||||
{$(INCLUDE)}"common\rgbcolor.hpp"\
|
||||
{$(INCLUDE)}"common\rgbquad.hpp"\
|
||||
{$(INCLUDE)}"common\stdio.hpp"\
|
||||
{$(INCLUDE)}"common\stdlib.hpp"\
|
||||
{$(INCLUDE)}"common\string.hpp"\
|
||||
{$(INCLUDE)}"common\types.hpp"\
|
||||
{$(INCLUDE)}"common\windows.hpp"\
|
||||
{$(INCLUDE)}"jpeg-6b\jconfig.hpp"\
|
||||
{$(INCLUDE)}"jpeg-6b\jerror.hpp"\
|
||||
{$(INCLUDE)}"jpeg-6b\jexcept.hpp"\
|
||||
{$(INCLUDE)}"jpeg-6b\jmorecfg.hpp"\
|
||||
{$(INCLUDE)}"jpeg-6b\jpeg6b.hpp"\
|
||||
{$(INCLUDE)}"jpeg-6b\jpegint.hpp"\
|
||||
{$(INCLUDE)}"jpeg-6b\jpeglib.hpp"\
|
||||
|
||||
|
||||
"$(INTDIR)\jpgimg.obj" : $(SOURCE) $(DEP_CPP_JPGIM) "$(INTDIR)"
|
||||
|
||||
|
||||
!ELSEIF "$(CFG)" == "browse - Win32 Debug"
|
||||
|
||||
DEP_CPP_JPGIM=\
|
||||
"..\..\parts\mssdk\include\basetsd.h"\
|
||||
".\asmutil.hpp"\
|
||||
".\jpgimg.hpp"\
|
||||
".\rgb888.hpp"\
|
||||
{$(INCLUDE)}"common\array.hpp"\
|
||||
{$(INCLUDE)}"common\assert.hpp"\
|
||||
{$(INCLUDE)}"common\bminfo.hpp"\
|
||||
{$(INCLUDE)}"common\dib.hpp"\
|
||||
{$(INCLUDE)}"common\except.hpp"\
|
||||
{$(INCLUDE)}"common\fixup.hpp"\
|
||||
{$(INCLUDE)}"common\gdata.hpp"\
|
||||
{$(INCLUDE)}"common\gdata.tpp"\
|
||||
{$(INCLUDE)}"common\gdiobj.hpp"\
|
||||
{$(INCLUDE)}"common\gdipoint.hpp"\
|
||||
{$(INCLUDE)}"common\palentry.hpp"\
|
||||
{$(INCLUDE)}"common\pen.hpp"\
|
||||
{$(INCLUDE)}"common\point.hpp"\
|
||||
{$(INCLUDE)}"common\pointer.hpp"\
|
||||
{$(INCLUDE)}"common\purebmp.hpp"\
|
||||
{$(INCLUDE)}"common\purehdc.hpp"\
|
||||
{$(INCLUDE)}"common\purepal.hpp"\
|
||||
{$(INCLUDE)}"common\pvector.hpp"\
|
||||
{$(INCLUDE)}"common\pvector.tpp"\
|
||||
{$(INCLUDE)}"common\rect.hpp"\
|
||||
{$(INCLUDE)}"common\rgbcolor.hpp"\
|
||||
{$(INCLUDE)}"common\rgbquad.hpp"\
|
||||
{$(INCLUDE)}"common\stdio.hpp"\
|
||||
{$(INCLUDE)}"common\stdlib.hpp"\
|
||||
{$(INCLUDE)}"common\string.hpp"\
|
||||
{$(INCLUDE)}"common\types.hpp"\
|
||||
{$(INCLUDE)}"common\windows.hpp"\
|
||||
{$(INCLUDE)}"jpeg-6b\jconfig.hpp"\
|
||||
{$(INCLUDE)}"jpeg-6b\jexcept.hpp"\
|
||||
{$(INCLUDE)}"jpeg-6b\jmorecfg.hpp"\
|
||||
{$(INCLUDE)}"jpeg-6b\jpeg6b.hpp"\
|
||||
{$(INCLUDE)}"jpeg-6b\jpeglib.hpp"\
|
||||
|
||||
|
||||
"$(INTDIR)\jpgimg.obj" : $(SOURCE) $(DEP_CPP_JPGIM) "$(INTDIR)"
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
||||
SOURCE=.\Main.cpp
|
||||
|
||||
!IF "$(CFG)" == "browse - Win32 Release"
|
||||
|
||||
DEP_CPP_MAIN_=\
|
||||
".\mainfrm.hpp"\
|
||||
{$(INCLUDE)}"common\block.hpp"\
|
||||
{$(INCLUDE)}"common\block.tpp"\
|
||||
{$(INCLUDE)}"common\callback.hpp"\
|
||||
{$(INCLUDE)}"common\callback.tpp"\
|
||||
{$(INCLUDE)}"common\cbdata.hpp"\
|
||||
{$(INCLUDE)}"common\cbptr.hpp"\
|
||||
{$(INCLUDE)}"common\dwindow.hpp"\
|
||||
{$(INCLUDE)}"common\except.hpp"\
|
||||
{$(INCLUDE)}"common\gdipoint.hpp"\
|
||||
{$(INCLUDE)}"common\guiwnd.hpp"\
|
||||
{$(INCLUDE)}"common\mdifrm.hpp"\
|
||||
{$(INCLUDE)}"common\menuitem.hpp"\
|
||||
{$(INCLUDE)}"common\pcallbck.hpp"\
|
||||
{$(INCLUDE)}"common\point.hpp"\
|
||||
{$(INCLUDE)}"common\pointer.hpp"\
|
||||
{$(INCLUDE)}"common\puremenu.hpp"\
|
||||
{$(INCLUDE)}"common\rect.hpp"\
|
||||
{$(INCLUDE)}"common\stdlib.hpp"\
|
||||
{$(INCLUDE)}"common\string.hpp"\
|
||||
{$(INCLUDE)}"common\vhandler.hpp"\
|
||||
{$(INCLUDE)}"common\window.hpp"\
|
||||
{$(INCLUDE)}"common\windows.hpp"\
|
||||
{$(INCLUDE)}"common\windowsx.hpp"\
|
||||
|
||||
|
||||
"$(INTDIR)\Main.obj" : $(SOURCE) $(DEP_CPP_MAIN_) "$(INTDIR)"
|
||||
|
||||
|
||||
!ELSEIF "$(CFG)" == "browse - Win32 Debug"
|
||||
|
||||
DEP_CPP_MAIN_=\
|
||||
"..\..\parts\mssdk\include\basetsd.h"\
|
||||
".\mainfrm.hpp"\
|
||||
{$(INCLUDE)}"common\block.hpp"\
|
||||
{$(INCLUDE)}"common\block.tpp"\
|
||||
{$(INCLUDE)}"common\callback.hpp"\
|
||||
{$(INCLUDE)}"common\callback.tpp"\
|
||||
{$(INCLUDE)}"common\cbdata.hpp"\
|
||||
{$(INCLUDE)}"common\cbptr.hpp"\
|
||||
{$(INCLUDE)}"common\dwindow.hpp"\
|
||||
{$(INCLUDE)}"common\except.hpp"\
|
||||
{$(INCLUDE)}"common\gdipoint.hpp"\
|
||||
{$(INCLUDE)}"common\guiwnd.hpp"\
|
||||
{$(INCLUDE)}"common\mdifrm.hpp"\
|
||||
{$(INCLUDE)}"common\menuitem.hpp"\
|
||||
{$(INCLUDE)}"common\pcallbck.hpp"\
|
||||
{$(INCLUDE)}"common\point.hpp"\
|
||||
{$(INCLUDE)}"common\pointer.hpp"\
|
||||
{$(INCLUDE)}"common\puremenu.hpp"\
|
||||
{$(INCLUDE)}"common\rect.hpp"\
|
||||
{$(INCLUDE)}"common\stdlib.hpp"\
|
||||
{$(INCLUDE)}"common\string.hpp"\
|
||||
{$(INCLUDE)}"common\vhandler.hpp"\
|
||||
{$(INCLUDE)}"common\window.hpp"\
|
||||
{$(INCLUDE)}"common\windows.hpp"\
|
||||
{$(INCLUDE)}"common\windowsx.hpp"\
|
||||
|
||||
|
||||
"$(INTDIR)\Main.obj" : $(SOURCE) $(DEP_CPP_MAIN_) "$(INTDIR)"
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
||||
SOURCE=.\mainfrm.cpp
|
||||
|
||||
!IF "$(CFG)" == "browse - Win32 Release"
|
||||
|
||||
DEP_CPP_MAINF=\
|
||||
".\browse.h"\
|
||||
".\browse.hpp"\
|
||||
".\brwsview.hpp"\
|
||||
".\dib24.hpp"\
|
||||
".\jpgimg.hpp"\
|
||||
".\mainfrm.hpp"\
|
||||
".\rgb888.hpp"\
|
||||
".\scroll.hpp"\
|
||||
".\thmbnail.hpp"\
|
||||
".\thmbpage.hpp"\
|
||||
{$(INCLUDE)}"common\array.hpp"\
|
||||
{$(INCLUDE)}"common\assert.hpp"\
|
||||
{$(INCLUDE)}"common\block.hpp"\
|
||||
{$(INCLUDE)}"common\block.tpp"\
|
||||
{$(INCLUDE)}"common\bminfo.hpp"\
|
||||
{$(INCLUDE)}"common\callback.hpp"\
|
||||
{$(INCLUDE)}"common\callback.tpp"\
|
||||
{$(INCLUDE)}"common\cbdata.hpp"\
|
||||
{$(INCLUDE)}"common\cbptr.hpp"\
|
||||
{$(INCLUDE)}"common\commctrl.hpp"\
|
||||
{$(INCLUDE)}"common\control.hpp"\
|
||||
{$(INCLUDE)}"common\dib.hpp"\
|
||||
{$(INCLUDE)}"common\dwindow.hpp"\
|
||||
{$(INCLUDE)}"common\except.hpp"\
|
||||
{$(INCLUDE)}"common\filetime.hpp"\
|
||||
{$(INCLUDE)}"common\fixup.hpp"\
|
||||
{$(INCLUDE)}"common\gdata.hpp"\
|
||||
{$(INCLUDE)}"common\gdata.tpp"\
|
||||
{$(INCLUDE)}"common\gdiobj.hpp"\
|
||||
{$(INCLUDE)}"common\gdipoint.hpp"\
|
||||
{$(INCLUDE)}"common\guiwnd.hpp"\
|
||||
{$(INCLUDE)}"common\intel.hpp"\
|
||||
{$(INCLUDE)}"common\mdifrm.hpp"\
|
||||
{$(INCLUDE)}"common\mdiwin.hpp"\
|
||||
{$(INCLUDE)}"common\memfile.hpp"\
|
||||
{$(INCLUDE)}"common\menuitem.hpp"\
|
||||
{$(INCLUDE)}"common\mmsystem.hpp"\
|
||||
{$(INCLUDE)}"common\openfile.hpp"\
|
||||
{$(INCLUDE)}"common\overlap.hpp"\
|
||||
{$(INCLUDE)}"common\palentry.hpp"\
|
||||
{$(INCLUDE)}"common\pcallbck.hpp"\
|
||||
{$(INCLUDE)}"common\pen.hpp"\
|
||||
{$(INCLUDE)}"common\point.hpp"\
|
||||
{$(INCLUDE)}"common\pointer.hpp"\
|
||||
{$(INCLUDE)}"common\purebmp.hpp"\
|
||||
{$(INCLUDE)}"common\purehdc.hpp"\
|
||||
{$(INCLUDE)}"common\puremenu.hpp"\
|
||||
{$(INCLUDE)}"common\purepal.hpp"\
|
||||
{$(INCLUDE)}"common\pvector.hpp"\
|
||||
{$(INCLUDE)}"common\pvector.tpp"\
|
||||
{$(INCLUDE)}"common\rect.hpp"\
|
||||
{$(INCLUDE)}"common\rgbcolor.hpp"\
|
||||
{$(INCLUDE)}"common\rgbquad.hpp"\
|
||||
{$(INCLUDE)}"common\status.hpp"\
|
||||
{$(INCLUDE)}"common\stdio.hpp"\
|
||||
{$(INCLUDE)}"common\stdlib.hpp"\
|
||||
{$(INCLUDE)}"common\string.hpp"\
|
||||
{$(INCLUDE)}"common\systime.hpp"\
|
||||
{$(INCLUDE)}"common\types.hpp"\
|
||||
{$(INCLUDE)}"common\vhandler.hpp"\
|
||||
{$(INCLUDE)}"common\window.hpp"\
|
||||
{$(INCLUDE)}"common\windows.hpp"\
|
||||
{$(INCLUDE)}"common\windowsx.hpp"\
|
||||
{$(INCLUDE)}"fileio\fileio.hpp"\
|
||||
{$(INCLUDE)}"mediapak\mediapak.hpp"\
|
||||
{$(INCLUDE)}"mediapak\pakentry.hpp"\
|
||||
{$(INCLUDE)}"sample\chunkid.hpp"\
|
||||
{$(INCLUDE)}"sample\datachnk.hpp"\
|
||||
{$(INCLUDE)}"sample\fmtchnk.hpp"\
|
||||
{$(INCLUDE)}"sample\genchnk.hpp"\
|
||||
{$(INCLUDE)}"sample\puresmpl.hpp"\
|
||||
{$(INCLUDE)}"sample\wave.hpp"\
|
||||
{$(INCLUDE)}"statbar\popup.hpp"\
|
||||
{$(INCLUDE)}"statbar\statbarx.hpp"\
|
||||
{$(INCLUDE)}"statbar\statmenu.hpp"\
|
||||
{$(INCLUDE)}"thread\mutex.hpp"\
|
||||
|
||||
|
||||
"$(INTDIR)\mainfrm.obj" : $(SOURCE) $(DEP_CPP_MAINF) "$(INTDIR)"
|
||||
|
||||
|
||||
!ELSEIF "$(CFG)" == "browse - Win32 Debug"
|
||||
|
||||
DEP_CPP_MAINF=\
|
||||
"..\..\parts\mssdk\include\basetsd.h"\
|
||||
".\browse.h"\
|
||||
".\browse.hpp"\
|
||||
".\brwsview.hpp"\
|
||||
".\dib24.hpp"\
|
||||
".\jpgimg.hpp"\
|
||||
".\mainfrm.hpp"\
|
||||
".\rgb888.hpp"\
|
||||
".\scroll.hpp"\
|
||||
".\thmbnail.hpp"\
|
||||
".\thmbpage.hpp"\
|
||||
{$(INCLUDE)}"common\array.hpp"\
|
||||
{$(INCLUDE)}"common\assert.hpp"\
|
||||
{$(INCLUDE)}"common\block.hpp"\
|
||||
{$(INCLUDE)}"common\block.tpp"\
|
||||
{$(INCLUDE)}"common\bminfo.hpp"\
|
||||
{$(INCLUDE)}"common\callback.hpp"\
|
||||
{$(INCLUDE)}"common\callback.tpp"\
|
||||
{$(INCLUDE)}"common\cbdata.hpp"\
|
||||
{$(INCLUDE)}"common\cbptr.hpp"\
|
||||
{$(INCLUDE)}"common\commctrl.hpp"\
|
||||
{$(INCLUDE)}"common\control.hpp"\
|
||||
{$(INCLUDE)}"common\dib.hpp"\
|
||||
{$(INCLUDE)}"common\dwindow.hpp"\
|
||||
{$(INCLUDE)}"common\except.hpp"\
|
||||
{$(INCLUDE)}"common\filetime.hpp"\
|
||||
{$(INCLUDE)}"common\fixup.hpp"\
|
||||
{$(INCLUDE)}"common\gdata.hpp"\
|
||||
{$(INCLUDE)}"common\gdata.tpp"\
|
||||
{$(INCLUDE)}"common\gdiobj.hpp"\
|
||||
{$(INCLUDE)}"common\gdipoint.hpp"\
|
||||
{$(INCLUDE)}"common\guiwnd.hpp"\
|
||||
{$(INCLUDE)}"common\intel.hpp"\
|
||||
{$(INCLUDE)}"common\mdifrm.hpp"\
|
||||
{$(INCLUDE)}"common\mdiwin.hpp"\
|
||||
{$(INCLUDE)}"common\memfile.hpp"\
|
||||
{$(INCLUDE)}"common\menuitem.hpp"\
|
||||
{$(INCLUDE)}"common\mmsystem.hpp"\
|
||||
{$(INCLUDE)}"common\openfile.hpp"\
|
||||
{$(INCLUDE)}"common\overlap.hpp"\
|
||||
{$(INCLUDE)}"common\palentry.hpp"\
|
||||
{$(INCLUDE)}"common\pcallbck.hpp"\
|
||||
{$(INCLUDE)}"common\pen.hpp"\
|
||||
{$(INCLUDE)}"common\point.hpp"\
|
||||
{$(INCLUDE)}"common\pointer.hpp"\
|
||||
{$(INCLUDE)}"common\purebmp.hpp"\
|
||||
{$(INCLUDE)}"common\purehdc.hpp"\
|
||||
{$(INCLUDE)}"common\puremenu.hpp"\
|
||||
{$(INCLUDE)}"common\purepal.hpp"\
|
||||
{$(INCLUDE)}"common\pvector.hpp"\
|
||||
{$(INCLUDE)}"common\pvector.tpp"\
|
||||
{$(INCLUDE)}"common\rect.hpp"\
|
||||
{$(INCLUDE)}"common\rgbcolor.hpp"\
|
||||
{$(INCLUDE)}"common\rgbquad.hpp"\
|
||||
{$(INCLUDE)}"common\status.hpp"\
|
||||
{$(INCLUDE)}"common\stdio.hpp"\
|
||||
{$(INCLUDE)}"common\stdlib.hpp"\
|
||||
{$(INCLUDE)}"common\string.hpp"\
|
||||
{$(INCLUDE)}"common\systime.hpp"\
|
||||
{$(INCLUDE)}"common\types.hpp"\
|
||||
{$(INCLUDE)}"common\vhandler.hpp"\
|
||||
{$(INCLUDE)}"common\window.hpp"\
|
||||
{$(INCLUDE)}"common\windows.hpp"\
|
||||
{$(INCLUDE)}"common\windowsx.hpp"\
|
||||
{$(INCLUDE)}"fileio\fileio.hpp"\
|
||||
{$(INCLUDE)}"mediapak\mediapak.hpp"\
|
||||
{$(INCLUDE)}"mediapak\pakentry.hpp"\
|
||||
{$(INCLUDE)}"sample\chunkid.hpp"\
|
||||
{$(INCLUDE)}"sample\datachnk.hpp"\
|
||||
{$(INCLUDE)}"sample\fmtchnk.hpp"\
|
||||
{$(INCLUDE)}"sample\genchnk.hpp"\
|
||||
{$(INCLUDE)}"sample\puresmpl.hpp"\
|
||||
{$(INCLUDE)}"sample\wave.hpp"\
|
||||
{$(INCLUDE)}"statbar\popup.hpp"\
|
||||
{$(INCLUDE)}"statbar\statbarx.hpp"\
|
||||
{$(INCLUDE)}"statbar\statmenu.hpp"\
|
||||
{$(INCLUDE)}"thread\mutex.hpp"\
|
||||
|
||||
|
||||
"$(INTDIR)\mainfrm.obj" : $(SOURCE) $(DEP_CPP_MAINF) "$(INTDIR)"
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
||||
SOURCE=.\thmbnail.cpp
|
||||
|
||||
!IF "$(CFG)" == "browse - Win32 Release"
|
||||
|
||||
DEP_CPP_THMBN=\
|
||||
".\jpgimg.hpp"\
|
||||
".\rgb888.hpp"\
|
||||
".\thmbnail.hpp"\
|
||||
{$(INCLUDE)}"common\array.hpp"\
|
||||
{$(INCLUDE)}"common\assert.hpp"\
|
||||
{$(INCLUDE)}"common\bminfo.hpp"\
|
||||
{$(INCLUDE)}"common\dib.hpp"\
|
||||
{$(INCLUDE)}"common\except.hpp"\
|
||||
{$(INCLUDE)}"common\fixup.hpp"\
|
||||
{$(INCLUDE)}"common\gdata.hpp"\
|
||||
{$(INCLUDE)}"common\gdata.tpp"\
|
||||
{$(INCLUDE)}"common\gdiobj.hpp"\
|
||||
{$(INCLUDE)}"common\gdipoint.hpp"\
|
||||
{$(INCLUDE)}"common\palentry.hpp"\
|
||||
{$(INCLUDE)}"common\pen.hpp"\
|
||||
{$(INCLUDE)}"common\point.hpp"\
|
||||
{$(INCLUDE)}"common\pointer.hpp"\
|
||||
{$(INCLUDE)}"common\purebmp.hpp"\
|
||||
{$(INCLUDE)}"common\purehdc.hpp"\
|
||||
{$(INCLUDE)}"common\purepal.hpp"\
|
||||
{$(INCLUDE)}"common\pvector.hpp"\
|
||||
{$(INCLUDE)}"common\pvector.tpp"\
|
||||
{$(INCLUDE)}"common\rect.hpp"\
|
||||
{$(INCLUDE)}"common\rgbcolor.hpp"\
|
||||
{$(INCLUDE)}"common\rgbquad.hpp"\
|
||||
{$(INCLUDE)}"common\stdio.hpp"\
|
||||
{$(INCLUDE)}"common\stdlib.hpp"\
|
||||
{$(INCLUDE)}"common\string.hpp"\
|
||||
{$(INCLUDE)}"common\types.hpp"\
|
||||
{$(INCLUDE)}"common\windows.hpp"\
|
||||
{$(INCLUDE)}"mediapak\pakentry.hpp"\
|
||||
|
||||
|
||||
"$(INTDIR)\thmbnail.obj" : $(SOURCE) $(DEP_CPP_THMBN) "$(INTDIR)"
|
||||
|
||||
|
||||
!ELSEIF "$(CFG)" == "browse - Win32 Debug"
|
||||
|
||||
DEP_CPP_THMBN=\
|
||||
"..\..\parts\mssdk\include\basetsd.h"\
|
||||
".\jpgimg.hpp"\
|
||||
".\rgb888.hpp"\
|
||||
".\thmbnail.hpp"\
|
||||
{$(INCLUDE)}"common\array.hpp"\
|
||||
{$(INCLUDE)}"common\assert.hpp"\
|
||||
{$(INCLUDE)}"common\bminfo.hpp"\
|
||||
{$(INCLUDE)}"common\dib.hpp"\
|
||||
{$(INCLUDE)}"common\except.hpp"\
|
||||
{$(INCLUDE)}"common\fixup.hpp"\
|
||||
{$(INCLUDE)}"common\gdata.hpp"\
|
||||
{$(INCLUDE)}"common\gdata.tpp"\
|
||||
{$(INCLUDE)}"common\gdiobj.hpp"\
|
||||
{$(INCLUDE)}"common\gdipoint.hpp"\
|
||||
{$(INCLUDE)}"common\palentry.hpp"\
|
||||
{$(INCLUDE)}"common\pen.hpp"\
|
||||
{$(INCLUDE)}"common\point.hpp"\
|
||||
{$(INCLUDE)}"common\pointer.hpp"\
|
||||
{$(INCLUDE)}"common\purebmp.hpp"\
|
||||
{$(INCLUDE)}"common\purehdc.hpp"\
|
||||
{$(INCLUDE)}"common\purepal.hpp"\
|
||||
{$(INCLUDE)}"common\pvector.hpp"\
|
||||
{$(INCLUDE)}"common\pvector.tpp"\
|
||||
{$(INCLUDE)}"common\rect.hpp"\
|
||||
{$(INCLUDE)}"common\rgbcolor.hpp"\
|
||||
{$(INCLUDE)}"common\rgbquad.hpp"\
|
||||
{$(INCLUDE)}"common\stdio.hpp"\
|
||||
{$(INCLUDE)}"common\stdlib.hpp"\
|
||||
{$(INCLUDE)}"common\string.hpp"\
|
||||
{$(INCLUDE)}"common\types.hpp"\
|
||||
{$(INCLUDE)}"common\windows.hpp"\
|
||||
{$(INCLUDE)}"mediapak\pakentry.hpp"\
|
||||
|
||||
|
||||
"$(INTDIR)\thmbnail.obj" : $(SOURCE) $(DEP_CPP_THMBN) "$(INTDIR)"
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
||||
SOURCE=.\thmbpage.cpp
|
||||
|
||||
!IF "$(CFG)" == "browse - Win32 Release"
|
||||
|
||||
DEP_CPP_THMBP=\
|
||||
".\dib24.hpp"\
|
||||
".\jpgimg.hpp"\
|
||||
".\rgb888.hpp"\
|
||||
".\thmbnail.hpp"\
|
||||
".\thmbpage.hpp"\
|
||||
{$(INCLUDE)}"common\array.hpp"\
|
||||
{$(INCLUDE)}"common\assert.hpp"\
|
||||
{$(INCLUDE)}"common\block.hpp"\
|
||||
{$(INCLUDE)}"common\block.tpp"\
|
||||
{$(INCLUDE)}"common\bminfo.hpp"\
|
||||
{$(INCLUDE)}"common\callback.hpp"\
|
||||
{$(INCLUDE)}"common\callback.tpp"\
|
||||
{$(INCLUDE)}"common\cbdata.hpp"\
|
||||
{$(INCLUDE)}"common\cbptr.hpp"\
|
||||
{$(INCLUDE)}"common\dib.hpp"\
|
||||
{$(INCLUDE)}"common\except.hpp"\
|
||||
{$(INCLUDE)}"common\fixup.hpp"\
|
||||
{$(INCLUDE)}"common\gdata.hpp"\
|
||||
{$(INCLUDE)}"common\gdata.tpp"\
|
||||
{$(INCLUDE)}"common\gdiobj.hpp"\
|
||||
{$(INCLUDE)}"common\gdipoint.hpp"\
|
||||
{$(INCLUDE)}"common\guiwnd.hpp"\
|
||||
{$(INCLUDE)}"common\palentry.hpp"\
|
||||
{$(INCLUDE)}"common\pcallbck.hpp"\
|
||||
{$(INCLUDE)}"common\pen.hpp"\
|
||||
{$(INCLUDE)}"common\point.hpp"\
|
||||
{$(INCLUDE)}"common\pointer.hpp"\
|
||||
{$(INCLUDE)}"common\purebmp.hpp"\
|
||||
{$(INCLUDE)}"common\purehdc.hpp"\
|
||||
{$(INCLUDE)}"common\purepal.hpp"\
|
||||
{$(INCLUDE)}"common\pvector.hpp"\
|
||||
{$(INCLUDE)}"common\pvector.tpp"\
|
||||
{$(INCLUDE)}"common\rect.hpp"\
|
||||
{$(INCLUDE)}"common\rgbcolor.hpp"\
|
||||
{$(INCLUDE)}"common\rgbquad.hpp"\
|
||||
{$(INCLUDE)}"common\stdio.hpp"\
|
||||
{$(INCLUDE)}"common\stdlib.hpp"\
|
||||
{$(INCLUDE)}"common\string.hpp"\
|
||||
{$(INCLUDE)}"common\types.hpp"\
|
||||
{$(INCLUDE)}"common\vhandler.hpp"\
|
||||
{$(INCLUDE)}"common\windows.hpp"\
|
||||
{$(INCLUDE)}"common\windowsx.hpp"\
|
||||
{$(INCLUDE)}"mediapak\pakentry.hpp"\
|
||||
|
||||
|
||||
"$(INTDIR)\thmbpage.obj" : $(SOURCE) $(DEP_CPP_THMBP) "$(INTDIR)"
|
||||
|
||||
|
||||
!ELSEIF "$(CFG)" == "browse - Win32 Debug"
|
||||
|
||||
DEP_CPP_THMBP=\
|
||||
"..\..\parts\mssdk\include\basetsd.h"\
|
||||
".\dib24.hpp"\
|
||||
".\jpgimg.hpp"\
|
||||
".\rgb888.hpp"\
|
||||
".\thmbnail.hpp"\
|
||||
".\thmbpage.hpp"\
|
||||
{$(INCLUDE)}"common\array.hpp"\
|
||||
{$(INCLUDE)}"common\assert.hpp"\
|
||||
{$(INCLUDE)}"common\block.hpp"\
|
||||
{$(INCLUDE)}"common\block.tpp"\
|
||||
{$(INCLUDE)}"common\bminfo.hpp"\
|
||||
{$(INCLUDE)}"common\callback.hpp"\
|
||||
{$(INCLUDE)}"common\callback.tpp"\
|
||||
{$(INCLUDE)}"common\cbdata.hpp"\
|
||||
{$(INCLUDE)}"common\cbptr.hpp"\
|
||||
{$(INCLUDE)}"common\dib.hpp"\
|
||||
{$(INCLUDE)}"common\except.hpp"\
|
||||
{$(INCLUDE)}"common\fixup.hpp"\
|
||||
{$(INCLUDE)}"common\gdata.hpp"\
|
||||
{$(INCLUDE)}"common\gdata.tpp"\
|
||||
{$(INCLUDE)}"common\gdiobj.hpp"\
|
||||
{$(INCLUDE)}"common\gdipoint.hpp"\
|
||||
{$(INCLUDE)}"common\guiwnd.hpp"\
|
||||
{$(INCLUDE)}"common\palentry.hpp"\
|
||||
{$(INCLUDE)}"common\pcallbck.hpp"\
|
||||
{$(INCLUDE)}"common\pen.hpp"\
|
||||
{$(INCLUDE)}"common\point.hpp"\
|
||||
{$(INCLUDE)}"common\pointer.hpp"\
|
||||
{$(INCLUDE)}"common\purebmp.hpp"\
|
||||
{$(INCLUDE)}"common\purehdc.hpp"\
|
||||
{$(INCLUDE)}"common\purepal.hpp"\
|
||||
{$(INCLUDE)}"common\pvector.hpp"\
|
||||
{$(INCLUDE)}"common\pvector.tpp"\
|
||||
{$(INCLUDE)}"common\rect.hpp"\
|
||||
{$(INCLUDE)}"common\rgbcolor.hpp"\
|
||||
{$(INCLUDE)}"common\rgbquad.hpp"\
|
||||
{$(INCLUDE)}"common\stdio.hpp"\
|
||||
{$(INCLUDE)}"common\stdlib.hpp"\
|
||||
{$(INCLUDE)}"common\string.hpp"\
|
||||
{$(INCLUDE)}"common\types.hpp"\
|
||||
{$(INCLUDE)}"common\vhandler.hpp"\
|
||||
{$(INCLUDE)}"common\windows.hpp"\
|
||||
{$(INCLUDE)}"common\windowsx.hpp"\
|
||||
{$(INCLUDE)}"mediapak\pakentry.hpp"\
|
||||
|
||||
|
||||
"$(INTDIR)\thmbpage.obj" : $(SOURCE) $(DEP_CPP_THMBP) "$(INTDIR)"
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
||||
103
browse/BROWSE.PLG
Normal file
103
browse/BROWSE.PLG
Normal file
@@ -0,0 +1,103 @@
|
||||
<html>
|
||||
<body>
|
||||
<pre>
|
||||
<h1>Build Log</h1>
|
||||
<h3>
|
||||
--------------------Configuration: bsptree - Win32 Debug--------------------
|
||||
</h3>
|
||||
<h3>Command Lines</h3>
|
||||
Creating temporary file "C:\DOCUME~1\TERNET~1\LOCALS~1\Temp\RSP270.tmp" with contents
|
||||
[
|
||||
/nologo /Gz /MTd /GX /Zi /O2 /I "\work" /I "\parts" /D "_DEBUG" /D "__FLAT__" /D "STRICT" /D "_WINDOWS" /D "WIN32" /Fo".\msvcobj/" /Fd".\msvcobj/" /FD /c
|
||||
"F:\work\BSPTREE\Bsptmpl.cpp"
|
||||
"F:\work\BSPTREE\Rgbtree.cpp"
|
||||
"F:\work\BSPTREE\Stdtmpl.cpp"
|
||||
]
|
||||
Creating command line "cl.exe @C:\DOCUME~1\TERNET~1\LOCALS~1\Temp\RSP270.tmp"
|
||||
Creating command line "link.exe -lib /nologo /out:"..\exe\msbsp.lib" .\msvcobj\Bsptmpl.obj .\msvcobj\Rgbtree.obj .\msvcobj\Stdtmpl.obj "
|
||||
<h3>Output Window</h3>
|
||||
Compiling...
|
||||
Bsptmpl.cpp
|
||||
Rgbtree.cpp
|
||||
Stdtmpl.cpp
|
||||
Generating Code...
|
||||
Creating library...
|
||||
<h3>
|
||||
--------------------Configuration: browse - Win32 Debug--------------------
|
||||
</h3>
|
||||
<h3>Command Lines</h3>
|
||||
Creating temporary file "C:\DOCUME~1\TERNET~1\LOCALS~1\Temp\RSP271.bat" with contents
|
||||
[
|
||||
@echo off
|
||||
c:\tasm32\tasm32 /t /zi /ml /m5 Asmutil.asm
|
||||
]
|
||||
Creating command line "C:\DOCUME~1\TERNET~1\LOCALS~1\Temp\RSP271.bat"
|
||||
Creating command line "rc.exe /l 0x409 /fo"msvcobj/browse.res" /d "_DEBUG" "F:\work\browse\browse.rc""
|
||||
Performing Custom Build Step on .\Asmutil.asm
|
||||
Creating temporary file "C:\DOCUME~1\TERNET~1\LOCALS~1\Temp\RSP272.tmp" with contents
|
||||
[
|
||||
/nologo /MTd /Gm /GX /ZI /Od /I ".." /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "STRICT" /D "__FLAT__" /Fp"msvcobj/browse.pch" /YX /Fo"msvcobj/" /Fd"msvcobj/" /FD /I /work" /I /parts" /I /work" /I /parts" /I /work" /I /parts" /I /work" /I /parts" /I /work" /I /parts" /I /work" /I /parts" " " " " " " " " " " " " /c
|
||||
"F:\work\browse\brwsview.cpp"
|
||||
"F:\work\browse\dib24.cpp"
|
||||
"F:\work\browse\jpgimg.cpp"
|
||||
"F:\work\browse\Main.cpp"
|
||||
"F:\work\browse\mainfrm.cpp"
|
||||
"F:\work\browse\rawimg.cpp"
|
||||
"F:\work\browse\thmbnail.cpp"
|
||||
"F:\work\browse\thmbpage.cpp"
|
||||
]
|
||||
Creating command line "cl.exe @C:\DOCUME~1\TERNET~1\LOCALS~1\Temp\RSP272.tmp"
|
||||
Creating temporary file "C:\DOCUME~1\TERNET~1\LOCALS~1\Temp\RSP273.tmp" with contents
|
||||
[
|
||||
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib comctl32.lib /nologo /subsystem:windows /incremental:yes /pdb:"msvcobj/browse.pdb" /debug /machine:I386 /out:"msvcobj/browse.exe" /pdbtype:sept
|
||||
.\msvcobj\brwsview.obj
|
||||
.\msvcobj\dib24.obj
|
||||
.\msvcobj\jpgimg.obj
|
||||
.\msvcobj\Main.obj
|
||||
.\msvcobj\mainfrm.obj
|
||||
.\msvcobj\rawimg.obj
|
||||
.\msvcobj\thmbnail.obj
|
||||
.\msvcobj\thmbpage.obj
|
||||
.\msvcobj\browse.res
|
||||
"..\..\parts\jpeg-6b\lib\jpeg6b.lib"
|
||||
..\Exe\mediapak.lib
|
||||
..\Exe\mscommon.lib
|
||||
..\Exe\msfileio.lib
|
||||
..\Exe\sample.lib
|
||||
..\Exe\statbar.lib
|
||||
.\Asmutil.obj
|
||||
\work\exe\msbsp.lib
|
||||
]
|
||||
Creating command line "link.exe @C:\DOCUME~1\TERNET~1\LOCALS~1\Temp\RSP273.tmp"
|
||||
<h3>Output Window</h3>
|
||||
Compiling resources...
|
||||
Compiling...
|
||||
brwsview.cpp
|
||||
dib24.cpp
|
||||
jpgimg.cpp
|
||||
Main.cpp
|
||||
mainfrm.cpp
|
||||
rawimg.cpp
|
||||
thmbnail.cpp
|
||||
thmbpage.cpp
|
||||
Linking...
|
||||
.\Asmutil.obj : warning LNK4033: converting object format from OMF to COFF
|
||||
.\Asmutil.obj : warning LNK4033: converting object format from OMF to COFF
|
||||
Creating library msvcobj/browse.lib and object msvcobj/browse.exp
|
||||
jpgimg.obj : error LNK2001: unresolved external symbol "void __cdecl jpeg_destroy_decompress(struct jpeg_decompress_struct *)" (?jpeg_destroy_decompress@@YAXPAUjpeg_decompress_struct@@@Z)
|
||||
jpgimg.obj : error LNK2001: unresolved external symbol "unsigned char __cdecl jpeg_finish_decompress(struct jpeg_decompress_struct *)" (?jpeg_finish_decompress@@YAEPAUjpeg_decompress_struct@@@Z)
|
||||
jpgimg.obj : error LNK2001: unresolved external symbol "unsigned int __cdecl jpeg_read_scanlines(struct jpeg_decompress_struct *,unsigned char * *,unsigned int)" (?jpeg_read_scanlines@@YAIPAUjpeg_decompress_struct@@PAPAEI@Z)
|
||||
jpgimg.obj : error LNK2001: unresolved external symbol "unsigned char __cdecl jpeg_start_decompress(struct jpeg_decompress_struct *)" (?jpeg_start_decompress@@YAEPAUjpeg_decompress_struct@@@Z)
|
||||
jpgimg.obj : error LNK2001: unresolved external symbol "int __cdecl jpeg_read_header(struct jpeg_decompress_struct *,unsigned char)" (?jpeg_read_header@@YAHPAUjpeg_decompress_struct@@E@Z)
|
||||
jpgimg.obj : error LNK2001: unresolved external symbol "void __cdecl jpeg_stdio_src(struct jpeg_decompress_struct *,struct _iobuf *)" (?jpeg_stdio_src@@YAXPAUjpeg_decompress_struct@@PAU_iobuf@@@Z)
|
||||
jpgimg.obj : error LNK2001: unresolved external symbol "void __cdecl jpeg_CreateDecompress(struct jpeg_decompress_struct *,int,unsigned int)" (?jpeg_CreateDecompress@@YAXPAUjpeg_decompress_struct@@HI@Z)
|
||||
msvcobj/browse.exe : fatal error LNK1120: 7 unresolved externals
|
||||
Error executing link.exe.
|
||||
|
||||
|
||||
|
||||
<h3>Results</h3>
|
||||
browse.exe - 8 error(s), 2 warning(s)
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
19
browse/BROWSE.RC
Normal file
19
browse/BROWSE.RC
Normal file
@@ -0,0 +1,19 @@
|
||||
#include <windows.h>
|
||||
#include <browse/browse.h>
|
||||
|
||||
PAINT ICON PAINT.ICO
|
||||
|
||||
mainMenu MENU
|
||||
{
|
||||
POPUP "&File"
|
||||
{
|
||||
MENUITEM "&Open...", FILE_OPEN
|
||||
MENUITEM "E&xit", FILE_EXIT
|
||||
MENUITEM "&Browse", FILE_BROWSE
|
||||
}
|
||||
}
|
||||
|
||||
STRINGTABLE
|
||||
{
|
||||
STRING_IMAGEVIEWCLASSNAME, "ImageView"
|
||||
}
|
||||
44
browse/Browse.dsw
Normal file
44
browse/Browse.dsw
Normal file
@@ -0,0 +1,44 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "browse"=.\browse.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name bsptree
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "bsptree"=..\BSPTREE\bsptree.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
BIN
browse/Browse.ncb
Normal file
BIN
browse/Browse.ncb
Normal file
Binary file not shown.
BIN
browse/Browse.opt
Normal file
BIN
browse/Browse.opt
Normal file
Binary file not shown.
161
browse/HOLD/MEDIAPAK.CPP
Normal file
161
browse/HOLD/MEDIAPAK.CPP
Normal file
@@ -0,0 +1,161 @@
|
||||
#include <browse/mediapak.hpp>
|
||||
|
||||
MediaPak::MediaPak(void)
|
||||
: mEntries(0), mOffsetEntries(0)
|
||||
{
|
||||
}
|
||||
|
||||
MediaPak::MediaPak(const MediaPak &mediaPak)
|
||||
{
|
||||
*this=mediaPak;
|
||||
}
|
||||
|
||||
MediaPak::~MediaPak()
|
||||
{
|
||||
close();
|
||||
}
|
||||
|
||||
MediaPak &MediaPak::operator=(const MediaPak &/*mediaPak*/)
|
||||
{ // private implementation
|
||||
return *this;
|
||||
}
|
||||
|
||||
BOOL MediaPak::open(const String &pathFileName,BOOL creationFlag)
|
||||
{
|
||||
DWORD magic;
|
||||
|
||||
mPakFile.close();
|
||||
mEntries=0;
|
||||
if(creationFlag)
|
||||
{
|
||||
mPakFile.open(pathFileName,FileHandle::ReadWrite,FileHandle::ShareRead,FileHandle::Overwrite);
|
||||
magic=HeaderMagic;
|
||||
mEntries=0;
|
||||
mPakFile.write((unsigned char*)&magic,sizeof(magic));
|
||||
mOffsetEntries=mPakFile.tell();
|
||||
mPakFile.write((unsigned char*)&mEntries,sizeof(mEntries));
|
||||
}
|
||||
else
|
||||
{
|
||||
mPakFile.open(pathFileName,FileHandle::ReadWrite,FileHandle::ShareRead,FileHandle::Open);
|
||||
if(!mPakFile.isOkay())return FALSE;
|
||||
mPakFile.read((unsigned char*)&magic,sizeof(magic));
|
||||
mOffsetEntries=mPakFile.tell();
|
||||
if(magic!=HeaderMagic){mPakFile.close();return FALSE;}
|
||||
mPakFile.read((unsigned char*)&mEntries,sizeof(mEntries));
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void MediaPak::close(void)
|
||||
{
|
||||
if(!mPakFile.isOkay())return;
|
||||
mPakFile.close();
|
||||
}
|
||||
|
||||
BOOL MediaPak::add(const PakEntry &pakEntry)
|
||||
{
|
||||
DWORD entryLength;
|
||||
|
||||
if(!isOkay())return FALSE;
|
||||
mPakFile.seek(mOffsetEntries,FileHandle::SeekBegin);
|
||||
mPakFile.read((unsigned char*)&mEntries,sizeof(mEntries));
|
||||
for(int index=0;index<mEntries;index++)
|
||||
{
|
||||
mPakFile.read((unsigned char*)&entryLength,sizeof(entryLength));
|
||||
mPakFile.seek(entryLength,FileHandle::SeekCurrent);
|
||||
}
|
||||
entryLength=sizeof(int)+sizeof(int)+sizeof(int)+sizeof(int)+pakEntry.name().length()+((PakEntry&)pakEntry).rawData().size(); // sizeof(int)+
|
||||
mPakFile.write((unsigned char*)&entryLength,sizeof(entryLength));
|
||||
mPakFile.write((DWORD)pakEntry.type());
|
||||
mPakFile.write((DWORD)pakEntry.id());
|
||||
mPakFile.write((DWORD)pakEntry.name().length());
|
||||
mPakFile.write((unsigned char*)(char*)pakEntry.name(),pakEntry.name().length());
|
||||
mPakFile.write(((PakEntry&)pakEntry).rawData().size());
|
||||
mPakFile.write((unsigned char*)(BYTE*)&(((PakEntry&)pakEntry).rawData()[0]),((PakEntry&)pakEntry).rawData().size());
|
||||
mEntries++;
|
||||
mPakFile.seek(mOffsetEntries,FileHandle::SeekBegin);
|
||||
mPakFile.write(mEntries);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
DWORD MediaPak::entries(void)const
|
||||
{
|
||||
return mEntries;
|
||||
}
|
||||
|
||||
BOOL MediaPak::getEntry(PakEntry &pakEntry,DWORD entryIndex)
|
||||
{
|
||||
String entryName;
|
||||
int entryLength;
|
||||
int workData;
|
||||
|
||||
if(!mPakFile.isOkay())return FALSE;
|
||||
mPakFile.seek(mOffsetEntries,FileHandle::SeekBegin);
|
||||
mPakFile.read((unsigned char*)&mEntries,sizeof(mEntries));
|
||||
if(entryIndex>=mEntries)return FALSE;
|
||||
for(int index=0;index<entryIndex;index++)
|
||||
{
|
||||
mPakFile.read((unsigned char*)&entryLength,sizeof(entryLength));
|
||||
mPakFile.seek(entryLength,FileHandle::SeekCurrent);
|
||||
}
|
||||
if(!mEntries)return FALSE;
|
||||
mPakFile.read((unsigned char*)&entryLength,sizeof(entryLength));
|
||||
mPakFile.read((unsigned char*)&workData,sizeof(workData));
|
||||
pakEntry.type(PakEntry::EntryType(workData));
|
||||
mPakFile.read((unsigned char*)&workData,sizeof(workData));
|
||||
pakEntry.id(workData);
|
||||
mPakFile.read((unsigned char*)&workData,sizeof(workData));
|
||||
entryName.reserve(workData+1);
|
||||
mPakFile.read((unsigned char *)(char*)entryName,workData);
|
||||
pakEntry.name(entryName);
|
||||
mPakFile.read((unsigned char*)&workData,sizeof(workData));
|
||||
pakEntry.rawData().size(workData);
|
||||
mPakFile.read((unsigned char*)(BYTE*)&(pakEntry.rawData()[0]),workData);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL MediaPak::getEntry(WaveForm &waveForm,DWORD entryIndex)
|
||||
{
|
||||
PakEntry pakEntry;
|
||||
String entryName;
|
||||
int entryLength;
|
||||
int workData;
|
||||
|
||||
if(!mPakFile.isOkay())return FALSE;
|
||||
mPakFile.seek(mOffsetEntries,FileHandle::SeekBegin);
|
||||
mPakFile.read((unsigned char*)&mEntries,sizeof(mEntries));
|
||||
if(entryIndex>=mEntries)return FALSE;
|
||||
for(int index=0;index<entryIndex;index++)
|
||||
{
|
||||
mPakFile.read((unsigned char*)&entryLength,sizeof(entryLength));
|
||||
mPakFile.seek(entryLength,FileHandle::SeekCurrent);
|
||||
}
|
||||
if(!mEntries)return FALSE;
|
||||
mPakFile.read((unsigned char*)&entryLength,sizeof(entryLength));
|
||||
mPakFile.read((unsigned char*)&workData,sizeof(workData));
|
||||
pakEntry.type(PakEntry::EntryType(workData));
|
||||
if(PakEntry::Sound!=pakEntry.type())return FALSE;
|
||||
mPakFile.read((unsigned char*)&workData,sizeof(workData));
|
||||
pakEntry.id(workData);
|
||||
mPakFile.read((unsigned char*)&workData,sizeof(workData));
|
||||
entryName.reserve(workData+1);
|
||||
mPakFile.read((unsigned char *)(char*)entryName,workData);
|
||||
pakEntry.name(entryName);
|
||||
mPakFile.read((unsigned char*)&workData,sizeof(workData));
|
||||
pakEntry.rawData().size(workData);
|
||||
return waveForm<<mPakFile;
|
||||
}
|
||||
|
||||
BOOL MediaPak::isOkay(void)const
|
||||
{
|
||||
return mPakFile.isOkay();
|
||||
}
|
||||
|
||||
// "MPAK0100" 40h,50h,41h,4Bh
|
||||
// ENTRIES DD
|
||||
// SIZE DD { THIS IS SIZEOF(TYPE)+SIZEOF(OFFSET)+SIZEOF(NAME)+SIZEOF(DATA)
|
||||
// TYPE DD {SOUND=0}
|
||||
// OFFSET DD
|
||||
// NAME { LENGTH DD, NAMEBYTES DB }
|
||||
// DATA
|
||||
37
browse/HOLD/MEDIAPAK.HPP
Normal file
37
browse/HOLD/MEDIAPAK.HPP
Normal file
@@ -0,0 +1,37 @@
|
||||
#ifndef _BROWSE_MEDIAPAK_HPP_
|
||||
#define _BROWSE_MEDIAPAK_HPP_
|
||||
#ifndef _COMMON_WINDOWS_HPP_
|
||||
#include <common/windows.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_OPENFILE_HPP_
|
||||
#include <common/openfile.hpp>
|
||||
#endif
|
||||
#ifndef _SAMPLE_WAVEFORM_HPP_
|
||||
#include <sample/wave.hpp>
|
||||
#endif
|
||||
#ifndef _BROWSE_PAKENTRY_HPP_
|
||||
#include <browse/pakentry.hpp>
|
||||
#endif
|
||||
|
||||
class MediaPak
|
||||
{
|
||||
public:
|
||||
MediaPak(void);
|
||||
virtual ~MediaPak();
|
||||
BOOL open(const String &pathFileName,BOOL creationFlag=FALSE);
|
||||
void close(void);
|
||||
BOOL add(const PakEntry &pakEntry);
|
||||
BOOL getEntry(PakEntry &pakEntry,DWORD entryIndex);
|
||||
BOOL getEntry(WaveForm &waveForm,DWORD entryIndex);
|
||||
DWORD entries(void)const;
|
||||
BOOL isOkay(void)const;
|
||||
private:
|
||||
enum {HeaderMagic=0x4050414E};
|
||||
MediaPak(const MediaPak &mediaPak);
|
||||
MediaPak &operator=(const MediaPak &mediaPak);
|
||||
|
||||
FileHandle mPakFile;
|
||||
DWORD mEntries;
|
||||
DWORD mOffsetEntries;
|
||||
};
|
||||
#endif
|
||||
117
browse/HOLD/PAKENTRY.HPP
Normal file
117
browse/HOLD/PAKENTRY.HPP
Normal file
@@ -0,0 +1,117 @@
|
||||
#ifndef _BROWSE_PAKENTRY_HPP_
|
||||
#define _BROWSE_PAKENTRY_HPP_
|
||||
#ifndef _COMMON_WINDOWS_HPP_
|
||||
#include <common/windows.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_STRING_HPP_
|
||||
#include <common/string.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_GLOBALDATA_HPP_
|
||||
#include <common/gdata.hpp>
|
||||
#endif
|
||||
|
||||
class PakEntry
|
||||
{
|
||||
public:
|
||||
enum EntryType{Sound,Bitmap,Blob};
|
||||
PakEntry(void);
|
||||
PakEntry(const PakEntry &pakEntry);
|
||||
virtual ~PakEntry();
|
||||
PakEntry &operator=(const PakEntry &pakEntry);
|
||||
BOOL operator==(const PakEntry &pakEntry)const;
|
||||
EntryType type(void)const;
|
||||
void type(EntryType entryType);
|
||||
const String &name(void)const;
|
||||
void name(const String &name);
|
||||
int id(void)const;
|
||||
void id(int id);
|
||||
GlobalData<BYTE> &rawData(void);
|
||||
void rawData(GlobalData<BYTE> &rawData);
|
||||
private:
|
||||
EntryType mEntryType;
|
||||
int mID;
|
||||
String mName;
|
||||
GlobalData<BYTE> mRawData;
|
||||
};
|
||||
|
||||
inline
|
||||
PakEntry::PakEntry(void)
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
PakEntry::PakEntry(const PakEntry &pakEntry)
|
||||
{
|
||||
*this=pakEntry;
|
||||
}
|
||||
|
||||
inline
|
||||
PakEntry::~PakEntry()
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
PakEntry &PakEntry::operator=(const PakEntry &pakEntry)
|
||||
{
|
||||
type(pakEntry.type());
|
||||
name(pakEntry.name());
|
||||
rawData(((PakEntry&)pakEntry).rawData());
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline
|
||||
BOOL PakEntry::operator==(const PakEntry &pakEntry)const
|
||||
{
|
||||
return (type()==pakEntry.type()&&
|
||||
name()==pakEntry.name()&&
|
||||
((PakEntry&)*this).rawData()==((PakEntry&)pakEntry).rawData());
|
||||
}
|
||||
|
||||
inline
|
||||
PakEntry::EntryType PakEntry::type(void)const
|
||||
{
|
||||
return mEntryType;
|
||||
}
|
||||
|
||||
inline
|
||||
void PakEntry::type(EntryType entryType)
|
||||
{
|
||||
mEntryType=entryType;
|
||||
}
|
||||
|
||||
inline
|
||||
const String &PakEntry::name(void)const
|
||||
{
|
||||
return mName;
|
||||
}
|
||||
|
||||
inline
|
||||
void PakEntry::name(const String &name)
|
||||
{
|
||||
mName=name;
|
||||
}
|
||||
|
||||
inline
|
||||
int PakEntry::id(void)const
|
||||
{
|
||||
return mID;
|
||||
}
|
||||
|
||||
inline
|
||||
void PakEntry::id(int id)
|
||||
{
|
||||
mID=id;
|
||||
}
|
||||
|
||||
inline
|
||||
GlobalData<BYTE> &PakEntry::rawData(void)
|
||||
{
|
||||
return mRawData;
|
||||
}
|
||||
|
||||
inline
|
||||
void PakEntry::rawData(GlobalData<BYTE> &rawData)
|
||||
{
|
||||
mRawData=rawData;
|
||||
}
|
||||
#endif
|
||||
13
browse/Main.cpp
Normal file
13
browse/Main.cpp
Normal file
@@ -0,0 +1,13 @@
|
||||
#include <common/windows.hpp>
|
||||
#include <browse/mainfrm.hpp>
|
||||
|
||||
int PASCAL WinMain(HINSTANCE /*hInstance*/,HINSTANCE /*hPrevInstance*/,LPSTR /*lpszCmdLine*/,int /*nCmdShow*/)
|
||||
{
|
||||
MainFrame mainFrame;
|
||||
mainFrame.createWindow("PROTO","Proto","mainMenu","paint");
|
||||
mainFrame.messageLoop();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
172
browse/Mainfrm.cpp
Normal file
172
browse/Mainfrm.cpp
Normal file
@@ -0,0 +1,172 @@
|
||||
#include <browse/mainfrm.hpp>
|
||||
#include <browse/browse.hpp>
|
||||
#include <browse/brwsview.hpp>
|
||||
#include <statbar/statbarx.hpp>
|
||||
|
||||
MainFrame::MainFrame(void)
|
||||
{
|
||||
mPaintHandler.setCallback(this,&MainFrame::paintHandler);
|
||||
mCloseHandler.setCallback(this,&MainFrame::closeHandler);
|
||||
mQueryEndSessionHandler.setCallback(this,&MainFrame::queryEndSessionHandler);
|
||||
mDestroyHandler.setCallback(this,&MainFrame::destroyHandler);
|
||||
mCommandHandler.setCallback(this,&MainFrame::commandHandler);
|
||||
mKeyDownHandler.setCallback(this,&MainFrame::keyDownHandler);
|
||||
mSizeHandler.setCallback(this,&MainFrame::sizeHandler);
|
||||
mCreateHandler.setCallback(this,&MainFrame::createHandler);
|
||||
insertHandlers();
|
||||
}
|
||||
|
||||
MainFrame::~MainFrame()
|
||||
{
|
||||
removeHandlers();
|
||||
}
|
||||
|
||||
void MainFrame::insertHandlers(void)
|
||||
{
|
||||
FrameWindow::insertHandler(MainFrame::DestroyHandler,&mDestroyHandler);
|
||||
FrameWindow::insertHandler(VectorHandler::PaintHandler,&mPaintHandler);
|
||||
FrameWindow::insertHandler(VectorHandler::CommandHandler,&mCommandHandler);
|
||||
FrameWindow::insertHandler(VectorHandler::SizeHandler,&mSizeHandler);
|
||||
FrameWindow::insertHandler(VectorHandler::KeyDownHandler,&mKeyDownHandler);
|
||||
FrameWindow::insertHandler(VectorHandler::CloseHandler,&mCloseHandler);
|
||||
FrameWindow::insertHandler(VectorHandler::QueryEndSessionHandler,&mQueryEndSessionHandler);
|
||||
FrameWindow::insertHandler(VectorHandler::CreateHandler,&mCreateHandler);
|
||||
}
|
||||
|
||||
void MainFrame::removeHandlers(void)
|
||||
{
|
||||
FrameWindow::removeHandler(VectorHandler::DestroyHandler,&mDestroyHandler);
|
||||
FrameWindow::removeHandler(VectorHandler::PaintHandler,&mPaintHandler);
|
||||
FrameWindow::removeHandler(VectorHandler::CommandHandler,&mCommandHandler);
|
||||
FrameWindow::removeHandler(VectorHandler::SizeHandler,&mSizeHandler);
|
||||
FrameWindow::removeHandler(VectorHandler::KeyDownHandler,&mKeyDownHandler);
|
||||
FrameWindow::removeHandler(VectorHandler::CreateHandler,&mCreateHandler);
|
||||
FrameWindow::removeHandler(VectorHandler::CloseHandler,&mCloseHandler);
|
||||
FrameWindow::removeHandler(VectorHandler::QueryEndSessionHandler,&mQueryEndSessionHandler);
|
||||
}
|
||||
|
||||
CallbackData::ReturnType MainFrame::commandHandler(CallbackData &someCallbackData)
|
||||
{
|
||||
switch(someCallbackData.wParam())
|
||||
{
|
||||
case IDM_CASCADE :
|
||||
cascade();
|
||||
break;
|
||||
case IDM_TILE :
|
||||
tile();
|
||||
break;
|
||||
case IDM_ARRANGE :
|
||||
arrange();
|
||||
break;
|
||||
case IDM_CLOSEALL :
|
||||
closeAll();
|
||||
break;
|
||||
case IDM_MINIMIZEALL :
|
||||
minimizeAll();
|
||||
break;
|
||||
case IDM_RESTOREALL :
|
||||
restoreAll();
|
||||
break;
|
||||
case FILE_BROWSE :
|
||||
handleFileBrowse();
|
||||
break;
|
||||
default :
|
||||
break;
|
||||
}
|
||||
return (CallbackData::ReturnType)FALSE;
|
||||
}
|
||||
|
||||
CallbackData::ReturnType MainFrame::keyDownHandler(CallbackData &/*someCallbackData*/)
|
||||
{
|
||||
return (CallbackData::ReturnType)FALSE;
|
||||
}
|
||||
|
||||
CallbackData::ReturnType MainFrame::paintHandler(CallbackData &/*someCallbackData*/)
|
||||
{
|
||||
return (CallbackData::ReturnType)FALSE;
|
||||
}
|
||||
|
||||
CallbackData::ReturnType MainFrame::createHandler(CallbackData &/*someCallbackData*/)
|
||||
{
|
||||
createControls();
|
||||
show(SW_SHOW);
|
||||
update();
|
||||
mStatusControl->setText("Ready.");
|
||||
return (CallbackData::ReturnType)FALSE;
|
||||
}
|
||||
|
||||
CallbackData::ReturnType MainFrame::queryEndSessionHandler(CallbackData &someCallbackData)
|
||||
{
|
||||
if(getClient().hasChildren())return (CallbackData::ReturnType)FALSE;
|
||||
return (CallbackData::ReturnType)FALSE;
|
||||
}
|
||||
|
||||
CallbackData::ReturnType MainFrame::closeHandler(CallbackData &someCallbackData)
|
||||
{
|
||||
destroy();
|
||||
return (CallbackData::ReturnType)FALSE;
|
||||
}
|
||||
|
||||
CallbackData::ReturnType MainFrame::destroyHandler(CallbackData &/*someCallbackData*/)
|
||||
{
|
||||
removeHandlers();
|
||||
::PostQuitMessage(0);
|
||||
return (CallbackData::ReturnType)FALSE;
|
||||
}
|
||||
|
||||
CallbackData::ReturnType MainFrame::sizeHandler(CallbackData &someCallbackData)
|
||||
{
|
||||
Rect statusRect;
|
||||
Rect cRect;
|
||||
|
||||
mStatusControl->windowRect(statusRect);
|
||||
cRect.right(someCallbackData.loWord());
|
||||
cRect.bottom(someCallbackData.hiWord());
|
||||
getClient().moveWindow(0,0,cRect.right(),cRect.bottom()-(statusRect.bottom()-statusRect.top()));
|
||||
return (CallbackData::ReturnType)FALSE;
|
||||
}
|
||||
|
||||
void MainFrame::createControls(void)
|
||||
{
|
||||
Rect controlRect;
|
||||
Rect statusRect;
|
||||
|
||||
mStatusControl=::new StatusBarEx(*this,StatusBarID);
|
||||
mStatusControl.disposition(PointerDisposition::Delete);
|
||||
mStatusControl->clientRect(statusRect);
|
||||
controlRect.bottom(height()/2-statusRect.bottom());
|
||||
}
|
||||
|
||||
BrowseView &MainFrame::createBrowseView(void)
|
||||
{
|
||||
SmartPointer<MDIWindow> mdiWindow;
|
||||
BrowseView *pBrowseView;
|
||||
|
||||
if(getDocumentClass("BrowseView",mdiWindow)){mdiWindow->top();return (BrowseView&)*mdiWindow;}
|
||||
insert(*(pBrowseView=::new BrowseView));
|
||||
operator[](size()-1).createWindow(*this,"BrowseView","Browse","mainMenu","PAINT");
|
||||
return *pBrowseView;
|
||||
}
|
||||
|
||||
void MainFrame::handleFileBrowse(void)
|
||||
{
|
||||
BrowseView &browseView=createBrowseView();
|
||||
// browseView.browse("d:\\download\\altbin~1.den");
|
||||
browseView.browse("d:\\download\\altbin~1.den");
|
||||
// browseView.browse("d:\\download\\altbin~1.pho");
|
||||
// browseView.browse("c:\\work\\nntp\\news\\altbin~1.den");
|
||||
}
|
||||
|
||||
// ** virtuals
|
||||
|
||||
void MainFrame::mdiDestroy(MDIWindow &mdiWindow)
|
||||
{
|
||||
}
|
||||
|
||||
void MainFrame::mdiActivate(MDIWindow &mdiWindow)
|
||||
{
|
||||
}
|
||||
|
||||
void MainFrame::mdiDeactivate(MDIWindow &mdiWindow)
|
||||
{
|
||||
}
|
||||
BIN
browse/PAINT.ICO
Normal file
BIN
browse/PAINT.ICO
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 766 B |
290
browse/Scraps.txt
Normal file
290
browse/Scraps.txt
Normal file
@@ -0,0 +1,290 @@
|
||||
|
||||
#if 0
|
||||
Point xyPoint;
|
||||
|
||||
|
||||
GDIPoint gdiPoint;
|
||||
getDimensions(guiWindow,gdiPoint);
|
||||
|
||||
for(int index=0;index<mThumbNails.size();index++)
|
||||
{
|
||||
SmartPointer<ThumbNail> &ptrThumbNail=mThumbNails[index];
|
||||
if(xyPoint.x()+ptrThumbNail->width()>=guiWindow.width())
|
||||
{
|
||||
xyPoint.x(0);
|
||||
xyPoint.y(xyPoint.y()+ptrThumbNail->height()+Separator);
|
||||
}
|
||||
ptrThumbNail->draw(pureDevice,xyPoint);
|
||||
xyPoint.x(xyPoint.x()+ptrThumbNail->width()+Separator);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
// cursorControl.waitCursor(TRUE);
|
||||
// setTitle(strPathDirectory);
|
||||
// getDirectoryFileNames(strPathDirectory,strPathFileNames);
|
||||
// int usage;
|
||||
// for(int index=0;index<strPathFileNames.size();index++)
|
||||
// {
|
||||
// String strPathFileName(strPathDirectory+String("\\")+strPathFileNames[index]);
|
||||
// mThumbPage.insert(strPathFileName,pureDevice);
|
||||
// if(index>3)break;
|
||||
// }
|
||||
// cursorControl.waitCursor(FALSE);
|
||||
|
||||
|
||||
|
||||
// pureDevice.colorRect(Rect(xyPoint.x()+1,xyPoint.y()+1,(xyPoint.x()+width())-2,(xyPoint.y()+height())-2),getFillColor());
|
||||
|
||||
|
||||
// String strCaption;
|
||||
// String strString;
|
||||
// windowText(strCaption);
|
||||
// strString=strCaption;
|
||||
// strCaption=strCaption.betweenString(0,' ');
|
||||
// if(strCaption.isNull())strCaption=strString;
|
||||
/// strCaption+=String(" - [")+strTitle+String("]");
|
||||
// setCaption(strCaption);
|
||||
|
||||
|
||||
|
||||
|
||||
#if 0
|
||||
if(mMediaPak.entries())
|
||||
{
|
||||
GlobalData<BYTE> pakData;
|
||||
PakEntry pakEntry;
|
||||
for(int index=0;index<mMediaPak.entries();index++)
|
||||
{
|
||||
mMediaPak.getEntry(pakEntry,index);
|
||||
mThumbPage.insert(pakEntry,pureDevice);
|
||||
}
|
||||
merge(mMediaPak,strPathFileNames,strPathDirectory,pureDevice);
|
||||
}
|
||||
else
|
||||
{
|
||||
// setTitle(strPathDirectory);
|
||||
// getDirectoryFileNames(strPathDirectory,strPathFileNames);
|
||||
for(int index=0;index<strPathFileNames.size();index++)
|
||||
{
|
||||
GlobalData<BYTE> rawData;
|
||||
PakEntry pakEntry;
|
||||
|
||||
String strPathFileName(strPathDirectory+String("\\")+strPathFileNames[index]);
|
||||
mThumbPage.insert(strPathFileName,pureDevice);
|
||||
mThumbPage[mThumbPage.entries()-1].getRawData(rawData);
|
||||
pakEntry.type(PakEntry::Blob);
|
||||
pakEntry.name(strPathFileNames[index]);
|
||||
pakEntry.id(mMediaPak.entries());
|
||||
pakEntry.rawData(rawData);
|
||||
mMediaPak.add(pakEntry);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
// merge(mMediaPak,strPathFileNames,strPathDirectory,pureDevice);
|
||||
// for(int index=0;index<mMediaPak.entries();index++)
|
||||
// {
|
||||
// mMediaPak.getEntry(pakEntry,index);
|
||||
// mThumbPage.insert(pakEntry,pureDevice);
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
void BrowseView::analyze(PakEntry &pakEntry)
|
||||
{
|
||||
GlobalData<BYTE> &rawData=pakEntry.rawData();
|
||||
int span=0;
|
||||
int maxSpan=0;
|
||||
int numSpans=0;
|
||||
int totalSpans=0;
|
||||
int avgSpans;
|
||||
BYTE currByte;
|
||||
|
||||
for(int index=0;index<rawData.size();index++)
|
||||
{
|
||||
if(!index)currByte=rawData[index];
|
||||
else
|
||||
{
|
||||
if(rawData[index]==currByte)span++;
|
||||
else
|
||||
{
|
||||
if(span>maxSpan)maxSpan=span;
|
||||
totalSpans+=span;
|
||||
span=0;
|
||||
currByte=rawData[index];
|
||||
numSpans++;
|
||||
}
|
||||
}
|
||||
}
|
||||
avgSpans=totalSpans/numSpans;
|
||||
}
|
||||
|
||||
|
||||
analyze(pakEntry);
|
||||
|
||||
|
||||
|
||||
void BrowseView::analyze(PakEntry &pakEntry)
|
||||
{
|
||||
GlobalData<BYTE> &rawData=pakEntry.rawData();
|
||||
int span=0;
|
||||
int maxSpan=0;
|
||||
int numSpans=0;
|
||||
int totalSpans=0;
|
||||
int avgSpans;
|
||||
BYTE currByte;
|
||||
|
||||
for(int index=0;index<rawData.size();index++)
|
||||
{
|
||||
if(!index)currByte=rawData[index];
|
||||
else
|
||||
{
|
||||
if(rawData[index]==currByte)span++;
|
||||
else
|
||||
{
|
||||
if(span>maxSpan)maxSpan=span;
|
||||
totalSpans+=span;
|
||||
span=0;
|
||||
currByte=rawData[index];
|
||||
numSpans++;
|
||||
}
|
||||
}
|
||||
}
|
||||
avgSpans=totalSpans/numSpans;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef _BROWSE_IMAGERAW_HPP_
|
||||
#define _BROWSE_IMAGERAW_HPP_
|
||||
|
||||
class DIB24Raw
|
||||
{
|
||||
public:
|
||||
DIB24Raw(void);
|
||||
DIB24Raw(const DIB24Raw &someDIB24Raw);
|
||||
DIB24Raw &operator=(const DIB24Raw &someDIB24Raw);
|
||||
BitmapInfo &getBitmapInfo(void);
|
||||
void setBitmapInfo(const BitmapInfo &someBitmapInfo);
|
||||
Array<RGB888> &getRGBArray(void);
|
||||
void setRGBArray(Array<RGB888> &someRGBArray);
|
||||
private:
|
||||
BitmapInfo mBitmapInfo;
|
||||
Array<RGB888> mRGBArray;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
bool getRawData(GlobalData<BYTE> &rawData);
|
||||
bool setRawData(GlobalData<BYTE> &rawData,PureDevice &pureDevice);
|
||||
RGB888 getAt(DWORD row,DWORD col)const;
|
||||
private:
|
||||
JPGImage(const JPGImage &someJPGImage);
|
||||
JPGImage &operator=(const JPGImage &someJPGImage);
|
||||
void verifyDimensions(BitmapInfo &someBitmapInfo);
|
||||
void destroy(void);
|
||||
|
||||
HBITMAP mhBitmap;
|
||||
BitmapInfo mBitmapInfo;
|
||||
Array<RGB888> mRGBArray;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#include <mediapak/mediapak.hpp>
|
||||
|
||||
|
||||
|
||||
String strPathFileName("d:\\download\\altbin~1.den.pak");
|
||||
String strString;
|
||||
MediaPak mediaPak;
|
||||
PakEntry pakEntry;
|
||||
DWORD elapsedTime;
|
||||
DWORD entries;
|
||||
|
||||
mediaPak.open(strPathFileName,MediaPak::OpenAlways);
|
||||
entries=mediaPak.entries();
|
||||
if(!entries)return 0;
|
||||
elapsedTime=::GetTickCount();
|
||||
for(int index=0;index<entries;index++)
|
||||
{
|
||||
mediaPak.getEntry(pakEntry,index);
|
||||
}
|
||||
::sprintf(strString,"time:%d seconds\n",(::GetTickCount()-elapsedTime)/1000);
|
||||
::OutputDebugString(strString);
|
||||
|
||||
|
||||
if(xyPoint.x()+ptrThumbNail->width()>=mDIB24.width()||xyPoint.y()+ptrThumbNail->height()>=mDIB24.height())break;
|
||||
|
||||
bool ThumbPage::createBitmap(GUIWindow &guiWindow)
|
||||
{
|
||||
PureDevice pureDevice(guiWindow);
|
||||
// PureDevice compatibleDevice;
|
||||
GDIPoint gdiPoint;
|
||||
|
||||
if(!mThumbNails.size()||!guiWindow.isValid())return false;
|
||||
if(!getDimensions(guiWindow,gdiPoint))return false;
|
||||
mDIB24.create(gdiPoint.x(),-gdiPoint.y(),pureDevice);
|
||||
mDIB24.setBits(BkColorBits);
|
||||
// compatibleDevice.compatibleDevice(pureDevice);
|
||||
// compatibleDevice.select(mDIB24.getBitmap());
|
||||
drawThumbNails(compatibleDevice,guiWindow);
|
||||
isDirty(false);
|
||||
return mDIB24.isOkay();
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool DIB24::setAt(DWORD row,DWORD col,JPGImage &jpgImage)
|
||||
{
|
||||
DWORD srcWidth;
|
||||
DWORD srcHeight;
|
||||
DWORD dstWidth;
|
||||
DWORD dstHeight;
|
||||
RGB888 rgb888;
|
||||
|
||||
if(!isOkay())return false;
|
||||
srcWidth=jpgImage.width();
|
||||
srcHeight=jpgImage.height();
|
||||
dstWidth=mBitmapInfo.width();
|
||||
dstHeight=mBitmapInfo.height()<0?-mBitmapInfo.height():mBitmapInfo.height();
|
||||
for(int srcRow=0,dstRow=row;srcRow<srcHeight;srcRow++,dstRow++)
|
||||
{
|
||||
RGB888 *ptrSrcCol;
|
||||
RGB888 *ptrDstCol;
|
||||
|
||||
DWORD srcCol=0;
|
||||
DWORD dstCol=col;
|
||||
|
||||
if(jpgImage.mBitmapInfo.height()<0)ptrSrcCol=&jpgImage.mRGBArray[srcRow*jpgImage.width()+srcCol];
|
||||
else ptrSrcCol=&jpgImage.mRGBArray[(jpgImage.mBitmapInfo.width()*(-jpgImage.mBitmapInfo.height()))-(((srcRow*jpgImage.mBitmapInfo.width())+jpgImage.mBitmapInfo.width()))+srcCol];
|
||||
if(mBitmapInfo.height()<0)ptrDstCol=&mpRGBArray[dstRow*width()+dstCol];
|
||||
else ptrDstCol=&mpRGBArray[(mBitmapInfo.width()*(-mBitmapInfo.height()))-(((dstRow*mBitmapInfo.width())+mBitmapInfo.width()))+dstCol];
|
||||
::memcpy(ptrDstCol,ptrSrcCol,srcWidth*sizeof(RGB888));
|
||||
// for(int srcCol=0,dstCol=col;srcCol<srcWidth;srcCol++,dstCol++)
|
||||
// {
|
||||
// jpgImage.getAt(srcRow,srcCol,rgb888);
|
||||
// setAt(dstRow,dstCol,rgb888);
|
||||
// }
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
inline
|
||||
bool ThumbNail::setImage(const String &strPathFileName,PureDevice &pureDevice)
|
||||
{
|
||||
mImage.decode(strPathFileName,pureDevice);
|
||||
if(!mImage.isOkay())return false;
|
||||
mStrPathFileName=strPathFileName;
|
||||
// mImage.resample(pureDevice,DefaultResampleWidth);
|
||||
mImage.resample(pureDevice,DefaultResampleWidth,DefaultResampleWidth);
|
||||
return true;
|
||||
}
|
||||
11
browse/asmutil.hpp
Normal file
11
browse/asmutil.hpp
Normal file
@@ -0,0 +1,11 @@
|
||||
#ifndef _BROWSE_ASMUTIL_HPP_
|
||||
#define _BROWSE_ASMUTIL_HPP_
|
||||
|
||||
class RGB888;
|
||||
|
||||
extern "C"
|
||||
{
|
||||
resampleClipRow(RGB888 *lpIn,RGB888 *lpOut,DWORD inLen,DWORD outLen,DWORD outClamp);
|
||||
resampleClipCol(RGB888 *lpIn,RGB888 *lpOut,DWORD inLen,DWORD inWidth,DWORD outLen,DWORD outWidth,DWORD outClamp);
|
||||
}
|
||||
#endif
|
||||
176
browse/browse.001
Normal file
176
browse/browse.001
Normal file
@@ -0,0 +1,176 @@
|
||||
# Microsoft Developer Studio Project File - Name="browse" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
||||
|
||||
CFG=browse - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "browse.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "browse.mak" CFG="browse - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "browse - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "browse - Win32 Debug" (based on "Win32 (x86) Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "browse - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "browse - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "msvcobj"
|
||||
# PROP Intermediate_Dir "msvcobj"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /Zp1 /MTd /Gm /GX /Zi /Od /I "/work" /I "/parts" /I ".." /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "STRICT" /D "__FLAT__" /YX /FD /I /work" /I /parts" /I /work" /I /parts" /I /work" /I /parts" /I /work" /I /parts" /I /work" /I /parts" " " " " " " " " " " /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib comctl32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "browse - Win32 Release"
|
||||
# Name "browse - Win32 Debug"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Asmutil.asm
|
||||
|
||||
!IF "$(CFG)" == "browse - Win32 Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "browse - Win32 Debug"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=.\Asmutil.asm
|
||||
InputName=Asmutil
|
||||
|
||||
"$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
tasm32 /t /zi /ml /m5 $(InputName).asm
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\browse.rc
|
||||
|
||||
!IF "$(CFG)" == "browse - Win32 Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "browse - Win32 Debug"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\brwsview.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\dib24.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE="..\..\parts\jpeg-6b\lib\jpeg6b.lib"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\jpgimg.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Main.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\mainfrm.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Exe\mediapak.lib
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Exe\mscommon.lib
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Exe\msfileio.lib
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\rawimg.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Exe\sample.lib
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Exe\statbar.lib
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\thmbnail.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\thmbpage.cpp
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
170
browse/browse.dsp
Normal file
170
browse/browse.dsp
Normal file
@@ -0,0 +1,170 @@
|
||||
# Microsoft Developer Studio Project File - Name="browse" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
||||
|
||||
CFG=browse - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "browse.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "browse.mak" CFG="browse - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "browse - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "browse - Win32 Debug" (based on "Win32 (x86) Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "browse - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "browse - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "msvcobj"
|
||||
# PROP Intermediate_Dir "msvcobj"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /MTd /Gm /GX /ZI /Od /I ".." /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "STRICT" /D "__FLAT__" /YX /FD /I /work" /I /parts" /I /work" /I /parts" /I /work" /I /parts" /I /work" /I /parts" /I /work" /I /parts" /I /work" /I /parts" " " " " " " " " " " " " /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib comctl32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "browse - Win32 Release"
|
||||
# Name "browse - Win32 Debug"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Asmutil.asm
|
||||
|
||||
!IF "$(CFG)" == "browse - Win32 Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "browse - Win32 Debug"
|
||||
|
||||
# Begin Custom Build
|
||||
InputPath=.\Asmutil.asm
|
||||
InputName=Asmutil
|
||||
|
||||
"$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
c:\tasm32\tasm32 /t /zi /ml /m5 $(InputName).asm
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\browse.rc
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\brwsview.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\dib24.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\jpgimg.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Main.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\mainfrm.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\rawimg.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\thmbnail.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\thmbpage.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE="..\..\parts\jpeg-6b\lib\jpeg6b.lib"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Exe\mediapak.lib
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Exe\mscommon.lib
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Exe\msfileio.lib
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Exe\sample.lib
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Exe\statbar.lib
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
5
browse/browse.hpp
Normal file
5
browse/browse.hpp
Normal file
@@ -0,0 +1,5 @@
|
||||
#ifndef _BROWSE_BROWSE_HPP_
|
||||
#define _BROWSE_BROWSE_HPP_
|
||||
#include <browse/browse.h>
|
||||
#endif
|
||||
|
||||
238
browse/brwsview.cpp
Normal file
238
browse/brwsview.cpp
Normal file
@@ -0,0 +1,238 @@
|
||||
#include <browse/brwsview.hpp>
|
||||
#include <browse/thmbnail.hpp>
|
||||
#include <mediapak/entryinf.hpp>
|
||||
#include <bsptree/btree.hpp>
|
||||
#include <statbar/statbarx.hpp>
|
||||
#include <common/crsctrl.hpp>
|
||||
#include <common/pathfnd.hpp>
|
||||
#include <common/brush.hpp>
|
||||
#include <common/pen.hpp>
|
||||
|
||||
BrowseView::BrowseView(void)
|
||||
{
|
||||
mCreateHandler.setCallback(this,&BrowseView::createHandler);
|
||||
mSizeHandler.setCallback(this,&BrowseView::sizeHandler);
|
||||
mPaintHandler.setCallback(this,&BrowseView::paintHandler);
|
||||
mHorizontalScrollHandler.setCallback(this,&BrowseView::horizontalScrollHandler);
|
||||
mVerticalScrollHandler.setCallback(this,&BrowseView::verticalScrollHandler);
|
||||
mLeftButtonDoubleHandler.setCallback(this,&BrowseView::leftButtonDoubleHandler);
|
||||
insertHandler(VectorHandler::CreateHandler,&mCreateHandler);
|
||||
insertHandler(VectorHandler::SizeHandler,&mSizeHandler);
|
||||
insertHandler(VectorHandler::PaintHandler,&mPaintHandler);
|
||||
insertHandler(VectorHandler::VerticalScrollHandler,&mVerticalScrollHandler);
|
||||
insertHandler(VectorHandler::HorizontalScrollHandler,&mHorizontalScrollHandler);
|
||||
insertHandler(VectorHandler::LeftButtonDoubleHandler,&mLeftButtonDoubleHandler);
|
||||
}
|
||||
|
||||
BrowseView::~BrowseView()
|
||||
{
|
||||
removeHandler(VectorHandler::CreateHandler,&mCreateHandler);
|
||||
removeHandler(VectorHandler::SizeHandler,&mSizeHandler);
|
||||
removeHandler(VectorHandler::PaintHandler,&mPaintHandler);
|
||||
removeHandler(VectorHandler::VerticalScrollHandler,&mVerticalScrollHandler);
|
||||
removeHandler(VectorHandler::HorizontalScrollHandler,&mHorizontalScrollHandler);
|
||||
removeHandler(VectorHandler::LeftButtonDoubleHandler,&mLeftButtonDoubleHandler);
|
||||
}
|
||||
|
||||
CallbackData::ReturnType BrowseView::createHandler(CallbackData &someCallbackData)
|
||||
{
|
||||
mScrollInfo.hwndOwner(*this);
|
||||
setTitle("None");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
CallbackData::ReturnType BrowseView::sizeHandler(CallbackData &someCallbackData)
|
||||
{
|
||||
if(mThumbPage.rowItems()!=mThumbPage.rowItems(*this))
|
||||
{
|
||||
CursorControl cursorControl;
|
||||
cursorControl.waitCursor(true);
|
||||
mThumbPage.isDirty(true);
|
||||
mThumbPage.update(*this);
|
||||
mScrollInfo.scrollableObjectDimensions(mThumbPage.width(),mThumbPage.height());
|
||||
cursorControl.waitCursor(false);
|
||||
}
|
||||
mScrollInfo.handleSize(someCallbackData);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
CallbackData::ReturnType BrowseView::paintHandler(CallbackData &someCallbackData)
|
||||
{
|
||||
PaintInformation &paintInfo=*((PaintInformation*)someCallbackData.lParam());
|
||||
PureDevice &paintDevice=(PureDevice&)paintInfo;
|
||||
if(mScrollInfo.sizeEvent())
|
||||
{
|
||||
mScrollInfo.sizeEvent(FALSE);
|
||||
mThumbPage.draw(paintDevice,Rect(0,0,mThumbPage.width(),mThumbPage.height()),Point(mScrollInfo.currScrollx(),mScrollInfo.currScrolly()));
|
||||
}
|
||||
if(mScrollInfo.scrollEvent()||(!mScrollInfo.sizeEvent()&&!mScrollInfo.scrollEvent()))
|
||||
{
|
||||
Rect paintRect(paintInfo.paintRect());
|
||||
mScrollInfo.scrollEvent(FALSE);
|
||||
paintRect.right(paintRect.right()-paintRect.left());
|
||||
paintRect.bottom((paintRect.bottom()-paintRect.top()));
|
||||
mThumbPage.draw(paintDevice,paintRect,Point(paintRect.left()+mScrollInfo.currScrollx(),paintRect.top()+mScrollInfo.currScrolly()));
|
||||
}
|
||||
return (CallbackData::ReturnType)FALSE;
|
||||
}
|
||||
|
||||
CallbackData::ReturnType BrowseView::verticalScrollHandler(CallbackData &someCallbackData)
|
||||
{
|
||||
mScrollInfo.handleVerticalScroll(someCallbackData);
|
||||
return (CallbackData::ReturnType)FALSE;
|
||||
}
|
||||
|
||||
CallbackData::ReturnType BrowseView::horizontalScrollHandler(CallbackData &someCallbackData)
|
||||
{
|
||||
mScrollInfo.handleHorizontalScroll(someCallbackData);
|
||||
return (CallbackData::ReturnType)FALSE;
|
||||
}
|
||||
|
||||
CallbackData::ReturnType BrowseView::leftButtonDoubleHandler(CallbackData &someCallbackData)
|
||||
{
|
||||
Point clickPoint(someCallbackData.loWord(),someCallbackData.hiWord());
|
||||
CallbackData callbackData;
|
||||
String strPathFileName;
|
||||
String strItemName;
|
||||
|
||||
clickPoint.x(clickPoint.x()+mScrollInfo.currScrollx());
|
||||
clickPoint.y(clickPoint.y()+mScrollInfo.currScrolly());
|
||||
if(!mThumbPage.hitTest(*this,clickPoint,strItemName))return (CallbackData::ReturnType)FALSE;
|
||||
strPathFileName=getTitle()+String("\\")+strItemName;
|
||||
::OutputDebugString(strPathFileName+String("\n"));
|
||||
callbackData.lParam(int((char*)strPathFileName));
|
||||
mSelectHandler.callback(callbackData);
|
||||
return (CallbackData::ReturnType)FALSE;
|
||||
}
|
||||
|
||||
bool BrowseView::browse(const String &strPathDirectory)
|
||||
{
|
||||
CursorControl cursorControl;
|
||||
Block<String> strPathFileNames;
|
||||
PureDevice pureDevice(*this);
|
||||
PakEntry pakEntry;
|
||||
|
||||
String strMessage;
|
||||
DWORD elapsedTime;
|
||||
|
||||
|
||||
setTitle(strPathDirectory);
|
||||
if(strPathDirectory.isNull())return FALSE;
|
||||
cursorControl.waitCursor(true);
|
||||
getDirectoryFileNames(strPathDirectory,strPathFileNames);
|
||||
mMediaPak.open(strPathDirectory+String(".pak"),MediaPak::OpenAlways);
|
||||
if(mMediaPak.entries())
|
||||
{
|
||||
elapsedTime=::GetTickCount();
|
||||
|
||||
PakEntry pakEntry;
|
||||
DWORD pakEntries=mMediaPak.entries();
|
||||
for(int index=0;index<pakEntries;index++)
|
||||
{
|
||||
mMediaPak.getEntry(pakEntry,index);
|
||||
mThumbPage.insert(pakEntry,pureDevice);
|
||||
}
|
||||
merge(mMediaPak,strPathFileNames,strPathDirectory,pureDevice);
|
||||
::sprintf(strMessage,"Load took %d seconds\n",(::GetTickCount()-elapsedTime)/1000);
|
||||
::OutputDebugString(strMessage);
|
||||
}
|
||||
else
|
||||
{
|
||||
for(int index=0;index<strPathFileNames.size();index++)
|
||||
{
|
||||
GlobalData<BYTE> rawData;
|
||||
PakEntry pakEntry;
|
||||
|
||||
String strPathFileName(strPathDirectory+String("\\")+strPathFileNames[index]);
|
||||
mThumbPage.insert(strPathFileName,pureDevice);
|
||||
mThumbPage[mThumbPage.entries()-1].getRawData(rawData);
|
||||
pakEntry.type(PakEntry::Blob);
|
||||
pakEntry.name(strPathFileNames[index]);
|
||||
pakEntry.id(mMediaPak.entries());
|
||||
pakEntry.rawData(rawData);
|
||||
mMediaPak.add(pakEntry);
|
||||
}
|
||||
}
|
||||
mThumbPage.update(*this);
|
||||
mScrollInfo.scrollableObjectDimensions(mThumbPage.width(),mThumbPage.height());
|
||||
cursorControl.waitCursor(false);
|
||||
invalidate(false);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void BrowseView::merge(MediaPak &mediaPak,Block<String> &strPathDirFileNames,const String &strPathDirectory,PureDevice &pureDevice)
|
||||
{
|
||||
BTree<String> strPathFileNames;
|
||||
EntryInfo entryInfo;
|
||||
String strFound;
|
||||
int index;
|
||||
|
||||
for(index=0;index<mediaPak.entries();index++)
|
||||
{
|
||||
mediaPak.getInfo(entryInfo,index);
|
||||
strPathFileNames.insert(entryInfo.name());
|
||||
}
|
||||
for(index=0;index<strPathDirFileNames.size();index++)
|
||||
{
|
||||
if(!strPathFileNames.find(strPathDirFileNames[index]))
|
||||
{
|
||||
GlobalData<BYTE> rawData;
|
||||
PakEntry pakEntry;
|
||||
|
||||
::OutputDebugString(String("Adding ")+strPathDirFileNames[index]+String("\n"));
|
||||
strPathFileNames.insert(strPathDirFileNames[index]);
|
||||
String strPathFileName(strPathDirectory+String("\\")+strPathDirFileNames[index]);
|
||||
mThumbPage.insert(strPathFileName,pureDevice);
|
||||
mThumbPage[mThumbPage.entries()-1].getRawData(rawData);
|
||||
pakEntry.type(PakEntry::Blob);
|
||||
pakEntry.name(strPathDirFileNames[index]);
|
||||
pakEntry.id(mMediaPak.entries());
|
||||
pakEntry.rawData(rawData);
|
||||
mMediaPak.add(pakEntry);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool BrowseView::getDirectoryFileNames(const String &strDirectory,Block<String> &strPathFileNames)
|
||||
{
|
||||
PathFind pathFind;
|
||||
|
||||
strPathFileNames.remove();
|
||||
pathFind.fileList(strDirectory+String("\\")+String("*.jpg"),strPathFileNames);
|
||||
return strPathFileNames.size()?true:false;
|
||||
}
|
||||
|
||||
void BrowseView::setTitle(const String &strTitle)
|
||||
{
|
||||
String strCaption;
|
||||
String strString;
|
||||
|
||||
windowText(strCaption);
|
||||
strString=strCaption;
|
||||
strCaption=strCaption.betweenString(0,' ');
|
||||
if(strCaption.isNull())strCaption=strString;
|
||||
strCaption+=String(" - [")+strTitle+String("]");
|
||||
setCaption(strCaption);
|
||||
}
|
||||
|
||||
String BrowseView::getTitle(void)const
|
||||
{
|
||||
String strCaption;
|
||||
|
||||
windowText(strCaption);
|
||||
return strCaption.betweenString('[',']');
|
||||
}
|
||||
|
||||
// *** virtuals
|
||||
|
||||
void BrowseView::preRegister(WNDCLASS &wndClass)
|
||||
{
|
||||
wndClass.style|=CS_SAVEBITS|CS_OWNDC;
|
||||
wndClass.hbrBackground=(HBRUSH)::GetStockObject(WHITE_BRUSH);
|
||||
}
|
||||
|
||||
void BrowseView::preCreate(MDICREATESTRUCT &createStruct)
|
||||
{
|
||||
createStruct.style|=WS_VSCROLL|WS_HSCROLL|WS_CLIPCHILDREN|WS_CLIPSIBLINGS;
|
||||
}
|
||||
|
||||
69
browse/brwsview.hpp
Normal file
69
browse/brwsview.hpp
Normal file
@@ -0,0 +1,69 @@
|
||||
#ifndef _BROWSE_BROWSEVIEW_HPP_
|
||||
#define _BROWSE_BROWSEVIEW_HPP_
|
||||
#ifndef _COMMON_MDIWIN_HPP_
|
||||
#include <common/mdiwin.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_SMARTPOINTER_HPP_
|
||||
#include <common/pointer.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_BLOCK_HPP_
|
||||
#include <common/block.hpp>
|
||||
#endif
|
||||
#ifndef _THREAD_MUTEX_HPP_
|
||||
#include <thread/mutex.hpp>
|
||||
#endif
|
||||
#ifndef _BROWSE_THUMBPAGE_HPP_
|
||||
#include <browse/thmbpage.hpp>
|
||||
#endif
|
||||
#ifndef _NNTP_SCROLLINFO_HPP_
|
||||
#include <browse/scroll.hpp>
|
||||
#endif
|
||||
#ifndef _MEDIAPAK_MEDIAPAK_HPP_
|
||||
#include <mediapak/mediapak.hpp>
|
||||
#endif
|
||||
|
||||
class StatusBarEx;
|
||||
|
||||
class BrowseView : public MDIWindow
|
||||
{
|
||||
public:
|
||||
BrowseView(void);
|
||||
virtual ~BrowseView();
|
||||
bool browse(const String &strPathDirectoryName);
|
||||
void setHandler(PureCallback *pCallback);
|
||||
protected:
|
||||
virtual void preRegister(WNDCLASS &wndClass);
|
||||
virtual void preCreate(MDICREATESTRUCT &createStruct);
|
||||
private:
|
||||
enum {StatusBarID=101};
|
||||
CallbackData::ReturnType createHandler(CallbackData &someCallbackData);
|
||||
CallbackData::ReturnType sizeHandler(CallbackData &someCallbackData);
|
||||
CallbackData::ReturnType paintHandler(CallbackData &someCallbackData);
|
||||
CallbackData::ReturnType verticalScrollHandler(CallbackData &someCallbackData);
|
||||
CallbackData::ReturnType horizontalScrollHandler(CallbackData &someCallbackData);
|
||||
CallbackData::ReturnType leftButtonDoubleHandler(CallbackData &someCallbackData);
|
||||
bool getDirectoryFileNames(const String &strDirectory,Block<String> &strPathFileNames);
|
||||
void merge(MediaPak &mediaPak,Block<String> &strPathDirFileNames,const String &strPathDirectory,PureDevice &pureDevice);
|
||||
void setTitle(const String &strTitle);
|
||||
String getTitle(void)const;
|
||||
void analyze(PakEntry &pakEntry);
|
||||
|
||||
Callback<BrowseView> mCreateHandler;
|
||||
Callback<BrowseView> mSizeHandler;
|
||||
Callback<BrowseView> mPaintHandler;
|
||||
Callback<BrowseView> mVerticalScrollHandler;
|
||||
Callback<BrowseView> mHorizontalScrollHandler;
|
||||
Callback<BrowseView> mLeftButtonDoubleHandler;
|
||||
ScrollInfo mScrollInfo;
|
||||
SmartPointer<StatusBarEx> mStatusBar;
|
||||
MediaPak mMediaPak;
|
||||
ThumbPage mThumbPage;
|
||||
CallbackPointer mSelectHandler;
|
||||
};
|
||||
|
||||
inline
|
||||
void BrowseView::setHandler(PureCallback *pCallback)
|
||||
{
|
||||
mSelectHandler=CallbackPointer(pCallback);
|
||||
}
|
||||
#endif
|
||||
71
browse/dib24.cpp
Normal file
71
browse/dib24.cpp
Normal file
@@ -0,0 +1,71 @@
|
||||
#include <browse/dib24.hpp>
|
||||
|
||||
bool DIB24::create(int width,int height,PureDevice &pureDevice)
|
||||
{
|
||||
destroy();
|
||||
if(!width||!height||!pureDevice.isOkay())return false;
|
||||
mBitmapInfo.rgbColors(0);
|
||||
mBitmapInfo.bitCount(BitmapInfo::Bit24);
|
||||
mBitmapInfo.width(width);
|
||||
mBitmapInfo.height(height);
|
||||
mBitmapInfo.planes(1);
|
||||
mBitmapInfo.compression(BI_RGB);
|
||||
mBitmapInfo.sizeImage(0);
|
||||
mBitmapInfo.colorUsed(0);
|
||||
mBitmapInfo.colorImportant(0);
|
||||
verifyDimensions(mBitmapInfo);
|
||||
mExtent=mBitmapInfo.width()*(mBitmapInfo.height()<0?-mBitmapInfo.height():mBitmapInfo.height());
|
||||
mhBitmap=::CreateDIBSection((HDC)pureDevice,(BITMAPINFO*)mBitmapInfo,DIB_RGB_COLORS,(void**)&mpRGBArray,0,0);
|
||||
return isOkay();
|
||||
}
|
||||
|
||||
bool DIB24::draw(PureDevice &pureDevice,const Rect &dstRect,const Point &srcPoint)
|
||||
{
|
||||
PureDevice compatibleDevice;
|
||||
if(!isOkay())return FALSE;
|
||||
compatibleDevice.compatibleDevice(pureDevice);
|
||||
compatibleDevice.select((GDIObj)mhBitmap,TRUE);
|
||||
pureDevice.bitBlt(dstRect,compatibleDevice,srcPoint);
|
||||
compatibleDevice.select((GDIObj)mhBitmap,FALSE);
|
||||
return true;
|
||||
}
|
||||
|
||||
void DIB24::verifyDimensions(BitmapInfo &someBitmapInfo)
|
||||
{
|
||||
DWORD desiredHeight(someBitmapInfo.height()<0?-someBitmapInfo.height():someBitmapInfo.height());
|
||||
DWORD desiredWidth(someBitmapInfo.width());
|
||||
DWORD imageExtent;
|
||||
|
||||
imageExtent=(((((LONG)desiredWidth*8)+31)&~31)>>3)*(LONG)desiredHeight;
|
||||
if(imageExtent==(LONG)desiredWidth*(LONG)desiredHeight)return;
|
||||
else desiredWidth=(WORD)(imageExtent/(LONG)desiredHeight);
|
||||
someBitmapInfo.width(desiredWidth);
|
||||
}
|
||||
|
||||
bool DIB24::setAt(DWORD row,DWORD col,JPGImage &jpgImage)
|
||||
{
|
||||
DWORD srcWidth;
|
||||
DWORD srcHeight;
|
||||
DWORD dstWidth;
|
||||
DWORD dstHeight;
|
||||
RGB888 *ptrSrcCol;
|
||||
RGB888 *ptrDstCol;
|
||||
|
||||
if(!isOkay())return false;
|
||||
srcWidth=jpgImage.width();
|
||||
srcHeight=jpgImage.height();
|
||||
dstWidth=mBitmapInfo.width();
|
||||
dstHeight=mBitmapInfo.height()<0?-mBitmapInfo.height():mBitmapInfo.height();
|
||||
for(int srcRow=0,dstRow=row;srcRow<srcHeight;srcRow++,dstRow++)
|
||||
{
|
||||
if(jpgImage.getBitmapInfo().height()<0)ptrSrcCol=&jpgImage.getRGBArray()[srcRow*jpgImage.width()];
|
||||
else ptrSrcCol=&jpgImage.getRGBArray()[(jpgImage.getBitmapInfo().width()*(-jpgImage.getBitmapInfo().height()))-(((srcRow*jpgImage.getBitmapInfo().width())+jpgImage.getBitmapInfo().width()))];
|
||||
if(mBitmapInfo.height()<0)ptrDstCol=&mpRGBArray[dstRow*width()+col];
|
||||
else ptrDstCol=&mpRGBArray[(mBitmapInfo.width()*(-mBitmapInfo.height()))-(((dstRow*mBitmapInfo.width())+mBitmapInfo.width()))+col];
|
||||
::memcpy(ptrDstCol,ptrSrcCol,srcWidth*sizeof(RGB888));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
145
browse/dib24.hpp
Normal file
145
browse/dib24.hpp
Normal file
@@ -0,0 +1,145 @@
|
||||
#ifndef _BROWSE_DIB24_HPP_
|
||||
#define _BROWSE_DIB24_HPP_
|
||||
#ifndef _COMMON_WINDOWS_HPP_
|
||||
#include <common/windows.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_POINT_HPP_
|
||||
#include <common/point.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_PUREDEVICE_HPP_
|
||||
#include <common/purehdc.hpp>
|
||||
#endif
|
||||
#ifndef _BROWSE_JPGIMAGE_HPP_
|
||||
#include <browse/jpgimg.hpp>
|
||||
#endif
|
||||
#ifndef _BROWSE_RGB888_HPP_
|
||||
#include <browse/rgb888.hpp>
|
||||
#endif
|
||||
|
||||
class DIB24
|
||||
{
|
||||
public:
|
||||
DIB24(void);
|
||||
virtual ~DIB24();
|
||||
bool create(int width,int height,PureDevice &pureDevice);
|
||||
bool draw(PureDevice &pureDevice,const Rect &dstRect,const Point &srcPoint);
|
||||
bool setBits(BYTE value);
|
||||
bool getAt(DWORD row,DWORD col,RGB888 &someRGB888)const;
|
||||
bool setAt(DWORD row,DWORD col,const RGB888 &someRGB888);
|
||||
bool setAt(DWORD row,DWORD col,JPGImage &jpgImage);
|
||||
RGB888 *rgbArray(void);
|
||||
DWORD extent(void)const;
|
||||
DWORD width(void)const;
|
||||
DWORD height(void)const;
|
||||
HBITMAP getBitmap(void);
|
||||
bool isOkay(void)const;
|
||||
private:
|
||||
DIB24(const DIB24 &someDIB24);
|
||||
DIB24 &operator=(const DIB24 &someDIB24);
|
||||
void verifyDimensions(BitmapInfo &someBitmapInfo);
|
||||
void destroy(void);
|
||||
|
||||
HBITMAP mhBitmap;
|
||||
RGB888 *mpRGBArray;
|
||||
BitmapInfo mBitmapInfo;
|
||||
DWORD mExtent;
|
||||
};
|
||||
|
||||
inline
|
||||
DIB24::DIB24(void)
|
||||
: mhBitmap(0), mpRGBArray(0), mExtent(0)
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
DIB24::DIB24(const DIB24 &someDIB24)
|
||||
{ // private implementation
|
||||
*this=someDIB24;
|
||||
}
|
||||
|
||||
inline
|
||||
DIB24::~DIB24()
|
||||
{
|
||||
destroy();
|
||||
}
|
||||
|
||||
inline
|
||||
RGB888 *DIB24::rgbArray(void)
|
||||
{
|
||||
return mpRGBArray;
|
||||
}
|
||||
|
||||
inline
|
||||
DWORD DIB24::extent(void)const
|
||||
{
|
||||
return mExtent;
|
||||
}
|
||||
|
||||
inline
|
||||
DIB24 &DIB24::operator=(const DIB24 &/*someDIB24*/)
|
||||
{ // private implementation
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline
|
||||
DWORD DIB24::width(void)const
|
||||
{
|
||||
if(!isOkay())return 0;
|
||||
return mBitmapInfo.width();
|
||||
}
|
||||
|
||||
inline
|
||||
DWORD DIB24::height(void)const
|
||||
{
|
||||
if(!isOkay())return 0;
|
||||
return mBitmapInfo.height()<0?-mBitmapInfo.height():mBitmapInfo.height();
|
||||
}
|
||||
|
||||
inline
|
||||
void DIB24::destroy(void)
|
||||
{
|
||||
if(!mhBitmap)return;
|
||||
::DeleteObject(mhBitmap);
|
||||
mhBitmap=0;
|
||||
mpRGBArray=0;
|
||||
mExtent=0;
|
||||
}
|
||||
|
||||
inline
|
||||
HBITMAP DIB24::getBitmap(void)
|
||||
{
|
||||
return mhBitmap;
|
||||
}
|
||||
|
||||
inline
|
||||
bool DIB24::setBits(BYTE value)
|
||||
{
|
||||
if(!isOkay())return FALSE;
|
||||
::memset(mpRGBArray,value,extent()*sizeof(RGB888));
|
||||
return true;
|
||||
}
|
||||
|
||||
inline
|
||||
bool DIB24::getAt(DWORD row,DWORD col,RGB888 &someRGB888)const
|
||||
{
|
||||
if(!isOkay())return false;
|
||||
if(mBitmapInfo.height()<0)someRGB888=mpRGBArray[row*width()+col];
|
||||
else someRGB888=mpRGBArray[(mBitmapInfo.width()*(-mBitmapInfo.height()))-(((row*mBitmapInfo.width())+mBitmapInfo.width()))+col];
|
||||
return true;
|
||||
}
|
||||
|
||||
inline
|
||||
bool DIB24::setAt(DWORD row,DWORD col,const RGB888 &someRGB888)
|
||||
{
|
||||
if(!isOkay())return false;
|
||||
if(mBitmapInfo.height()<0)mpRGBArray[row*width()+col]=someRGB888;
|
||||
else mpRGBArray[(mBitmapInfo.width()*(-mBitmapInfo.height()))-(((row*mBitmapInfo.width())+mBitmapInfo.width()))+col]=someRGB888;
|
||||
return true;
|
||||
}
|
||||
|
||||
inline
|
||||
bool DIB24::isOkay(void)const
|
||||
{
|
||||
return mhBitmap?true:false;
|
||||
}
|
||||
#endif
|
||||
186
browse/jpgimg.cpp
Normal file
186
browse/jpgimg.cpp
Normal file
@@ -0,0 +1,186 @@
|
||||
#include <browse/jpgimg.hpp>
|
||||
#include <browse/rgb888.hpp>
|
||||
#include <common/purehdc.hpp>
|
||||
#include <jpeg-6b/jpeg6b.hpp>
|
||||
#include <browse/asmutil.hpp>
|
||||
|
||||
bool JPGImage::draw(PureDevice &pureDevice)
|
||||
{
|
||||
PureDevice compatibleDevice;
|
||||
if(!isOkay())return FALSE;
|
||||
compatibleDevice.compatibleDevice(pureDevice);
|
||||
compatibleDevice.select((GDIObj)mhBitmap,TRUE);
|
||||
pureDevice.bitBlt(Rect(0,0,width(),height()),compatibleDevice,Point(0,0));
|
||||
compatibleDevice.select((GDIObj)mhBitmap,FALSE);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool JPGImage::draw(PureDevice &pureDevice,int xSrc,int ySrc)
|
||||
{
|
||||
PureDevice compatibleDevice;
|
||||
if(!isOkay())return FALSE;
|
||||
compatibleDevice.compatibleDevice(pureDevice);
|
||||
compatibleDevice.select((GDIObj)mhBitmap,TRUE);
|
||||
pureDevice.bitBlt(Rect(xSrc,ySrc,width(),height()),compatibleDevice,Point(0,0));
|
||||
compatibleDevice.select((GDIObj)mhBitmap,FALSE);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool JPGImage::draw(PureDevice &pureDevice,const Rect &dstRect,const Point &srcPoint)
|
||||
{
|
||||
PureDevice compatibleDevice;
|
||||
if(!isOkay())return FALSE;
|
||||
compatibleDevice.compatibleDevice(pureDevice);
|
||||
compatibleDevice.select((GDIObj)mhBitmap,TRUE);
|
||||
pureDevice.bitBlt(dstRect,compatibleDevice,srcPoint);
|
||||
compatibleDevice.select((GDIObj)mhBitmap,FALSE);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool JPGImage::stretch(PureDevice &pureDevice,const Point &xyPoint,int strwidth,int strheight)
|
||||
{
|
||||
PureDevice compatibleDevice;
|
||||
if(!isOkay())return FALSE;
|
||||
compatibleDevice.compatibleDevice(pureDevice);
|
||||
compatibleDevice.select((GDIObj)mhBitmap,TRUE);
|
||||
pureDevice.stretchBlt(Rect(xyPoint.x(),xyPoint.y(),strwidth,strheight),compatibleDevice,Rect(0,0,width(),height()));
|
||||
compatibleDevice.select((GDIObj)mhBitmap,FALSE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool JPGImage::decode(const String &strPathFileName,PureDevice &pureDevice)
|
||||
{
|
||||
JSAMPARRAY buffer;
|
||||
int row_stride;
|
||||
int row(0);
|
||||
int imageCol;
|
||||
jpeg_decompress_struct cinfo;
|
||||
FILE *fp;
|
||||
|
||||
destroy();
|
||||
if((fp=::fopen((char*)(String&)strPathFileName,"rb"))==NULL)return FALSE;
|
||||
::jpeg_create_decompress(&cinfo);
|
||||
::jpeg_stdio_src(&cinfo,fp);
|
||||
try{::jpeg_read_header(&cinfo,TRUE);}
|
||||
catch(JPGError){return FALSE;}
|
||||
try{::jpeg_start_decompress(&cinfo);}
|
||||
catch(JPGError){return FALSE;}
|
||||
row_stride=cinfo.output_width*cinfo.output_components;
|
||||
buffer=(*cinfo.mem->alloc_sarray)((j_common_ptr)&cinfo,JPOOL_IMAGE,row_stride,cinfo.output_height);
|
||||
while(cinfo.output_scanline<cinfo.output_height)::jpeg_read_scanlines(&cinfo,&buffer[row++],1);
|
||||
getBitmapInfo().rgbColors(0);
|
||||
getBitmapInfo().bitCount(BitmapInfo::Bit24);
|
||||
getBitmapInfo().width(cinfo.output_width);
|
||||
getBitmapInfo().height(-cinfo.output_height);
|
||||
getBitmapInfo().planes(1);
|
||||
getBitmapInfo().compression(BI_RGB);
|
||||
getBitmapInfo().sizeImage(0);
|
||||
getBitmapInfo().colorUsed(0);
|
||||
getBitmapInfo().colorImportant(0);
|
||||
verifyDimensions(getBitmapInfo());
|
||||
getRGBArray().size(getBitmapInfo().width()*(-getBitmapInfo().height()));
|
||||
for(int scanline=0;scanline<cinfo.output_height;scanline++)
|
||||
{
|
||||
imageCol=0;
|
||||
char *pScanLine=(char*)buffer[scanline];
|
||||
for(int index=0;index<row_stride;index+=cinfo.output_components,pScanLine+=cinfo.output_components)
|
||||
{
|
||||
getRGBArray()[scanline*(getBitmapInfo().width())+imageCol]=RGB888(*pScanLine,*(pScanLine+1),*(pScanLine+2));
|
||||
imageCol++;
|
||||
}
|
||||
}
|
||||
mhBitmap=::CreateDIBitmap((HDC)pureDevice,(BITMAPINFOHEADER*)getBitmapInfo(),CBM_INIT,&getRGBArray()[0],(BITMAPINFO*)getBitmapInfo(),DIB_RGB_COLORS);
|
||||
try{::jpeg_finish_decompress(&cinfo);}
|
||||
catch(JPGError){;}
|
||||
::jpeg_destroy_decompress(&cinfo);
|
||||
::fclose(fp);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void JPGImage::verifyDimensions(BitmapInfo &someBitmapInfo)
|
||||
{
|
||||
DWORD desiredHeight(someBitmapInfo.height()<0?-someBitmapInfo.height():someBitmapInfo.height());
|
||||
DWORD desiredWidth(someBitmapInfo.width());
|
||||
DWORD imageExtent;
|
||||
|
||||
imageExtent=(((((LONG)desiredWidth*8)+31)&~31)>>3)*(LONG)desiredHeight;
|
||||
if(imageExtent==(LONG)desiredWidth*(LONG)desiredHeight)return;
|
||||
else desiredWidth=(WORD)(imageExtent/(LONG)desiredHeight);
|
||||
someBitmapInfo.width(desiredWidth);
|
||||
}
|
||||
|
||||
bool JPGImage::resample(PureDevice &pureDevice,int newWidth)
|
||||
{
|
||||
Array<RGB888> rgbArray;
|
||||
Array<RGB888> tmpArray;
|
||||
BitmapInfo bitmapInfo;
|
||||
float heightFactor;
|
||||
float aspectRatio;
|
||||
int newHeight;
|
||||
|
||||
if(!isOkay())return false;
|
||||
aspectRatio=(float)width()/(float)height();
|
||||
newHeight=(float)newWidth/aspectRatio;
|
||||
heightFactor=(float)newHeight/height();
|
||||
bitmapInfo.rgbColors(0);
|
||||
bitmapInfo.bitCount(BitmapInfo::Bit24);
|
||||
bitmapInfo.width(newWidth);
|
||||
bitmapInfo.height(int((float)getBitmapInfo().height()*heightFactor));
|
||||
bitmapInfo.planes(1);
|
||||
bitmapInfo.compression(BI_RGB);
|
||||
bitmapInfo.sizeImage(0);
|
||||
bitmapInfo.colorUsed(0);
|
||||
bitmapInfo.colorImportant(0);
|
||||
verifyDimensions(bitmapInfo);
|
||||
tmpArray.size(bitmapInfo.width()*(height()<0?-height():height()));
|
||||
for(int row=0;row<height();row++)::resampleClipRow(&getRGBArray()[(row*width())],&tmpArray[(row*newWidth)],width()+1,newWidth,newWidth);
|
||||
rgbArray.size(bitmapInfo.width()*(bitmapInfo.height()<0?-bitmapInfo.height():bitmapInfo.height()));
|
||||
for(int col=0;col<bitmapInfo.width();col++)::resampleClipCol(&tmpArray[col],&rgbArray[col],height(),bitmapInfo.width(),bitmapInfo.height()<0?-bitmapInfo.height():bitmapInfo.height(),bitmapInfo.width(),bitmapInfo.height()<0?-bitmapInfo.height():bitmapInfo.height());
|
||||
destroy();
|
||||
getBitmapInfo()=bitmapInfo;
|
||||
getRGBArray()=rgbArray;
|
||||
mhBitmap=::CreateDIBitmap((HDC)pureDevice,(BITMAPINFOHEADER*)getBitmapInfo(),CBM_INIT,&getRGBArray()[0],(BITMAPINFO*)getBitmapInfo(),DIB_RGB_COLORS);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool JPGImage::resample(PureDevice &pureDevice,int newWidth,int newHeight)
|
||||
{
|
||||
Array<RGB888> rgbArray;
|
||||
Array<RGB888> tmpArray;
|
||||
BitmapInfo bitmapInfo;
|
||||
|
||||
if(!isOkay())return false;
|
||||
bitmapInfo.rgbColors(0);
|
||||
bitmapInfo.bitCount(BitmapInfo::Bit24);
|
||||
bitmapInfo.width(newWidth);
|
||||
bitmapInfo.height(-newHeight);
|
||||
bitmapInfo.planes(1);
|
||||
bitmapInfo.compression(BI_RGB);
|
||||
bitmapInfo.sizeImage(0);
|
||||
bitmapInfo.colorUsed(0);
|
||||
bitmapInfo.colorImportant(0);
|
||||
verifyDimensions(bitmapInfo);
|
||||
tmpArray.size(bitmapInfo.width()*(height()<0?-height():height()));
|
||||
for(int row=0;row<height();row++)::resampleClipRow(&getRGBArray()[(row*width())],&tmpArray[(row*newWidth)],width()+1,newWidth,newWidth);
|
||||
rgbArray.size(bitmapInfo.width()*(bitmapInfo.height()<0?-bitmapInfo.height():bitmapInfo.height()));
|
||||
for(int col=0;col<bitmapInfo.width();col++)::resampleClipCol(&tmpArray[col],&rgbArray[col],height(),bitmapInfo.width(),bitmapInfo.height()<0?-bitmapInfo.height():bitmapInfo.height(),bitmapInfo.width(),bitmapInfo.height()<0?-bitmapInfo.height():bitmapInfo.height());
|
||||
destroy();
|
||||
getBitmapInfo()=bitmapInfo;
|
||||
getRGBArray()=rgbArray;
|
||||
mhBitmap=::CreateDIBitmap((HDC)pureDevice,(BITMAPINFOHEADER*)getBitmapInfo(),CBM_INIT,&getRGBArray()[0],(BITMAPINFO*)getBitmapInfo(),DIB_RGB_COLORS);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool JPGImage::getRawData(GlobalData<BYTE> &rawData)
|
||||
{
|
||||
return RawImage::getRawData(rawData);
|
||||
}
|
||||
|
||||
bool JPGImage::setRawData(GlobalData<BYTE> &rawData,PureDevice &pureDevice)
|
||||
{
|
||||
destroy();
|
||||
if(!RawImage::setRawData(rawData))return false;
|
||||
mhBitmap=::CreateDIBitmap((HDC)pureDevice,(BITMAPINFOHEADER*)getBitmapInfo(),CBM_INIT,&getRGBArray()[0],(BITMAPINFO*)getBitmapInfo(),DIB_RGB_COLORS);
|
||||
return true;
|
||||
}
|
||||
|
||||
128
browse/jpgimg.hpp
Normal file
128
browse/jpgimg.hpp
Normal file
@@ -0,0 +1,128 @@
|
||||
#ifndef _BROWSE_JPGIMAGE_HPP_
|
||||
#define _BROWSE_JPGIMAGE_HPP_
|
||||
#ifndef _COMMON_WINDOWS_HPP_
|
||||
#include <common/windows.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_SMARTPOINTER_HPP_
|
||||
#include <common/pointer.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_RGBCOLOR_HPP_
|
||||
#include <common/rgbcolor.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_DIBITMAP_HPP_
|
||||
#include <common/dib.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_BITMAPINFO_HPP_
|
||||
#include <common/bminfo.hpp>
|
||||
#endif
|
||||
#ifndef _BROWSE_RGB888_HPP_
|
||||
#include <browse/rgb888.hpp>
|
||||
#endif
|
||||
#ifndef _BROWSE_RAWIMAGE_HPP_
|
||||
#include <browse/rawimg.hpp>
|
||||
#endif
|
||||
|
||||
class String;
|
||||
class PureDevice;
|
||||
|
||||
class JPGImage : public RawImage
|
||||
{
|
||||
public:
|
||||
class JPGImageInvalidImage{};
|
||||
JPGImage(void);
|
||||
virtual ~JPGImage();
|
||||
bool decode(const String &strPathFileName,PureDevice &pureDevice);
|
||||
bool draw(PureDevice &pureDevice);
|
||||
bool draw(PureDevice &pureDevice,int xSrc,int ySrc);
|
||||
bool draw(PureDevice &pureDevice,const Rect &dstRect,const Point &srcPoint);
|
||||
bool stretch(PureDevice &pureDevice,const Point &xyPoint,int strwidth,int strheight);
|
||||
bool resample(PureDevice &pureDevice,int width);
|
||||
bool resample(PureDevice &pureDevice,int newWidth,int newHeight);
|
||||
DWORD memoryUsage(void)const;
|
||||
bool isOkay(void)const;
|
||||
int width(void)const;
|
||||
int height(void)const;
|
||||
bool getRawData(GlobalData<BYTE> &rawData);
|
||||
bool setRawData(GlobalData<BYTE> &rawData,PureDevice &pureDevice);
|
||||
bool setRawData(GlobalData<BYTE> &rawData);
|
||||
bool getAt(DWORD row,DWORD col,RGB888 &rgb888)const;
|
||||
private:
|
||||
JPGImage(const JPGImage &someJPGImage);
|
||||
JPGImage &operator=(const JPGImage &someJPGImage);
|
||||
void verifyDimensions(BitmapInfo &someBitmapInfo);
|
||||
void destroy(void);
|
||||
|
||||
HBITMAP mhBitmap;
|
||||
};
|
||||
|
||||
inline
|
||||
JPGImage::JPGImage(void)
|
||||
: mhBitmap(0)
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
JPGImage::JPGImage(const JPGImage &someJPGImage)
|
||||
: mhBitmap(0)
|
||||
{ // private implementation
|
||||
*this=someJPGImage;
|
||||
}
|
||||
|
||||
inline
|
||||
JPGImage &JPGImage::operator=(const JPGImage &someJPGImage)
|
||||
{ // private implementation
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline
|
||||
JPGImage::~JPGImage()
|
||||
{
|
||||
destroy();
|
||||
}
|
||||
|
||||
inline
|
||||
int JPGImage::width(void)const
|
||||
{
|
||||
return getBitmapInfo().width();
|
||||
}
|
||||
|
||||
inline
|
||||
int JPGImage::height(void)const
|
||||
{
|
||||
if(getBitmapInfo().height()<0)return -getBitmapInfo().height();
|
||||
return getBitmapInfo().height();
|
||||
}
|
||||
|
||||
inline
|
||||
bool JPGImage::getAt(DWORD row,DWORD col,RGB888 &rgb888)const
|
||||
{
|
||||
return RawImage::getAt(row,col,rgb888);
|
||||
}
|
||||
|
||||
inline
|
||||
bool JPGImage::isOkay(void)const
|
||||
{
|
||||
return mhBitmap?TRUE:FALSE;
|
||||
}
|
||||
|
||||
inline
|
||||
void JPGImage::destroy(void)
|
||||
{
|
||||
if(!mhBitmap)return;
|
||||
::DeleteObject(mhBitmap);
|
||||
mhBitmap=0;
|
||||
}
|
||||
|
||||
inline
|
||||
DWORD JPGImage::memoryUsage(void)const
|
||||
{
|
||||
return RawImage::memoryUsage();
|
||||
}
|
||||
|
||||
inline
|
||||
bool JPGImage::setRawData(GlobalData<BYTE> &rawData)
|
||||
{
|
||||
destroy();
|
||||
return RawImage::setRawData(rawData);
|
||||
}
|
||||
#endif
|
||||
59
browse/mainfrm.hpp
Normal file
59
browse/mainfrm.hpp
Normal file
@@ -0,0 +1,59 @@
|
||||
#ifndef _BROWSE_MAINFRAME_HPP_
|
||||
#define _BROWSE_MAINFRAME_HPP_
|
||||
#ifndef _COMMON_MDIFRM_HPP_
|
||||
#include <common/mdifrm.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_STRING_HPP_
|
||||
#include <common/string.hpp>
|
||||
#endif
|
||||
|
||||
class StatusBarEx;
|
||||
class BrowseView;
|
||||
|
||||
class MainFrame : public FrameWindow
|
||||
{
|
||||
public:
|
||||
MainFrame(void);
|
||||
void splash(void);
|
||||
virtual ~MainFrame();
|
||||
protected:
|
||||
virtual void mdiDestroy(MDIWindow &mdiWindow);
|
||||
virtual void mdiActivate(MDIWindow &mdiWindow);
|
||||
virtual void mdiDeactivate(MDIWindow &mdiWindow);
|
||||
private:
|
||||
enum{StatusBarID=101};
|
||||
CallbackData::ReturnType closeHandler(CallbackData &someCallbackData);
|
||||
CallbackData::ReturnType queryEndSessionHandler(CallbackData &someCallbackData);
|
||||
CallbackData::ReturnType paintHandler(CallbackData &someCallbackData);
|
||||
CallbackData::ReturnType destroyHandler(CallbackData &someCallbackData);
|
||||
CallbackData::ReturnType commandHandler(CallbackData &someCallbackData);
|
||||
CallbackData::ReturnType keyDownHandler(CallbackData &someCallbackData);
|
||||
CallbackData::ReturnType sizeHandler(CallbackData &someCallbackData);
|
||||
CallbackData::ReturnType createHandler(CallbackData &someCallbackData);
|
||||
CallbackData::ReturnType lineHandler(CallbackData &someCallbackData);
|
||||
BrowseView &createBrowseView(void);
|
||||
void handleViewStart(void);
|
||||
void handleViewStop(void);
|
||||
void handleFileOpen(void);
|
||||
void handleFileExit(void);
|
||||
void createControls(void);
|
||||
void insertHandlers(void);
|
||||
void removeHandlers(void);
|
||||
void handleFileBrowse(void);
|
||||
|
||||
Callback<MainFrame> mPaintHandler;
|
||||
Callback<MainFrame> mDestroyHandler;
|
||||
Callback<MainFrame> mCommandHandler;
|
||||
Callback<MainFrame> mKeyDownHandler;
|
||||
Callback<MainFrame> mSizeHandler;
|
||||
Callback<MainFrame> mCreateHandler;
|
||||
Callback<MainFrame> mCloseHandler;
|
||||
Callback<MainFrame> mQueryEndSessionHandler;
|
||||
SmartPointer<StatusBarEx> mStatusControl;
|
||||
};
|
||||
|
||||
inline
|
||||
void MainFrame::splash(void)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
20
browse/rawimg.cpp
Normal file
20
browse/rawimg.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
#include <browse/rawimg.hpp>
|
||||
#include <browse/rgb888.hpp>
|
||||
|
||||
bool RawImage::getRawData(GlobalData<BYTE> &rawData)
|
||||
{
|
||||
if(!isOkay())return false;
|
||||
rawData.size(sizeof(BITMAPINFO)+(mRGBArray.size()*sizeof(RGB888)));
|
||||
::memcpy((BYTE*)&rawData[0],(BITMAPINFO*)mBitmapInfo,sizeof(BITMAPINFO));
|
||||
::memcpy(((BYTE*)&rawData[0])+sizeof(BITMAPINFO),(BYTE*)&mRGBArray[0],mRGBArray.size()*sizeof(RGB888));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool RawImage::setRawData(GlobalData<BYTE> &rawData)
|
||||
{
|
||||
if(!rawData.size())return false;
|
||||
::memcpy((BYTE*)(BITMAPINFO*)mBitmapInfo,(BYTE*)&rawData[0],sizeof(BITMAPINFO));
|
||||
mRGBArray.size((rawData.size()-sizeof(BITMAPINFO))/sizeof(RGB888));
|
||||
::memcpy((BYTE*)&mRGBArray[0],((BYTE*)&rawData[0])+sizeof(BITMAPINFO),rawData.size()-sizeof(BITMAPINFO));
|
||||
return true;
|
||||
}
|
||||
119
browse/rawimg.hpp
Normal file
119
browse/rawimg.hpp
Normal file
@@ -0,0 +1,119 @@
|
||||
#ifndef _BROWSE_RAWIMAGE_HPP_
|
||||
#define _BROWSE_RAWIMAGE_HPP_
|
||||
#ifndef _COMMON_WINDOWS_HPP_
|
||||
#include <common/windows.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_SMARTPOINTER_HPP_
|
||||
#include <common/pointer.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_RGBCOLOR_HPP_
|
||||
#include <common/rgbcolor.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_DIBITMAP_HPP_
|
||||
#include <common/dib.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_BITMAPINFO_HPP_
|
||||
#include <common/bminfo.hpp>
|
||||
#endif
|
||||
#ifndef _BROWSE_RGB888_HPP_
|
||||
#include <browse/rgb888.hpp>
|
||||
#endif
|
||||
|
||||
class RawImage
|
||||
{
|
||||
public:
|
||||
class RawImageInvalidImage{};
|
||||
RawImage(void);
|
||||
virtual ~RawImage();
|
||||
DWORD memoryUsage(void)const;
|
||||
int width(void)const;
|
||||
int height(void)const;
|
||||
bool getRawData(GlobalData<BYTE> &rawData);
|
||||
bool setRawData(GlobalData<BYTE> &rawData);
|
||||
bool getAt(DWORD row,DWORD col,RGB888 &rgb888)const;
|
||||
Array<RGB888> &getRGBArray(void);
|
||||
BitmapInfo &getBitmapInfo(void);
|
||||
const BitmapInfo &getBitmapInfo(void)const;
|
||||
bool isOkay(void)const;
|
||||
private:
|
||||
RawImage(const RawImage &someRawImage);
|
||||
RawImage &operator=(const RawImage &someRawImage);
|
||||
|
||||
BitmapInfo mBitmapInfo;
|
||||
Array<RGB888> mRGBArray;
|
||||
};
|
||||
|
||||
inline
|
||||
RawImage::RawImage(void)
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
RawImage::RawImage(const RawImage &someRawImage)
|
||||
{ // private implementation
|
||||
*this=someRawImage;
|
||||
}
|
||||
|
||||
inline
|
||||
RawImage &RawImage::operator=(const RawImage &someRawImage)
|
||||
{ // private implementation
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline
|
||||
RawImage::~RawImage()
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
int RawImage::width(void)const
|
||||
{
|
||||
return mBitmapInfo.width();
|
||||
}
|
||||
|
||||
inline
|
||||
int RawImage::height(void)const
|
||||
{
|
||||
if(mBitmapInfo.height()<0)return -mBitmapInfo.height();
|
||||
return mBitmapInfo.height();
|
||||
}
|
||||
|
||||
inline
|
||||
Array<RGB888> &RawImage::getRGBArray(void)
|
||||
{
|
||||
return mRGBArray;
|
||||
}
|
||||
|
||||
inline
|
||||
BitmapInfo &RawImage::getBitmapInfo(void)
|
||||
{
|
||||
return mBitmapInfo;
|
||||
}
|
||||
|
||||
inline
|
||||
const BitmapInfo &RawImage::getBitmapInfo(void)const
|
||||
{
|
||||
return mBitmapInfo;
|
||||
}
|
||||
|
||||
inline
|
||||
bool RawImage::getAt(DWORD row,DWORD col,RGB888 &rgb888)const
|
||||
{
|
||||
if(!isOkay())return false;
|
||||
if(mBitmapInfo.height()<0)rgb888=((Array<RGB888>&)mRGBArray)[row*width()+col];
|
||||
else rgb888=((Array<RGB888>&)mRGBArray)[(mBitmapInfo.width()*(-mBitmapInfo.height()))-(((row*mBitmapInfo.width())+mBitmapInfo.width()))+col];
|
||||
return true;
|
||||
}
|
||||
|
||||
inline
|
||||
DWORD RawImage::memoryUsage(void)const
|
||||
{
|
||||
return mRGBArray.size()*sizeof(RGB888);
|
||||
}
|
||||
|
||||
inline
|
||||
bool RawImage::isOkay(void)const
|
||||
{
|
||||
return mRGBArray.size()?true:false;
|
||||
}
|
||||
#endif
|
||||
116
browse/rgb888.hpp
Normal file
116
browse/rgb888.hpp
Normal file
@@ -0,0 +1,116 @@
|
||||
#ifndef _BROWSE_RGB888_HPP_
|
||||
#define _BROWSE_RGB888_HPP_
|
||||
#ifndef _COMMON_WINDOWS_HPP_
|
||||
#include <common/windows.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_STRING_HPP_
|
||||
#include <common/string.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_STDIO_HPP_
|
||||
#include <common/stdio.hpp>
|
||||
#endif
|
||||
|
||||
class RGB888
|
||||
{
|
||||
public:
|
||||
RGB888(void);
|
||||
RGB888(const RGB888 &someRGB888);
|
||||
RGB888(BYTE red,BYTE green,BYTE blue);
|
||||
~RGB888(); // the destructor cannot be virtual
|
||||
RGB888 &operator=(const RGB888 &someRGB888);
|
||||
BOOL operator==(const RGB888 &someRGB888);
|
||||
operator String(void)const;
|
||||
BYTE red(void)const;
|
||||
void red(BYTE red);
|
||||
BYTE green(void)const;
|
||||
void green(BYTE green);
|
||||
BYTE blue(void)const;
|
||||
void blue(BYTE blue);
|
||||
private:
|
||||
BYTE mBlue;
|
||||
BYTE mGreen;
|
||||
BYTE mRed;
|
||||
};
|
||||
|
||||
inline
|
||||
RGB888::RGB888(void)
|
||||
: mBlue(0), mGreen(0), mRed(0)
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
RGB888::RGB888(BYTE red,BYTE green,BYTE blue)
|
||||
: mBlue(blue), mGreen(green), mRed(red)
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
RGB888::RGB888(const RGB888 &someRGB888)
|
||||
{
|
||||
*this=someRGB888;
|
||||
}
|
||||
|
||||
inline
|
||||
RGB888::~RGB888()
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
RGB888 &RGB888::operator=(const RGB888 &someRGB888)
|
||||
{
|
||||
red(someRGB888.red());
|
||||
green(someRGB888.green());
|
||||
blue(someRGB888.blue());
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline
|
||||
BOOL RGB888::operator==(const RGB888 &someRGB888)
|
||||
{
|
||||
return red()==someRGB888.red()&&green()==someRGB888.green()&&blue()==someRGB888.blue();
|
||||
}
|
||||
|
||||
inline
|
||||
RGB888::operator String(void)const
|
||||
{
|
||||
String strString;
|
||||
::sprintf(strString,"(%d,%d,%d)",red(),green(),blue());
|
||||
return strString;
|
||||
}
|
||||
|
||||
inline
|
||||
BYTE RGB888::red(void)const
|
||||
{
|
||||
return mRed;
|
||||
}
|
||||
|
||||
inline
|
||||
void RGB888::red(BYTE red)
|
||||
{
|
||||
mRed=red;
|
||||
}
|
||||
|
||||
inline
|
||||
BYTE RGB888::green(void)const
|
||||
{
|
||||
return mGreen;
|
||||
}
|
||||
|
||||
inline
|
||||
void RGB888::green(BYTE green)
|
||||
{
|
||||
mGreen=green;
|
||||
}
|
||||
|
||||
inline
|
||||
BYTE RGB888::blue(void)const
|
||||
{
|
||||
return mBlue;
|
||||
}
|
||||
|
||||
inline
|
||||
void RGB888::blue(BYTE blue)
|
||||
{
|
||||
mBlue=blue;
|
||||
}
|
||||
#endif
|
||||
362
browse/scroll.hpp
Normal file
362
browse/scroll.hpp
Normal file
@@ -0,0 +1,362 @@
|
||||
#ifndef _NNTP_SCROLLINFO_HPP_
|
||||
#define _NNTP_SCROLLINFO_HPP_
|
||||
#ifndef _COMMON_WINDOWS_HPP_
|
||||
#include <common/windows.hpp>
|
||||
#endif
|
||||
|
||||
class ScrollInfo
|
||||
{
|
||||
public:
|
||||
ScrollInfo(void);
|
||||
ScrollInfo(const ScrollInfo &someScrollInfo);
|
||||
virtual ~ScrollInfo();
|
||||
ScrollInfo &operator=(const ScrollInfo &someScrollInfo);
|
||||
BOOL operator==(const ScrollInfo &someScrollInfo)const;
|
||||
void handleHorizontalScroll(CallbackData &someCallbackData);
|
||||
void handleVerticalScroll(CallbackData &someCallbackData);
|
||||
void handleSize(CallbackData &someCallbackData);
|
||||
int minScrollx(void)const;
|
||||
void minScrollx(int minScrollx);
|
||||
int maxScrollx(void)const;
|
||||
void maxScrollx(int maxScrollx);
|
||||
int currScrollx(void)const;;
|
||||
void currScrollx(int currScrollx);
|
||||
int minScrolly(void)const;
|
||||
void minScrolly(int minScrolly);
|
||||
int maxScrolly(void)const;
|
||||
void maxScrolly(int maxScrolly);
|
||||
int currScrolly(void)const;
|
||||
void currScrolly(int curScrolly);
|
||||
void scrollableObjectDimensions(int width,int height);
|
||||
int scrollableObjectWidth(void)const;
|
||||
int scrollableObjectHeight(void)const;
|
||||
BOOL scrollEvent(void)const;
|
||||
void scrollEvent(BOOL scrollEvent);
|
||||
BOOL sizeEvent(void)const;
|
||||
void sizeEvent(BOOL sizeEvent);
|
||||
HWND hwndOwner(void)const;
|
||||
void hwndOwner(HWND hwndOwner);
|
||||
private:
|
||||
void scrollableObjectWidth(int scrollableObjectWidth);
|
||||
void scrollableObjectHeight(int scrollableObjectHeight);
|
||||
enum{PageIncrement=50,LineIncrement=5};
|
||||
int imax(int param1,int param2);
|
||||
int imin(int param1,int param2);
|
||||
|
||||
HWND mhWndOwner;
|
||||
BOOL mSizeEvent;
|
||||
BOOL mScrollEvent;
|
||||
int mScrollableObjectWidth;
|
||||
int mScrollableObjectHeight;
|
||||
int mMinScrollx;
|
||||
int mMaxScrollx;
|
||||
int mCurrScrollx;
|
||||
int mMinScrolly;
|
||||
int mMaxScrolly;
|
||||
int mCurrScrolly;
|
||||
};
|
||||
|
||||
inline
|
||||
ScrollInfo::ScrollInfo(void)
|
||||
: mMinScrollx(0), mMaxScrollx(0), mCurrScrollx(0), mMinScrolly(0), mMaxScrolly(0), mCurrScrolly(0),
|
||||
mScrollableObjectWidth(0), mScrollableObjectHeight(0), mSizeEvent(FALSE), mhWndOwner(0), mScrollEvent(FALSE)
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
ScrollInfo::ScrollInfo(const ScrollInfo &someScrollInfo)
|
||||
{
|
||||
*this=someScrollInfo;
|
||||
}
|
||||
|
||||
inline
|
||||
ScrollInfo::~ScrollInfo()
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
ScrollInfo &ScrollInfo::operator=(const ScrollInfo &someScrollInfo)
|
||||
{
|
||||
minScrollx(someScrollInfo.minScrollx());
|
||||
maxScrollx(someScrollInfo.maxScrollx());
|
||||
currScrollx(someScrollInfo.currScrollx());
|
||||
maxScrolly(someScrollInfo.currScrolly());
|
||||
minScrolly(someScrollInfo.maxScrolly());
|
||||
currScrolly(someScrollInfo.minScrollx());
|
||||
sizeEvent(someScrollInfo.minScrollx());
|
||||
scrollEvent(someScrollInfo.scrollEvent());
|
||||
scrollableObjectWidth(someScrollInfo.scrollableObjectWidth());
|
||||
scrollableObjectHeight(someScrollInfo.scrollableObjectHeight());
|
||||
hwndOwner(someScrollInfo.hwndOwner());
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline
|
||||
BOOL ScrollInfo::operator==(const ScrollInfo &someScrollInfo)const
|
||||
{
|
||||
return (minScrollx()==someScrollInfo.minScrollx()&&
|
||||
maxScrollx()==someScrollInfo.maxScrollx()&&
|
||||
currScrollx()==someScrollInfo.currScrollx()&&
|
||||
minScrolly()==someScrollInfo.minScrolly()&&
|
||||
maxScrolly()==someScrollInfo.maxScrolly()&&
|
||||
currScrolly()==someScrollInfo.currScrolly()&&
|
||||
sizeEvent()==someScrollInfo.sizeEvent()&&
|
||||
scrollEvent()==someScrollInfo.scrollEvent()&&
|
||||
scrollableObjectWidth()==someScrollInfo.scrollableObjectWidth()&&
|
||||
scrollableObjectHeight()==someScrollInfo.scrollableObjectHeight()&&
|
||||
hwndOwner()==someScrollInfo.hwndOwner());
|
||||
}
|
||||
|
||||
inline
|
||||
int ScrollInfo::minScrollx(void)const
|
||||
{
|
||||
return mMinScrollx;
|
||||
}
|
||||
|
||||
inline
|
||||
void ScrollInfo::minScrollx(int minScrollx)
|
||||
{
|
||||
mMinScrollx=minScrollx;
|
||||
}
|
||||
|
||||
inline
|
||||
int ScrollInfo::maxScrollx(void)const
|
||||
{
|
||||
return mMaxScrollx;
|
||||
}
|
||||
|
||||
inline
|
||||
void ScrollInfo::maxScrollx(int maxScrollx)
|
||||
{
|
||||
mMaxScrollx=maxScrollx;
|
||||
}
|
||||
|
||||
inline
|
||||
int ScrollInfo::currScrollx(void)const
|
||||
{
|
||||
return mCurrScrollx;
|
||||
}
|
||||
|
||||
inline
|
||||
void ScrollInfo::currScrollx(int currScrollx)
|
||||
{
|
||||
mCurrScrollx=currScrollx;
|
||||
}
|
||||
|
||||
inline
|
||||
int ScrollInfo::minScrolly(void)const
|
||||
{
|
||||
return mMinScrolly;
|
||||
}
|
||||
|
||||
inline
|
||||
void ScrollInfo::minScrolly(int minScrolly)
|
||||
{
|
||||
mMinScrolly=minScrolly;
|
||||
}
|
||||
|
||||
inline
|
||||
int ScrollInfo::maxScrolly(void)const
|
||||
{
|
||||
return mMaxScrolly;
|
||||
}
|
||||
|
||||
inline
|
||||
void ScrollInfo::maxScrolly(int maxScrolly)
|
||||
{
|
||||
mMaxScrolly=maxScrolly;
|
||||
}
|
||||
|
||||
inline
|
||||
int ScrollInfo::currScrolly(void)const
|
||||
{
|
||||
return mCurrScrolly;
|
||||
}
|
||||
|
||||
inline
|
||||
void ScrollInfo::currScrolly(int currScrolly)
|
||||
{
|
||||
mCurrScrolly=currScrolly;
|
||||
}
|
||||
|
||||
inline
|
||||
BOOL ScrollInfo::scrollEvent(void)const
|
||||
{
|
||||
return mScrollEvent;
|
||||
}
|
||||
|
||||
inline
|
||||
void ScrollInfo::scrollEvent(BOOL scrollEvent)
|
||||
{
|
||||
mScrollEvent=scrollEvent;
|
||||
}
|
||||
|
||||
inline
|
||||
BOOL ScrollInfo::sizeEvent(void)const
|
||||
{
|
||||
return mSizeEvent;
|
||||
}
|
||||
|
||||
inline
|
||||
void ScrollInfo::sizeEvent(BOOL sizeEvent)
|
||||
{
|
||||
mSizeEvent=sizeEvent;
|
||||
}
|
||||
|
||||
inline
|
||||
void ScrollInfo::scrollableObjectDimensions(int width,int height)
|
||||
{
|
||||
RECT clientRect;
|
||||
scrollableObjectWidth(width);
|
||||
scrollableObjectHeight(height);
|
||||
sizeEvent(FALSE);
|
||||
scrollEvent(FALSE);
|
||||
::GetClientRect(hwndOwner(),&clientRect);
|
||||
handleSize(CallbackData(0,MAKELPARAM(clientRect.right,clientRect.bottom)));
|
||||
}
|
||||
|
||||
inline
|
||||
int ScrollInfo::scrollableObjectWidth(void)const
|
||||
{
|
||||
return mScrollableObjectWidth;
|
||||
}
|
||||
|
||||
inline
|
||||
void ScrollInfo::scrollableObjectWidth(int scrollableObjectWidth)
|
||||
{
|
||||
mScrollableObjectWidth=scrollableObjectWidth;
|
||||
}
|
||||
|
||||
inline
|
||||
int ScrollInfo::scrollableObjectHeight(void)const
|
||||
{
|
||||
return mScrollableObjectHeight;
|
||||
}
|
||||
|
||||
inline
|
||||
void ScrollInfo::scrollableObjectHeight(int scrollableObjectHeight)
|
||||
{
|
||||
mScrollableObjectHeight=scrollableObjectHeight;
|
||||
}
|
||||
|
||||
inline
|
||||
HWND ScrollInfo::hwndOwner(void)const
|
||||
{
|
||||
return mhWndOwner;
|
||||
}
|
||||
|
||||
inline
|
||||
void ScrollInfo::hwndOwner(HWND hwndOwner)
|
||||
{
|
||||
mhWndOwner=hwndOwner;
|
||||
}
|
||||
|
||||
inline
|
||||
void ScrollInfo::handleHorizontalScroll(CallbackData &someCallbackData)
|
||||
{
|
||||
int xDelta;
|
||||
int yDelta;
|
||||
int xNew;
|
||||
|
||||
yDelta=0;
|
||||
switch(LOWORD(someCallbackData.wParam()))
|
||||
{
|
||||
case SB_PAGEUP :
|
||||
xNew=currScrollx()-PageIncrement;
|
||||
break;
|
||||
case SB_PAGEDOWN :
|
||||
xNew=currScrollx()+PageIncrement;
|
||||
break;
|
||||
case SB_LINEUP :
|
||||
xNew=currScrollx()-LineIncrement;
|
||||
break;
|
||||
case SB_LINEDOWN :
|
||||
xNew=currScrollx()+LineIncrement;
|
||||
break;
|
||||
case SB_THUMBPOSITION :
|
||||
xNew= HIWORD(someCallbackData.wParam());
|
||||
break;
|
||||
default :
|
||||
xNew=currScrollx();
|
||||
break;
|
||||
}
|
||||
xNew=imax(0,xNew);
|
||||
xNew=imin(maxScrollx(),xNew);
|
||||
if(xNew==currScrollx())return;
|
||||
scrollEvent(TRUE);
|
||||
xDelta=xNew-currScrollx();
|
||||
currScrollx(xNew);
|
||||
::ScrollWindow(hwndOwner(),-xDelta,-yDelta,(const RECT*)0,(const RECT*)0);
|
||||
::UpdateWindow(hwndOwner());
|
||||
::SetScrollPos(hwndOwner(),SB_HORZ,currScrollx(),TRUE);
|
||||
}
|
||||
|
||||
inline
|
||||
void ScrollInfo::handleVerticalScroll(CallbackData &someCallbackData)
|
||||
{
|
||||
int yDelta;
|
||||
int yNew;
|
||||
int xDelta;
|
||||
|
||||
xDelta=0;
|
||||
switch(LOWORD(someCallbackData.wParam()))
|
||||
{
|
||||
case SB_PAGEUP :
|
||||
yNew=currScrolly()-PageIncrement;
|
||||
break;
|
||||
case SB_PAGEDOWN :
|
||||
yNew=currScrolly()+PageIncrement;
|
||||
break;
|
||||
case SB_LINEUP :
|
||||
yNew=currScrolly()-LineIncrement;
|
||||
break;
|
||||
case SB_LINEDOWN :
|
||||
yNew=currScrolly()+LineIncrement;
|
||||
break;
|
||||
case SB_THUMBPOSITION :
|
||||
yNew=HIWORD(someCallbackData.wParam());
|
||||
break;
|
||||
default :
|
||||
yNew=currScrolly();
|
||||
break;
|
||||
}
|
||||
yNew=imax(0,yNew);
|
||||
yNew=imin(maxScrolly(),yNew);
|
||||
if(yNew==currScrolly())return;
|
||||
scrollEvent(TRUE);
|
||||
yDelta=yNew-currScrolly();
|
||||
currScrolly(yNew);
|
||||
::ScrollWindow(hwndOwner(),-xDelta,-yDelta,(const RECT*)0,(const RECT*)0);
|
||||
::UpdateWindow(hwndOwner());
|
||||
::SetScrollPos(hwndOwner(),SB_VERT,currScrolly(),TRUE);
|
||||
}
|
||||
|
||||
inline
|
||||
void ScrollInfo::handleSize(CallbackData &someCallbackData)
|
||||
{
|
||||
int xNew(someCallbackData.loWord());
|
||||
int yNew(someCallbackData.hiWord());
|
||||
|
||||
sizeEvent(TRUE);
|
||||
maxScrollx(imax(scrollableObjectWidth()-xNew,0));
|
||||
::SetScrollRange(hwndOwner(),SB_HORZ,minScrollx(),maxScrollx(),FALSE);
|
||||
currScrollx(imin(currScrollx(),maxScrollx()));
|
||||
::SetScrollPos(hwndOwner(),SB_HORZ,currScrollx(),TRUE);
|
||||
maxScrolly(imax(scrollableObjectHeight()-yNew,0));
|
||||
::SetScrollRange(hwndOwner(),SB_VERT,minScrolly(),maxScrolly(),FALSE);
|
||||
currScrolly(imin(currScrolly(),maxScrolly()));
|
||||
::SetScrollPos(hwndOwner(),SB_VERT,currScrolly(),TRUE);
|
||||
}
|
||||
|
||||
inline
|
||||
int ScrollInfo::imax(int param1,int param2)
|
||||
{
|
||||
return param1>param2?param1:param2;
|
||||
}
|
||||
|
||||
inline
|
||||
int ScrollInfo::imin(int param1,int param2)
|
||||
{
|
||||
return param1<param2?param1:param2;
|
||||
}
|
||||
#endif
|
||||
37
browse/thmbnail.cpp
Normal file
37
browse/thmbnail.cpp
Normal file
@@ -0,0 +1,37 @@
|
||||
#include <browse/thmbnail.hpp>
|
||||
|
||||
bool ThumbNail::setImage(PakEntry &pakEntry,PureDevice &pureDevice)
|
||||
{
|
||||
mImage.setRawData(pakEntry.rawData(),pureDevice);
|
||||
if(!mImage.isOkay())return false;
|
||||
mStrPathFileName=pakEntry.name();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ThumbNail::setImage(PakEntry &pakEntry)
|
||||
{
|
||||
mImage.setRawData(pakEntry.rawData());
|
||||
mStrPathFileName=pakEntry.name();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ThumbNail::setImage(const String &strPathFileName,PureDevice &pureDevice)
|
||||
{
|
||||
mImage.decode(strPathFileName,pureDevice);
|
||||
if(!mImage.isOkay())return false;
|
||||
mStrPathFileName=strPathFileName;
|
||||
mImage.resample(pureDevice,DefaultResampleWidth,DefaultResampleWidth);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ThumbNail::draw(PureDevice &pureDevice,const Point &xyPoint)
|
||||
{
|
||||
if(!isOkay())return false;
|
||||
pureDevice.line(xyPoint,Point(xyPoint.x()+width(),xyPoint.y()),light());
|
||||
pureDevice.line(xyPoint,Point(xyPoint.x(),xyPoint.y()+height()),light());
|
||||
pureDevice.line(Point(xyPoint.x()+width(),xyPoint.y()),Point(xyPoint.x()+width(),xyPoint.y()+height()),dark());
|
||||
pureDevice.line(Point(xyPoint.x(),xyPoint.y()+height()),Point(xyPoint.x()+width(),xyPoint.y()+height()),dark());
|
||||
mImage.stretch(pureDevice,Point(xyPoint.x()+OffsetImage,xyPoint.y()+OffsetImage),DefaultResampleWidth,DefaultResampleWidth-BottomBorderHeight);
|
||||
return true;
|
||||
}
|
||||
|
||||
144
browse/thmbnail.hpp
Normal file
144
browse/thmbnail.hpp
Normal file
@@ -0,0 +1,144 @@
|
||||
#ifndef _BROWSE_THUMBNAIL_HPP_
|
||||
#define _BROWSE_THUMBNAIL_HPP_
|
||||
#ifndef _COMMON_WINDOWS_HPP_
|
||||
#include <common/windows.hpp>
|
||||
#endif
|
||||
#ifndef _MEDIAPAK_PAKENTRY_HPP_
|
||||
#include <mediapak/pakentry.hpp>
|
||||
#endif
|
||||
#ifndef _BROWSE_JPGIMAGE_HPP_
|
||||
#include <browse/jpgimg.hpp>
|
||||
#endif
|
||||
|
||||
class ThumbNail
|
||||
{
|
||||
public:
|
||||
ThumbNail(void);
|
||||
virtual ~ThumbNail();
|
||||
bool draw(PureDevice &pureDevice,const Point &xyPoint);
|
||||
bool setImage(const String &strPathFileName,PureDevice &pureDevice);
|
||||
bool setImage(PakEntry &pakEntry);
|
||||
bool setImage(PakEntry &pakEntry,PureDevice &pureDevice);
|
||||
int width(void)const;
|
||||
void width(int width);
|
||||
int height(void)const;
|
||||
void height(int height);
|
||||
void light(const RGBColor &lightColor);
|
||||
void dark(const RGBColor &darkColor);
|
||||
bool isOkay(void)const;
|
||||
const String &pathFileName(void)const;
|
||||
bool getRawData(GlobalData<BYTE> &rawData);
|
||||
JPGImage &getImage();
|
||||
private:
|
||||
// enum {DefaultWidth=96,DefaultHeight=96,DefaultResampleWidth=96,OffsetImage=(DefaultWidth-DefaultResampleWidth)/2,BottomBorderHeight=0};
|
||||
enum {DefaultWidth=72,DefaultHeight=72,DefaultResampleWidth=72,OffsetImage=(DefaultWidth-DefaultResampleWidth)/2,BottomBorderHeight=0};
|
||||
ThumbNail(const ThumbNail &someThumbNail);
|
||||
ThumbNail &operator=(const ThumbNail &someThumbNail);
|
||||
const RGBColor &light(void)const;
|
||||
const RGBColor &dark(void)const;
|
||||
|
||||
String mStrPathFileName;
|
||||
RGBColor mLight;
|
||||
RGBColor mDark;
|
||||
JPGImage mImage;
|
||||
int mWidth;
|
||||
int mHeight;
|
||||
};
|
||||
|
||||
inline
|
||||
ThumbNail::ThumbNail(void)
|
||||
: mWidth(DefaultWidth), mHeight(DefaultHeight), mLight(128,128,128), mDark(0,0,0)
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
ThumbNail::ThumbNail(const ThumbNail &someThumbNail)
|
||||
{ // private implementation
|
||||
*this=someThumbNail;
|
||||
}
|
||||
|
||||
inline
|
||||
ThumbNail::~ThumbNail()
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
ThumbNail &ThumbNail::operator=(const ThumbNail &/*someThumbNail*/)
|
||||
{ // private implementation
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline
|
||||
const RGBColor &ThumbNail::light(void)const
|
||||
{
|
||||
return mLight;
|
||||
}
|
||||
|
||||
inline
|
||||
void ThumbNail::light(const RGBColor &lightColor)
|
||||
{
|
||||
mLight=lightColor;
|
||||
}
|
||||
|
||||
inline
|
||||
const RGBColor &ThumbNail::dark(void)const
|
||||
{
|
||||
return mDark;
|
||||
}
|
||||
|
||||
inline
|
||||
void ThumbNail::dark(const RGBColor &darkColor)
|
||||
{
|
||||
mDark=darkColor;
|
||||
}
|
||||
|
||||
inline
|
||||
const String &ThumbNail::pathFileName(void)const
|
||||
{
|
||||
return mStrPathFileName;
|
||||
}
|
||||
|
||||
inline
|
||||
int ThumbNail::width(void)const
|
||||
{
|
||||
return mWidth;
|
||||
}
|
||||
|
||||
inline
|
||||
void ThumbNail::width(int width)
|
||||
{
|
||||
mWidth=width;
|
||||
}
|
||||
|
||||
inline
|
||||
int ThumbNail::height(void)const
|
||||
{
|
||||
return mHeight;
|
||||
}
|
||||
|
||||
inline
|
||||
void ThumbNail::height(int height)
|
||||
{
|
||||
mHeight=height;
|
||||
}
|
||||
|
||||
inline
|
||||
bool ThumbNail::getRawData(GlobalData<BYTE> &rawData)
|
||||
{
|
||||
if(!isOkay())return false;
|
||||
return mImage.getRawData(rawData);
|
||||
}
|
||||
|
||||
inline
|
||||
JPGImage &ThumbNail::getImage(void)
|
||||
{
|
||||
return mImage;
|
||||
}
|
||||
|
||||
inline
|
||||
bool ThumbNail::isOkay(void)const
|
||||
{
|
||||
return mImage.isOkay();
|
||||
}
|
||||
#endif
|
||||
|
||||
187
browse/thmbpage.cpp
Normal file
187
browse/thmbpage.cpp
Normal file
@@ -0,0 +1,187 @@
|
||||
#include <browse/thmbpage.hpp>
|
||||
#include <common/guiwnd.hpp>
|
||||
|
||||
bool ThumbPage::insert(const String &strPathFileName,PureDevice &pureDevice)
|
||||
{
|
||||
mThumbNails.insert(&SmartPointer<ThumbNail>());
|
||||
SmartPointer<ThumbNail> &ptrThumbNail=mThumbNails[mThumbNails.size()-1];
|
||||
ptrThumbNail=::new ThumbNail();
|
||||
ptrThumbNail.disposition(PointerDisposition::Delete);
|
||||
if(!ptrThumbNail->setImage(strPathFileName,pureDevice)){mThumbNails.remove(mThumbNails.size()-1);return false;}
|
||||
isDirty(true);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ThumbPage::insert(PakEntry &pakEntry,PureDevice &pureDevice)
|
||||
{
|
||||
mThumbNails.insert(&SmartPointer<ThumbNail>());
|
||||
SmartPointer<ThumbNail> &ptrThumbNail=mThumbNails[mThumbNails.size()-1];
|
||||
ptrThumbNail=::new ThumbNail;
|
||||
ptrThumbNail.disposition(PointerDisposition::Delete);
|
||||
// if(!ptrThumbNail->setImage(pakEntry,pureDevice)){mThumbNails.remove(mThumbNails.size()-1);return false;}
|
||||
if(!ptrThumbNail->setImage(pakEntry)){mThumbNails.remove(mThumbNails.size()-1);return false;}
|
||||
isDirty(true);
|
||||
return true;
|
||||
}
|
||||
|
||||
void ThumbPage::remove(const String &strPathFileName)
|
||||
{
|
||||
for(int index=0;index<mThumbNails.size();index++)
|
||||
{
|
||||
if(mThumbNails[index]->pathFileName()==strPathFileName)
|
||||
{
|
||||
mThumbNails.remove(index);
|
||||
index=-1;
|
||||
}
|
||||
}
|
||||
isDirty(true);
|
||||
}
|
||||
|
||||
void ThumbPage::draw(GUIWindow &guiWindow)
|
||||
{
|
||||
PureDevice pureDevice(guiWindow);
|
||||
if(mDIB24.isOkay())mDIB24.draw(pureDevice,Rect(0,0,guiWindow.width(),guiWindow.height()),Point(0,0));
|
||||
}
|
||||
|
||||
void ThumbPage::draw(PureDevice &pureDevice,const Rect &dstRect,const Point &srcPoint)
|
||||
{
|
||||
if(mDIB24.isOkay())mDIB24.draw(pureDevice,dstRect,srcPoint);
|
||||
}
|
||||
|
||||
void ThumbPage::update(GUIWindow &guiWindow)
|
||||
{
|
||||
if(!isDirty())return;
|
||||
createBitmap(guiWindow);
|
||||
}
|
||||
|
||||
bool ThumbPage::createBitmap(GUIWindow &guiWindow)
|
||||
{
|
||||
PureDevice pureDevice(guiWindow);
|
||||
GDIPoint gdiPoint;
|
||||
|
||||
if(!mThumbNails.size()||!guiWindow.isValid())return false;
|
||||
if(!getDimensions(guiWindow,gdiPoint))return false;
|
||||
mDIB24.create(gdiPoint.x(),-gdiPoint.y(),pureDevice);
|
||||
mDIB24.setBits(BkColorBits);
|
||||
drawThumbNails(guiWindow);
|
||||
isDirty(false);
|
||||
return mDIB24.isOkay();
|
||||
}
|
||||
|
||||
bool ThumbPage::drawThumbNails(GUIWindow &guiWindow)
|
||||
{
|
||||
Point xyPoint;
|
||||
String strString;
|
||||
DWORD elapsedTime;
|
||||
|
||||
if(!guiWindow.isValid()||!mThumbNails.size())return false;
|
||||
elapsedTime=::GetTickCount();
|
||||
for(int index=0;index<mThumbNails.size();index++)
|
||||
{
|
||||
SmartPointer<ThumbNail> &ptrThumbNail=mThumbNails[index];
|
||||
if(xyPoint.x()+ptrThumbNail->width()>=guiWindow.width())
|
||||
{
|
||||
xyPoint.x(0);
|
||||
xyPoint.y(xyPoint.y()+ptrThumbNail->height()+Separator);
|
||||
}
|
||||
mDIB24.setAt(xyPoint.y(),xyPoint.x(),ptrThumbNail->getImage());
|
||||
xyPoint.x(xyPoint.x()+ptrThumbNail->width()+Separator);
|
||||
}
|
||||
::sprintf(strString,"drawThumbNails took %d seconds\n",(::GetTickCount()-elapsedTime)/1000);
|
||||
::OutputDebugString(strString);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ThumbPage::drawThumbNails(PureDevice &pureDevice,GUIWindow &guiWindow)
|
||||
{
|
||||
Point xyPoint;
|
||||
|
||||
if(!pureDevice.isOkay()||!guiWindow.isValid()||!mThumbNails.size())return false;
|
||||
for(int index=0;index<mThumbNails.size();index++)
|
||||
{
|
||||
SmartPointer<ThumbNail> &ptrThumbNail=mThumbNails[index];
|
||||
if(xyPoint.x()+ptrThumbNail->width()>=guiWindow.width())
|
||||
{
|
||||
xyPoint.x(0);
|
||||
xyPoint.y(xyPoint.y()+ptrThumbNail->height()+Separator);
|
||||
}
|
||||
ptrThumbNail->draw(pureDevice,xyPoint);
|
||||
xyPoint.x(xyPoint.x()+ptrThumbNail->width()+Separator);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
DWORD ThumbPage::rowItems(GUIWindow &guiWindow)const
|
||||
{
|
||||
Point xyPoint;
|
||||
DWORD rowItems;
|
||||
|
||||
rowItems=0;
|
||||
if(!guiWindow.isValid()||!mThumbNails.size())return rowItems;
|
||||
for(int index=0;index<mThumbNails.size();index++)
|
||||
{
|
||||
SmartPointer<ThumbNail> &ptrThumbNail=((Block<SmartPointer<ThumbNail> >&)mThumbNails)[index];
|
||||
if(xyPoint.x()+ptrThumbNail->width()>=guiWindow.width())
|
||||
{
|
||||
if(!rowItems)rowItems=index+1;
|
||||
xyPoint.x(0);
|
||||
xyPoint.y(xyPoint.y()+ptrThumbNail->height()+Separator);
|
||||
}
|
||||
xyPoint.x(xyPoint.x()+ptrThumbNail->width()+Separator);
|
||||
}
|
||||
if(!rowItems)rowItems=mThumbNails.size();
|
||||
return rowItems;
|
||||
}
|
||||
|
||||
int ThumbPage::getDimensions(GUIWindow &guiWindow,GDIPoint &gdiPoint)
|
||||
{
|
||||
Point xyPoint;
|
||||
|
||||
gdiPoint=GDIPoint();
|
||||
rowItems(0);
|
||||
if(!guiWindow.isValid()||!mThumbNails.size())return rowItems();
|
||||
for(int index=0;index<mThumbNails.size();index++)
|
||||
{
|
||||
SmartPointer<ThumbNail> &ptrThumbNail=mThumbNails[index];
|
||||
if(xyPoint.x()+ptrThumbNail->width()>=guiWindow.width())
|
||||
{
|
||||
if(!rowItems())
|
||||
{
|
||||
rowItems(index+1);
|
||||
gdiPoint.x(xyPoint.x());
|
||||
}
|
||||
xyPoint.x(0);
|
||||
xyPoint.y(xyPoint.y()+ptrThumbNail->height()+Separator);
|
||||
}
|
||||
xyPoint.x(xyPoint.x()+ptrThumbNail->width()+Separator);
|
||||
}
|
||||
gdiPoint.y(xyPoint.y()+mThumbNails[index-1]->height()+Separator);
|
||||
if(!rowItems())rowItems(mThumbNails.size());
|
||||
return rowItems();
|
||||
}
|
||||
|
||||
bool ThumbPage::hitTest(GUIWindow &guiWindow,const Point &clickPoint,String &strPathFileName)
|
||||
{
|
||||
Point xyPoint;
|
||||
if(!isOkay())return false;
|
||||
|
||||
for(int index=0;index<mThumbNails.size();index++)
|
||||
{
|
||||
SmartPointer<ThumbNail> &ptrThumbNail=mThumbNails[index];
|
||||
if(xyPoint.x()+ptrThumbNail->width()>=guiWindow.width())
|
||||
{
|
||||
xyPoint.x(0);
|
||||
xyPoint.y(xyPoint.y()+ptrThumbNail->height()+Separator);
|
||||
}
|
||||
Rect rgnRect(xyPoint.x(),xyPoint.y(),xyPoint.x()+ptrThumbNail->width(),xyPoint.y()+ptrThumbNail->height());
|
||||
if(rgnRect.ptInRect(clickPoint))
|
||||
{
|
||||
strPathFileName=ptrThumbNail->pathFileName();
|
||||
return true;
|
||||
}
|
||||
xyPoint.x(xyPoint.x()+ptrThumbNail->width()+Separator);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
145
browse/thmbpage.hpp
Normal file
145
browse/thmbpage.hpp
Normal file
@@ -0,0 +1,145 @@
|
||||
#ifndef _BROWSE_THUMBPAGE_HPP_
|
||||
#define _BROWSE_THUMBPAGE_HPP_
|
||||
#ifndef _COMMON_WINDOWS_HPP_
|
||||
#include <common/windows.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_BLOCK_HPP_
|
||||
#include <common/block.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_PUREDEVICE_HPP_
|
||||
#include <common/purehdc.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_SMARTPOINTER_HPP_
|
||||
#include <common/pointer.hpp>
|
||||
#endif
|
||||
#ifndef _BROWSE_THUMBNAIL_HPP_
|
||||
#include <browse/thmbnail.hpp>
|
||||
#endif
|
||||
#ifndef _BROWSE_DIB24_HPP_
|
||||
#include <browse/dib24.hpp>
|
||||
#endif
|
||||
|
||||
class DIBitmap;
|
||||
class GUIWindow;
|
||||
|
||||
class ThumbPage
|
||||
{
|
||||
public:
|
||||
ThumbPage(void);
|
||||
virtual ~ThumbPage();
|
||||
ThumbNail &operator[](UINT index);
|
||||
void draw(GUIWindow &guiWindow);
|
||||
void draw(PureDevice &pureDevice,const Rect &dstRect,const Point &srcPoint);
|
||||
bool insert(const String &strPathFileName,PureDevice &pureDevice);
|
||||
bool insert(PakEntry &pakEntry,PureDevice &pureDevice);
|
||||
void remove(const String &strPathFileName);
|
||||
void update(GUIWindow &guiWindow);
|
||||
DWORD width(void)const;
|
||||
DWORD height(void)const;
|
||||
DWORD widthThumbNail(void)const;
|
||||
bool isDirty(void)const;
|
||||
void isDirty(bool isDirty);
|
||||
DWORD entries(void)const;
|
||||
DWORD rowItems(GUIWindow &guiWindow)const;
|
||||
DWORD rowItems(void)const;
|
||||
bool hitTest(GUIWindow &guiWindow,const Point &clickPoint,String &strPathFileName);
|
||||
bool isOkay(void)const;
|
||||
private:
|
||||
enum {Separator=5,BkColorBits=255};
|
||||
ThumbPage(const ThumbPage &someThumbPage);
|
||||
ThumbPage &operator=(const ThumbPage &someThumbPage);
|
||||
int getDimensions(GUIWindow &guiWindow,GDIPoint &gdiPoint);
|
||||
bool createBitmap(GUIWindow &someGUIWindow);
|
||||
bool drawThumbNails(PureDevice &pureDevice,GUIWindow &guiWindow);
|
||||
bool drawThumbNails(GUIWindow &guiWindow);
|
||||
void rowItems(DWORD rowItems);
|
||||
|
||||
Block<SmartPointer<ThumbNail> > mThumbNails;
|
||||
DIB24 mDIB24;
|
||||
DWORD mRowItems;
|
||||
bool mIsDirty;
|
||||
};
|
||||
|
||||
inline
|
||||
ThumbPage::ThumbPage(void)
|
||||
: mIsDirty(false), mRowItems(0)
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
ThumbPage::ThumbPage(const ThumbPage &/*someThumbPage*/)
|
||||
{ // private implementation
|
||||
}
|
||||
|
||||
inline
|
||||
ThumbPage::~ThumbPage()
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
ThumbNail &ThumbPage::operator[](UINT index)
|
||||
{
|
||||
return *(mThumbNails[index]);
|
||||
}
|
||||
|
||||
inline
|
||||
ThumbPage &ThumbPage::operator=(const ThumbPage &/*someThumbPage*/)
|
||||
{ // private implementation
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline
|
||||
DWORD ThumbPage::entries(void)const
|
||||
{
|
||||
return mThumbNails.size();
|
||||
}
|
||||
|
||||
inline
|
||||
DWORD ThumbPage::widthThumbNail(void)const
|
||||
{
|
||||
if(!entries())return 0;
|
||||
return ((Block<SmartPointer<ThumbNail> >&)mThumbNails)[0]->width();
|
||||
}
|
||||
|
||||
inline
|
||||
DWORD ThumbPage::width(void)const
|
||||
{
|
||||
return mDIB24.width();
|
||||
}
|
||||
|
||||
inline
|
||||
DWORD ThumbPage::height(void)const
|
||||
{
|
||||
return mDIB24.height();
|
||||
}
|
||||
|
||||
inline
|
||||
bool ThumbPage::isDirty(void)const
|
||||
{
|
||||
return mIsDirty;
|
||||
}
|
||||
|
||||
inline
|
||||
void ThumbPage::isDirty(bool isDirty)
|
||||
{
|
||||
mIsDirty=isDirty;
|
||||
}
|
||||
|
||||
inline
|
||||
DWORD ThumbPage::rowItems(void)const
|
||||
{
|
||||
return mRowItems;
|
||||
}
|
||||
|
||||
inline
|
||||
void ThumbPage::rowItems(DWORD rowItems)
|
||||
{
|
||||
mRowItems=rowItems;
|
||||
}
|
||||
|
||||
inline
|
||||
bool ThumbPage::isOkay(void)const
|
||||
{
|
||||
return mThumbNails.size()&&mDIB24.isOkay();
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user