OGL fixes for wxMotif; added Set/GetClientData to wxMenu in wxMSW/wxMotif/wxStubs.

Sorry, I may be overwriting changes Robert made due to a file copying error.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@971 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1998-11-08 22:35:18 +00:00
parent d18ed59a36
commit 3dd4e4e05c
36 changed files with 192 additions and 233 deletions

View File

@@ -83,7 +83,7 @@ LDLIBS = $(EXTRALDLIBS) $(GUILDLIBS)
.SUFFIXES: .o .cpp .c
.c.o :
$(CC) -c $(CFLAGS) -o $@ $<
$(CCC) -c $(CFLAGS) -o $@ $<
.cpp.o :
$(CC) -c $(CPPFLAGS) -o $@ $<

View File

@@ -158,14 +158,24 @@ LIB_CPP_SRC=\
# listctrl.cpp \
# imaglist.cpp \
# statusbr.cpp \
ZLIB_SRC=\
../zlib/adler32.c ../zlib/deflate.c ../zlib/infblock.c\
../zlib/inflate.c ../zlib/zutil.c ../zlib/compress.c \
../zlib/infcodes.c ../zlib/inftrees.c ../zlib/trees.c \
../zlib/crc32.c ../zlib/gzio.c ../zlib/inffast.c\
../zlib/infutil.c ../zlib/uncompr.c
LIB_C_SRC=\
\
../common/y_tab.c \
../common/extended.c
# Only need to compile zlib files if we don't
# already have a zlib library installed on our system
# (or we wish to statically link them for some reason)
EXTRA_C_SRC=\
xmcombo/xmcombo.c
xmcombo/xmcombo.c # $(ZLIB_SRC)
EXTRA_CPP_SRC=\
mdi/lib/XsComponent.C\

View File

@@ -74,6 +74,7 @@ wxMenu::wxMenu(const wxString& title, const wxFunction func)
m_topLevelMenu = (wxMenu*) NULL;
m_ownedByMenuBar = FALSE;
m_menuParent = (wxMenu*) NULL;
m_clientData = (void*) NULL;
if (m_title != "")
{

View File

@@ -108,6 +108,8 @@ wxWindow::wxWindow()
#if wxUSE_DRAG_AND_DROP
m_pDropTarget = NULL;
#endif
m_clientObject = (wxClientData*) NULL;
m_clientData = NULL;
/// Motif-specific
m_mainWidget = (WXWidget) 0;
@@ -239,8 +241,8 @@ wxWindow::~wxWindow()
// dangling pointers.
wxPendingDelete.DeleteObject(this);
if ( m_windowValidator )
delete m_windowValidator;
if ( m_windowValidator ) delete m_windowValidator;
if (m_clientObject) delete m_clientObject;
}
// Destroy the window (delayed, if a managed window)
@@ -282,6 +284,8 @@ bool wxWindow::Create(wxWindow *parent, wxWindowID id,
m_maxSizeY = -1;
m_defaultItem = NULL;
m_windowParent = NULL;
m_clientObject = (wxClientData*) NULL;
m_clientData = NULL;
// Motif-specific
m_canAddEventHandler = FALSE;
@@ -1929,6 +1933,27 @@ void wxWindow::SetValidator(const wxValidator& validator)
m_windowValidator->SetWindow(this) ;
}
void wxWindow::SetClientObject( wxClientData *data )
{
if (m_clientObject) delete m_clientObject;
m_clientObject = data;
}
wxClientData *wxWindow::GetClientObject()
{
return m_clientObject;
}
void wxWindow::SetClientData( void *data )
{
m_clientData = data;
}
void *wxWindow::GetClientData()
{
return m_clientData;
}
// Find a window by id or name
wxWindow *wxWindow::FindWindow(long id)
{

View File

@@ -73,6 +73,8 @@ wxMenu::wxMenu(const wxString& Title, const wxFunction func)
m_hMenu = (WXHMENU) CreatePopupMenu();
m_savehMenu = 0 ;
m_topLevelMenu = this;
m_clientData = (void*) NULL;
if (m_title != "")
{
Append(idMenuTitle, m_title) ;

View File

@@ -50,6 +50,7 @@ wxMenu::wxMenu(const wxString& title, const wxFunction func)
m_eventHandler = this;
m_noItems = 0;
m_menuBar = NULL;
m_clientData = (void*) NULL;
if (m_title != "")
{
Append(-2, m_title) ;

View File

@@ -88,7 +88,7 @@ local int read_buf OF((z_streamp strm, Bytef *buf, unsigned size));
local uInt longest_match OF((deflate_state *s, IPos cur_match));
#endif
#ifdef DEBUG
#ifdef __WXDEBUG__
local void check_match OF((deflate_state *s, IPos start, IPos match,
int length));
#endif
@@ -918,7 +918,7 @@ local uInt longest_match(s, cur_match)
#endif /* FASTEST */
#endif /* ASMV */
#ifdef DEBUG
#ifdef __WXDEBUG__
/* ===========================================================================
* Check that the match at match_start is indeed a match.
*/

View File

@@ -29,7 +29,7 @@
#ifndef local
# define local static
#endif
/* compile with -Dlocal if your __WXDEBUG__ger can't find static symbols */
/* compile with -Dlocal if your debugger can't find static symbols */
typedef unsigned char uch;
typedef uch FAR uchf;