home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2004 September
/
CHIP_CD_2004-09.iso
/
software
/
custombar
/
CustomBar_trial_100_setup.exe
/
UNIVAR.h
< prev
next >
Wrap
C/C++ Source or Header
|
2004-06-08
|
3KB
|
77 lines
/*
----------------------------------------------------------------------
| CUSTOMBAR PLUGIN SDK
|
| This library is distributed in the hope that it will be useful,
| but WITHOUT ANY WARRANTY; without even the implied warranty of
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
| Copyright (C) 2002-2004 Lizardsoft. All Rights Reserved.
---------------------------------------------------------------------- */
#if !defined(UNIVAR_H__37CC3310_6331_4CD7_B7FD_B0sdfdsfdsfsd5827386__INCLUDED_)
#define UNIVAR_H__37CC3310_6331_4CD7_B7FD_B0sdfdsfdsfsd5827386__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <winbase.h>
#include <tchar.h>
#include "UniTrans.h"
#include "DataUtil.h"
class UNIVAR
{
private:
void *ptrV;
public:
UNIVAR( ) { ptrV = UT_Create(); }
~UNIVAR( ) { UT_Destroy(ptrV); }
int SetType( int NewType ) { return UT_SetType(ptrV, NewType); }
int GetType() { return UT_GetType(ptrV); }
// easier value retrieval
int GetInt() const { return UT_GetInt(ptrV); }
float GetFloat() const { return UT_GetFloat(ptrV); }
COLORREF GetColor() const { return UT_GetColor(ptrV); }
// read-only value retrieval
const TCHAR *GetConstStr( int *Len = 0 ) const { return UT_GetConstStr(ptrV, Len); }
//const RECT *GetConstRect() const;
// writable value retrieval, see functions for more information on proper use
// this block of functions requires object to be locked
TCHAR *GetWriteStr( int *Len = 0 ) { return UT_GetWriteStr(ptrV, Len); }
//RECT *GetWriteRect();
int ReallocStr( int NewLen ) { return UT_ReallocStr(ptrV, NewLen); }
// value retrieval (forced conversions)
int GetAsInt( int *Val ) { return UT_GetAsInt(ptrV, Val); }
//int SetVal( UNIVAR& NewVal, int Flags = 0 ) const { return UT_SetVal_Uni( ptrV, NewVal.ptrV, Flags ); }
//int SetVal( char *NewVal, int Flags = 0 ) const { return UT_SetVal_Char( ptrV, NewVal, Flags ); }
int SetVal( int NewVal, int Flags = 0 ) const { return UT_SetVal_Int( ptrV, NewVal, Flags ); }
int SetVal( float NewVal, int Flags = 0 ) const { return UT_SetVal_Float( ptrV, NewVal, Flags ); }
//int SetVal( COLORREF& NewVal, int Flags = 0 ) const { return UT_SetVal_Color( ptrV, &NewVal, Flags ); }
//int SetVal( RECT& NewVal, int Flags = 0 ) const { return UT_SetVal_Rect( ptrV, &NewVal, Flags ); }
int SetInt ( int NewValue ) { return UT_SetInt( ptrV, NewValue ); }
int SetFloat( float NewValue ) { return UT_SetFloat( ptrV, NewValue ); }
int SetStr ( const TCHAR *NewStr, int Len = 0 ) { return UT_SetStr( ptrV, NewStr, Len ); }
int Lock() { return UT_Lock(ptrV); }
int Unlock() { return UT_Unlock(ptrV); }
bool IsLocked() const { return UT_IsLocked(ptrV); }
};
#endif // !defined(UNIVAR_H__37CC3310_6331_4CD7_B7FD_B0sdfdsfdsfsd5827386__INCLUDED_)