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:
@@ -42,7 +42,13 @@ bool wxControlBase::CreateControl(wxWindowBase *parent,
|
|||||||
const wxPoint& pos,
|
const wxPoint& pos,
|
||||||
const wxSize& size,
|
const wxSize& size,
|
||||||
long style,
|
long style,
|
||||||
|
#if wxUSE_VALIDATORS
|
||||||
|
# if defined(__VISAGECPP__)
|
||||||
|
const wxValidator* validator,
|
||||||
|
# else
|
||||||
const wxValidator& validator,
|
const wxValidator& validator,
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
const wxString& name)
|
const wxString& name)
|
||||||
{
|
{
|
||||||
// even if it's possible to create controls without parents in some port,
|
// even if it's possible to create controls without parents in some port,
|
||||||
|
@@ -36,7 +36,7 @@
|
|||||||
// treated as a static global class by VA and thus cannot use in this form.
|
// treated as a static global class by VA and thus cannot use in this form.
|
||||||
// Defined as a pointer and then explicity allocated and deallocated
|
// Defined as a pointer and then explicity allocated and deallocated
|
||||||
// by user if desired
|
// by user if desired
|
||||||
const wxValidator* wxDefaultValidator;
|
const wxValidator* wxDefaultValidator = NULL;
|
||||||
#else
|
#else
|
||||||
const wxValidator wxDefaultValidator;
|
const wxValidator wxDefaultValidator;
|
||||||
#endif
|
#endif
|
||||||
|
@@ -154,7 +154,13 @@ bool wxWindowBase::CreateBase(wxWindowBase *parent,
|
|||||||
const wxPoint& WXUNUSED(pos),
|
const wxPoint& WXUNUSED(pos),
|
||||||
const wxSize& WXUNUSED(size),
|
const wxSize& WXUNUSED(size),
|
||||||
long style,
|
long style,
|
||||||
|
#if wxUSE_VALIDATORS
|
||||||
|
# if defined(__VISAGECPP__)
|
||||||
|
const wxValidator* validator,
|
||||||
|
# else
|
||||||
const wxValidator& validator,
|
const wxValidator& validator,
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
const wxString& name)
|
const wxString& name)
|
||||||
{
|
{
|
||||||
// m_isWindow is set to TRUE in wxWindowBase::Init() as well as many other
|
// m_isWindow is set to TRUE in wxWindowBase::Init() as well as many other
|
||||||
@@ -589,6 +595,18 @@ void wxWindowBase::SetCaret(wxCaret *caret)
|
|||||||
// validators
|
// validators
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# if defined(__VISAGECPP__)
|
||||||
|
void wxWindowBase::SetValidator(const wxValidator* validator)
|
||||||
|
{
|
||||||
|
if ( m_windowValidator )
|
||||||
|
delete m_windowValidator;
|
||||||
|
|
||||||
|
m_windowValidator = (wxValidator *)validator->Clone();
|
||||||
|
|
||||||
|
if ( m_windowValidator )
|
||||||
|
m_windowValidator->SetWindow(this) ;
|
||||||
|
}
|
||||||
|
# else
|
||||||
void wxWindowBase::SetValidator(const wxValidator& validator)
|
void wxWindowBase::SetValidator(const wxValidator& validator)
|
||||||
{
|
{
|
||||||
if ( m_windowValidator )
|
if ( m_windowValidator )
|
||||||
@@ -599,6 +617,7 @@ void wxWindowBase::SetValidator(const wxValidator& validator)
|
|||||||
if ( m_windowValidator )
|
if ( m_windowValidator )
|
||||||
m_windowValidator->SetWindow(this) ;
|
m_windowValidator->SetWindow(this) ;
|
||||||
}
|
}
|
||||||
|
# endif // __VISAGECPP__
|
||||||
#endif // wxUSE_VALIDATORS
|
#endif // wxUSE_VALIDATORS
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -895,14 +914,14 @@ bool wxWindowBase::Layout()
|
|||||||
{
|
{
|
||||||
int w, h;
|
int w, h;
|
||||||
GetClientSize(&w, &h);
|
GetClientSize(&w, &h);
|
||||||
|
|
||||||
// If there is a sizer, use it instead of the constraints
|
// If there is a sizer, use it instead of the constraints
|
||||||
if ( GetSizer() )
|
if ( GetSizer() )
|
||||||
{
|
{
|
||||||
GetSizer()->SetDimension( 0, 0, w, h );
|
GetSizer()->SetDimension( 0, 0, w, h );
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( GetConstraints() )
|
if ( GetConstraints() )
|
||||||
{
|
{
|
||||||
GetConstraints()->width.SetValue(w);
|
GetConstraints()->width.SetValue(w);
|
||||||
@@ -914,7 +933,7 @@ bool wxWindowBase::Layout()
|
|||||||
DoPhase(1); // Just one phase need if no sizers involved
|
DoPhase(1); // Just one phase need if no sizers involved
|
||||||
DoPhase(2);
|
DoPhase(2);
|
||||||
SetConstraintSizes(); // Recursively set the real window sizes
|
SetConstraintSizes(); // Recursively set the real window sizes
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -956,7 +956,13 @@ END_EVENT_TABLE()
|
|||||||
wxListTextCtrl::wxListTextCtrl( wxWindow *parent, const wxWindowID id,
|
wxListTextCtrl::wxListTextCtrl( wxWindow *parent, const wxWindowID id,
|
||||||
bool *accept, wxString *res, wxListMainWindow *owner,
|
bool *accept, wxString *res, wxListMainWindow *owner,
|
||||||
const wxString &value, const wxPoint &pos, const wxSize &size,
|
const wxString &value, const wxPoint &pos, const wxSize &size,
|
||||||
|
#if wxUSE_VALIDATORS
|
||||||
|
# if defined(__VISAGECPP__)
|
||||||
|
int style, const wxValidator* validator, const wxString &name ) :
|
||||||
|
# else
|
||||||
int style, const wxValidator& validator, const wxString &name ) :
|
int style, const wxValidator& validator, const wxString &name ) :
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
wxTextCtrl( parent, id, value, pos, size, style, validator, name )
|
wxTextCtrl( parent, id, value, pos, size, style, validator, name )
|
||||||
{
|
{
|
||||||
m_res = res;
|
m_res = res;
|
||||||
@@ -2497,7 +2503,13 @@ wxListCtrl::~wxListCtrl()
|
|||||||
|
|
||||||
bool wxListCtrl::Create( wxWindow *parent, wxWindowID id,
|
bool wxListCtrl::Create( wxWindow *parent, wxWindowID id,
|
||||||
const wxPoint &pos, const wxSize &size,
|
const wxPoint &pos, const wxSize &size,
|
||||||
|
#if wxUSE_VALIDATORS
|
||||||
|
# if defined(__VISAGECPP__)
|
||||||
|
long style, const wxValidator *validator,
|
||||||
|
# else
|
||||||
long style, const wxValidator &validator,
|
long style, const wxValidator &validator,
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
const wxString &name )
|
const wxString &name )
|
||||||
{
|
{
|
||||||
m_imageListNormal = (wxImageList *) NULL;
|
m_imageListNormal = (wxImageList *) NULL;
|
||||||
|
@@ -196,7 +196,13 @@ END_EVENT_TABLE()
|
|||||||
wxTreeTextCtrl::wxTreeTextCtrl( wxWindow *parent, const wxWindowID id,
|
wxTreeTextCtrl::wxTreeTextCtrl( wxWindow *parent, const wxWindowID id,
|
||||||
bool *accept, wxString *res, wxTreeCtrl *owner,
|
bool *accept, wxString *res, wxTreeCtrl *owner,
|
||||||
const wxString &value, const wxPoint &pos, const wxSize &size,
|
const wxString &value, const wxPoint &pos, const wxSize &size,
|
||||||
|
#if wxUSE_VALIDATORS
|
||||||
|
# if defined(__VISAGECPP__)
|
||||||
|
int style, const wxValidator* validator, const wxString &name ) :
|
||||||
|
# else
|
||||||
int style, const wxValidator& validator, const wxString &name ) :
|
int style, const wxValidator& validator, const wxString &name ) :
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
wxTextCtrl( parent, id, value, pos, size, style, validator, name )
|
wxTextCtrl( parent, id, value, pos, size, style, validator, name )
|
||||||
{
|
{
|
||||||
m_res = res;
|
m_res = res;
|
||||||
@@ -522,7 +528,13 @@ void wxTreeCtrl::Init()
|
|||||||
bool wxTreeCtrl::Create(wxWindow *parent, wxWindowID id,
|
bool wxTreeCtrl::Create(wxWindow *parent, wxWindowID id,
|
||||||
const wxPoint& pos, const wxSize& size,
|
const wxPoint& pos, const wxSize& size,
|
||||||
long style,
|
long style,
|
||||||
|
#if wxUSE_VALIDATORS
|
||||||
|
# if defined(__VISAGECPP__)
|
||||||
|
const wxValidator *validator,
|
||||||
|
# else
|
||||||
const wxValidator &validator,
|
const wxValidator &validator,
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
const wxString& name )
|
const wxString& name )
|
||||||
{
|
{
|
||||||
Init();
|
Init();
|
||||||
|
@@ -142,6 +142,14 @@ bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id, const wxString& ti
|
|||||||
|
|
||||||
wxFrame::Create(parent, id, _("Help"), wxPoint(m_Cfg.x, m_Cfg.y), wxSize(m_Cfg.w, m_Cfg.h));
|
wxFrame::Create(parent, id, _("Help"), wxPoint(m_Cfg.x, m_Cfg.y), wxSize(m_Cfg.w, m_Cfg.h));
|
||||||
|
|
||||||
|
#if defined(__WXMSW__) || (__WXPM__)
|
||||||
|
wxIcon frameIcon("wxhelp", wxBITMAP_TYPE_ICO_RESOURCE, 32, 32);
|
||||||
|
#else
|
||||||
|
wxIcon frameIcon(help_xpm);
|
||||||
|
#endif
|
||||||
|
if (frameIcon.Ok())
|
||||||
|
SetIcon(frameIcon);
|
||||||
|
|
||||||
GetPosition(&m_Cfg.x, &m_Cfg.y);
|
GetPosition(&m_Cfg.x, &m_Cfg.y);
|
||||||
|
|
||||||
SetIcon(wxICON(help));
|
SetIcon(wxICON(help));
|
||||||
@@ -157,7 +165,7 @@ bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id, const wxString& ti
|
|||||||
toolBar -> SetMargins(2, 2);
|
toolBar -> SetMargins(2, 2);
|
||||||
wxBitmap* toolBarBitmaps[3];
|
wxBitmap* toolBarBitmaps[3];
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
#if defined(__WXMSW__) || (__WXPM__)
|
||||||
toolBarBitmaps[0] = new wxBitmap("panel");
|
toolBarBitmaps[0] = new wxBitmap("panel");
|
||||||
toolBarBitmaps[1] = new wxBitmap("back");
|
toolBarBitmaps[1] = new wxBitmap("back");
|
||||||
toolBarBitmaps[2] = new wxBitmap("forward");
|
toolBarBitmaps[2] = new wxBitmap("forward");
|
||||||
@@ -614,7 +622,7 @@ void wxHtmlHelpFrame::OnContentsSel(wxTreeEvent& event)
|
|||||||
|
|
||||||
void wxHtmlHelpFrame::OnIndexSel(wxCommandEvent& WXUNUSED(event))
|
void wxHtmlHelpFrame::OnIndexSel(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
wxHtmlContentsItem *it = (wxHtmlContentsItem*) m_IndexBox -> GetClientData(m_IndexBox -> GetSelection());
|
wxHtmlContentsItem *it = (wxHtmlContentsItem*) m_IndexBox -> GetClientData(m_IndexBox -> GetSelection());
|
||||||
m_HtmlWin -> LoadPage(it -> m_Book -> GetBasePath() + it -> m_Page);
|
m_HtmlWin -> LoadPage(it -> m_Book -> GetBasePath() + it -> m_Page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
# info
|
# info
|
||||||
|
|
||||||
# Set WXDIR for your system
|
# Set WXDIR for your system
|
||||||
WXDIR = $(WXWIN)
|
WXDIR = j:\dev\wx2\wxWindows
|
||||||
|
|
||||||
!include $(WXDIR)\src\makevc.env
|
!include $(WXDIR)\src\makevc.env
|
||||||
|
|
||||||
|
@@ -11,13 +11,13 @@
|
|||||||
# info
|
# info
|
||||||
|
|
||||||
# Set WXDIR for your system
|
# Set WXDIR for your system
|
||||||
WXDIR = $(WXWIN)
|
WXDIR = j:\dev\wx2\wxWindows
|
||||||
|
|
||||||
WXUSINGDLL=0
|
WXUSINGDLL=0
|
||||||
|
|
||||||
!include $(WXDIR)\src\makevc.env
|
!include $(WXDIR)\src\makevc.env
|
||||||
|
|
||||||
all: $(PROGRAM).exe $(EXTRATARGETS)
|
all: $(PROGRAM).exe
|
||||||
|
|
||||||
wx:
|
wx:
|
||||||
cd $(WXDIR)\src\msw
|
cd $(WXDIR)\src\msw
|
||||||
@@ -29,17 +29,14 @@ wxclean:
|
|||||||
nmake -f makefile.vc clean
|
nmake -f makefile.vc clean
|
||||||
# cd $(THISDIR)
|
# cd $(THISDIR)
|
||||||
|
|
||||||
$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res
|
$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS)
|
||||||
$(link) @<<
|
$(link) @<<
|
||||||
-out:$(PROGRAM).exe
|
-out:$(PROGRAM).exe
|
||||||
$(LINKFLAGS)
|
$(LINKFLAGS)
|
||||||
$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res
|
$(DUMMYOBJ) $(OBJECTS)
|
||||||
$(LIBS)
|
$(LIBS)
|
||||||
<<
|
<<
|
||||||
|
|
||||||
$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc
|
|
||||||
$(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
-erase $(OBJECTS)
|
-erase $(OBJECTS)
|
||||||
-erase *.exe
|
-erase *.exe
|
||||||
|
@@ -43,7 +43,7 @@ WINLIBS=kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib sh
|
|||||||
comctl32.lib ctl3d32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib # libci.lib # libci.lib required for VC++ 4.2
|
comctl32.lib ctl3d32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib # libci.lib # libci.lib required for VC++ 4.2
|
||||||
|
|
||||||
# Change this to your WXWIN directory
|
# Change this to your WXWIN directory
|
||||||
WXDIR=$(WXWIN)
|
WXDIR=j:\dev\wx2\wxWindows
|
||||||
|
|
||||||
WXSRC=$(WXDIR)\src\msw
|
WXSRC=$(WXDIR)\src\msw
|
||||||
WXINC=$(WXDIR)\include
|
WXINC=$(WXDIR)\include
|
||||||
|
@@ -28,12 +28,20 @@ IMPLEMENT_DYNAMIC_CLASS(wxBitmapButton, wxButton)
|
|||||||
bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
|
bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
|
||||||
const wxPoint& pos,
|
const wxPoint& pos,
|
||||||
const wxSize& size, long style,
|
const wxSize& size, long style,
|
||||||
|
#if wxUSE_VALIDATORS
|
||||||
|
# if defined(__VISAGECPP__)
|
||||||
|
const wxValidator* validator,
|
||||||
|
# else
|
||||||
const wxValidator& validator,
|
const wxValidator& validator,
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
const wxString& name)
|
const wxString& name)
|
||||||
{
|
{
|
||||||
m_buttonBitmap = bitmap;
|
m_buttonBitmap = bitmap;
|
||||||
SetName(name);
|
SetName(name);
|
||||||
|
#if wxUSE_VALIDATORS
|
||||||
SetValidator(validator);
|
SetValidator(validator);
|
||||||
|
#endif
|
||||||
|
|
||||||
parent->AddChild(this);
|
parent->AddChild(this);
|
||||||
|
|
||||||
|
@@ -32,11 +32,19 @@ IMPLEMENT_DYNAMIC_CLASS(wxButton, wxControl)
|
|||||||
bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label,
|
bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label,
|
||||||
const wxPoint& pos,
|
const wxPoint& pos,
|
||||||
const wxSize& size, long style,
|
const wxSize& size, long style,
|
||||||
|
#if wxUSE_VALIDATORS
|
||||||
|
# if defined(__VISAGECPP__)
|
||||||
|
const wxValidator* validator,
|
||||||
|
# else
|
||||||
const wxValidator& validator,
|
const wxValidator& validator,
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
const wxString& name)
|
const wxString& name)
|
||||||
{
|
{
|
||||||
SetName(name);
|
SetName(name);
|
||||||
|
#if wxUSE_VALIDATORS
|
||||||
SetValidator(validator);
|
SetValidator(validator);
|
||||||
|
#endif
|
||||||
m_windowStyle = style;
|
m_windowStyle = style;
|
||||||
|
|
||||||
parent->AddChild((wxButton *)this);
|
parent->AddChild((wxButton *)this);
|
||||||
|
@@ -49,11 +49,19 @@ bool wxCheckBox::OS2Command(WXUINT WXUNUSED(param), WXWORD WXUNUSED(id))
|
|||||||
bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
|
bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
|
||||||
const wxPoint& pos,
|
const wxPoint& pos,
|
||||||
const wxSize& size, long style,
|
const wxSize& size, long style,
|
||||||
|
#if wxUSE_VALIDATORS
|
||||||
|
# if defined(__VISAGECPP__)
|
||||||
|
const wxValidator* validator,
|
||||||
|
# else
|
||||||
const wxValidator& validator,
|
const wxValidator& validator,
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
const wxString& name)
|
const wxString& name)
|
||||||
{
|
{
|
||||||
SetName(name);
|
SetName(name);
|
||||||
|
#if wxUSE_VALIDATORS
|
||||||
SetValidator(validator);
|
SetValidator(validator);
|
||||||
|
#endif
|
||||||
if (parent) parent->AddChild(this);
|
if (parent) parent->AddChild(this);
|
||||||
|
|
||||||
SetBackgroundColour(parent->GetBackgroundColour()) ;
|
SetBackgroundColour(parent->GetBackgroundColour()) ;
|
||||||
@@ -176,11 +184,19 @@ void wxCheckBox::Command (wxCommandEvent & event)
|
|||||||
bool wxBitmapCheckBox::Create(wxWindow *parent, wxWindowID id, const wxBitmap *label,
|
bool wxBitmapCheckBox::Create(wxWindow *parent, wxWindowID id, const wxBitmap *label,
|
||||||
const wxPoint& pos,
|
const wxPoint& pos,
|
||||||
const wxSize& size, long style,
|
const wxSize& size, long style,
|
||||||
|
#if wxUSE_VALIDATORS
|
||||||
|
# if defined(__VISAGECPP__)
|
||||||
|
const wxValidator* validator,
|
||||||
|
# else
|
||||||
const wxValidator& validator,
|
const wxValidator& validator,
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
const wxString& name)
|
const wxString& name)
|
||||||
{
|
{
|
||||||
SetName(name);
|
SetName(name);
|
||||||
|
#if wxUSE_VALIDATORS
|
||||||
SetValidator(validator);
|
SetValidator(validator);
|
||||||
|
#endif
|
||||||
if (parent) parent->AddChild(this);
|
if (parent) parent->AddChild(this);
|
||||||
|
|
||||||
SetBackgroundColour(parent->GetBackgroundColour()) ;
|
SetBackgroundColour(parent->GetBackgroundColour()) ;
|
||||||
|
@@ -259,7 +259,13 @@ wxCheckListBox::wxCheckListBox() : wxListBox()
|
|||||||
wxCheckListBox::wxCheckListBox(wxWindow *parent, wxWindowID id,
|
wxCheckListBox::wxCheckListBox(wxWindow *parent, wxWindowID id,
|
||||||
const wxPoint& pos, const wxSize& size,
|
const wxPoint& pos, const wxSize& size,
|
||||||
int nStrings, const wxString choices[],
|
int nStrings, const wxString choices[],
|
||||||
|
#if wxUSE_VALIDATORS
|
||||||
|
# if defined(__VISAGECPP__)
|
||||||
|
long style, const wxValidator* val,
|
||||||
|
# else
|
||||||
long style, const wxValidator& val,
|
long style, const wxValidator& val,
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
const wxString& name)
|
const wxString& name)
|
||||||
: wxListBox()
|
: wxListBox()
|
||||||
{
|
{
|
||||||
|
@@ -30,7 +30,13 @@ bool wxChoice::Create(wxWindow *parent,
|
|||||||
const wxSize& size,
|
const wxSize& size,
|
||||||
int n, const wxString choices[],
|
int n, const wxString choices[],
|
||||||
long style,
|
long style,
|
||||||
|
#if wxUSE_VALIDATORS
|
||||||
|
# if defined(__VISAGECPP__)
|
||||||
|
const wxValidator* validator,
|
||||||
|
# else
|
||||||
const wxValidator& validator,
|
const wxValidator& validator,
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
const wxString& name)
|
const wxString& name)
|
||||||
{
|
{
|
||||||
if ( !CreateControl(parent, id, pos, size, style, validator, name) )
|
if ( !CreateControl(parent, id, pos, size, style, validator, name) )
|
||||||
|
@@ -63,11 +63,19 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
|
|||||||
const wxSize& size,
|
const wxSize& size,
|
||||||
int n, const wxString choices[],
|
int n, const wxString choices[],
|
||||||
long style,
|
long style,
|
||||||
|
#if wxUSE_VALIDATORS
|
||||||
|
# if defined(__VISAGECPP__)
|
||||||
|
const wxValidator* validator,
|
||||||
|
# else
|
||||||
const wxValidator& validator,
|
const wxValidator& validator,
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
const wxString& name)
|
const wxString& name)
|
||||||
{
|
{
|
||||||
SetName(name);
|
SetName(name);
|
||||||
|
#if wxUSE_VALIDATORS
|
||||||
SetValidator(validator);
|
SetValidator(validator);
|
||||||
|
#endif
|
||||||
if (parent) parent->AddChild(this);
|
if (parent) parent->AddChild(this);
|
||||||
SetBackgroundColour(parent->GetBackgroundColour()) ;
|
SetBackgroundColour(parent->GetBackgroundColour()) ;
|
||||||
SetForegroundColour(parent->GetForegroundColour()) ;
|
SetForegroundColour(parent->GetForegroundColour()) ;
|
||||||
|
@@ -57,7 +57,13 @@ bool wxGauge::Create(wxWindow *parent, wxWindowID id,
|
|||||||
const wxPoint& pos,
|
const wxPoint& pos,
|
||||||
const wxSize& size,
|
const wxSize& size,
|
||||||
long style,
|
long style,
|
||||||
|
#if wxUSE_VALIDATORS
|
||||||
|
# if defined(__VISAGECPP__)
|
||||||
|
const wxValidator* validator,
|
||||||
|
# else
|
||||||
const wxValidator& validator,
|
const wxValidator& validator,
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
const wxString& name)
|
const wxString& name)
|
||||||
{
|
{
|
||||||
static bool wxGaugeOS2Initialised = FALSE;
|
static bool wxGaugeOS2Initialised = FALSE;
|
||||||
@@ -73,7 +79,9 @@ bool wxGauge::Create(wxWindow *parent, wxWindowID id,
|
|||||||
}
|
}
|
||||||
|
|
||||||
SetName(name);
|
SetName(name);
|
||||||
|
#if wxUSE_VALIDATORS
|
||||||
SetValidator(validator);
|
SetValidator(validator);
|
||||||
|
#endif
|
||||||
if (parent) parent->AddChild(this);
|
if (parent) parent->AddChild(this);
|
||||||
m_rangeMax = range;
|
m_rangeMax = range;
|
||||||
m_gaugePos = 0;
|
m_gaugePos = 0;
|
||||||
|
@@ -80,7 +80,13 @@ bool wxListBox::Create(wxWindow *parent,
|
|||||||
const wxSize& size,
|
const wxSize& size,
|
||||||
int n, const wxString choices[],
|
int n, const wxString choices[],
|
||||||
long style,
|
long style,
|
||||||
|
#if wxUSE_VALIDATORS
|
||||||
|
# if defined(__VISAGECPP__)
|
||||||
|
const wxValidator* validator,
|
||||||
|
# else
|
||||||
const wxValidator& validator,
|
const wxValidator& validator,
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
const wxString& name)
|
const wxString& name)
|
||||||
{
|
{
|
||||||
m_noItems = 0;
|
m_noItems = 0;
|
||||||
@@ -88,7 +94,9 @@ bool wxListBox::Create(wxWindow *parent,
|
|||||||
m_selected = 0;
|
m_selected = 0;
|
||||||
|
|
||||||
SetName(name);
|
SetName(name);
|
||||||
|
#if wxUSE_VALIDATORS
|
||||||
SetValidator(validator);
|
SetValidator(validator);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (parent)
|
if (parent)
|
||||||
parent->AddChild(this);
|
parent->AddChild(this);
|
||||||
|
@@ -143,14 +143,21 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
|
|||||||
const wxPoint& pos, const wxSize& size,
|
const wxPoint& pos, const wxSize& size,
|
||||||
int n, const wxString choices[],
|
int n, const wxString choices[],
|
||||||
int majorDim, long style,
|
int majorDim, long style,
|
||||||
|
#if wxUSE_VALIDATORS
|
||||||
|
# if defined(__VISAGECPP__)
|
||||||
|
const wxValidator* val, const wxString& name)
|
||||||
|
# else
|
||||||
const wxValidator& val, const wxString& name)
|
const wxValidator& val, const wxString& name)
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
m_selectedButton = -1;
|
m_selectedButton = -1;
|
||||||
m_noItems = n;
|
m_noItems = n;
|
||||||
|
|
||||||
SetName(name);
|
SetName(name);
|
||||||
|
#if wxUSE_VALIDATORS
|
||||||
SetValidator(val);
|
SetValidator(val);
|
||||||
|
#endif
|
||||||
parent->AddChild(this);
|
parent->AddChild(this);
|
||||||
m_backgroundColour = parent->GetBackgroundColour();
|
m_backgroundColour = parent->GetBackgroundColour();
|
||||||
m_foregroundColour = parent->GetForegroundColour();
|
m_foregroundColour = parent->GetForegroundColour();
|
||||||
|
@@ -46,11 +46,19 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id,
|
|||||||
const wxString& label,
|
const wxString& label,
|
||||||
const wxPoint& pos,
|
const wxPoint& pos,
|
||||||
const wxSize& size, long style,
|
const wxSize& size, long style,
|
||||||
|
#if wxUSE_VALIDATORS
|
||||||
|
# if defined(__VISAGECPP__)
|
||||||
|
const wxValidator* validator,
|
||||||
|
# else
|
||||||
const wxValidator& validator,
|
const wxValidator& validator,
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
const wxString& name)
|
const wxString& name)
|
||||||
{
|
{
|
||||||
SetName(name);
|
SetName(name);
|
||||||
|
#if wxUSE_VALIDATORS
|
||||||
SetValidator(validator);
|
SetValidator(validator);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (parent) parent->AddChild(this);
|
if (parent) parent->AddChild(this);
|
||||||
|
|
||||||
@@ -150,11 +158,19 @@ bool wxBitmapRadioButton::Create(wxWindow *parent, wxWindowID id,
|
|||||||
const wxBitmap *bitmap,
|
const wxBitmap *bitmap,
|
||||||
const wxPoint& pos,
|
const wxPoint& pos,
|
||||||
const wxSize& size, long style,
|
const wxSize& size, long style,
|
||||||
|
#if wxUSE_VALIDATORS
|
||||||
|
# if defined(__VISAGECPP__)
|
||||||
|
const wxValidator* validator,
|
||||||
|
# else
|
||||||
const wxValidator& validator,
|
const wxValidator& validator,
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
const wxString& name)
|
const wxString& name)
|
||||||
{
|
{
|
||||||
SetName(name);
|
SetName(name);
|
||||||
|
#if wxUSE_VALIDATORS
|
||||||
SetValidator(validator);
|
SetValidator(validator);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (parent) parent->AddChild(this);
|
if (parent) parent->AddChild(this);
|
||||||
SetBackgroundColour(parent->GetBackgroundColour());
|
SetBackgroundColour(parent->GetBackgroundColour());
|
||||||
|
@@ -35,14 +35,22 @@ END_EVENT_TABLE()
|
|||||||
bool wxScrollBar::Create(wxWindow *parent, wxWindowID id,
|
bool wxScrollBar::Create(wxWindow *parent, wxWindowID id,
|
||||||
const wxPoint& pos,
|
const wxPoint& pos,
|
||||||
const wxSize& size, long style,
|
const wxSize& size, long style,
|
||||||
|
#if wxUSE_VALIDATORS
|
||||||
|
# if defined(__VISAGECPP__)
|
||||||
|
const wxValidator* validator,
|
||||||
|
# else
|
||||||
const wxValidator& validator,
|
const wxValidator& validator,
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
const wxString& name)
|
const wxString& name)
|
||||||
{
|
{
|
||||||
if (!parent)
|
if (!parent)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
parent->AddChild(this);
|
parent->AddChild(this);
|
||||||
SetName(name);
|
SetName(name);
|
||||||
|
#if wxUSE_VALIDATORS
|
||||||
SetValidator(validator);
|
SetValidator(validator);
|
||||||
|
#endif
|
||||||
|
|
||||||
SetBackgroundColour(parent->GetBackgroundColour()) ;
|
SetBackgroundColour(parent->GetBackgroundColour()) ;
|
||||||
SetForegroundColour(parent->GetForegroundColour()) ;
|
SetForegroundColour(parent->GetForegroundColour()) ;
|
||||||
|
@@ -46,11 +46,19 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id,
|
|||||||
int value, int minValue, int maxValue,
|
int value, int minValue, int maxValue,
|
||||||
const wxPoint& pos,
|
const wxPoint& pos,
|
||||||
const wxSize& size, long style,
|
const wxSize& size, long style,
|
||||||
|
#if wxUSE_VALIDATORS
|
||||||
|
# if defined(__VISAGECPP__)
|
||||||
|
const wxValidator* validator,
|
||||||
|
# else
|
||||||
const wxValidator& validator,
|
const wxValidator& validator,
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
const wxString& name)
|
const wxString& name)
|
||||||
{
|
{
|
||||||
SetName(name);
|
SetName(name);
|
||||||
|
#if wxUSE_VALIDATORS
|
||||||
SetValidator(validator);
|
SetValidator(validator);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (parent) parent->AddChild(this);
|
if (parent) parent->AddChild(this);
|
||||||
|
|
||||||
|
@@ -87,7 +87,13 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
|
|||||||
const wxPoint& pos,
|
const wxPoint& pos,
|
||||||
const wxSize& size,
|
const wxSize& size,
|
||||||
long style,
|
long style,
|
||||||
|
#if wxUSE_VALIDATORS
|
||||||
|
# if defined(__VISAGECPP__)
|
||||||
|
const wxValidator* validator,
|
||||||
|
# else
|
||||||
const wxValidator& validator,
|
const wxValidator& validator,
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
const wxString& name)
|
const wxString& name)
|
||||||
{
|
{
|
||||||
// base initialization
|
// base initialization
|
||||||
|
@@ -100,8 +100,7 @@ wxMutex::~wxMutex()
|
|||||||
if (m_locked > 0)
|
if (m_locked > 0)
|
||||||
wxLogDebug(wxT("Warning: freeing a locked mutex (%d locks)."), m_locked);
|
wxLogDebug(wxT("Warning: freeing a locked mutex (%d locks)."), m_locked);
|
||||||
::DosCloseMutexSem(p_internal->m_vMutex);
|
::DosCloseMutexSem(p_internal->m_vMutex);
|
||||||
delete p_internal;
|
p_internal->m_vMutex = NULL;
|
||||||
p_internal = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wxMutexError wxMutex::Lock()
|
wxMutexError wxMutex::Lock()
|
||||||
@@ -244,6 +243,34 @@ void wxCondition::Broadcast()
|
|||||||
// wxCriticalSection implementation
|
// 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()
|
void wxCriticalSection::Enter()
|
||||||
{
|
{
|
||||||
::DosEnterCritSec();
|
::DosEnterCritSec();
|
||||||
|
@@ -195,10 +195,9 @@ bool wxShell(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get free memory in bytes, or -1 if cannot determine amount (e.g. on UNIX)
|
// Get free memory in bytes, or -1 if cannot determine amount (e.g. on UNIX)
|
||||||
long wxGetFreeMemory(
|
long wxGetFreeMemory()
|
||||||
void* pMemptr
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
|
void* pMemptr;
|
||||||
ULONG lSize;
|
ULONG lSize;
|
||||||
ULONG lMemFlags;
|
ULONG lMemFlags;
|
||||||
APIRET rc;
|
APIRET rc;
|
||||||
@@ -309,14 +308,17 @@ int wxGetOsVersion(
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
ULONG ulSysInfo[QSV_MAX] = {0};
|
ULONG ulSysInfo[QSV_MAX] = {0};
|
||||||
|
APIRET ulrc;
|
||||||
|
|
||||||
if (::DosQuerySysInfo( 1L
|
ulrc = ::DosQuerySysInfo( 1L
|
||||||
,QSV_MAX
|
,QSV_MAX
|
||||||
,(PVOID)ulSysInfo
|
,(PVOID)ulSysInfo
|
||||||
,sizeof(ULONG) * QSV_MAX
|
,sizeof(ULONG) * QSV_MAX
|
||||||
))
|
);
|
||||||
|
if (ulrc == 0L)
|
||||||
{
|
{
|
||||||
*pMajorVsn = ulSysInfo[QSV_VERSION_MAJOR];
|
*pMajorVsn = ulSysInfo[QSV_VERSION_MAJOR];
|
||||||
|
*pMajorVsn = *pMajorVsn/10;
|
||||||
*pMinorVsn = ulSysInfo[QSV_VERSION_MINOR];
|
*pMinorVsn = ulSysInfo[QSV_VERSION_MINOR];
|
||||||
return wxWINDOWS_OS2;
|
return wxWINDOWS_OS2;
|
||||||
}
|
}
|
||||||
@@ -427,10 +429,10 @@ bool wxGetResource(
|
|||||||
,(PSZ)WXSTRINGCAST rSection
|
,(PSZ)WXSTRINGCAST rSection
|
||||||
,(PSZ)WXSTRINGCAST rEntry
|
,(PSZ)WXSTRINGCAST rEntry
|
||||||
,(PSZ)zDefunkt
|
,(PSZ)zDefunkt
|
||||||
,(void*)wxBuffer
|
,(void*)*ppValue
|
||||||
,1000
|
,1000
|
||||||
);
|
);
|
||||||
if (n == 0L || wxStrcmp(wxBuffer, zDefunkt) == 0)
|
if (n != 0L || wxStrcmp(*ppValue, zDefunkt) == 0)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -442,15 +444,12 @@ bool wxGetResource(
|
|||||||
,(PSZ)WXSTRINGCAST rSection
|
,(PSZ)WXSTRINGCAST rSection
|
||||||
,(PSZ)WXSTRINGCAST rEntry
|
,(PSZ)WXSTRINGCAST rEntry
|
||||||
,(PSZ)zDefunkt
|
,(PSZ)zDefunkt
|
||||||
,(void*)wxBuffer
|
,(void*)*ppValue
|
||||||
,1000
|
,1000
|
||||||
);
|
);
|
||||||
if (n == 0L || wxStrcmp(wxBuffer, zDefunkt) == 0)
|
if (n != 0L || wxStrcmp(*ppValue, zDefunkt) == 0)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if (*ppValue)
|
|
||||||
delete[] (*ppValue);
|
|
||||||
*ppValue = copystring(wxBuffer);
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -19,7 +19,7 @@ OS2LIBFLAGS=/NOL /NOE
|
|||||||
OS2LIBS=CPPOM30.lib CPPOOC3.LIB OS2386.LIB
|
OS2LIBS=CPPOM30.lib CPPOOC3.LIB OS2386.LIB
|
||||||
|
|
||||||
# Change WXDIR or WXWIN to wherever wxWindows is found
|
# Change WXDIR or WXWIN to wherever wxWindows is found
|
||||||
WXDIR = h:\dev\wx2\wxWindows
|
WXDIR = j:\dev\wx2\wxWindows
|
||||||
|
|
||||||
OS2ZLIBDIR=$(WXDIR)\src\zlib
|
OS2ZLIBDIR=$(WXDIR)\src\zlib
|
||||||
OS2ZLIBINC=$(WINPNGDIR)
|
OS2ZLIBINC=$(WINPNGDIR)
|
||||||
|
Reference in New Issue
Block a user