home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-08-01 | 60.9 KB | 2,301 lines |
- /*************************************************************************
- * SV.HXX
- * (c) 1992 STAR DIVISION
- *************************************************************************/
- #ifndef _SV_HXX
- #define _SV_HXX
- #define _WINDOW_H
- #define _SYSWIN_H
- #define _WRKWIN_H
- #define _MDIWIN_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 _POINTR_H
- #define _CURSOR_H
- #define _GLOBDEFS_H
- #define _OUTDEV_H
- #define _VIRDEV_H
- #define _PRINT_H
- #define _TIMER_H
- #define _CTRL_H
- #define _SCRBAR_H
- #define _BUTTON_H
- class ImpOutputDevice{ char dummy[ 69 ]; };
- class ImpWindow{ char dummy[ 38 ]; };
- class ImpSysWin{ char dummy[ 1 ]; };
- class ImpWorkWin{ char dummy[ 9 ]; };
- class ImpMessBox{ char dummy[ 10 ]; };
- struct IMPRCTYPE{ char dummy[ 3 ]; };
- class ImpDlg{ char dummy[ 6 ]; };
- class ImpModalDlg{ char dummy[ 5 ]; };
- class ImpBitmap{ char dummy[ 4 ]; };
- class ImpMenu{ char dummy[ 25 ]; };
- class ImpLstBox{ char dummy[ 4 ]; };
- class ImpComboBox{ char dummy[ 2 ]; };
- class ImpVirtDevice{ char dummy[ 8 ]; };
- class ImpPointer{ char dummy[ 5 ]; };
- class ImpIcon{ char dummy[ 5 ]; };
- class ImpCursor{ char dummy[ 11 ]; };
- class ImpMDIWin{ char dummy[ 12 ]; };
- class ImpPrinter{ char dummy[ 7 ]; };
- class ImpTimer{ char dummy[ 1 ]; };
- class ImpControl{ char dummy[ 9 ]; };
- class ImpScrBar{ char dummy[ 13 ]; };
- class ImpEdit{ char dummy[ 2 ]; };
- class ImpTriBox{ char dummy[ 2 ]; };
- #ifndef _TOOLS_HXX
- #include "tools.hxx"
- #endif
-
- #ifndef _SV_H
- #define _SV_H
-
- #ifndef _SOLAR_H
- #endif
-
- #ifndef _TOOLS_HXX
- #endif
-
- #define WorkWindow WrkWin
- #define SystemWindow SysWin
- #define ScrollBar ScrBar
- #define AutoScrollBar AScrBar
- #define PushButton PButton
- #define DefPushButton DPButton
- #define CheckBox ChkBox
- #define AutoCheckBox AChkBox
- #define RadioButton RaButton
- #define AutoRadioButton ARaButton
- #define SingleLineEdit SLEdit
- #define MultiLineEdit MLEdit
- #define ModelessDialog MLDialog
- #define ModalDialog MDDialog
- #define DropDownComboBox DComboBox
- #define DropDownListBox DListBox
- #define AcceleratorManager AMGR
-
- #endif
-
- #ifndef _WINBIT_HXX
- #define _WINBIT_HXX
-
- #ifndef _SV_H
- #endif
-
- #define WB_BORDER ((WinBits)0x0001)
- #define WB_CLIPCHILDREN ((WinBits)0x0002)
-
- #define WB_SIZEABLE ((WinBits)0x0004)
- #define WB_MOVEABLE ((WinBits)0x0008)
- #define WB_MINABLE ((WinBits)0x0010)
- #define WB_MAXABLE ((WinBits)0x0020)
- #define WB_CLOSEABLE ((WinBits)0x0040)
- #define WB_APP ((WinBits)0x0080)
-
- #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_TABSTOP ((WinBits)0x0004)
- #define WB_GROUP ((WinBits)0x0008)
-
- #define WB_SYSMODAL ((WinBits)0x1000)
-
- #define WB_STDMODELESS (WB_MOVEABLE | WB_CLOSEABLE)
- #define WB_STDMODAL (WB_MOVEABLE | WB_CLOSEABLE)
-
- #define WB_LEFT ((WinBits)0x0020)
- #define WB_CENTER ((WinBits)0x0040)
- #define WB_RIGHT ((WinBits)0x0080)
-
- #define WB_HSCROLL ((WinBits)0x0100)
- #define WB_VSCROLL ((WinBits)0x0200)
-
- #define WB_SORT ((WinBits)0x0400)
-
- #define WB_OK ((WinBits)0x0004)
- #define WB_OK_CANCEL ((WinBits)0x0008)
- #define WB_YES_NO ((WinBits)0x0010)
- #define WB_YES_NO_CANCEL ((WinBits)0x0020)
- #define WB_RETRY_CANCEL ((WinBits)0x0040)
-
- #define WB_DEF_OK ((WinBits)0x0080)
- #define WB_DEF_CANCEL ((WinBits)0x0100)
- #define WB_DEF_RETRY ((WinBits)0x0200)
- #define WB_DEF_YES ((WinBits)0x0400)
- #define WB_DEF_NO ((WinBits)0x0800)
-
- #ifdef MTF
- #define WB_DEFBUTTON ((WinBits)0x8000)
- #define WB_MENUBAR ((WinBits)0x0001)
- #define WB_MENUPOPUP ((WinBits)0x0002)
- #endif
- #define WB_HIDE ((WinBits)0x4000)
-
- typedef USHORT WinBits;
-
- enum TriState { STATE_NOCHECK, STATE_CHECK, STATE_DONTKNOW };
-
- #endif
-
- #ifndef _RESID_HXX
- #define _RESID_HXX
-
- #ifndef _TOOLS_HXX
- #endif
-
- #ifndef _SV_H
- #endif
- #ifndef _WINBIT_HXX
- #endif
-
- struct RSHEADER_TYPE;
-
- typedef short RESOURCE_TYPE;
- #define RSC_NOTYPE 0x100
-
- class ResId
- {
- private:
- RSHEADER_TYPE* pResource;
-
- USHORT nResId;
- USHORT nLockCount;
- RESOURCE_TYPE nRT;
- char* pStr;
-
- ResId( const ResId & );
- ResId & operator = ( const ResId & );
- public:
- WinBits aWinBits;
-
- ResId( RSHEADER_TYPE * pRc ){
- pResource = pRc;
- nRT = RSC_NOTYPE;
- nLockCount = 0;
- pStr = NULL;
- };
- ResId( USHORT nId, BOOL bLock = FALSE );
- ~ResId();
-
- ResId& Lock() { nLockCount++; return( *this ); };
- ResId& Lock( RESOURCE_TYPE nTyp ){
- if( RSC_NOTYPE == nRT )
- nRT = nTyp;
- return( Lock() );
- }
-
- RESOURCE_TYPE GetRT(){ return( nRT ); };
- ResId& SetRT( RESOURCE_TYPE nTyp ){
- if( RSC_NOTYPE == nRT )
- nRT = nTyp;
- return( *this );
- }
-
- void PopContext();
- void Unlock(){
- if( ! --nLockCount ){
-
- PopContext();
- }
- }
-
- USHORT GetId() { return( nResId ); }
- RSHEADER_TYPE* GetpResource() { return( pResource ); }
-
- operator const char*();
- };
-
- #endif
-
- #ifndef _RC_HXX
- #define _RC_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _TOOLS_HXX
- #endif
- #ifndef _RESID_HXX
- #endif
- #ifndef _IMPRC_H
- #endif
-
- 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();
-
- void * LoadGlobalRes( RESOURCE_TYPE nRT, USHORT nId,
- void ** pResHandle );
-
- void FreeGlobalRes( void *aResHandle, void * pResource );
-
- BOOL IsSystemRes( RESOURCE_TYPE nRT );
- public:
- IMPRCTYPE imp;
- };
-
- typedef short LOAD_FLAGS;
-
- #define RC_NOTYPE 0x0
- #define RC_GLOBAL 0x1
- #define RC_NOFREE 0x2
-
- struct STACK_TYPE {
-
- RSHEADER_TYPE * pResource;
- void * pClassRes;
- LOAD_FLAGS Flags;
- void * aResHandle;
- };
-
- #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();
-
- BOOL GetResource( RESOURCE_TYPE, USHORT nId,
- RSHEADER_TYPE *, BOOL bNoFree = FALSE );
- void PopContext();
-
- void * Increment( USHORT nSize ){
- if( aStack[ nTopRes ].pClassRes )
- aStack[ nTopRes ].pClassRes =
- (char * )(aStack[ nTopRes ].pClassRes) + nSize;
- return( aStack[ nTopRes ].pClassRes );
- }
-
- USHORT GetObjSize( RSHEADER_TYPE * pHT ){
- return( pHT->nGlobOff );
- }
-
- USHORT GetStringSize( char * pStr );
-
- void * GetSysDepen();
-
- void * GetClass(){
- return( aStack[ nTopRes ].pClassRes );
- }
-
- USHORT GetRemainSize();
- };
-
- class Resource : public LinkHdl
- {
-
- protected:
-
- BOOL GetRes( ResId& rResId, BOOL bNoFree = FALSE );
-
- void * GetSysDepenRes(){
- return( GetResManager()->GetSysDepen() );
- };
-
- void * GetClassRes(){
- return( GetResManager()->GetClass() );
- };
-
- void * IncrementRes( USHORT nBytes ){
- return( GetResManager()->Increment( nBytes ) );
- };
-
- USHORT GetObjSizeRes( RSHEADER_TYPE * pHT ){
- return( GetResManager()->GetObjSize( pHT ) );
- };
-
- USHORT GetStringSizeRes( char * pStr ){
- return( GetResManager()->GetStringSize( pStr ) );
- };
-
- USHORT GetRemainSizeRes(){
- return( GetResManager()->GetRemainSize() );
- };
-
- Resource( ResId& rResId, BOOL bNoFree = FALSE );
-
- Resource(){};
-
- public:
-
- ~Resource(){};
-
- static ResMgr * GetResManager();
-
- static void SetResManager( ResMgr * paResMgr );
-
- };
-
- #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;
-
- 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( ResId& rResId );
- virtual ~MapMode();
-
- MapUnit ChangeMapUnit( MapUnit eUnit );
- MapUnit GetMapUnit() const;
-
- Point ChangeOrigin( const Point& rOrigin );
- Point GetOrigin() const;
-
- Fraction ChangeScaleX( const Fraction& rScaleX );
- Fraction GetScaleX() const;
- Fraction ChangeScaleY( const Fraction& rScaleY );
- Fraction GetScaleY() const;
-
- 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
-
- 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_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( ResId &rResId );
- virtual ~Color();
-
- 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;
- };
-
- #endif
-
- #ifndef _BITMAP_HXX
- #define _BITMAP_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _RESID_HXX
- #endif
- #ifndef _RC_HXX
- #endif
-
- class ImpBitmap;
-
- class Bitmap : public Resource
- {
- protected:
-
- ImpBitmap* pImpBitmap;
-
- public:
- Bitmap();
- Bitmap( const Bitmap& rBitmap );
- Bitmap( ResId& rResId );
- virtual ~Bitmap();
-
- Size GetSizePixel() const;
- USHORT GetColorCount() const;
-
- Bitmap& operator=( const Bitmap& rBitmap );
-
- BOOL operator==( const Bitmap& rBitmap ) const;
- BOOL operator!=( const Bitmap& rBitmap ) const;
- };
-
- #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
-
- enum PenStyle { PEN_NULL, PEN_SOLID, PEN_DOT, PEN_DASH, PEN_DASHDOT };
-
- class ImpPen;
-
- 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( ResId &rResId );
- virtual ~Pen();
-
- Color ChangeColor( const Color& rColor );
- Color GetColor() const;
-
- USHORT ChangeWidth( USHORT nWidth );
- USHORT GetWidth() const;
-
- PenStyle ChangeStyle( PenStyle eStyle );
- PenStyle GetStyle() const;
-
- Pen& operator=( const Pen& rPen );
- BOOL operator==( const Pen& rPen ) const;
- BOOL operator!=( const Pen& rPen ) const;
- };
-
- 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;
-
- 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( ResId& rResId );
- virtual ~Brush();
-
- Color ChangeColor( const Color& rColor );
- Color GetColor() const;
- Color ChangeFillColor( const Color& rColor );
- Color GetFillColor() const;
-
- BrushStyle ChangeStyle( BrushStyle eStyle );
- BrushStyle GetStyle() const;
- Bitmap ChangeBitmap( const Bitmap& rBitmap );
- Bitmap GetBitmap() const;
-
- 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 FontCharSet { CHARSET_DONTKNOW, CHARSET_ANSI, CHARSET_IBMPC, CHARSET_MAC,
- CHARSET_SYMBOL };
- 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 FontWeight { WEIGHT_DONTKNOW, WEIGHT_LIGHT, WEIGHT_NORMAL, WEIGHT_BOLD };
- enum FontAlign { ALIGN_TOP, ALIGN_BASELINE, ALIGN_BOTTOM };
-
- class ImpFont;
-
- 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( ResId & rResId );
- virtual ~Font();
-
- Color ChangeColor( const Color& rColor );
- Color GetColor() const;
- Color ChangeFillColor( const Color& rColor );
- Color GetFillColor() const;
-
- FontFamily ChangeFamily( FontFamily eFamily );
- FontFamily GetFamily() const;
- String ChangeName( const String& rName );
- String GetName() const;
- Size ChangeSize( const Size& rSize );
- Size GetSize() const;
-
- FontCharSet ChangeCharSet( FontCharSet eCharSet );
- FontCharSet GetCharSet() const;
- FontPitch ChangePitch( FontPitch ePitch );
- FontPitch GetPitch() const;
-
- FontAlign ChangeAlign( FontAlign eAlign );
- FontAlign GetAlign() const;
-
- short ChangeLineOrientation( short nLineOrientation );
- short GetLineOrientation() const;
- short ChangeCharOrientation( short nCharOrientation );
- short GetCharOrientation() const;
-
- FontWeight ChangeWeight( FontWeight eWeight );
- FontWeight GetWeight() const;
-
- BOOL ChangeItalic( BOOL bItalic );
- BOOL IsItalic() const;
- BOOL ChangeUnderline( BOOL bUnderline );
- BOOL IsUnderline() const;
- BOOL ChangeStrikeout( BOOL bStrikeout );
- BOOL IsStrikeout() const;
- BOOL ChangeOutline( BOOL bOutline );
- BOOL IsOutline() const;
- BOOL ChangeShadow( BOOL bShadow );
- BOOL IsShadow() const;
-
- BOOL ChangeTransparent( BOOL bTransparent );
- BOOL IsTransparent() const;
-
- 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 _TOOLS_HXX
- #endif
- #ifndef _SV_H
- #endif
- #ifndef _RESID_HXX
- #endif
- #ifndef _RC_HXX
- #endif
-
- enum PointerStyle { POINTER_ARROW, POINTER_WAIT, POINTER_CROSS,
- POINTER_BEAM, POINTER_NULL };
-
- class ImpPointer;
-
- class Pointer : public Resource
- {
- protected:
- ImpPointer* pImpPointer;
-
- public:
- Pointer( PointerStyle = POINTER_ARROW );
- Pointer( const Pointer& rPointer );
- Pointer( ResId& rResId );
- virtual ~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( IconStyle aStyle = ICON_DEFAULT );
- Icon( const Icon& rIcon );
- Icon( ResId& rResId );
- virtual ~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 _TOOLS_HXX
- #endif
-
- #define KEYGROUP_NUM 0x0100
- #define KEYGROUP_ALPHA 0x0200
- #define KEYGROUP_FKEYS 0x0300
- #define KEYGROUP_CURSOR 0x0400
- #define KEYGROUP_MISC 0x0500
-
- #define KEY_0 (KEYGROUP_NUM+0)
- #define KEY_1 (KEYGROUP_NUM+1)
- #define KEY_2 (KEYGROUP_NUM+2)
- #define KEY_3 (KEYGROUP_NUM+3)
- #define KEY_4 (KEYGROUP_NUM+4)
- #define KEY_5 (KEYGROUP_NUM+5)
- #define KEY_6 (KEYGROUP_NUM+6)
- #define KEY_7 (KEYGROUP_NUM+7)
- #define KEY_8 (KEYGROUP_NUM+8)
- #define KEY_9 (KEYGROUP_NUM+9)
-
- #define KEY_A (KEYGROUP_ALPHA+0)
- #define KEY_B (KEYGROUP_ALPHA+1)
- #define KEY_C (KEYGROUP_ALPHA+2)
- #define KEY_D (KEYGROUP_ALPHA+3)
- #define KEY_E (KEYGROUP_ALPHA+4)
- #define KEY_F (KEYGROUP_ALPHA+5)
- #define KEY_G (KEYGROUP_ALPHA+6)
- #define KEY_H (KEYGROUP_ALPHA+7)
- #define KEY_I (KEYGROUP_ALPHA+8)
- #define KEY_J (KEYGROUP_ALPHA+9)
- #define KEY_K (KEYGROUP_ALPHA+10)
- #define KEY_L (KEYGROUP_ALPHA+11)
- #define KEY_M (KEYGROUP_ALPHA+12)
- #define KEY_N (KEYGROUP_ALPHA+13)
- #define KEY_O (KEYGROUP_ALPHA+14)
- #define KEY_P (KEYGROUP_ALPHA+15)
- #define KEY_Q (KEYGROUP_ALPHA+16)
- #define KEY_R (KEYGROUP_ALPHA+17)
- #define KEY_S (KEYGROUP_ALPHA+18)
- #define KEY_T (KEYGROUP_ALPHA+19)
- #define KEY_U (KEYGROUP_ALPHA+21)
- #define KEY_V (KEYGROUP_ALPHA+22)
- #define KEY_W (KEYGROUP_ALPHA+23)
- #define KEY_X (KEYGROUP_ALPHA+24)
- #define KEY_Y (KEYGROUP_ALPHA+25)
- #define KEY_Z (KEYGROUP_ALPHA+26)
-
- #define KEY_F1 (KEYGROUP_FKEYS+0)
- #define KEY_F2 (KEYGROUP_FKEYS+1)
- #define KEY_F3 (KEYGROUP_FKEYS+2)
- #define KEY_F4 (KEYGROUP_FKEYS+3)
- #define KEY_F5 (KEYGROUP_FKEYS+4)
- #define KEY_F6 (KEYGROUP_FKEYS+5)
- #define KEY_F7 (KEYGROUP_FKEYS+6)
- #define KEY_F8 (KEYGROUP_FKEYS+7)
- #define KEY_F9 (KEYGROUP_FKEYS+8)
- #define KEY_F10 (KEYGROUP_FKEYS+9)
- #define KEY_F11 (KEYGROUP_FKEYS+10)
- #define KEY_F12 (KEYGROUP_FKEYS+11)
- #define KEY_F13 (KEYGROUP_FKEYS+12)
- #define KEY_F14 (KEYGROUP_FKEYS+13)
- #define KEY_F15 (KEYGROUP_FKEYS+14)
- #define KEY_F16 (KEYGROUP_FKEYS+15)
- #define KEY_F17 (KEYGROUP_FKEYS+16)
- #define KEY_F18 (KEYGROUP_FKEYS+17)
- #define KEY_F19 (KEYGROUP_FKEYS+18)
- #define KEY_F20 (KEYGROUP_FKEYS+19)
- #define KEY_F21 (KEYGROUP_FKEYS+21)
- #define KEY_F22 (KEYGROUP_FKEYS+22)
- #define KEY_F23 (KEYGROUP_FKEYS+23)
- #define KEY_F24 (KEYGROUP_FKEYS+24)
-
- #define KEY_DOWN (KEYGROUP_CURSOR+0)
- #define KEY_UP (KEYGROUP_CURSOR+1)
- #define KEY_LEFT (KEYGROUP_CURSOR+2)
- #define KEY_RIGHT (KEYGROUP_CURSOR+3)
- #define KEY_HOME (KEYGROUP_CURSOR+4)
- #define KEY_END (KEYGROUP_CURSOR+5)
- #define KEY_PAGEUP (KEYGROUP_CURSOR+6)
- #define KEY_PAGEDOWN (KEYGROUP_CURSOR+7)
-
- #define KEY_RETURN (KEYGROUP_MISC+0)
- #define KEY_ESCAPE (KEYGROUP_MISC+1)
- #define KEY_TAB (KEYGROUP_MISC+2)
- #define KEY_BACKSPACE (KEYGROUP_MISC+3)
- #define KEY_SPACE (KEYGROUP_MISC+4)
- #define KEY_INSERT (KEYGROUP_MISC+5)
- #define KEY_DELETE (KEYGROUP_MISC+6)
-
- #define KEY_SHIFT 0x1000
- #define KEY_MOD1 0x2000
- #define KEY_MOD2 0x4000
-
- class KeyCode
- {
- protected:
- USHORT nCode;
-
- USHORT GetFullCode() const { return nCode; }
-
- public:
- KeyCode() { nCode = 0; }
- KeyCode( USHORT nKey, USHORT nModifier = 0 );
- KeyCode( USHORT nKey, BOOL bShift, BOOL bMod1, BOOL bMod2 );
-
- USHORT GetCode() const;
-
- USHORT GetModifier() const;
- BOOL IsShift() const;
- BOOL IsMod1() const;
- BOOL IsMod2() const;
-
- USHORT GetGroup() const;
-
- BOOL operator ==( const KeyCode& rKeyCode ) const
- { return nCode == rKeyCode.nCode; }
- BOOL operator !=( const KeyCode& rKeyCode ) const
- { return nCode != rKeyCode.nCode; }
- };
-
- #endif
-
- #ifndef _EVENT_HXX
- #define _EVENT_HXX
-
- #ifndef _SV_H
- #endif
-
- #ifndef _TOOLS_HXX
- #endif
-
- #ifndef _KEYCOD_HXX
- #endif
-
- class KeyEvent
- {
- private:
- KeyCode aKeyCode;
- char nCharCode;
- USHORT nRepeat;
-
- public:
- KeyEvent() { nCharCode = 0; nRepeat = 0; }
- KeyEvent( char nCharCode, const KeyCode& rKeyCode,
- USHORT nRepeat = 0 );
-
- char GetCharCode() const { return nCharCode; }
- KeyCode GetKeyCode() const { return aKeyCode; }
- USHORT GetRepeat() const { return nRepeat; }
- };
-
- #define MOUSE_MOVE 1
- #define MOUSE_SIMPLEDRAG 2
- #define MOUSE_EXTDRAG 3
-
- #define MOUSE_SIMPLE 1
- #define MOUSE_EXT 2
- #define MOUSE_MULTI 3
-
- #define MOUSE_LEFT 0x0001
- #define MOUSE_MIDDLE 0x0002
- #define MOUSE_RIGHT 0x0004
-
- class MouseEvent
- {
- private:
- Point aPos;
- USHORT nMode;
- USHORT nClicks;
- USHORT nCode;
-
- public:
- MouseEvent() { nMode = 0; nClicks = 0; nCode = 0; }
- MouseEvent( const Point& rPos, USHORT nClicks = 1,
- USHORT nMode = 0, USHORT nButtons = 0,
- USHORT nModifier = 0 );
-
- Point GetPosPixel() const { return aPos; }
- USHORT GetMode() const { return nMode; }
- USHORT GetClicks() const { return nClicks; }
-
- USHORT GetButtons() const;
- BOOL IsLeft() const;
- BOOL IsMiddle() const;
- BOOL IsRight() const;
-
- USHORT GetModifier() const;
- BOOL IsShift() const;
- BOOL IsMod1() const;
- BOOL IsMod2() const;
- };
-
- enum HelpMode { HELPMODE_CONTEXT, HELPMODE_EXTENDED, HELPMODE_ALL };
-
- class HelpEvent
- {
- private:
- Point aPos;
- HelpMode eMode;
-
- public:
- HelpEvent() { eMode = HELPMODE_CONTEXT; }
- HelpEvent( const Point& rPos, HelpMode eMode );
-
- Point GetMousePosPixel() const { return aPos; }
- HelpMode GetMode() const { return eMode; }
- };
-
- #endif
- #ifndef RSC_COMPILER
-
- #ifndef _APP_HXX
- #define _APP_HXX
-
- #ifndef _TOOLS_HXX
- #endif
- #ifndef _SV_H
- #endif
- #ifndef _GDIOBJ_HXX
- #endif
- #ifndef _EVENT_HXX
- #endif
-
- class MenuBar;
- class Window;
- class WorkWindow;
- class Accelerator;
- class Help;
-
- enum SysChangeType { CHANGE_FONTCOUNT, CHANGE_OTHER };
-
- class Application : public LinkHdl
- {
- protected:
- void Execute();
- virtual BOOL QueryExit();
-
- virtual void SysChange( SysChangeType eChgType );
-
- virtual void ActivateExtHelp();
- virtual void DeactivateExtHelp();
-
- public:
- Application();
- ~Application();
-
- virtual void Main( int nArgc, char* pArgv[] ) = 0;
-
- BOOL IsInMain() const;
- BOOL IsInExecute() const;
-
- void Wait( BOOL bWait = TRUE );
- BOOL IsWait() const;
-
- void Quit();
- void Reschedule();
- BOOL AnyInput();
-
- 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;
-
- BOOL InsertAccel( Accelerator* pAccel );
- BOOL 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;
- };
-
- extern Application* pApp;
-
- #endif
-
- #ifndef _METRIC_HXX
- #define _METRIC_HXX
-
- #ifndef _SV_H
- #endif
-
- #ifndef _GDIOBJ_HXX
- #endif
-
- class ImpFontMetric;
-
- #define CHARORIENTATION_DONTKNOW ((short)0x7FFF)
- #define LINEORIENTATION_DONTKNOW ((short)0x7FFF)
-
- enum FontType { TYPE_DONTKNOW, TYPE_RASTER, TYPE_VECTOR, TYPE_SCALABLE };
-
- class FontMetric
- {
- protected:
- ImpFontMetric* pImpMetric;
-
- public:
- FontMetric();
- FontMetric( const FontMetric& rMetric );
- ~FontMetric();
-
- Color GetColor() const;
- Color GetFillColor() const;
-
- FontFamily GetFamily() const;
- String GetName() const;
- Size GetSize() const;
-
- FontCharSet GetCharSet() const;
- FontPitch GetPitch() const;
-
- FontAlign GetAlign() const;
-
- short GetLineOrientation() const;
- short GetCharOrientation() const;
-
- FontWeight GetWeight() const;
-
- BOOL IsItalic() const;
- BOOL IsUnderline() const;
- BOOL IsStrikeout() const;
- BOOL IsOutline() const;
- BOOL IsShadow() const;
- BOOL IsTransparent() const;
-
- FontType GetType() const;
- BOOL IsDeviceFont() const;
-
- USHORT GetAscent() const;
- USHORT GetDescent() const;
- USHORT GetLeading() const;
-
- BOOL ExistChar( char c ) const;
-
- FontMetric& operator =( const FontMetric& rMetric );
- BOOL operator ==( const FontMetric& rMetric ) const;
- BOOL operator !=( const FontMetric& rMetric ) const;
- };
-
- #endif
-
- #ifndef _OUTDEV_HXX
- #define _OUTDEV_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _TOOLS_HXX
- #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
-
- class EnvStack;
- class GDIMetaFile;
- class Bitmap;
- class Icon;
-
- enum RasterOp { ROP_OVERPAINT, ROP_INVERT,
- ROP_AND, ROP_OR, ROP_XOR, ROP_NXOR };
-
- class OutputDevice : public Resource
- {
- protected:
- ImpOutputDevice aImpOPD;
- EnvStack* pStack;
- GDIMetaFile* pMetaFile;
- BOOL bBlackHole;
- Pen aPen;
- Font aFont;
- Brush aBackBrush;
- Brush aFillInBrush;
- MapMode aMapMode;
- RasterOp aRasterOp;
- BOOL bMap;
-
- OutputDevice();
- OutputDevice( ResId& rResId );
-
- public:
- virtual ~OutputDevice();
-
- void DrawText( const Point& rStartPt, 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 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( USHORT nPoints, Point aPtAry[] );
- void DrawPolygon( USHORT nPoints, Point aPtAry[] );
- 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;
-
- Rectangle ChangeClipRect();
- Rectangle ChangeClipRect( const Rectangle& rRect );
- Rectangle GetClipRect() const;
- BOOL IsClipRect() const;
-
- Pen ChangePen( const Pen& rNewPen );
- Pen GetPen() const { return aPen; }
- Font ChangeFont( const Font& rNewFont );
- Font GetFont() const { return aFont; }
- Brush ChangeBackgroundBrush( const Brush& rNewBrush );
- Brush GetBackgroundBrush() const { return aBackBrush; }
- Brush ChangeFillInBrush( const Brush& rNewBrush );
- Brush GetFillInBrush() const { return aFillInBrush; }
-
- MapMode ChangeMapMode( const MapMode& rNewMapMode );
- MapMode GetMapMode() const { return aMapMode; }
-
- Point LogicToPixel( const Point& rLogicPt ) const;
- Size LogicToPixel( const Size& rLogicSize ) const;
- Rectangle LogicToPixel( const Rectangle& rLogicRect ) 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;
- Point PixelToLogic( const Point& rDevicePt ) const;
- Size PixelToLogic( const Size& rDeviceSize ) const;
- Rectangle PixelToLogic( const Rectangle& rDeviceRect ) 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;
-
- 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;
-
- void Push();
- void Pop();
- };
-
- #endif
- #ifndef SV_NOWINDOW
-
- #ifndef _WINDOW_HXX
- #define _WINDOW_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _TOOLS_HXX
- #endif
- #ifndef _WINBIT_HXX
- #endif
- #ifndef _RESID_HXX
- #endif
- #ifndef _OUTDEV_HXX
- #endif
- #ifndef _WINDOW_H
- #endif
-
- class Cursor;
- class Pointer;
- class MouseEvent;
- class KeyEvent;
- class HelpEvent;
- class ResOwner;
- struct RCENUM_TYPE;
-
- 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 LooseFocus();
- virtual void RequestHelp( const HelpEvent& rHEvt );
-
- public:
- Window( Window* pParent, WinBits nWinStyle = 0 );
- Window( Window* pParent, ResId& rId );
- ~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 );
- 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;
- USHORT GetTextLen() const;
-
- Pointer ChangePointer( const Pointer& rPointer );
- Pointer GetPointer() const;
-
- Cursor* ChangeCursor( Cursor* pCursor );
- Cursor* GetCursor() const;
-
- void SetHelpText( const String& rStr );
- String GetHelpText() const;
- USHORT GetHelpTextLen() const;
-
- ULONG ChangeHelpId( ULONG nHelpId );
- ULONG GetHelpId() const;
- };
-
- #endif
-
- #ifndef _SYSWIN_HXX
- #define _SYSWIN_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _WINBIT_HXX
- #endif
- #ifndef _RESID_HXX
- #endif
- #ifndef _WINDOW_HXX
- #endif
- #ifndef _SYSWIN_H
- #endif
-
- class SystemWindow : public Window
- {
- protected:
- ImpSysWin aImpSysWnd;
-
- SystemWindow( RESOURCE_TYPE nTyp, Window* pParent,
- WinBits nWinStyle );
-
- SystemWindow( Window* pParent, ResId& rResId );
-
- virtual void Activate();
- virtual void Deactivate();
-
- public:
- ~SystemWindow();
-
- virtual BOOL Close();
-
- BOOL IsActive() const;
- };
-
- #endif
-
- #ifndef _WRKWIN_HXX
- #define _WRKWIN_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _RESID_HXX
- #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, ResId& rResId );
- ~WorkWindow();
-
- void Minimize();
- void Maximize();
- void Restore();
-
- BOOL IsMinimized() const;
- BOOL IsMaximized() const;
-
- Icon ChangeIcon( const Icon& rNewIcon );
- Icon GetIcon() const;
- };
-
- #endif
- #ifndef SV_NOCONTROL
-
- #ifndef _CTRL_HXX
- #define _CTRL_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _RESID_HXX
- #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 LooseFocus();
-
- public:
- Control( Window* pWindow, WinBits nWinStyle = 0 );
- Control( Window* pWindow, 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 );
- Size GetCtrlTextSize( const String& rStr, USHORT nIndex = 0,
- USHORT nLen = STRING_LEN ) const;
-
- Link ChangeGetFocusHdl( const Link& rLink );
- Link GetGetFocusHdl() const { return aGetFcHdlLink; }
- Link ChangeLooseFocusHdl( const Link& rLink );
- Link GetLooseFocusHdl() const { return aLosFcHdlLink; }
- };
-
- #endif
-
- #ifndef _SCRBAR_HXX
- #define _SCRBAR_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _TOOLS_HXX
- #endif
- #ifndef _WINBIT_HXX
- #endif
- #ifndef _RESID_HXX
- #endif
- #ifndef _CTRL_HXX
- #endif
- #ifndef _SCRBAR_H
- #endif
-
- class ScrollBar : public Control
- {
- private:
- ImpScrBar aImpScrBar;
- Link aLnMoveHdlLink;
- Link aPgMoveHdlLink;
- Link aThumbDragHdlLink;
- Link aEndScrollHdlLink;
-
- protected:
-
- ScrollBar( RESOURCE_TYPE nTyp, Window* pParent,
- WinBits nWinStyle );
-
- public:
- ScrollBar( Window* pParent, WinBits nWinStyle = WB_VSCROLL );
- ScrollBar( Window* pParent, ResId& rResId );
-
- virtual void LineMove();
- virtual void PageMove();
- virtual void ThumbDrag();
- virtual void EndScroll();
-
- public:
- short ChangeThumbPos( short nThumbPos );
- short GetThumbPos() const;
- short ChangePageSize( short nNewSize );
- short GetPageSize() const;
- short ChangeLineSize( short nNewSize );
- short GetLineSize() const;
- Range ChangeRange( const Range& rRange );
- Range GetRange() const;
-
- short GetDelta() const;
- short GetDeltaSum() const;
-
- Link ChangeLineMoveHdl( const Link& rLink );
- Link GetLineMoveHdl() const { return aLnMoveHdlLink; }
- Link ChangePageMoveHdl( const Link& rLink );
- Link GetPageMoveHdl() const { return aPgMoveHdlLink; }
- Link ChangeThumbDragHdl( const Link& rLink );
- Link GetThumbDragHdl() const { return aThumbDragHdlLink; }
- Link ChangeEndScrollHdl( const Link& rLink );
- Link GetEndScrollHdl() const { return aEndScrollHdlLink; }
- };
-
- class AutoScrollBar : public ScrollBar
- {
- public:
- AutoScrollBar( Window* pParent, WinBits nWinStyle = WB_VSCROLL );
- AutoScrollBar( Window* pParent, ResId& rResId );
- };
-
- #endif
-
- #ifndef _BUTTON_HXX
- #define _BUTTON_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _WINBIT_HXX
- #endif
- #ifndef _RESID_HXX
- #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, ResId& rResId );
-
- Link ChangeClickHdl( const Link& rLink );
- Link GetClickHdl() const { return aClkHdlLink; }
- };
-
- class PushButton : public Button
- {
- protected:
-
- PushButton( RESOURCE_TYPE nTyp, Window* pParent,
- WinBits nWinStyle );
-
- public:
- PushButton( Window* pParent, WinBits nWinStyle = 0 );
- PushButton( Window* pParent, ResId& rResId );
- };
-
- class DefPushButton : public PushButton
- {
- public:
- DefPushButton( Window* pParent, WinBits nWinStyle = 0 );
- DefPushButton( Window* pParent, ResId& rResId );
- };
-
- class RadioButton : public Button
- {
- protected:
-
- RadioButton( RESOURCE_TYPE nTyp, Window* pParent,
- WinBits nWinStyle );
-
- public:
- RadioButton( Window* pParent, WinBits nWinStyle = 0 );
- RadioButton( Window* pParent, ResId& rResId );
-
- void Check( BOOL bCheck = TRUE );
- BOOL IsChecked() const;
- };
-
- class AutoRadioButton : public RadioButton
- {
- public:
- AutoRadioButton( Window* pParent, WinBits nWinStyle = 0 );
- AutoRadioButton( Window* pParent, ResId& rResId );
- };
-
- class CheckBox : public Button
- {
- protected:
-
- CheckBox( RESOURCE_TYPE nTyp, Window* pParent, WinBits nWinStyle );
-
- public:
- CheckBox( Window* pParent, WinBits nWinStyle = 0 );
- CheckBox( Window* pParent, ResId& rResId );
-
- void Check( BOOL bCheck = TRUE );
- BOOL IsChecked() const;
- };
-
- class AutoCheckBox : public CheckBox
- {
- public:
- AutoCheckBox( Window* pParent, WinBits nWinStyle = 0 );
- AutoCheckBox( Window* pParent, ResId& rResId );
- };
-
- class TriStateBox : public Button
- {
- protected:
- ImpTriBox aImpTriBox;
-
- TriStateBox( RESOURCE_TYPE nTyp, Window* pParent,
- WinBits nWinStyle );
-
- public:
- TriStateBox( Window* pParent, WinBits nWinStyle = 0 );
- TriStateBox( Window* pParent, ResId& rResId );
-
- TriState ChangeState( TriState aState );
- TriState GetState() const;
-
- void EnableTriState( BOOL bTriState = TRUE );
- BOOL IsTriStateEnabled() const;
- };
-
- class AutoTriStateBox : public TriStateBox
- {
- public:
- AutoTriStateBox( Window* pParent, WinBits nWinStyle = 0 );
- AutoTriStateBox( Window* pParent, ResId& rResId );
- };
-
- #endif
-
- #ifndef _FIXED_HXX
- #define _FIXED_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _WINBIT_HXX
- #endif
- #ifndef _RESID_HXX
- #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, ResId& rResId );
- };
-
- class FixedBitmap : public Control
- {
- private:
- Bitmap aBmp;
-
- protected:
- void Paint( const Rectangle& );
- void Resize();
-
- public:
- FixedBitmap( Window* pParent, WinBits nWinStyle = 0 );
- FixedBitmap( Window* pParent, ResId& rResId );
-
- Bitmap ChangeBitmap( const Bitmap& rBitmap );
- Bitmap GetBitmap() const { return aBmp; }
- };
-
- class FixedIcon : public Control
- {
- private:
- Icon aIcon;
-
- protected:
- void Paint( const Rectangle& );
- void Resize();
-
- public:
- FixedIcon( Window* pParent, WinBits nWinStyle = 0 );
- FixedIcon( Window* pParent, ResId& rResId );
-
- Icon ChangeIcon( const Icon& rIcon );
- Icon GetIcon() const { return aIcon; }
- };
-
- #endif
-
- #ifndef _GROUP_HXX
- #define _GROUP_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _WINBIT_HXX
- #endif
- #ifndef _RESID_HXX
- #endif
- #ifndef _CTRL_HXX
- #endif
-
- class GroupBox : public Control
- {
- public:
- GroupBox( Window* pParent, ResId& rResId );
- GroupBox( Window* pParent );
- };
-
- #endif
-
- #ifndef _LSTBOX_HXX
- #define _LSTBOX_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _WINBIT_HXX
- #endif
- #ifndef _RESID_HXX
- #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;
- Link aHighlightHdlLink;
- Link aSelectHdlLink;
-
- void ReadResource();
-
- protected:
-
- ListBox( RESOURCE_TYPE nTyp, Window* pParent,
- WinBits nWinStyle );
-
- virtual void Highlight();
- virtual void Select();
-
- public:
- ListBox( Window* pParent, WinBits nWinStyle = WB_BORDER );
- ListBox( Window* pParent, ResId& rResId );
-
- void InsertEntry( const String& rStr, USHORT nPos = LISTBOX_APPEND );
- void RemoveEntry( const String& rStr );
- void RemoveEntry( USHORT nPos );
-
- USHORT GetEntryPos( const String& rStr ) const;
- USHORT GetEntryLen( USHORT nPos ) const;
- String GetEntry( USHORT nPos ) const;
- USHORT GetEntryCount() const;
-
- USHORT GetCurEntryPos() const;
- USHORT GetCurEntryLen() const;
- String GetCurEntry() const;
-
- void SetCurEntryPos( USHORT nPos );
- void SetCurEntry( const String& rStr );
- void SetNoCurEntry();
-
- void Clear();
-
- Link ChangeHighlightHdl( const Link& rLink );
- Link GetHighlightHdl() const { return aHighlightHdlLink; }
- Link ChangeSelectHdl( const Link& rLink );
- Link GetSelectHdl() const { return aSelectHdlLink; }
- };
-
- class DropDownListBox : public ListBox
- {
- private:
- Link aDropDownHdlLink;
-
- protected:
- virtual void DropDown();
-
- public:
- DropDownListBox( Window* pParent,
- WinBits nWinStyle = 0 );
- DropDownListBox( Window* pParent, ResId& rResId );
-
- Link ChangeDropDownHdl( const Link& rLink );
- Link GetDropDownHdl() const { return aDropDownHdlLink; }
- };
-
- #define COMBOBOX_NOLIMIT 0
-
- class ComboBox : public ListBox
- {
- private:
- ImpComboBox aImpComboBox;
-
- Link aChangeHdlLink;
- BOOL bSetTextModify;
- BOOL bModify;
-
- protected:
-
- ComboBox( RESOURCE_TYPE nTyp, Window* pParent,
- WinBits nWinStyle );
-
- virtual void Modify();
-
- public:
- ComboBox( Window* pParent, WinBits nWinStyle = 0 );
- ComboBox( Window* pParent, ResId& rResId );
-
- USHORT ChangeMaxTextLen( USHORT nMaxLen = COMBOBOX_NOLIMIT );
- USHORT GetMaxTextLen() const;
-
- BOOL IsSetTextModified() const { return( bSetTextModify ); }
- BOOL IsModified() const { return( bModify ); }
-
- Selection ChangeSelection( const Selection& rSelection );
- Selection GetSelection() const;
- String GetSelected() const;
-
- Link ChangeModifyHdl( const Link& rLink );
- Link GetModifyHdl() const { return aChangeHdlLink; }
- };
-
- class DropDownComboBox : public ComboBox
- {
- private:
- Link aDropDownHdlLink;
-
- protected:
- virtual void DropDown();
-
- public:
- DropDownComboBox( Window* pParent,
- WinBits nWinStyle = 0 );
- DropDownComboBox( Window* pParent, ResId& rResId );
-
- Link ChangeDropDownHdl( const Link& rLink );
- Link GetDropDownHdl() const { return aDropDownHdlLink; }
- };
-
- #endif
-
- #ifndef _EDIT_HXX
- #define _EDIT_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _WINBIT_HXX
- #endif
- #ifndef _RESID_HXX
- #endif
- #ifndef _CTRL_HXX
- #endif
- #ifndef _EDIT_H
- #endif
-
- #define EDIT_NOLIMIT 0
-
- class Edit : public Control
- {
- private:
- ImpEdit aImpEdit;
-
- Link aChangeHdlLink;
- BOOL bSetTextModify;
- BOOL bModify;
-
- protected:
-
- Edit( RESOURCE_TYPE nTyp, Window* pParent,
- WinBits nWinStyle );
-
- Edit( Window* pParent, ResId& rResId );
-
- virtual void Modify();
-
- public:
- USHORT ChangeMaxTextLen( USHORT nMaxLen = EDIT_NOLIMIT );
- USHORT GetMaxTextLen() const;
-
- BOOL IsSetTextModified() const { return( bSetTextModify ); }
- BOOL IsModified() const { return( bModify ); }
-
- Selection ChangeSelection( const Selection& rSelection );
- Selection GetSelection() const;
-
- void ReplaceSelected( const String& rStr );
- void DeleteSelected();
- String GetSelected() const;
-
- void Cut();
- void Copy();
- void Paste();
-
- Link ChangeModifyHdl( const Link& rLink );
- Link GetModifyHdl() const { return aChangeHdlLink; }
- };
-
- class SingleLineEdit : public Edit
- {
- public:
- SingleLineEdit( Window* pParent,
- WinBits nWinStyle = WB_LEFT | WB_BORDER );
- SingleLineEdit( Window* pParent, ResId& rResId );
- };
-
- class MultiLineEdit : public Edit
- {
- public:
- MultiLineEdit( Window* pParent,
- WinBits nWinStyle = WB_LEFT | WB_BORDER );
- MultiLineEdit( Window* pParent, ResId& rResId );
- };
-
- #endif
- #endif
- #ifndef SV_NODIALOG
-
- #ifndef _DIALOG_HXX
- #define _DIALOG_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _WINBIT_HXX
- #endif
- #ifndef _RESID_HXX
- #endif
- #ifndef _SYSWIN_HXX
- #endif
- #ifndef _DIALOG_H
- #endif
-
- class Dialog : public SystemWindow
- {
- protected:
- ImpDlg aImpDlg;
-
- Dialog( Window* pParent, WinBits nWinStyle );
-
- Dialog( Window* pParent, 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, ResId& rResId );
- ~ModelessDialog();
- };
-
- 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, ResId& rResId );
- ~ModalDialog();
-
- short Execute();
- BOOL IsInExecute() const;
-
- void EndDialog( short nResult = 0 );
- };
-
- #endif
- #endif
- #ifndef SV_NOMSGBOX
-
- #ifndef _MSGBOX_HXX
- #define _MSGBOX_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _RESID_HXX
- #endif
- #ifndef _WINBIT_HXX
- #endif
- #ifndef _WINDOW_HXX
- #endif
- #ifndef _DIALOG_HXX
- #endif
- #ifndef _MSGBOX_H
- #endif
-
- #define RET_OK 1
- #define RET_CANCEL 2
- #define RET_YES 3
- #define RET_NO 4
- #define RET_RETRY 5
-
- class MessBox : public ModalDialog
- {
- protected:
- ImpMessBox aImpMess;
-
- #ifdef MAC
- void Paint( const Rectangle& rRect );
- #endif
-
- public:
- MessBox( Window* pParent, WinBits nWinStyle,
- const String& rTitle, const String& rMessage );
- MessBox( Window* pParent, ResId& rResId );
- ~MessBox();
-
- short Execute();
- };
-
- class InfoBox : public MessBox
- {
- public:
- InfoBox( Window* pParent, const String& rMessage );
- InfoBox( Window* pParent, ResId & rResId );
- };
-
- class WarningBox : public MessBox
- {
- public:
- WarningBox( Window* pParent, WinBits nWinStyle,
- const String& rMessage );
- WarningBox( Window* pParent, ResId& rResId );
- };
-
- class ErrorBox : public MessBox
- {
- public:
- ErrorBox( Window* pParent, WinBits nWinStyle,
- const String& rMessage );
- ErrorBox( Window* pParent, ResId& rResId );
- };
-
- class QueryBox : public MessBox
- {
- public:
- QueryBox( Window* pParent, WinBits nWinStyle,
- const String& rMessage );
- QueryBox( Window* pParent, ResId& rResId );
- };
-
- class SysMessBox : public MessBox
- {
- public:
- SysMessBox( Window* pParent, WinBits nWinStyle,
- const String& rMessage );
- SysMessBox( Window* pParent, ResId& rResId );
- };
-
- #endif
- #endif
- #endif
- #ifndef SV_NOMENU
-
- #ifndef _MENU_HXX
- #define _MENU_HXX
-
- #ifndef _SV_H
- #endif
- #ifndef _RESID_HXX
- #endif
- #ifndef _RC_HXX
- #endif
- #ifndef _MENU_H
- #endif
-
- struct RCENUM_TYPE;
- class PopupMenu;
- class Bitmap;
- class HelpEvent;
-
- #define MENU_APPEND ((USHORT)-1)
- #define MENU_ITEM_NOTFOUND ((USHORT)-1)
-
- class Menu : public Resource
- {
- protected:
- ImpMenu aImpMenu;
-
- Menu();
- Menu( ResId& );
-
- virtual void Activate();
- virtual void Deactivate();
- virtual void Highlight();
- virtual void Select();
- virtual void RequestHelp( const HelpEvent& rHEvt );
-
- public:
- virtual ~Menu();
-
- BOOL InsertItem( ResId& rResId, USHORT nPos = MENU_APPEND );
- BOOL InsertItem( USHORT nItemId, const String& rStr,
- USHORT nPos = MENU_APPEND );
- BOOL InsertItem( USHORT nItemId, const Bitmap& rBitmap,
- USHORT nPos = MENU_APPEND );
- void InsertSeparator( USHORT nPos = MENU_APPEND );
- void RemoveItem( USHORT nPos );
-
- USHORT GetItemCount() const;
- USHORT GetItemId( USHORT nPos ) const;
- USHORT GetItemPos( USHORT nItemId ) const;
- USHORT GetCurItemId() const;
-
- PopupMenu* ChangePopupMenu( USHORT nItemId, PopupMenu* pMenu );
- PopupMenu* GetPopupMenu( 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;
- USHORT GetItemTextLen( 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;
- USHORT GetHelpTextLen( 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();
- };
-
- class MenuBar : public Menu
- {
- public:
- MenuBar();
- MenuBar( ResId& rResId );
- };
-
- class PopupMenu : public Menu
- {
- public:
- PopupMenu();
- PopupMenu( ResId& rResId );
-
- void Execute( const Point& rPopupPos );
- };
-
- #endif
- #endif
-
- #ifndef _TIMER_HXX
- #define _TIMER_HXX
-
- #ifndef _TOOLS_HXX
- #endif
- #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();
-
- 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; }
- };
-
- class AutoTimer : public Timer
- {
- public:
- AutoTimer();
- };
-
- #endif
-
- #ifndef _GDIMTF_HXX
- #define _GDIMTF_HXX
-
- #ifndef _TOOLS_HXX
- #endif
- #ifndef _SV_H
- #endif
-
- class OutputDevice;
-
- class GDIMetaFile : public MetaFile
- {
- private:
- GDIMetaFile* pPrev;
- GDIMetaFile* pNext;
-
- protected:
- void AddGDIAction( MetaAction* pAction );
- void Linker( void* pObject, BOOL bLink );
-
- public:
- GDIMetaFile();
- GDIMetaFile( const GDIMetaFile& rMtf );
- ~GDIMetaFile();
-
- BOOL Record( OutputDevice* pOutDev )
- { return MetaFile::Record( (void*)pOutDev ); }
- BOOL Play( OutputDevice* pOutDev )
- { return MetaFile::Play( (void*)pOutDev ); }
- BOOL Play( OutputDevice* pOutDev, const String& rToLabel )
- { return MetaFile::Play( (void*)pOutDev, rToLabel ); }
- BOOL Play( GDIMetaFile& rMtf )
- { return MetaFile::Play( rMtf ); }
- BOOL Play( GDIMetaFile& rMtf, const String& rToLabel )
- { return MetaFile::Play( rMtf, rToLabel ); }
-
- GDIMetaFile& operator=( const GDIMetaFile& rMtf );
-
- BOOL SaveStatus();
- };
-
- #endif
- #endif
- #endif
-