home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-10-07 | 184.3 KB | 6,300 lines |
- /*************************************************************************
- * SV.HXX
- * Fri Oct 7 09:28:01 1994
- * (c) 1992-1994 STAR DIVISION
- *************************************************************************/
- #ifndef _SV_HXX
- #define _SV_HXX
- #define _WINDOW_H
- #define _SYSWIN_H
- #define _WRKWIN_H
- #define _MDIWIN_H
- #define _FLOATWIN_H
- #define _MSGBOX_H
- #define _ICON_H
- #define _IMPRC_H
- #define _DIALOG_H
- #define _BITMAP_H
- #define _MENU_H
- #define _EDIT_H
- #define _LSTBOX_H
- #define _COMBOBOX_H
- #define _POINTR_H
- #define _CURSOR_H
- #define _GLOBDEFS_H
- #define _OUTDEV_H
- #define _VIRDEV_H
- #define _IMPPRN_H
- #define _TIMER_H
- #define _CTRL_H
- #define _SCRBAR_H
- #define _BUTTON_H
- #define _SYMBTN_H
- #define _SYSDLG_H
- #define _FILDLG_H
- #define _PRNDLG_H
- #define _COLDLG_H
- #define _FONTDLG_H
- #ifndef _TOOLS_HXX
- #include <tools.hxx>
- #endif
- class ImpOutputDevice { char dummy[ 90 ]; };
- class ImpVirtDevice { char dummy[ 8 ]; };
- class ImpPrinter { char dummy[ 15 ]; };
- class ImpWindow { char dummy[ 62 ]; };
- class ImpSysWin { char dummy[ 4 ]; };
- class ImpWorkWin { char dummy[ 14 ]; };
- class ImpMDIWin { char dummy[ 12 ]; };
- class ImpFloatWin { char dummy[ 44 ]; };
- class ImpMessBox { char dummy[ 12 ]; };
- struct IMPRCTYPE { char dummy[ 3 ]; };
- class ImpDlg { char dummy[ 14 ]; };
- class ImpModalDlg { char dummy[ 6 ]; };
- class ImpSysDlg { char dummy[ 8 ]; };
- class ImpFileDlg { char dummy[ 24 ]; };
- class ImpPrnSetupDlg { char dummy[ 2 ]; };
- class ImpPrintDlg { char dummy[ 2 ]; };
- class ImpColorDlg { char dummy[ 2 ]; };
- class ImpFontDlg { char dummy[ 2 ]; };
- class ImpControl { char dummy[ 10 ]; };
- class ImpLstBox { char dummy[ 14 ]; };
- class ImpComboBox { char dummy[ 10 ]; };
- class ImpScrBar { char dummy[ 22 ]; };
- class ImpEdit { char dummy[ 4 ]; };
- class ImpTriBox { char dummy[ 2 ]; };
- class ImpSymBtn { char dummy[ 26 ]; };
- class ImpBmpBtn { char dummy[ 2 ]; };
- class ImpSplitter { char dummy[ 2 ]; };
- class ImpMenu { char dummy[ 132 ]; };
- class ImpCursor { char dummy[ 1 ]; };
- class ImpTimer { char dummy[ 1 ]; };
-
- #ifndef _SV_H
- #define _SV_H
-
- #ifndef _SOLAR_H
- #endif
-
- #ifndef _TOOLS_HXX
- #endif
-
- #if defined( __SC__ ) || defined( _MSC_VER ) || (defined( ALPHA ) && defined( WNT ))
- #define protected public
-
- #ifndef ALL_WARNINGS
- #pragma warning(disable: 4355)
- #endif
- #endif
-
- #define SystemWindow SysWin
- #define PatternFormatter PatFmt
- #define NumericFormatter NumFmt
- #define MetricFormatter MetFmt
- #define CurrencyFormatter CurrFmt
- #define DateFormatter DateFmt
- #define TimeFormatter TimeFmt
- #define AcceleratorManager AMGR
-
- #define GDIPixelAction GDIPixAct
- #define GDIPointAction GDIPtAct
- #define GDILineAction GDILineAct
- #define GDIRectAction GDIRectAct
- #define GDIEllipseAction GDIElipAct
- #define GDIArcAction GDIArcAct
- #define GDIPieAction GDIPieAct
- #define GDIInvertRectAction GDIInAct
- #define GDIHighlightRectAction GDIHighAct
- #define GDIPolyLineAction GDIPolLinAct
- #define GDIPolygonAction GDIPolygonAct
- #define GDIPolyPolygonAction GDIPolyPolyAct
- #define GDITextAction GDITextAct
- #define GDIKernTextAction GDIKernTextAct
- #define GDIStretchTextAction GDIStrechAct
- #define GDIIconAction GDIIconAct
- #define GDIBitmapAction GDIBmpAct
- #define GDIBitmapScaleAction GDIBmpScalAct
- #define GDIPenAction GDIPenAct
- #define GDIFontAction GDIFontAct
- #define GDIBackBrushAction GDIBkBrushAct
- #define GDIFillBrushAction GDIFillBrushAct
- #define GDIClipRegionAction GDIClipAct
- #define GDIMoveClipRegionAction GDIMoveClipAct
- #define GDIIsectClipRegionAction GDIInClipAct
- #define GDIMapModeAction GDIMapAct
- #define GDIRasterOpAction GDIRasterAct
- #define GDIPushAction GDIPushAct
- #define GDIPopAction GDIPopAct
-
- #endif
-
- #ifndef _WINBIT_HXX
- #define _WINBIT_HXX
-
- #ifndef _SV_H
- #endif
-
- typedef USHORT WinBits;
-
- #define WB_BORDER ((WinBits)0x0001)
- #define WB_CLIPCHILDREN ((WinBits)0x0002)
-
- #define WB_SVLOOK ((WinBits)0x0004)
-
- #define WB_AUTOSIZE ((WinBits)0x0008)
-
- #define WB_SIZEABLE ((WinBits)0x0010)
- #define WB_MOVEABLE ((WinBits)0x0020)
- #define WB_MINABLE ((WinBits)0x0040)
- #define WB_MAXABLE ((WinBits)0x0080)
- #define WB_CLOSEABLE ((WinBits)0x0100)
- #define WB_TABCONTROL ((WinBits)0x0200)
-
- #define WB_APP ((WinBits)0x0400)
-
- #define WB_SIZEMOVE (WB_SIZEABLE | WB_MOVEABLE)
- #define WB_MINMAX (WB_MINABLE | WB_MAXABLE)
- #define WB_STDWORK (WB_MINMAX | WB_SIZEMOVE | WB_CLOSEABLE)
- #define WB_STDMDI WB_CLOSEABLE
-
- #define WB_HIDEWHENDEACTIVATE ((WinBits)0x0040)
- #define WB_ZOOMABLE ((WinBits)0x0080)
- #define WB_STDFLOATWIN WB_CLOSEABLE
-
- #define WB_TABSTOP ((WinBits)0x0010)
- #define WB_GROUP ((WinBits)0x0020)
-
- #define WB_SYSMODAL ((WinBits)0x4000)
- #define WB_PININ ((WinBits)0x2000)
-
- #define WB_STDMODELESS (WB_MOVEABLE | WB_CLOSEABLE)
- #define WB_STDMODAL (WB_MOVEABLE)
-
- #define WB_DEFBUTTON ((WinBits)0x0100)
- #define WB_REPEAT ((WinBits)0x4000)
-
- #define WB_LEFT ((WinBits)0x0100)
- #define WB_CENTER ((WinBits)0x0200)
- #define WB_RIGHT ((WinBits)0x0400)
-
- #define WB_PASSWORD ((WinBits)0x0040)
-
- #define WB_NOWORDBREAK ((WinBits)0x0040)
-
- #define WB_SPIN ((WinBits)0x0800)
-
- #define WB_HSCROLL ((WinBits)0x1000)
- #define WB_VSCROLL ((WinBits)0x2000)
-
- #define WB_READONLY ((WinBits)0x0080)
-
- #define WB_DRAG ((WinBits)0x4000)
-
- #define WB_SORT ((WinBits)0x0100)
- #define WB_SIMPLEMODE ((WinBits)0x0200)
- #define WB_DDEXTRAWIDTH ((WinBits)0x0400)
- #define WB_DROPDOWN ((WinBits)0x0800)
- #define WB_AUTOHSCROLL ((WinBits)0x4000)
-
- #define WB_SCROLL ((WinBits)0x1000)
-
- #define WB_OK ((WinBits)0x0010)
- #define WB_OK_CANCEL ((WinBits)0x0020)
- #define WB_YES_NO ((WinBits)0x0040)
- #define WB_YES_NO_CANCEL ((WinBits)0x0080)
- #define WB_RETRY_CANCEL ((WinBits)0x0100)
-
- #define WB_DEF_OK ((WinBits)0x0200)
- #define WB_DEF_CANCEL ((WinBits)0x0400)
- #define WB_DEF_RETRY ((WinBits)0x0800)
- #define WB_DEF_YES ((WinBits)0x1000)
- #define WB_DEF_NO ((WinBits)0x2000)
-
- #define WB_OPEN ((WinBits)0x1000)
- #define WB_SAVEAS ((WinBits)0x2000)
-
- #define WB_HIDE ((WinBits)0x8000)
-
- typedef USHORT MenuItemBits;
-
- #define MIB_CHECKABLE ((MenuItemBits)0x0001)
- #define MIB_ABOUT ((MenuItemBits)0x0002)
- #define MIB_HELP ((MenuItemBits)0x0004)
-
- enum TriState { STATE_NOCHECK, STATE_CHECK, STATE_DONTKNOW };
-
- enum SymbolType { ARROW_UP, ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT };
-
- enum FieldUnit { FUNIT_NONE, FUNIT_MM, FUNIT_CM, FUNIT_M, FUNIT_KM,
- FUNIT_TWIP, FUNIT_POINT, FUNIT_PICA,
- FUNIT_INCH, FUNIT_FOOT, FUNIT_MILE, FUNIT_CUSTOM };
-
- enum TimeFieldFormat { TIMEF_NONE, TIMEF_SEC, TIMEF_100TH_SEC };
-
- enum ButtonType { BUTTON_SYMBOL, BUTTON_TEXT, BUTTON_SYMBOLTEXT };
- enum ToolBoxItemType { TOOLBOXITEM_DONTKNOW, TOOLBOXITEM_BUTTON,
- TOOLBOXITEM_SPACE, TOOLBOXITEM_SEPARATOR,
- TOOLBOXITEM_BREAK };
- enum ToolBoxAlign { BOXALIGN_LEFT, BOXALIGN_TOP, BOXALIGN_RIGHT,
- BOXALIGN_BOTTOM };
-
- enum StatusBarAlign { STATUSBAR_ALIGN_LEFT, STATUSBAR_ALIGN_RIGHT };
-
- enum ScrollType { SCROLL_DONTKNOW, SCROLL_LINEUP, SCROLL_LINEDOWN,
- SCROLL_PAGEUP, SCROLL_PAGEDOWN, SCROLL_DRAG };
-
- #endif
-
- #ifndef _RESID_HXX
- #define _RESID_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _WINBIT_HXX
- #endif
-
- struct RSHEADER_TYPE;
-
- typedef short RESOURCE_TYPE;
- #define RSC_NOTYPE 0x100
-
- class ResId
- {
- RSHEADER_TYPE* pResource;
-
- USHORT nResId;
- RESOURCE_TYPE nRT;
- char* pStr;
-
- public:
- WinBits aWinBits;
-
- ResId( RSHEADER_TYPE * pRc )
- {
- pResource = pRc;
- nRT = RSC_NOTYPE;
- }
- ResId( USHORT nId )
- {
- nResId = nId;
- pResource = NULL;
- nRT = RSC_NOTYPE;
- }
-
- RESOURCE_TYPE GetRT() const { return( nRT ); }
- const ResId& SetRT( RESOURCE_TYPE nTyp ) const
- {
- if( RSC_NOTYPE == nRT )
- ((ResId *)this)->nRT = nTyp;
- return( *this );
- }
-
- USHORT GetId() const { return( nResId ); }
- RSHEADER_TYPE* GetpResource() const { return( pResource ); }
- };
-
- #endif
-
- #ifndef _RC_H
- #define _RC_H
-
- #ifndef _SV_H
- #endif
- #ifndef _RESID_HXX
- #endif
-
- #define RSCVERSION_ID 131
-
- #define RC_NO_ID (USHORT)0xFFFF
-
- #define RSC_BYNAME (RSC_NOTYPE + 0x01)
- #define RSC_VERSIONCONTROL (RSC_NOTYPE + 0x02)
- #define RSC_APPLICATION (RSC_NOTYPE + 0x03)
-
- #define RSC_RESOURCE (RSC_NOTYPE + 0x10)
- #define RSC_STRING (RSC_NOTYPE + 0x11)
- #define RSC_ICON (RSC_NOTYPE + 0x12)
- #define RSC_BITMAP (RSC_NOTYPE + 0x13)
- #define RSC_POINTER (RSC_NOTYPE + 0x14)
- #define RSC_BRUSH (RSC_NOTYPE + 0x15)
- #define RSC_COLOR (RSC_NOTYPE + 0x16)
- #define RSC_FONT (RSC_NOTYPE + 0x17)
- #define RSC_PEN (RSC_NOTYPE + 0x18)
- #define RSC_MAPMODE (RSC_NOTYPE + 0x19)
- #define RSC_ACCEL (RSC_NOTYPE + 0x1a)
- #define RSC_ACCELITEM (RSC_NOTYPE + 0x1b)
- #define RSC_MENU (RSC_NOTYPE + 0x1c)
- #define RSC_MENUITEM (RSC_NOTYPE + 0x1d)
- #define RSC_OUTPUTDEVICE (RSC_NOTYPE + 0x1e)
- #define RSC_KEYCODE (RSC_NOTYPE + 0x1f)
- #define RSC_TIME (RSC_NOTYPE + 0x20)
- #define RSC_DATE (RSC_NOTYPE + 0x21)
- #define RSC_INTERNATIONAL (RSC_NOTYPE + 0x22)
-
- #define RSC_MESSBOX (RSC_NOTYPE + 0x30)
- #define RSC_INFOBOX (RSC_NOTYPE + 0x31)
- #define RSC_WARNINGBOX (RSC_NOTYPE + 0x32)
- #define RSC_ERRORBOX (RSC_NOTYPE + 0x33)
- #define RSC_QUERYBOX (RSC_NOTYPE + 0x34)
- #define RSC_WINDOW (RSC_NOTYPE + 0x35)
- #define RSC_SYSWINDOW (RSC_NOTYPE + 0x36)
- #define RSC_WORKWIN (RSC_NOTYPE + 0x37)
- #define RSC_MDIWINDOW (RSC_NOTYPE + 0x38)
- #define RSC_DIALOG (RSC_NOTYPE + 0x39)
- #define RSC_MODELESSDIALOG (RSC_NOTYPE + 0x3a)
- #define RSC_MODALDIALOG (RSC_NOTYPE + 0x3b)
- #define RSC_SYSTEMDIALOG (RSC_NOTYPE + 0x3c)
- #define RSC_FILEDIALOG (RSC_NOTYPE + 0x3d)
- #define RSC_PRINTERSETUPDIALOG (RSC_NOTYPE + 0x3e)
- #define RSC_PRINTDIALOG (RSC_NOTYPE + 0x3f)
- #define RSC_COLORDIALOG (RSC_NOTYPE + 0x40)
- #define RSC_FONTDIALOG (RSC_NOTYPE + 0x41)
- #define RSC_CONTROL (RSC_NOTYPE + 0x42)
- #define RSC_BUTTON (RSC_NOTYPE + 0x43)
- #define RSC_PUSHBUTTON (RSC_NOTYPE + 0x44)
- #define RSC_OKBUTTON (RSC_NOTYPE + 0x45)
- #define RSC_CANCELBUTTON (RSC_NOTYPE + 0x46)
- #define RSC_HELPBUTTON (RSC_NOTYPE + 0x47)
- #define RSC_MENUBUTTON (RSC_NOTYPE + 0x48)
- #define RSC_MOREBUTTON (RSC_NOTYPE + 0x49)
- #define RSC_SYMBOLBUTTON (RSC_NOTYPE + 0x4a)
- #define RSC_BITMAPBUTTON (RSC_NOTYPE + 0x4b)
- #define RSC_SPINBUTTON (RSC_NOTYPE + 0x4c)
- #define RSC_RADIOBUTTON (RSC_NOTYPE + 0x4d)
- #define RSC_CHECKBOX (RSC_NOTYPE + 0x4e)
- #define RSC_TRISTATEBOX (RSC_NOTYPE + 0x4f)
- #define RSC_EDIT (RSC_NOTYPE + 0x50)
- #define RSC_MULTILINEEDIT (RSC_NOTYPE + 0x51)
- #define RSC_COMBOBOX (RSC_NOTYPE + 0x52)
- #define RSC_LISTBOX (RSC_NOTYPE + 0x53)
- #define RSC_MULTILISTBOX (RSC_NOTYPE + 0x54)
- #define RSC_TEXT (RSC_NOTYPE + 0x55)
- #define RSC_FIXEDBITMAP (RSC_NOTYPE + 0x56)
- #define RSC_FIXEDICON (RSC_NOTYPE + 0x57)
- #define RSC_GROUPBOX (RSC_NOTYPE + 0x58)
- #define RSC_SCROLLBAR (RSC_NOTYPE + 0x59)
- #define RSC_SPLITTER (RSC_NOTYPE + 0x5a)
- #define RSC_SPLITBAR (RSC_NOTYPE + 0x5b)
- #define RSC_SPINFIELD (RSC_NOTYPE + 0x5c)
- #define RSC_PATTERNFIELD (RSC_NOTYPE + 0x5d)
- #define RSC_NUMERICFIELD (RSC_NOTYPE + 0x5e)
- #define RSC_METRICFIELD (RSC_NOTYPE + 0x5f)
- #define RSC_CURRENCYFIELD (RSC_NOTYPE + 0x60)
- #define RSC_DATEFIELD (RSC_NOTYPE + 0x61)
- #define RSC_TIMEFIELD (RSC_NOTYPE + 0x62)
- #define RSC_PATTERNBOX (RSC_NOTYPE + 0x63)
- #define RSC_NUMERICBOX (RSC_NOTYPE + 0x64)
- #define RSC_METRICBOX (RSC_NOTYPE + 0x65)
- #define RSC_CURRENCYBOX (RSC_NOTYPE + 0x66)
- #define RSC_DATEBOX (RSC_NOTYPE + 0x67)
- #define RSC_TIMEBOX (RSC_NOTYPE + 0x68)
- #define RSC_TOOLBOXITEM (RSC_NOTYPE + 0x69)
- #define RSC_TOOLBOX (RSC_NOTYPE + 0x6a)
- #define RSC_STATUSBAR (RSC_NOTYPE + 0x6b)
- #define RSC_FLOATINGWINDOW (RSC_NOTYPE + 0x6c)
-
- #define RSC_ABBREVBUTTON (RSC_NOTYPE + 0x80)
- #define RSC_HELPWINDOW (RSC_NOTYPE + 0x81)
- #define RSC_MAGNIFIER (RSC_NOTYPE + 0x82)
-
- #define RT_SYS_POINTER (RSC_NOTYPE + 0xf0)
- #define RT_SYS_ICON (RSC_NOTYPE + 0xf1)
- #define RT_SYS_BITMAP (RSC_NOTYPE + 0xf2)
- #define RT_SYS_STRING (RSC_NOTYPE + 0xf3)
- #define RT_SYS_FILE (RSC_NOTYPE + 0xf4)
-
- #define RSC_ARROW (RSC_NOTYPE + 0xf5)
-
- #define OUTDEV_PEN 0x01
- #define OUTDEV_BGBRUSH 0x02
- #define OUTDEV_FIBRUSH 0x04
- #define OUTDEV_FONT 0x08
- #define OUTDEV_MAPMODE 0x10
- struct RSOUTPUTDEVICE_TYPE {
- short nObjFollows;
-
- };
-
- #define RSC_EXTRAMAPUNIT 0xFFFF
-
- typedef short RSWND_STYLE;
- #define RSWND_DISABLED 0x01
- #define RSWND_CLIENTSIZE 0x02
-
- #define WINDOW_XYMAPMODE 0x0001
- #define WINDOW_X 0x0002
- #define WINDOW_Y 0x0004
- #define WINDOW_WHMAPMODE 0x0008
- #define WINDOW_WIDTH 0x0010
- #define WINDOW_HEIGHT 0x0020
- #define WINDOW_CHILDS 0x0040
- #define WINDOW_TEXT 0x0080
- #define WINDOW_HELPTEXT 0x0100
- #define WINDOW_POINTER 0x0200
- struct RSWINDOW_TYPE {
- USHORT nObjMask;
- RSWND_STYLE nRSStyle;
- short nStyle;
- USHORT nHiHelpId;
- USHORT nLoHelpId;
-
- };
-
- #define WORKWIN_SHOWNORMAL 0
- #define WORKWIN_SHOWMINIMIZED 1
- #define WORKWIN_SHOWMAXIMIZED 2
- #define WORKWIN_ICON 0x01
- struct RSWORKWIN_TYPE {
- short nObjMask;
- short nShowStyle;
-
- };
-
- struct RSLISTBOX_TYPE {
- short nSelPos;
- short nNumber;
-
- };
-
- struct RSCOMBOBOX_TYPE {
- short nNumber;
-
- };
-
- struct RSRADIOBUTTON_TYPE {
- short nChecked;
- };
-
- struct RSCHECKBOX_TYPE {
- short nChecked;
- };
-
- struct RSTRISTATEBOX_TYPE {
- short nTriState;
- short bDisableTriState;
- };
-
- #define RSCMENUBUTTON_MENU 0x01
- struct RSMENUBUTTON_TYPE {
- short nObjMask;
-
- };
-
- struct RSSYMBOLBUTTON_TYPE {
- USHORT nSymbol;
- };
-
- #define RSCBITMAPBUTTON_BITMAP 0x01
- struct RSBITMAPBUTTON_TYPE
- {
- short nObjMask;
-
- };
-
- struct RSEDIT_TYPE {
- USHORT nTextLength;
- };
-
- struct RSSCROLL_TYPE {
- short nMin;
- short nMax;
- short nThumbPos;
- short nPage;
- short nStep;
- short nVisibleSize;
- };
-
- struct RSKEYCODE_TYPE {
- USHORT nKeyCode;
- USHORT nModifier;
- USHORT nKeyFunc;
- };
-
- struct RSMENU_TYPE {
- short nObjFollows;
-
- };
-
- #define RSC_MENUITEM_DISABLE 0x01
- #define RSC_MENUITEM_CHECKED 0x02
- #define RSC_MENUITEM_SEPARATOR 0x04
- #define RSC_MENUITEM_CHECKABLE 0x08
- #define RSC_MENUITEM_ABOUT 0x10
- #define RSC_MENUITEM_HELP 0x20
-
- #define RSC_MENUITEM_BITMAP 0x01
- #define RSC_MENUITEM_KEYCODE 0x02
- #define RSC_MENUITEM_MENU 0x04
-
- struct RSMENUITEM_TYPE {
- USHORT nObjMask;
- USHORT nMenuItemId;
- USHORT nStatus;
- USHORT nHiHelpId;
- USHORT nLoHelpId;
-
- };
-
- struct RSACCEL_TYPE {
-
- short nObjFollows;
-
- };
-
- #define ACCELITEM_ACCEL 0x01
- #define ACCELITEM_KEY 0x02
-
- struct RSACCELITEM_TYPE {
- USHORT nObjMask;
- USHORT nAccelKeyId;
- USHORT bDisable;
-
- };
-
- struct RSCOLOR_TYPE {
- USHORT nRed;
- USHORT nGreen;
- USHORT nBlue;
- USHORT nSystemColor;
- };
-
- struct RSMAPMODE_TYPE {
- short nMapUnit;
- short nXOrigin;
- short nYOrigin;
- short nXNumerator;
- short nXDeNominator;
- short nYNumerator;
- short nYDeNominator;
- };
-
- #define PEN_COLOR 0x01
- struct RSPEN_TYPE {
- short nObjFollows;
- USHORT nPenWidth;
- USHORT nPenStyle;
-
- };
-
- #define BRUSH_BRUSHCOLOR 0x01
- #define BRUSH_FILLCOLOR 0x02
- #define BRUSH_BRUSHBITMAP 0x04
- struct RSBRUSH_TYPE {
- short nObjMask;
- USHORT nBrushStyle;
- short bTransparent;
-
- };
-
- #define FONT_ITALIC 0x01
- #define FONT_TRANSPARENT 0x02
- #define FONT_SHADOW 0x04
- #define FONT_OUTLINE 0x08
-
- #define FONT_FONTCOLOR 0x01
- #define FONT_FILLCOLOR 0x02
- struct RSFONT_TYPE {
- short nObjMask;
- short nFontFamily;
- short nFontWeight;
- short nFontCharSet;
- short nFontPitch;
- short nFontAlign;
- short nFontUnderline;
- short nFontStrikeout;
- USHORT nHeight;
- USHORT nWidth;
- short nCharOrientation;
- short nLineOrientation;
- short nAttributes;
-
- };
-
- #define RSC_BITMAP_SYSTEM 0
- #define RSC_BITMAP_DIB 1
- #define RSC_BITMAP_PIC 2
- struct RSBITMAP_TYPE {
- USHORT nBitmapTyp;
- USHORT nBitmapId;
-
- };
-
- #define ICON_ICON 0
- #define ICON_CICN 1
- #define ICON_DIB 2
- struct RSICON_TYPE {
- USHORT nSystemIcon;
- USHORT nIconTyp;
- USHORT nIconId;
-
- };
-
- struct RSPOINTER_TYPE {
- USHORT nSystemPointer;
- USHORT nPointerTyp;
- USHORT nPointerId;
-
- };
-
- struct RSMESSAGEBOX_TYPE {
- USHORT nButtons;
- USHORT nDefButton;
- USHORT nHiHelpId;
- USHORT nLoHelpId;
- USHORT bSysModal;
-
- };
-
- #define SPLITBAR_WIDTH 0x01
- #define SPLITBAR_SCROLLBAR1 0x02
- #define SPLITBAR_SCROLLBAR2 0x04
- struct RSSPLITBAR_TYPE {
- short nObjMask;
-
- };
-
- #define FILEDIALOG_DEFAULTEXT 0x01
- #define FILEDIALOG_FILTERLIST 0x02
- #define FILEDIALOG_CURFILTER 0x04
- struct RSFILEDIALOG_TYPE {
- short nObjMask;
-
- };
-
- #define RSC_PRINTDIALOG_DISABLEPAGEVIEW 0x01
- #define RSC_PRINTDIALOG_DISABLESELECTION 0x02
- #define RSC_PRINTDIALOG_CHECKSELECTION 0x04
- #define RSC_PRINTDIALOG_DISABLECOLLATE 0x08
- #define RSC_PRINTDIALOG_CHECKCOLLATE 0x10
-
- struct RSPRINTDIALOG_TYPE {
- short nObjMask;
-
- };
-
- #define TIME_HOUR 0x01
- #define TIME_MINUTE 0x02
- #define TIME_SECOND 0x04
- #define TIME_SEC100 0x08
- struct RSTIME_TYPE {
- short nObjMask;
-
- };
-
- #define DATE_YEAR 0x01
- #define DATE_MONTH 0x02
- #define DATE_DAY 0x04
- struct RSDATE_TYPE {
- short nObjMask;
-
- };
-
- #define INT1_LANGUAGE 0x0001
- #define INT1_COUNTRY 0x0002
- #define INT1_DATEFORMAT 0x0004
- #define INT1_DATEDAYLEADINDZERO 0x0008
- #define INT1_DATEMONTHLEADINDZERO 0x0010
- #define INT1_DATECENTURY 0x0020
- #define INT1_LONGDATEFORMAT 0x0040
- #define INT1_LONGDATEDAYOFWEEKFORMAT 0x0080
- #define INT1_LONGDATEDAYOFWEEKSEP 0x0100
- #define INT1_LONGDATEDAYLEADINGZERO 0x0200
- #define INT1_LONGDATEDAYSEP 0x0400
- #define INT1_LONGDATEMONTHFORMAT 0x0800
- #define INT1_LONGDATEMONTHSEP 0x1000
- #define INT1_LONGDATECENTURY 0x2000
- #define INT1_LONGDATEYEARSEP 0x4000
- #define INT1_TIMEFORMAT 0x8000
- struct RSINT1_TYPE {
- short nObjMask;
-
- };
-
- #define INT2_TIMELEADINGZERO 0x0001
- #define INT2_TIMEAM 0x0002
- #define INT2_TIMEPM 0x0004
- #define INT2_NUMLEADINGZERO 0x0008
- #define INT2_NUMDIGITS 0x0010
- #define INT2_CURRPOSITIVEFORMAT 0x0020
- #define INT2_CURRNEGATIVEFORMAT 0x0040
- #define INT2_CURRDIGITS 0x0080
- #define INT2_NUMTRAILINGZEROS 0x0100
- struct RSINT2_TYPE {
- short nObjMask;
-
- };
-
- #define APPLICATION_ICON 0x01
- #define APPLICATION_FONT 0x02
- #define APPLICATION_MENUBAR 0x04
- #define APPLICATION_ACCELERATOR 0x08
- #define APPLICATION_I12 0x10
- #define APPLICATION_SVLOOK 0x20
- struct RSAPPLICATION_TYPE {
- short nObjMask;
-
- };
-
- #define PATTERNFORMATTER_STRICTFORMAT 0x01
- #define PATTERNFORMATTER_EDITMASK 0x02
- #define PATTERNFORMATTER_LITTERALMASK 0x04
- struct RSPATTERNFORMATTER_TYPE {
- short nObjMask;
-
- };
-
- #define NUMERICFORMATTER_MIN 0x01
- #define NUMERICFORMATTER_MAX 0x02
- #define NUMERICFORMATTER_STRICTFORMAT 0x04
- #define NUMERICFORMATTER_I12 0x08
- #define NUMERICFORMATTER_DECIMALDIGITS 0x10
- #define NUMERICFORMATTER_VALUE 0x20
- struct RSNUMERICFORMATTER_TYPE {
- short nObjMask;
-
- };
-
- #define METRICFORMATTER_UNIT 0x01
- #define METRICFORMATTER_CUSTOMUNITTEXT 0x02
- struct RSMETRICFORMATTER_TYPE {
- short nObjMask;
-
- };
-
- #define DATEFORMATTER_MIN 0x01
- #define DATEFORMATTER_MAX 0x02
- #define DATEFORMATTER_LONGFORMAT 0x04
- #define DATEFORMATTER_STRICTFORMAT 0x08
- #define DATEFORMATTER_I12 0x10
- #define DATEFORMATTER_VALUE 0x20
- struct RSDATEFORMATTER_TYPE {
- short nObjMask;
-
- };
-
- #define TIMEFORMATTER_MIN 0x01
- #define TIMEFORMATTER_MAX 0x02
- #define TIMEFORMATTER_TIMEFIELDFORMAT 0x04
- #define TIMEFORMATTER_DURATION 0x08
- #define TIMEFORMATTER_STRICTFORMAT 0x10
- #define TIMEFORMATTER_I12 0x20
- #define TIMEFORMATTER_VALUE 0x40
- struct RSTIMEFORMATTER_TYPE {
- short nObjMask;
-
- };
-
- #define NUMERICFIELD_FIRST 0x01
- #define NUMERICFIELD_LAST 0x02
- #define NUMERICFIELD_SPINSIZE 0x04
- struct RSNUMERICFIELD_TYPE {
- short nObjMask;
-
- };
-
- #define METRICFIELD_FIRST 0x01
- #define METRICFIELD_LAST 0x02
- #define METRICFIELD_SPINSIZE 0x04
- struct RSMETRICFIELD_TYPE {
- short nObjMask;
-
- };
-
- #define CURRENCYFIELD_FIRST 0x01
- #define CURRENCYFIELD_LAST 0x02
- #define CURRENCYFIELD_SPINSIZE 0x04
- struct RSCURRENCYFIELD_TYPE {
- short nObjMask;
-
- };
-
- #define DATEFIELD_FIRST 0x01
- #define DATEFIELD_LAST 0x02
- struct RSDATEFIELD_TYPE {
- short nObjMask;
-
- };
- #define TIMEFIELD_FIRST 0x01
- #define TIMEFIELD_LAST 0x02
- struct RSTIMEFIELD_TYPE {
- short nObjMask;
-
- };
-
- #define RSC_TOOLBOXITEM_ID 0x0001
- #define RSC_TOOLBOXITEM_TYPE 0x0002
- #define RSC_TOOLBOXITEM_HELPID 0x0004
- #define RSC_TOOLBOXITEM_TEXT 0x0008
- #define RSC_TOOLBOXITEM_HELPTEXT 0x0010
- #define RSC_TOOLBOXITEM_BITMAP 0x0020
- #define RSC_TOOLBOXITEM_DISBITMAP 0x0040
- #define RSC_TOOLBOXITEM_CHECK 0x0080
- #define RSC_TOOLBOXITEM_DISABLE 0x0100
-
- struct RSTOOLBOXITEM_TYPE
- {
- USHORT nObjMask;
-
- };
-
- #define RSC_TOOLBOX_BUTTONTYPE 0x01
- #define RSC_TOOLBOX_ALIGN 0x02
- #define RSC_TOOLBOX_LINECOUNT 0x04
- #define RSC_TOOLBOX_ITEMLIST 0x08
-
- struct RSTOOLBOX_TYPE
- {
- USHORT nObjMask;
-
- };
-
- #define RSC_STATUSBAR_ALIGN 0x01
- struct RSSTATUSBAR_TYPE
- {
- USHORT nObjMask;
-
- };
-
- #define RSC_MOREBUTTON_STATE 0x01
- #define RSC_MOREBUTTON_MAPUNIT 0x02
- #define RSC_MOREBUTTON_DELTA 0x04
- struct RSMOREBUTTON_TYPE
- {
- USHORT nObjMask;
-
- };
-
- #define RSC_FLOATINGWINDOW_WHMAPMODE 0x01
- #define RSC_FLOATINGWINDOW_WIDTH 0x02
- #define RSC_FLOATINGWINDOW_HEIGHT 0x04
- #define RSC_FLOATINGWINDOW_ZOOMIN 0x08
- struct RSFLOATINGWINDOW_TYPE
- {
- USHORT nObjMask;
-
- };
-
- #endif
-
- #ifndef _RC_HXX
- #define _RC_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _RESID_HXX
- #endif
- #ifndef _IMPRC_H
- #endif
-
- class Resource;
-
- struct RSHEADER_TYPE{
- USHORT nId;
- RESOURCE_TYPE nRT;
- USHORT nGlobOff;
- USHORT nLocalOff;
- };
-
- struct RSBYNAME_TYPE {
- RSHEADER_TYPE Header;
- USHORT nId;
- RESOURCE_TYPE rtType;
- };
-
- class ResImp
- {
- protected:
- ResImp( char * pFileName = (char *)0 );
- ~ResImp();
-
- BOOL IsGlobalAvailable( RESOURCE_TYPE nRT, USHORT nId ) const;
-
- void * LoadGlobalRes( RESOURCE_TYPE nRT, USHORT nId,
- void ** pResHandle );
-
- void FreeGlobalRes( void *aResHandle, void * pResource );
- public:
- IMPRCTYPE imp;
- };
-
- typedef short LOAD_FLAGS;
-
- #define RC_NOTYPE 0x0
- #define RC_GLOBAL 0x1
-
- struct STACK_TYPE {
-
- RSHEADER_TYPE * pResource;
- void * pClassRes;
- LOAD_FLAGS Flags;
- void * aResHandle;
- const Resource* pResObj;
- USHORT nId;
- void Clear( const Resource * pObj = NULL, USHORT Id = 0 )
- {
- pResource = NULL;
- pClassRes = NULL;
- Flags = RC_NOTYPE;
- aResHandle = NULL;
- pResObj = pObj;
- nId = Id;
- }
- };
-
- #define MAX_RC_STACK 32
-
- class ResMgr : public ResImp
- {
- BOOL bModul;
- STACK_TYPE aStack[ MAX_RC_STACK ];
- short nTopRes;
- public:
- ResMgr( char * pFileName = (char *)0 );
- ~ResMgr();
-
- void TestStack( const Resource * );
-
- BOOL IsAvailable( RESOURCE_TYPE, USHORT nId,
- RSHEADER_TYPE * = NULL,
- const Resource * = NULL) const;
-
- BOOL GetResource( RESOURCE_TYPE, USHORT nId,
- RSHEADER_TYPE *, const Resource * );
- void PopContext( const Resource * );
-
- void * Increment( USHORT nSize );
-
- static USHORT GetObjSize( RSHEADER_TYPE * pHT )
- {
- return( pHT->nGlobOff );
- }
-
- static USHORT GetStringSize( USHORT nLen )
- {
- nLen++;
- return (nLen + nLen%2);
- }
- static USHORT GetStringSize( char * pStr );
-
- static long GetLong( void * pLong )
- {
- return (long)(((INT32)(*(UINT16*)pLong) << 16) | *(((UINT16*)pLong) + 1));
- }
-
- void * GetClass()
- {
- return( aStack[ nTopRes ].pClassRes );
- }
-
- USHORT GetRemainSize();
- };
-
- class Resource : public LinkHdl
- {
- protected:
-
- BOOL IsAvailableRes( const ResId& rId ) const
- {
- return( GetResManager()->IsAvailable( rId.GetRT(), rId.GetId(),
- rId.GetpResource(), this ) );
- }
-
- void GetRes( const ResId& rResId );
-
- void TestRes();
-
- static void * GetClassRes()
- {
- return( GetResManager()->GetClass() );
- }
-
- static void * IncrementRes( USHORT nBytes )
- {
- return( GetResManager()->Increment( nBytes ) );
- }
-
- static USHORT GetObjSizeRes( RSHEADER_TYPE * pHT )
- {
- return( ResMgr::GetObjSize( pHT ) );
- }
-
- static USHORT GetStringSizeRes( char * pStr )
- {
- return( ResMgr::GetStringSize( pStr ) );
- }
-
- static USHORT GetRemainSizeRes()
- {
- return( GetResManager()->GetRemainSize() );
- }
-
- static long GetLongRes( void * pLong )
- {
- return( ResMgr::GetLong( pLong ) );
- }
-
- void FreeResource()
- {
- GetResManager()->PopContext( this );
- }
-
- Resource( const ResId& rResId );
-
- Resource() {};
-
- public:
-
- ~Resource()
- {
- #ifdef DBG_UTIL
- TestRes();
- #endif
- }
-
- static ResMgr * GetResManager();
-
- static void SetResManager( ResMgr * paResMgr );
-
- static void DisableErrorBox();
- };
-
- #endif
-
- #ifndef _MAPMOD_HXX
- #define _MAPMOD_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _RESID_HXX
- #endif
- #ifndef _RC_HXX
- #endif
-
- enum MapUnit { MAP_100TH_MM, MAP_10TH_MM, MAP_MM, MAP_CM,
- MAP_1000TH_INCH, MAP_100TH_INCH, MAP_10TH_INCH, MAP_INCH,
- MAP_POINT, MAP_TWIP, MAP_PIXEL, MAP_SYSFONT, MAP_APPFONT };
-
- class ImpMapMode
- {
- friend class MapMode;
-
- protected:
- USHORT nRefCount;
- MapUnit eUnit;
- Point aOrigin;
- Fraction aScaleX;
- Fraction aScaleY;
- BOOL bStatic;
-
- public:
- ImpMapMode();
- ImpMapMode( const ImpMapMode& rImpMapMode );
-
- BOOL IsEqual( const ImpMapMode& rImpMapMode ) const;
- };
-
- class ImpMapMode;
-
- class MapMode : public Resource
- {
- protected:
- ImpMapMode* pImpMapMode;
-
- public:
- MapMode();
- MapMode( const MapMode& rMapMode );
- MapMode( MapUnit eUnit );
- MapMode( MapUnit eUnit, const Point& rLogicOrg,
- const Fraction& rScaleX, const Fraction& rScaleY );
- MapMode( const ResId& rResId );
- ~MapMode();
-
- MapUnit ChangeMapUnit( MapUnit eUnit );
- MapUnit GetMapUnit() const
- { return pImpMapMode->eUnit; }
-
- Point ChangeOrigin( const Point& rOrigin );
- const Point& GetOrigin() const
- { return pImpMapMode->aOrigin; }
-
- Fraction ChangeScaleX( const Fraction& rScaleX );
- const Fraction& GetScaleX() const
- { return pImpMapMode->aScaleX; }
- Fraction ChangeScaleY( const Fraction& rScaleY );
- const Fraction& GetScaleY() const
- { return pImpMapMode->aScaleY; }
-
- MapMode& operator=( const MapMode& rMapMode );
-
- BOOL operator==( const MapMode& rMapMode ) const;
- BOOL operator!=( const MapMode& rMapMode ) const;
- };
-
- #endif
-
- #ifndef _COLOR_HXX
- #define _COLOR_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _RESID_HXX
- #endif
- #ifndef _RC_HXX
- #endif
-
- #define COLCOUNT_MONOCHROM ((ULONG)2)
- #define COLCOUNT_16 ((ULONG)16)
- #define COLCOUNT_256 ((ULONG)256)
- #define COLCOUNT_HICOLOR1 (((ULONG)0x00007FFF)+1)
- #define COLCOUNT_HICOLOR2 (((ULONG)0x0000FFFF)+1)
- #define COLCOUNT_TRUECOLOR (((ULONG)0x00FFFFFF)+1)
-
- enum ColorName { COL_BLACK, COL_BLUE, COL_GREEN, COL_CYAN,
- COL_RED, COL_MAGENTA, COL_BROWN, COL_GRAY,
- COL_LIGHTGRAY, COL_LIGHTBLUE, COL_LIGHTGREEN,
- COL_LIGHTCYAN, COL_LIGHTRED, COL_LIGHTMAGENTA,
- COL_YELLOW, COL_WHITE,
- COL_MENUBAR, COL_MENUBARTEXT,
- COL_POPUPMENU, COL_POPUPMENUTEXT,
- COL_WINDOWTEXT, COL_WINDOWWORKSPACE,
- COL_HIGHLIGHT, COL_HIGHLIGHTTEXT,
- COL_3DTEXT, COL_3DFACE, COL_3DLIGHT, COL_3DSHADOW,
- COL_SCROLLBAR, COL_USER };
-
- class Color : public Resource
- {
- protected:
- ColorName eColorName;
- USHORT nRed;
- USHORT nGreen;
- USHORT nBlue;
-
- public:
- Color();
- Color( ColorName eColorName );
- Color( USHORT nRed, USHORT nGreen, USHORT nBlue );
- Color( const ResId &rResId );
-
- USHORT ChangeRed( USHORT nRed );
- USHORT GetRed() const;
- USHORT ChangeGreen( USHORT nGreen );
- USHORT GetGreen() const;
- USHORT ChangeBlue( USHORT nBlue );
- USHORT GetBlue() const;
-
- ColorName ChangeColorName( ColorName eColorName );
- ColorName GetColorName() const { return eColorName; }
-
- BOOL operator==( const Color& rColor ) const;
- BOOL operator!=( const Color& rColor ) const;
- };
-
- inline Color::Color()
- {
- Color::eColorName = COL_BLACK;
- }
-
- inline Color::Color( ColorName _eColorName )
- {
- Color::eColorName = _eColorName;
- if ( _eColorName == COL_USER )
- {
- nRed = nGreen = nBlue = 0;
- }
- }
-
- inline Color::Color( USHORT _nRed, USHORT _nGreen, USHORT _nBlue )
- {
- Color::eColorName = COL_USER;
- Color::nRed = _nRed;
- Color::nGreen = _nGreen;
- Color::nBlue = _nBlue;
- }
-
- #endif
-
- #ifndef _PAL_HXX
- #define _PAL_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _COLOR_H
- #endif
-
- class ImpPalette;
-
- class Palette
- {
- protected:
- ImpPalette* pImpPalette;
-
- public:
- Palette( USHORT nEntries = 0 );
- Palette( USHORT nEntries, Color aColAry[],
- BOOL bAnimate = FALSE );
- Palette( const Palette& rPal );
- ~Palette();
-
- USHORT ChangeEntryCount( USHORT nEntries );
- USHORT GetEntryCount() const;
- Color ChangeColor( USHORT nEntry, const Color& rCol );
- Color GetColor( USHORT nEntry ) const;
- BOOL ChangeAnimate( USHORT nEntry, BOOL bAnimate );
- BOOL IsAnimate( USHORT nEntry ) const;
- void SetAnimate( BOOL bAnimate );
-
- Palette& operator=( const Palette& rPalette );
- Color operator[]( USHORT nPos ) const;
- Color& operator[]( USHORT nPos );
-
- BOOL operator==( const Palette& rPalette ) const;
- BOOL operator!=( const Palette& rPalette ) const;
- };
-
- #endif
-
- #ifndef _BITMAP_HXX
- #define _BITMAP_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _PAL_HXX
- #endif
- #ifndef _RESID_HXX
- #endif
- #ifndef _RC_HXX
- #endif
-
- class ImpBitmap;
- class istream;
- class ostream;
-
- class Bitmap : public Resource
- {
- protected:
-
- ImpBitmap* pImpBitmap;
-
- public:
- Bitmap();
- Bitmap( const Bitmap& rBitmap );
- Bitmap( const ResId& rResId );
- ~Bitmap();
-
- Palette ChangePalette( const Palette& rPal );
- Palette GetPalette() const;
-
- ULONG GetColorCount() const;
- Size GetSizePixel() const;
-
- ULONG GetSizeBytes() const;
-
- Bitmap& operator=( const Bitmap& rBitmap );
-
- BOOL operator==( const Bitmap& rBitmap ) const;
- BOOL operator!=( const Bitmap& rBitmap ) const;
-
- friend istream& operator>>( istream& rIStream, Bitmap& rBitmap );
- friend ostream& operator<<( ostream& rOStream, const Bitmap& rBitmap );
- };
-
- #endif
-
- #ifndef _GDIOBJ_HXX
- #define _GDIOBJ_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _RESID_HXX
- #endif
- #ifndef _RC_HXX
- #endif
- #ifndef _COLOR_HXX
- #endif
- #ifndef _BITMAP_HXX
- #endif
-
- class ImpPen;
- class ImpBrush;
- class ImpFont;
-
- enum PenStyle { PEN_NULL, PEN_SOLID, PEN_DOT, PEN_DASH, PEN_DASHDOT };
-
- class ImpPen
- {
- friend class Pen;
-
- protected:
- USHORT nRefCount;
- Color aColor;
- USHORT nWidth;
- PenStyle eStyle;
- BOOL bStatic;
- BOOL bDummy;
-
- public:
- ImpPen();
- ImpPen( const ImpPen& rImpPen );
- ImpPen( const Color& rColor, USHORT nWidth,
- PenStyle eStyle );
-
- BOOL IsEqual( const ImpPen& rImpPen ) const;
- };
-
- class Pen : public Resource
- {
- protected:
- ImpPen* pImpPen;
-
- public:
- Pen();
- Pen( const Pen& rPen );
- Pen( PenStyle eStyle );
- Pen( const Color& rColor, USHORT nWidth = 0,
- PenStyle eStyle = PEN_SOLID );
- Pen( const ResId &rResId );
- ~Pen();
-
- Color ChangeColor( const Color& rColor );
- const Color& GetColor() const
- { return pImpPen->aColor; }
-
- USHORT ChangeWidth( USHORT nWidth );
- USHORT GetWidth() const
- { return pImpPen->nWidth; }
-
- PenStyle ChangeStyle( PenStyle eStyle );
- PenStyle GetStyle() const
- { return pImpPen->eStyle; }
-
- Pen& operator=( const Pen& rPen );
- BOOL operator==( const Pen& rPen ) const;
- BOOL operator!=( const Pen& rPen ) const;
- };
-
- #define BRUSH_SIZE 8
-
- enum BrushStyle { BRUSH_NULL, BRUSH_SOLID, BRUSH_HORZ, BRUSH_VERT,
- BRUSH_CROSS, BRUSH_DIAGCROSS, BRUSH_UPDIAG, BRUSH_DOWNDIAG,
- BRUSH_25, BRUSH_50, BRUSH_75,
- BRUSH_BITMAP };
-
- class ImpBrush
- {
- friend class Brush;
-
- protected:
- USHORT nRefCount;
- Color aColor;
- Color aFillColor;
- BrushStyle eStyle;
- Bitmap aBitmap;
- BOOL bTransparent;
- BOOL bStatic;
-
- public:
- ImpBrush();
- ImpBrush( const ImpBrush& rImpBrush );
- ImpBrush( const Color& rColor,
- const Color& rFillColor,
- BrushStyle eStyle, BOOL bTransparent );
-
- BOOL IsEqual( const ImpBrush& rImpBrush ) const;
- };
-
- class Brush : public Resource
- {
- protected:
- ImpBrush* pImpBrush;
-
- public:
- Brush();
- Brush( const Brush& rBrush );
- Brush( BrushStyle eStyle );
- Brush( const Color& rColor,
- BrushStyle aStyle = BRUSH_SOLID );
- Brush( const Color& rColor, const Color& rFillColor,
- BrushStyle eStyle );
- Brush( const Bitmap& rBitmap );
- Brush( const ResId& rResId );
- ~Brush();
-
- Color ChangeColor( const Color& rColor );
- const Color& GetColor() const
- { return pImpBrush->aColor; }
- Color ChangeFillColor( const Color& rColor );
- const Color& GetFillColor() const
- { return pImpBrush->aFillColor; }
-
- BrushStyle ChangeStyle( BrushStyle eStyle );
- BrushStyle GetStyle() const
- { return pImpBrush->eStyle; }
- Bitmap ChangeBitmap( const Bitmap& rBitmap );
- const Bitmap& GetBitmap() const
- { return pImpBrush->aBitmap; }
-
- BOOL ChangeTransparent( BOOL bTransparent );
- BOOL IsTransparent() const;
- BOOL IsHatched() const;
-
- Brush& operator=( const Brush& rBrush );
- BOOL operator==( const Brush& rBrush ) const;
- BOOL operator!=( const Brush& rBrush ) const;
- };
-
- enum FontFamily { FAMILY_DONTKNOW, FAMILY_DECORATIVE, FAMILY_MODERN,
- FAMILY_ROMAN, FAMILY_SCRIPT, FAMILY_SWISS, FAMILY_SYSTEM };
- enum FontPitch { PITCH_DONTKNOW, PITCH_FIXED, PITCH_VARIABLE };
- enum FontAlign { ALIGN_TOP, ALIGN_BASELINE, ALIGN_BOTTOM };
- enum FontWeight { WEIGHT_DONTKNOW, WEIGHT_LIGHT, WEIGHT_NORMAL, WEIGHT_BOLD };
- enum FontUnderline { UNDERLINE_NONE, UNDERLINE_SINGLE, UNDERLINE_DOUBLE };
- enum FontStrikeout { STRIKEOUT_NONE, STRIKEOUT_SINGLE, STRIKEOUT_DOUBLE };
-
- class ImpFont
- {
- friend class Font;
- protected:
- USHORT nRefCount;
- Color aColor;
- Color aFillColor;
- String aName;
- Size aSize;
- short nCharOrientation;
- short nLineOrientation;
- CharSet eCharSet;
- FontFamily eFamily;
- FontPitch ePitch;
- FontAlign eAlign;
- FontWeight eWeight;
- FontUnderline eUnderline;
- FontStrikeout eStrikeout;
- BOOL bItalic;
- BOOL bOutline;
- BOOL bShadow;
- BOOL bTransparent;
- BOOL bStatic;
- BOOL bDummy;
-
- public:
- ImpFont();
- ImpFont( const ImpFont& rImpFont );
-
- BOOL IsEqual( const ImpFont& rImpFont ) const;
- };
-
- class Font : public Resource
- {
- protected:
- ImpFont* pImpFont;
-
- public:
- Font();
- Font( const Font& rFont );
- Font( const String& rName, const Size& rSize );
- Font( FontFamily eFamily, const Size& rSize );
- Font( const ResId & rResId );
- ~Font();
-
- Color ChangeColor( const Color& rColor );
- const Color& GetColor() const
- { return pImpFont->aColor; }
- Color ChangeFillColor( const Color& rColor );
- const Color& GetFillColor() const
- { return pImpFont->aFillColor; }
-
- FontFamily ChangeFamily( FontFamily eFamily );
- FontFamily GetFamily() const
- { return pImpFont->eFamily; }
- String ChangeName( const String& rName );
- const String& GetName() const
- { return pImpFont->aName; }
- Size ChangeSize( const Size& rSize );
- const Size& GetSize() const
- { return pImpFont->aSize; }
-
- CharSet ChangeCharSet( CharSet eCharSet );
- CharSet GetCharSet() const
- { return pImpFont->eCharSet; }
- FontPitch ChangePitch( FontPitch ePitch );
- FontPitch GetPitch() const
- { return pImpFont->ePitch; }
-
- FontAlign ChangeAlign( FontAlign eAlign );
- FontAlign GetAlign() const
- { return pImpFont->eAlign; }
-
- short ChangeLineOrientation( short nLineOrientation );
- short GetLineOrientation() const
- { return pImpFont->nLineOrientation; }
- short ChangeCharOrientation( short nCharOrientation );
- short GetCharOrientation() const
- { return pImpFont->nCharOrientation; }
-
- FontWeight ChangeWeight( FontWeight eWeight );
- FontWeight GetWeight() const
- { return pImpFont->eWeight; }
- FontUnderline ChangeUnderline( FontUnderline eUnderline );
- FontUnderline GetUnderline() const
- { return pImpFont->eUnderline; }
- FontStrikeout ChangeStrikeout( FontStrikeout eStrikeout );
- FontStrikeout GetStrikeout() const
- { return pImpFont->eStrikeout; }
- BOOL ChangeItalic( BOOL bItalic );
- BOOL IsItalic() const
- { return pImpFont->bItalic; }
- BOOL ChangeOutline( BOOL bOutline );
- BOOL IsOutline() const
- { return pImpFont->bOutline; }
- BOOL ChangeShadow( BOOL bShadow );
- BOOL IsShadow() const
- { return pImpFont->bShadow; }
-
- BOOL ChangeTransparent( BOOL bTransparent );
- BOOL IsTransparent() const
- { return pImpFont->bTransparent; }
-
- Font& operator=( const Font& rFont );
- BOOL operator==( const Font& rFont ) const;
- BOOL operator!=( const Font& rFont ) const;
- };
-
- #endif
-
- #ifndef _POINTR_HXX
- #define _POINTR_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _RESID_HXX
- #endif
- #ifndef _RC_HXX
- #endif
-
- class ImpPointer;
-
- enum PointerStyle { POINTER_ARROW, POINTER_WAIT, POINTER_CROSS,
- POINTER_BEAM, POINTER_HSPLIT, POINTER_VSPLIT,
- POINTER_MOVEFILE, POINTER_COPYFILE,
- POINTER_MOVEFILES, POINTER_COPYFILES,
- POINTER_NOTALLOWED, POINTER_NULL };
-
- class Pointer : public Resource
- {
- protected:
- ImpPointer* pImpPointer;
-
- public:
- Pointer();
- Pointer( PointerStyle );
- Pointer( const Pointer& rPointer );
- Pointer( const ResId& rResId );
- ~Pointer();
-
- static void Show();
- static void Hide();
- static BOOL IsVisible();
-
- static Point ChangePosPixel( const Point& rPos );
- static Point GetPosPixel();
-
- Pointer& operator=( const Pointer& rPointer );
-
- BOOL operator==( const Pointer& rPointer ) const;
- BOOL operator!=( const Pointer& rPointer ) const;
- };
-
- #endif
-
- #ifndef _ICON_HXX
- #define _ICON_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _RESID_HXX
- #endif
- #ifndef _RC_HXX
- #endif
-
- class ImpIcon;
-
- enum IconStyle { ICON_DEFAULT, ICON_INFO, ICON_WARNING, ICON_ERROR,
- ICON_QUERY, ICON_NULL };
-
- class Icon : public Resource
- {
- protected:
- ImpIcon* pImpIcon;
-
- public:
- Icon();
- Icon( IconStyle aStyle );
- Icon( const Icon& rIcon );
- Icon( const ResId& rResId );
- ~Icon();
-
- Size GetSizePixel() const;
-
- Icon& operator =( const Icon& rIcon );
-
- BOOL operator ==( const Icon& rIcon ) const;
- BOOL operator !=( const Icon& rIcon ) const;
- };
-
- #endif
-
- #ifndef _KEYCOD_HXX
- #define _KEYCOD_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef RESID_HXX
- #endif
- #ifndef RC_HXX
- #endif
-
- #define KEYGROUP_NUM ((USHORT)0x0100)
- #define KEYGROUP_ALPHA ((USHORT)0x0200)
- #define KEYGROUP_FKEYS ((USHORT)0x0300)
- #define KEYGROUP_CURSOR ((USHORT)0x0400)
- #define KEYGROUP_MISC ((USHORT)0x0500)
-
- #define KEY_0 ((USHORT)(KEYGROUP_NUM+0))
- #define KEY_1 ((USHORT)(KEYGROUP_NUM+1))
- #define KEY_2 ((USHORT)(KEYGROUP_NUM+2))
- #define KEY_3 ((USHORT)(KEYGROUP_NUM+3))
- #define KEY_4 ((USHORT)(KEYGROUP_NUM+4))
- #define KEY_5 ((USHORT)(KEYGROUP_NUM+5))
- #define KEY_6 ((USHORT)(KEYGROUP_NUM+6))
- #define KEY_7 ((USHORT)(KEYGROUP_NUM+7))
- #define KEY_8 ((USHORT)(KEYGROUP_NUM+8))
- #define KEY_9 ((USHORT)(KEYGROUP_NUM+9))
-
- #define KEY_A ((USHORT)(KEYGROUP_ALPHA+0))
- #define KEY_B ((USHORT)(KEYGROUP_ALPHA+1))
- #define KEY_C ((USHORT)(KEYGROUP_ALPHA+2))
- #define KEY_D ((USHORT)(KEYGROUP_ALPHA+3))
- #define KEY_E ((USHORT)(KEYGROUP_ALPHA+4))
- #define KEY_F ((USHORT)(KEYGROUP_ALPHA+5))
- #define KEY_G ((USHORT)(KEYGROUP_ALPHA+6))
- #define KEY_H ((USHORT)(KEYGROUP_ALPHA+7))
- #define KEY_I ((USHORT)(KEYGROUP_ALPHA+8))
- #define KEY_J ((USHORT)(KEYGROUP_ALPHA+9))
- #define KEY_K ((USHORT)(KEYGROUP_ALPHA+10))
- #define KEY_L ((USHORT)(KEYGROUP_ALPHA+11))
- #define KEY_M ((USHORT)(KEYGROUP_ALPHA+12))
- #define KEY_N ((USHORT)(KEYGROUP_ALPHA+13))
- #define KEY_O ((USHORT)(KEYGROUP_ALPHA+14))
- #define KEY_P ((USHORT)(KEYGROUP_ALPHA+15))
- #define KEY_Q ((USHORT)(KEYGROUP_ALPHA+16))
- #define KEY_R ((USHORT)(KEYGROUP_ALPHA+17))
- #define KEY_S ((USHORT)(KEYGROUP_ALPHA+18))
- #define KEY_T ((USHORT)(KEYGROUP_ALPHA+19))
- #define KEY_U ((USHORT)(KEYGROUP_ALPHA+20))
- #define KEY_V ((USHORT)(KEYGROUP_ALPHA+21))
- #define KEY_W ((USHORT)(KEYGROUP_ALPHA+22))
- #define KEY_X ((USHORT)(KEYGROUP_ALPHA+23))
- #define KEY_Y ((USHORT)(KEYGROUP_ALPHA+24))
- #define KEY_Z ((USHORT)(KEYGROUP_ALPHA+25))
-
- #define KEY_F1 ((USHORT)(KEYGROUP_FKEYS+0))
- #define KEY_F2 ((USHORT)(KEYGROUP_FKEYS+1))
- #define KEY_F3 ((USHORT)(KEYGROUP_FKEYS+2))
- #define KEY_F4 ((USHORT)(KEYGROUP_FKEYS+3))
- #define KEY_F5 ((USHORT)(KEYGROUP_FKEYS+4))
- #define KEY_F6 ((USHORT)(KEYGROUP_FKEYS+5))
- #define KEY_F7 ((USHORT)(KEYGROUP_FKEYS+6))
- #define KEY_F8 ((USHORT)(KEYGROUP_FKEYS+7))
- #define KEY_F9 ((USHORT)(KEYGROUP_FKEYS+8))
- #define KEY_F10 ((USHORT)(KEYGROUP_FKEYS+9))
- #define KEY_F11 ((USHORT)(KEYGROUP_FKEYS+10))
- #define KEY_F12 ((USHORT)(KEYGROUP_FKEYS+11))
- #define KEY_F13 ((USHORT)(KEYGROUP_FKEYS+12))
- #define KEY_F14 ((USHORT)(KEYGROUP_FKEYS+13))
- #define KEY_F15 ((USHORT)(KEYGROUP_FKEYS+14))
- #define KEY_F16 ((USHORT)(KEYGROUP_FKEYS+15))
- #define KEY_F17 ((USHORT)(KEYGROUP_FKEYS+16))
- #define KEY_F18 ((USHORT)(KEYGROUP_FKEYS+17))
- #define KEY_F19 ((USHORT)(KEYGROUP_FKEYS+18))
- #define KEY_F20 ((USHORT)(KEYGROUP_FKEYS+19))
- #define KEY_F21 ((USHORT)(KEYGROUP_FKEYS+20))
- #define KEY_F22 ((USHORT)(KEYGROUP_FKEYS+21))
- #define KEY_F23 ((USHORT)(KEYGROUP_FKEYS+22))
- #define KEY_F24 ((USHORT)(KEYGROUP_FKEYS+23))
- #define KEY_F25 ((USHORT)(KEYGROUP_FKEYS+24))
- #define KEY_F26 ((USHORT)(KEYGROUP_FKEYS+25))
-
- #define KEY_DOWN ((USHORT)(KEYGROUP_CURSOR+0))
- #define KEY_UP ((USHORT)(KEYGROUP_CURSOR+1))
- #define KEY_LEFT ((USHORT)(KEYGROUP_CURSOR+2))
- #define KEY_RIGHT ((USHORT)(KEYGROUP_CURSOR+3))
- #define KEY_HOME ((USHORT)(KEYGROUP_CURSOR+4))
- #define KEY_END ((USHORT)(KEYGROUP_CURSOR+5))
- #define KEY_PAGEUP ((USHORT)(KEYGROUP_CURSOR+6))
- #define KEY_PAGEDOWN ((USHORT)(KEYGROUP_CURSOR+7))
-
- #define KEY_RETURN ((USHORT)(KEYGROUP_MISC+0))
- #define KEY_ESCAPE ((USHORT)(KEYGROUP_MISC+1))
- #define KEY_TAB ((USHORT)(KEYGROUP_MISC+2))
- #define KEY_BACKSPACE ((USHORT)(KEYGROUP_MISC+3))
- #define KEY_SPACE ((USHORT)(KEYGROUP_MISC+4))
- #define KEY_INSERT ((USHORT)(KEYGROUP_MISC+5))
- #define KEY_DELETE ((USHORT)(KEYGROUP_MISC+6))
-
- #define KEY_ADD ((USHORT)(KEYGROUP_MISC+7))
- #define KEY_SUBTRACT ((USHORT)(KEYGROUP_MISC+8))
- #define KEY_MULTIPLY ((USHORT)(KEYGROUP_MISC+9))
- #define KEY_DIVIDE ((USHORT)(KEYGROUP_MISC+10))
- #define KEY_POINT ((USHORT)(KEYGROUP_MISC+11))
- #define KEY_COMMA ((USHORT)(KEYGROUP_MISC+12))
- #define KEY_LESS ((USHORT)(KEYGROUP_MISC+13))
- #define KEY_GREATER ((USHORT)(KEYGROUP_MISC+14))
- #define KEY_EQUAL ((USHORT)(KEYGROUP_MISC+15))
-
- #define KEY_OPEN ((USHORT)(KEYGROUP_MISC+16))
- #define KEY_CUT ((USHORT)(KEYGROUP_MISC+17))
- #define KEY_COPY ((USHORT)(KEYGROUP_MISC+18))
- #define KEY_PASTE ((USHORT)(KEYGROUP_MISC+19))
- #define KEY_UNDO ((USHORT)(KEYGROUP_MISC+20))
- #define KEY_REPEAT ((USHORT)(KEYGROUP_MISC+21))
- #define KEY_FIND ((USHORT)(KEYGROUP_MISC+22))
- #define KEY_PROPERTIES ((USHORT)(KEYGROUP_MISC+23))
- #define KEY_FRONT ((USHORT)(KEYGROUP_MISC+24))
-
- #define KEY_SHIFT ((USHORT)0x1000)
- #define KEY_MOD1 ((USHORT)0x2000)
- #define KEY_MOD2 ((USHORT)0x4000)
-
- enum KeyFuncType { KEYFUNC_DONTKNOW, KEYFUNC_NEW, KEYFUNC_OPEN,
- KEYFUNC_SAVE, KEYFUNC_SAVEAS, KEYFUNC_PRINT,
- KEYFUNC_CLOSE, KEYFUNC_QUIT,
- KEYFUNC_CUT, KEYFUNC_COPY, KEYFUNC_PASTE, KEYFUNC_UNDO,
- KEYFUNC_REDO, KEYFUNC_DELETE, KEYFUNC_REPEAT,
- KEYFUNC_FIND, KEYFUNC_FINDBACKWARD, KEYFUNC_PROPERTIES,
- KEYFUNC_FRONT };
-
- class KeyCode : public Resource
- {
- protected:
- USHORT nCode;
- KeyFuncType eFunc;
-
- USHORT GetFullCode() const { return nCode; }
- KeyFuncType GetFullFunction() const { return eFunc; }
-
- public:
- KeyCode() { nCode = 0; eFunc = KEYFUNC_DONTKNOW; }
- KeyCode( const ResId& rResId );
- KeyCode( USHORT nKey, USHORT nModifier = 0 )
- { nCode = nKey | nModifier; eFunc = KEYFUNC_DONTKNOW; }
- KeyCode( USHORT nKey, BOOL bShift, BOOL bMod1, BOOL bMod2 );
- KeyCode( KeyFuncType eFunction );
-
- USHORT GetCode() const
- { return (nCode & 0x0FFF); }
-
- USHORT GetModifier() const
- { return ( nCode & (KEY_SHIFT | KEY_MOD1 | KEY_MOD2) ); }
- BOOL IsShift() const
- { return ( (nCode & KEY_SHIFT) ? TRUE : FALSE ); }
- BOOL IsMod1() const
- { return ( (nCode & KEY_MOD1) ? TRUE : FALSE ); }
- BOOL IsMod2() const
- { return ( (nCode & KEY_MOD2) ? TRUE : FALSE ); }
-
- USHORT GetGroup() const
- { return (nCode & 0x0F00); }
-
- String GetName() const;
-
- BOOL IsFunction() const
- { return ((eFunc != KEYFUNC_DONTKNOW) ? TRUE : FALSE); }
-
- KeyFuncType GetFunction() const;
-
- BOOL operator ==( const KeyCode& rKeyCode ) const;
- BOOL operator !=( const KeyCode& rKeyCode ) const;
- };
-
- inline KeyCode::KeyCode( USHORT nKey, BOOL bShift, BOOL bMod1, BOOL bMod2 )
- {
- nCode = nKey;
- if( bShift )
- nCode |= KEY_SHIFT;
- if( bMod1 )
- nCode |= KEY_MOD1;
- if( bMod2 )
- nCode |= KEY_MOD2;
- eFunc = KEYFUNC_DONTKNOW;
- }
-
- inline BOOL KeyCode::operator ==( const KeyCode& rKeyCode ) const
- {
- if ( (eFunc == KEYFUNC_DONTKNOW) && (rKeyCode.eFunc == KEYFUNC_DONTKNOW) )
- return nCode == rKeyCode.nCode;
- else
- return GetFunction() == rKeyCode.GetFunction();
- }
-
- inline BOOL KeyCode::operator !=( const KeyCode& rKeyCode ) const
- {
- if ( (eFunc == KEYFUNC_DONTKNOW) && (rKeyCode.eFunc == KEYFUNC_DONTKNOW) )
- return nCode != rKeyCode.nCode;
- else
- return GetFunction() != rKeyCode.GetFunction();
- }
-
- #endif
-
- #ifndef _EVENT_HXX
- #define _EVENT_HXX
-
- #ifndef _SV_H
- #endif
-
- #ifndef _KEYCOD_HXX
- #endif
-
- class KeyEvent
- {
- private:
- KeyCode aKeyCode;
- char nCharCode;
- USHORT nRepeat;
-
- public:
- KeyEvent();
- KeyEvent( char nCharCode, const KeyCode& rKeyCode,
- USHORT nRepeat = 0 );
-
- char GetCharCode() const { return nCharCode; }
- const KeyCode& GetKeyCode() const { return aKeyCode; }
- USHORT GetRepeat() const { return nRepeat; }
- };
-
- inline KeyEvent::KeyEvent()
- {
- nCharCode = 0;
- nRepeat = 0;
- }
-
- inline KeyEvent::KeyEvent( char _nCharCode, const KeyCode& rKeyCode,
- USHORT _nRepeat )
- {
- KeyEvent::nCharCode = _nCharCode;
- KeyEvent::aKeyCode = rKeyCode;
- KeyEvent::nRepeat = _nRepeat;
- }
-
- #define MOUSE_SIMPLEMOVE ((USHORT)0x0001)
- #define MOUSE_DRAG ((USHORT)0x0002)
- #define MOUSE_DRAGMOVE ((USHORT)0x0004)
- #define MOUSE_DRAGCOPY ((USHORT)0x0008)
-
- #define MOUSE_SIMPLECLICK ((USHORT)0x0001)
- #define MOUSE_SELECT ((USHORT)0x0002)
- #define MOUSE_MULTISELECT ((USHORT)0x0004)
- #define MOUSE_RANGESELECT ((USHORT)0x0008)
- #define MOUSE_CONTEXTMENU ((USHORT)0x0010)
-
- #define MOUSE_LEFT ((USHORT)0x0001)
- #define MOUSE_MIDDLE ((USHORT)0x0002)
- #define MOUSE_RIGHT ((USHORT)0x0004)
-
- class MouseEvent
- {
- private:
- Point aPos;
- USHORT nMode;
- USHORT nClicks;
- USHORT nCode;
-
- public:
- MouseEvent();
- MouseEvent( const Point& rPos, USHORT nClicks = 1,
- USHORT nMode = 0, USHORT nButtons = 0,
- USHORT nModifier = 0 );
-
- const Point& GetPosPixel() const
- { return aPos; }
- USHORT GetMode() const
- { return nMode; }
- USHORT GetClicks() const
- { return nClicks; }
-
- USHORT GetButtons() const
- { return (nCode & (MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT)); }
- BOOL IsLeft() const
- { return ( (nCode & MOUSE_LEFT) ? TRUE : FALSE ); }
- BOOL IsMiddle() const
- { return ( (nCode & MOUSE_MIDDLE) ? TRUE : FALSE ); }
- BOOL IsRight() const
- { return ( (nCode & MOUSE_RIGHT) ? TRUE : FALSE ); }
-
- USHORT GetModifier() const
- { return (nCode & (KEY_SHIFT | KEY_MOD1 | KEY_MOD2)); }
- BOOL IsShift() const
- { return ( (nCode & KEY_SHIFT) ? TRUE : FALSE ); }
- BOOL IsMod1() const
- { return ( (nCode & KEY_MOD1) ? TRUE : FALSE ); }
- BOOL IsMod2() const
- { return ( (nCode & KEY_MOD2) ? TRUE : FALSE ); }
- };
-
- inline MouseEvent::MouseEvent()
- {
- nMode = 0;
- nClicks = 0;
- nCode = 0;
- }
-
- inline MouseEvent::MouseEvent( const Point& rPos, USHORT _nClicks,
- USHORT _nMode,
- USHORT nButtons, USHORT nModifier )
- {
- MouseEvent::aPos = rPos;
- MouseEvent::nClicks = _nClicks;
- MouseEvent::nMode = _nMode;
- MouseEvent::nCode = nButtons | nModifier;
- }
-
- #define APPEVENT_PARAM_DELIMITER '\n'
-
- #define APPEVENT_OPEN_STRING "Open"
- #define APPEVENT_PRINT_STRING "Print"
- #define APPEVENT_DISKINSERT_STRING "DiskInsert"
-
- class ApplicationEvent
- {
- private:
- String aSenderAppName;
- String aSenderProcId;
- String aEvent;
- String aData;
-
- public:
- ApplicationEvent() {}
- ApplicationEvent( const String& rSenderAppName,
- const String& rSenderProcId,
- const String& rEvent,
- const String& rData );
-
- const String& GetSenderAppName() const { return aSenderAppName; }
- const String& GetSenderProcId() const { return aSenderProcId; }
- const String& GetEvent() const { return aEvent; }
- const String& GetData() const { return aData; }
-
- BOOL IsOpenEvent() const;
- BOOL IsPrintEvent() const;
- BOOL IsDiskInsertEvent() const;
-
- USHORT GetParamCount() const;
- String GetParam( USHORT nParam ) const;
- };
-
- inline BOOL ApplicationEvent::IsOpenEvent() const
- {
- if ( aEvent == APPEVENT_OPEN_STRING )
- return TRUE;
- else
- return FALSE;
- }
-
- inline BOOL ApplicationEvent::IsPrintEvent() const
- {
- if ( aEvent == APPEVENT_PRINT_STRING )
- return TRUE;
- else
- return FALSE;
- }
-
- inline BOOL ApplicationEvent::IsDiskInsertEvent() const
- {
- if ( aEvent == APPEVENT_DISKINSERT_STRING )
- return TRUE;
- else
- return FALSE;
- }
-
- inline USHORT ApplicationEvent::GetParamCount() const
- {
- return aData.GetTokenCount( APPEVENT_PARAM_DELIMITER );
- }
-
- inline String ApplicationEvent::GetParam( USHORT nParam ) const
- {
- return aData.GetToken( nParam, APPEVENT_PARAM_DELIMITER );
- }
-
- enum HelpMode { HELPMODE_CONTEXT, HELPMODE_EXTENDED,
- HELPMODE_BALLOON, HELPMODE_ALL };
-
- class HelpEvent
- {
- private:
- Point aPos;
- HelpMode eMode;
-
- public:
- HelpEvent();
- HelpEvent( const Point& rPos, HelpMode eMode );
-
- const Point& GetMousePosPixel() const { return aPos; }
- HelpMode GetMode() const { return eMode; }
- };
-
- inline HelpEvent::HelpEvent()
- {
- eMode = HELPMODE_CONTEXT;
- }
-
- inline HelpEvent::HelpEvent( const Point& rPos, HelpMode _eMode )
- {
- HelpEvent::aPos = rPos;
- HelpEvent::eMode = _eMode;
- }
-
- enum DropAction { DROP_NONE, DROP_CANCEL = DROP_NONE,
- DROP_MOVE, DROP_COPY, DROP_LINK, DROP_PRINT, DROP_DISCARD };
-
- class DropEvent
- {
- protected:
- DropAction eAction;
- Point aDropPos;
- BOOL bLeave;
-
- public:
- DropEvent();
- DropEvent( const Point& rPos, DropAction eAction,
- BOOL bLeaveWindow = FALSE );
-
- const Point& GetPosPixel() const { return aDropPos; }
- DropAction GetAction() const { return eAction; }
- BOOL IsLeaveWindow() const { return bLeave; }
- };
-
- #endif
-
- #ifndef _HELP_HXX
- #define _HELP_HXX
-
- #ifndef _SV_H
- #endif
-
- #define HELP_INDEX ((ULONG)0xFFFFFFFF)
- #define HELP_HELPONHELP ((ULONG)0xFFFFFFFE)
-
- class Help
- {
- private:
- String aHelpFile;
-
- public:
- Help();
-
- BOOL Start( ULONG nHelpId );
- BOOL Start( const String& rKeyWord );
-
- void SetHelpFile( const String& rFileName );
- String GetHelpFile() const;
-
- static BOOL EnableBalloonMode();
- static BOOL DisableBalloonMode();
- static BOOL IsBalloonModeEnabled();
- static BOOL ShowBalloon( const Point& rScreenPos,
- const String& rHelpText );
- static BOOL ShowBalloon( const Point& rScreenPos,
- const Rectangle& rScreenRect,
- const String& rHelpText );
- };
-
- #endif
- #ifndef RSC_COMPILER
-
- #ifndef _APP_HXX
- #define _APP_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _GDIOBJ_HXX
- #endif
- #ifndef _EVENT_HXX
- #endif
- #ifndef _HELP_HXX
- #endif
-
- class ResId;
- class MenuBar;
- class Window;
- class WorkWindow;
- class Accelerator;
-
- #define EXC_RSCNOTLOADED 0x0100
- #define EXC_SYSOBJNOTCREATED 0x0200
- #define EXC_SYSTEM 0x0300
- #define EXC_USER 0x1000
-
- #define INPUT_MOUSE 0x0001
- #define INPUT_KEYBOARD 0x0002
- #define INPUT_PAINT 0x0004
- #define INPUT_TIMER 0x0008
- #define INPUT_OTHER 0x0010
- #define INPUT_MOUSEANDKEYBOARD (INPUT_MOUSE | INPUT_KEYBOARD)
- #define INPUT_ANY (INPUT_MOUSEANDKEYBOARD | INPUT_PAINT | \
- INPUT_TIMER | INPUT_OTHER)
-
- #define DISPATCH_OPEN 1
- #define DISPATCH_PRINT 2
-
- enum SysChangeType { CHANGE_FONTCOUNT, CHANGE_OTHER };
-
- enum AccelType { ACCEL_STANDARD, ACCEL_ALWAYS };
-
- class Application : public LinkHdl
- {
- protected:
- void Execute();
- virtual BOOL QueryExit();
-
- virtual void SysChange( SysChangeType eChgType );
- virtual void AppEvent( const ApplicationEvent& rAppEvent );
- virtual void UserEvent( ULONG nEvent, void* pEventData );
-
- virtual void ActivateExtHelp();
- virtual void DeactivateExtHelp();
-
- public:
- Application();
- ~Application();
-
- virtual void Main( int nArgc, char* pArgv[] ) = 0;
-
- void InitAppRes( const ResId& rResId );
-
- BOOL IsInMain() const;
- BOOL IsInExecute() const;
- BOOL IsInModalMode() const;
-
- virtual void Exception( short nError = 0 );
- void Abort( const String& rErrorText );
-
- void Quit();
- void Reschedule();
- BOOL AnyInput( USHORT nType = INPUT_ANY );
-
- USHORT DispatchAppEvents( int nArgc, char* pArgv[] );
- void PostUserEvent( ULONG nEvent, void* pEventData );
- BOOL PostAppEvent( const String& rAppName,
- const String& rProcId,
- const String& rEventName,
- const String& rData );
-
- void Wait( BOOL bWait = TRUE );
- BOOL IsWait() const;
-
- BOOL InsertIdleHdl( const Link& rLink, USHORT nPriority );
- void RemoveIdleHdl( const Link& rLink );
-
- WorkWindow* GetAppWindow() const;
-
- MenuBar* ChangeAppMenu( MenuBar* pAppMenu = NULL );
- MenuBar* GetAppMenu() const;
-
- Font ChangeAppFont( const Font& rFont );
- Font GetAppFont() const;
-
- International ChangeAppInternational( const International& rIntn );
- International GetAppInternational() const;
-
- String ChangeAppName( const String& rUniqueName );
- String GetAppName() const;
- String GetAppFileName() const;
-
- void EnableMenuAccel();
- void DisableMenuAccel();
- BOOL IsMenuAccelEnabled() const;
-
- BOOL InsertAccel( Accelerator* pAccel,
- AccelType eType = ACCEL_STANDARD );
- void RemoveAccel( Accelerator* pAccel );
- void FlushAccel();
-
- Help* ChangeHelp( Help* pHelp = NULL );
- Help* GetHelp() const;
-
- void EnableHelp( HelpMode eHelpMode );
- void DisableHelp( HelpMode eHelpMode );
- BOOL IsHelpEnabled( HelpMode eHelpMode ) const;
-
- void EnableSVLook();
- void DisableSVLook();
- BOOL IsSVLookEnabled() const;
- };
-
- extern Application* pApp;
- Application* GetpApp();
-
- #endif
-
- #ifndef _MDIAPP_HXX
- #define _MDIAPP_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _APP_HXX
- #endif
-
- class MDIWindow;
- class PopupMenu;
-
- class MDIApplication : public Application
- {
- public:
- MDIApplication();
- ~MDIApplication();
-
- virtual void Main( int nArgc, char* pArgv[] ) = 0;
-
- void Tile();
- void Horizontal();
- void Vertical();
- void Cascade();
- void Arrange();
-
- BOOL CloseAll();
-
- MDIWindow* ChangeActiveWindow( MDIWindow* pNewWindow );
- MDIWindow* GetActiveWindow() const;
- MDIWindow* ActivateNextWindow();
-
- USHORT GetWindowCount() const;
- USHORT GetVisibleWindowCount() const;
-
- PopupMenu* ChangeMDIMenu( PopupMenu* pNewMenu );
- PopupMenu* GetMDIMenu() const;
- };
-
- #endif
-
- #ifndef _TIMER_HXX
- #define _TIMER_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _TIMER_H
- #endif
-
- class Timer : public LinkHdl
- {
- private:
- Link aTimeoutLinkHdl;
- ULONG nTimeout;
- BOOL bActive;
-
- protected:
- ImpTimer aImpTimer;
-
- virtual void Timeout();
-
- public:
- Timer();
- Timer( const Timer& rTimer );
- ~Timer();
-
- void Start();
- void Stop();
-
- ULONG ChangeTimeout( ULONG nTimeout );
- ULONG GetTimeout() const { return nTimeout; }
- BOOL IsActive() const { return bActive; }
-
- Link ChangeTimeoutHdl( const Link& rLink );
- Link GetTimeoutHdl() const { return aTimeoutLinkHdl; }
-
- Timer& operator=( const Timer& rTimer );
- };
-
- inline Link Timer::ChangeTimeoutHdl( const Link& rNewLink )
- {
- Link aOldLink = aTimeoutLinkHdl;
- aTimeoutLinkHdl = rNewLink;
- return aOldLink;
- }
-
- class AutoTimer : public Timer
- {
- public:
- AutoTimer();
- AutoTimer( const AutoTimer& rTimer );
-
- AutoTimer& operator=( const AutoTimer& rTimer )
- { Timer::operator=( rTimer ); return *this; }
- };
-
- #endif
-
- #ifndef _METRIC_HXX
- #define _METRIC_HXX
-
- #ifndef _SV_H
- #endif
-
- #ifndef _GDIOBJ_HXX
- #endif
-
- enum FontType { TYPE_DONTKNOW, TYPE_RASTER, TYPE_VECTOR, TYPE_SCALABLE };
-
- class ImpFontMetric
- {
- public:
- USHORT nRefCount;
- Font aFont;
- FontType eType;
- BOOL bDevice;
- USHORT nAscent;
- USHORT nDescent;
- USHORT nLeading;
- short nSlant;
- char cFirstChar;
- char cLastChar;
-
- BOOL IsEqual( const ImpFontMetric& rMetric ) const;
- };
-
- class FontMetric
- {
- protected:
- ImpFontMetric* pImpMetric;
-
- public:
- FontMetric();
- FontMetric( const FontMetric& rMetric );
- ~FontMetric();
-
- const Font& GetPhysicalFont() const
- { return pImpMetric->aFont; }
-
- FontType GetType() const
- { return pImpMetric->eType; }
- BOOL IsDeviceFont() const
- { return pImpMetric->bDevice; }
-
- USHORT GetAscent() const
- { return pImpMetric->nAscent; }
- USHORT GetDescent() const
- { return pImpMetric->nDescent; }
- USHORT GetLeading() const
- { return pImpMetric->nLeading; }
- short GetSlant() const
- { return pImpMetric->nSlant; }
-
- BOOL ExistChar( char c ) const;
-
- FontMetric& operator =( const FontMetric& rMetric );
- BOOL operator ==( const FontMetric& rMetric ) const;
- BOOL operator !=( const FontMetric& rMetric ) const;
- };
-
- #endif
-
- #ifndef _REGION_HXX
- #define _REGION_HXX
-
- #ifndef _SV_H
- #endif
-
- class ImpRegion;
- class Polygon;
- class PolyPolygon;
-
- enum RegionType { REGION_EMPTY, REGION_RECTANGLE, REGION_POLYGON,
- REGION_POLYPOLYGON, REGION_COMPLEX };
-
- class Region
- {
- protected:
- ImpRegion* pImpRegion;
-
- public:
- Region();
- Region( const Rectangle& rRect );
- Region( const Polygon& rPolygon );
- Region( const PolyPolygon& rPolyPoly );
- Region( const Region& rRegion );
- ~Region();
-
- BOOL IsEmpty() const;
- Rectangle GetBoundRect() const;
-
- RegionType GetType() const;
-
- void Intersect( const Rectangle& rRect );
- void Move( short nHorzMove, short nVertMove );
-
- Region& operator=( const Region& rRegion );
- BOOL operator==( const Region& rRegion ) const;
- BOOL operator!=( const Region& rRegion ) const;
- };
-
- #endif
-
- #ifndef _OUTDEV_HXX
- #define _OUTDEV_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _RESID_HXX
- #endif
- #ifndef _RC_HXX
- #endif
- #ifndef _GDIOBJ_HXX
- #endif
- #ifndef _MAPMOD_HXX
- #endif
- #ifndef _OUTDEV_H
- #endif
- #ifndef _METRIC_HXX
- #endif
- #ifndef _REGION_HXX
- #endif
-
- class EnvStack;
- class GDIMetaFile;
- class Bitmap;
- class Icon;
- class Polygon;
- class PolyPolygon;
- class Region;
-
- enum RasterOp { ROP_OVERPAINT, ROP_INVERT, ROP_AND, ROP_OR, ROP_XOR, ROP_NXOR };
-
- enum OutDevType { OUTDEV_DONTKNOW, OUTDEV_WINDOW, OUTDEV_PRINTER,
- OUTDEV_VIRDEV };
-
- class OutputDevice : public Resource
- {
- friend ImpOutputDevice;
-
- private:
- OutputDevice( const OutputDevice& rOutDev );
- OutputDevice& operator =( const OutputDevice& rOutDev );
-
- protected:
- ImpOutputDevice aImpOPD;
- EnvStack* pStack;
- GDIMetaFile* pMetaFile;
- BOOL bBlackHole;
- Pen aPen;
- Font aFont;
- Brush aBackBrush;
- Brush aFillInBrush;
- MapMode aMapMode;
- RasterOp aRasterOp;
- BOOL bMap;
- Region aClipRegion;
- BOOL bClipRegion;
- OutDevType eOutDevType;
-
- void ImpSelectClipRegion( BOOL bNewRegion );
-
- #ifdef UNX
-
- OutputDevice( const ResId & rResId, void ** ppClassRes );
-
- OutputDevice( const void * );
-
- void InitResource();
- #endif
-
- OutputDevice();
- OutputDevice( const ResId& rResId );
-
- public:
- virtual ~OutputDevice();
-
- void DrawText( const Point& rStartPt, const String& rStr,
- USHORT nIndex = 0, USHORT nLen = STRING_LEN );
- void DrawStretchText( const Point& rStartPt, USHORT nWidth,
- const String& rStr,
- USHORT nIndex = 0, USHORT nLen = STRING_LEN );
- void DrawKernText( const Point& rStartPt, const String& rStr,
- USHORT nIndex = 0, USHORT nLen = STRING_LEN,
- short* pKernAry = NULL );
- Size GetTextSize( const String& rStr, USHORT nIndex = 0,
- USHORT nLen = STRING_LEN ) const;
- Size GetStretchTextSize( const String& rStr, USHORT nWidth,
- USHORT nPartIndex, USHORT nPartLen,
- USHORT nIndex = 0, USHORT nLen = STRING_LEN ) const;
- Size GetKernTextSize( const String& rStr, USHORT nIndex = 0,
- USHORT nLen = STRING_LEN,
- short* pKernAry = NULL ) const;
-
- void DrawPixel( const Point& rPt, const Color& rColor );
- void DrawPoint( const Point& rPt );
- void DrawLine( const Point& rStartPt, const Point& rEndPt );
- void DrawRect( const Rectangle& rRect, USHORT nHorzRount = 0,
- USHORT nVertRound = 0 );
- void DrawEllipse( const Rectangle& rRect );
- void DrawArc( const Rectangle& rRect, const Point& rStartPt,
- const Point& rEndPt );
- void DrawPie( const Rectangle& rRect, const Point& rStartPt,
- const Point& rEndPt );
- void DrawPolyLine( const Polygon& rPoly );
- void DrawPolygon( const Polygon& rPoly );
- void DrawPolyPolygon( const PolyPolygon& rPolyPoly );
- void DrawOutDev( const Point& rDestPt, const Size& rDestSize,
- const Point& rSrcPt, const Size& rSrcSize,
- const OutputDevice& rOutDev );
- void DrawBitmap( const Point& rDestPt, const Bitmap& rBitmap );
- void DrawBitmap( const Point& rDestPt, const Size& rDestSize,
- const Bitmap& rBitmap );
- void DrawIcon( const Point& rPoint, const Icon& rIcon );
-
- void InvertRect( const Rectangle& rRect );
- void HighlightRect( const Rectangle& rRect );
-
- Color GetPixel( const Point& rPt ) const;
- Bitmap GetBitmap( const Point& rSrcPt, const Size& rSize ) const;
-
- Region ChangeClipRegion();
- Region ChangeClipRegion( const Region& rRegion );
- Region MoveClipRegion( short nHorzMove, short nVertMove );
- Region IntersectClipRegion( const Rectangle& rRect );
- Region GetClipRegion() const;
- BOOL IsClipRegion() const { return bClipRegion; }
-
- Pen ChangePen( const Pen& rNewPen );
- const Pen& GetPen() const { return aPen; }
- Font ChangeFont( const Font& rNewFont );
- const Font& GetFont() const { return aFont; }
- Brush ChangeBackgroundBrush( const Brush& rNewBrush );
- const Brush& GetBackgroundBrush() const { return aBackBrush; }
- Brush ChangeFillInBrush( const Brush& rNewBrush );
- const Brush& GetFillInBrush() const { return aFillInBrush; }
-
- MapMode ChangeMapMode( const MapMode& rNewMapMode );
- const MapMode& GetMapMode() const { return aMapMode; }
-
- Point LogicToPixel( const Point& rLogicPt ) const;
- Size LogicToPixel( const Size& rLogicSize ) const;
- Rectangle LogicToPixel( const Rectangle& rLogicRect ) const;
- Polygon LogicToPixel( const Polygon& rLogicPoly ) const;
- PolyPolygon LogicToPixel( const PolyPolygon& rLogicPolyPoly ) const;
- Region LogicToPixel( const Region& rLogicRegion )const;
- Point LogicToPixel( const Point& rLogicPt,
- const MapMode& rMapMode ) const;
- Size LogicToPixel( const Size& rLogicSize,
- const MapMode& rMapMode ) const;
- Rectangle LogicToPixel( const Rectangle& rLogicRect,
- const MapMode& rMapMode ) const;
- Polygon LogicToPixel( const Polygon& rLogicPoly,
- const MapMode& rMapMode ) const;
- PolyPolygon LogicToPixel( const PolyPolygon& rLogicPolyPoly,
- const MapMode& rMapMode ) const;
- Region LogicToPixel( const Region& rLogicRegion,
- const MapMode& rMapMode ) const;
- Point PixelToLogic( const Point& rDevicePt ) const;
- Size PixelToLogic( const Size& rDeviceSize ) const;
- Rectangle PixelToLogic( const Rectangle& rDeviceRect ) const;
- Polygon PixelToLogic( const Polygon& rDevicePoly ) const;
- PolyPolygon PixelToLogic( const PolyPolygon& rDevicePolyPoly ) const;
- Region PixelToLogic( const Region& rDeviceRegion ) const;
- Point PixelToLogic( const Point& rDevicePt,
- const MapMode& rMapMode ) const;
- Size PixelToLogic( const Size& rDeviceSize,
- const MapMode& rMapMode ) const;
- Rectangle PixelToLogic( const Rectangle& rDeviceRect,
- const MapMode& rMapMode ) const;
- Polygon PixelToLogic( const Polygon& rDevicePoly,
- const MapMode& rMapMode ) const;
- PolyPolygon PixelToLogic( const PolyPolygon& rDevicePolyPoly,
- const MapMode& rMapMode ) const;
- Region PixelToLogic( const Region& rDeviceRegion,
- const MapMode& rMapMode ) const;
-
- RasterOp ChangeRasterOp( RasterOp aNewROP );
- RasterOp GetRasterOp() const { return aRasterOp; }
-
- Size GetOutputSize() const;
- virtual Size GetOutputSizePixel() const;
-
- USHORT GetDevFontCount() const;
- Font GetDevFont( USHORT nDevFont ) const;
-
- USHORT GetDevFontSizeCount( const Font& rFont ) const;
- Size GetDevFontSize( const Font& rFont, USHORT nSize ) const;
-
- FontMetric GetFontMetric() const;
- FontMetric GetFontMetric( const Font& rFont ) const;
-
- Color GetSolidColor( const Color& rColor ) const;
- ULONG GetColorCount() const;
-
- void Push();
- void Pop();
-
- OutDevType GetOutDevType() const { return eOutDevType; }
- };
-
- LPoint LongLogicToPixel( OutputDevice* pOutDev, const LPoint& rLPt );
- LPoint LongPixelToLogic( OutputDevice* pOutDev, const LPoint& rLPt );
-
- #endif
-
- #ifndef _SYSTEM_HXX
- #define _SYSTEM_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _GDIOBJ_HXX
- #endif
-
- enum SystemType { SYSTEM_DONTKNOW,
- SYSTEM_PC, SYSTEM_MAC, SYSTEM_SUN,
- SYSTEM_RS6000, SYSTEM_ALPHA, SYSTEM_ALPHAPC,
- SYSTEM_HP9000, SYSTEM_AVIION, SYSTEM_VAX };
- enum CPUType { CPU_DONTKNOW,
- CPU_I286, CPU_I386, CPU_I486,
- CPU_PENTIUM,
- CPU_M68000, CPU_M68010, CPU_M68020,
- CPU_M68030, CPU_M68040, CPU_POWERPC,
- CPU_SPARC, CPU_IBMPOWER, CPU_ALPHA,
- CPU_HPRISC, CPU_M88000, CPU_VAX,
- CPU_MIPS4000 };
- enum GUIType { GUI_DONTKNOW,
- GUI_WINDOWS, GUI_PM, GUI_MAC,
- GUI_MOTIF, GUI_OPENWINDOWS, GUI_WINDOWSNT };
-
- class System
- {
- public:
- static SystemType GetSystemType();
- static CPUType GetCPUType();
- static GUIType GetGUIType();
- static String GetGUIVersion();
-
- static Size GetScreenSizePixel();
- static USHORT GetMenuBarHeightPixel();
-
- static BOOL HasMouse();
- static USHORT GetMouseButtonCount();
-
- static Font GetSystemFont();
- static CharSet GetCharSet() { return ::GetSystemCharSet(); }
- static LineEnd GetLineEnd() { return ::GetSystemLineEnd(); }
-
- static LanguageType GetLanguage() { return ::GetSystemLanguage(); }
- static CountryType GetCountry() { return ::GetSystemCountry(); }
-
- static USHORT GetPrinterCount();
- static String GetDefaultPrinterName();
- static String GetPrinterName( USHORT nPrinter );
-
- static String GetUserName();
- static ULONG GetFreeMemory();
- };
-
- #endif
-
- #ifndef _VIRDEV_HXX
- #define _VIRDEV_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _OUTDEV_HXX
- #endif
- #ifndef _VIRDEV_H
- #endif
-
- class VirtualDevice : public OutputDevice
- {
- protected:
- ImpVirtDevice aImpVD;
-
- public:
- VirtualDevice();
- VirtualDevice( const OutputDevice& rCompDev );
- ~VirtualDevice();
-
- BOOL SetOutputSize( const Size& rNewSize, BOOL bErase = TRUE );
- BOOL SetOutputSizePixel( const Size& rNewSize,
- BOOL bErase = TRUE );
- Size GetOutputSizePixel() const;
- };
-
- #endif
-
- #ifndef _PRINT_HXX
- #define _PRINT_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _OUTDEV_HXX
- #endif
- #ifndef _SYSTEM_HXX
- #endif
-
- class Timer;
- class AutoTimer;
- class ImpPageQueue;
- struct PageMetaFile;
-
- enum Quality { QUALITY_PROOF, QUALITY_DRAFT };
- enum Orientation { ORIENTATION_PORTRAIT, ORIENTATION_LANDSCAPE };
- enum Paper { PAPER_A3, PAPER_A4, PAPER_A5, PAPER_B4, PAPER_B5,
- PAPER_LETTER, PAPER_LEGAL, PAPER_TABLOID, PAPER_USER };
- enum PrinterSupport { SUPPORT_SET_ORIENTATION, SUPPORT_SET_QUALITY,
- SUPPORT_SET_PAPERBIN };
-
- #ifndef _IMPPRN_H
- #endif
-
- #define PAGEQUEUE_ALLPAGES 0xFFFF
-
- #define PRINTER_OK 0
- #define PRINTER_ABORT 1
- #define PRINTER_OUTOFMEMORY 2
- #define PRINTER_GENERALERROR 3
-
- class JobSetup
- {
- public:
- USHORT nLen;
- short eGUIType;
- char cPrinterName[64];
- char cDeviceName[32];
- char cPortName[32];
- char cDriverName[32];
- char cDriverData[1];
-
- JobSetup();
-
- BOOL operator==( const JobSetup& rJobSetup ) const;
- BOOL operator!=( const JobSetup& rJobSetup ) const;
- };
-
- class Printer : public OutputDevice
- {
- protected:
- ImpPrinter aImpPRN;
- ImpPageQueue* pPageQueue;
- PageMetaFile* pActPage;
- JobSetup* pActSetup;
- Printer* pQueuePrinter;
- Printer* pParentPrinter;
- String aPrinterName;
- String aDeviceName;
- String aPortName;
- String aDriverName;
- String aJobName;
- JobSetup* pJobSetup;
- Point aPageOffset;
- Size aOutputSize;
- Size aPaperSize;
- Paper ePaper;
- Quality eQuality;
- Orientation eOrientation;
- USHORT nPaperBins;
- USHORT nPaperBin;
- USHORT nPageQueueSize;
- USHORT nCurPage;
- USHORT nCurPrintPage;
- USHORT nError;
- USHORT nCopy;
- BOOL bSorted;
- BOOL bQueueSema;
- BOOL bQueuePrinter;
- BOOL bJobActive;
- BOOL bPrinting;
- BOOL bDefPrinter;
- Link aErrorHdlLink;
- Link aStartPrintHdlLink;
- Link aEndPrintHdlLink;
- Link aPrintPageHdlLink;
-
- void QueueStartPrintHdl( Printer* pPrinter );
- void QueueEndPrintHdl( Printer* pPrinter );
- void QueuePrintPageHdl( Printer* pPrinter );
- virtual void InsertNewPage( PageMetaFile* pPage );
- void PrintTask( Timer* pTimer );
- void EndPrintTimerHdl( Timer* pTimer );
-
- virtual void Error();
- virtual void StartPrint();
- virtual void EndPrint();
- virtual void PrintPage();
-
- public:
- Printer();
- Printer( const String& rPrinterName );
- virtual ~Printer();
-
- const String& GetName() const { return aPrinterName; }
- const String& GetDeviceName() const { return aDeviceName; }
- const String& GetPortName() const { return aPortName; }
- const String& GetDriverName() const { return aDriverName; }
- BOOL IsValid() const
- { return ((aPrinterName.Len() != 0) ? TRUE : FALSE); }
- BOOL IsDefPrinter() const { return bDefPrinter; }
-
- BOOL HasSupport( PrinterSupport eFeature,
- BOOL bInJob = FALSE );
-
- BOOL Setup();
- USHORT GetJobSetupSize() const;
- BOOL SetJobSetup( JobSetup* pSetup );
- BOOL GetJobSetup( JobSetup* pSetup );
-
- BOOL SetCopyCount( USHORT nCopy, BOOL bSorted=FALSE );
- USHORT GetCopyCount() const { return nCopy; }
- BOOL IsSorted() const { return bSorted; }
- BOOL SetQuality( Quality eQuality );
- Quality GetQuality() const { return eQuality; }
-
- BOOL SetOrientation( Orientation eOrient );
- Orientation GetOrientation() const { return eOrientation; }
-
- USHORT GetPaperBinCount() const { return nPaperBins; }
- String GetPaperBinName( USHORT nPaperBin ) const;
- USHORT GetPaperBin() const { return nPaperBin; }
- BOOL SetPaperBin( USHORT nPaperBin );
-
- Paper GetPaper() const { return ePaper; }
- Size GetPaperSize() const { return PixelToLogic( aPaperSize ); }
- Size GetPaperSizePixel() const { return aPaperSize; }
- Point GetPageOffset() const { return PixelToLogic( aPageOffset ); }
- Point GetPageOffsetPixel() const { return aPageOffset; }
- Size GetOutputSizePixel() const;
-
- virtual void SetPageQueueSize( USHORT nPages );
- USHORT GetPageQueueSize() const { return nPageQueueSize; }
-
- BOOL StartJob( const String& rJobName );
- BOOL EndJob();
- BOOL AbortJob();
- String GetCurJobName() const { return aJobName; }
- USHORT GetCurPage() const { return nCurPage; }
- BOOL IsJobActive() const { return bJobActive; }
- BOOL StartPage();
- BOOL EndPage();
-
- Link ChangeErrorHdl( const Link& rLink );
- Link GetErrorHdl() const { return aErrorHdlLink; }
-
- USHORT GetErrorCode() const { return nError; }
-
- Link ChangeStartPrintHdl( const Link& rLink );
- Link GetStartPrintHdl() const { return aStartPrintHdlLink; }
- Link ChangeEndPrintHdl( const Link& rLink );
- Link GetEndPrintHdl() const { return aEndPrintHdlLink; }
- BOOL IsPrinting() const { return bPrinting; }
- Link ChangePrintPageHdl( const Link& rLink );
- Link GetPrintPageHdl() const { return aPrintPageHdlLink; }
-
- USHORT GetCurPrintPage() const { return nCurPrintPage; }
-
- BOOL SetPrinterProps( const Printer* pPrinter );
- };
-
- inline Link Printer::ChangeErrorHdl( const Link& rLink )
- {
- Link aOldLink = aErrorHdlLink;
- aErrorHdlLink = rLink;
- return aOldLink;
- }
-
- inline Link Printer::ChangeStartPrintHdl( const Link& rLink )
- {
- Link aOldLink = aStartPrintHdlLink;
- aStartPrintHdlLink = rLink;
- return aOldLink;
- }
-
- inline Link Printer::ChangeEndPrintHdl( const Link& rLink )
- {
- Link aOldLink = aEndPrintHdlLink;
- aEndPrintHdlLink = rLink;
- return aOldLink;
- }
-
- inline Link Printer::ChangePrintPageHdl( const Link& rLink )
- {
- Link aOldLink = aPrintPageHdlLink;
- aPrintPageHdlLink = rLink;
- return aOldLink;
- }
-
- #endif
- #ifndef SV_NOWINDOW
-
- #ifndef _WINDOW_HXX
- #define _WINDOW_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _WINBIT_HXX
- #endif
- #ifndef _RESID_HXX
- #endif
- #ifndef _OUTDEV_HXX
- #endif
- #ifndef _EVENT_HXX
- #endif
- #ifndef _WINDOW_H
- #endif
-
- class Cursor;
- class Pointer;
- class MouseEvent;
- class KeyEvent;
- class HelpEvent;
- class ResOwner;
- class DropEvent;
-
- #define DRAG_MOVEABLE 0x0001
- #define DRAG_COPYABLE 0x0002
- #define DRAG_PRINTABLE 0x0004
- #define DRAG_DISCARDABLE 0x0008
- #define DRAG_ALL 0x000F
-
- #define DRAG_DEF_COPYABLE 0x0020
-
- class Window : public OutputDevice
- {
- private:
- ResOwner* pAutoResObject;
-
- protected:
- ImpWindow aImpWnd;
-
- Window( RESOURCE_TYPE nTyp, Window* pParent,
- WinBits nWinStyle );
-
- virtual void MouseMove( const MouseEvent& rMEvt );
- virtual void MouseButtonDown( const MouseEvent& rMEvt );
- virtual void MouseButtonUp( const MouseEvent& rMEvt );
- virtual void KeyInput( const KeyEvent& rKEvent );
- virtual void Paint( const Rectangle& rRect );
- virtual void Resize();
- virtual void Move();
- virtual void GetFocus();
- virtual void LoseFocus();
- virtual void RequestHelp( const HelpEvent& rHEvt );
- virtual BOOL Drop( const DropEvent& rEvt );
- virtual BOOL QueryDrop( const DropEvent& rEvt );
-
- public:
- Window( Window* pParent, WinBits nWinStyle = 0 );
- Window( Window* pParent, const ResId& rResId );
- ~Window();
-
- Window* ChangeParent( Window* pNewParent );
- Window* GetParent() const;
-
- void Show();
- void Hide();
- BOOL IsVisible() const;
-
- void Enable();
- void Disable();
- BOOL IsEnabled() const;
-
- void ToTop();
- Point ChangePosPixel( const Point& rNewPos );
- Point GetPosPixel() const;
- Size ChangeSizePixel( const Size& rNewSize );
- Size GetSizePixel() const;
- void SetPosSizePixel( const Point& rNewPos,
- const Size& rNewSize );
-
- void SetPosSize( const Point& rNewPos,
- const Size& rNewSize );
- Size ChangeOutputSizePixel( const Size& rNewSize );
- Size GetOutputSizePixel() const;
-
- Point OutputToScreenPixel( const Point& rPt ) const;
- Point ScreenToOutputPixel( const Point& rPt ) const;
-
- void CaptureMouse();
- void ReleaseMouse();
-
- void GrabFocus();
- BOOL HasFocus() const;
-
- void Scroll( short nHorzScroll, short nVertScroll );
- void Scroll( short nHorzScroll, short nVertScroll,
- const Rectangle& rRect );
- void Invalidate();
- void Invalidate( const Rectangle& rRect );
- void InvalidateForeground();
- void InvalidateForeground( const Rectangle& rRect );
- void Update();
- void Flash();
-
- BOOL ChangeUpdateMode( BOOL bUpdate );
- BOOL GetUpdateMode() const;
-
- void SetText( const String& rStr );
- String GetText() const;
-
- Pointer ChangePointer( const Pointer& rPointer );
- Pointer GetPointer() const;
-
- Cursor* ChangeCursor( Cursor* pCursor );
- Cursor* GetCursor() const;
-
- void SetHelpText( const String& rStr );
- String GetHelpText() const;
-
- ULONG ChangeHelpId( ULONG nHelpId );
- ULONG GetHelpId() const;
-
- BOOL IsSVLook() const;
-
- void EnableDrop( BOOL bDrop = TRUE );
- BOOL IsDropEnabled() const;
-
- DropAction ExecuteDrag( const Pointer& rMovePtr,
- const Pointer& rCopyPtr,
- USHORT nOptions = DRAG_ALL,
- const Region* pDropRegion = NULL );
- };
-
- #endif
-
- #ifndef _SYSWIN_HXX
- #define _SYSWIN_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _WINDOW_HXX
- #endif
- #ifndef _PAL_HXX
- #endif
- #ifndef _SYSWIN_H
- #endif
-
- class SystemWindow : public Window
- {
- protected:
- ImpSysWin aImpSysWnd;
- Palette aPalette;
-
- SystemWindow( RESOURCE_TYPE nTyp, Window* pParent,
- WinBits nWinStyle );
-
- SystemWindow( Window* pParent, const ResId& rResId );
-
- virtual void Activate();
- virtual void Deactivate();
-
- public:
- ~SystemWindow();
-
- virtual BOOL Close();
-
- BOOL IsActive() const;
-
- void AnimatePalette( USHORT nStart, const Palette& rPal );
- Palette ChangePalette( const Palette& rPal );
- const Palette& GetPalette() const { return aPalette; }
- };
-
- #endif
-
- #ifndef _WRKWIN_HXX
- #define _WRKWIN_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _SYSWIN_HXX
- #endif
- #ifndef _WRKWIN_H
- #endif
-
- class Icon;
-
- class WorkWindow : public SystemWindow
- {
- protected:
- ImpWorkWin aImpWork;
-
- WorkWindow( RESOURCE_TYPE nTyp, Window* pParent,
- WinBits nWinStyle );
-
- public:
- WorkWindow( Window* pParent, WinBits nWinStyle = WB_STDWORK );
- WorkWindow( Window* pParent, const ResId& rResId );
- ~WorkWindow();
-
- void Minimize();
- void Maximize();
- void Restore();
-
- BOOL IsMinimized() const;
- BOOL IsMaximized() const;
-
- Icon ChangeIcon( const Icon& rNewIcon );
- Icon GetIcon() const;
-
- Size ChangeMinOutputSizePixel( const Size& rSize );
- Size GetMinOutputSizePixel() const;
-
- Size ChangeOptOutputSizePixel( const Size& rSize );
- Size GetOptOutputSizePixel() const;
- };
-
- #endif
-
- #ifndef _MDIWIN_HXX
- #define _MDIWIN_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _WRKWIN_HXX
- #endif
- #ifndef _MDIWIN_H
- #endif
-
- class MDIWindow : public WorkWindow
- {
- protected:
- ImpMDIWin aImpMDI;
-
- public:
- MDIWindow( WorkWindow* pParent, WinBits nWinStyle = WB_STDMDI );
- MDIWindow( WorkWindow* pParent, const ResId& rResId );
- ~MDIWindow();
-
- BOOL IsMDIActivate();
- };
-
- #endif
-
- #ifndef _FLOATWIN_HXX
- #define _FLOATWIN_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _SYSWIN_HXX
- #endif
- #ifndef _FLOATWIN_H
- #endif
-
- class FloatingWindow : public SystemWindow
- {
- protected:
- ImpFloatWin aImpFltWin;
-
- virtual void Zoom();
-
- public:
- FloatingWindow( Window* pParent, WinBits nWinStyle = WB_STDFLOATWIN );
- FloatingWindow( Window* pParent, const ResId& rResId );
- ~FloatingWindow();
-
- void ZoomIn();
- void ZoomOut();
- BOOL IsZoomedIn() const;
-
- Size ChangeZoomInOutputSizePixel( const Size& rSize );
- Size GetZoomInOutputSizePixel() const;
- };
-
- #endif
- #ifndef SV_NOCONTROL
-
- #ifndef _CTRL_HXX
- #define _CTRL_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _WINDOW_HXX
- #endif
- #ifndef _CTRL_H
- #endif
-
- class Control : public Window
- {
- private:
- Link aGetFcHdlLink;
- Link aLosFcHdlLink;
-
- protected:
- ImpControl aImpCtrl;
-
- Control( RESOURCE_TYPE nTyp, Window* pParent,
- WinBits nWinStyle );
-
- void GetFocus();
- void LoseFocus();
-
- public:
- Control( Window* pWindow, WinBits nWinStyle = 0 );
- Control( Window* pWindow, const ResId& rResId );
- ~Control();
-
- void ShowFocus( const Rectangle& rRect );
- void HideFocus();
-
- void DrawCtrlText( const Point& rPoint, const String& rStr,
- USHORT nIndex = 0, USHORT nLen = STRING_LEN,
- BOOL bDisable = FALSE );
- Size GetCtrlTextSize( const String& rStr, USHORT nIndex = 0,
- USHORT nLen = STRING_LEN ) const;
-
- Link ChangeGetFocusHdl( const Link& rLink );
- Link GetGetFocusHdl() const { return aGetFcHdlLink; }
- Link ChangeLoseFocusHdl( const Link& rLink );
- Link GetLoseFocusHdl() const { return aLosFcHdlLink; }
- };
-
- inline Link Control::ChangeGetFocusHdl( const Link& rLink )
- {
- Link aOldLink = aGetFcHdlLink;
- aGetFcHdlLink = rLink;
- return aOldLink;
- }
-
- inline Link Control::ChangeLoseFocusHdl( const Link& rLink )
- {
- Link aOldLink = aLosFcHdlLink;
- aLosFcHdlLink = rLink;
- return aOldLink;
- }
-
- #endif
-
- #ifndef _SCRBAR_HXX
- #define _SCRBAR_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _CTRL_HXX
- #endif
- #ifndef _SCRBAR_H
- #endif
-
- class ScrollBar : public Control
- {
- private:
- ImpScrBar aImpScrBar;
- Link aScrollHdlLink;
- Link aEndScrollHdlLink;
-
- public:
- ScrollBar( Window* pParent, WinBits nWinStyle = WB_VSCROLL );
- ScrollBar( Window* pParent, const ResId& rResId );
- ~ScrollBar();
-
- virtual void Scroll();
- virtual void EndScroll();
-
- public:
- Range ChangeRange( const Range& rRange );
- Range GetRange() const;
- short ChangeThumbPos( short nThumbPos );
- short GetThumbPos() const;
- short ChangeLineSize( short nNewSize );
- short GetLineSize() const;
- short ChangePageSize( short nNewSize );
- short GetPageSize() const;
- USHORT ChangeVisibleSize( USHORT nNewSize );
- USHORT GetVisibleSize() const;
-
- short GetDelta() const;
- ScrollType GetType() const;
-
- Link ChangeScrollHdl( const Link& rLink );
- Link GetScrollHdl() const { return aScrollHdlLink; }
- Link ChangeEndScrollHdl( const Link& rLink );
- Link GetEndScrollHdl() const { return aEndScrollHdlLink; }
- };
-
- inline Link ScrollBar::ChangeScrollHdl( const Link& rLink )
- {
- Link aOldLink = aScrollHdlLink;
- aScrollHdlLink = rLink;
- return aOldLink;
- }
-
- inline Link ScrollBar::ChangeEndScrollHdl( const Link& rLink )
- {
- Link aOldLink = aEndScrollHdlLink;
- aEndScrollHdlLink = rLink;
- return aOldLink;
- }
-
- #endif
-
- #ifndef _BUTTON_HXX
- #define _BUTTON_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _CTRL_HXX
- #endif
- #ifndef _BUTTON_H
- #endif
-
- class Button : public Control
- {
- private:
- Link aClkHdlLink;
-
- protected:
-
- Button( RESOURCE_TYPE nTyp, Window* pParent,
- WinBits nWinStyle );
-
- virtual void Click();
-
- public:
- Button( Window* pParent, WinBits nWinStyle = 0 );
- Button( Window* pParent, const ResId& rResId );
- ~Button();
-
- Link ChangeClickHdl( const Link& rLink );
- Link GetClickHdl() const { return aClkHdlLink; }
- };
-
- inline Link Button::ChangeClickHdl( const Link& rLink )
- {
- Link aOldLink = aClkHdlLink;
- aClkHdlLink = rLink;
- return aOldLink;
- }
-
- class PushButton : public Button
- {
- protected:
-
- PushButton( RESOURCE_TYPE nTyp, Window* pParent,
- WinBits nWinStyle );
-
- public:
- PushButton( Window* pParent, WinBits nWinStyle = 0 );
- PushButton( Window* pParent, const ResId& rResId );
- };
-
- class OKButton : public PushButton
- {
- protected:
- virtual void Click();
-
- public:
- OKButton( Window* pParent,
- WinBits nWinStyle = WB_DEFBUTTON );
- OKButton( Window* pParent, const ResId& rResId );
- };
-
- class CancelButton : public PushButton
- {
- protected:
- virtual void Click();
-
- public:
- CancelButton( Window* pParent, WinBits nWinStyle = 0 );
- CancelButton( Window* pParent, const ResId& rResId );
- };
-
- class HelpButton : public PushButton
- {
- protected:
- virtual void Click();
-
- public:
- HelpButton( Window* pParent, WinBits nWinStyle = 0 );
- HelpButton( Window* pParent, const ResId& rResId );
- };
-
- class RadioButton : public Button
- {
- private:
- BOOL bSaveValue;
-
- public:
- RadioButton( Window* pParent, WinBits nWinStyle = 0 );
- RadioButton( Window* pParent, const ResId& rResId );
-
- void Check( BOOL bCheck = TRUE );
- BOOL IsChecked() const;
-
- void SaveValue() { bSaveValue = IsChecked(); }
- BOOL GetSavedValue() const { return bSaveValue; }
- };
-
- class CheckBox : public Button
- {
- private:
- BOOL bSaveValue;
-
- public:
- CheckBox( Window* pParent, WinBits nWinStyle = 0 );
- CheckBox( Window* pParent, const ResId& rResId );
-
- void Check( BOOL bCheck = TRUE );
- BOOL IsChecked() const;
-
- void SaveValue() { bSaveValue = IsChecked(); }
- BOOL GetSavedValue() const { return bSaveValue; }
- };
-
- class TriStateBox : public Button
- {
- private:
- TriState eSaveValue;
-
- protected:
- ImpTriBox aImpTriBox;
-
- public:
- TriStateBox( Window* pParent, WinBits nWinStyle = 0 );
- TriStateBox( Window* pParent, const ResId& rResId );
-
- TriState ChangeState( TriState aState );
- TriState GetState() const;
-
- void EnableTriState( BOOL bTriState = TRUE );
- BOOL IsTriStateEnabled() const;
-
- void SaveValue() { eSaveValue = GetState(); }
- TriState GetSavedValue() const { return eSaveValue; }
- };
-
- #endif
-
- #ifndef _MENUBTN_HXX
- #define _MENUBTN_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _CTRL_HXX
- #endif
-
- class PopupMenu;
-
- class MenuButton : public Control
- {
- private:
- PopupMenu* pOwnMenu;
- PopupMenu* pMenu;
- Link aSelectHdlLink;
- USHORT nCurItemId;
-
- protected:
-
- MenuButton( RESOURCE_TYPE nTyp, Window* pParent,
- WinBits nWinStyle = 0 );
-
- virtual void Select();
-
- public:
- MenuButton( Window* pParent, WinBits nWinStyle = 0 );
- MenuButton( Window* pParent, const ResId& rResId );
- ~MenuButton();
-
- PopupMenu* ChangePopupMenu( PopupMenu* pNewMenu );
- PopupMenu* GetPopupMenu() const { return pMenu; }
-
- USHORT GetCurItemId() const { return nCurItemId; }
-
- Link ChangeSelectHdl( const Link& rLink );
- Link GetSelectHdl() const { return aSelectHdlLink; }
- };
-
- inline Link MenuButton::ChangeSelectHdl( const Link& rLink )
- {
- Link aOldLink = aSelectHdlLink;
- aSelectHdlLink = rLink;
- return aOldLink;
- }
-
- #endif
-
- #ifndef _SYMBTN_HXX
- #define _SYMBTN_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _BITMAP_HXX
- #endif
- #ifndef _BUTTON_HXX
- #endif
- #ifndef _SYMBTN_H
- #endif
-
- class SymbolButton : public PushButton
- {
- private:
- SymbolType eSymbol;
- ImpSymBtn aImpSymBtn;
-
- public:
- SymbolButton( Window* pParent, WinBits nWinStyle = 0 );
- SymbolButton( Window* pParent, const ResId& rResId );
- ~SymbolButton();
-
- SymbolType ChangeSymbol( SymbolType eNewSymbol );
- SymbolType GetSymbol() const { return eSymbol; }
- };
-
- class BitmapButton : public PushButton
- {
- private:
- Bitmap aBmp;
- ImpBmpBtn aImpBmpBtn;
-
- public:
- BitmapButton( Window* pParent, WinBits nWinStyle = 0 );
- BitmapButton( Window* pParent, const ResId& rResId );
- ~BitmapButton();
-
- Bitmap ChangeBitmap( const Bitmap& rBitmap );
- const Bitmap& GetBitmap() const { return aBmp; }
- };
-
- #endif
-
- #ifndef _FIXED_HXX
- #define _FIXED_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _CTRL_HXX
- #endif
- #ifndef _BITMAP_HXX
- #endif
- #ifndef _ICON_HXX
- #endif
-
- class FixedText : public Control
- {
- public:
- FixedText( Window* pParent, WinBits nWinStyle = WB_LEFT );
- FixedText( Window* pParent, const ResId& rResId );
- ~FixedText();
- };
-
- class FixedBitmap : public Control
- {
- private:
- Bitmap aBmp;
-
- protected:
- virtual void Paint( const Rectangle& );
- virtual void Resize();
-
- public:
- FixedBitmap( Window* pParent, WinBits nWinStyle = 0 );
- FixedBitmap( Window* pParent, const ResId& rResId );
-
- Bitmap ChangeBitmap( const Bitmap& rBitmap );
- const Bitmap& GetBitmap() const { return aBmp; }
- };
-
- class FixedIcon : public Control
- {
- private:
- Icon aIcon;
-
- protected:
- virtual void Paint( const Rectangle& );
- virtual void Resize();
-
- public:
- FixedIcon( Window* pParent, WinBits nWinStyle = 0 );
- FixedIcon( Window* pParent, const ResId& rResId );
-
- Icon ChangeIcon( const Icon& rIcon );
- const Icon& GetIcon() const { return aIcon; }
- };
-
- #endif
-
- #ifndef _GROUP_HXX
- #define _GROUP_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _CTRL_HXX
- #endif
-
- class GroupBox : public Control
- {
- public:
- GroupBox( Window* pParent );
- GroupBox( Window* pParent, const ResId& rResId );
- ~GroupBox();
- };
-
- #endif
-
- #ifndef _EDIT_HXX
- #define _EDIT_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _CTRL_HXX
- #endif
- #ifndef _EDIT_H
- #endif
-
- #define EDIT_NOLIMIT 0xFFFF
-
- class Edit : public Control
- {
- private:
- ImpEdit aImpEdit;
- String aSaveValue;
-
- Link aModifyHdlLink;
-
- protected:
-
- Edit( RESOURCE_TYPE nTyp, Window* pParent, WinBits nWinStyle );
-
- virtual void Modify();
-
- public:
- Edit( Window* pParent, WinBits nWinStyle = WB_LEFT | WB_BORDER );
- Edit( Window* pParent, const ResId& rResId );
- ~Edit();
-
- void ClearModifyFlag();
- BOOL IsModified() const;
-
- USHORT ChangeMaxTextLen( USHORT nMaxLen = EDIT_NOLIMIT );
- USHORT GetMaxTextLen() const;
-
- Selection ChangeSelection( const Selection& rSelection );
- Selection GetSelection() const;
-
- void ReplaceSelected( const String& rStr );
- void DeleteSelected();
- String GetSelected() const;
-
- void Cut();
- void Copy();
- void Paste();
-
- void SaveValue() { aSaveValue = GetText(); }
- String GetSavedValue() const { return aSaveValue; }
-
- Link ChangeModifyHdl( const Link& rLink );
- Link GetModifyHdl() const { return aModifyHdlLink; }
- };
-
- inline Link Edit::ChangeModifyHdl( const Link& rLink )
- {
- Link aTmpLink = aModifyHdlLink;
- aModifyHdlLink = rLink;
- return aTmpLink;
- }
-
- class MultiLineEdit : public Edit
- {
- public:
- MultiLineEdit( Window* pParent, WinBits nWinStyle = WB_LEFT | WB_BORDER );
- MultiLineEdit( Window* pParent, const ResId& rResId );
- };
-
- #endif
-
- #ifndef _COMBOBOX_HXX
- #define _COMBOBOX_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _CTRL_HXX
- #endif
- #ifndef _EDIT_HXX
- #endif
- #ifndef _COMBOBOX_H
- #endif
-
- #define COMBOBOX_APPEND ((USHORT)0xFFFF)
- #define COMBOBOX_ENTRY_NOTFOUND ((USHORT)0xFFFF)
-
- class ComboBox : public Edit
- {
- private:
- Link aSelectHdlLink;
- Link aDoubleClickHdlLink;
-
- protected:
- ImpComboBox aImpComboBox;
-
- ComboBox( RESOURCE_TYPE nTyp, Window* pParent,
- WinBits nWinStyle );
-
- virtual void Select();
- virtual void DoubleClick();
-
- public:
- ComboBox( Window* pParent, WinBits nWinStyle = 0 );
- ComboBox( Window* pParent, const ResId& rResId );
- ~ComboBox();
-
- BOOL InsertEntry( const String& rStr,
- USHORT nPos = COMBOBOX_APPEND );
- void RemoveEntry( const String& rStr );
- void RemoveEntry( USHORT nPos );
-
- USHORT GetEntryPos( const String& rStr ) const;
- String GetEntry( USHORT nPos ) const;
- USHORT GetEntryCount() const;
-
- void Clear();
-
- BOOL IsTravelSelect() const;
-
- Link ChangeSelectHdl( const Link& rLink );
- Link GetSelectHdl() const { return aSelectHdlLink; }
- Link ChangeDoubleClickHdl( const Link& rLink );
- Link GetDoubleClickHdl() const { return aDoubleClickHdlLink; }
- };
-
- inline Link ComboBox::ChangeSelectHdl( const Link& rLink )
- {
- Link aOldLink = aSelectHdlLink;
- aSelectHdlLink = rLink;
- return aOldLink;
- }
-
- inline Link ComboBox::ChangeDoubleClickHdl( const Link& rLink )
- {
- Link aOldLink = aDoubleClickHdlLink;
- aDoubleClickHdlLink = rLink;
- return aOldLink;
- }
-
- #endif
-
- #ifndef _LSTBOX_HXX
- #define _LSTBOX_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _CTRL_HXX
- #endif
- #ifndef _LSTBOX_H
- #endif
-
- #define LISTBOX_APPEND ((USHORT)0xFFFF)
- #define LISTBOX_ENTRY_NOTFOUND ((USHORT)0xFFFF)
-
- class ListBox : public Control
- {
- private:
- ImpLstBox aImpLB;
- USHORT nSaveValue;
-
- Link aSelectHdlLink;
- Link aDoubleClickHdlLink;
-
- protected:
-
- ListBox( RESOURCE_TYPE nTyp, Window* pParent,
- WinBits nWinStyle );
-
- virtual void Select();
- virtual void DoubleClick();
-
- public:
- ListBox( Window* pParent, WinBits nWinStyle = WB_BORDER );
- ListBox( Window* pParent, const ResId& rResId );
- ~ListBox();
-
- BOOL InsertEntry( const String& rStr,
- USHORT nPos = LISTBOX_APPEND );
- BOOL InsertEntry( const Bitmap& rBitmap,
- USHORT nPos = LISTBOX_APPEND );
- BOOL InsertEntry( const String& rStr, const Bitmap& rBitmap,
- USHORT nPos = LISTBOX_APPEND );
- void RemoveEntry( const String& rStr );
- void RemoveEntry( USHORT nPos );
-
- void Clear();
-
- USHORT GetEntryPos( const String& rStr ) const;
- String GetEntry( USHORT nPos ) const;
- USHORT GetEntryCount() const;
-
- void SelectEntry( const String& rStr, BOOL bSelect = TRUE );
- void SelectEntryPos( USHORT nPos, BOOL bSelect = TRUE );
- USHORT GetSelectEntryCount() const;
- String GetSelectEntry( USHORT nSelIndex = 0 ) const;
- USHORT GetSelectEntryPos( USHORT nSelIndex = 0 ) const;
- BOOL IsEntrySelected( const String& rStr ) const;
- BOOL IsEntryPosSelected( USHORT nPos ) const;
- void SetNoSelection();
-
- void SaveValue() { nSaveValue = GetSelectEntryPos(); }
- USHORT GetSavedValue() const { return nSaveValue; }
-
- BOOL IsTravelSelect() const;
-
- Link ChangeSelectHdl( const Link& rLink );
- Link GetSelectHdl() const { return aSelectHdlLink; }
- Link ChangeDoubleClickHdl( const Link& rLink );
- Link GetDoubleClickHdl() const { return aDoubleClickHdlLink; }
- };
-
- inline Link ListBox::ChangeSelectHdl( const Link& rLink )
- {
- Link aOldLink = aSelectHdlLink;
- aSelectHdlLink = rLink;
- return aOldLink;
- }
-
- inline Link ListBox::ChangeDoubleClickHdl( const Link& rLink )
- {
- Link aOldLink = aDoubleClickHdlLink;
- aDoubleClickHdlLink = rLink;
- return aOldLink;
- }
-
- class MultiListBox : public ListBox
- {
- private:
- void SaveValue();
- USHORT GetSavedValue();
-
- public:
- MultiListBox( Window* pParent, WinBits nWinStyle = 0 );
- MultiListBox( Window* pParent, const ResId& rResId );
- };
-
- #endif
-
- #ifndef _SPLIT_HXX
- #define _SPLIT_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _WINBIT_HXX
- #endif
- #ifndef _RESID_HXX
- #endif
- #ifndef _OUTDEV_HXX
- #endif
- #ifndef _WINDOW_HXX
- #endif
- #ifndef _CTRL_HXX
- #endif
- #ifndef _SCRBAR_HXX
- #endif
- #ifndef _SPLIT_H
- #endif
-
- class Splitter : public Window
- {
- protected:
- ImpSplitter aImpSplit;
- BOOL bHorzSplit;
- BOOL bDrag;
- short nSplitPos;
- Point aDragPos;
- Rectangle aDragRect;
- Window* pRefWin;
- Link aSplitHdlLink;
-
- void MouseButtonDown( const MouseEvent& rMEvt );
- void MouseButtonUp( const MouseEvent& rMEvt );
- void MouseMove( const MouseEvent& rMEvt );
-
- Splitter( RESOURCE_TYPE nTyp, Window* pParent,
- WinBits nWinStyle = WB_VSCROLL );
-
- virtual void Split();
-
- public:
- Splitter( Window* pParent, WinBits nWinStyle = WB_VSCROLL );
- Splitter( Window* pParent, const ResId& rResId );
- ~Splitter();
-
- void StartDrag();
-
- Rectangle ChangeDragRectPixel( const Rectangle& rDragRect,
- Window* pRefWin = NULL );
- Rectangle GetDragRectPixel() const { return aDragRect; }
-
- virtual short ChangeSplitPosPixel( short nPos );
- short GetSplitPosPixel() const { return nSplitPos; }
-
- Link ChangeSplitHdl( const Link& rLink );
- Link GetSplitHdl() const { return aSplitHdlLink; }
- };
-
- inline Link Splitter::ChangeSplitHdl( const Link& rLink )
- {
- Link aOldLink = aSplitHdlLink;
- aSplitHdlLink = rLink;
- return aOldLink;
- }
-
- class SplitBar : public Splitter
- {
- protected:
- ScrollBar* pScroll1;
- ScrollBar* pScroll2;
- BOOL bPrivate1;
- BOOL bPrivate2;
- USHORT nSplitWidth;
- short nWinSplitPos;
- short nScrBarWinBits;
-
- void Resize();
-
- public:
- SplitBar( Window* pParent, WinBits nWinStyle = WB_VSCROLL );
- SplitBar( Window* pParent, const ResId& rResId );
- ~SplitBar();
-
- short ChangeSplitPosPixel( short nPos );
-
- USHORT ChangeSplitWidthPixel( USHORT nWidth );
- USHORT GetSplitWidthPixel() const { return nSplitWidth; }
-
- ScrollBar* ChangeScrollBar1( ScrollBar* pScroll );
- ScrollBar* GetScrollBar1() const { return pScroll1; }
- ScrollBar* ChangeScrollBar2( ScrollBar* pScroll );
- ScrollBar* GetScrollBar2() const { return pScroll2; }
- };
-
- #endif
-
- #ifndef _SPIN_HXX
- #define _SPIN_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _CTRL_HXX
- #endif
- #ifndef _TIMER_HXX
- #endif
-
- class SpinButton : public Control
- {
- protected:
- AutoTimer aRepeatTimer;
- Link aUpHdlLink;
- Link aDownHdlLink;
- Rectangle aUpperRect;
- Rectangle aLowerRect;
- BOOL bRepeat;
- BOOL bUpperIn;
- BOOL bLowerIn;
- BOOL bInitialUp;
- BOOL bInitialDown;
-
- void Timeout( Timer* );
- void Resize();
- void Paint( const Rectangle& rRect );
- void MouseButtonDown( const MouseEvent& rMEvt );
- void MouseButtonUp( const MouseEvent& rMEvt );
- void MouseMove( const MouseEvent& rMEvt );
- void KeyInput( const KeyEvent& rKEvt );
-
- virtual void Up();
- virtual void Down();
-
- public:
- SpinButton( Window* pParent, WinBits nWinStyle = 0 );
- SpinButton( Window* pParent, const ResId& rResId );
- ~SpinButton();
-
- void Enable();
- void Disable();
-
- Link ChangeUpHdl( const Link& rLink );
- Link GetUpHdl() const { return aUpHdlLink; }
- Link ChangeDownHdl( const Link& rLink );
- Link GetDownHdl() const { return aDownHdlLink; }
- };
-
- inline Link SpinButton::ChangeUpHdl( const Link& rLink )
- {
- Link aOldLink = aUpHdlLink;
- aUpHdlLink = rLink;
- return aOldLink;
- }
-
- inline Link SpinButton::ChangeDownHdl( const Link& rLink )
- {
- Link aOldLink = aDownHdlLink;
- aDownHdlLink = rLink;
- return aOldLink;
- }
-
- #endif
-
- #ifndef _FIELD_HXX
- #define _FIELD_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _EVENT_HXX
- #endif
- #ifndef _CTRL_HXX
- #endif
- #ifndef _EDIT_HXX
- #endif
- #ifndef _COMBOBOX_HXX
- #endif
- #ifndef _TIMER_HXX
- #endif
-
- class SpinField : public Edit
- {
- protected:
- AutoTimer aRepeatTimer;
- Link aUpHdlLink;
- Link aDownHdlLink;
- Link aFirstHdlLink;
- Link aLastHdlLink;
- Rectangle aUpperRect;
- Rectangle aLowerRect;
- KeyEvent aKeyEvent;
- SpinField* pParentField;
- BOOL bRepeat:1,
- bSpin:1,
- bInitialUp:1,
- bInitialDown:1,
- bNoSelect:1,
- bInGetFocus:1;
- BOOL bUpperIn;
- BOOL bLowerIn;
-
- void MouseButtonDown( const MouseEvent& rMEvt );
- void MouseButtonUp( const MouseEvent& rMEvt );
- void MouseMove( const MouseEvent& rMEvt );
- void KeyInput( const KeyEvent& rKEvt );
- void Paint( const Rectangle& rRect );
- void Resize();
- void GetFocus();
- void LoseFocus();
- void Modify();
- void Timeout( Timer* pTimer );
-
- SpinField( RESOURCE_TYPE nTyp, Window* pParent,
- WinBits nWinStyle );
-
- virtual void Up();
- virtual void Down();
- virtual void First();
- virtual void Last();
-
- public:
- SpinField( Window* pParent, WinBits nWinStyle = 0 );
- SpinField( Window* pParent, const ResId& rResId );
- ~SpinField();
-
- void Enable();
- void Disable();
-
- Link ChangeUpHdl( const Link& rLink );
- Link GetUpHdl() const { return aUpHdlLink; }
- Link ChangeDownHdl( const Link& rLink );
- Link GetDownHdl() const { return aDownHdlLink; }
- Link ChangeFirstHdl( const Link& rLink );
- Link GetFirstHdl() const { return aFirstHdlLink; }
- Link ChangeLastHdl( const Link& rLink );
- Link GetLastHdl() const { return aLastHdlLink; }
- };
-
- inline Link SpinField::ChangeUpHdl( const Link& rLink )
- {
- Link aOldLink = aUpHdlLink;
- aUpHdlLink = rLink;
- return aOldLink;
- }
-
- inline Link SpinField::ChangeDownHdl( const Link& rLink )
- {
- Link aOldLink = aDownHdlLink;
- aDownHdlLink = rLink;
- return aOldLink;
- }
-
- inline Link SpinField::ChangeFirstHdl( const Link& rLink )
- {
- Link aOldLink = aFirstHdlLink;
- aFirstHdlLink = rLink;
- return aOldLink;
- }
-
- inline Link SpinField::ChangeLastHdl( const Link& rLink )
- {
- Link aOldLink = aLastHdlLink;
- aLastHdlLink = rLink;
- return aOldLink;
- }
-
- class PatternFormatter
- {
- private:
- void ImpInit();
-
- protected:
- String aFieldString;
- String aEditMask;
- String aLiteralMask;
- BOOL bStrictFormat;
- Edit* pField;
-
- virtual void ReformatAll();
-
- PatternFormatter();
- PatternFormatter( const ResId & rResId );
-
- public:
-
- BOOL ChangeStrictFormat( BOOL bStrict );
- BOOL GetStrictFormat() const { return bStrictFormat; }
-
- String GetEditMask() { return aEditMask; }
- String GetLiteralMask() { return aLiteralMask; }
- void SetMask( const String& rEditMask,
- const String& rLiteralMask );
-
- void SetString( const String& rStr );
- String GetString() const;
- BOOL IsStringModified() const;
-
- virtual void Reformat();
- };
-
- class NumericFormatter
- {
- private:
- void ImpInit();
-
- protected:
- long nFieldValue;
- long nLastValue;
- USHORT nType;
- International aInternational;
- USHORT nDecDigits;
- long nMin;
- long nMax;
- BOOL bStrictFormat;
- Edit* pField;
-
- virtual void ReformatAll();
-
- NumericFormatter();
- NumericFormatter( const ResId & rResId );
-
- public:
- long ChangeMin( long nNewMin );
- long GetMin() const { return nMin; }
- long ChangeMax( long nNewMax );
- long GetMax() const { return nMax; }
-
- BOOL ChangeStrictFormat( BOOL bStrict );
- BOOL GetStrictFormat() const { return bStrictFormat; }
- International ChangeInternational( const International& rInter );
- International GetInternational() const { return aInternational; }
- USHORT ChangeDecimalDigits( USHORT nDigits );
- USHORT GetDecimalDigits() const { return nDecDigits; }
-
- void SetValue( long nNewValue );
- long GetValue() const;
- BOOL IsValueModified() const;
-
- Fraction ConvertToFraction( long nValue );
- long ConvertToLong( const Fraction& rValue );
- long Normalize( long nValue ) const;
- long Denormalize( long nValue ) const;
-
- virtual void Reformat();
- };
-
- class MetricFormatter : public NumericFormatter
- {
- private:
- void ImpInit();
-
- protected:
- FieldUnit eUnit;
- String aCustomUnitText;
- String aCurUnitText;
- Link aCustomConvertLink;
-
- virtual void CustomConvert() = 0;
-
- MetricFormatter();
- MetricFormatter( const ResId & rResId );
-
- public:
- FieldUnit ChangeUnit( FieldUnit eUnit );
- FieldUnit GetUnit() { return eUnit; }
- String ChangeCustomUnitText( const String& rStr );
- String GetCustomUnitText() const { return aCustomUnitText; }
- Link ChangeCustomConvertHdl( const Link& rLink );
- Link GetCustomConvertHdl() const { return aCustomConvertLink; }
-
- String GetCurUnitText() const { return aCurUnitText; }
- void SetValue( long nNewValue, FieldUnit eInUnit = FUNIT_NONE );
- long GetValue( FieldUnit eOutUnit = FUNIT_NONE ) const;
- long ChangeMax( long nNewMax, FieldUnit eInUnit = FUNIT_NONE );
- long GetMax( FieldUnit eOutUnit = FUNIT_NONE ) const;
- long ChangeMin( long nNewMin, FieldUnit eInUnit = FUNIT_NONE );
- long GetMin( FieldUnit eOutUnit = FUNIT_NONE ) const;
-
- void Reformat();
- };
-
- inline Link MetricFormatter::ChangeCustomConvertHdl( const Link& rLink )
- {
- Link aOldLink = aCustomConvertLink;
- aCustomConvertLink = rLink;
- return aOldLink;
- }
-
- class CurrencyFormatter : public NumericFormatter
- {
- private:
- void ImpInit();
-
- protected:
- CurrencyFormatter();
- CurrencyFormatter( const ResId & rResId );
-
- public:
- void SetValue( long nNewValue );
- long GetValue() const;
-
- void Reformat();
- };
-
- class DateFormatter
- {
- private:
- void ImpInit();
-
- protected:
- Date aFieldDate;
- Date aLastDate;
- International aInternational;
- Date aMin;
- Date aMax;
- BOOL bLongFormat;
- BOOL bStrictFormat;
- Edit* pField;
-
- virtual void ReformatAll();
-
- DateFormatter();
- DateFormatter( const ResId & rResId );
-
- public:
- Date ChangeMin( const Date& rNewMin );
- Date GetMin() const { return aMin; }
- Date ChangeMax( const Date& rNewMax );
- Date GetMax() const { return aMax; }
-
- BOOL ChangeLongFormat( BOOL bLong );
- BOOL IsLongFormat() const { return bLongFormat; }
-
- BOOL ChangeStrictFormat( BOOL bStrict );
- BOOL GetStrictFormat() const { return bStrictFormat; }
- International ChangeInternational( const International& rInter );
- International GetInternational() const { return aInternational; }
-
- void SetDate( const Date& rNewDate );
- Date GetDate() const;
- BOOL IsDateModified() const;
-
- virtual void Reformat();
- };
-
- class TimeFormatter
- {
- private:
- void ImpInit();
-
- protected:
- Time aFieldTime;
- Time aLastTime;
- International aInternational;
- Time aMin;
- Time aMax;
- TimeFieldFormat eFormat;
- BOOL bDuration;
- BOOL bStrictFormat;
- Edit* pField;
-
- virtual void ReformatAll();
-
- TimeFormatter();
- TimeFormatter( const ResId & rResId );
-
- public:
- Time ChangeMin( const Time& rNewMin );
- Time GetMin() const { return aMin; }
- Time ChangeMax( const Time& rNewMax );
- Time GetMax() const { return aMax; }
-
- TimeFieldFormat ChangeFormat( TimeFieldFormat eNewFormat );
- TimeFieldFormat GetFormat() const { return eFormat; }
- BOOL ChangeDuration( BOOL bDuration );
- BOOL IsDuration() const { return bDuration; }
-
- BOOL ChangeStrictFormat( BOOL bStrict );
- BOOL GetStrictFormat() const { return bStrictFormat; }
- International ChangeInternational( const International& rInter );
- International GetInternational() const { return aInternational; }
-
- void SetTime( const Time& rNewTime );
- Time GetTime() const;
- BOOL IsTimeModified() const;
-
- virtual void Reformat();
- };
-
- class PatternField : public SpinField, public PatternFormatter
- {
- protected:
- BOOL bReformat;
-
- void KeyInput( const KeyEvent& rKEvt );
- void GetFocus();
- void LoseFocus();
- void Modify();
-
- public:
- PatternField( Window* pParent, WinBits nWinStyle );
- PatternField( Window* pParent, const ResId& rResId );
- };
-
- class NumericField : public SpinField, public NumericFormatter
- {
- protected:
- BOOL bReformat;
- long nSpinSize;
- long nFirst;
- long nLast;
-
- void KeyInput( const KeyEvent& rKEvt );
- void GetFocus();
- void LoseFocus();
- void Modify();
- void Up();
- void Down();
- void First();
- void Last();
-
- public:
- NumericField( Window* pParent, WinBits nWinStyle );
- NumericField( Window* pParent, const ResId& rResId );
-
- long ChangeFirst( long nNewFirst );
- long GetFirst() const { return nFirst; }
- long ChangeLast( long nNewLast );
- long GetLast() const { return nLast; }
-
- long ChangeSpinSize( long nSpinSize );
- long GetSpinSize() const { return nSpinSize; }
- };
-
- inline long NumericField::ChangeFirst( long nNewFirst )
- {
- long nOldFirst = nFirst;
- nFirst = nNewFirst;
- return nOldFirst;
- }
-
- inline long NumericField::ChangeLast( long nNewLast )
- {
- long nOldLast = nLast;
- nLast = nNewLast;
- return nOldLast;
- }
-
- inline long NumericField::ChangeSpinSize( long nNewSize )
- {
- long nOldSize = nSpinSize;
- nSpinSize = nNewSize;
- return nOldSize;
- }
-
- class MetricField : public SpinField, public MetricFormatter
- {
- protected:
- BOOL bReformat;
- long nSpinSize;
- long nFirst;
- long nLast;
-
- void KeyInput( const KeyEvent& rKEvt );
- void GetFocus();
- void LoseFocus();
- void Modify();
- void Up();
- void Down();
- void First();
- void Last();
- void CustomConvert();
-
- public:
- MetricField( Window* pParent, WinBits nWinStyle );
- MetricField( Window* pParent, const ResId& rResId );
-
- long ChangeFirst( long nNewFirst, FieldUnit eInUnit=FUNIT_NONE );
- long GetFirst( FieldUnit eOutUnit=FUNIT_NONE ) const;
- long ChangeLast( long nNewLast, FieldUnit eInUnit=FUNIT_NONE );
- long GetLast( FieldUnit eOutUnit=FUNIT_NONE ) const;
-
- long ChangeSpinSize( long nNewSize );
- long GetSpinSize() const { return nSpinSize; }
- };
-
- inline long MetricField::ChangeSpinSize( long nNewSize )
- {
- long nOldSize = nSpinSize;
- nSpinSize = nNewSize;
- return nOldSize;
- }
-
- class CurrencyField : public SpinField, public CurrencyFormatter
- {
- protected:
- BOOL bReformat;
- long nSpinSize;
- long nFirst;
- long nLast;
-
- void KeyInput( const KeyEvent& rKEvt );
- void GetFocus();
- void LoseFocus();
- void Modify();
- void Up();
- void Down();
- void First();
- void Last();
-
- public:
- CurrencyField( Window* pParent, WinBits nWinStyle );
- CurrencyField( Window* pParent, const ResId& rResId );
-
- long ChangeFirst( long nNewFirst );
- long GetFirst() const { return nFirst; }
- long ChangeLast( long nNewLast );
- long GetLast() const { return nLast; }
-
- long ChangeSpinSize( long nNewSize );
- long GetSpinSize() const { return nSpinSize; }
- };
-
- inline long CurrencyField::ChangeFirst( long nNewFirst )
- {
- long nOldFirst = nFirst;
- nFirst = nNewFirst;
- return nOldFirst;
- }
-
- inline long CurrencyField::ChangeLast( long nNewLast )
- {
- long nOldLast = nLast;
- nLast = nNewLast;
- return nOldLast;
- }
-
- inline long CurrencyField::ChangeSpinSize( long nNewSize )
- {
- long nOldSize = nSpinSize;
- nSpinSize = nNewSize;
- return nOldSize;
- }
-
- class DateField : public SpinField, public DateFormatter
- {
- protected:
- BOOL bReformat;
- Date aFirst;
- Date aLast;
-
- void KeyInput( const KeyEvent& rKEvt );
- void GetFocus();
- void LoseFocus();
- void Modify();
- void Up();
- void Down();
- void First();
- void Last();
-
- public:
- DateField( Window* pParent, WinBits nWinStyle );
- DateField( Window* pParent, const ResId& rResId );
-
- Date ChangeFirst( const Date& rNewFirst );
- Date GetFirst() const { return aFirst; }
- Date ChangeLast( const Date& rNewLast );
- Date GetLast() const { return aLast; }
-
- };
-
- inline Date DateField::ChangeFirst( const Date& rNewFirst )
- {
- Date aOldFirst = aFirst;
- aFirst = rNewFirst;
- return aOldFirst;
- }
-
- inline Date DateField::ChangeLast( const Date& rNewLast )
- {
- Date aOldLast = aLast;
- aLast = rNewLast;
- return aOldLast;
- }
-
- class TimeField : public SpinField, public TimeFormatter
- {
- protected:
- BOOL bReformat;
- Time aFirst;
- Time aLast;
-
- void KeyInput( const KeyEvent& rKEvt );
- void GetFocus();
- void LoseFocus();
- void Modify();
- void Up();
- void Down();
- void First();
- void Last();
-
- public:
- TimeField( Window* pParent, WinBits nWinStyle );
- TimeField( Window* pParent, const ResId& rResId );
-
- Time ChangeFirst( const Time& rNewFirst );
- Time GetFirst() const { return aFirst; }
- Time ChangeLast( const Time& rLast );
- Time GetLast() const { return aLast; }
- };
-
- inline Time TimeField::ChangeFirst( const Time& rNewFirst )
- {
- Time aOldFirst = aFirst;
- aFirst = rNewFirst;
- return aOldFirst;
- }
-
- inline Time TimeField::ChangeLast( const Time& rNewLast )
- {
- Time aOldLast = aLast;
- aLast = rNewLast;
- return aOldLast;
- }
-
- class PatternBox : public ComboBox, public PatternFormatter
- {
- protected:
- BOOL bReformat;
-
- void KeyInput( const KeyEvent& rKEvt );
- void GetFocus();
- void LoseFocus();
- void Modify();
- void ReformatAll();
-
- public:
- PatternBox( Window* pParent, WinBits nWinStyle );
- PatternBox( Window* pParent, const ResId& rResId );
-
- void InsertString( const String& rStr,
- USHORT nPos = COMBOBOX_APPEND );
- void RemoveString( const String& rStr );
- String GetString( USHORT nPos ) const;
- USHORT GetStringPos( const String& rStr ) const;
- };
-
- class NumericBox : public ComboBox, public NumericFormatter
- {
- protected:
- BOOL bReformat;
-
- void KeyInput( const KeyEvent& rKEvt );
- void GetFocus();
- void LoseFocus();
- void Modify();
- void ReformatAll();
-
- public:
- NumericBox( Window* pParent, WinBits nWinStyle );
- NumericBox( Window* pParent, const ResId& rResId );
-
- void InsertValue( long nValue,
- USHORT nPos = COMBOBOX_APPEND );
- void RemoveValue( long nValue );
- long GetValue() const
- { return NumericFormatter::GetValue(); }
- long GetValue( USHORT nPos ) const;
- USHORT GetValuePos( long nPos ) const;
- };
-
- class MetricBox : public ComboBox, public MetricFormatter
- {
- protected:
- BOOL bReformat;
-
- void KeyInput( const KeyEvent& rKEvt );
- void GetFocus();
- void LoseFocus();
- void Modify();
- void CustomConvert();
- void ReformatAll();
-
- public:
- MetricBox( Window* pParent, WinBits nWinStyle );
- MetricBox( Window* pParent, const ResId& rResId );
-
- void InsertValue( long nValue, FieldUnit eInUnit = FUNIT_NONE,
- USHORT nPos = COMBOBOX_APPEND );
- void RemoveValue( long nValue, FieldUnit eInUnit = FUNIT_NONE );
- long GetValue( FieldUnit eOutUnit = FUNIT_NONE ) const
- { return MetricFormatter::GetValue( eOutUnit ); }
- long GetValue( USHORT nPos, FieldUnit eOutUnit = FUNIT_NONE ) const;
- USHORT GetValuePos( long nValue,
- FieldUnit eInUnit = FUNIT_NONE ) const;
- };
-
- class CurrencyBox : public ComboBox, public CurrencyFormatter
- {
- protected:
- BOOL bReformat;
-
- void KeyInput( const KeyEvent& rKEvt );
- void GetFocus();
- void LoseFocus();
- void Modify();
- void ReformatAll();
-
- public:
- CurrencyBox( Window* pParent, WinBits nWinStyle );
- CurrencyBox( Window* pParent, const ResId& rResId );
-
- void InsertValue( long nValue,
- USHORT nPos = COMBOBOX_APPEND );
- void RemoveValue( long nValue );
- long GetValue() const
- { return CurrencyFormatter::GetValue(); }
- long GetValue( USHORT nPos ) const;
- USHORT GetValuePos( long nValue ) const;
- };
-
- class DateBox : public ComboBox, public DateFormatter
- {
- protected:
- BOOL bReformat;
-
- void KeyInput( const KeyEvent& rKEvt );
- void GetFocus();
- void LoseFocus();
- void Modify();
- void ReformatAll();
-
- public:
- DateBox( Window* pParent, WinBits nWinStyle );
- DateBox( Window* pParent, const ResId& rResId );
-
- void InsertDate( const Date& rDate,
- USHORT nPos = COMBOBOX_APPEND );
- void RemoveDate( const Date& rDate );
- Date GetDate( USHORT nPos ) const;
- USHORT GetDatePos( const Date& rDate ) const;
- };
-
- class TimeBox : public ComboBox, public TimeFormatter
- {
- protected:
- BOOL bReformat;
-
- void KeyInput( const KeyEvent& rKEvt );
- void GetFocus();
- void LoseFocus();
- void Modify();
- void ReformatAll();
-
- public:
- TimeBox( Window* pParent, WinBits nWinStyle );
- TimeBox( Window* pParent, const ResId& rResId );
-
- void InsertTime( const Time& rTime,
- USHORT nPos = COMBOBOX_APPEND );
- void RemoveTime( const Time& rTime );
- Time GetTime( USHORT nPos ) const;
- USHORT GetTimePos( const Time& rTime ) const;
- };
-
- #endif
-
- #ifndef _MOREBTN_HXX
- #define _MOREBTN_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _MAPMOD_HXX
- #endif
- #ifndef _BUTTON_HXX
- #endif
-
- class MoreWindowList;
-
- class MoreButton : public PushButton
- {
- private:
- BOOL bState;
- USHORT nDelta;
- MapUnit eUnit;
- MoreWindowList* pList;
-
- protected:
- void Click();
-
- public:
- MoreButton( Window* pParent, WinBits nWinStyle = 0 );
- MoreButton( Window* pParent, const ResId& rResId );
- ~MoreButton();
-
- void AddWindow( Window* pWindow );
- void RemoveWindow( Window* pWindow );
-
- USHORT ChangeDelta( USHORT nNewDelta );
- USHORT GetDelta() const { return nDelta; }
-
- MapUnit ChangeMapUnit( MapUnit eNewUnit = MAP_PIXEL );
- MapUnit GetMapUnit() const { return eUnit; }
-
- BOOL ChangeState( BOOL bNewState = TRUE );
- BOOL GetState() const { return bState; }
-
- void SetText( const String& rNewText );
- String GetText() const;
- };
-
- #endif
-
- #ifndef _TOOLBOX_HXX
- #define _TOOLBOX_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _CTRL_HXX
- #endif
- #ifndef _VIRDEV_HXX
- #endif
-
- class ToolItemList;
- class ToolFormatList;
-
- #define TOOLBOX_APPEND ((USHORT)0xFFFF)
- #define TOOLBOX_ITEM_NOTFOUND ((USHORT)0xFFFF)
-
- class ToolBox : public Control
- {
- private:
- ToolItemList* pItemList;
- ToolFormatList* pFormatList;
- VirtualDevice aBtn;
- ButtonType eButtonType;
- ToolBoxAlign eAlign;
- USHORT nLines;
- Size aBitmapSize;
- Size aTextSize;
- USHORT nCurItemId;
- USHORT nCurPos;
- Link aClickHdl;
- Link aDoubleClickHdl;
- Link aActivateHdl;
- Link aDeactivateHdl;
- Link aHighlightHdl;
- Link aSelectHdl;
- Pen a3DLightPen;
- Pen a3DShadowPen;
- Pen aBlackPen;
- Brush aBkBrush;
- short nDX;
- short nDY;
- short nDIX;
- short nDIY;
- short nDSX;
- short nDSY;
- USHORT nTop;
- USHORT nCurLine;
- USHORT nBreak;
- USHORT nLastItemPos;
- USHORT nLastItemLeft;
- USHORT nLastItemTop;
- USHORT nLastCurLine;
- Rectangle aUpperRect;
- Rectangle aLowerRect;
- WinBits nWinBits;
- BOOL bDrag;
- BOOL bUpper;
- BOOL bLower;
- BOOL bIn;
- BOOL bLastItemPos;
- BOOL bUpdate;
- BOOL bCalc;
- BOOL bFormat;
-
- void ImpCalcItemSize();
- void ImpFormat();
- void ImpDrawSpin( BOOL bUpperIn, BOOL bLowerIn );
- BOOL ImpDrawItem( USHORT nPos, BOOL bHighlight = FALSE );
- Rectangle ImpGetItemRectPos( USHORT nPos ) const;
-
- protected:
- virtual void Click();
- virtual void DoubleClick();
- virtual void Activate();
- virtual void Deactivate();
- virtual void Highlight();
- virtual void Select();
- virtual void RequestHelp( const HelpEvent& rHEvt );
-
- virtual void MouseButtonDown( const MouseEvent& rMEvt );
- virtual void MouseButtonUp( const MouseEvent& rMEvt );
- virtual void MouseMove( const MouseEvent& rMEvt );
- virtual void Paint( const Rectangle& rRect );
- virtual void Resize();
-
- public:
- ToolBox( Window* pParent, WinBits nWinBits = 0 );
- ToolBox( Window* pParent, const ResId& rResId );
- ~ToolBox();
-
- BOOL InsertItem( const ResId& rResId,
- USHORT nPos = TOOLBOX_APPEND );
- BOOL InsertItem( USHORT nItemId, const Bitmap& rBitmap,
- USHORT nPos = TOOLBOX_APPEND );
- BOOL InsertItem( USHORT nItemId, const Bitmap& rBitmap,
- const Bitmap& rDisableBitmap,
- USHORT nPos = TOOLBOX_APPEND );
- BOOL InsertItem( USHORT nItemId, const Bitmap& rBitmap,
- const String& rText,
- USHORT nPos = TOOLBOX_APPEND );
- BOOL InsertItem( USHORT nItemId, const Bitmap& rBitmap,
- const Bitmap& rDisableBitmap,
- const String& rText,
- USHORT nPos = TOOLBOX_APPEND );
- BOOL InsertItem( USHORT nItemId, const String& rText,
- USHORT nPos = TOOLBOX_APPEND );
- void InsertSpace( USHORT nPos = TOOLBOX_APPEND );
- void InsertSeparator( USHORT nPos = TOOLBOX_APPEND );
- void InsertBreak( USHORT nPos = TOOLBOX_APPEND );
- void RemoveItem( USHORT nPos );
-
- ButtonType ChangeButtonType( ButtonType eNewType = BUTTON_SYMBOL );
- ButtonType GetButtonType() const { return eButtonType; }
-
- ToolBoxAlign ChangeAlign( ToolBoxAlign eNewAlign = BOXALIGN_TOP );
- ToolBoxAlign GetAlign() const { return eAlign; }
-
- USHORT ChangeLineCount( USHORT nNewLines );
- USHORT GetLineCount() const { return nLines; }
-
- void CopyItems( const ToolBox& rToolBox );
- void Clear();
-
- USHORT GetItemCount() const;
- USHORT GetItemPos( USHORT nItemId ) const;
- USHORT GetItemId( USHORT nPos ) const;
- USHORT GetItemId( const Point& rPos ) const;
- ToolBoxItemType GetItemType( USHORT nPos ) const;
- Rectangle GetItemRect( USHORT nItemId ) const;
- USHORT GetCurItemId() const { return nCurItemId; }
-
- void CheckItem( USHORT nItemId, BOOL bCheck = TRUE );
- BOOL IsItemChecked( USHORT nItemId ) const;
-
- void EnableItem( USHORT nItemId, BOOL bEnable = TRUE );
- BOOL IsItemEnabled( USHORT nItemId ) const;
-
- void SetItemBitmap( USHORT nItemId, const Bitmap& rBitmap );
- Bitmap GetItemBitmap( USHORT nItemId ) const;
- void SetItemDisableBitmap( USHORT nItemId,
- const Bitmap& rBitmap );
- Bitmap GetItemDisableBitmap( USHORT nItemId ) const;
- void SetItemText( USHORT nItemId, const String& rText );
- String GetItemText( USHORT nItemId ) const;
-
- void SetHelpText( USHORT nItemId, const String& rText );
- String GetHelpText( USHORT nItemId ) const;
-
- ULONG ChangeHelpId( USHORT nItemId, ULONG nHelpId );
- ULONG GetHelpId( USHORT nItemId ) const;
-
- void Show();
- void Enable();
- void Disable();
-
- void SetHelpText( const String& rText )
- { Control::SetHelpText( rText ); }
- String GetHelpText() const
- { return Control::GetHelpText(); }
-
- ULONG ChangeHelpId( ULONG nHelpId )
- { return Control::ChangeHelpId( nHelpId ); }
- ULONG GetHelpId() const
- { return Control::GetHelpId(); }
-
- Size CalcWindowSizePixel() const;
-
- void EndSelection();
-
- Link ChangeClickHdl( const Link& rLink );
- Link GetClickHdl() const { return aClickHdl; }
- Link ChangeDoubleClickHdl( const Link& rLink );
- Link GetDoubleClickHdl() const { return aDoubleClickHdl; }
- Link ChangeActivateHdl( const Link& rLink );
- Link GetActivateHdl() const { return aActivateHdl; }
- Link ChangeDeactivateHdl( const Link& rLink );
- Link GetDeactivateHdl() const { return aDeactivateHdl; }
- Link ChangeHighlightHdl( const Link& rLink );
- Link GetHighlightHdl() const { return aHighlightHdl; }
- Link ChangeSelectHdl( const Link& rLink );
- Link GetSelectHdl() const { return aSelectHdl; }
- };
-
- inline Link ToolBox::ChangeClickHdl( const Link& rLink )
- {
- Link aOldLink = aClickHdl;
- aClickHdl = rLink;
- return aOldLink;
- }
-
- inline Link ToolBox::ChangeDoubleClickHdl( const Link& rLink )
- {
- Link aOldLink = aDoubleClickHdl;
- aDoubleClickHdl = rLink;
- return aOldLink;
- }
-
- inline Link ToolBox::ChangeActivateHdl( const Link& rLink )
- {
- Link aOldLink = aActivateHdl;
- aActivateHdl = rLink;
- return aOldLink;
- }
-
- inline Link ToolBox::ChangeDeactivateHdl( const Link& rLink )
- {
- Link aOldLink = aDeactivateHdl;
- aDeactivateHdl = rLink;
- return aOldLink;
- }
-
- inline Link ToolBox::ChangeHighlightHdl( const Link& rLink )
- {
- Link aOldLink = aHighlightHdl;
- aHighlightHdl = rLink;
- return aOldLink;
- }
-
- inline Link ToolBox::ChangeSelectHdl( const Link& rLink )
- {
- Link aOldLink = aSelectHdl;
- aSelectHdl = rLink;
- return aOldLink;
- }
-
- #endif
-
- #ifndef _STATUS_HXX
- #define _STATUS_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _WINDOW_HXX
- #endif
-
- class StatusItemList;
-
- enum StatusItemAlign { STATUSITEM_ALIGN_LEFT, STATUSITEM_ALIGN_CENTER,
- STATUSITEM_ALIGN_RIGHT };
-
- #define STATUSBAR_APPEND ((USHORT)0xFFFF)
- #define STATUSBAR_ITEM_NOTFOUND ((USHORT)0xFFFF)
- #define STATUSBAR_OFFSET ((USHORT)5)
-
- class StatusBar : public Window
- {
- private:
- Link aClickHdl;
- Link aDoubleClickHdl;
- StatusItemList* pItemList;
- Pen a3DFacePen;
- Pen a3DLightPen;
- Pen a3DShadowPen;
- Pen aBlackPen;
- Pen aNullPen;
- Brush a3DFaceBrush;
- WinBits nWinBits;
- StatusBarAlign eAlign;
- USHORT nDX;
- USHORT nDY;
- USHORT nItemsWidth;
- USHORT nCurItemId;
- BOOL bVisibleItems;
- BOOL bUpdate;
-
- void ImpDrawItem( USHORT nPos,
- BOOL bOnlyText = FALSE, USHORT nOldWidth = 0 );
- Rectangle ImpGetItemRectPos( USHORT nPos ) const;
-
- protected:
- virtual void Click();
- virtual void DoubleClick();
-
- virtual void MouseButtonDown( const MouseEvent& rMEvt );
- virtual void Paint( const Rectangle& rRect );
- virtual void Resize();
-
- public:
- StatusBar( Window* pParent, WinBits nWinBits = 0 );
- StatusBar( Window* pParent, const ResId& rResId );
- ~StatusBar();
-
- BOOL InsertItem( USHORT nItemId, USHORT nWidth,
- StatusItemAlign eAlign = STATUSITEM_ALIGN_CENTER,
- USHORT nOffset = STATUSBAR_OFFSET,
- USHORT nPos = STATUSBAR_APPEND );
- void RemoveItem( USHORT nItemId );
-
- StatusBarAlign ChangeAlign( StatusBarAlign eNewAlign = STATUSBAR_ALIGN_RIGHT );
- StatusBarAlign GetAlign() const { return eAlign; }
-
- void ShowItems();
- void HideItems();
- BOOL AreItemsVisible() const { return bVisibleItems; }
-
- void CopyItems( const StatusBar& rStatusBar );
- void Clear();
-
- USHORT GetItemCount() const;
- USHORT GetItemId( USHORT nPos ) const;
- USHORT GetItemPos( USHORT nItemId ) const;
- Rectangle GetItemRect( USHORT nItemId ) const;
- USHORT GetCurItemId() const { return nCurItemId; }
-
- void SetItemText( USHORT nItemId, const String& rText );
- String GetItemText( USHORT nItemId ) const;
-
- void SetText( const String& rText );
-
- Link ChangeClickHdl( const Link& rLink );
- Link GetClickHdl() const { return aClickHdl; }
- Link ChangeDoubleClickHdl( const Link& rLink );
- Link GetDoubleClickHdl() const { return aDoubleClickHdl; }
- };
-
- inline Link StatusBar::ChangeClickHdl( const Link& rLink )
- {
- Link aOldLink = aClickHdl;
- aClickHdl = rLink;
- return aOldLink;
- }
-
- inline Link StatusBar::ChangeDoubleClickHdl( const Link& rLink )
- {
- Link aOldLink = aDoubleClickHdl;
- aDoubleClickHdl = rLink;
- return aOldLink;
- }
-
- #endif
- #endif
- #ifndef SV_NODIALOG
-
- #ifndef _DIALOG_HXX
- #define _DIALOG_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _SYSWIN_HXX
- #endif
- #ifndef _DIALOG_H
- #endif
-
- class Dialog : public SystemWindow
- {
- protected:
- ImpDlg aImpDlg;
-
- Dialog( Window* pParent, WinBits nWinStyle );
- Dialog( Window* pParent, const ResId& rResId );
- Dialog( RESOURCE_TYPE nTyp, Window* pParent, WinBits nWinStyle );
-
- public:
- ~Dialog();
- };
-
- class ModelessDialog : public Dialog
- {
- public:
- ModelessDialog( Window* pParent,
- WinBits nWinStyle = WB_STDMODELESS );
- ModelessDialog( Window* pParent, const ResId& rResId );
- ~ModelessDialog();
-
- BOOL IsPinIn() const;
- };
-
- class ModalDialog : public Dialog
- {
- private:
- void Show();
- void Hide();
-
- protected:
- ImpModalDlg aImpModalDlg;
-
- ModalDialog( RESOURCE_TYPE nTyp, Window* pParent,
- WinBits nStyle );
-
- BOOL Close();
-
- public:
- ModalDialog( Window* pParent, WinBits nWinStyle = WB_STDMODAL );
- ModalDialog( Window* pParent, const ResId& rResId );
- ~ModalDialog();
-
- short Execute();
- BOOL IsInExecute() const;
-
- void EndDialog( short nResult = 0 );
- };
-
- #endif
-
- #ifndef _MSGBOX_HXX
- #define _MSGBOX_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _DIALOG_HXX
- #endif
- #ifndef _MSGBOX_H
- #endif
-
- #define RET_OK TRUE
- #define RET_CANCEL FALSE
- #define RET_YES 2
- #define RET_NO 3
- #define RET_RETRY 4
-
- class MessBox : public ModalDialog
- {
- protected:
- ImpMessBox aImpMess;
- MessBox( Window* pParent, WinBits nWinStyle,
- const String& rTitle, const String& rMessage,
- RESOURCE_TYPE nTyp );
-
- #ifdef MAC
- void Paint( const Rectangle& rRect );
- #endif
-
- public:
- MessBox( Window* pParent, WinBits nWinStyle,
- const String& rTitle, const String& rMessage );
- MessBox( Window* pParent, const ResId& rResId );
- ~MessBox();
-
- void SetMessText( const String& rText );
- String GetMessText() const;
-
- void SetButtonText( USHORT nButtonType, const String& rText );
-
- short Execute();
- };
-
- class InfoBox : public MessBox
- {
- public:
- InfoBox( Window* pParent, const String& rMessage );
- InfoBox( Window* pParent, const ResId & rResId );
- };
-
- class WarningBox : public MessBox
- {
- public:
- WarningBox( Window* pParent, WinBits nWinStyle,
- const String& rMessage );
- WarningBox( Window* pParent, const ResId& rResId );
- };
-
- class ErrorBox : public MessBox
- {
- public:
- ErrorBox( Window* pParent, WinBits nWinStyle,
- const String& rMessage );
- ErrorBox( Window* pParent, const ResId& rResId );
- };
-
- class QueryBox : public MessBox
- {
- public:
- QueryBox( Window* pParent, WinBits nWinStyle,
- const String& rMessage );
- QueryBox( Window* pParent, const ResId& rResId );
- };
-
- #endif
-
- #ifndef _SYSDLG_HXX
- #define _SYSDLG_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _DIALOG_HXX
- #endif
- #ifndef _SYSDLG_H
- #endif
-
- class SystemDialog : public ModalDialog
- {
- protected:
- friend class ImpSysDlg;
- ImpSysDlg aImpSysDlg;
-
- SystemDialog( RESOURCE_TYPE nTyp, Window* pParent,
- WinBits nWinStyle );
- SystemDialog( Window* pParent, const ResId& rResId );
-
- public:
- ~SystemDialog();
- };
-
- #endif
-
- #ifndef _FILDLG_HXX
- #define _FILDLG_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _SYSDLG_HXX
- #endif
- #ifndef _FILDLG_H
- #endif
-
- class FileDialog : public SystemDialog
- {
- private:
- friend class ImpFileDlg;
- ImpFileDlg aImpFileDlg;
- String aDfltExt;
- Link aOKHdlLink;
- Link aFileHdlLink;
- Link aFilterHdlLink;
-
- protected:
- virtual long OK();
- virtual void FileSelect();
- virtual void FilterSelect();
-
- public:
- FileDialog( Window* pParent, WinBits nWinStyle );
- FileDialog( Window* pParent, const ResId & rResId );
- ~FileDialog();
-
- void SetPath( const String& rNewPath );
- String GetPath() const;
-
- void SetDefaultExt( const String& rExt ) { aDfltExt = rExt; }
- const String& GetDefaultExt() const { return aDfltExt; }
-
- void AddFilter( const String& rFilter, const String& rType );
- void RemoveFilter( const String& rFilter );
- void RemoveAllFilter();
- void SetCurFilter( const String& rFilter );
- String GetCurFilter() const;
-
- Link ChangeOKHdl( const Link& rLink );
- Link GetOKHdl() const { return aOKHdlLink; }
- Link ChangeFileSelectHdl( const Link& rLink );
- Link GetFileSelectHdl() const { return aFileHdlLink; }
- Link ChangeFilterSelectHdl( const Link& rLink );
- Link GetFilterSelectHdl() const { return aFilterHdlLink; }
-
- short Execute();
- };
-
- inline Link FileDialog::ChangeOKHdl( const Link& rLink )
- {
- Link aOldLink = aOKHdlLink;
- aOKHdlLink = rLink;
- return aOldLink;
- }
-
- inline Link FileDialog::ChangeFileSelectHdl( const Link& rLink )
- {
- Link aOldLink = aFileHdlLink;
- aFileHdlLink = rLink;
- return aOldLink;
- }
-
- inline Link FileDialog::ChangeFilterSelectHdl( const Link& rLink )
- {
- Link aOldLink = aFilterHdlLink;
- aFilterHdlLink = rLink;
- return aOldLink;
- }
-
- #endif
-
- #ifndef _PRNDLG_HXX
- #define _PRNDLG_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _SYSDLG_HXX
- #endif
- #ifndef _PRNDLG_H
- #endif
-
- class Printer;
-
- class PrinterSetupDialog : public SystemDialog
- {
- private:
- friend class ImpPrnSetupDlg;
- ImpPrnSetupDlg aImpPrnSetupDlg;
- Printer* pPrinter;
-
- public:
- PrinterSetupDialog( Window* pParent, WinBits nWinStyle );
- PrinterSetupDialog( Window* pParent, const ResId& rResId );
- ~PrinterSetupDialog();
-
- Printer* ChangePrinter( Printer* pPrinter );
- Printer* GetPrinter() const { return pPrinter; }
-
- short Execute();
- };
-
- inline Printer* PrinterSetupDialog::ChangePrinter( Printer* pNewPrinter )
- {
- Printer* pOldPrn = pPrinter;
- pPrinter = pNewPrinter;
- return pOldPrn;
- }
-
- class PrintDialog : public SystemDialog
- {
- private:
- friend class ImpPrintDlg;
- ImpPrintDlg aImpPrintDlg;
- PrinterSetupDialog* pSetupDlg;
- Printer* pPrinter;
- USHORT nCopyCount;
- USHORT nFirstPage;
- USHORT nLastPage;
- BOOL bPageFields;
- BOOL bSelection;
- BOOL bSelectionCheck;
- BOOL bCollate;
- BOOL bCollateCheck;
-
- public:
- PrintDialog( Window* pParent, WinBits nWinStyle );
- PrintDialog( Window* pParent, const ResId& rResId );
- ~PrintDialog();
-
- Printer* ChangePrinter( Printer* pPrinter );
- Printer* GetPrinter() const
- { return pPrinter; }
-
- PrinterSetupDialog* ChangeSetupDialog( PrinterSetupDialog* pSetupDlg );
- PrinterSetupDialog* GetSetupDialog() const
- { return pSetupDlg; }
-
- USHORT ChangeCopyCount( USHORT nCopies = 1 );
- USHORT GetCopyCount() const
- { return nCopyCount; }
-
- USHORT ChangeFirstPage( USHORT nPage = 1 );
- USHORT GetFirstPage() const
- { return nFirstPage; }
- USHORT ChangeLastPage( USHORT nPage = 1 );
- USHORT GetLastPage() const
- { return nLastPage; }
-
- void EnablePageFields( BOOL bEnable = TRUE )
- { bPageFields = bEnable; }
- BOOL IsPageFieldsEnabled() const
- { return bPageFields; }
-
- void EnableSelection( BOOL bEnable = TRUE )
- { bSelection = bEnable; }
- BOOL IsSelectionEnabled() const
- { return bSelection; }
- void CheckSelection( BOOL bCheck = TRUE )
- { bSelectionCheck = bCheck; }
- BOOL IsSelectionChecked() const
- { return bSelectionCheck; }
-
- void EnableCollate( BOOL bEnable = TRUE )
- { bCollate = bEnable; }
- BOOL IsCollateEnabled() const
- { return bCollate; }
- void CheckCollate( BOOL bCheck = TRUE )
- { bCollateCheck = bCheck; }
- BOOL IsCollateChecked() const
- { return bCollateCheck; }
-
- short Execute();
- };
-
- inline Printer* PrintDialog::ChangePrinter( Printer* pPrn )
- {
- Printer* pOldPrn = pPrinter;
- pPrinter = pPrn;
- return pOldPrn;
- }
-
- inline PrinterSetupDialog* PrintDialog::ChangeSetupDialog( PrinterSetupDialog* pDlg )
- {
- PrinterSetupDialog* pOldDlg = pSetupDlg;
- pSetupDlg = pDlg;
- return pOldDlg;
- }
-
- inline USHORT PrintDialog::ChangeCopyCount( USHORT nCopies )
- {
- USHORT nOldCount = nCopyCount;
- nCopyCount = nCopies;
- return nOldCount;
- }
-
- inline USHORT PrintDialog::ChangeFirstPage( USHORT nPage )
- {
- USHORT nOldPage = nFirstPage;
- nFirstPage = nPage;
- return nOldPage;
- }
-
- inline USHORT PrintDialog::ChangeLastPage( USHORT nPage )
- {
- USHORT nOldPage = nLastPage;
- nLastPage = nPage;
- return nOldPage;
- }
-
- #endif
-
- #ifndef _COLDLG_HXX
- #define _COLDLG_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _COLOR_HXX
- #endif
- #ifndef _SYSDLG_HXX
- #endif
- #ifndef _COLDLG_H
- #endif
-
- class ColorDialog : public SystemDialog
- {
- private:
- friend class ImpColorDlg;
- ImpColorDlg aImpColorDlg;
- Color aColor;
-
- public:
- ColorDialog( Window* pParent, WinBits nWinStyle );
- ColorDialog( Window* pParent, const ResId& rResId );
- ~ColorDialog();
-
- Color ChangeColor( const Color& rColor );
- Color GetColor() const { return aColor; }
-
- short Execute();
- };
-
- #endif
-
- #ifndef _FONTDLG_HXX
- #define _FONTDLG_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _GDIOBJ_HXX
- #endif
- #ifndef _SYSDLG_HXX
- #endif
- #ifndef _FONTDLG_H
- #endif
-
- class Printer;
-
- class FontDialog : public SystemDialog
- {
- private:
- friend class ImpFontDlg;
- friend class OWFontDialog;
- ImpFontDlg aImpFontDlg;
- Font aFont;
- Printer* pPrinter;
- BOOL bFixedFontsOnly;
-
- public:
- FontDialog( Window* pParent, WinBits nWinStyle );
- FontDialog( Window* pParent, const ResId& rResId );
- ~FontDialog();
-
- Font ChangeFont( const Font& rFont );
- Font GetFont() const { return aFont; }
-
- Printer* ChangePrinter( Printer* pNewPrinter );
- Printer* GetPrinter() const { return pPrinter; }
-
- BOOL ChangeFixedFontsOnly( BOOL bFixedOnly = TRUE );
- BOOL GetFixedFontsOnly() const { return bFixedFontsOnly; }
-
- short Execute();
- };
-
- #endif
- #endif
- #endif
- #ifndef SV_NOMISC
-
- #ifndef _MENU_HXX
- #define _MENU_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _RESID_HXX
- #endif
- #ifndef _RC_HXX
- #endif
- #ifndef _MENU_H
- #endif
-
- class KeyCode;
- class PopupMenu;
- class Bitmap;
- class HelpEvent;
-
- #define MENU_APPEND ((USHORT)0xFFFF)
- #define MENU_ITEM_NOTFOUND ((USHORT)0xFFFF)
-
- enum MenuItemType { MENUITEM_DONTKNOW, MENUITEM_STRING, MENUITEM_BITMAP,
- MENUITEM_SEPARATOR };
-
- class Menu : public Resource
- {
- protected:
- ImpMenu aImpMenu;
-
- Menu();
- Menu( const ResId& );
-
- virtual void Activate();
- virtual void Deactivate();
- virtual void Highlight();
- virtual void Select();
- virtual void RequestHelp( const HelpEvent& rHEvt );
-
- public:
- virtual ~Menu();
-
- BOOL InsertItem( const ResId& rResId, USHORT nPos = MENU_APPEND );
- BOOL InsertItem( USHORT nItemId, const String& rStr,
- USHORT nPos = MENU_APPEND,
- MenuItemBits nItemStyle = 0 );
- BOOL InsertItem( USHORT nItemId, const Bitmap& rBitmap,
- USHORT nPos = MENU_APPEND,
- MenuItemBits nItemStyle = 0 );
- void InsertSeparator( USHORT nPos = MENU_APPEND );
- void RemoveItem( USHORT nPos );
- void Clear();
-
- USHORT GetItemCount() const;
- USHORT GetItemId( USHORT nPos ) const;
- USHORT GetItemPos( USHORT nItemId ) const;
- MenuItemType GetItemType( USHORT nPos ) const;
- USHORT GetCurItemId() const;
-
- PopupMenu* ChangePopupMenu( USHORT nItemId, PopupMenu* pMenu );
- PopupMenu* GetPopupMenu( USHORT nItemId ) const;
-
- KeyCode ChangeAccelKey( USHORT nItemId, const KeyCode& rKeyCode );
- KeyCode GetAccelKey( USHORT nItemId ) const;
-
- void CheckItem( USHORT nItemId, BOOL bCheck = TRUE );
- BOOL IsItemChecked( USHORT nItemId ) const;
-
- void EnableItem( USHORT nItemId, BOOL bEnable = TRUE );
- BOOL IsItemEnabled( USHORT nItemId ) const;
-
- void SetItemText( USHORT nItemId, const String& rStr );
- String GetItemText( USHORT nItemId ) const;
-
- void SetItemBitmap( USHORT nItemId, const Bitmap& rBitmap );
- Bitmap GetItemBitmap( USHORT nItemId ) const;
-
- void SetHelpText( USHORT nItemId, const String& rString );
- String GetHelpText( USHORT nItemId ) const;
-
- ULONG ChangeHelpId( USHORT nItemId, ULONG nHelpId );
- ULONG GetHelpId( USHORT nItemId ) const;
-
- void PushActivateHdl( const Link& rLink );
- Link PopActivateHdl();
- void PushDeactivateHdl( const Link& rLink );
- Link PopDeactivateHdl();
- void PushHighlightHdl( const Link& rLink );
- Link PopHighlightHdl();
- void PushSelectHdl( const Link& rLink );
- Link PopSelectHdl();
-
- Menu& operator =( const Menu& rMenu );
- };
-
- class MenuBar : public Menu
- {
- public:
- MenuBar();
- MenuBar( const MenuBar& rMenu );
- MenuBar( const ResId& rResId );
-
- MenuBar& operator =( const MenuBar& rMenu )
- { Menu::operator =( rMenu ); return *this; }
- };
-
- class PopupMenu : public Menu
- {
- public:
- PopupMenu();
- PopupMenu( const PopupMenu& rMenu );
- PopupMenu( const ResId& rResId );
-
- void SetText( const String& rTitle );
- String GetText() const;
-
- USHORT Execute( const Point& rPopupPos );
-
- PopupMenu& operator =( const PopupMenu& rMenu )
- { Menu::operator =( rMenu ); return *this; }
- };
-
- #endif
-
- #ifndef _GDIMTF_HXX
- #define _GDIMTF_HXX
-
- #ifndef _SV_H
- #endif
-
- #ifndef _MAPMOD_HXX
- #endif
- #ifndef _PAL_HXX
- #endif
-
- class OutputDevice;
- class istream;
- class ostream;
- class ImpSysMetaFile;
-
- class GDIMetaFile : public MetaFile
- {
- private:
- GDIMetaFile* pPrev;
- GDIMetaFile* pNext;
- Size aPrefSize;
- MapMode aPrefMapMode;
- Palette aPrefPalette;
- ImpSysMetaFile* pSysMetaFile;
-
- protected:
- void AddGDIAction( MetaAction* pAction );
- void Linker( void* pObject, BOOL bLink );
-
- public:
- GDIMetaFile();
- GDIMetaFile( const GDIMetaFile& rMtf );
- ~GDIMetaFile();
-
- void Clear();
-
- void Record( OutputDevice* pOutDev )
- { MetaFile::Record( (void*)pOutDev ); }
- void Play( OutputDevice* pOutDev, ULONG nPos = METAFILE_END );
- void Play( GDIMetaFile& rMtf, ULONG nPos = METAFILE_END )
- { MetaFile::Play( rMtf, nPos ); }
- void Play( OutputDevice* pOutDev,
- const Point& rPos, const Size& rSize,
- ULONG nPos = METAFILE_END );
-
- Size ChangePrefSize( const Size& rSize );
- const Size& GetPrefSize() const { return aPrefSize; }
- MapMode ChangePrefMapMode( const MapMode& eMapMode );
- const MapMode& GetPrefMapMode() const { return aPrefMapMode; }
- Palette ChangePrefPalette( const Palette& rPalette );
- const Palette& GetPrefPalette() const { return aPrefPalette; }
-
- GDIMetaFile& operator=( const GDIMetaFile& rMtf );
-
- BOOL SaveStatus();
-
- friend istream& operator>>( istream& rIStream, GDIMetaFile& rGDIMetaFile );
- friend ostream& operator<<( ostream& rOStream, const GDIMetaFile& rGDIMetaFile );
- };
-
- #endif
-
- #ifndef _POLY_HXX
- #define _POLY_HXX
-
- #ifndef _SV_H
- #endif
-
- class ImpPolygon;
- class ImpPolyPolygon;
-
- class Polygon
- {
- protected:
-
- ImpPolygon* pImpPolygon;
-
- public:
- Polygon( USHORT nSize = 16 );
- Polygon( USHORT nPoints, Point aPtAry[] );
- Polygon( const Rectangle& rRect );
- Polygon( const Polygon& rPoly );
- ~Polygon();
-
- Point ChangePoint( const Point& rPt, USHORT nPos );
- Point GetPoint( USHORT nPos ) const;
-
- USHORT ChangeSize( USHORT nNewSize );
- USHORT GetSize() const;
- void Clear();
-
- Point operator[]( USHORT nPos ) const;
- Point& operator[]( USHORT nPos );
- Polygon& operator=( const Polygon& rPoly );
- BOOL operator==( const Polygon& rPoly ) const;
- BOOL operator!=( const Polygon& aPoly ) const;
- };
-
- #define POLYPOLY_APPEND 0xFFFF
-
- class PolyPolygon
- {
- protected:
- ImpPolyPolygon* pImpPolyPolygon;
-
- public:
-
- PolyPolygon( USHORT nInitSize = 16, USHORT nResize = 16 );
- PolyPolygon( const Polygon& rPoly );
- PolyPolygon( USHORT nPoly, USHORT nPointCountAry[], Point aPtAry[] );
- PolyPolygon( const PolyPolygon& rPolyPoly );
- ~PolyPolygon();
-
- void Insert( const Polygon& rPoly, USHORT nPos = POLYPOLY_APPEND );
- Polygon Remove( USHORT nPos );
- Polygon Replace( const Polygon& rPoly, USHORT nPos );
- Polygon GetObject( USHORT nPos ) const;
-
- void Clear();
- USHORT Count() const;
-
- PolyPolygon& operator=( const PolyPolygon& rPolyPoly );
- BOOL operator==( const PolyPolygon& rPolyPoly ) const;
- BOOL operator!=( const PolyPolygon& rPolyPoly ) const;
- };
-
- #endif
-
- #ifndef _CONFIG_HXX
- #define _CONFIG_HXX
-
- #ifndef _SV_H
- #endif
-
- class ConfigData;
-
- class Config
- {
- protected:
- ConfigData* pData;
-
- public:
- Config();
- Config( const String& rFileName );
- Config( const Config& rConfig );
- ~Config();
-
- String GetPathName() const;
-
- void SetGroup( const String& rGroup );
- String GetGroup() const;
- void DeleteGroup( const String& rGroup );
-
- String ReadKey( const String& rKey ) const;
- String ReadKey( const String& rKey, const String& rDefault ) const;
- void WriteKey( const String& rKey, const String& rValue );
- void DeleteKey( const String& rKey );
- USHORT GetKeyCount() const;
- String GetKeyName( USHORT nKey ) const;
- String ReadKey( USHORT nKey ) const;
-
- Config& operator = ( const Config& rConfig );
- BOOL operator ==( const Config& rConfig ) const;
- BOOL operator !=( const Config& rConfig ) const;
- };
-
- #endif
-
- #ifndef _CURSOR_HXX
- #define _CURSOR_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _CURSOR_H
- #endif
-
- class Cursor
- {
- protected:
- short nSlant;
- Size aSize;
- Point aPos;
- BOOL bVisible;
- ImpCursor aImpCursor;
-
- public:
- Cursor();
- Cursor( const Cursor& rCursor );
- ~Cursor();
-
- void Show();
- void Hide();
- BOOL IsVisible() const { return bVisible; }
-
- Point ChangePos( const Point& rNewPos );
- Point GetPos() const { return aPos; }
-
- Size ChangeSize( const Size& rNewSize );
- Size GetSize() const { return aSize; }
-
- short ChangeSlant( short nSlant = 0 );
- short GetSlant() const { return nSlant; }
-
- Cursor& operator=( const Cursor& rCursor );
-
- BOOL operator==( const Cursor& rCursor ) const;
- BOOL operator!=( const Cursor& rCursor ) const;
- };
-
- #endif
-
- #ifndef _CLIP_HXX
- #define _CLIP_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _BITMAP_HXX
- #endif
-
- class GDIMetaFile;
-
- #define FORMAT_STRING 1
- #define FORMAT_BITMAP 2
- #define FORMAT_GDIMETAFILE 3
- #define FORMAT_PRIVATE 4
- #define FORMAT_FILE 5
-
- class ImpExchange;
-
- class Exchange
- {
- protected:
- Link aRequestHdl;
-
- virtual void Request();
-
- Exchange();
- ~Exchange();
- public:
-
- static ULONG RegisterFormatName( const String& rName );
- static String GetFormatName( ULONG nFormat );
-
- Link ChangeRequestHdl( const Link& rLink );
- Link GetRequestHdl() const { return aRequestHdl; }
- };
-
- inline Link Exchange::ChangeRequestHdl( const Link& rLink )
- {
- Link aOldLink = aRequestHdl;
- aRequestHdl = rLink;
- return aOldLink;
- }
-
- class Clipboard : public Exchange
- {
- protected:
- Link aClearedHdl;
-
- virtual void Cleared();
-
- public:
- Clipboard();
- ~Clipboard();
-
- static void Clear();
-
- static BOOL CopyString( const String& rStr );
- static BOOL CopyBitmap( const Bitmap& rBitmap );
- static BOOL CopyGDIMetaFile( const GDIMetaFile& rGDIMetaFile );
- static BOOL CopyPrivateData( void* pData );
- static BOOL CopyData( const void* pData, ULONG nLen,
- ULONG nFormat, USHORT nTypeLen = 8 );
- static BOOL CopyRequest( ULONG nFormat );
-
- static String PasteString();
- static Bitmap PasteBitmap();
- static BOOL PasteGDIMetaFile( GDIMetaFile& rGDIMetaFile );
- static void* PastePrivateData();
- static BOOL PasteData( void* pBuf, ULONG nLen, ULONG nFormat );
- static ULONG GetDataLen( ULONG nFormat );
-
- static USHORT GetFormatCount();
- static ULONG GetFormat( USHORT nPos );
- static BOOL HasFormat( ULONG nFormat );
-
- static ULONG GetRequestFormat();
-
- Link ChangeClearedHdl( const Link& rLink );
- Link GetClearedHdl() const { return aClearedHdl; }
- };
-
- inline Link Clipboard::ChangeClearedHdl( const Link& rLink )
- {
- Link aOldLink = aClearedHdl;
- aClearedHdl = rLink;
- return aOldLink;
- }
-
- class DragServer : public Exchange
- {
- public:
- DragServer();
- ~DragServer();
-
- static void Clear();
-
- static void NewItem();
- static BOOL CopyString( const String& rStr );
- static BOOL CopyBitmap( const Bitmap& rBitmap );
- static BOOL CopyGDIMetaFile( const GDIMetaFile& rGDIMetaFile );
- static BOOL CopyPrivateData( void* pData );
- static BOOL CopyFile( const String& rStr );
- static BOOL CopyData( const void* pData, ULONG nLen,
- ULONG nFormat, USHORT nTypeLen = 8 );
- static BOOL CopyRequest( ULONG nFormat );
-
- static USHORT GetItemCount();
- static String PasteString( USHORT nItem );
- static Bitmap PasteBitmap( USHORT nItem );
- static BOOL PasteGDIMetaFile( USHORT nItem, GDIMetaFile& rGDIMetaFile );
- static void* PastePrivateData( USHORT nItem );
- static String PasteFile( USHORT nItem );
- static BOOL PasteData( USHORT nItem, void* pBuf,
- ULONG nLen, ULONG nFormat );
- static ULONG GetDataLen( USHORT nItem, ULONG nFormat );
-
- static USHORT GetFormatCount( USHORT nItem );
- static ULONG GetFormat( USHORT nItem, USHORT nPos );
- static BOOL HasFormat( USHORT nItem, ULONG nFormat );
-
- static USHORT GetRequestItem();
- static ULONG GetRequestFormat();
-
- static String GetTargetPrinterName();
- };
-
- #endif
-
- #ifndef _ACCEL_HXX
- #define _ACCEL_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _RESID_HXX
- #endif
- #ifndef _KEYCOD_HXX
- #endif
- #ifndef _APP_HXX
- #endif
- #ifndef _RC_HXX
- #endif
-
- class AccelData;
- class AccelList;
-
- class Accelerator : public Resource
- {
- private:
- AccelData* pData;
- String aHelpStr;
-
- KeyCode aCurKeyCode;
- USHORT nCurId;
- USHORT nCurRepeat;
- AccelList* pCurAccelList;
- BOOL bIsCancel;
- AccelType eType;
-
- protected:
-
- virtual void Activate();
- virtual void Deactivate();
- virtual void Select();
-
- public:
- Accelerator();
- Accelerator( const Accelerator& rAccel );
- Accelerator( const ResId& rResId );
- virtual ~Accelerator();
-
- BOOL InsertItem( USHORT nItemId, const KeyCode& rKeyCode );
- BOOL InsertItem( const ResId& rResId );
- void RemoveItem( USHORT nItemId );
- void Clear();
-
- USHORT GetCurItemId() const
- { return nCurId; }
- KeyCode GetCurKeyCode() const
- { return aCurKeyCode; }
- USHORT GetCurRepeat() const
- { return nCurRepeat; }
- BOOL IsCancel() const
- { return bIsCancel; }
-
- USHORT GetItemCount() const;
- USHORT GetItemId( USHORT nPos ) const;
- USHORT GetItemId( const KeyCode& rKeyCode ) const;
-
- Accelerator* ChangeAccel( USHORT nItemId, Accelerator* pAccel );
- Accelerator* GetAccel( USHORT nItemId ) const;
-
- BOOL EnableItem( USHORT nItemId, BOOL bEnable = TRUE );
- BOOL IsItemEnabled( USHORT nItemId ) const;
-
- KeyCode ChangeKeyCode( USHORT nItemId, const KeyCode& rKeyCode );
- KeyCode GetKeyCode( USHORT nItemId ) const;
-
- void SetHelpText( const String& rHelpText )
- { aHelpStr = rHelpText; }
- String GetHelpText() const
- { return aHelpStr; }
-
- void PushActivateHdl( const Link& rLink );
- Link PopActivateHdl();
- void PushDeactivateHdl( const Link& rLink );
- Link PopDeactivateHdl();
- void PushSelectHdl( const Link& rLink );
- Link PopSelectHdl();
-
- Accelerator& operator=( const Accelerator& rAccel );
- };
-
- #endif
-
- #ifndef _PRVWIN_HXX
- #define _PRVWIN_HXX
-
- #ifndef _PRINT_HXX
- #endif
- #ifndef _WINDOW_HXX
- #endif
-
- class Willy;
-
- class Preview : public Window, public Printer
- {
- friend class Willy;
-
- protected:
- Willy* pWilly;
- USHORT nRequestPage;
- USHORT nCurPage;
- PageMetaFile* pCurPage;
- short nMetaAction;
- Point aPageOffset;
- Size aPrinterPageSize;
- Size aPrinterPageOffset;
- Size aPrinterOutputSize;
- Region aWinClipRegion;
- BOOL bIsWinClipRegion;
- Fraction aCurZoomFactor;
- Link aRequestPageLink;
-
- void Paint( const Rectangle& );
- void InsertNewPage( PageMetaFile* pPage );
- long PageHookHdl( MetaFile* pMetaFile );
-
- virtual void RequestPage();
-
- public:
- Preview( Window* pParent, WinBits nWinStyle = 0 );
- ~Preview();
-
- void SetPageQueueSize( USHORT nPages );
-
- USHORT ChangeCurPage( USHORT nCurPage = 1 );
- USHORT GetCurPage() const { return nCurPage; }
-
- Fraction ChangeZoomFactor( const Fraction& rFactor );
- Fraction GetZoomFactor() const { return aCurZoomFactor; }
-
- Point ChangePageOffset( const Point& rOffset );
- Point GetPageOffset() const { return aPageOffset; }
- Size GetVisibleSize() const;
-
- Size CalcWindowSizePixel( const Size& rMaxSize ) const;
-
- Link ChangeRequestPageHdl( const Link& rLink );
- Link GetRequestPageHdl() const { return aRequestPageLink; }
-
- USHORT GetRequestPage() const { return nRequestPage; }
- };
-
- inline Link Preview::ChangeRequestPageHdl( const Link& rLink )
- {
- Link aOldLink = aRequestPageLink;
- aRequestPageLink = rLink;
- return aOldLink;
- }
-
- #endif
-
- #ifndef _GRAPH_HXX
- #define _GRAPH_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _MAPMOD_HXX
- #endif
- #ifndef _BITMAP_HXX
- #endif
- #ifndef _GDIMTF_HXX
- #endif
-
- class OutputDevice;
- class ImpSwapFile;
- class istream;
- class ostream;
-
- enum GraphicType { GRAPHIC_NONE, GRAPHIC_BITMAP, GRAPHIC_GDIMETAFILE,
- GRAPHIC_WINMETAFILE, GRAPHIC_WNTMETAFILE,
- GRAPHIC_OS2METAFILE, GRAPHIC_MACPICT };
-
- class Graphic
- {
- protected:
- Bitmap aBitmap;
- Size aBitmapSize;
- GDIMetaFile aMetaFile;
- ULONG nOtherMetaFileLen;
- void* pOtherMetaFile;
- Size aOtherMetaFileSize;
- MapMode aOtherMetaFileMapMode;
- GraphicType eType;
- ImpSwapFile* pSwapFile;
- String aDocFileName;
- ULONG nDocFilePos;
- BOOL bSwapOut;
- BOOL bSwapUnderway;
-
- BOOL ImpIsSupportedGraphic( GraphicType eType ) const;
-
- public:
- Graphic();
- Graphic( const Graphic& rGraphic );
- Graphic( const Bitmap& rBmp );
- Graphic( const GDIMetaFile& rMtf );
- ~Graphic();
-
- void Clear();
- GraphicType GetType() const { return eType; }
- Bitmap GetBitmap() const;
- GDIMetaFile GetGDIMetaFile() const;
- BOOL IsSupportedGraphic() const
- { return ImpIsSupportedGraphic( eType ); }
-
- Size GetPrefSize() const;
- MapMode GetPrefMapMode() const;
-
- void Draw( OutputDevice* pOutDev, const Point& rDestPt );
- void Draw( OutputDevice* pOutDev,
- const Point& rDestPt, const Size& rDestSize );
-
- BOOL Copy();
- BOOL Paste();
-
- Graphic& operator=( const Graphic& rGraphic );
- BOOL operator==( const Graphic& rGraphic ) const;
- BOOL operator!=( const Graphic& rGraphic ) const;
-
- friend istream& operator>>( istream& rIStream, Graphic& rGraphic );
- friend ostream& operator<<( ostream& rOStream, const Graphic& rGraphic );
-
- BOOL ReadEmbedded( istream& rIStream, BOOL bSwap=FALSE );
- BOOL WriteEmbedded( ostream& rOStream );
-
- void SetDocFileName( const String& rName, ULONG nFilePos );
- String GetDocFileName() const { return aDocFileName; }
- ULONG GetDocFilePos() const { return nDocFilePos; }
-
- BOOL SwapOut();
- BOOL SwapIn();
- BOOL IsSwapOut() const { return bSwapOut; }
- };
-
- #endif
-
- #ifndef _SOUND_HXX
- #define _SOUND_HXX
-
- #ifndef _SV_H
- #endif
-
- enum SoundType { SOUND_DEFAULT, SOUND_INFO, SOUND_WARNING,
- SOUND_ERROR, SOUND_QUERY };
-
- class Sound
- {
- public:
- static void Beep( SoundType eType = SOUND_DEFAULT );
- };
-
- #endif
- #endif
- #ifndef DBG_UTIL
- void DebugPrintMsgBox( const char* pLine );
- inline void DbgError( const char* pMsg, const char* = NULL, USHORT = 0 )
- { DebugPrintMsgBox( pMsg ); }
- #endif
- #endif
- #if defined( _MSC_VER ) || defined( __SC__ )
- #undef protected
- #endif
- #if defined( ALPHA ) && defined( WNT )
- #undef protected
- #endif
- #endif
-