wxUniv compilation fixes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10935 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2001-07-10 12:25:46 +00:00
parent 7c36b6a2a1
commit 6522713c75
37 changed files with 170 additions and 147 deletions

View File

@@ -256,6 +256,7 @@ dragimag.cpp MSW
dropsrc.cpp MSW OLE dropsrc.cpp MSW OLE
droptgt.cpp MSW OLE droptgt.cpp MSW OLE
enhmeta.cpp MSW Win32Only enhmeta.cpp MSW Win32Only
evtloop.cpp MSW LowLevel
filedlg.cpp MSW filedlg.cpp MSW
font.cpp MSW font.cpp MSW
fontdlg.cpp MSW fontdlg.cpp MSW
@@ -390,6 +391,7 @@ dcmemory.cpp GTK LowLevel
dcscreen.cpp GTK LowLevel dcscreen.cpp GTK LowLevel
dialog.cpp GTK LowLevel dialog.cpp GTK LowLevel
dnd.cpp GTK LowLevel dnd.cpp GTK LowLevel
evtloop.cpp GTK LowLevel
font.cpp GTK LowLevel font.cpp GTK LowLevel
fontdlg.cpp GTK fontdlg.cpp GTK
frame.cpp GTK LowLevel frame.cpp GTK LowLevel

View File

@@ -105,7 +105,7 @@ public:
// ------------------ // ------------------
#if wxUSE_MENUS #if wxUSE_MENUS
virtual void SetMenuBar(wxMenuBar *menubar) = 0; virtual void SetMenuBar(wxMenuBar *menubar);
virtual wxMenuBar *GetMenuBar() const { return m_frameMenuBar; } virtual wxMenuBar *GetMenuBar() const { return m_frameMenuBar; }
#endif // wxUSE_MENUS #endif // wxUSE_MENUS
@@ -200,6 +200,14 @@ protected:
// override to update menu bar position when the frame size changes // override to update menu bar position when the frame size changes
virtual void PositionMenuBar() { } virtual void PositionMenuBar() { }
// override to do something special when the menu bar is being removed
// from the frame
virtual void DetachMenuBar();
// override to do something special when the menu bar is attached to the
// frame
virtual void AttachMenuBar(wxMenuBar *menubar);
wxMenuBar *m_frameMenuBar; wxMenuBar *m_frameMenuBar;
#endif // wxUSE_MENUS #endif // wxUSE_MENUS

View File

@@ -70,10 +70,6 @@ public:
virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL); virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
virtual bool IsFullScreen() const { return m_fsIsShowing; }; virtual bool IsFullScreen() const { return m_fsIsShowing; };
#if wxUSE_MENUS
virtual void SetMenuBar( wxMenuBar *menuBar );
#endif // wxUSE_MENUS
#if wxUSE_STATUSBAR #if wxUSE_STATUSBAR
virtual void PositionStatusBar(); virtual void PositionStatusBar();
@@ -134,8 +130,13 @@ protected:
virtual void DoSetClientSize(int width, int height); virtual void DoSetClientSize(int width, int height);
virtual void DoGetClientSize( int *width, int *height ) const; virtual void DoGetClientSize( int *width, int *height ) const;
#if wxUSE_MENUS_NATIVE
virtual void DetachMenuBar();
virtual void AttachMenuBar(wxMenuBar *menubar);
#endif // wxUSE_MENUS_NATIVE
// is the frame currently iconized? // is the frame currently iconized?
bool m_isIconized; bool m_isIconized;
}; };
#endif // __GTKFRAMEH__ #endif // __GTKFRAMEH__

View File

@@ -4,15 +4,15 @@
// Author: Robert Roebling // Author: Robert Roebling
// Created: // Created:
// Id: $Id$ // Id: $Id$
// Copyright: (c) 1998 Robert Roebling // Copyright: (c) 2001 Robert Roebling
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef __GTKPOPUPWINH__ #ifndef __GTKPOPUPWINH__
#define __GTKPOPUPWINH__ #define __GTKPOPUPWINH__
#ifdef __GNUG__ #ifdef __GNUG__
#pragma interface #pragma interface "popupwin.h"
#endif #endif
#include "wx/defs.h" #include "wx/defs.h"

View File

@@ -85,9 +85,9 @@ public:
const wxFont *theFont = (const wxFont *) NULL) const wxFont *theFont = (const wxFont *) NULL)
const; const;
#if wxUSE_MENUS #if wxUSE_MENUS_NATIVE
virtual bool DoPopupMenu( wxMenu *menu, int x, int y ); virtual bool DoPopupMenu( wxMenu *menu, int x, int y );
#endif // wxUSE_MENUS #endif // wxUSE_MENUS_NATIVE
virtual void SetScrollbar( int orient, int pos, int thumbVisible, virtual void SetScrollbar( int orient, int pos, int thumbVisible,
int range, bool refresh = TRUE ); int range, bool refresh = TRUE );

View File

@@ -70,10 +70,6 @@ public:
virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL); virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
virtual bool IsFullScreen() const { return m_fsIsShowing; }; virtual bool IsFullScreen() const { return m_fsIsShowing; };
#if wxUSE_MENUS
virtual void SetMenuBar( wxMenuBar *menuBar );
#endif // wxUSE_MENUS
#if wxUSE_STATUSBAR #if wxUSE_STATUSBAR
virtual void PositionStatusBar(); virtual void PositionStatusBar();
@@ -134,8 +130,13 @@ protected:
virtual void DoSetClientSize(int width, int height); virtual void DoSetClientSize(int width, int height);
virtual void DoGetClientSize( int *width, int *height ) const; virtual void DoGetClientSize( int *width, int *height ) const;
#if wxUSE_MENUS_NATIVE
virtual void DetachMenuBar();
virtual void AttachMenuBar(wxMenuBar *menubar);
#endif // wxUSE_MENUS_NATIVE
// is the frame currently iconized? // is the frame currently iconized?
bool m_isIconized; bool m_isIconized;
}; };
#endif // __GTKFRAMEH__ #endif // __GTKFRAMEH__

View File

@@ -4,15 +4,15 @@
// Author: Robert Roebling // Author: Robert Roebling
// Created: // Created:
// Id: $Id$ // Id: $Id$
// Copyright: (c) 1998 Robert Roebling // Copyright: (c) 2001 Robert Roebling
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef __GTKPOPUPWINH__ #ifndef __GTKPOPUPWINH__
#define __GTKPOPUPWINH__ #define __GTKPOPUPWINH__
#ifdef __GNUG__ #ifdef __GNUG__
#pragma interface #pragma interface "popupwin.h"
#endif #endif
#include "wx/defs.h" #include "wx/defs.h"

View File

@@ -85,9 +85,9 @@ public:
const wxFont *theFont = (const wxFont *) NULL) const wxFont *theFont = (const wxFont *) NULL)
const; const;
#if wxUSE_MENUS #if wxUSE_MENUS_NATIVE
virtual bool DoPopupMenu( wxMenu *menu, int x, int y ); virtual bool DoPopupMenu( wxMenu *menu, int x, int y );
#endif // wxUSE_MENUS #endif // wxUSE_MENUS_NATIVE
virtual void SetScrollbar( int orient, int pos, int thumbVisible, virtual void SetScrollbar( int orient, int pos, int thumbVisible,
int range, bool refresh = TRUE ); int range, bool refresh = TRUE );

View File

@@ -50,7 +50,6 @@ public:
virtual void Iconize(bool iconize = TRUE); virtual void Iconize(bool iconize = TRUE);
virtual bool IsIconized() const; virtual bool IsIconized() const;
virtual void Restore(); virtual void Restore();
virtual void SetMenuBar(wxMenuBar *menubar);
virtual void SetIcon(const wxIcon& icon); virtual void SetIcon(const wxIcon& icon);
virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL); virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
virtual bool IsFullScreen() const { return m_fsIsShowing; }; virtual bool IsFullScreen() const { return m_fsIsShowing; };
@@ -134,10 +133,10 @@ protected:
virtual void DoSetClientSize(int width, int height); virtual void DoSetClientSize(int width, int height);
// helper
void DetachMenuBar();
#if wxUSE_MENUS_NATIVE #if wxUSE_MENUS_NATIVE
// perform MSW-specific action when menubar is changed
virtual void AttachMenuBar(wxMenuBar *menubar);
// a plug in for MDI frame classes which need to do something special when // a plug in for MDI frame classes which need to do something special when
// the menubar is set // the menubar is set
virtual void InternalSetMenuBar(); virtual void InternalSetMenuBar();

View File

@@ -28,14 +28,6 @@
// a better solution should be found later... // a better solution should be found later...
#define wxUSE_MOUSEEVENT_HACK 0 #define wxUSE_MOUSEEVENT_HACK 0
// when building wxUniv/MSW we don't want the code for native menu use to be
// compiled in - it should only be used when building real wxMSW
#ifdef __WXUNIVERSAL__
#define wxUSE_MENUS_NATIVE 0
#else // __WXMSW__
#define wxUSE_MENUS_NATIVE wxUSE_MENUS
#endif // __WXUNIVERSAL__/__WXMSW__
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// constants // constants
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------

View File

@@ -13,7 +13,7 @@
#define _WX_POPUPWIN_H_BASE_ #define _WX_POPUPWIN_H_BASE_
#ifdef __GNUG__ #ifdef __GNUG__
#pragma interface "popupwin.h" #pragma interface "popupwinbase.h"
#endif #endif
#include "wx/window.h" #include "wx/window.h"

View File

@@ -278,11 +278,7 @@ private:
bool m_shouldShowMenu; bool m_shouldShowMenu;
// it calls out ProcessMouseEvent() // it calls out ProcessMouseEvent()
#ifdef __WXMAC__
friend class wxPopupMenuWindow; friend class wxPopupMenuWindow;
#else
friend wxPopupMenuWindow;
#endif
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
DECLARE_DYNAMIC_CLASS(wxMenuBar) DECLARE_DYNAMIC_CLASS(wxMenuBar)

View File

@@ -36,6 +36,14 @@
#include "wx/accel.h" #include "wx/accel.h"
#endif // wxUSE_ACCEL #endif // wxUSE_ACCEL
// when building wxUniv/Foo we don't want the code for native menu use to be
// compiled in - it should only be used when building real wxFoo
#ifdef __WXUNIVERSAL__
#define wxUSE_MENUS_NATIVE 0
#else // __WXMSW__
#define wxUSE_MENUS_NATIVE wxUSE_MENUS
#endif // __WXUNIVERSAL__/__WXMSW__
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// forward declarations // forward declarations
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -321,6 +321,13 @@ bool wxFrameBase::SendIconizeEvent(bool iconized)
return GetEventHandler()->ProcessEvent(event); return GetEventHandler()->ProcessEvent(event);
} }
void wxFrameBase::OnIdle(wxIdleEvent& WXUNUSED(event) )
{
#if wxUSE_MENUS
DoMenuUpdates();
#endif // wxUSE_MENUS
}
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// status bar stuff // status bar stuff
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -449,16 +456,9 @@ wxToolBar* wxFrameBase::OnCreateToolBar(long style,
#endif // wxUSE_TOOLBAR #endif // wxUSE_TOOLBAR
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Menu UI updating // menus
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
void wxFrameBase::OnIdle(wxIdleEvent& WXUNUSED(event) )
{
#if wxUSE_MENUS
DoMenuUpdates();
#endif // wxUSE_MENUS
}
#if wxUSE_MENUS #if wxUSE_MENUS
// update all menus // update all menus
@@ -510,4 +510,35 @@ void wxFrameBase::DoMenuUpdates(wxMenu* menu, wxWindow* focusWin)
} }
} }
void wxFrameBase::DetachMenuBar()
{
if ( m_frameMenuBar )
{
m_frameMenuBar->Detach();
m_frameMenuBar = NULL;
}
}
void wxFrameBase::AttachMenuBar(wxMenuBar *menubar)
{
if ( menubar )
{
m_frameMenuBar = menubar;
menubar->Attach((wxFrame *)this);
}
}
void wxFrameBase::SetMenuBar(wxMenuBar *menubar)
{
if ( menubar == GetMenuBar() )
{
// nothing to do
return;
}
DetachMenuBar();
AttachMenuBar(menubar);
}
#endif // wxUSE_MENUS #endif // wxUSE_MENUS

View File

@@ -18,7 +18,7 @@
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#ifdef __GNUG__ #ifdef __GNUG__
#pragma implementation "popupwin.h" #pragma implementation "popupwinbase.h"
#endif #endif
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h".

View File

@@ -1,4 +1,4 @@
# This file was automatically generated by tmake at 21:37, 2001/07/03 # This file was automatically generated by tmake at 18:07, 2001/07/04
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE BASE.T! # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE BASE.T!
ALL_SOURCES = \ ALL_SOURCES = \
common/init.cpp \ common/init.cpp \

View File

@@ -4027,17 +4027,24 @@ void wxListMainWindow::GetVisibleLinesRange(size_t *from, size_t *to)
if ( m_lineFrom == (size_t)-1 ) if ( m_lineFrom == (size_t)-1 )
{ {
m_lineFrom = GetScrollPos(wxVERTICAL);
size_t count = GetItemCount(); size_t count = GetItemCount();
if ( count )
{
m_lineFrom = GetScrollPos(wxVERTICAL);
wxASSERT_MSG( m_lineFrom < count, _T("invalid scroll position?") ); wxASSERT_MSG( m_lineFrom < count, _T("invalid scroll position?") );
// we redraw one extra line but this is needed to make the redrawing // we redraw one extra line but this is needed to make the redrawing
// logic work when there is a fractional number of lines on screen // logic work when there is a fractional number of lines on screen
m_lineTo = m_lineFrom + m_linesPerPage; m_lineTo = m_lineFrom + m_linesPerPage;
if ( m_lineTo >= count ) if ( m_lineTo >= count )
m_lineTo = count - 1; m_lineTo = count - 1;
}
else // empty control
{
m_lineFrom = 0;
m_lineTo = (size_t)-1;
}
} }
wxASSERT_MSG( m_lineFrom <= m_lineTo && m_lineTo < GetItemCount(), wxASSERT_MSG( m_lineFrom <= m_lineTo && m_lineTo < GetItemCount(),

View File

@@ -153,7 +153,8 @@ static gint gtk_frame_delete_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WX
return TRUE; return TRUE;
} }
#if wxUSE_MENUS #if wxUSE_MENUS_NATIVE
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// "child_attached" of menu bar // "child_attached" of menu bar
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -177,7 +178,8 @@ static void gtk_menu_detached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *
win->m_menuBarDetached = TRUE; win->m_menuBarDetached = TRUE;
win->GtkUpdateSize(); win->GtkUpdateSize();
} }
#endif // wxUSE_MENUS
#endif // wxUSE_MENUS_NATIVE
#if wxUSE_TOOLBAR #if wxUSE_TOOLBAR
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -1050,17 +1052,14 @@ void wxFrameGTK::OnInternalIdle()
// menu/tool/status bar stuff // menu/tool/status bar stuff
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if wxUSE_MENUS #if wxUSE_MENUS_NATIVE
void wxFrameGTK::SetMenuBar( wxMenuBar *menuBar ) void wxFrameGTK::DetachMenuBar()
{ {
wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") ); wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
wxASSERT_MSG( (m_wxwindow != NULL), wxT("invalid frame") ); wxASSERT_MSG( (m_wxwindow != NULL), wxT("invalid frame") );
if (menuBar == m_frameMenuBar) if ( m_frameMenuBar )
return;
if (m_frameMenuBar)
{ {
m_frameMenuBar->UnsetInvokingWindow( this ); m_frameMenuBar->UnsetInvokingWindow( this );
@@ -1078,7 +1077,12 @@ void wxFrameGTK::SetMenuBar( wxMenuBar *menuBar )
gtk_widget_unparent( m_frameMenuBar->m_widget ); gtk_widget_unparent( m_frameMenuBar->m_widget );
} }
m_frameMenuBar = menuBar; wxFrameBase::DetachMenuBar();
}
void wxFrameGTK::AttachMenuBar( wxMenuBar *menuBar )
{
wxFrameBase::AttachMenuBar(menuBar);
if (m_frameMenuBar) if (m_frameMenuBar)
{ {
@@ -1108,7 +1112,7 @@ void wxFrameGTK::SetMenuBar( wxMenuBar *menuBar )
m_sizeSet = FALSE; m_sizeSet = FALSE;
} }
#endif // wxUSE_MENUS #endif // wxUSE_MENUS_NATIVE
#if wxUSE_TOOLBAR #if wxUSE_TOOLBAR

View File

@@ -141,11 +141,11 @@ static void wxInsertChildInDialog( wxPopupWindow* parent, wxWindow* child )
// wxPopupWindow // wxPopupWindow
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
BEGIN_EVENT_TABLE(wxPopupWindow,wxPopupWindowBase) BEGIN_EVENT_TABLE(wxPopupWindow, wxPopupWindowBase)
EVT_SIZE (wxPopupWindow::OnSize) EVT_SIZE(wxPopupWindow::OnSize)
END_EVENT_TABLE() END_EVENT_TABLE()
IMPLEMENT_DYNAMIC_CLASS(wxPopupWindow,wxPopupWindowBase) IMPLEMENT_DYNAMIC_CLASS(wxPopupWindow, wxWindow)
bool wxPopupWindow::Create( wxWindow *parent, int style ) bool wxPopupWindow::Create( wxWindow *parent, int style )
{ {

View File

@@ -2260,11 +2260,13 @@ wxWindow *wxGetActiveWindow()
// wxWindowGTK // wxWindowGTK
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// in wxUniv/MSW this class is abstract because it doesn't have DoPopupMenu()
// method
#ifdef __WXUNIVERSAL__ #ifdef __WXUNIVERSAL__
IMPLEMENT_DYNAMIC_CLASS(wxWindowGTK, wxWindowBase) IMPLEMENT_ABSTRACT_CLASS(wxWindowGTK, wxWindowBase)
#else #else // __WXGTK__
IMPLEMENT_DYNAMIC_CLASS(wxWindow, wxWindowBase) IMPLEMENT_DYNAMIC_CLASS(wxWindow, wxWindowBase)
#endif #endif // __WXUNIVERSAL__/__WXGTK__
void wxWindowGTK::Init() void wxWindowGTK::Init()
{ {
@@ -3605,7 +3607,7 @@ void wxWindowGTK::ApplyWidgetStyle()
// Pop-up menu stuff // Pop-up menu stuff
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#if wxUSE_MENUS #if wxUSE_MENUS_NATIVE
static void gtk_pop_hide_callback( GtkWidget *WXUNUSED(widget), bool* is_waiting ) static void gtk_pop_hide_callback( GtkWidget *WXUNUSED(widget), bool* is_waiting )
{ {
@@ -3677,7 +3679,7 @@ bool wxWindowGTK::DoPopupMenu( wxMenu *menu, int x, int y )
return TRUE; return TRUE;
} }
#endif // wxUSE_MENUS #endif // wxUSE_MENUS_NATIVE
#if wxUSE_DRAG_AND_DROP #if wxUSE_DRAG_AND_DROP

View File

@@ -153,7 +153,8 @@ static gint gtk_frame_delete_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WX
return TRUE; return TRUE;
} }
#if wxUSE_MENUS #if wxUSE_MENUS_NATIVE
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// "child_attached" of menu bar // "child_attached" of menu bar
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -177,7 +178,8 @@ static void gtk_menu_detached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *
win->m_menuBarDetached = TRUE; win->m_menuBarDetached = TRUE;
win->GtkUpdateSize(); win->GtkUpdateSize();
} }
#endif // wxUSE_MENUS
#endif // wxUSE_MENUS_NATIVE
#if wxUSE_TOOLBAR #if wxUSE_TOOLBAR
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -1050,17 +1052,14 @@ void wxFrameGTK::OnInternalIdle()
// menu/tool/status bar stuff // menu/tool/status bar stuff
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if wxUSE_MENUS #if wxUSE_MENUS_NATIVE
void wxFrameGTK::SetMenuBar( wxMenuBar *menuBar ) void wxFrameGTK::DetachMenuBar()
{ {
wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") ); wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
wxASSERT_MSG( (m_wxwindow != NULL), wxT("invalid frame") ); wxASSERT_MSG( (m_wxwindow != NULL), wxT("invalid frame") );
if (menuBar == m_frameMenuBar) if ( m_frameMenuBar )
return;
if (m_frameMenuBar)
{ {
m_frameMenuBar->UnsetInvokingWindow( this ); m_frameMenuBar->UnsetInvokingWindow( this );
@@ -1078,7 +1077,12 @@ void wxFrameGTK::SetMenuBar( wxMenuBar *menuBar )
gtk_widget_unparent( m_frameMenuBar->m_widget ); gtk_widget_unparent( m_frameMenuBar->m_widget );
} }
m_frameMenuBar = menuBar; wxFrameBase::DetachMenuBar();
}
void wxFrameGTK::AttachMenuBar( wxMenuBar *menuBar )
{
wxFrameBase::AttachMenuBar(menuBar);
if (m_frameMenuBar) if (m_frameMenuBar)
{ {
@@ -1108,7 +1112,7 @@ void wxFrameGTK::SetMenuBar( wxMenuBar *menuBar )
m_sizeSet = FALSE; m_sizeSet = FALSE;
} }
#endif // wxUSE_MENUS #endif // wxUSE_MENUS_NATIVE
#if wxUSE_TOOLBAR #if wxUSE_TOOLBAR

View File

@@ -141,11 +141,11 @@ static void wxInsertChildInDialog( wxPopupWindow* parent, wxWindow* child )
// wxPopupWindow // wxPopupWindow
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
BEGIN_EVENT_TABLE(wxPopupWindow,wxPopupWindowBase) BEGIN_EVENT_TABLE(wxPopupWindow, wxPopupWindowBase)
EVT_SIZE (wxPopupWindow::OnSize) EVT_SIZE(wxPopupWindow::OnSize)
END_EVENT_TABLE() END_EVENT_TABLE()
IMPLEMENT_DYNAMIC_CLASS(wxPopupWindow,wxPopupWindowBase) IMPLEMENT_DYNAMIC_CLASS(wxPopupWindow, wxWindow)
bool wxPopupWindow::Create( wxWindow *parent, int style ) bool wxPopupWindow::Create( wxWindow *parent, int style )
{ {

View File

@@ -2260,11 +2260,13 @@ wxWindow *wxGetActiveWindow()
// wxWindowGTK // wxWindowGTK
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// in wxUniv/MSW this class is abstract because it doesn't have DoPopupMenu()
// method
#ifdef __WXUNIVERSAL__ #ifdef __WXUNIVERSAL__
IMPLEMENT_DYNAMIC_CLASS(wxWindowGTK, wxWindowBase) IMPLEMENT_ABSTRACT_CLASS(wxWindowGTK, wxWindowBase)
#else #else // __WXGTK__
IMPLEMENT_DYNAMIC_CLASS(wxWindow, wxWindowBase) IMPLEMENT_DYNAMIC_CLASS(wxWindow, wxWindowBase)
#endif #endif // __WXUNIVERSAL__/__WXGTK__
void wxWindowGTK::Init() void wxWindowGTK::Init()
{ {
@@ -3605,7 +3607,7 @@ void wxWindowGTK::ApplyWidgetStyle()
// Pop-up menu stuff // Pop-up menu stuff
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#if wxUSE_MENUS #if wxUSE_MENUS_NATIVE
static void gtk_pop_hide_callback( GtkWidget *WXUNUSED(widget), bool* is_waiting ) static void gtk_pop_hide_callback( GtkWidget *WXUNUSED(widget), bool* is_waiting )
{ {
@@ -3677,7 +3679,7 @@ bool wxWindowGTK::DoPopupMenu( wxMenu *menu, int x, int y )
return TRUE; return TRUE;
} }
#endif // wxUSE_MENUS #endif // wxUSE_MENUS_NATIVE
#if wxUSE_DRAG_AND_DROP #if wxUSE_DRAG_AND_DROP

View File

@@ -1,4 +1,4 @@
# This file was automatically generated by tmake at 21:37, 2001/07/03 # This file was automatically generated by tmake at 18:07, 2001/07/04
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE MOTIF.T! # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE MOTIF.T!
ALL_SOURCES = \ ALL_SOURCES = \
generic/busyinfo.cpp \ generic/busyinfo.cpp \

View File

@@ -1,4 +1,4 @@
# This file was automatically generated by tmake at 21:37, 2001/07/03 # This file was automatically generated by tmake at 18:07, 2001/07/04
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE MSW.T! # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE MSW.T!
ALL_SOURCES = \ ALL_SOURCES = \
generic/busyinfo.cpp \ generic/busyinfo.cpp \

View File

@@ -486,24 +486,10 @@ void wxFrameMSW::PositionStatusBar()
} }
#endif // wxUSE_STATUSBAR #endif // wxUSE_STATUSBAR
void wxFrameMSW::DetachMenuBar()
{
#if wxUSE_MENUS
if ( m_frameMenuBar )
{
m_frameMenuBar->Detach();
m_frameMenuBar = NULL;
}
#endif // wxUSE_MENUS
}
void wxFrameMSW::SetMenuBar(wxMenuBar *menubar)
{
#if wxUSE_MENUS
// detach the old menu bar in any case
DetachMenuBar();
#if wxUSE_MENUS_NATIVE #if wxUSE_MENUS_NATIVE
void wxFrameMSW::AttachMenuBar(wxMenuBar *menubar)
{
if ( !menubar ) if ( !menubar )
{ {
// actually remove the menu from the frame // actually remove the menu from the frame
@@ -519,7 +505,7 @@ void wxFrameMSW::SetMenuBar(wxMenuBar *menubar)
} }
else else
{ {
if (menubar->IsAttached()) if ( menubar->IsAttached() )
menubar->Detach(); menubar->Detach();
m_hMenu = menubar->Create(); m_hMenu = menubar->Create();
@@ -530,18 +516,8 @@ void wxFrameMSW::SetMenuBar(wxMenuBar *menubar)
InternalSetMenuBar(); InternalSetMenuBar();
} }
#endif // wxUSE_MENUS_NATIVE
if ( menubar )
{
m_frameMenuBar = menubar;
menubar->Attach((wxFrame *)this);
}
#endif // wxUSE_MENUS
} }
#if wxUSE_MENUS_NATIVE
void wxFrameMSW::InternalSetMenuBar() void wxFrameMSW::InternalSetMenuBar()
{ {
#ifndef __WXMICROWIN__ #ifndef __WXMICROWIN__

View File

@@ -1,6 +1,6 @@
# This file was automatically generated by tmake at 21:37, 2001/07/03 # This file was automatically generated by tmake at 18:07, 2001/07/04
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE B32.T! # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE B32.T!
# #

View File

@@ -1,6 +1,6 @@
# This file was automatically generated by tmake at 21:37, 2001/07/03 # This file was automatically generated by tmake at 18:07, 2001/07/04
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE BCC.T! # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE BCC.T!
# #

View File

@@ -1,4 +1,4 @@
# This file was automatically generated by tmake at 21:37, 2001/07/03 # This file was automatically generated by tmake at 18:07, 2001/07/04
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE DOS.T! # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE DOS.T!
# #

View File

@@ -1,4 +1,4 @@
# This file was automatically generated by tmake at 21:37, 2001/07/03 # This file was automatically generated by tmake at 18:07, 2001/07/04
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE G95.T! # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE G95.T!
# #

View File

@@ -1,6 +1,6 @@
# This file was automatically generated by tmake at 21:37, 2001/07/03 # This file was automatically generated by tmake at 18:07, 2001/07/04
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE SC.T! # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE SC.T!
# Symantec C++ makefile for the msw objects # Symantec C++ makefile for the msw objects

View File

@@ -1,4 +1,4 @@
# This file was automatically generated by tmake at 21:37, 2001/07/03 # This file was automatically generated by tmake at 18:07, 2001/07/04
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE VC.T! # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE VC.T!
# File: makefile.vc # File: makefile.vc
@@ -117,12 +117,8 @@ GENERICOBJS= ..\generic\$D\busyinfo.obj \
# These are generic things that don't need to be compiled on MSW, # These are generic things that don't need to be compiled on MSW,
# but sometimes it's useful to do so for testing purposes. # but sometimes it's useful to do so for testing purposes.
NONESSENTIALOBJS= ..\generic\$D\accel.obj \ NONESSENTIALOBJS= ..\generic\$D\colrdlgg.obj \
..\generic\$D\caret.obj \
..\generic\$D\colrdlgg.obj \
..\generic\$D\dcpsg.obj \
..\generic\$D\dirdlgg.obj \ ..\generic\$D\dirdlgg.obj \
..\generic\$D\filedlgg.obj \
..\generic\$D\fontdlgg.obj \ ..\generic\$D\fontdlgg.obj \
..\generic\$D\helpext.obj \ ..\generic\$D\helpext.obj \
..\generic\$D\helphtml.obj \ ..\generic\$D\helphtml.obj \
@@ -132,10 +128,6 @@ NONESSENTIALOBJS= ..\generic\$D\accel.obj \
..\generic\$D\listctrl.obj \ ..\generic\$D\listctrl.obj \
..\generic\$D\msgdlgg.obj \ ..\generic\$D\msgdlgg.obj \
..\generic\$D\notebook.obj \ ..\generic\$D\notebook.obj \
..\generic\$D\paletteg.obj \
..\generic\$D\printps.obj \
..\generic\$D\prntdlgg.obj \
..\generic\$D\statline.obj \
..\generic\$D\tabg.obj ..\generic\$D\tabg.obj
COMMONOBJS = \ COMMONOBJS = \

View File

@@ -1,6 +1,6 @@
#!/binb/wmake.exe #!/binb/wmake.exe
# This file was automatically generated by tmake at 21:37, 2001/07/03 # This file was automatically generated by tmake at 18:07, 2001/07/04
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE WAT.T! # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE WAT.T!
# #

View File

@@ -300,8 +300,7 @@ void wxComboControl::DoMoveWindow(int x, int y, int width, int height)
width -= rectBorders.x + rectBorders.width; width -= rectBorders.x + rectBorders.width;
height -= rectBorders.y + rectBorders.height; height -= rectBorders.y + rectBorders.height;
wxSize sizeBtn = m_btn->GetSize(), wxSize sizeBtn = m_btn->GetSize();
sizeText = m_text->GetSize();
wxCoord wText = width - sizeBtn.x; wxCoord wText = width - sizeBtn.x;
m_text->SetSize(x, y, wText, height); m_text->SetSize(x, y, wText, height);

View File

@@ -8,12 +8,15 @@ UNIVOBJS = \
colschem.o \ colschem.o \
control.o \ control.o \
combobox.o \ combobox.o \
evtloop.o \
framuniv.o \ framuniv.o \
gauge.o \ gauge.o \
gtk.o \ gtk.o \
inphand.o \ inphand.o \
listbox.o \ listbox.o \
menu.o \
notebook.o \ notebook.o \
popupcmn.o \
radiobox.o \ radiobox.o \
radiobut.o \ radiobut.o \
renderer.o \ renderer.o \

View File

@@ -41,11 +41,7 @@ BEGIN_EVENT_TABLE(wxFrame, wxFrameNative)
EVT_SIZE(wxFrame::OnSize) EVT_SIZE(wxFrame::OnSize)
END_EVENT_TABLE() END_EVENT_TABLE()
#if defined(__WXMSW__) IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxWindow)
IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxFrameMSW)
#elif defined(__WXGTK__)
IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxFrameGTK)
#endif
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// ctors // ctors

View File

@@ -2038,7 +2038,7 @@ void wxMenuBar::OnKeyDown(wxKeyEvent& event)
} }
else // right else // right
{ {
if ( ++currentNew == (int)count ) if ( ++currentNew == count )
currentNew = 0; currentNew = 0;
} }
@@ -2263,7 +2263,7 @@ void wxMenuBar::OnDismissMenu(bool dismissMenuBar)
void wxMenuBar::OnDismiss() void wxMenuBar::OnDismiss()
{ {
ReleaseCapture(); ReleaseMouse();
if ( m_current != -1 ) if ( m_current != -1 )
{ {