/////////////////////////////////////////////////////////////////////////////
-// Name: gauge.cpp
+// Name: src/os2/gauge.cpp
// Purpose: wxGauge class
// Author: David Webster
// Modified by:
// Created: 10/06/99
// RCS-ID: $Id$
// Copyright: (c) David Webster
-// Licence: wxWidgets licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h"
#ifndef WX_PRECOMP
-#include "wx/defs.h"
-#include "wx/utils.h"
-#include "wx/scrolwin.h"
+ #include "wx/utils.h"
+ #include "wx/scrolwin.h"
#endif
#include "wx/os2/private.h"
#endif
if (pParent)
pParent->AddChild(this);
- m_backgroundColour.Set(wxString("LIGHT GREY"));
- m_foregroundColour.Set(wxString("NAVY"));
+ m_backgroundColour.Set(wxString(wxT("LIGHT GREY")));
+ m_foregroundColour.Set(wxString(wxT("NAVY")));
m_nRangeMax = nRange;
m_nGaugePos = 0;
,nWidth
,nHeight
);
+ m_nWidth = nWidth; // Save for GetBestSize
+ m_nHeight = nHeight;
::WinShowWindow((HWND)GetHWND(), TRUE);
delete pTextFont;
return TRUE;
return m_nGaugePos;
} // end of wxGauge::GetValue
-bool wxGauge::SetBackgroundColour(
- const wxColour& rColour
-)
+bool wxGauge::SetBackgroundColour( const wxColour& rColour )
{
if (!wxControl::SetBackgroundColour(rColour))
- return FALSE;
+ return false;
LONG lColor = (LONG)rColour.GetPixel();
,sizeof(LONG)
,(PVOID)&lColor
);
- return TRUE;
+ return true;
} // end of wxGauge::SetBackgroundColour
void wxGauge::SetBezelFace(
{
} // end of wxGauge::SetBezelFace
-bool wxGauge::SetForegroundColour(
- const wxColour& rColour
-)
+bool wxGauge::SetForegroundColour( const wxColour& rColour )
{
if (!wxControl::SetForegroundColour(rColour))
- return FALSE;
+ return false;
- LONG lColor = (LONG)rColour.GetPixel();
+ LONG lColor = (LONG)rColour.GetPixel();
::WinSetPresParam( GetHwnd()
,PP_FOREGROUNDCOLOR
,(PVOID)&lColor
);
- return TRUE;
+ return true;
} // end of wxGauge::SetForegroundColour
void wxGauge::SetRange(
::WinInvalidateRect(GetHwnd(), &vRect, FALSE);
} // end of wxGauge::SetValue
-
+wxSize wxGauge::DoGetBestSize() const
+{
+ return wxSize(m_nWidth,m_nHeight);
+}