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:
@@ -256,6 +256,7 @@ dragimag.cpp MSW
|
||||
dropsrc.cpp MSW OLE
|
||||
droptgt.cpp MSW OLE
|
||||
enhmeta.cpp MSW Win32Only
|
||||
evtloop.cpp MSW LowLevel
|
||||
filedlg.cpp MSW
|
||||
font.cpp MSW
|
||||
fontdlg.cpp MSW
|
||||
@@ -390,6 +391,7 @@ dcmemory.cpp GTK LowLevel
|
||||
dcscreen.cpp GTK LowLevel
|
||||
dialog.cpp GTK LowLevel
|
||||
dnd.cpp GTK LowLevel
|
||||
evtloop.cpp GTK LowLevel
|
||||
font.cpp GTK LowLevel
|
||||
fontdlg.cpp GTK
|
||||
frame.cpp GTK LowLevel
|
||||
|
@@ -105,7 +105,7 @@ public:
|
||||
// ------------------
|
||||
|
||||
#if wxUSE_MENUS
|
||||
virtual void SetMenuBar(wxMenuBar *menubar) = 0;
|
||||
virtual void SetMenuBar(wxMenuBar *menubar);
|
||||
virtual wxMenuBar *GetMenuBar() const { return m_frameMenuBar; }
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
@@ -200,6 +200,14 @@ protected:
|
||||
// override to update menu bar position when the frame size changes
|
||||
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;
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
|
@@ -70,10 +70,6 @@ public:
|
||||
virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
|
||||
virtual bool IsFullScreen() const { return m_fsIsShowing; };
|
||||
|
||||
#if wxUSE_MENUS
|
||||
virtual void SetMenuBar( wxMenuBar *menuBar );
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
virtual void PositionStatusBar();
|
||||
|
||||
@@ -134,8 +130,13 @@ protected:
|
||||
virtual void DoSetClientSize(int width, int height);
|
||||
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?
|
||||
bool m_isIconized;
|
||||
bool m_isIconized;
|
||||
};
|
||||
|
||||
#endif // __GTKFRAMEH__
|
||||
|
@@ -4,15 +4,15 @@
|
||||
// Author: Robert Roebling
|
||||
// Created:
|
||||
// Id: $Id$
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
// Copyright: (c) 2001 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __GTKPOPUPWINH__
|
||||
#define __GTKPOPUPWINH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#pragma interface "popupwin.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
@@ -85,9 +85,9 @@ public:
|
||||
const wxFont *theFont = (const wxFont *) NULL)
|
||||
const;
|
||||
|
||||
#if wxUSE_MENUS
|
||||
#if wxUSE_MENUS_NATIVE
|
||||
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,
|
||||
int range, bool refresh = TRUE );
|
||||
|
@@ -70,10 +70,6 @@ public:
|
||||
virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
|
||||
virtual bool IsFullScreen() const { return m_fsIsShowing; };
|
||||
|
||||
#if wxUSE_MENUS
|
||||
virtual void SetMenuBar( wxMenuBar *menuBar );
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
virtual void PositionStatusBar();
|
||||
|
||||
@@ -134,8 +130,13 @@ protected:
|
||||
virtual void DoSetClientSize(int width, int height);
|
||||
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?
|
||||
bool m_isIconized;
|
||||
bool m_isIconized;
|
||||
};
|
||||
|
||||
#endif // __GTKFRAMEH__
|
||||
|
@@ -4,15 +4,15 @@
|
||||
// Author: Robert Roebling
|
||||
// Created:
|
||||
// Id: $Id$
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
// Copyright: (c) 2001 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __GTKPOPUPWINH__
|
||||
#define __GTKPOPUPWINH__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface
|
||||
#pragma interface "popupwin.h"
|
||||
#endif
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
@@ -85,9 +85,9 @@ public:
|
||||
const wxFont *theFont = (const wxFont *) NULL)
|
||||
const;
|
||||
|
||||
#if wxUSE_MENUS
|
||||
#if wxUSE_MENUS_NATIVE
|
||||
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,
|
||||
int range, bool refresh = TRUE );
|
||||
|
@@ -50,7 +50,6 @@ public:
|
||||
virtual void Iconize(bool iconize = TRUE);
|
||||
virtual bool IsIconized() const;
|
||||
virtual void Restore();
|
||||
virtual void SetMenuBar(wxMenuBar *menubar);
|
||||
virtual void SetIcon(const wxIcon& icon);
|
||||
virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
|
||||
virtual bool IsFullScreen() const { return m_fsIsShowing; };
|
||||
@@ -134,10 +133,10 @@ protected:
|
||||
|
||||
virtual void DoSetClientSize(int width, int height);
|
||||
|
||||
// helper
|
||||
void DetachMenuBar();
|
||||
|
||||
#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
|
||||
// the menubar is set
|
||||
virtual void InternalSetMenuBar();
|
||||
|
@@ -28,14 +28,6 @@
|
||||
// a better solution should be found later...
|
||||
#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
|
||||
// ---------------------------------------------------------------------------
|
||||
|
@@ -13,7 +13,7 @@
|
||||
#define _WX_POPUPWIN_H_BASE_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "popupwin.h"
|
||||
#pragma interface "popupwinbase.h"
|
||||
#endif
|
||||
|
||||
#include "wx/window.h"
|
||||
|
@@ -278,11 +278,7 @@ private:
|
||||
bool m_shouldShowMenu;
|
||||
|
||||
// it calls out ProcessMouseEvent()
|
||||
#ifdef __WXMAC__
|
||||
friend class wxPopupMenuWindow;
|
||||
#else
|
||||
friend wxPopupMenuWindow;
|
||||
#endif
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
DECLARE_DYNAMIC_CLASS(wxMenuBar)
|
||||
|
@@ -36,6 +36,14 @@
|
||||
#include "wx/accel.h"
|
||||
#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
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -321,6 +321,13 @@ bool wxFrameBase::SendIconizeEvent(bool iconized)
|
||||
return GetEventHandler()->ProcessEvent(event);
|
||||
}
|
||||
|
||||
void wxFrameBase::OnIdle(wxIdleEvent& WXUNUSED(event) )
|
||||
{
|
||||
#if wxUSE_MENUS
|
||||
DoMenuUpdates();
|
||||
#endif // wxUSE_MENUS
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// status bar stuff
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -449,16 +456,9 @@ wxToolBar* wxFrameBase::OnCreateToolBar(long style,
|
||||
#endif // wxUSE_TOOLBAR
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Menu UI updating
|
||||
// menus
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
void wxFrameBase::OnIdle(wxIdleEvent& WXUNUSED(event) )
|
||||
{
|
||||
#if wxUSE_MENUS
|
||||
DoMenuUpdates();
|
||||
#endif // wxUSE_MENUS
|
||||
}
|
||||
|
||||
#if wxUSE_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
|
||||
|
@@ -18,7 +18,7 @@
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation "popupwin.h"
|
||||
#pragma implementation "popupwinbase.h"
|
||||
#endif
|
||||
|
||||
// For compilers that support precompilation, includes "wx.h".
|
||||
|
@@ -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!
|
||||
ALL_SOURCES = \
|
||||
common/init.cpp \
|
||||
|
@@ -4027,17 +4027,24 @@ void wxListMainWindow::GetVisibleLinesRange(size_t *from, size_t *to)
|
||||
|
||||
if ( m_lineFrom == (size_t)-1 )
|
||||
{
|
||||
m_lineFrom = GetScrollPos(wxVERTICAL);
|
||||
|
||||
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
|
||||
// logic work when there is a fractional number of lines on screen
|
||||
m_lineTo = m_lineFrom + m_linesPerPage;
|
||||
if ( m_lineTo >= count )
|
||||
m_lineTo = count - 1;
|
||||
// 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
|
||||
m_lineTo = m_lineFrom + m_linesPerPage;
|
||||
if ( m_lineTo >= count )
|
||||
m_lineTo = count - 1;
|
||||
}
|
||||
else // empty control
|
||||
{
|
||||
m_lineFrom = 0;
|
||||
m_lineTo = (size_t)-1;
|
||||
}
|
||||
}
|
||||
|
||||
wxASSERT_MSG( m_lineFrom <= m_lineTo && m_lineTo < GetItemCount(),
|
||||
|
@@ -153,7 +153,8 @@ static gint gtk_frame_delete_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WX
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#if wxUSE_MENUS
|
||||
#if wxUSE_MENUS_NATIVE
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// "child_attached" of menu bar
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -177,7 +178,8 @@ static void gtk_menu_detached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *
|
||||
win->m_menuBarDetached = TRUE;
|
||||
win->GtkUpdateSize();
|
||||
}
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
#endif // wxUSE_MENUS_NATIVE
|
||||
|
||||
#if wxUSE_TOOLBAR
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -1050,17 +1052,14 @@ void wxFrameGTK::OnInternalIdle()
|
||||
// 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_wxwindow != NULL), wxT("invalid frame") );
|
||||
|
||||
if (menuBar == m_frameMenuBar)
|
||||
return;
|
||||
|
||||
if (m_frameMenuBar)
|
||||
if ( m_frameMenuBar )
|
||||
{
|
||||
m_frameMenuBar->UnsetInvokingWindow( this );
|
||||
|
||||
@@ -1078,7 +1077,12 @@ void wxFrameGTK::SetMenuBar( wxMenuBar *menuBar )
|
||||
gtk_widget_unparent( m_frameMenuBar->m_widget );
|
||||
}
|
||||
|
||||
m_frameMenuBar = menuBar;
|
||||
wxFrameBase::DetachMenuBar();
|
||||
}
|
||||
|
||||
void wxFrameGTK::AttachMenuBar( wxMenuBar *menuBar )
|
||||
{
|
||||
wxFrameBase::AttachMenuBar(menuBar);
|
||||
|
||||
if (m_frameMenuBar)
|
||||
{
|
||||
@@ -1108,7 +1112,7 @@ void wxFrameGTK::SetMenuBar( wxMenuBar *menuBar )
|
||||
m_sizeSet = FALSE;
|
||||
}
|
||||
|
||||
#endif // wxUSE_MENUS
|
||||
#endif // wxUSE_MENUS_NATIVE
|
||||
|
||||
#if wxUSE_TOOLBAR
|
||||
|
||||
|
@@ -141,11 +141,11 @@ static void wxInsertChildInDialog( wxPopupWindow* parent, wxWindow* child )
|
||||
// wxPopupWindow
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
BEGIN_EVENT_TABLE(wxPopupWindow,wxPopupWindowBase)
|
||||
EVT_SIZE (wxPopupWindow::OnSize)
|
||||
BEGIN_EVENT_TABLE(wxPopupWindow, wxPopupWindowBase)
|
||||
EVT_SIZE(wxPopupWindow::OnSize)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxPopupWindow,wxPopupWindowBase)
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxPopupWindow, wxWindow)
|
||||
|
||||
bool wxPopupWindow::Create( wxWindow *parent, int style )
|
||||
{
|
||||
|
@@ -2260,11 +2260,13 @@ wxWindow *wxGetActiveWindow()
|
||||
// wxWindowGTK
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// in wxUniv/MSW this class is abstract because it doesn't have DoPopupMenu()
|
||||
// method
|
||||
#ifdef __WXUNIVERSAL__
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxWindowGTK, wxWindowBase)
|
||||
#else
|
||||
IMPLEMENT_ABSTRACT_CLASS(wxWindowGTK, wxWindowBase)
|
||||
#else // __WXGTK__
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxWindow, wxWindowBase)
|
||||
#endif
|
||||
#endif // __WXUNIVERSAL__/__WXGTK__
|
||||
|
||||
void wxWindowGTK::Init()
|
||||
{
|
||||
@@ -3605,7 +3607,7 @@ void wxWindowGTK::ApplyWidgetStyle()
|
||||
// Pop-up menu stuff
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_MENUS
|
||||
#if wxUSE_MENUS_NATIVE
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
#endif // wxUSE_MENUS
|
||||
#endif // wxUSE_MENUS_NATIVE
|
||||
|
||||
#if wxUSE_DRAG_AND_DROP
|
||||
|
||||
|
@@ -153,7 +153,8 @@ static gint gtk_frame_delete_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WX
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#if wxUSE_MENUS
|
||||
#if wxUSE_MENUS_NATIVE
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// "child_attached" of menu bar
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -177,7 +178,8 @@ static void gtk_menu_detached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *
|
||||
win->m_menuBarDetached = TRUE;
|
||||
win->GtkUpdateSize();
|
||||
}
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
#endif // wxUSE_MENUS_NATIVE
|
||||
|
||||
#if wxUSE_TOOLBAR
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -1050,17 +1052,14 @@ void wxFrameGTK::OnInternalIdle()
|
||||
// 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_wxwindow != NULL), wxT("invalid frame") );
|
||||
|
||||
if (menuBar == m_frameMenuBar)
|
||||
return;
|
||||
|
||||
if (m_frameMenuBar)
|
||||
if ( m_frameMenuBar )
|
||||
{
|
||||
m_frameMenuBar->UnsetInvokingWindow( this );
|
||||
|
||||
@@ -1078,7 +1077,12 @@ void wxFrameGTK::SetMenuBar( wxMenuBar *menuBar )
|
||||
gtk_widget_unparent( m_frameMenuBar->m_widget );
|
||||
}
|
||||
|
||||
m_frameMenuBar = menuBar;
|
||||
wxFrameBase::DetachMenuBar();
|
||||
}
|
||||
|
||||
void wxFrameGTK::AttachMenuBar( wxMenuBar *menuBar )
|
||||
{
|
||||
wxFrameBase::AttachMenuBar(menuBar);
|
||||
|
||||
if (m_frameMenuBar)
|
||||
{
|
||||
@@ -1108,7 +1112,7 @@ void wxFrameGTK::SetMenuBar( wxMenuBar *menuBar )
|
||||
m_sizeSet = FALSE;
|
||||
}
|
||||
|
||||
#endif // wxUSE_MENUS
|
||||
#endif // wxUSE_MENUS_NATIVE
|
||||
|
||||
#if wxUSE_TOOLBAR
|
||||
|
||||
|
@@ -141,11 +141,11 @@ static void wxInsertChildInDialog( wxPopupWindow* parent, wxWindow* child )
|
||||
// wxPopupWindow
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
BEGIN_EVENT_TABLE(wxPopupWindow,wxPopupWindowBase)
|
||||
EVT_SIZE (wxPopupWindow::OnSize)
|
||||
BEGIN_EVENT_TABLE(wxPopupWindow, wxPopupWindowBase)
|
||||
EVT_SIZE(wxPopupWindow::OnSize)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxPopupWindow,wxPopupWindowBase)
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxPopupWindow, wxWindow)
|
||||
|
||||
bool wxPopupWindow::Create( wxWindow *parent, int style )
|
||||
{
|
||||
|
@@ -2260,11 +2260,13 @@ wxWindow *wxGetActiveWindow()
|
||||
// wxWindowGTK
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// in wxUniv/MSW this class is abstract because it doesn't have DoPopupMenu()
|
||||
// method
|
||||
#ifdef __WXUNIVERSAL__
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxWindowGTK, wxWindowBase)
|
||||
#else
|
||||
IMPLEMENT_ABSTRACT_CLASS(wxWindowGTK, wxWindowBase)
|
||||
#else // __WXGTK__
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxWindow, wxWindowBase)
|
||||
#endif
|
||||
#endif // __WXUNIVERSAL__/__WXGTK__
|
||||
|
||||
void wxWindowGTK::Init()
|
||||
{
|
||||
@@ -3605,7 +3607,7 @@ void wxWindowGTK::ApplyWidgetStyle()
|
||||
// Pop-up menu stuff
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_MENUS
|
||||
#if wxUSE_MENUS_NATIVE
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
#endif // wxUSE_MENUS
|
||||
#endif // wxUSE_MENUS_NATIVE
|
||||
|
||||
#if wxUSE_DRAG_AND_DROP
|
||||
|
||||
|
@@ -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!
|
||||
ALL_SOURCES = \
|
||||
generic/busyinfo.cpp \
|
||||
|
@@ -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!
|
||||
ALL_SOURCES = \
|
||||
generic/busyinfo.cpp \
|
||||
|
@@ -486,24 +486,10 @@ void wxFrameMSW::PositionStatusBar()
|
||||
}
|
||||
#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
|
||||
|
||||
void wxFrameMSW::AttachMenuBar(wxMenuBar *menubar)
|
||||
{
|
||||
if ( !menubar )
|
||||
{
|
||||
// actually remove the menu from the frame
|
||||
@@ -519,7 +505,7 @@ void wxFrameMSW::SetMenuBar(wxMenuBar *menubar)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (menubar->IsAttached())
|
||||
if ( menubar->IsAttached() )
|
||||
menubar->Detach();
|
||||
|
||||
m_hMenu = menubar->Create();
|
||||
@@ -530,18 +516,8 @@ void wxFrameMSW::SetMenuBar(wxMenuBar *menubar)
|
||||
|
||||
InternalSetMenuBar();
|
||||
}
|
||||
#endif // wxUSE_MENUS_NATIVE
|
||||
|
||||
if ( menubar )
|
||||
{
|
||||
m_frameMenuBar = menubar;
|
||||
menubar->Attach((wxFrame *)this);
|
||||
}
|
||||
#endif // wxUSE_MENUS
|
||||
}
|
||||
|
||||
#if wxUSE_MENUS_NATIVE
|
||||
|
||||
void wxFrameMSW::InternalSetMenuBar()
|
||||
{
|
||||
#ifndef __WXMICROWIN__
|
||||
|
@@ -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!
|
||||
|
||||
#
|
||||
|
@@ -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!
|
||||
|
||||
#
|
||||
|
@@ -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!
|
||||
|
||||
#
|
||||
|
@@ -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!
|
||||
|
||||
#
|
||||
|
@@ -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!
|
||||
|
||||
# Symantec C++ makefile for the msw objects
|
||||
|
@@ -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!
|
||||
|
||||
# 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,
|
||||
# but sometimes it's useful to do so for testing purposes.
|
||||
NONESSENTIALOBJS= ..\generic\$D\accel.obj \
|
||||
..\generic\$D\caret.obj \
|
||||
..\generic\$D\colrdlgg.obj \
|
||||
..\generic\$D\dcpsg.obj \
|
||||
NONESSENTIALOBJS= ..\generic\$D\colrdlgg.obj \
|
||||
..\generic\$D\dirdlgg.obj \
|
||||
..\generic\$D\filedlgg.obj \
|
||||
..\generic\$D\fontdlgg.obj \
|
||||
..\generic\$D\helpext.obj \
|
||||
..\generic\$D\helphtml.obj \
|
||||
@@ -132,10 +128,6 @@ NONESSENTIALOBJS= ..\generic\$D\accel.obj \
|
||||
..\generic\$D\listctrl.obj \
|
||||
..\generic\$D\msgdlgg.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
|
||||
|
||||
COMMONOBJS = \
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#!/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!
|
||||
|
||||
#
|
||||
|
@@ -300,8 +300,7 @@ void wxComboControl::DoMoveWindow(int x, int y, int width, int height)
|
||||
width -= rectBorders.x + rectBorders.width;
|
||||
height -= rectBorders.y + rectBorders.height;
|
||||
|
||||
wxSize sizeBtn = m_btn->GetSize(),
|
||||
sizeText = m_text->GetSize();
|
||||
wxSize sizeBtn = m_btn->GetSize();
|
||||
|
||||
wxCoord wText = width - sizeBtn.x;
|
||||
m_text->SetSize(x, y, wText, height);
|
||||
|
@@ -8,12 +8,15 @@ UNIVOBJS = \
|
||||
colschem.o \
|
||||
control.o \
|
||||
combobox.o \
|
||||
evtloop.o \
|
||||
framuniv.o \
|
||||
gauge.o \
|
||||
gtk.o \
|
||||
inphand.o \
|
||||
listbox.o \
|
||||
menu.o \
|
||||
notebook.o \
|
||||
popupcmn.o \
|
||||
radiobox.o \
|
||||
radiobut.o \
|
||||
renderer.o \
|
||||
|
@@ -41,11 +41,7 @@ BEGIN_EVENT_TABLE(wxFrame, wxFrameNative)
|
||||
EVT_SIZE(wxFrame::OnSize)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxFrameMSW)
|
||||
#elif defined(__WXGTK__)
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxFrameGTK)
|
||||
#endif
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxWindow)
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// ctors
|
||||
|
@@ -2038,7 +2038,7 @@ void wxMenuBar::OnKeyDown(wxKeyEvent& event)
|
||||
}
|
||||
else // right
|
||||
{
|
||||
if ( ++currentNew == (int)count )
|
||||
if ( ++currentNew == count )
|
||||
currentNew = 0;
|
||||
}
|
||||
|
||||
@@ -2263,7 +2263,7 @@ void wxMenuBar::OnDismissMenu(bool dismissMenuBar)
|
||||
|
||||
void wxMenuBar::OnDismiss()
|
||||
{
|
||||
ReleaseCapture();
|
||||
ReleaseMouse();
|
||||
|
||||
if ( m_current != -1 )
|
||||
{
|
||||
|
Reference in New Issue
Block a user