From 51220476391c140c6fed080039b54aa8aea8da53 Mon Sep 17 00:00:00 2001 From: anders_k Date: Thu, 1 Nov 2018 23:09:07 +0000 Subject: [PATCH] Moved POSIX dialog unit calcilation function stubs git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7036 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/DialogTemplate.cpp | 6 +++++- Source/DialogTemplate.h | 6 ++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Source/DialogTemplate.cpp b/Source/DialogTemplate.cpp index 8032c4df..f560d992 100644 --- a/Source/DialogTemplate.cpp +++ b/Source/DialogTemplate.cpp @@ -430,7 +430,11 @@ void CDialogTemplate::CTrimToString(WORD id, TCHAR *str, int margins) { item->sWidth = short(size.cx); item->sHeight = short(size.cy); } -#endif +#else //! WIN32 +void CDialogTemplate::PixelsToDlgUnits(short& x, short& y) { assert(0); } +void CDialogTemplate::PixelsToDlgUnits(SIZE& siz) { assert(0); } +void CDialogTemplate::DlgUnitsToPixels(short& x, short& y) { assert(0); } +#endif //~ WIN32 // Moves every item right and gives it the WS_EX_RIGHT extended style void CDialogTemplate::ConvertToRTL() { diff --git a/Source/DialogTemplate.h b/Source/DialogTemplate.h index 17dc0bea..15d9fe5d 100644 --- a/Source/DialogTemplate.h +++ b/Source/DialogTemplate.h @@ -123,19 +123,17 @@ public: #endif void MoveAll(short x, short y); void Resize(short x, short y); -#ifdef _WIN32 - static inline bool SupportsDialogUnitComputation() { return true; } void PixelsToDlgUnits(short& x, short& y); void PixelsToDlgUnits(SIZE& siz); void DlgUnitsToPixels(short& x, short& y); +#ifdef _WIN32 + static inline bool SupportsDialogUnitComputation() { return true; } SIZE GetStringSize(WORD id, TCHAR *str); void RTrimToString(WORD id, TCHAR *str, int margins); void LTrimToString(WORD id, TCHAR *str, int margins); void CTrimToString(WORD id, TCHAR *str, int margins); #else static inline bool SupportsDialogUnitComputation() { return false; } - inline void PixelsToDlgUnits(short& x, short& y) { assert(0); } - inline void DlgUnitsToPixels(short& x, short& y) { assert(0); } #endif void ConvertToRTL(); BYTE* Save(DWORD& dwSize);