OS/2 PM Fixeups for fonts, validators, and html

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4428 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Webster
1999-11-08 05:20:31 +00:00
parent 57c4d796c5
commit 5d4b632ba3
25 changed files with 227 additions and 34 deletions

View File

@@ -28,12 +28,20 @@ IMPLEMENT_DYNAMIC_CLASS(wxBitmapButton, wxButton)
bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
const wxPoint& pos,
const wxSize& size, long style,
#if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator,
# else
const wxValidator& validator,
# endif
#endif
const wxString& name)
{
m_buttonBitmap = bitmap;
SetName(name);
#if wxUSE_VALIDATORS
SetValidator(validator);
#endif
parent->AddChild(this);

View File

@@ -32,11 +32,19 @@ IMPLEMENT_DYNAMIC_CLASS(wxButton, wxControl)
bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label,
const wxPoint& pos,
const wxSize& size, long style,
#if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator,
# else
const wxValidator& validator,
# endif
#endif
const wxString& name)
{
SetName(name);
#if wxUSE_VALIDATORS
SetValidator(validator);
#endif
m_windowStyle = style;
parent->AddChild((wxButton *)this);

View File

@@ -49,11 +49,19 @@ bool wxCheckBox::OS2Command(WXUINT WXUNUSED(param), WXWORD WXUNUSED(id))
bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
const wxPoint& pos,
const wxSize& size, long style,
#if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator,
# else
const wxValidator& validator,
# endif
#endif
const wxString& name)
{
SetName(name);
#if wxUSE_VALIDATORS
SetValidator(validator);
#endif
if (parent) parent->AddChild(this);
SetBackgroundColour(parent->GetBackgroundColour()) ;
@@ -176,11 +184,19 @@ void wxCheckBox::Command (wxCommandEvent & event)
bool wxBitmapCheckBox::Create(wxWindow *parent, wxWindowID id, const wxBitmap *label,
const wxPoint& pos,
const wxSize& size, long style,
#if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator,
# else
const wxValidator& validator,
# endif
#endif
const wxString& name)
{
SetName(name);
#if wxUSE_VALIDATORS
SetValidator(validator);
#endif
if (parent) parent->AddChild(this);
SetBackgroundColour(parent->GetBackgroundColour()) ;

View File

@@ -259,7 +259,13 @@ wxCheckListBox::wxCheckListBox() : wxListBox()
wxCheckListBox::wxCheckListBox(wxWindow *parent, wxWindowID id,
const wxPoint& pos, const wxSize& size,
int nStrings, const wxString choices[],
#if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
long style, const wxValidator* val,
# else
long style, const wxValidator& val,
# endif
#endif
const wxString& name)
: wxListBox()
{

View File

@@ -30,7 +30,13 @@ bool wxChoice::Create(wxWindow *parent,
const wxSize& size,
int n, const wxString choices[],
long style,
#if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator,
# else
const wxValidator& validator,
# endif
#endif
const wxString& name)
{
if ( !CreateControl(parent, id, pos, size, style, validator, name) )

View File

@@ -63,11 +63,19 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
const wxSize& size,
int n, const wxString choices[],
long style,
#if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator,
# else
const wxValidator& validator,
# endif
#endif
const wxString& name)
{
SetName(name);
#if wxUSE_VALIDATORS
SetValidator(validator);
#endif
if (parent) parent->AddChild(this);
SetBackgroundColour(parent->GetBackgroundColour()) ;
SetForegroundColour(parent->GetForegroundColour()) ;

View File

@@ -57,7 +57,13 @@ bool wxGauge::Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos,
const wxSize& size,
long style,
#if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator,
# else
const wxValidator& validator,
# endif
#endif
const wxString& name)
{
static bool wxGaugeOS2Initialised = FALSE;
@@ -73,7 +79,9 @@ bool wxGauge::Create(wxWindow *parent, wxWindowID id,
}
SetName(name);
#if wxUSE_VALIDATORS
SetValidator(validator);
#endif
if (parent) parent->AddChild(this);
m_rangeMax = range;
m_gaugePos = 0;

View File

@@ -80,7 +80,13 @@ bool wxListBox::Create(wxWindow *parent,
const wxSize& size,
int n, const wxString choices[],
long style,
#if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator,
# else
const wxValidator& validator,
# endif
#endif
const wxString& name)
{
m_noItems = 0;
@@ -88,7 +94,9 @@ bool wxListBox::Create(wxWindow *parent,
m_selected = 0;
SetName(name);
#if wxUSE_VALIDATORS
SetValidator(validator);
#endif
if (parent)
parent->AddChild(this);

View File

@@ -143,14 +143,21 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
const wxPoint& pos, const wxSize& size,
int n, const wxString choices[],
int majorDim, long style,
#if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* val, const wxString& name)
# else
const wxValidator& val, const wxString& name)
# endif
#endif
{
m_selectedButton = -1;
m_noItems = n;
SetName(name);
#if wxUSE_VALIDATORS
SetValidator(val);
#endif
parent->AddChild(this);
m_backgroundColour = parent->GetBackgroundColour();
m_foregroundColour = parent->GetForegroundColour();

View File

@@ -46,11 +46,19 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id,
const wxString& label,
const wxPoint& pos,
const wxSize& size, long style,
#if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator,
# else
const wxValidator& validator,
# endif
#endif
const wxString& name)
{
SetName(name);
#if wxUSE_VALIDATORS
SetValidator(validator);
#endif
if (parent) parent->AddChild(this);
@@ -150,11 +158,19 @@ bool wxBitmapRadioButton::Create(wxWindow *parent, wxWindowID id,
const wxBitmap *bitmap,
const wxPoint& pos,
const wxSize& size, long style,
#if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator,
# else
const wxValidator& validator,
# endif
#endif
const wxString& name)
{
SetName(name);
#if wxUSE_VALIDATORS
SetValidator(validator);
#endif
if (parent) parent->AddChild(this);
SetBackgroundColour(parent->GetBackgroundColour());

View File

@@ -35,14 +35,22 @@ END_EVENT_TABLE()
bool wxScrollBar::Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos,
const wxSize& size, long style,
#if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator,
# else
const wxValidator& validator,
# endif
#endif
const wxString& name)
{
if (!parent)
return FALSE;
parent->AddChild(this);
SetName(name);
#if wxUSE_VALIDATORS
SetValidator(validator);
#endif
SetBackgroundColour(parent->GetBackgroundColour()) ;
SetForegroundColour(parent->GetForegroundColour()) ;

View File

@@ -46,11 +46,19 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id,
int value, int minValue, int maxValue,
const wxPoint& pos,
const wxSize& size, long style,
#if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator,
# else
const wxValidator& validator,
# endif
#endif
const wxString& name)
{
SetName(name);
#if wxUSE_VALIDATORS
SetValidator(validator);
#endif
if (parent) parent->AddChild(this);

View File

@@ -87,7 +87,13 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos,
const wxSize& size,
long style,
#if wxUSE_VALIDATORS
# if defined(__VISAGECPP__)
const wxValidator* validator,
# else
const wxValidator& validator,
# endif
#endif
const wxString& name)
{
// base initialization

View File

@@ -100,8 +100,7 @@ wxMutex::~wxMutex()
if (m_locked > 0)
wxLogDebug(wxT("Warning: freeing a locked mutex (%d locks)."), m_locked);
::DosCloseMutexSem(p_internal->m_vMutex);
delete p_internal;
p_internal = NULL;
p_internal->m_vMutex = NULL;
}
wxMutexError wxMutex::Lock()
@@ -244,6 +243,34 @@ void wxCondition::Broadcast()
// wxCriticalSection implementation
// ----------------------------------------------------------------------------
class wxCriticalSectionInternal
{
public:
// init the critical section object
wxCriticalSectionInternal()
{ }
// free the associated ressources
~wxCriticalSectionInternal()
{ }
private:
};
// ----------------------------------------------------------------------------
// wxCriticalSection implementation
// ----------------------------------------------------------------------------
wxCriticalSection::wxCriticalSection()
{
m_critsect = new wxCriticalSectionInternal;
}
wxCriticalSection::~wxCriticalSection()
{
delete m_critsect;
}
void wxCriticalSection::Enter()
{
::DosEnterCritSec();

View File

@@ -195,10 +195,9 @@ bool wxShell(
}
// Get free memory in bytes, or -1 if cannot determine amount (e.g. on UNIX)
long wxGetFreeMemory(
void* pMemptr
)
long wxGetFreeMemory()
{
void* pMemptr;
ULONG lSize;
ULONG lMemFlags;
APIRET rc;
@@ -309,14 +308,17 @@ int wxGetOsVersion(
)
{
ULONG ulSysInfo[QSV_MAX] = {0};
APIRET ulrc;
if (::DosQuerySysInfo( 1L
,QSV_MAX
,(PVOID)ulSysInfo
,sizeof(ULONG) * QSV_MAX
))
ulrc = ::DosQuerySysInfo( 1L
,QSV_MAX
,(PVOID)ulSysInfo
,sizeof(ULONG) * QSV_MAX
);
if (ulrc == 0L)
{
*pMajorVsn = ulSysInfo[QSV_VERSION_MAJOR];
*pMajorVsn = *pMajorVsn/10;
*pMinorVsn = ulSysInfo[QSV_VERSION_MINOR];
return wxWINDOWS_OS2;
}
@@ -427,10 +429,10 @@ bool wxGetResource(
,(PSZ)WXSTRINGCAST rSection
,(PSZ)WXSTRINGCAST rEntry
,(PSZ)zDefunkt
,(void*)wxBuffer
,(void*)*ppValue
,1000
);
if (n == 0L || wxStrcmp(wxBuffer, zDefunkt) == 0)
if (n != 0L || wxStrcmp(*ppValue, zDefunkt) == 0)
return FALSE;
}
else
@@ -442,15 +444,12 @@ bool wxGetResource(
,(PSZ)WXSTRINGCAST rSection
,(PSZ)WXSTRINGCAST rEntry
,(PSZ)zDefunkt
,(void*)wxBuffer
,(void*)*ppValue
,1000
);
if (n == 0L || wxStrcmp(wxBuffer, zDefunkt) == 0)
if (n != 0L || wxStrcmp(*ppValue, zDefunkt) == 0)
return FALSE;
}
if (*ppValue)
delete[] (*ppValue);
*ppValue = copystring(wxBuffer);
return TRUE;
}