1998-05-20 10:01:55 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: app.h
|
|
|
|
// Purpose:
|
|
|
|
// Author: Robert Roebling
|
1998-10-26 05:56:58 -05:00
|
|
|
// Id: $Id$
|
1998-10-24 13:12:05 -04:00
|
|
|
// Copyright: (c) 1998 Robert Roebling, Julian Smart
|
1998-08-07 11:09:04 -04:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 10:01:55 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef __GTKAPPH__
|
|
|
|
#define __GTKAPPH__
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "wx/frame.h"
|
1999-07-05 07:22:45 -04:00
|
|
|
#include "wx/icon.h"
|
1998-05-20 10:01:55 -04:00
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// classes
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class wxApp;
|
|
|
|
class wxLog;
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxApp
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
1999-07-05 20:44:26 -04:00
|
|
|
class wxApp: public wxAppBase
|
1998-05-20 10:01:55 -04:00
|
|
|
{
|
1999-07-05 20:44:26 -04:00
|
|
|
public:
|
1999-01-08 15:33:18 -05:00
|
|
|
wxApp();
|
|
|
|
~wxApp();
|
1998-08-07 11:09:04 -04:00
|
|
|
|
1999-07-05 20:44:26 -04: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(). */
|
1999-01-08 15:33:18 -05:00
|
|
|
virtual bool OnInitGui();
|
1999-07-05 20:44:26 -04:00
|
|
|
|
|
|
|
// override base class (pure) virtuals
|
1999-01-08 15:33:18 -05:00
|
|
|
virtual int MainLoop();
|
1999-07-05 20:44:26 -04:00
|
|
|
virtual void ExitMainLoop();
|
|
|
|
virtual bool Initialized();
|
1999-01-08 15:33:18 -05:00
|
|
|
virtual bool Pending();
|
|
|
|
virtual void Dispatch();
|
1998-06-03 15:06:13 -04:00
|
|
|
|
1999-07-05 07:22:45 -04:00
|
|
|
virtual wxIcon GetStdIcon(int which) const;
|
1998-06-03 15:06:13 -04:00
|
|
|
|
1999-07-05 20:44:26 -04:00
|
|
|
// implementation only from now on
|
1998-08-07 11:09:04 -04:00
|
|
|
void OnIdle( wxIdleEvent &event );
|
1999-01-08 15:33:18 -05:00
|
|
|
bool SendIdleEvents();
|
1998-06-03 15:06:13 -04:00
|
|
|
bool SendIdleEvents( wxWindow* win );
|
1998-08-07 11:09:04 -04:00
|
|
|
|
1999-01-19 11:33:16 -05:00
|
|
|
static bool Initialize();
|
|
|
|
static bool InitialzeVisual();
|
|
|
|
static void CleanUp();
|
1998-08-07 11:09:04 -04:00
|
|
|
|
1999-01-08 15:33:18 -05:00
|
|
|
bool ProcessIdle();
|
|
|
|
void DeletePendingObjects();
|
1998-08-07 11:09:04 -04:00
|
|
|
|
1999-07-05 20:44:26 -04:00
|
|
|
// This can be used to suppress the generation of Idle events.
|
|
|
|
void SuppressIdleEvents(bool arg = TRUE) { m_suppressIdleEvents = arg; }
|
|
|
|
bool GetSuppressIdleEvents() const { return m_suppressIdleEvents; }
|
|
|
|
|
1999-01-12 12:53:45 -05:00
|
|
|
bool m_initialized;
|
1999-07-05 20:44:26 -04:00
|
|
|
|
1999-01-12 12:53:45 -05:00
|
|
|
gint m_idleTag;
|
1999-05-22 06:11:03 -04:00
|
|
|
#if wxUSE_THREADS
|
1999-05-22 04:01:17 -04:00
|
|
|
gint m_wakeUpTimerTag;
|
1999-05-22 06:11:03 -04:00
|
|
|
#endif
|
1999-01-12 12:53:45 -05:00
|
|
|
unsigned char *m_colorCube;
|
1998-08-07 11:09:04 -04:00
|
|
|
|
1999-07-05 20:44:26 -04:00
|
|
|
private:
|
1999-04-08 16:51:00 -04:00
|
|
|
/// Set to TRUE while we are in wxYield().
|
|
|
|
bool m_suppressIdleEvents;
|
1999-07-05 20:44:26 -04:00
|
|
|
|
1999-10-11 06:05:36 -04:00
|
|
|
private:
|
1999-08-24 16:26:06 -04:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxApp)
|
1999-07-05 20:44:26 -04:00
|
|
|
DECLARE_EVENT_TABLE()
|
1998-05-20 10:01:55 -04:00
|
|
|
};
|
|
|
|
|
2000-08-24 01:50:48 -04:00
|
|
|
int WXDLLEXPORT wxEntry( int argc, char *argv[] );
|
|
|
|
|
1998-05-20 10:01:55 -04:00
|
|
|
#endif // __GTKAPPH__
|