2001-06-26 21:05:06 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: app.h
|
|
|
|
// Purpose:
|
|
|
|
// Author: Vaclav Slavik
|
|
|
|
// Id: $Id$
|
2001-06-29 19:03:13 +00:00
|
|
|
// Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com)
|
2001-06-26 21:05:06 +00:00
|
|
|
// 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
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2001-08-09 22:40:39 +00:00
|
|
|
class WXDLLEXPORT wxApp;
|
|
|
|
class WXDLLEXPORT wxLog;
|
2001-08-15 23:48:31 +00:00
|
|
|
class WXDLLEXPORT wxEventLoop;
|
2001-06-26 21:05:06 +00:00
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxApp
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class WXDLLEXPORT wxApp: public wxAppBase
|
|
|
|
{
|
|
|
|
public:
|
2001-08-09 22:40:39 +00:00
|
|
|
wxApp();
|
|
|
|
~wxApp();
|
2001-06-26 21:05:06 +00:00
|
|
|
|
|
|
|
/* 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(). */
|
2001-08-09 22:40:39 +00:00
|
|
|
virtual bool OnInitGui();
|
2001-06-26 21:05:06 +00:00
|
|
|
|
|
|
|
// override base class (pure) virtuals
|
2001-08-09 22:40:39 +00:00
|
|
|
virtual int MainLoop();
|
|
|
|
virtual void ExitMainLoop();
|
|
|
|
virtual bool Initialized();
|
|
|
|
virtual bool Pending();
|
|
|
|
virtual void Dispatch();
|
2001-06-26 21:05:06 +00:00
|
|
|
|
2001-08-09 22:40:39 +00:00
|
|
|
virtual wxIcon GetStdIcon(int which) const;
|
2001-06-26 21:05:06 +00:00
|
|
|
|
|
|
|
// implementation only from now on
|
2001-08-09 22:40:39 +00:00
|
|
|
void OnIdle(wxIdleEvent &event);
|
|
|
|
bool SendIdleEvents();
|
|
|
|
bool SendIdleEvents(wxWindow* win);
|
2001-06-26 21:05:06 +00:00
|
|
|
|
2001-08-09 22:40:39 +00:00
|
|
|
static bool Initialize();
|
|
|
|
static void CleanUp();
|
2001-06-26 21:05:06 +00:00
|
|
|
|
2001-08-09 22:40:39 +00:00
|
|
|
bool ProcessIdle();
|
|
|
|
void DeletePendingObjects();
|
2001-06-26 21:05:06 +00:00
|
|
|
|
2001-10-20 22:07:13 +00:00
|
|
|
virtual bool Yield(bool onlyIfNeeded = FALSE);
|
|
|
|
|
2001-11-04 00:00:36 +00:00
|
|
|
virtual wxDisplayModeInfo GetDisplayMode() const { return m_displayMode; }
|
|
|
|
virtual bool SetDisplayMode(const wxDisplayModeInfo& mode);
|
|
|
|
|
2001-06-26 21:05:06 +00:00
|
|
|
private:
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxApp)
|
|
|
|
DECLARE_EVENT_TABLE()
|
2001-08-15 23:48:31 +00:00
|
|
|
|
|
|
|
wxEventLoop *m_mainLoop;
|
2001-11-04 00:00:36 +00:00
|
|
|
wxDisplayModeInfo m_displayMode;
|
2001-06-26 21:05:06 +00:00
|
|
|
};
|
|
|
|
|
2001-08-09 22:40:39 +00:00
|
|
|
int WXDLLEXPORT wxEntry(int argc, char *argv[]);
|
2001-06-26 21:05:06 +00:00
|
|
|
|
|
|
|
#endif // __WX_APP_H__
|