e39af974ef
- wxWindow::OnInternalIdle is now used in all ports, and ensures that user OnIdle events do not interfere with crucial internal processing. - wxWindow::UpdateWindowUI is now a documented function that sends wxUpdateUIEvents, and can be overridden. It has a helper function DoUpdateWindowUI for taking appropriate wxUpdateUIEvent action. - Added functions to wxUpdateUIEvent: Set/GetMode, Set/GetUpdateInterval, CanUpdate, to assist with optimising update event frequency. - Added functions to wxIdleEvent: Set/GetMode, CanSend, to determine whether a window should receive idle events. - Added wxWS_EX_PROCESS_IDLE, wxWS_EX_PROCESS_UI_UPDATES window styles for use with conservative idle and update event modes. - wxMSW and wxGTK now send menu update events only when a menu is about to be used. - Added WM_INITMENU processing instead of WM_ENTERMENULOOP, or accelerators don't always get called since menu items may still be disabled. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21789 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
72 lines
2.0 KiB
C++
72 lines
2.0 KiB
C++
/////////////////////////////////////////////////////////////////////////////
|
|
// Name: app.h
|
|
// Purpose:
|
|
// Author: Vaclav Slavik
|
|
// Id: $Id$
|
|
// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
|
|
// Licence: wxWindows licence
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
#ifndef __WX_APP_H__
|
|
#define __WX_APP_H__
|
|
|
|
#ifdef __GNUG__
|
|
#pragma interface "app.h"
|
|
#endif
|
|
|
|
#include "wx/frame.h"
|
|
#include "wx/icon.h"
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// classes
|
|
//-----------------------------------------------------------------------------
|
|
|
|
class WXDLLEXPORT wxApp;
|
|
class WXDLLEXPORT wxLog;
|
|
class WXDLLEXPORT wxEventLoop;
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// wxApp
|
|
//-----------------------------------------------------------------------------
|
|
|
|
class WXDLLEXPORT wxApp: public wxAppBase
|
|
{
|
|
public:
|
|
wxApp();
|
|
~wxApp();
|
|
|
|
/* override for altering the way wxGTK intializes the GUI
|
|
* (palette/visual/colorcube). under wxMSW, OnInitGui() does nothing by
|
|
* default. when overriding this method, the code in it is likely to be
|
|
* platform dependent, otherwise use OnInit(). */
|
|
virtual bool OnInitGui();
|
|
|
|
// override base class (pure) virtuals
|
|
virtual int MainLoop();
|
|
virtual void ExitMainLoop();
|
|
virtual bool Initialized();
|
|
virtual bool Pending();
|
|
virtual void Dispatch();
|
|
|
|
// implementation only from now on
|
|
void OnIdle(wxIdleEvent &event);
|
|
|
|
virtual bool Initialize(int& argc, wxChar **argv);
|
|
virtual void CleanUp();
|
|
|
|
virtual bool Yield(bool onlyIfNeeded = FALSE);
|
|
|
|
virtual wxDisplayModeInfo GetDisplayMode() const { return m_displayMode; }
|
|
virtual bool SetDisplayMode(const wxDisplayModeInfo& mode);
|
|
|
|
private:
|
|
DECLARE_DYNAMIC_CLASS(wxApp)
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
wxEventLoop *m_mainLoop;
|
|
wxDisplayModeInfo m_displayMode;
|
|
};
|
|
|
|
#endif // __WX_APP_H__
|
|
|