wxMSW update for CW, wxMac updated
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4801 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -27,14 +27,15 @@ class WXDLLEXPORT wxMacPrinter: public wxPrinterBase
|
||||
DECLARE_DYNAMIC_CLASS(wxMacPrinter)
|
||||
|
||||
public:
|
||||
wxMacPrinter(wxPrintData *data = NULL);
|
||||
~wxMacPrinter(void);
|
||||
wxMacPrinter(wxPrintDialogData *data = NULL);
|
||||
virtual ~wxMacPrinter();
|
||||
|
||||
virtual bool Print(wxWindow *parent, wxPrintout *printout, bool prompt = TRUE);
|
||||
virtual bool PrintDialog(wxWindow *parent);
|
||||
virtual bool Print(wxWindow *parent,
|
||||
wxPrintout *printout,
|
||||
bool prompt = TRUE);
|
||||
virtual wxDC* PrintDialog(wxWindow *parent);
|
||||
virtual bool Setup(wxWindow *parent);
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -47,11 +48,16 @@ class WXDLLEXPORT wxMacPrintPreview: public wxPrintPreviewBase
|
||||
DECLARE_CLASS(wxMacPrintPreview)
|
||||
|
||||
public:
|
||||
wxMacPrintPreview(wxPrintout *printout, wxPrintout *printoutForPrinting = NULL, wxPrintData *data = NULL);
|
||||
~wxMacPrintPreview(void);
|
||||
wxMacPrintPreview(wxPrintout *printout,
|
||||
wxPrintout *printoutForPrinting = NULL,
|
||||
wxPrintDialogData *data = NULL);
|
||||
wxMacPrintPreview(wxPrintout *printout,
|
||||
wxPrintout *printoutForPrinting,
|
||||
wxPrintData *data);
|
||||
virtual ~wxMacPrintPreview();
|
||||
|
||||
virtual bool Print(bool interactive);
|
||||
virtual void DetermineScaling(void);
|
||||
virtual void DetermineScaling();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -102,7 +102,7 @@ typedef void (wxEvtHandler::*wxNotebookEventFunction)(wxNotebookEvent&);
|
||||
#elif defined(__WXQT__)
|
||||
#include "wx/qt/notebook.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/mac/notebook.h"
|
||||
#include "wx/generic/notebook.h"
|
||||
#elif defined(__WXPM__)
|
||||
#include "wx/os2/notebook.h"
|
||||
#elif defined(__WXSTUBS__)
|
||||
|
@@ -50,7 +50,7 @@ extern wxList wxPendingDelete;
|
||||
extern wxList *wxWinMacWindowList;
|
||||
extern wxList *wxWinMacControlList;
|
||||
|
||||
extern wxApp *wxTheApp ;
|
||||
wxApp *wxTheApp = NULL;
|
||||
|
||||
#if !USE_SHARED_LIBRARY
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxApp, wxEvtHandler)
|
||||
|
@@ -50,7 +50,7 @@ extern wxList wxPendingDelete;
|
||||
extern wxList *wxWinMacWindowList;
|
||||
extern wxList *wxWinMacControlList;
|
||||
|
||||
extern wxApp *wxTheApp ;
|
||||
wxApp *wxTheApp = NULL;
|
||||
|
||||
#if !USE_SHARED_LIBRARY
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxApp, wxEvtHandler)
|
||||
|
@@ -341,6 +341,56 @@ void wxFrame::OnSysColourChanged(wxSysColourChangedEvent& event)
|
||||
|
||||
// Default resizing behaviour - if only ONE subwindow,
|
||||
// resize to client rectangle size
|
||||
void wxFrame::OnIdle(wxIdleEvent& WXUNUSED(event) )
|
||||
{
|
||||
DoMenuUpdates();
|
||||
}
|
||||
|
||||
|
||||
// update all menus
|
||||
void wxFrame::DoMenuUpdates()
|
||||
{
|
||||
wxMenuBar* bar = GetMenuBar();
|
||||
|
||||
if ( bar != NULL )
|
||||
{
|
||||
int nCount = bar->GetMenuCount();
|
||||
for (int n = 0; n < nCount; n++)
|
||||
DoMenuUpdates(bar->GetMenu(n), (wxWindow*) NULL);
|
||||
}
|
||||
}
|
||||
|
||||
// update a menu and all submenus recursively
|
||||
void wxFrame::DoMenuUpdates(wxMenu* menu, wxWindow* WXUNUSED(focusWin))
|
||||
{
|
||||
wxEvtHandler* evtHandler = GetEventHandler();
|
||||
wxMenuItemList::Node* node = menu->GetMenuItems().GetFirst();
|
||||
while (node)
|
||||
{
|
||||
wxMenuItem* item = node->GetData();
|
||||
if ( !item->IsSeparator() )
|
||||
{
|
||||
wxWindowID id = item->GetId();
|
||||
wxUpdateUIEvent event(id);
|
||||
event.SetEventObject( this );
|
||||
|
||||
if (evtHandler->ProcessEvent(event))
|
||||
{
|
||||
if (event.GetSetText())
|
||||
menu->SetLabel(id, event.GetText());
|
||||
if (event.GetSetChecked())
|
||||
menu->Check(id, event.GetChecked());
|
||||
if (event.GetSetEnabled())
|
||||
menu->Enable(id, event.GetEnabled());
|
||||
}
|
||||
|
||||
if (item->GetSubMenu())
|
||||
DoMenuUpdates(item->GetSubMenu(), (wxWindow*) NULL);
|
||||
}
|
||||
node = node->GetNext();
|
||||
}
|
||||
}
|
||||
|
||||
void wxFrame::OnSize(wxSizeEvent& event)
|
||||
{
|
||||
// if we're using constraints - do use them
|
||||
|
@@ -241,6 +241,5 @@ bool wxMDIClientWindow::CreateClient(wxMDIParentFrame *parent, long style)
|
||||
// Explicitly call default scroll behaviour
|
||||
void wxMDIClientWindow::OnScroll(wxScrollEvent& event)
|
||||
{
|
||||
Default(); // Default processing
|
||||
}
|
||||
|
||||
|
@@ -838,7 +838,6 @@ void wxWindow::WarpPointer (int x_pos, int y_pos)
|
||||
void wxWindow::OnEraseBackground(wxEraseEvent& event)
|
||||
{
|
||||
// TODO : probably we would adopt the EraseEvent structure
|
||||
Default();
|
||||
}
|
||||
|
||||
int wxWindow::GetScrollPos(int orient) const
|
||||
|
@@ -341,6 +341,56 @@ void wxFrame::OnSysColourChanged(wxSysColourChangedEvent& event)
|
||||
|
||||
// Default resizing behaviour - if only ONE subwindow,
|
||||
// resize to client rectangle size
|
||||
void wxFrame::OnIdle(wxIdleEvent& WXUNUSED(event) )
|
||||
{
|
||||
DoMenuUpdates();
|
||||
}
|
||||
|
||||
|
||||
// update all menus
|
||||
void wxFrame::DoMenuUpdates()
|
||||
{
|
||||
wxMenuBar* bar = GetMenuBar();
|
||||
|
||||
if ( bar != NULL )
|
||||
{
|
||||
int nCount = bar->GetMenuCount();
|
||||
for (int n = 0; n < nCount; n++)
|
||||
DoMenuUpdates(bar->GetMenu(n), (wxWindow*) NULL);
|
||||
}
|
||||
}
|
||||
|
||||
// update a menu and all submenus recursively
|
||||
void wxFrame::DoMenuUpdates(wxMenu* menu, wxWindow* WXUNUSED(focusWin))
|
||||
{
|
||||
wxEvtHandler* evtHandler = GetEventHandler();
|
||||
wxMenuItemList::Node* node = menu->GetMenuItems().GetFirst();
|
||||
while (node)
|
||||
{
|
||||
wxMenuItem* item = node->GetData();
|
||||
if ( !item->IsSeparator() )
|
||||
{
|
||||
wxWindowID id = item->GetId();
|
||||
wxUpdateUIEvent event(id);
|
||||
event.SetEventObject( this );
|
||||
|
||||
if (evtHandler->ProcessEvent(event))
|
||||
{
|
||||
if (event.GetSetText())
|
||||
menu->SetLabel(id, event.GetText());
|
||||
if (event.GetSetChecked())
|
||||
menu->Check(id, event.GetChecked());
|
||||
if (event.GetSetEnabled())
|
||||
menu->Enable(id, event.GetEnabled());
|
||||
}
|
||||
|
||||
if (item->GetSubMenu())
|
||||
DoMenuUpdates(item->GetSubMenu(), (wxWindow*) NULL);
|
||||
}
|
||||
node = node->GetNext();
|
||||
}
|
||||
}
|
||||
|
||||
void wxFrame::OnSize(wxSizeEvent& event)
|
||||
{
|
||||
// if we're using constraints - do use them
|
||||
|
@@ -241,6 +241,5 @@ bool wxMDIClientWindow::CreateClient(wxMDIParentFrame *parent, long style)
|
||||
// Explicitly call default scroll behaviour
|
||||
void wxMDIClientWindow::OnScroll(wxScrollEvent& event)
|
||||
{
|
||||
Default(); // Default processing
|
||||
}
|
||||
|
||||
|
@@ -838,7 +838,6 @@ void wxWindow::WarpPointer (int x_pos, int y_pos)
|
||||
void wxWindow::OnEraseBackground(wxEraseEvent& event)
|
||||
{
|
||||
// TODO : probably we would adopt the EraseEvent structure
|
||||
Default();
|
||||
}
|
||||
|
||||
int wxWindow::GetScrollPos(int orient) const
|
||||
|
@@ -593,7 +593,17 @@ int wxEntry(WXHINSTANCE hInstance,
|
||||
// (another useful flag is _CRTDBG_DELAY_FREE_MEM_DF which doesn't free
|
||||
// deallocated memory which may be used to simulate low-memory condition)
|
||||
wxCrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF);
|
||||
|
||||
#ifdef __MWERKS__
|
||||
#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
|
||||
// This seems to be necessary since there are 'rogue'
|
||||
// objects present at this point (perhaps global objects?)
|
||||
// Setting a checkpoint will ignore them as far as the
|
||||
// memory checking facility is concerned.
|
||||
// Of course you may argue that memory allocated in globals should be
|
||||
// checked, but this is a reasonable compromise.
|
||||
wxDebugContext::SetCheckpoint();
|
||||
#endif
|
||||
#endif
|
||||
// take everything into a try-except block in release build
|
||||
// FIXME other compilers must support Win32 SEH (structured exception
|
||||
// handling) too, just find the appropriate keyword in their docs!
|
||||
|
Reference in New Issue
Block a user