Some stubs includes removed from wxMotif; wxNotebook sample hack to make it display;

changes to defs.h and memory.h etc. for Solaris compilation


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1173 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1998-12-11 16:09:06 +00:00
parent 92976ab62b
commit 5dcf05ae08
28 changed files with 96 additions and 45 deletions

View File

@@ -965,7 +965,7 @@ void * operator new (size_t size)
#endif
}
#if !( defined (_MSC_VER) && (_MSC_VER <= 1020) )
#if wxUSE_ARRAY_MEMORY_OPERATORS
void * operator new[] (size_t size)
{
#ifdef NO_DEBUG_ALLOCATION
@@ -976,7 +976,7 @@ void * operator new[] (size_t size)
}
#endif
#if !( defined (_MSC_VER) && (_MSC_VER <= 1020) )
#if wxUSE_ARRAY_MEMORY_OPERATORS
void * operator new[] (size_t size, char * fileName, int lineNum)
{
#ifdef NO_DEBUG_ALLOCATION
@@ -1011,7 +1011,7 @@ void operator delete[](void* pData, char* /* fileName */, int /* lineNum */)
}
#endif
#if !( defined (_MSC_VER) && (_MSC_VER <= 1020) )
#if wxUSE_ARRAY_MEMORY_OPERATORS
void operator delete[] (void * buf)
{

View File

@@ -125,7 +125,7 @@ void wxObject::operator delete(void* pData, char* /* fileName */, int /* lineNum
#endif
// Cause problems for VC++ - crashes
#ifndef _MSC_VER
#if !defined(_MSC_VER) && wxUSE_ARRAY_MEMORY_OPERATORS
void * wxObject::operator new[] (size_t size, char * fileName, int lineNum)
{
return wxDebugAlloc(size, fileName, lineNum, TRUE, TRUE);

View File

@@ -127,7 +127,7 @@ wxExtHelpController::LoadFile(const wxString& ifile)
file = ifile;
if(! wxDirExists(file))
return false;
return FALSE;
mapFile << file << WXEXTHELP_SEPARATOR << WXEXTHELP_MAPFILE;
}
@@ -135,7 +135,7 @@ wxExtHelpController::LoadFile(const wxString& ifile)
mapFile = m_MapFile;
if(! wxFileExists(mapFile))
return false;
return FALSE;
DeleteList();
m_MapList = new wxList;
@@ -143,7 +143,7 @@ wxExtHelpController::LoadFile(const wxString& ifile)
FILE *input = fopen(mapFile.c_str(),"rt");
if(! input)
return false;
return FALSE;
do
{
if(fgets(buffer,WXEXTHELP_BUFLEN,input) && *buffer != WXEXTHELP_COMMENTCHAR)
@@ -171,7 +171,7 @@ wxExtHelpController::LoadFile(const wxString& ifile)
fclose(input);
m_MapFile = file; // now it's valid
return true;
return TRUE;
}
bool
@@ -196,7 +196,7 @@ wxExtHelpController::CallBrowser(wxString const &relativeURL)
<< WXEXTHELP_SEPARATOR << relativeURL << ")";
success = wxExecute(command);
if(success != 0 ) // returns PID on success
return true;
return TRUE;
}
}
command = m_BrowserName;
@@ -209,7 +209,7 @@ bool
wxExtHelpController::DisplayContents(void)
{
if(! m_NumOfEntries)
return false;
return FALSE;
wxBusyCursor b; // display a busy cursor
return KeywordSearch("");
}
@@ -218,7 +218,7 @@ bool
wxExtHelpController::DisplaySection(int sectionNo)
{
if(! m_NumOfEntries)
return false;
return FALSE;
wxBusyCursor b; // display a busy cursor
wxNode *node = m_MapList->First();
@@ -230,7 +230,7 @@ wxExtHelpController::DisplaySection(int sectionNo)
return CallBrowser(entry->url);
node = node->Next();
}
return false;
return FALSE;
}
bool
@@ -243,7 +243,7 @@ bool
wxExtHelpController::KeywordSearch(const wxString& k)
{
if(! m_NumOfEntries)
return false;
return FALSE;
wxBusyCursor b; // display a busy cursor
wxString *choices = new wxString[m_NumOfEntries];
@@ -282,7 +282,7 @@ wxExtHelpController::KeywordSearch(const wxString& k)
else if(idx == 0)
{
wxMessageBox(_("No entries found."));
rc = false;
rc = FALSE;
}
else
{
@@ -292,7 +292,7 @@ wxExtHelpController::KeywordSearch(const wxString& k)
if(idx != -1)
rc = CallBrowser(urls[idx]);
else
rc = false;
rc = FALSE;
}
delete[] urls;
delete[] choices;
@@ -304,7 +304,7 @@ wxExtHelpController::KeywordSearch(const wxString& k)
bool
wxExtHelpController::Quit(void)
{
return true;
return TRUE;
}
void

View File

@@ -8,7 +8,7 @@
########################### Programs #################################
# Replace this with your own path if necessary
WXDIR = $(wx)
WXDIR = $(WXWIN)
# C++ compiler
CC = g++

View File

@@ -14,7 +14,7 @@
#pragma implementation "colordlg.h"
#endif
#include "wx/stubs/colordlg.h"
#include "wx/motif/colordlg.h"
#if !USE_SHARED_LIBRARY
IMPLEMENT_DYNAMIC_CLASS(wxColourDialog, wxDialog)

View File

@@ -478,7 +478,7 @@ int wxDialog::ShowModal()
XEvent event;
// Loop until we signal that the dialog should be closed
while ((wxModalShowingStack.Number() > 0) && (bool)wxModalShowingStack.First()->Data())
while ((wxModalShowingStack.Number() > 0) && ((int)(wxModalShowingStack.First()->Data()) != 0))
{
// XtAppProcessEvent((XtAppContext) wxTheApp->GetAppContext(), XtIMAll);

View File

@@ -14,7 +14,7 @@
#pragma implementation "fontdlg.h"
#endif
#include "wx/stubs/fontdlg.h"
#include "wx/motif/fontdlg.h"
#include "wx/cmndata.h"
#if !USE_SHARED_LIBRARY

View File

@@ -13,7 +13,7 @@
#pragma implementation "helpxxxx.h"
#endif
#include "wx/stubs/helpxxxx.h"
#include "wx/motif/helpxxxx.h"
#include <string.h>

View File

@@ -13,7 +13,7 @@
#pragma implementation "imaglist.h"
#endif
#include "wx/stubs/imaglist.h"
#include "wx/motif/imaglist.h"
#if !USE_SHARED_LIBRARY
IMPLEMENT_DYNAMIC_CLASS(wxImageList, wxObject)

View File

@@ -13,8 +13,8 @@
#pragma implementation "listctrl.h"
#endif
#include "wx/stubs/textctrl.h"
#include "wx/stubs/listctrl.h"
#include "wx/motif/textctrl.h"
#include "wx/motif/listctrl.h"
#if !USE_SHARED_LIBRARY
IMPLEMENT_DYNAMIC_CLASS(wxListCtrl, wxControl)

View File

@@ -16,7 +16,7 @@
#include "wx/object.h"
#include "wx/string.h"
#include "wx/dc.h"
#include "wx/stubs/metafile.h"
#include "wx/motif/metafile.h"
#include "wx/clipbrd.h"
extern bool wxClipboardIsOpen;

View File

@@ -13,7 +13,7 @@
#pragma implementation "msgdlg.h"
#endif
#include "wx/stubs/msgdlg.h"
#include "wx/motif/msgdlg.h"
#if !USE_SHARED_LIBRARY
IMPLEMENT_CLASS(wxMessageDialog, wxDialog)

View File

@@ -400,11 +400,21 @@ void wxNotebook::OnIdle(wxIdleEvent& event)
{
static bool s_bFirstTime = TRUE;
if ( s_bFirstTime ) {
/*
wxSize sz(GetSize());
sz.x ++;
SetSize(sz);
sz.x --;
SetSize(sz);
*/
/*
wxSize sz(GetSize());
wxSizeEvent sizeEvent(sz, GetId());
sizeEvent.SetEventObject(this);
GetEventHandler()->ProcessEvent(sizeEvent);
Refresh();
*/
s_bFirstTime = FALSE;
}
event.Skip();

View File

@@ -13,8 +13,8 @@
#pragma implementation "print.h"
#endif
#include "wx/stubs/print.h"
#include "wx/stubs/printdlg.h"
#include "wx/motif/print.h"
#include "wx/motif/printdlg.h"
#if !USE_SHARED_LIBRARY
IMPLEMENT_DYNAMIC_CLASS(wxPrinter, wxPrinterBase)

View File

@@ -14,7 +14,7 @@
#endif
#include "wx/object.h"
#include "wx/stubs/printdlg.h"
#include "wx/motif/printdlg.h"
#include "wx/dcprint.h"
// Use generic page setup dialog: use your own native one if one exists.

View File

@@ -17,7 +17,7 @@
// headers
// ----------------------------------------------------------------------------
#include "wx/stubs/statusbr.h"
#include "wx/motif/statusbr.h"
#if !USE_SHARED_LIBRARY
IMPLEMENT_DYNAMIC_CLASS(wxStatusBarXX, wxStatusBar);

View File

@@ -13,8 +13,8 @@
#pragma implementation "treectrl.h"
#endif
#include "wx/stubs/textctrl.h"
#include "wx/stubs/treectrl.h"
#include "wx/motif/textctrl.h"
#include "wx/motif/treectrl.h"
#if !USE_SHARED_LIBRARY
IMPLEMENT_DYNAMIC_CLASS(wxTreeCtrl, wxControl)

View File

@@ -34,10 +34,14 @@
#include <netdb.h>
#include <signal.h>
#ifdef __SVR4__
#if defined(__SVR4__) && !defined(__HPUX__)
#include <sys/systeminfo.h>
#endif
#if (defined(__SUNCC__) || defined(__CLCC__))
#include <sysent.h>
#endif
#include <Xm/Xm.h>
#include "wx/motif/private.h"
@@ -57,7 +61,7 @@ extern wxList wxTopLevelWindows;
// Get full hostname (eg. DoDo.BSn-Germany.crg.de)
bool wxGetHostName(char *buf, int maxSize)
{
#if defined(SVR4) && !defined(__hpux)
#if defined(__SVR4__) && !defined(__HPUX__)
return (sysinfo (SI_HOSTNAME, buf, maxSize) != -1);
#else /* BSD Sockets */
char name[255];
@@ -487,7 +491,7 @@ void wxXMergeDatabases (wxApp * theApp, Display * display)
size_t len;
environment = GetIniFile (filename, NULL);
len = strlen (environment);
#if defined(SVR4) && !defined(__hpux)
#if defined(__SVR4__) && !defined(__HPUX__)
(void) sysinfo (SI_HOSTNAME, environment + len, 1024 - len);
#else
(void) gethostname (environment + len, 1024 - len);

View File

@@ -36,11 +36,11 @@
#else
#if defined(_AIX) || defined(__xlC__)
#if defined(__AIX__) || defined(__xlC__)
#include <sys/socket.h>
#include <sys/select.h>
#else
#ifndef DG
#ifndef __DATA_GENERAL__
#include <sys/syscall.h>
#endif
#endif

View File

@@ -15,7 +15,7 @@
#include "wx/object.h"
#include "wx/string.h"
#include "wx/stubs/wave.h"
#include "wx/motif/wave.h"
wxWave::wxWave()
: m_waveData(NULL), m_waveLength(0), m_isResource(FALSE)

View File

@@ -680,6 +680,10 @@ bool wxAutomationObject::ConvertOleToVariant(const VARIANTARG& oleVariant, wxVar
variant.MakeNull();
break;
}
case VT_EMPTY:
{
break; // Ignore Empty Variant, used only during destruction of objects
}
default:
{
wxLogError("wxAutomationObject::ConvertOleToVariant: Unknown variant value type");

View File

@@ -52,7 +52,7 @@ bool wxMetaFile::SetClipboard(int width, int height)
bool wxMetaFile::Play(wxDC *dc)
{
// TODO
return false;
return FALSE;
}
/*