#endif
#include "wx/defs.h"
+#include "wx/string.h"
// ----------------------------------------------------------------------------
// constants
Replace environment variables ($SOMETHING) with their values. The format is
$VARNAME or ${VARNAME} where VARNAME contains alphanumeric characters and
'_' only. '$' must be escaped ('\$') in order to be taken literally.
- */
+*/
+
WXDLLEXPORT wxString wxExpandEnvVars(const wxString &sz);
/*
class WXDLLEXPORT wxComboControl;
class WXDLLEXPORT wxListBox;
class WXDLLEXPORT wxPopupComboWindow;
+class WXDLLEXPORT wxTextCtrl;
+class WXDLLEXPORT wxButton;
// ----------------------------------------------------------------------------
// the actions supported by this control
class WXDLLEXPORT wxScrollBar;
class WXDLLEXPORT wxTextCtrl;
class WXDLLEXPORT wxWindow;
+#if wxUSE_GAUGE
+class WXDLLEXPORT wxGauge;
+#endif // wxUSE_GAUGE
#include "wx/string.h"
#include "wx/gdicmn.h"
#define wxUSE_ZIPSTREAM 0
#define wxUSE_ZLIB 0
#define wxUSE_APPLE_IEEE 0
-#define wxUSE_FILE 0
+#define wxUSE_FILE 1
#define wxUSE_FFILE 1
#define wxUSE_TEXTFILE 0
#define wxUSE_INTL 0
#define wxUSE_MS_HTML_HELP 0
#define wxUSE_RESOURCES 0
#define wxUSE_CONSTRAINTS 1
-#define wxUSE_CLIPBOARD 1
+#define wxUSE_CLIPBOARD 0
#define wxUSE_DATAOBJ 1
#define wxUSE_SPLINES 0
#define wxUSE_DRAG_AND_DROP 0
# Copyright (c) 2000 Martin Jolicoeur, Greg Haerr
##############################################################################
-TOP=/home/julians/microwindows/microwin/src
+TOP=/home/julians/local/microwindows/microwin/src
CONFIG = $(TOP)/config
WXDIR = ../..
OBJSUFF = o
# Directories list for header files
INCLUDEDIRS += -I$(WXDIR)/include
# Defines for preprocessor
-DEFINES += -DMWIN -D__WXMICROWIN__ -D__WIN32__ -D__WIN95__ -DHAVE_BOOL -DMICROWIN_TODO=1 -D__UNIX__ -DHAVE_NANOSLEEP -DMICROWIN_NOCONTROLS -D__WXDEBUG__
+DEFINES += -DMWIN -D__WXMSW__ -D__WXMICROWIN__ -D__WXUNIVERSAL__ -D__WIN32__ -D__WIN95__ -DHAVE_BOOL -DMICROWIN_TODO=1 -D__UNIX__ -DHAVE_NANOSLEEP -DMICROWIN_NOCONTROLS -D__WXDEBUG__ -DwxSIZE_T_IS_UINT -DWXWIN_OS_DESCRIPTION="\"MicroWindows\""
# Compilation flags for C files OTHER than include directories
CFLAGS +=
#endif
#include "wx/config.h"
+#include "wx/intl.h"
+#include "wx/log.h"
#if wxUSE_CONFIG && ((wxUSE_FILE && wxUSE_TEXTFILE) || wxUSE_CONFIG_NATIVE)
#include "wx/app.h"
#include "wx/file.h"
-#include "wx/log.h"
#include "wx/textfile.h"
#include "wx/utils.h"
-#include "wx/log.h"
#include "wx/utils.h"
-#include "wx/intl.h"
#include <stdlib.h>
#include <math.h>
// assume mkdir() has 2 args on non Windows-OS/2 platforms and on Windows too
// for the GNU compiler
-#if (!(defined(__WXMSW__) || defined(__WXPM__))) || (defined(__GNUWIN32__) && !defined(__MINGW32__)) || defined(__WXWINE__)
+#if (!(defined(__WXMSW__) || defined(__WXPM__))) || (defined(__GNUWIN32__) && !defined(__MINGW32__)) || defined(__WXWINE__) || defined(__WXMICROWIN__)
if ( mkdir(wxFNCONV(dirname), perm) != 0 )
#elif defined(__WXPM__)
if (::DosCreateDir((PSZ)dirname, NULL) != 0) // enhance for EAB's??
// Return the short form of the path (returns identity on non-Windows platforms)
wxString wxFileName::GetShortPath() const
{
-#if defined(__WXMSW__) && defined(__WIN32__)
+#if defined(__WXMSW__) && defined(__WIN32__) && !defined(__WXMICROWIN__)
wxString path(GetFullPath());
wxString pathOut;
DWORD sz = ::GetShortPathName(path, NULL, 0);
// Return the long form of the path (returns identity on non-Windows platforms)
wxString wxFileName::GetLongPath() const
{
-#if defined(__WXMSW__) && defined(__WIN32__)
+#if defined(__WXMSW__) && defined(__WIN32__) && !defined(__WXMICROWIN__)
wxString path(GetFullPath());
wxString pathOut;
bool success = FALSE;
#include <stdlib.h>
#include <time.h>
-#ifdef __WXMSW__
+#if defined(__WXMSW__)
#include "wx/msw/private.h" // includes windows.h for OutputDebugString
-#else //Unix
+#endif
+
+#if !defined(__WXMSW__) || defined(__WXMICROWIN__)
#include <signal.h>
#endif //Win/Unix
// under Windows, programs usually don't have stderr at all, so show the
// messages also under debugger - unless it's a console program
-#if defined(__WXMSW__) && wxUSE_GUI
+#if defined(__WXMSW__) && wxUSE_GUI && !defined(__WXMICROWIN__)
str += wxT("\r\n") ;
OutputDebugString(str.c_str());
#endif // MSW
// get error code from syste
unsigned long wxSysErrorCode()
{
-#ifdef __WXMSW__
+#if defined(__WXMSW__) && !defined(__WXMICROWIN__)
#ifdef __WIN32__
return ::GetLastError();
#else //WIN16
if ( nErrCode == 0 )
nErrCode = wxSysErrorCode();
-#ifdef __WXMSW__
+#if defined(__WXMSW__) && !defined(__WXMICROWIN__)
#ifdef __WIN32__
static wxChar s_szBuf[LOG_BUFFER_SIZE / 2];
// break into the debugger
void wxTrap()
{
-#ifdef __WXMSW__
+#if defined(__WXMSW__) && !defined(__WXMICROWIN__)
DebugBreak();
#elif defined(__WXMAC__)
#if __powerc
// use the native message box if available: this is more robust than
// using our own
-#ifdef __WXMSW__
+#if defined(__WXMSW__) && !defined(__WXMICROWIN__)
switch ( ::MessageBox(NULL, szBuf, _T("Debug"),
MB_YESNOCANCEL | MB_ICONSTOP ) ) {
case IDYES:
#include "wx/tipwin.h"
#include "wx/timer.h"
+#include "wx/settings.h"
// ----------------------------------------------------------------------------
// constants
InitCommonControls();
#endif // __WIN95__
-#if wxUSE_OLE || wxUSE_DRAG_AND_DROP || wxUSE_DATAOBJ
+#if wxUSE_OLE || wxUSE_DRAG_AND_DROP
#ifdef __WIN16__
// for OLE, enlarge message queue to be as large as possible
while (!SetMessageQueue(iMsg) && (iMsg -= 8))
;
#endif // Win16
+
// we need to initialize OLE library
if ( FAILED(::OleInitialize(NULL)) )
wxLogError(_("Cannot initialize OLE"));
wxCHECK_MSG( wxApp::GetInitializerFunction(), 0,
wxT("No initializer - use IMPLEMENT_APP macro.") );
- wxTheApp = (*wxApp::GetInitializerFunction()) ();
+ wxTheApp = (wxApp*) (*wxApp::GetInitializerFunction()) ();
}
wxCHECK_MSG( wxTheApp, 0, wxT("You have to define an instance of wxApp!") );
bool wxBitmap::CreateFromImage( const wxImage& image, int depth )
{
+#ifdef __WXMICROWIN__
+ // TODO
+ return FALSE;
+#else
wxCHECK_MSG( image.Ok(), FALSE, wxT("invalid image") )
m_refData = new wxBitmapRefData();
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
return TRUE;
+#endif
}
wxImage wxBitmap::ConvertToImage() const
{
+#ifdef __WXMICROWIN__
+ // TODO
+ return wxImage();
+#else
wxImage image;
wxCHECK_MSG( Ok(), wxNullImage, wxT("invalid bitmap") );
free(lpBits);
return image;
+#endif
}
#endif // wxUSE_IMAGE
#include <windows.h>
#include "wx/msw/private.h"
+
+#ifndef __WXMICROWIN__
#include "wx/msw/dib.h"
+#endif
// wxDataObject is tied to OLE/drag and drop implementation, therefore so are
// the functions using wxDataObject in wxClipboard
#if wxUSE_DATAOBJ
#include "wx/dataobj.h"
- // use OLE clipboard
- #define wxUSE_OLE_CLIPBOARD 1
+// No: don't necessarily use OLE clipboard with data object
+#if 0
+ // use OLE clipboard
+ #define wxUSE_OLE_CLIPBOARD 1
+#endif
#else // !wxUSE_DATAOBJ
// use Win clipboard API
#define wxUSE_OLE_CLIPBOARD 0
#endif
#include "wx/gdicmn.h"
+#include "wx/msw/private.h"
#include <string.h>
#include <windows.h>
HPEN hBrushOld = (HPEN)::SelectObject(GetHdc(), whiteBrush);
::SetROP2(GetHdc(), R2_COPYPEN);
Rectangle(GetHdc(), x1, y1, x2, y2);
- MoveTo(GetHdc(), x1, y1);
+ MoveToEx(GetHdc(), x1, y1, NULL);
LineTo(GetHdc(), x2, y2);
- MoveTo(GetHdc(), x2, y1);
+ MoveToEx(GetHdc(), x2, y1, NULL);
LineTo(GetHdc(), x1, y2);
::SelectObject(GetHdc(), hPenOld);
::SelectObject(GetHdc(), hBrushOld);
bool wxDialog::EnableCloseButton(bool enable)
{
+#ifndef __WXMICROWIN__
// get system (a.k.a. window) menu
HMENU hmenu = ::GetSystemMenu(GetHwnd(), FALSE /* get it */);
if ( !hmenu )
{
wxLogLastError(_T("DrawMenuBar"));
}
-
+#endif
+
return TRUE;
}
#endif //WX_PRECOMP
#include "wx/evtloop.h"
+#include "wx/window.h"
+#include "wx/app.h"
#include "wx/msw/private.h"
# Copyright (c) 2000 Martin Jolicoeur, Greg Haerr
##############################################################################
-TOP=/home/julians/microwindows/microwin/src
+TOP=/home/julians/local/microwindows/microwin/src
CONFIG = $(TOP)/config
WXDIR = ../..
OBJSUFF = o
$(MICROWINDIR)/gdiobj.$(OBJSUFF) \
$(MICROWINDIR)/icon.$(OBJSUFF) \
$(MICROWINDIR)/main.$(OBJSUFF) \
- $(MICROWINDIR)/menu.$(OBJSUFF) \
- $(MICROWINDIR)/menuitem.$(OBJSUFF) \
$(MICROWINDIR)/microwin.$(OBJSUFF) \
- $(MICROWINDIR)/msgdlg.$(OBJSUFF) \
$(MICROWINDIR)/palette.$(OBJSUFF) \
$(MICROWINDIR)/pen.$(OBJSUFF) \
$(MICROWINDIR)/regconf.$(OBJSUFF) \
$(MICROWINDIR)/thread.$(OBJSUFF) \
$(MICROWINDIR)/timer.$(OBJSUFF) \
$(MICROWINDIR)/utils.$(OBJSUFF) \
- $(MICROWINDIR)/window.$(OBJSUFF)
+ $(MICROWINDIR)/window.$(OBJSUFF) \
$(OLEDIR)/dataobj.$(OBJSUFF)
UNIVOBJS_TODO = $(UNIVDIR)/choice.$(OBJSUFF) \
$(UNIVDIR)/colschem.$(OBJSUFF) \
$(UNIVDIR)/combobox.$(OBJSUFF) \
$(UNIVDIR)/control.$(OBJSUFF) \
- $(UNIVDIR)/frameuniv.$(OBJSUFF) \
+ $(UNIVDIR)/framuniv.$(OBJSUFF) \
$(UNIVDIR)/gauge.$(OBJSUFF) \
$(UNIVDIR)/inphand.$(OBJSUFF) \
$(UNIVDIR)/listbox.$(OBJSUFF) \
$(UNIVDIR)/scrthumb.$(OBJSUFF) \
$(UNIVDIR)/slider.$(OBJSUFF) \
$(UNIVDIR)/spinbutt.$(OBJSUFF) \
- $(UNIVDIR)/spinctrl.$(OBJSUFF) \
$(UNIVDIR)/statbmp.$(OBJSUFF) \
$(UNIVDIR)/statbox.$(OBJSUFF) \
$(UNIVDIR)/statline.$(OBJSUFF) \
# Directories list for header files
INCLUDEDIRS += -I$(WXDIR)/include
# Defines for preprocessor
-DEFINES += -DMWIN -D__WXMSW__ -D__WXMICROWIN__ -D__WXUNIVERSAL__ -D__WIN32__ -D__WIN95__ -DHAVE_BOOL -DMICROWIN_TODO=1 -D__UNIX__ -DHAVE_NANOSLEEP -DMICROWIN_NOCONTROLS -D__WXDEBUG__
+DEFINES += -DMWIN -D__WXMSW__ -D__WXMICROWIN__ -D__WXUNIVERSAL__ -D__WIN32__ -D__WIN95__ -DHAVE_BOOL -DMICROWIN_TODO=1 -D__UNIX__ -DHAVE_NANOSLEEP -DMICROWIN_NOCONTROLS -D__WXDEBUG__ -DwxSIZE_T_IS_UINT -DWXWIN_OS_DESCRIPTION="\"MicroWindows\""
# Compilation flags for C files OTHER than include directories
CFLAGS +=
#include "windows.h"
#include "wintern.h"
#include "device.h"
-#include "wx/microwin/microwin.h"
+#include "wx/msw/microwin.h"
void GdMoveCursor(MWCOORD x, MWCOORD y);
void MwSetCursor(HWND wp, PMWCURSOR pcursor);
static TEXTMETRIC wxGetTextMetrics(const wxWindowMSW *win);
// check if the mouse is in the window or its child
-static bool IsMouseInWindow(HWND hwnd);
+//static bool IsMouseInWindow(HWND hwnd);
// ---------------------------------------------------------------------------
// event tables
HWND hWnd = GetHwnd();
wxCHECK_RET( hWnd, _T("can't set focus to invalid window") );
+#ifndef __WXMICROWIN__
::SetLastError(0);
-
+#endif
+
if ( !::SetFocus(hWnd) )
{
// was there really an error?
+#ifndef __WXMICROWIN__
DWORD dwRes = ::GetLastError();
+#else
+
+ DWORD dwRes = 0;
+#endif
if ( dwRes )
{
wxLogApiError(_T("SetFocus"), dwRes);
wxLogLastError(_T("UpdateWindow"));
}
-#ifdef __WIN32__
+#if defined(__WIN32__) && !defined(__WXMICROWIN__)
// just calling UpdateWindow() is not enough, what we did in our WM_PAINT
// handler needs to be really drawn right now
(void)::GdiFlush();
}
break;
-#ifdef __WXUNIVERSAL__
+#if defined(__WXUNIVERSAL__) && !defined(__WXMICROWIN__)
case WM_ACTIVATEAPP:
wxTheApp->SetActive(wParam != 0, FindFocus());
break;
void wxWindowMSW::MSWDetachWindowMenu()
{
+#ifndef __WXUNIVERSAL__
if ( m_hMenu )
{
wxChar buf[1024];
}
}
}
+#endif
}
bool wxWindowMSW::MSWCreate(int id,
bool wxWindowMSW::HandleJoystickEvent(WXUINT msg, int x, int y, WXUINT flags)
{
+#ifdef JOY_BUTTON1
int change = 0;
if ( flags & JOY_BUTTON1CHG )
change = wxJOY_BUTTON1;
event.SetEventObject(this);
return GetEventHandler()->ProcessEvent(event);
+#else
+ return FALSE;
+#endif
}
// ---------------------------------------------------------------------------
#include "wx/combobox.h"
#include "wx/listbox.h"
#include "wx/textctrl.h"
+ #include "wx/bmpbuttn.h"
#include "wx/validate.h"
#endif
size_t count = m_itemsClientData.GetCount();
for ( size_t n = 0; n < count; n++ )
{
- delete m_itemsClientData[n];
+ delete (wxClientData *) m_itemsClientData[n];
}
}
if ( HasClientObjectData() )
{
- delete m_itemsClientData[n];
+ delete (wxClientData *)m_itemsClientData[n];
}
m_itemsClientData.RemoveAt(n);
#include "wx/popupwin.h"
#include "wx/evtloop.h"
+#include "wx/dcclient.h"
+#include "wx/frame.h"
#include "wx/univ/renderer.h"
#include "wx/imaglist.h"
#include "wx/notebook.h"
-
#include "wx/spinbutt.h"
+#include "wx/dcmemory.h"
#include "wx/univ/renderer.h"
#include "wx/univ/renderer.h"
#include "wx/univ/colschem.h"
+#if wxUSE_GAUGE
+#include "wx/gauge.h"
+#endif
+
// ============================================================================
// implementation
// ============================================================================
dc.DrawRectangle(rect);
// under Unix we use "--sync" X option for this
- #ifdef __WXMSW__
+ #if defined(__WXMSW__) && !defined(__WXMICROWIN__)
::GdiFlush();
::Sleep(200);
#endif // __WXMSW__
#include "wx/checkbox.h"
#include "wx/listbox.h"
#include "wx/checklst.h"
+ #include "wx/combobox.h"
#include "wx/scrolbar.h"
#include "wx/slider.h"
#include "wx/textctrl.h"
#include "wx/button.h"
#include "wx/listbox.h"
#include "wx/checklst.h"
+ #include "wx/combobox.h"
#include "wx/scrolbar.h"
#include "wx/slider.h"
#include "wx/textctrl.h"
#include "wx/notebook.h"
#include "wx/spinbutt.h"
+#include "wx/settings.h"
#include "wx/univ/scrtimer.h"
#include "wx/event.h"
#include "wx/scrolbar.h"
#include "wx/menu.h"
+ #include "wx/frame.h"
#endif // WX_PRECOMP
#include "wx/univ/colschem.h"
dc.DrawRectangle(rectWin);
// under Unix we use "--sync" X option for this
- #ifdef __WXMSW__
+ #if defined(__WXMSW__) && !defined(__WXMICROWIN__)
::GdiFlush();
::Sleep(200);
#endif // __WXMSW__