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)
{
// even if it's possible to create controls without parents in some port,
// 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
// by user if desired
-const wxValidator* wxDefaultValidator;
+const wxValidator* wxDefaultValidator = NULL;
#else
const wxValidator wxDefaultValidator;
#endif
const wxPoint& WXUNUSED(pos),
const wxSize& WXUNUSED(size),
long style,
+#if wxUSE_VALIDATORS
+# if defined(__VISAGECPP__)
+ const wxValidator* validator,
+# else
const wxValidator& validator,
+# endif
+#endif
const wxString& name)
{
// m_isWindow is set to TRUE in wxWindowBase::Init() as well as many other
// 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)
{
if ( m_windowValidator )
if ( m_windowValidator )
m_windowValidator->SetWindow(this) ;
}
+# endif // __VISAGECPP__
#endif // wxUSE_VALIDATORS
// ----------------------------------------------------------------------------
{
int w, h;
GetClientSize(&w, &h);
-
+
// If there is a sizer, use it instead of the constraints
if ( GetSizer() )
{
GetSizer()->SetDimension( 0, 0, w, h );
return TRUE;
}
-
+
if ( GetConstraints() )
{
GetConstraints()->width.SetValue(w);
DoPhase(1); // Just one phase need if no sizers involved
DoPhase(2);
SetConstraintSizes(); // Recursively set the real window sizes
-
+
return TRUE;
}
wxListTextCtrl::wxListTextCtrl( wxWindow *parent, const wxWindowID id,
bool *accept, wxString *res, wxListMainWindow *owner,
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 ) :
+# endif
+#endif
wxTextCtrl( parent, id, value, pos, size, style, validator, name )
{
m_res = res;
bool wxListCtrl::Create( wxWindow *parent, wxWindowID id,
const wxPoint &pos, const wxSize &size,
+#if wxUSE_VALIDATORS
+# if defined(__VISAGECPP__)
+ long style, const wxValidator *validator,
+# else
long style, const wxValidator &validator,
+# endif
+#endif
const wxString &name )
{
m_imageListNormal = (wxImageList *) NULL;
wxTreeTextCtrl::wxTreeTextCtrl( wxWindow *parent, const wxWindowID id,
bool *accept, wxString *res, wxTreeCtrl *owner,
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 ) :
+# endif
+#endif
wxTextCtrl( parent, id, value, pos, size, style, validator, name )
{
m_res = res;
bool wxTreeCtrl::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 )
{
Init();
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);
SetIcon(wxICON(help));
toolBar -> SetMargins(2, 2);
wxBitmap* toolBarBitmaps[3];
-#ifdef __WXMSW__
+#if defined(__WXMSW__) || (__WXPM__)
toolBarBitmaps[0] = new wxBitmap("panel");
toolBarBitmaps[1] = new wxBitmap("back");
toolBarBitmaps[2] = new wxBitmap("forward");
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);
}
# info
# Set WXDIR for your system
-WXDIR = $(WXWIN)
+WXDIR = j:\dev\wx2\wxWindows
!include $(WXDIR)\src\makevc.env
# info
# Set WXDIR for your system
-WXDIR = $(WXWIN)
+WXDIR = j:\dev\wx2\wxWindows
WXUSINGDLL=0
!include $(WXDIR)\src\makevc.env
-all: $(PROGRAM).exe $(EXTRATARGETS)
+all: $(PROGRAM).exe
wx:
cd $(WXDIR)\src\msw
nmake -f makefile.vc clean
# cd $(THISDIR)
-$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS) $(PROGRAM).res
+$(PROGRAM).exe: $(DUMMYOBJ) $(WXLIB) $(OBJECTS)
$(link) @<<
-out:$(PROGRAM).exe
$(LINKFLAGS)
-$(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res
+$(DUMMYOBJ) $(OBJECTS)
$(LIBS)
<<
-$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc
- $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc
-
clean:
-erase $(OBJECTS)
-erase *.exe
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
-WXDIR=$(WXWIN)
+WXDIR=j:\dev\wx2\wxWindows
WXSRC=$(WXDIR)\src\msw
WXINC=$(WXDIR)\include
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);
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);
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()) ;
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()) ;
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()
{
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) )
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()) ;
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;
}
SetName(name);
+#if wxUSE_VALIDATORS
SetValidator(validator);
+#endif
if (parent) parent->AddChild(this);
m_rangeMax = range;
m_gaugePos = 0;
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;
m_selected = 0;
SetName(name);
+#if wxUSE_VALIDATORS
SetValidator(validator);
+#endif
if (parent)
parent->AddChild(this);
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();
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);
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());
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()) ;
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);
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
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()
// 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();
}
// 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;
)
{
ULONG ulSysInfo[QSV_MAX] = {0};
-
- if (::DosQuerySysInfo( 1L
- ,QSV_MAX
- ,(PVOID)ulSysInfo
- ,sizeof(ULONG) * QSV_MAX
- ))
+ APIRET ulrc;
+
+ 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;
}
,(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
,(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;
}
OS2LIBS=CPPOM30.lib CPPOOC3.LIB OS2386.LIB
# Change WXDIR or WXWIN to wherever wxWindows is found
-WXDIR = h:\dev\wx2\wxWindows
+WXDIR = j:\dev\wx2\wxWindows
OS2ZLIBDIR=$(WXDIR)\src\zlib
OS2ZLIBINC=$(WINPNGDIR)